/* --- Testimonials page (page-temoignages.php) --- */

.page-temoignages-partenaires-content .entry-header.page-header .entry-title { 
    text-align: center;
    color: var(--site-color-text);
    font-weight: 700;
    margin-bottom: 1.5em;
}

.page-temoignages-partenaires-content .entry-content.page-intro-content {
    text-align: center;
	max-width: 750px;
	margin-left: auto;
	margin-right: auto;
	margin-bottom: 2.5em;
	font-size: 1.1em;
	line-height: 1.7;
}

.front-page-section .section-header h2.section-title {
    font-weight: 500;
    font-size: 2em;
}

#page-partners-list .partners-grid, .partners-section .partners-grid {
    /* Styles inherited or define here */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); 
    gap: 20px;
    align-items: center;
    justify-items: center;
}
#page-partners-list .partner-item img, .partners-section .partner-item img {
    max-width: 100%;
    height: auto;
    max-height: 80px; 
    object-fit: contain;
}

/* Style for partners without a logo */
.partners-text-list {
    margin-top: 20px; 
    padding: 20px;
    background-color: var(--site-color-background-light);
    border-radius: 5px;
    border: 1px solid var(--site-color-border-light);
}

.partners-text-list h3 {
    font-size: 1.2em;
    color: var(--site-color-text-dark-safe);
    margin-bottom: 15px;
    text-align: center; 
}

.partners-text-list ul {
    list-style: none; 
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap; 
    justify-content: center; 
    gap: 15px 30px; 
}

.partners-text-list li {
    font-size: 1.1em;
    font-weight: 500;
    color: var(--site-color-text);
    padding: 5px 10px;
}


/* Filters for testimonials */
.testimonial-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 2em;
}

.testimonial-filters .filter-link {
    padding: 8px 15px;
    border: 1px solid var(--site-color-border-light);
    border-radius: 20px;
    text-decoration: none;
    color: var(--site-color-text);
    transition: all 0.3s ease;
    cursor: pointer;
}

.testimonial-filters .filter-link:hover {
    border-color: var(--accent-main);
}

.testimonial-filters .filter-link.active {
    background-color: var(--accent-main);
    color: var(--site-color-background);
    border-color: var(--accent-main);
    font-weight: bold;
}

/* Responsive : sur mobile, empêcher le wrapping et autoriser le scroll horizontal
   tout en masquant la scrollbar pour une apparence plus propre. Sur desktop,
   on garde le centrage (règle définie plus haut). */
@media (max-width: 549px) {
    .testimonial-filters {
        flex-wrap: nowrap;              /* ne pas répartir sur plusieurs lignes */
        gap: 8px;
        overflow-x: auto;               /* permettre le scroll horizontal si nécessaire */
        -webkit-overflow-scrolling: touch;
        padding: 6px 8px;               /* padding horizontal pour le scroll */
        justify-content: center;       /* centrer les filtres en mobile */
        align-items: center;
        -ms-overflow-style: none;       /* IE/Edge: hide scrollbar */
        scrollbar-width: none;          /* Firefox: hide scrollbar */
    }

    .testimonial-filters .filter-link {
        flex: 0 0 auto;                 /* ne pas s'étirer ; rester sur une ligne */
        white-space: nowrap;            /* empêcher le retour à la ligne dans chaque bouton */
        padding: 8px 12px;              /* ajuster si besoin pour réduire largeur */
        font-size: 0.95em;              /* optionnel : réduire légèrement en mobile */
    }

    /* WebKit: masquer complètement la scrollbar sur mobile */
    .testimonial-filters::-webkit-scrollbar { display: none; height: 0; }
}

/* Testimonials Section on Testimonials Page */

.testimonials-grid {
    display: flex; 
    flex-wrap: wrap; 
    justify-content: center; 
    /* color: var(--site-color-text); */
    align-items: stretch; 
    gap: 1.5em;
    --testimonial-clamp-lines: 4; /* default clamp lines (reduced to leave space for read-more) */
}

