/* --- Components Styles --- */

/* Base styles for buttons (custom or Gutenberg) and form/inline comment buttons
   Centralized so all buttons use the same design tokens (see variables in :root).
*/
.button,
.wp-block-button__link,
.comment-reply-link,
.wp-block-comment-reply-link a,
.comments-link,
.reply a,
a.comments-link,
.comment-form .form-submit input[type="submit"],
.comment-form .form-submit button[type="submit"],
.wpcf7-form input[type="submit"].wpcf7-submit { /* Apply common styles to buttons and comment/form submits */
    display: inline-block;
    padding: 10px 20px;
    border-radius: var(--site-image-border-radius, 12px);
    font-family: var(--font-body, var(--font-primary));
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: transform 0.15s ease, background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
    /* transition: transform 0.15s ease, background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.18s ease; */
    cursor: pointer;
    /* Default: neutral button. Use `.button-primary` for the primary variant. */
    color: var(--site-color-text);
    background-color: transparent;
    border: 1px solid var(--site-color-text);
}

.button:hover,
.wp-block-button__link:hover {
    /* Neutral buttons: invert background/text on hover for clear affordance */
    background-color: var(--site-color-text);
    color: var(--site-color-background);
    border-color: var(--site-color-text);
    box-shadow: var(--shadow-sm);
}

