.testimonials-tabs {
    padding: var(--wp--preset--spacing--m-l) 0;
    display: flex;
    flex-wrap: wrap;
    gap: clamp(2rem, 0.214rem + 4.762vw, 4.5rem);
}

/* colonne gauche */
.testi-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: var(--wp--preset--spacing--xs);
    position: relative;
}

.testi-nav:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 625px;
    height: 625px;
    background: radial-gradient(circle, rgba(69, 101, 167, 1) 0%, rgba(69, 101, 167, 0) 70%);
    border-radius: var(--wp--custom--radius--full);
    opacity: 0.3;
    z-index: -1;
}

.testi-item {
    display: flex;
    flex-direction: column;
    background-color: var(--wp--preset--color--white);
    padding: clamp(1rem, 0.821rem + 0.476vw, 1.25rem) var(--wp--preset--spacing--m);
    cursor: pointer;
    transition: box-shadow .2s, outline .2s;
    border-radius: var(--wp--custom--radius--m);
    overflow: hidden;
    position: relative;
}

.testi-item-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--wp--preset--spacing--xxs);
}

.testi-item .testi-meta {
    display: flex;
    flex-direction: column;
}

.testi-item .testi-meta .testi-meta-name {
    font-family: var(--wp--preset--font-family--primary);
    font-weight: var(--wp--custom--font-weight--bold);
    font-size: var(--wp--preset--font-size--s);
}

.testi-item.active,
.testi-item:hover {
    box-shadow: var(--wp--preset--shadow--light);
}

/* Focus styles for accessibility */
.testi-item:focus {
    outline: 2px solid var(--wp--preset--color--primary, #4565a7);
    outline-offset: 2px;
}

.testi-item:focus:not(:focus-visible) {
    outline: none;
}

.testi-item:focus-visible {
    outline: 2px solid var(--wp--preset--color--primary, #4565a7);
    outline-offset: 2px;
}

.testi-thumb {
    width: 72px;
    height: 72px;
    border-radius: var(--wp--custom--radius--full);
    object-fit: cover;
}

/* Mobile content - hidden on desktop */
.testi-mobile-content {
    display: none;
    margin-top: var(--wp--preset--spacing--xxs);
    padding-top: var(--wp--preset--spacing--xxs);
    border-top: 1px solid var(--wp--preset--color--contrast);
}

.testi-mobile-content .testi-intro {
    font-family: var(--wp--preset--font-family--primary);
    font-weight: var(--wp--custom--font-weight--bold);
    font-size: var(--wp--preset--font-size--s);
    margin-bottom: var(--wp--preset--spacing--xxs);
}

.testi-mobile-content .testi-body {
    font-size: var(--wp--preset--font-size--s);
    line-height: 1.6;
}

/* Screen reader only class */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* colonne droite */
.testi-contents {
    flex: 1;
    position: relative;
}

.testi-contents .testi-intro {
    font-family: var(--wp--preset--font-family--primary);
    font-weight: var(--wp--custom--font-weight--bold);
    font-size: var(--wp--preset--font-size--s);
}

.testi-content {
    display: none;
    opacity: 0;
}

.testi-content.active {
    display: block;
    animation: fadeSlideIn .4s ease-out forwards;
}

/* à l'activation, on affiche + on déclenche l'animation */
@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Desktop: normal layout */
@media screen and (min-width: 768px) {
    .testi-mobile-content {
        display: none !important;
    }
}

/* Mobile: accordion layout */
@media screen and (max-width: 768px) {
    .testi-nav {
        flex: 0 0 100%;
        
    }
    
    .testi-contents {
        display: none; /* Hide desktop content on mobile */
    }
    
    .testi-item.active .testi-mobile-content {
        display: block;
        animation: fadeSlideIn .4s ease-out forwards;
    }
    
    .testi-item {
        margin-bottom: var(--wp--preset--spacing--xxs);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .testi-content.active {
        animation: none;
    }
    
    .testi-item.active .testi-mobile-content {
        animation: none;
    }
    
    .testi-item {
        transition: none;
    }
}