.testimonials-grid .testimonial-item {
    /* Square cards: use aspect-ratio so height == width, slightly larger basis */
    background: var(--testimonials-card-bg, var(--site-color-background-light));
    color: var(--testimonials-card-text-color, var(--site-color-text));
    padding: 20px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    text-align: left;
    flex: 0 1 300px;
    aspect-ratio: 1 / 1;
    width: 100%;
    max-width: 100%;
    border: 1px solid rgba(var(--site-color-border-rgb, 0,0,0), 0.06);
    box-shadow: var(--shadow-sm);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    box-sizing: border-box;
}

/* Ensure testimonial cards behave as column flex containers.
   Keep grid rules for the testimonials page separate from the carousel. */
.testimonials-grid .testimonial-item {
    display: flex;
    flex-direction: column;
}
.testimonials-carousel-mini .testimonial-card,
.testimonials-carousel-mini .testimonial-slide {
    display: flex;
    flex-direction: column;
}
.testimonials-carousel-mini .testimonial-card {
    /* ensure the content remains anchored at the top in the carousel */
    justify-content: flex-start;
}

.testimonials-carousel-mini .testimonial-card .testimonial-content,
.testimonials-carousel-mini .testimonial-card .testimonial-quote {
    /* do not let the content grow (keeps text at top when truncated) */
    /* background-color: var(--site-color-background-light);  */
    min-height: 0;
}
    /* border: 1px solid var(--site-color-border-light); */
.testimonials-carousel-mini .testimonial-author {
    /* push footer/author to the bottom of the slide */
    margin-top: auto;
    align-self: flex-end;
}

/* Also apply the same truncation/anchoring rules to the "prestations" carousel
    which wraps a carousel inside the .testimonials-for-prestation section. */
.testimonials-for-prestation .testimonials-carousel-mini .testimonial-card {
    color: var(--site-color-text);
}
.testimonials-for-prestation .testimonials-carousel-mini .testimonial-card .testimonial-content,
.testimonials-for-prestation .testimonials-carousel-mini .testimonial-card .testimonial-quote {
    flex: 0 0 auto;
    min-height: 0;
}
.testimonials-for-prestation .testimonials-carousel-mini .testimonial-author {
    margin-top: auto;
    align-self: flex-end;
}
    /* color: var(--site-color-text-dark-safe); */
.testimonials-carousel-mini .testimonial-card {
    /* explicit reaffirmation so all carousel instances behave the same */
    justify-content: flex-start;
}
.testimonials-carousel-mini .testimonial-card .testimonial-content,
.testimonials-carousel-mini .testimonial-card .testimonial-quote {
    flex: 0 0 auto;
    min-height: 0;
    /* Previously: overflow: hidden to clamp text for client-side truncation.
        Client-side truncation has been removed; show full testimonial text.
        Keep flex/min-height rules so layout/author anchoring remains stable. */
}

.testimonials-grid .testimonial-image img {
    border-radius: 50%;
    width: 80px;
    height: 80px;
    object-fit: cover;
    margin-bottom: 15px;
    align-self: center; /* Center image in the flex container */
}

.testimonial-quote {
    font-style: italic;
    color: var(--testimonials-card-text-color, var(--site-color-text));
    margin: 0;
    text-align: left;
}

.testimonial-content p {
    margin: 0 0 0.3em; /* reduced bottom margin for compact paragraphs inside testimonials */
}

/* Also target paragraphs inside the quote and modal bodies */
.testimonials-grid .testimonial-quote p,
.testimonial-modal .testimonial-modal-body p {
    margin: 0 0 0.3em;
}

/* When clamped, make paragraph tags inline so -webkit-line-clamp treats
   the content as a single block of text and doesn't create overlapping/stacked text. */
.testimonials-grid .testimonial-item.has-clamped .testimonial-quote p {
    display: inline;
}

/* When expanded, restore paragraph semantics */
.testimonials-grid .testimonial-item.is-expanded .testimonial-quote p {
    display: block;
    margin-bottom: 0.3em;
}