/* Primary buttons: use semantic accent tokens generated by PHP */
.button-primary,
.wp-block-button.is-style-primary-button .wp-block-button__link,
input.button-primary,
button.button-primary,
.wpcf7-form input.button-primary,
.comment-form .form-submit input.button-primary {
    /* Use server-provided semantic tokens so display mode is driven by PHP */
    background-color: var(--site-button-accent);
    color: var(--site-button-on-accent);
    border: var(--site-button-border-width, 1.5px) solid var(--site-button-border-color, var(--site-button-accent));
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
.button-primary:hover,
.wp-block-button.is-style-primary-button .wp-block-button__link:hover,
input.button-primary:hover,
button.button-primary:hover,
.wpcf7-form input.button-primary:hover,
.comment-form .form-submit input.button-primary:hover {
    /* Hover: pressing primary accent visibly fills with accent color */
    background-color: var(--site-color-accent-primary-hover, var(--accent-main));
    color: var(--accent-contrast);
    border-color: var(--site-color-accent-primary-hover, var(--accent-main));
}

/* Secondary buttons: use secondary semantic tokens if defined */
.button-secondary,
.wp-block-button.is-style-secondary-button .wp-block-button__link {
    background-color: var(--accent-secondary-soft);
    color: var(--accent-secondary-text);
    border: 1.5px solid var(--accent-secondary-main);
}
.button-secondary:hover,
.wp-block-button.is-style-secondary-button .wp-block-button__link:hover {
    background-color: var(--accent-secondary-main);
    color: var(--accent-secondary-contrast);
    border-color: var(--accent-secondary-main);
}

.wp-block-search__button svg.search-icon,
button svg,
.button svg {
    fill: var(--accent-contrast, var(--site-color-text-dark-safe, #333)) !important;
}

/* Bouton style Google */
/* Bouton "Laisser un avis" style épuré */
.btn-google-action a {
    display: inline-flex !important;
    align-items: center;
    background: var(--site-color-background); 
    /* border: var(--site-color-text);      */
    /* color: var(--site-color-text);  */
    /* font-weight: 800 !important; */
    /* font-size: 18px !important; */
    /* text-transform: uppercase; */
    /* letter-spacing: 1px; */
    /* padding: 10px 20px; */
}

/* L'icône G de Google à droite */
.google-icon-svg {
    width: 26px;
    height: 26px;
    margin-right: 0;
    margin-left: 12px;
    display: inline-block;
    vertical-align: middle;
}

/* Lien "Consulter les avis" en bleu Google */
.link-google-blue a {
    color: #4285F4 !important;
    text-decoration: none !important;
    font-weight: bold;
    font-size: 14px;
}

.link-google-blue a:hover {
    text-decoration: underline !important;
}

/* Back to Top Button */
.back-to-top-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    background-color: var(--accent-main);
     /* Use the accessible on-primary color computed by the theme so the chevron
         automatically adapts (white or dark) depending on contrast). */
    color: var(--site-color-background, var(--accent-contrast));
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    text-align: center;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out, transform 0.2s ease-in-out, background-color 0.15s ease, box-shadow 0.18s ease-in-out;
    box-shadow: var(--shadow-sm);
}

.back-to-top-button svg {
    display: block;
    width: 60%;
    height: 60%;
    margin: 20% auto;
    /* SVG uses stroke="currentColor" so it will follow the computed color above */
}

.back-to-top-button.show {
    /* More visible when shown: fully opaque so the accent appears vivid */
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top-button:hover,
.back-to-top-button:active,
.back-to-top-button:focus {
    color: var(--accent-contrast);
    opacity: 1;
    box-shadow: var(--shadow-md);
}

/* Apply hover styles only if the device supports hover */
    @media (hover: hover) and (pointer: fine) {
    .back-to-top-button:hover {
        background-color: var(--accent-main);
        color: var(--accent-contrast);
    }
}

/* Responsive Map */
.map-responsive {
    overflow: hidden;
    padding-bottom: 56.25%;
    position: relative;
    height: 0;
    margin-top: 2em;
    margin-bottom: 2em;
}

.map-responsive iframe {
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    max-width: 100%; /* Ensure iframe does not exceed its container's width */
    position: absolute;
    border: 0;
}

/* Search Widget (WordPress Block) */
.widget_block.widget_search {
    margin-bottom: 1.5em;
}

.widget_block.widget_search .wp-block-search__label {
    display: block;
    font-size: 1em;
    color: var(--site-color-text);
    /* margin-top: 2.5em;  */
    margin-bottom: 0.8em;
    font-weight: bold;
    text-align: left;
}

.widget_block.widget_search .wp-block-search__inside-wrapper {
    width: 100% !important;
    border: 1px solid var(--accent-secondary-main);
    border-radius: 5px;
    background-color: var(--site-color-background-light);
    margin-top: 15px;
    padding: 0;
}

.widget_block.widget_search .wp-block-search__input {
    width: 100%;
    padding: 10px 12px;
    border: none;
    font-family: var(--font-body);
    font-size: 0.95em;
    color: var(--site-color-text);
    background-color: transparent;
    box-sizing: border-box;
    border-radius: 5px;
}

.widget_block.widget_search .wp-block-search__input:focus {
    outline: none;
}

/* Force l'affichage des iframes WordPress masquées par erreur */
.wp-block-embed iframe.wp-embedded-content {
    visibility: visible !important;
    position: relative !important; /* Sort du absolute qui peut l'écraser */
    display: block !important;
    width: 100% !important;
    height: 400px !important; /* On force une hauteur minimale */
}

/* On cache la citation de secours pour ne pas faire doublon */
.wp-block-embed blockquote.wp-embedded-content {
    display: none !important;
}

/* H3 Titles in Sidebar Widgets */
#sidebar .widget_block h3 {
    font-size: 1em;
    color: var(--site-color-text);
    margin-bottom: 0.8em;
    font-weight: bold;
}

/* Latest Comments block: remove extra left indentation so items line up
   with other widget content while preserving list markers (numbers). */
#sidebar .wp-block-latest-comments,
#sidebar .wp-block-latest-comments ol,
#sidebar .wp-block-latest-comments ul {
    padding-left: 0;
    margin-left: 0;
    list-style-position: inside; /* keep markers but flush to content */
}

#sidebar .wp-block-latest-comments li {
    margin-left: 0;
    padding-left: 0;
}

/* Categories List in Block Widget */
.widget_block .wp-block-categories-list.wp-block-categories {
    list-style-type: none;
    padding-left: 0;
}

/* --- Shared list styling for content, pages, posts and common block wrappers ---
   Ensure our custom bullet replacement applies across templates (pages, posts,
   and Gutenberg blocks). Some themes/blocks rely on native ::marker; to replace
   the marker reliably we remove native markers and inject our own via ::before. */
/* Target common content wrappers used by themes and blocks */
.entry-content ul,
.entry-content ul.wp-block-list,
.tab-pane ul,
.page-content ul,
.post-content ul,
.wp-block ul,
.entry-content .wp-block ul,
ul.wp-block-list,
ul[class*="wp-block-list"],
.wp-block-list ul,
.wp-block-list {
    margin-left: 2em;
    margin-bottom: 1.5em;
    line-height: 1.7;
    list-style: none; /* Remove default native bullets/markers for UL only */
    padding-left: 0;
    counter-reset: list-item;
}

