/* Testimonials Grid Layout - 3 columns fixed */
.testimonials-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 2rem;
    margin-top: 3rem;
    margin-bottom: 3rem;
    width: 100%;
    max-width: none;
}

/* Override Bootstrap container constraints */
.container .testimonials-grid {
    max-width: 100%;
    padding: 0;
}

/* Testimonial Card */
.testimonial-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: visible; /* Pour que le bouton de partage ne soit pas coupé */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    width: 100%;
    min-width: 0; /* Prevent grid blowout */
    position: relative; /* Pour le positionnement du bouton de partage */
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Video Container - Full width for vertical videos */
.testimonial-video-container {
    position: relative;
    background: #000;
    height: 500px; /* Tall height for vertical videos */
    overflow: hidden;
    width: 100%;
    border-radius: 12px 12px 0 0; /* Coins arrondis seulement en haut */
    cursor: pointer;
}

.testimonial-video-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M8 5v14l11-7z' fill='%23333'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 24px 24px;
}

.testimonial-video-container:hover::before {
    opacity: 1;
}

/* Hide play button when video is playing */
.testimonial-video-container.playing::before {
    display: none;
}

.testimonial-video {
    width: 100%; /* Full width */
    height: 100%;
    object-fit: cover; /* Cover for full width effect */
    object-position: center;
}

/* Remove play overlay since we're using real player */
.video-play-overlay {
    display: none !important;
}

/* Video loading state */
.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 14px;
    z-index: 1;
}

/* Testimonial Content - Citation style */
.testimonial-content {
    padding: 2rem 1.5rem;
    text-align: center;
    border-radius: 0 0 12px 12px; /* Coins arrondis en bas pour les cartes avec vidéo */
}

/* Pour les cartes sans vidéo, coins arrondis partout */
.testimonial-card:not(:has(.testimonial-video-container)) .testimonial-content {
    border-radius: 12px;
}

.testimonial-text {
    font-size: 16px;
    line-height: 1.4;
    color: #333;
    margin: 0;
    position: relative;
    font-weight: 300;
    font-style: italic;
    text-align: center;
}

/* HTML content styling */
.testimonial-text p {
    margin-bottom: 0.5rem;
    font-size: inherit;
    line-height: inherit;
}

.testimonial-text p:last-child {
    margin-bottom: 0;
}

.testimonial-text strong {
    font-weight: 500;
    color: #2c2c2c;
}

.testimonial-text em {
    font-style: italic;
    color: #555;
}

/* Remove date - hide it */
.testimonial-date {
    display: none;
}

/* Responsive Design - Force proper breakpoints */
@media (max-width: 1199px) {
    .testimonials-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 1.5rem;
    }
    
    .testimonial-video-container {
        height: 450px;
    }
}

@media (max-width: 767px) {
    .testimonials-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
        margin-top: 2rem;
    }
    
    .testimonial-video-container {
        height: 400px;
    }
    
    .testimonial-content {
        padding: 1.5rem 1rem;
    }
    
    .testimonial-text {
        font-size: 16px;
    }
}

@media (max-width: 479px) {
    .testimonials-grid {
        gap: 1rem;
        margin-top: 1.5rem;
    }
    
    .testimonial-video-container {
        height: 350px;
    }
    
    .testimonial-content {
        padding: 1.25rem 0.75rem;
    }
    
    .testimonial-text {
        font-size: 14px;
    }
}

/* Ensure 3 columns on large screens */
@media (min-width: 1200px) {
    .testimonials-grid {
        grid-template-columns: 1fr 1fr 1fr !important;
    }
    
    .testimonial-video-container {
        height: 500px;
    }
}