/* Author styling unified below */

.testimonials-grid .testimonial-category {
    font-size: 0.9em;
    color: var(--site-color-text);
    margin-top: auto; /* Pushes the category to the very bottom */
}

/* Styles for truncated testimonials: clamp long texts and show a visual cue + button */
.testimonial-item {
    position: relative; /* anchor for read-more link if needed */
}

.testimonial-content,
.testimonial-quote {
    position: relative;
}

/* Clamp the visible height of the quote to ~4 lines and add an overflow gradient */
.testimonials-grid .testimonial-item .testimonial-quote {
    /* Clamp to 6 lines (preferred) with a safe flex fallback so the author
       remains anchored at the bottom. Browsers that support -webkit-line-clamp
       will show exactly 6 lines and hide the rest; others will rely on
       overflow:hidden + flex-sizing. */
    flex: 1 1 auto;
    overflow: hidden;
    position: relative;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--testimonial-clamp-lines, 4); /* show N lines based on CSS variable */
    line-clamp: var(--testimonial-clamp-lines, 4);
    line-height: 1.55; /* ensure consistent line-height used for clamp calculation */
}

/* Gradient fade to indicate more content */
.testimonials-grid .testimonial-item.has-clamped .testimonial-quote::after {
    content: '';
    pointer-events: none;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3em; /* increased to provide a solid mask area */
    /* fade from transparent to fully-opaque card background to hide overflowing text */
    background: linear-gradient(transparent, var(--testimonials-card-bg, var(--site-color-background)) 60%, var(--testimonials-card-bg, var(--site-color-background)) 100%);
    z-index: 1; /* sit above the text so overflow is hidden; read-more will be above this */
}

/* When expanded, remove the clamp and the gradient */
.testimonials-grid .testimonial-item.is-expanded .testimonial-quote {
    /* Remove clamping when expanded (modal or inline expansion) */
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    max-height: none;
    overflow: visible;
}
.testimonials-grid .testimonial-item.is-expanded .testimonial-quote::after {
    display: none;
}

/* Read more button */
.testimonial-readmore {
    display: block; /* centerable block element */
    margin: 0.6rem auto 0; /* centered by auto margins */
    background: transparent;
    border: none;
    color: var(--accent-main, var(--accent-text));
    text-decoration: underline;
    cursor: pointer;
    font-weight: 500;
    z-index: 999; /* ensure it sits above the gradient */
    margin-top: -10px; /* pull it slightly into the (now opaque) gradient area */
}

.testimonial-readmore:hover {
    color: var(--site-color-text);
    background: transparent;
}

/* Place the read-more button over the gradient so it's always visible
   and reduce the gap between visible text and the button. */
.testimonial-item {
    position: relative;
}
/* Show the read-more button only when the item is actually clamped. */
.testimonial-item .testimonial-readmore { display: none; }
.testimonial-item.has-clamped .testimonial-readmore {
    display: block; /* shown as centered block below the visible text */
    margin: 0 auto;
    z-index: 999; /* above the gradient */
    padding: 6px 10px;
    text-decoration: none;
    margin-top: -20px; /* lift into the gradient area so it appears attached */
}

@media (max-width: 879px) {
    .testimonial-item.has-clamped .testimonial-readmore {
        margin-top: -15px;
    }
}

@media (max-width: 579px) {
    .testimonial-item.has-clamped .testimonial-readmore {
        margin-top: -10px;
    }
}



/* Hide read-more when expanded */
.testimonials-grid .testimonial-item.is-expanded .testimonial-readmore {
    display: none;
}

/* Make sure the quote has bottom padding to avoid overlap on small cards */
.testimonials-grid .testimonial-item.has-clamped .testimonial-quote {
    padding-bottom: 1em;
}