/* Keep ordered lists numeric and with adequate padding so numbers are visible */
.entry-content ol,
.entry-content ol.wp-block-list,
.tab-pane ol,
.page-content ol,
.post-content ol,
.wp-block ol,
.entry-content .wp-block ol {
    margin-left: 2em;
    margin-bottom: 1.5em;
    line-height: 1.7;
    list-style: decimal;
    padding-left: 2.2em;
}

.entry-content li,
.tab-pane li,
.wp-block-list li,
ul.wp-block-list li,
ul[class*="wp-block-list"] li {
    margin-bottom: 0.8em;
    position: relative;
    padding-left: 1em; /* Space for the custom bullet */
}

/* Only apply the replacement pseudo-bullet to UL list items so OL keep numbers */
.entry-content ul li:not(.wp-social-link)::before,
.tab-pane ul li:not(.wp-social-link)::before,
.wp-block-list ul li:not(.wp-social-link)::before,
ul.wp-block-list li:not(.wp-social-link)::before,
ul[class*="wp-block-list"] li:not(.wp-social-link)::before {
    /* Support either a character bullet or an image logo supplied by the Customizer.
       The server emits --list-bullet-url when an image is set, otherwise --list-bullet-char
       contains a character (default •). We always reserve space via padding on the LI. */
    content: var(--list-bullet-char);
    color: var(--list-bullet-color);
    font-weight: bold;
    font-size: var(--list-bullet-size);
    display: inline-block;
    width: var(--list-bullet-size);
    height: var(--list-bullet-size);
    margin-left: var(--list-bullet-left-offset);
    position: absolute;
    left: 0;
    top: 0;
    /* If an image URL is present, use it as background and hide the character (server sets --list-bullet-char to '' in that case) */
    background-image: var(--list-bullet-url);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Hide native ::marker for targeted containers so our ::before replacement
   doesn't compete with browser markers (some pages used ::marker by default). */
.entry-content ul li::marker,
.tab-pane ul li::marker,
.page-content ul li::marker,
.post-content ul li::marker,
.wp-block ul li::marker,
.wp-block-list ul li::marker,
ul.wp-block-list li::marker,
ul[class*="wp-block-list"] li::marker {
    content: none; /* hide native marker only for UL */
}

.entry-content ol li::before,
.tab-pane ol li::before {
    /* Disable custom generated numbering to avoid double numbers.
       Let the native list marker render the numbers. */
    content: none;
    display: none;
}



/* --- Special Info Message --- */
.special-info-message {
    /* background-color: var(--site-color-text-dark-safe); */
    /* color: var(--site-color-text-light-safe);  */
    padding: 0.25em 0.25em;
    /* margin-bottom: 1em;  */
    /* border-radius: 5px; */
    text-align: center !important;
    font-size: 0.9em;
    /* line-height: 1.6; */
    width: 100%;
    box-sizing: border-box;
    margin-left: -20px;
    margin-right: -20px;
    width: calc(100% + 40px); 
}

/* Ensure text inside the container is centered and bold on desktop */
.special-info-message .container,
.special-info-message p {
    text-align: center !important;
}

/* Bold only when the modifier class is present */
.special-info-message.special-info-message--bold .container,
.special-info-message.special-info-message--bold p {
    font-weight: 700;
}

.special-info-message .container {
    /* Center the inner container to match site layout while allowing
       the parent banner to extend full-bleed. Use the theme content
       width token and keep a small horizontal padding to respect
       header gutter. */
    max-width: var(--content-width, 1200px);
    margin: 0 auto;
    padding: 0 20px;
}

.special-info-message p {
    margin: 0; /* Resets paragraph margins */
}

/* Styles for links inside the message */
.special-info-message a {
    color: var(--site-color-text);
    text-decoration: underline;
    font-weight: bold;
}

.special-info-message a:hover {
    text-decoration: none;
}

/* -----------------------------------------------------------------
   Footer separator (when footer has same background as page)
   Applied when PHP adds the class `has-footer-separator` to the footer
----------------------------------------------------------------- */
.site-footer.has-footer-separator {
    border-top: 1px solid var(--site-color-border-light, rgba(0,0,0,0.06));
}

.site-footer.has-footer-separator .site-info {
    /* Give a small visual separation so the line isn't flush against content */
    padding-top: 18px;
}

/* LIGHTBOX CSS */

/* Hide the lightbox by default */
.lightbox-overlay {
    visibility: hidden; 
    opacity: 0;
    
    /* Position the overlay to cover the entire viewport */
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    
    /* Semi-transparent background color */
    background: rgba(0, 0, 0, 0.85); 
    
    /* Ensure the overlay is above everything */
    z-index: 99999; 
    
    /* Transition for open/close effect */
    transition: opacity 0.3s, visibility 0.3s; 
    
    /* Center the content */
    display: flex;
    justify-content: center;
    align-items: center;
    
    /* Prevent scrolling of content behind */
    overflow-y: auto; 
}

/* Display the Lightbox when the anchor is targeted */
.lightbox-overlay:target {
    visibility: visible;
    opacity: 1;
}

/* Container for the image */
.lightbox-content {
    max-width: 90%; /* Limit the size so it doesn't take up the entire window */
    max-height: 90%;
    margin: auto;
    position: relative;
    background: #fff; /* Background of the image (if the image is not 100% of the box) */
    padding: 10px; /* Small spacing around the image */
}

/* The image itself */
.lightbox-content img {
    max-width: 100%;
    max-height: 80vh; /* Limit the height relative to the viewport */
    height: auto;
    display: block;
}

/* 5. Close button (the cross) */
.lightbox-close {
    /* Position the cross at the top right */
    position: absolute;
    top: 10px;
    right: 30px; 
    
    /* Visual styles for the cross */
    color: #fff;
    font-size: 40px;
    line-height: 1;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.2s, background-color 0.15s ease;
    z-index: 100000;

    /* Square dark background to improve contrast across images */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0; /* size controlled by width/height */
    background: rgba(0,0,0,0.55);
    border-radius: var(--site-image-border-radius, 8px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.35);
    -webkit-font-smoothing: antialiased;
}
.lightbox-close:hover {
    color: var(--site-color-text); /* Use the theme's action text color for accessible text */
    background: rgba(0,0,0,0.38);
}

/* Caption */
.lightbox-caption {
    text-align: center;
    color: #fff;
    margin-top: 10px;
}

/* Layout grid */
.services-grid-archive {    
    margin-top: 2em;
    display: flex;
    flex-wrap: wrap; 
    justify-content: center; 
    align-items: flex-start; 
    gap: 30px;     
}

/* Styles for flipping cards */
.flip-card {
    /* width: 100%;  */
    width: calc(33.333% - 30px);
    height: 500px; 
    perspective: 1000px; 
    cursor: default; /* don't show pointer for whole card; only back should be clickable */
    background: none !important;
    perspective-origin: center top; 
    /* overflow: hidden; */
    transform: translateZ(0); /* Force hardware acceleration to fix flickering */
}

@keyframes initial-flip-hint {
    /* 0% : The card is slightly turned, ready to flip */
    0% {
        /* Rotation Y for the flip, translation Z for the depth effect */
        transform: perspective(1000px) rotateY(3deg) translateZ(-50px); 
        opacity: 0.5; 
    }
    
    /* 100% : Return to the normal position */
    100% {
        transform: perspective(1000px) rotateY(0deg) translateZ(0); 
        opacity: 1; 
    }
}

/* Style for cards without images (Front Face) */
.flip-card.no-image .flip-card-front {
    background: linear-gradient(to top right, var(--accent-main, var(--accent-soft)), var(--accent-secondary-main));    
    color: var(--site-color-site-text, #fff);     
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    transform-origin: center center;
    /* Avoid initial translateZ which can cause subtle size differences between faces.
       Keep transform only for the flipping rotation so front/back maintain identical sizing. */
    transform: none;
    will-change: transform;
}

/* Trigger the flip on PC (Hover) */
.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}
/* Trigger the flip on mobile (with the class added by JS) */
.flip-card.is-flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    padding: 10px;
    box-sizing: border-box;
    /* display: flex; */
    /* flex-direction: column; */
    /* justify-content: center; */
    align-items: center;
    text-align: center;
    border-radius: var(--site-image-border-radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.flip-card-front {
    /* Style for the front face (image, title) */
    background-color: transparent;
    color: var(--site-color-text);
    justify-content: space-between;
    /* Avoid per-face scaling or translateZ which can produce mismatched sizes when rotated. */
    /* Ensure this face participates in the 3D scene so backface-visibility works reliably on mobile */
    -webkit-transform: rotateY(0deg);
    transform: rotateY(0deg);
}

.flip-card-back {
    /* Style for the back face (price, details) */
    /* Use a theme-provided variable so flip-card colors adapt to the site tokens.
       Fallback to the previous tokens if the variable is not present. */
    background-color: var(--flip-card-back, var(--site-color-background-light));
    color: var(--flip-card-back-text, var(--site-color-text-dark-safe));
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Ensure correct pointer & stacking behavior so back face receives clicks
   when the card is flipped, without changing visual design. */
.flip-card-front {
    z-index: 2;
}
.flip-card-back {
    z-index: 1;
    pointer-events: none; /* avoid catching clicks when not visible */
}
.flip-card.is-flipped .flip-card-back,
.flip-card:hover .flip-card-back {
    z-index: 3;
    pointer-events: auto; /* enable clicks when back is visible */
}
.flip-card.is-flipped .flip-card-front,
.flip-card:hover .flip-card-front {
    pointer-events: none; /* front should not block interactions when flipped */
}

/* Show pointer only for the back face and its actionable elements */
.flip-card-back,
.flip-card-back a,
.flip-card-back .button,
.flip-card-back .button-primary,
.flip-card-back .button-details {
    cursor: pointer;
}

/* ---- Flip-card back: content-specific rules (service details) ---- */
/* Support both the current markup (`service-details`) and older `service-details-list`. */
.flip-card-back .service-type-title {
    font-weight: bold;
    font-size: 1.2em;
    margin-bottom: 6px;
}

.flip-card-back .main-price {
    font-size: 1.8em;
    font-weight: bold;
    margin: 5px 0;
}

.flip-card-back .additional-info {
    font-size: 0.8em;
    margin: 10px 0 10px 0;
    font-style: italic;
    /* color: var(--site-color-text-light-safe); */
}

/* List styling: center by default, remove native bullets and shrink width for visual balance.
   We include !important on text-align/padding/margin to override inline styles present in templates. */
.flip-card-back .service-details-list,
.flip-card-back .service-details {
    list-style: none;
    padding: 0 !important;
    margin: 10px auto !important;
    width: 90%;
    text-align: center !important;
}

.flip-card-back .service-details li,
.flip-card-back .service-details-list li {
    padding: 12px 0;
    margin: 0;
    border-bottom: 1px solid var(--accent-secondary-soft); /* Separation line: Bottom border, very faint color */
    font-size: 0.95em;
    line-height: 1.4;
}

/* Remove separator on the last item for a clean look */
.flip-card-back .service-details li:last-child,
.flip-card-back .service-details-list li:last-child {
    border-bottom: none;
}


/* Styles for the image if present */
.flip-card-front img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;   
    object-fit: cover;
    /* Ensure the image follows the parent's border-radius */
    border-radius: inherit;
    /* Prevent the image from showing briefly during 3D flips on mobile/webkit */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Also ensure the front content overlay doesn't create its own visible backface */
.flip-card-front .card-content {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.flip-card-front .card-content, .flip-card-front .card-content h3, .flip-card-front .card-content h2 {
    position: absolute;
    bottom: 0; /* Alignment at the bottom of the card */
    left: 0;
    width: 100%;
    /* Increase overlay height and padding so multi-line titles remain readable */
    min-height: 35%;
    box-sizing: border-box;

    /* Creating a larger mask/gradient for readability: keep a stronger opaque base
       and extend the semi-opaque area to cover more vertical space. */
    background: linear-gradient(
        to top,
        rgba(255,255,255,1) 0%,    /* fully opaque at the very bottom */
        rgba(255,255,255,0.97) 20%,
        rgba(255,255,255,0.88) 40%,
        rgba(255,255,255,0.6) 60%,
        rgba(255,255,255,0.3) 80%,
        rgba(0,0,0,0) 100%
    );
    padding: 24px; 
    text-align: center;
    color: var(--site-color-text-dark-safe) !important; /* Ensure text is readable over the overlay */
}

.flip-card-front .card-content h3,
.flip-card-front .card-content h2 { /* Include h2 in case of changing the tag */
    margin-top: 0;
    margin-bottom: 0; 
    font-weight: 600;
    text-transform: uppercase;
}


.flip-card-back .button-details {
    display: inline-block;
    /* padding: 10px 18px; */
    /* border-radius: 5px; */
    font-weight: bold;
    color: var(--accent-main, var(--accent-text));
    background: transparent; /* Neutralize the default white background of the browser */
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* .flip-card-back .button-details:hover {
    color: white;
} */

@media (max-width: 1024px) {
    .flip-card {
        /* Calculate the width for 2 cards: (100% - 1x the gap) / 2 */
        width: calc(50% - 10px); 
    }
}

@media (max-width: 767px) {
    .flip-card {
        /* Maximum width of 90% to leave a margin on the edges */
        width: 90%; 
        max-width: 350px; /* Limits the size on large mobiles */
        height: 450px; /* Slightly reduces the height on mobile */
    }
}

/* --- Styles for the logos carousel --- */

.logos-section  {
    margin-top: 2em;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
    padding: 20px 0;
    box-sizing: border-box;
}
/* Ensure the wrapper is a horizontal flex container */
.logos-carousel .swiper-wrapper {
    display: flex !important; 
    align-items: center;
    transition-timing-function: linear;
}

/* Ensure the slides do not have a width of 100% on mobile */
.logos-carousel .swiper-slide {
    position: relative; 
}

/* Limit the size of the images (so they are not too wide) */
.logos-carousel .logo-item img {
    max-height: 80px; 
    max-width: 150px; /* Limit the maximum width of the image (adjust this value) */
    width: auto;
    object-fit: contain;
}

/* Define the width of the Swiper-slide container */
.logos-carousel .swiper-slide.logo-item {
    /* Slide width = (Max logo width) + (internal margin) */
    width: 250px;
    display: flex; 
    justify-content: center;
    align-items: center;
    flex-shrink: 0; 
    overflow: hidden;
    /* padding: 0 15px; */
}

/* Responsive for mobile */
@media (max-width: 600px) {
    .logos-carousel .swiper-slide.logo-item {
        max-width: 150px; 
    }
}

/* --- Auto-correction légère pour polices fines sur les boutons --- */
/*
   Objectif : épaissir visuellement les polices très fines (ex: Poiret One,
   autres choix clients) sans dénaturer les polices robustes.

   Stratégie : appliquer une très légère combinaison `-webkit-text-stroke`
   + `text-shadow` (fallback) sur les boutons. Les valeurs sont faibles
   pour être utiles aux polices fines tout en restant discrètes pour les
   polices normales/gras.

   Opt-out : pour exclure un élément ou un conteneur, ajoutez la classe
   `.no-force-bold` sur l'élément ou un ancêtre.
*/

@supports (-webkit-text-stroke: 0.2px) {
    /* Utility class applied to elements or containers */
    .button.force-bold,
    .wp-block-button__link.force-bold,
    a.force-bold,
    input.button.force-bold,
    button.button.force-bold,
    .flip-card-back .button-details.force-bold,
    .force-bold .button,
    .force-bold .wp-block-button__link,
    .force-bold a,
    .force-bold input.button,
    .force-bold button,
    .force-bold .flip-card-back .button-details {
        font-weight: 700;
        font-synthesis: weight;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;

        /* Slight stroke for Chromium/Safari */
        -webkit-text-stroke: 0.16px currentColor;
    }

    /* Soft variant */
    .button.force-bold--soft,
    .wp-block-button__link.force-bold--soft,
    a.force-bold--soft,
    input.button.force-bold--soft,
    button.button.force-bold--soft,
    .flip-card-back .button-details.force-bold--soft,
    .force-bold--soft .button,
    .force-bold--soft .wp-block-button__link,
    .force-bold--soft a,
    .force-bold--soft input.button,
    .force-bold--soft button,
    .force-bold--soft .flip-card-back .button-details {
        -webkit-text-stroke: 0.10px currentColor;
    }

    /* Opt-out */
    .no-force-bold .force-bold,
    .no-force-bold .force-bold--soft {
        -webkit-text-stroke: 0;
    }
}

@supports not (-webkit-text-stroke: 0.2px) {
    .button.force-bold,
    .wp-block-button__link.force-bold,
    a.force-bold,
    input.button.force-bold,
    button.button.force-bold,
    .flip-card-back .button-details.force-bold,
    .force-bold .button,
    .force-bold .wp-block-button__link,
    .force-bold a,
    .force-bold input.button,
    .force-bold button,
    .force-bold .flip-card-back .button-details {
        font-weight: 700;
        font-synthesis: weight;
    }
}

/* --- Testimonials: alternative designs --- */

/* Image-cover design: image fills card, overlay shows quote/author on hover */
.testimonials-design-image-cover .testimonial-card.image-cover,
.testimonials-design-overlay .testimonial-card.image-cover {
    position: relative;
    padding: 0;
    border-radius: var(--site-image-border-radius);
    overflow: hidden;
    background: transparent;
}
.testimonials-design-image-cover .testimonial-card.image-cover .testimonial-image,
.testimonials-design-overlay .testimonial-card.image-cover .testimonial-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.testimonials-design-image-cover .testimonial-card.image-cover .testimonial-overlay,
.testimonials-design-overlay .testimonial-card.image-cover .testimonial-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.25rem;
    /* Light overlay for better on-brand light appearance; less transparent for readability */
    background: rgba(255,255,255,0.92);
    color: var(--site-color-text-dark-safe, #222);
    transform: translateY(6%);
    opacity: 0;
    transition: opacity 260ms ease, transform 260ms ease;
    text-align: center;
    pointer-events: none;
}
.testimonials-design-image-cover .testimonial-card.image-cover:hover .testimonial-overlay,
.testimonials-design-image-cover .testimonial-card.image-cover:focus-within .testimonial-overlay,
.testimonials-design-overlay .testimonial-card.image-cover:hover .testimonial-overlay,
.testimonials-design-overlay .testimonial-card.image-cover:focus-within .testimonial-overlay {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Force square aspect-ratio for overlay cards so images fully cover a square */
.testimonials-design-overlay .testimonial-card.image-cover {
    aspect-ratio: 1 / 1;
    width: 100%;
}

.testimonials-design-overlay .testimonial-slide {
    display: flex;
    justify-content: center;
}

/* Ensure the media wrapper fills the card and the img covers it fully */
.testimonial-card.image-cover .testimonial-image-cover-media {
    width: 100%;
    height: 100%;
    display: block;
}

.testimonial-card.image-cover .testimonial-image,
.testimonial-card.image-cover img,
.testimonials-design-image-cover .testimonial-image,
.testimonials-design-overlay .testimonial-image,
.testimonials-design-flip .testimonial-image {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
    display: block !important;
    padding: 0 !important;
}

/* Flip-card design inside testimonials: reuse flip-card styles but constrain size */
.testimonials-design-flip .flip-card {
    width: 100%;
    aspect-ratio: 1 / 1; /* Force square cards */
    margin: 0 auto;
    height: auto; /* let aspect-ratio control height */
    display: block;
}
.testimonials-design-flip .flip-card-front .testimonial-image,
.testimonials-design-flip .flip-card-front img,
.testimonials-design-flip .flip-card .flip-card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* ensure image fully covers the square */
    display: block;
}

/* Center flip slides inside Swiper */
.testimonials-design-flip .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
}
.testimonials-design-flip .flip-card-front .card-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(0,0,0,0.05), rgba(0,0,0,0.08));
}
    
.testimonials-design-flip .flip-card-front {
    box-shadow: var(--shadow-sm);
}

/* Flip-card back appearance when used for testimonials: light, opaque background */
.testimonials-design-flip .flip-card-back {
    background: rgba(255,255,255,0.98) !important; /* nearly opaque light background */
    color: var(--site-color-text-dark-safe, #222) !important;
    padding: 1.25rem !important;
    box-sizing: border-box;
    border-radius: var(--site-image-border-radius) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    box-shadow: var(--shadow-sm);
}

/* Ensure the back face content respects the card's square sizing */
.testimonials-design-flip .flip-card-back .testimonial-quote,
.testimonials-design-flip .flip-card-back .testimonial-author {
    margin: 0.25rem 0;
}

/* Ensure carousel responsiveness: allow flip-card slides to shrink on small screens */
/* @media (max-width: 640px) {
    .testimonials-design-flip .flip-card {
        width: calc(80vw - 32px);
        height: calc(80vw * 1.1);
    }
} */

/* ===== Custom: élargir le container uniquement pour les nouveaux designs de testimonials ===== */
/* Cible le .container parent direct des designs flip et overlay dans #trust-testimonials */
#trust-testimonials .container:has(> .testimonials-design-flip),
#trust-testimonials .container:has(> .testimonials-design-overlay) {
    max-width: 1400px !important;
    width: 100%;
    box-sizing: border-box;
}

/* Contraindre le titre et le bouton à l'intérieur du container élargi */
#trust-testimonials .container:has(> .testimonials-design-flip) > h2,
#trust-testimonials .container:has(> .testimonials-design-overlay) > h2,
#trust-testimonials .container:has(> .testimonials-design-flip) > .button-primary,
#trust-testimonials .container:has(> .testimonials-design-overlay) > .button-primary {
    max-width: 1000px;
    width: fit-content;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Remove card width caps so Swiper can compute slide width freely */
.testimonials-design-flip .flip-card,
.testimonials-design-overlay .testimonial-card.image-cover {
    max-width: none !important;
}

/* Ensure Swiper elements occupy 100% width in these testimonial designs */
.testimonials-design-flip .swiper,
.testimonials-design-flip .swiper-wrapper,
.testimonials-design-overlay .swiper,
.testimonials-design-overlay .swiper-wrapper {
    width: 100% !important;
}

/* --- Ajustement tablette et petit laptop --- */
@media (min-width: 550px) and (max-width: 1100px) {
    
    /* Réduction de la taille de la citation */
    .testimonials-design-overlay .testimonial-quote,
    .testimonials-design-flip .flip-card-back .testimonial-quote {
        font-size: 0.85rem !important; /* Un peu plus petit que la taille desktop */
        line-height: 1.3 !important;
        margin: 0.5em 0 !important;
    }

    /* Ajustement de l'icône de citation si elle est trop imposante */
    .testimonials-design-overlay .quote-icon,
    .testimonials-design-flip .flip-card-back .quote-icon {
        font-size: 2rem !important;
        /* margin-bottom: 5px !important; */
    }

    /* Réduction de la taille de l'auteur */
    .testimonials-design-overlay .testimonial-author,
    .testimonials-design-flip .flip-card-back .testimonial-author {
        font-size: 0.75rem !important;
        opacity: 0.9;
    }

    /* On réduit un peu le padding interne pour laisser respirer le texte */
    .testimonials-design-overlay .testimonial-card.image-cover .testimonial-overlay,
    .testimonials-design-flip .flip-card-back {
        padding: 1rem !important;
    }
}

/* --- Reset des interférences mobile --- */
@media (min-width: 401px) and (max-width: 549px) {
    /* On retire le padding forcé sur les cartes qui doivent être "Full Image" */
    .testimonials-design-overlay .testimonial-card.image-cover, .testimonial-overlay,
    .testimonials-design-flip .flip-card-back {
        padding: 3.5rem !important;
        gap: 12px; /* Ajoute un petit espace constant entre quote et auteur */
    }

    .testimonials-design-overlay .quote-icon,
    .testimonials-design-flip .flip-card-back .quote-icon {
        font-size: 3.5rem !important;
        margin-bottom: 0 !important;
    }

    /* On force la citation à ne pas s'étaler sur toute la largeur 
       pour qu'elle reste centrée en "bloc" au milieu du carré */
    .testimonials-design-overlay .testimonial-overlay .testimonial-quote {
        flex: 0 0 auto !important;
        width: 100%;
        max-width: 260px; 
        margin: 0 auto !important;
        /* text-align: center !important; */
        /* line-height: 1.4; */
        /* font-size: 0.90rem !important;  */
    }
    .testimonials-design-flip .flip-card-back .testimonial-quote,
    .testimonials-design-overlay .testimonial-overlay .testimonial-quote {
        font-size: 0.9rem !important; 
    }

    .testimonials-design-overlay .testimonial-overlay .testimonial-author {
        flex: 0 0 auto !important;
        margin-top: 0 !important; /* LA CLÉ : annule le margin-top: auto qui le poussait en bas */
        text-align: center !important;
    }
}

@media (max-width: 400px) {
    /* On retire le padding forcé sur les cartes qui doivent être "Full Image" */
    .testimonials-design-overlay .testimonial-card.image-cover, .testimonial-overlay,
    .testimonials-design-flip .flip-card-back {
        padding: 1rem !important;
        gap: 6px; /* Ajoute un petit espace constant entre quote et auteur */
    }

    .testimonials-design-overlay .quote-icon,
    .testimonials-design-flip .flip-card-back .quote-icon {
        font-size: 2.5rem !important;
        margin-bottom: 0 !important;
    }

    /* On force la citation à ne pas s'étaler sur toute la largeur 
       pour qu'elle reste centrée en "bloc" au milieu du carré */
    .testimonials-design-overlay .testimonial-overlay .testimonial-quote,
    .testimonials-design-flip .flip-card-back .testimonial-quote {
        font-size: 0.85rem !important; 
    }

    .testimonials-design-overlay .testimonial-author,
    .testimonials-design-flip .flip-card-back .testimonial-author {
        font-size: 0.70rem !important;
    }
}
/* End custom testimonials container adjustments */