@media (min-width: 1400px) {
    .testimonials-grid {
        grid-template-columns: 1fr 1fr 1fr !important;
        max-width: 1300px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .testimonial-video-container {
        height: 550px;
    }
}

/* Loading animation */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.testimonial-card.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Focus states for accessibility */
.testimonial-video:focus {
    outline: 3px solid #d4b08a;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .testimonial-card {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .testimonial-card,
    .testimonial-video {
        transition: none;
    }
    
    .testimonial-card:hover {
        transform: none;
    }
}

/* Share Buttons Styles */
.testimonial-share-buttons {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
}

/* Positionnement dans la zone vidéo pour les témoignages avec vidéo */
.testimonial-video-container .testimonial-share-buttons {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 20; /* Plus élevé pour être au-dessus de la vidéo */
}

/* Positionnement pour les cartes sans vidéo (texte seulement) - dans testimonial-content */
.testimonial-content .testimonial-share-buttons {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
}

.share-testimonial-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    color: var(--purple-primary, #5F2C70);
}

.share-testimonial-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: var(--purple-secondary, #250831);
}

.share-testimonial-btn svg {
    transition: transform 0.2s ease;
}

.share-testimonial-btn:hover svg {
    transform: scale(1.1);
}

/* Adjust testimonial content positioning */
.testimonial-content {
    position: relative;
}

/* Share Modal Styles */
.share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.share-modal {
    background: white;
    border-radius: 12px;
    padding: 0;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { 
        transform: translateY(-20px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

.share-modal-header {
    padding: 1.5rem 1.5rem 0;
    display: flex;
    justify-content: between;
    align-items: center;
    border-bottom: 1px solid #eee;
    margin-bottom: 1.5rem;
}

.share-modal-header h5 {
    margin: 0;
    color: var(--purple-secondary, #333);
    font-weight: 600;
    flex: 1;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #666;
    cursor: pointer;
    padding: 0.25rem;
    margin-left: auto;
}

.btn-close:hover {
    color: #333;
}

.share-modal-body {
    padding: 0 1.5rem 1.5rem;
}

.share-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.share-options .btn {
    border-radius: 25px;
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.share-options .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.share-options .btn-primary {
    background: var(--purple-primary, #5F2C70);
    border-color: var(--purple-primary, #5F2C70);
}

.share-options .btn-primary:hover {
    background: var(--purple-secondary, #250831);
    border-color: var(--purple-secondary, #250831);
}

.share-options .btn-outline-primary {
    color: var(--purple-primary, #5F2C70);
    border-color: var(--purple-primary, #5F2C70);
}

.share-options .btn-outline-primary:hover {
    background: var(--purple-primary, #5F2C70);
    border-color: var(--purple-primary, #5F2C70);
    color: white;
}

.share-options .btn-outline-secondary {
    color: var(--purple-secondary, #250831);
    border-color: var(--purple-secondary, #250831);
}

.share-options .btn-outline-secondary:hover {
    background: var(--purple-secondary, #250831);
    border-color: var(--purple-secondary, #250831);
    color: white;
}

/* Mobile Responsive for Share Modal */
@media (max-width: 480px) {
    .share-modal {
        width: 95%;
        margin: 1rem;
    }
    
    .share-modal-header {
        padding: 1rem 1rem 0;
        margin-bottom: 1rem;
    }
    
    .share-modal-body {
        padding: 0 1rem 1rem;
    }
    
    .testimonial-share-buttons {
        top: 0.75rem;
        right: 0.75rem;
    }
    
    .share-testimonial-btn {
        width: 32px;
        height: 32px;
    }
    
    .share-testimonial-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* Toggle Button Styles */
.testimonial-toggle-btn {
    background: none;
    border: none;
    color: var(--purple-primary, #5F2C70);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    margin: 1rem auto 0;
    border-radius: 20px;
    transition: all 0.3s ease;
    background: rgba(95, 44, 112, 0.05);
    border: 1px solid rgba(95, 44, 112, 0.2);
}

.testimonial-toggle-btn:hover {
    background: rgba(95, 44, 112, 0.1);
    border-color: rgba(95, 44, 112, 0.3);
    transform: translateY(-1px);
    color: var(--purple-secondary, #250831);
}

.testimonial-toggle-btn:active {
    transform: translateY(0);
}

.testimonial-toggle-btn .toggle-icon {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.testimonial-toggle-btn:hover .toggle-icon {
    transform: translateY(1px);
}

/* Text Content Transitions */
.testimonial-text-content {
    transition: all 0.3s ease;
}

.testimonial-text-truncated,
.testimonial-text-full {
    transition: opacity 0.3s ease, max-height 0.3s ease;
}

/* Expanded state */
.testimonial-card.expanded {
    transition: all 0.3s ease;
}

.testimonial-card.expanded .testimonial-content {
    transition: padding 0.3s ease;
}

/* Focus states for accessibility */
.testimonial-toggle-btn:focus {
    outline: 2px solid var(--purple-primary, #5F2C70);
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .testimonial-toggle-btn {
        border: 2px solid var(--purple-primary, #5F2C70);
        background: white;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .testimonial-toggle-btn,
    .testimonial-text-content,
    .testimonial-text-truncated,
    .testimonial-text-full,
    .testimonial-card.expanded {
        transition: none;
    }
    
    .testimonial-toggle-btn:hover {
        transform: none;
    }
    
    .testimonial-toggle-btn:hover .toggle-icon {
        transform: none;
    }
}

/* Mobile responsive for toggle button */
@media (max-width: 767px) {
    .testimonial-toggle-btn {
        font-size: 13px;
        padding: 0.6rem 0.8rem;
        margin: 0.75rem auto 0;
    }
    
    .testimonial-toggle-btn .toggle-icon {
        font-size: 11px;
    }
}

@media (max-width: 479px) {
    .testimonial-toggle-btn {
        font-size: 12px;
        padding: 0.5rem 0.7rem;
        margin: 0.5rem auto 0;
    }
} 