/* Modal / overlay styles */
.testimonial-modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--site-color-background);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.testimonial-modal-overlay.is-open {
    display: flex;
}
.testimonial-modal {
    background: var(--site-color-background);
    color: var(--site-color-text);
    max-width: 820px;
    width: calc(100% - 40px);
    max-height: calc(100vh - 80px);
    overflow: auto;
    padding: 28px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.testimonial-modal .close-modal {
    display: inline-block;
    margin-left: auto;
    background: transparent;
    border: none;
    color: var(--site-color-text);
    font-size: 1.1em;
    cursor: pointer;
}


/* Flex container fixes: ensure the content area can shrink/grow inside the card
   and that footer (author/category) is always pushed to the bottom. Some
   browsers adjust the display of clamped elements (display: -webkit-box)
   which can interfere with flex sizing — provide explicit flex + min-height
   so the layout remains stable and authors stay aligned. */
.testimonials-grid .testimonial-item {
    /* ensure grid items can handle overflow correctly */
    min-height: 0;
}
.testimonials-grid .testimonial-item .testimonial-content,
.testimonials-grid .testimonial-item .testimonial-quote {
    /* Grid-specific: let the content grow to push the footer to the bottom */
    flex: 1 1 auto;
    min-height: 0;
}
.testimonials-carousel-mini .testimonial-card,
.testimonials-carousel-mini .testimonial-slide {
    /* allow children with overflow to size correctly inside flex containers */
    min-height: 0;
}
.testimonials-carousel-mini .testimonial-card .testimonial-content,
.testimonials-carousel-mini .testimonial-card .testimonial-quote {
    /* Carousel-specific: content should not grow and must be able to shrink when clamped. */
    flex: 0 0 auto;
    min-height: 0;
}

.testimonial-category a {
    /* font-size: 0.9em; */
    color: var(--accent-main, var(--accent-text));
}

/* Truncation/read-more styles removed: testimonials now show full text (CF7 limits input length).
   Leftover JS/CSS for 'clamped', 'is-truncated', 'is-expanded' and '.read-more-link' have been removed.
*/

/* Utility: ensure box-sizing for testimonial internals */
.testimonial-item,
.testimonial-item * {
    box-sizing: border-box;
}

.leave-testimonial-section { 
    margin-top: 3em;
    padding-top: 2em;
    border-top: 1px solid var(--site-color-border-light);
    text-align: center;
}


/* Conteneur principal du carrousel pour centrage */
.testimonials-carousel-mini {
    position: relative;
    max-width: 1200px; /* Augmenté pour permettre d'afficher 4 slides sur desktop */
    margin: 20px auto;
    /* Styles spécifiques à la librairie Swiper/Slick si vous les avez déjà inclus */
}

/* Surcharger la règle de Swiper pour forcer 100% de la hauteur */
.testimonials-carousel-mini .swiper-slide {
    height: auto; /* Permet à la slide de s'étirer automatiquement */
    display: flex; /* Assure que le contenu interne peut s'étirer */
}

/* Modification pour que le wrapper Swiper s'étire à la hauteur de la slide la plus longue */
.testimonials-carousel-mini .swiper-wrapper {
    align-items: stretch; /* S'assure que les slides s'étirent verticalement */
    height: auto !important; 
    /* Si height: auto ne suffit pas (ce qui est souvent le cas), essayez min-height: 100% */
    min-height: 100%;
    display: flex;
    /* justify-content: center; */
}

/* Le conteneur de la pagination */
.testimonials-carousel-mini .swiper-pagination {
    position: relative; /* S'assurer qu'elle ne se superpose pas et prend de la place */
    margin-top: 20px; /* Ajouter un espace clair sous le carrousel pour éviter les conflits */
    text-align: center;
}

/* Styles pour la carte individuelle (la slide) */
.testimonial-slide {
    padding: 5px;
    height: 100%;
    box-sizing: border-box;
}


/* 2. Centrage CSS conditionnel (pour centrer les avis s'il n'y en a pas assez) */
/* Activé seulement à partir de 550px et uniquement sur la page de prestation */
@media (min-width: 550px) {
    .testimonials-for-prestation .swiper-wrapper {
        justify-content: center;
    }
}


/* 3. Définition des largeurs de slides basées sur les breakpoints Swiper (JS) */

/* --- Mobile : Largeur 100% pour slidesPerView = 1 (< 550px) --- */
@media (max-width: 549px) {
    .testimonials-carousel-mini .swiper-slide {
        width: 100% !important; 
        max-width: 100%;
    }

/* Desktop: increase gradient so it's visible and make sure text sits above it */
@media (min-width: 880px) {
    .testimonials-grid .testimonial-item.has-clamped .testimonial-quote::after {
        height: 4em; /* make gradient larger on desktop too */
    }
    .testimonials-grid .testimonial-item.has-clamped .testimonial-quote {
        z-index: 0; /* ensure gradient overlay hides overflowing text */
    }
    /* On desktop, keep the reduced clamp value (match global change) */
    .testimonials-grid { --testimonial-clamp-lines: 4; }
}
}

/* Compact cards when testimonials are shown in a single column (mobile) */
@media (max-width: 579px) {
    .testimonials-grid {
        gap: 12px;
    }
    .testimonials-grid .testimonial-item {
        flex: 1 1 100%;
        width: 100%;
        aspect-ratio: auto; /* remove square constraint on mobile */
        /* Allow height to be determined by content (clamped) so author stays close below text */
        min-height: 0;
        padding: 14px;
    }

    /* Make the quote area take available space but cap its height so author remains visible */
    .testimonials-grid .testimonial-item .testimonial-quote {
        /* keep clamp suggested but reduced so author stays visible */
        max-height: none;
        overflow: hidden;
        padding-bottom: 1.6em; /* space for the read-more button */
        display: -webkit-box;        
        -webkit-line-clamp: 4; /* ensure clamp still suggested */
        line-clamp: 4;
    }

    .testimonials-grid .testimonial-item .testimonial-author,
    .testimonials-grid .testimonial-item .testimonial-category {
        margin-top: auto; /* ensure author/category are anchored at bottom */
    }

    /* Slightly smaller read-more to fit mobile */
    .testimonial-readmore {
        font-size: 0.95em;
    }
}

/* Ensure slides use border-box sizing (no extra padding here; spacing is
   handled by Swiper's spaceBetween to keep calculations consistent). */
.testimonials-carousel-mini .swiper-slide {
    box-sizing: border-box;
}

/* Force GPU compositing and smoother repaint for slides/cards to avoid
   visual clipping/artifacts (especially when shadows/transforms are used). */
.testimonials-carousel-mini .swiper-slide,
.testimonials-carousel-mini .testimonial-card,
.testimonials-grid .testimonial-item {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: transform;
}


/* --- Tablette : Largeurs pour slidesPerView = 2 (550px à 767px) --- */
/* @media (min-width: 550px) and (max-width: 767px) { */
    /* .testimonials-carousel-mini .swiper-slide { */
        /* (100% / 2) - (spaceBetween / 2) -> 50% - 20px (pour spaceBetween: 40px) */
        /* width: calc(50% - 20px) !important;  */
    /* } */
/* } */


/* --- Tablette/Desktop : Largeurs pour slidesPerView = 3 (768px à 969px) --- */
/* @media (min-width: 768px) and (max-width: 969px) { */
    /* .testimonials-carousel-mini .swiper-slide { */
        /* (100% / 3) - (2 * spaceBetween / 3) -> 33.333% - 26.666px (pour spaceBetween: 40px) */
        /* width: calc(33.333% - 26.666px) !important;  */
    /* } */
/* } */


/* --- Desktop : Largeurs pour slidesPerView = 4 (970px et plus) --- */
/* @media (min-width: 970px) { */
    /* .testimonials-carousel-mini .swiper-slide { */
        /* (100% / 4) - (3 * spaceBetween / 4) -> 25% - 30px (pour spaceBetween: 40px) */
        /* width: calc(25% - 30px) !important;  */
    /* } */
/* } */


/* Conteneur de la carte */
.testimonial-card {
    background: var(--testimonials-card-bg, var(--site-color-background-light));
    color: var(--testimonials-card-text-color, var(--site-color-text));
    border-radius: 5px;
    box-shadow: var(--shadow-sm);
    padding: 15px;
    height: 100%; 
    max-width: none; 
    display: flex;
    flex-direction: column;
}

/* Ensure testimonial cards have the same subtle shadow and hover lift as press mentions */
.testimonials-grid .testimonial-item,
.testimonial-card {
    box-shadow: var(--shadow-sm);
    /* transition: transform 0.3s ease, box-shadow 0.3s ease; */
}

/* Style de l'icône de citation */
.quote-icon {
    font-size: 3em !important;
    color: var(--accent-main, var(--accent-text));
    line-height: 1 !important;
    margin-top: 0px !important;
    margin-bottom: 0px !important;
    display: inline-block; 
    margin-right: 0.25em;
    margin-left: 0;
}


.testimonials-grid .testimonial-author,
.testimonial-card .testimonial-author,
.testimonial-slide .testimonial-author {
    font-weight: bold;
    color: var(--site-color-text);
    text-align: right;
    margin: 0 0 5px 0; 
    margin-left: auto;
    margin-right: 0;
    align-self: flex-end;
}

/* Keep the category anchored to the bottom of the card; author sits just above it. */
.testimonials-grid .testimonial-category,
.testimonial-card .testimonial-category,
.testimonial-slide .testimonial-category {
    margin-top: auto;
}

/* Fallback: if there is no explicit category element, ensure the author
   block itself is pushed to the bottom. Keep the right alignment intact. */
.testimonials-grid .testimonial-author,
.testimonial-card .testimonial-author,
.testimonial-slide .testimonial-author {
    margin-top: auto; /* pushes author to bottom when category is absent */
    align-self: flex-end; /* keep author aligned to the right */
}

/* Hide Swiper navigation arrows */
.testimonials-carousel-mini .swiper-button-next,
.testimonials-carousel-mini .swiper-button-prev {
    display: none;
}

/* Change active pagination bullet color */
.testimonials-carousel-mini .swiper-pagination-bullet-active {
    background: var(--accent-main, var(--accent-text));
}

/* Make inactive bullets a very faint version of the active color so they're
   visible on white backgrounds but stay subtle. */

/* Inactive bullets: match the testimonial card background so they "blend" with cards */
.testimonials-carousel-mini .swiper-pagination-bullet {
    background: var(--testimonials-card-bg, var(--site-color-background-light));
    opacity: 1;
    box-shadow: none;
    /* Fallback for older browsers: use rgba built from the RGB token */
    border: 1px solid var(--accent-border-subtle);
}

/* If browser supports color-mix, prefer the color-mix result for a nicer tint */
@supports (color-mix(in srgb, black 0%, white 0%)) {
    .testimonials-carousel-mini .swiper-pagination-bullet {
        border-color: color-mix(in srgb, var(--accent-border-subtle), transparent);
    }
}

/* Active bullet should use the primary accent for clear emphasis */
.testimonials-carousel-mini .swiper-pagination-bullet-active {
    background: var(--accent-main) !important;
    border-color: var(--accent-main);
}

/* Cibler la dernière slide à l'intérieur du wrapper */
.testimonials-carousel-mini .swiper-wrapper .swiper-slide:last-child {
    margin-right: 0px !important; 
}

/* Styles for 1 or 2 testimonial items when filtered */
.testimonials-grid.has-1-or-2-items {
    display: flex; /* Override grid to center content */
    justify-content: center;
    gap: 25px; /* Reintroduce the gap for flex items */
}

.testimonials-grid.has-1-or-2-items .testimonial-item {
    flex: 0 1 280px; /* Align with regular testimonial items (basis 280px) */
    max-width: 100%; /* Ensure it doesn't overflow on smaller screens */
}

/* Load more link spacing and basic styling (text link) */
.testimonials-load-more {
    text-align: center;
    margin-top: 1rem; /* small gap above the control */
}
.testimonials-load-more-link, .testimonials-load-less-link {
    color: var(--accent-main);
    text-decoration: underline;
    cursor: pointer;
    font-weight: 600;
    display: inline-block;
    padding: 5px 5px;
}
.testimonials-load-more-link.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

.testimonials-load-more-link:hover, .testimonials-load-less-link:hover {
    color: var(--site-color-text);
    /* text-decoration: underline; */
    cursor: pointer;
    /* font-weight: 500; */
    /* display: inline-block; */
    /* padding: 6px 0; */
}
.testimonials-load-less-link[aria-hidden="true"] { display: none; }

/* --- Styles pour les témoignages des pages de famille de services --- */
.testimonials-for-prestation {
    padding: 30px 0;
    text-align: center;
}




/* --- Press Mentions Section (page-temoignages.php) --- */

.press-mentions-list .section-title {
    text-align: center;
    color: var(--accent-secondary);
    font-size: 2.2em;
    font-weight: 700;
    margin-bottom: 1.5em;
}

.press-mentions-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    align-items: stretch;
}

.press-mention-item {
    background-color: var(--site-color-background-light);
    padding: 25px;
    border-radius: var(--site-image-border-radius);
    border: 1px solid var(--site-color-border-light);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    text-align: left;
    flex: 0 1 350px;
    max-width: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.press-mention-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.press-mention-thumbnail {
    margin-bottom: 15px;
}

.press-mention-thumbnail img {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: var(--site-image-border-radius);
    object-fit: cover;
}

    

/* When the card is a lightbox trigger, show a zoom cursor */
.glightbox-press .press-mention-thumbnail img,
.press-mention-card-link.glightbox-press .press-mention-thumbnail img {
    cursor: zoom-in;
}

/* Ensure clickable card keeps text color and removes default link decoration */
.press-mention-card-link {
    text-decoration: none;
    color: inherit;
}

/* La carte */
.press-mention-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Le Badge du média */
.press-source-tag {
    display: inline-block;
    background-color: var(--accent-secondary-main);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 10px;
    border-radius: var(--site-image-border-radius);
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

/* Le titre de l'article (plus imposant) */
.press-mention-title {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 5px 0 10px 0;
    color: var(--site-color-text-dark-safe);
}

.press-mention-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.press-mention-title a:hover {
    color: var(--accent-main);
}

.press-mention-publication {
    font-size: 1em;
    color: var(--site-color-text);
    margin-bottom: 5px;
}

/* La date (plus discrète) */
.press-mention-date {
    font-size: 0.85rem;
    opacity: 0.7;
    border-top: 1px solid #eee;
    padding-top: 10px;
    margin-top: auto; /* Pousse la date en bas si les cartes ont des hauteurs différentes */
}

.press-mention-content p {
    font-size: 1em;
    color: var(--site-color-text-dark-safe);
    line-height: 1.6;
    text-align: left;
    flex-grow: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .press-mention-item {
        flex: 0 1 100%;
    }
}

.press-mentions-button {
    text-align: center;
    margin-top: 2em;
}

/* --- Archive Press Mentions Page (archive-sandco_press_mention.php) --- */

.page-press-mentions-archive .page-header {
    text-align: center;
    margin-bottom: 2.5em;
}

.page-press-mentions-archive .page-title {
    color: var(--accent-secondary-main);
    font-size: 2.2em;
    font-weight: 700;
}

.page-press-mentions-archive .archive-description {
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 1em;
    font-size: 1.1em;
    line-height: 1.7;
}

.press-mentions-list {
    margin-top: 3em;
}

/* The .press-mentions-grid and .press-mention-item styles above are reused here. */

/* Pagination styles */
.posts-navigation {
    margin-top: 3em;
    text-align: center;
}

.posts-navigation .nav-links {
    display: flex;
    justify-content: center;
    gap: 1em;
}

.posts-navigation .nav-links .nav-previous,
.posts-navigation .nav-links .nav-next {
    padding: 10px 20px;
    border: 1px solid var(--site-color-border-light);
    border-radius: var(--site-image-border-radius);
    text-decoration: none;
    color: var(--site-color-text-dark-safe);
    transition: all 0.3s ease;
}

.posts-navigation .nav-links .nav-previous:hover,
.posts-navigation .nav-links .nav-next:hover {
    background-color: var(--accent-main);
    color: var(--site-color-background);
    border-color: var(--accent-main);
}

/* Hide the server-rendered testimonials grid while the client-side script
   fetches an aligned first page (so we don't show a partially-filled last row).
   Use `visibility: hidden` to keep the layout height and avoid content jumps. */
.testimonials-grid.testimonials-loading {
    visibility: hidden;
}


/* --- Mobile tweaks: une carte par ligne à 350px, centrée (pas de scroll horizontal) --- */
@media (max-width: 549px) {
    /* Conteneur vertical standard — on laisse le flow normal pour avoir
       une carte par ligne. On centre le contenu et on réduit les paddings
       globaux pour augmenter l'espace disponible. */
    .testimonials-grid {
        display: block !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    /* Forcer chaque item à 350px de largeur, mais autoriser un max-width:100%
       pour les très petits écrans (si viewport < 350px, la carte devient full-width). */
    .testimonials-grid .testimonial-item,
    .testimonials-grid.has-1-or-2-items .testimonial-item,
    .testimonials-carousel-mini .swiper-slide,
    .testimonial-card,
    .testimonials-carousel-mini .testimonial-card {
        /* width: 350px !important; */
        max-width: 100% !important;
        /* margin-left: auto !important; */
        /* margin-right: auto !important; */
        padding: 12px !important;
        box-sizing: border-box !important;
        /* Rester en flex-col pour permettre d'ancrer l'auteur/catégorie en bas */
        display: flex !important;
        flex-direction: column !important;
        /* Restaure un espacement vertical entre les cartes en mobile */
        margin-bottom: 18px !important;
        min-height: 0 !important;
    }

    /* Pas de marge après le dernier élément (évite un grand vide en bas) */
    .testimonials-grid .testimonial-item:last-child,
    .testimonials-grid.has-1-or-2-items .testimonial-item:last-child {
        margin-bottom: 0 !important;
    }

    /* Avatar et icône légèrement réduits pour compacter la hauteur sans altérer
       la lisibilité sur 350px */
    .testimonials-grid .testimonial-image img,
    .testimonial-card .testimonial-image img {
        width: 64px !important;
        height: 64px !important;
        margin-bottom: 10px !important;
    }

    .quote-icon {
        font-size: 2.2em !important;
        margin-bottom: 6px !important;
    }

    .testimonial-quote,
    .testimonial-content p {
        font-size: 0.98em !important;
        line-height: 1.45 !important;
        margin-bottom: 8px !important;
    }

    .testimonials-grid .testimonial-category,
    .testimonials-grid .testimonial-author,
    .testimonial-card .testimonial-category,
    .testimonial-card .testimonial-author {
        font-size: 0.95em !important;
    }

    /* Ensure content area can grow and footer is pushed to bottom in mobile */
    .testimonials-grid .testimonial-item .testimonial-content,
    .testimonials-grid .testimonial-item .testimonial-quote,
    .testimonial-card .testimonial-content,
    .testimonial-card .testimonial-quote {
        flex: 1 1 auto !important;
        min-height: 0 !important;
    }

    .testimonials-grid .testimonial-category,
    .testimonials-grid .testimonial-author,
    .testimonial-card .testimonial-category,
    .testimonial-card .testimonial-author {
        margin-top: auto !important;
    }

    /* Carousel: s'assurer que Swiper peut gérer une largeur fixe par slide si utilisé */
    /* Leave mobile slide width set earlier to 350px so slidesPerView: 'auto' can
       compute correctly. Do not override to 100% here (it caused unexpected
       sizing when the carousel is used). */
}
