:root{
    --nav-h: 100px;
    --radius: 18px;
    --shadow: 0 10px 30px rgba(0,0,0,.12);
    --text: #111;
    --muted: rgba(17,17,17,.72);
    --bg: #fff;
    --bg-soft: #f6f7f9;
}

.site-body{
    color: var(--text);
    background: var(--bg);
}

.skip-link{
    position:absolute;
    left:-999px;
    top:auto;
    width:1px;height:1px;
    overflow:hidden;
}
.skip-link:focus{
    left: 12px; top: 12px;
    width:auto;height:auto;
    padding:10px 12px;
    background:#000;color:#fff;
    z-index:9999;
    border-radius:12px;
}

/* Navbar */
.site-navbar{
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,1);
    border-bottom: 1px solid rgba(0,0,0,.10);

    /* Hauteur verrouillée + alignement propre */
    height: var(--nav-h);
    padding-top: 0;
    padding-bottom: 0;
}

/* Texte/links navbar sur fond blanc */
.site-navbar .navbar-brand,
.site-navbar .nav-link,
.site-navbar .dropdown-toggle{
    color: rgba(17,17,17,.78) !important;
}
.site-navbar .nav-link:hover,
.site-navbar .dropdown-toggle:hover{
    color: rgba(17,17,17,1) !important;
}
.site-navbar .nav-link.active{
    color: rgba(17,17,17,1) !important;
    font-weight: 700;
}

/* Toggler en mode clair */
.site-navbar .navbar-toggler{
    border-color: rgba(0,0,0,.18);
}
.site-navbar .navbar-toggler:focus{
    box-shadow: 0 0 0 .15rem rgba(0,0,0,.12);
}

/* Centre correctement le texte dans les boutons (utile si la hauteur est contrainte) */
.site-body .btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
}

/* CTA (bouton dans la navbar) */
.site-nav-cta{
    border-radius: 999px;
    background: #111 !important;
    color: #fff !important;
    border: 1px solid rgba(0,0,0,.12);

    /* Centre parfaitement le texte */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: .5rem 1rem;
    min-height: 50px;
    white-space: nowrap;
    font-size: 1.25rem;

    transition: box-shadow .22s ease, color .22s ease, filter .22s ease;
}
.site-nav-cta:hover{
    background: #111 !important;
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(0,0,0,.28);
    filter: brightness(1.3);
}
.site-nav-cta:active{
    background: #111 !important;
    color: #ffffff !important;
    box-shadow: 0 3px 9px rgba(0,0,0,.22);
    filter: brightness(1.4);
}
.site-nav-cta:focus{
    outline: none;
    box-shadow: 0 0 0 .15rem rgba(0,0,0,.18);
}

/* Empêche la navbar fixed de dépasser la largeur du viewport */
html, body{
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: scroll;
}
.site-navbar{
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
}

/* Aligne le contenu de la navbar sur la hauteur */
.site-navbar .container{
    height: 100%;
}
.site-navbar .container-fluid{
    height: 100%;
}
.site-navbar .navbar-brand{
    height: 100%;
    padding-top: 0;
    padding-bottom: 0;
    display:flex;
    align-items:center;
}

/* Logo plus grand dans la barre */
.brand-logo{
    filter: drop-shadow(0 6px 10px rgba(0,0,0,.10));
    height: 62px;
    width: auto;
    display:block;
}

.navbar-spacer{ height: var(--nav-h); }

@media (max-width: 991.98px){
    :root{ --nav-h: 84px; }
    .brand-logo{ height: 50px; }
    .navbar-collapse {
        background: var(--bg);
        max-height: calc(100vh - var(--nav-h));
        overflow-y: auto;
    }
    .navbar-collapse.show {
        transition: none !important;
    }
    .navbar-collapse .nav-link {
        padding-left: 1.5rem;
    }
    .navbar-collapse .mt-3 {
        margin-top: 0.5rem !important;
    }
    .navbar-collapse .nav-center {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
    .navbar-collapse .ms-lg-auto {
        padding-left: 1.1rem;
        margin-top: 0.5rem !important;
        padding-bottom: 1rem !important;
        align-self: flex-start;
    }
}

/* Desktop : menus centrés dans la barre, logo à gauche, CTA à droite */
@media (min-width: 992px){
    .site-navbar .nav-center{
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        align-items: center;
        gap: 22px;
        white-space: nowrap;
    }
    .hero-bottom-block{
        padding-bottom: 80px; /* valeur ajustée pour rapprocher du bas */
    }
}

/* Dropdown animation (survol + ouverture/fermeture progressive) */
.site-dropdown{
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,.10);
    box-shadow: var(--shadow);
    background: #fff;
    transform-origin: top right;

    /* Un peu plus grand */
    min-width: 18rem;
    padding: .50rem .50rem;

    /* On garde display:block pour animer, mais on masque via visibility/opacity */
    display: block;
    visibility: hidden;
    pointer-events: none;

    opacity: 0;

    transition:
            opacity .22s cubic-bezier(.2,.9,.2,1),
            visibility 0s linear .22s;
}

/* OUVERT : Bootstrap met .show sur le menu (et souvent aussi sur le parent) */
.site-dropdown.show,
.dropdown.show > .site-dropdown{
    visibility: visible;
    pointer-events: auto;

    opacity: 1;

    transition:
            opacity 0.38s cubic-bezier(.2,.9,.2,1),
            visibility 0s;
}

/* Fermeture “douce” sans bouger : on garde .show (position Popper), mais on fade-out */
.site-dropdown.dd-fade-out{
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s cubic-bezier(.2,.9,.2,1);
}

/* Enlève le “rectangle bleu” (focus ring) déclenché par Bootstrap sur show() */
.site-navbar .dropdown-toggle:focus,
.site-navbar .dropdown-toggle:focus-visible{
    outline: 0 !important;
    box-shadow: none !important;
}

/* Option : respect "reduced motion" */
@media (prefers-reduced-motion: reduce){
    .site-dropdown,
    .site-dropdown.show,
    .dropdown.show > .site-dropdown,
    .site-dropdown.dd-fade-out{
        transition: none !important;
    }
}

/* Hero */
.hero{
    position: relative;
    min-height: calc(100svh - var(--nav-h));
    display:flex;
    align-items: stretch;
    overflow: hidden; /* IMPORTANT : empêche le background scalé de déborder */
}
.hero-bg{
    position:absolute; inset:0;
    background-size: cover;
    background-position: center;
    transform: scale(1.02);
}
.hero-overlay{
    position:absolute; inset:0;
    background: linear-gradient(90deg, rgba(0,0,0,.66), rgba(0,0,0,.22));
}
.hero-content{
    position: relative;
    /* ~1,5 cm sous la barre (≈56 px) */
    padding: 24px 12px 36px 12px;
    color:#fff;
    display:flex;
    flex:1;
    align-items:flex-start;
}
.hero-bg{ z-index: 0; }
.hero-overlay{ z-index: 1; }
.hero-content{ position: relative; z-index: 2; }

/* Hero : ajustements de position (plus à gauche + plus haut) */
@media (min-width: 992px){
    /* Décale le bloc de contenu vers la gauche d'environ la moitié de la marge gauche */
    .hero-content > :first-child{
        transform: translateX(calc(-1 * (100vw - 100%) / 4));
    }

    /* Remonte légèrement l'ensemble (kicker/titre + accroche + boutons) */
    .hero-content{
        padding-top: 6px;
        padding-bottom: 74px;
    }
}

@media (max-width: 991.98px){
    /* Sur tablette/mobile : remonte aussi un peu */
    .hero-content{
        padding-bottom: 56px;
    }
}

/* Remonte légèrement les boutons (le conteneur a souvent un mt-3) */
.hero .hero-content .mt-3{
    margin-top: calc(.65rem + 76px) !important;
}
.hero-title{
    font-weight: 700;
    font-size: clamp(2.4rem, 5.4vw, 4.2rem);
    line-height: 1.05;
    margin-bottom: 12px;
    font-family: "Dancing Script", "Brush Script MT", "Segoe Script", "Apple Chancery", cursive;
}

/* Hero : titre plus “condensé” (amincit visuellement les lettres) */
.hero-title .hero-title-text{
    margin-top: 10px;
    display: inline-block;          /* nécessaire pour transform */
    transform-origin: left center;
    transform: scaleX(.94);         /* ↓ plus fort que .94 (ajuste si besoin) */
}
/* Sous-titre "adultes et enfants" plus petit */
.hero-title .hero-sub{
    display: block;
    font-size: .65em;
    line-height: 1.15;
    letter-spacing: 0;
}

.hero-bullets-text:first-line{
    opacity:.9;
    letter-spacing:.3px;
    font-size: 1.92rem;
}

/* Hero lead - taille réduite */
.hero-lead{
    margin: 170px 0 0 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    max-width: 52rem;

    /* Taille réduite */
    font-size: clamp(0.85rem, 1.1vw, 1.0rem);
    line-height: 1.4;

    font-weight: 600;
    color: rgba(255,255,255,.84);
    text-shadow: 0 6px 18px rgba(0,0,0,.28);
    letter-spacing: 0;
    text-align: justify;
}

/* Applique la police Dancing Script à la phrase spécifique en strong dans hero-lead */
.hero-lead strong{
    display: block;
    font-family: "Dancing Script", "Brush Script MT", "Segoe Script", "Apple Chancery", cursive;
    font-size: 1.7em;
    line-height: 1.15;
    letter-spacing: 0;
}

/* "Mal dormir n’est pas une fatalité." légèrement plus petit */
.hero-lead::first-line{
    font-size: clamp(1.4rem, 2vw, 1.7rem);
}

.hero-scroll-hint{
    position:absolute;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    color: rgba(255,255,255,.55);
    font-size: 1.05rem;
    animation: floaty 2.6s ease-in-out infinite;
    pointer-events:none;
}
@keyframes floaty{
    0%,100%{ transform: translateX(-50%) translateY(0); }
    50%{ transform: translateX(-50%) translateY(-7px); }
}

/* Hero: variante mobile (remplace l'image inline desktop) */
@media (max-width: 767.98px){
    .hero-bg{
        background-image: url('../img/hero-sommeil-mobile.jpg') !important;
    }
}

/* Bloc du bas : texte + boutons */
.hero-bottom-block {
    display: flex;
    flex-direction: column;
    gap: 1rem; /* espace entre le paragraphe et les boutons */

    margin-top: auto;
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); /* ~30px sous le panneau */

    /* ↓ Décalage spécifique : descend le bloc hero-bottom-block de 30px supplémentaires sans toucher le reste */
    transform: translateY(100px);
}

/* Option : un peu plus bas sur desktop */
@media (min-width: 992px) {
    .hero-bottom-block {
        padding-bottom: calc(50px + env(safe-area-inset-bottom, 0px));
    }
}

/* Mobile : garde le bloc bas, mais évite qu’il colle trop au bord */
@media (max-width: 575.98px){
    .hero-bottom-block{
        padding-bottom: calc(clamp(18px, 3vh, 28px) + env(safe-area-inset-bottom, 0px));
        gap: .9rem; /* espace paragraphe ↔ boutons */
    }
}

/* Page content */
.page{
    padding: 34px 0 10px 0;
    background: #ebe7df; /* Ton beige plus neutre et moins jaune (réduction des teintes jaunes pour un beige plus doux et grisâtre, inspiré des palettes sommeil calmes) */
}
.page h2{
    font-weight: 700;
    font-size: clamp(2.4rem, 5.4vw, 4.2rem);
    line-height: 1.05;
    margin-bottom: 1.2rem;
    font-family: "Dancing Script", "Brush Script MT", "Segoe Script", "Apple Chancery", cursive;
}
/* Réduction globale interligne + espacement */
.page p, .page li{
    color: var(--muted);
    line-height: 1.45;
    margin-bottom: 0.6rem;
}

.section-card{
    background: var(--bg);
    border: 1px solid rgba(0,0,0,.08);
    border-radius: var(--radius);
    box-shadow: 0 10px 26px rgba(0,0,0,.06);
    padding: 16px;
}

/* Titres dans les cartes */
.section-card h3 {
    margin-bottom: 0.6rem !important;
    line-height: 1.2;
}

.section-nav{
    display:flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 16px 0;
}
.section-nav .btn{
    border-radius: 999px;
}
.mt-8 {
    margin-top: 5rem !important;
}

.gallery{
    display:grid;
    gap: 12px;
    grid-template-columns: repeat(12, 1fr);
}
.gallery .g{
    grid-column: span 6;
    border-radius: var(--radius);
    overflow:hidden;
    border: 1px solid rgba(0,0,0,.08);
    background: var(--bg-soft);
}
.gallery img{
    width:100%;
    height: 280px;
    object-fit: contain;
    display:block;
    cursor: pointer;
    margin-top: 1rem;
}
@media (max-width: 767.98px){
    .gallery .g{ grid-column: span 12; }
    .gallery img{ height: 240px; }
    #plan .ratio{
        height: 240px;
    }
}

/* Team */
.team-grid{
    display:grid;
    gap: 14px;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: 1fr;
}
.team-card{
    height: 100%;
    grid-column: span 6;
    border-radius: var(--radius);
    border: 1px solid rgba(0,0,0,.08);
    background: #fff;
    box-shadow: 0 10px 26px rgba(0,0,0,.06);
    padding: 16px;
    display:flex;
    gap: 14px;
    align-items:flex-start;
}
.team-avatar{
    width: 86px;
    height: 86px;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,.10);
    flex: 0 0 auto;
    background-color: rgb(235, 231, 223);
}
.team-avatar img{
    width:100%;
    height:100%;
    object-fit: cover;
    background-color: rgb(235, 231, 223);
}
.team-name{ font-weight: 700; margin-bottom: 2px; }
.team-role{ margin: 0 0 8px 0; color: var(--muted); }
.team-card ul{ margin: 0; padding-left: 1.1rem; }
@media (max-width: 991.98px){
    .team-card{ grid-column: span 12; }
}
.team-card.mx-auto{
    grid-column: 4 / span 6;
}

/* CTA footer */
.cta-footer{
    padding: 22px 0 22px 0;
    background: #ebe7df; /* Même ton beige neutre pour matcher la zone .page */
}
.cta-card{
    background: var(--bg-soft);
    border: 1px solid rgba(0,0,0,.08);
    border-radius: calc(var(--radius) + 6px);
    padding: 18px;
}
.cta-title{ font-weight: 700; font-size: 1rem; }
.cta-text{ color: var(--muted); }
.cta-text a{ text-decoration: none; }

/* Footer */
.site-footer{
    padding: 26px 0 34px 0;
    background: #0b0b0b;
    color: rgba(255,255,255,.88);

    /* Hauteur de référence pour aligner logo + contact */
    --footer-brand-h: 50px; /* ↓ encore réduit */
}

/* Logo */
.site-footer .footer-logo{
    height: var(--footer-brand-h);
    width: auto;
    max-width: 190px; /* légèrement réduit */
    display: block;

    /* Anti-troncature (flex + marge de sécurité à droite) */
    flex: 0 0 auto;           /* ne pas shrink */
    box-sizing: content-box;
    padding-right: 6px;       /* marge de sécurité côté droit */

    /* Descend un peu + évite l'effet "logo rogné" sur certains écrans */
    transform-origin: left center;
    transform: translateY(3px) scale(.95);
}

/* Ligne logo + contact : plus serrée */
.site-footer .footer-brand{
    gap: 5px;
    align-items: center;
    overflow: visible; /* évite tout clipping */
}

/* Contact : retours à la ligne (Secrétariat / Lun–Ven / Email) */
.site-footer .footer-contact{
    display: block;
    font-size: .85rem; /* compact */
    line-height: .6;  /* lisible + stable */
    white-space: normal;
}
.site-footer .footer-meta{
    display: block;
    margin: 0;
}

/* Séparateurs inutiles (si jamais il en reste dans le HTML) */
.site-footer .footer-sep{
    display: none;
}

/* Liens */
.site-footer a{ color: rgba(255,255,255,.88); text-decoration: none; }
.site-footer a:hover{ text-decoration: underline; }

.footer-title{
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 10px;
}
.footer-links li{ margin: 6px 0; }
.footer-small{ opacity:.85; }

/* Mobile */
@media (max-width: 575.98px){
    .site-footer{
        --footer-brand-h: 42px; /* ↓ ajusté */
    }
    .site-footer .footer-brand{
        gap: 15px;
    }
    .site-footer .footer-contact{
        display: block;
        font-size: .85rem; /* compact */
        line-height: .6;  /* lisible + stable */
        text-align: center;
        white-space: normal;
    }
    .site-footer .footer-hours{
        text-align: center;
    }
    /* Mobile : évite la troncature du logo (Galaxy M11) */
    .site-footer .footer-logo{
        max-width: 150px;
        padding-right: 8px;
        transform: translateY(2px) scale(.94);
    }
}

/* Tablette */
@media (max-width: 991.98px){
    .site-footer{
        --footer-brand-h: 48px; /* ↓ ajusté */
    }
}

/* Anchor offset for fixed navbar */
.anchor-offset{
    scroll-margin-top: calc(var(--nav-h) + 20px);
}
#contenu {
    scroll-margin-top: var(--nav-h);
}

/* Améliorations responsive générales */
.container {
    max-width: 1320px; /* Pour xxl >1400px, limite l'étalement */
}

/* Full width seulement pour les containers dans .page (contenu des pages) */
.page .container,
.cta-footer .container,
.site-footer .container{
    max-width: none;
}

@media (max-width: 575.98px) { /* xs/mobile portrait */
    .page { padding: 24px 0 8px 0; } /* Réduit le padding pour plus d'espace écran */
    .section-card { padding: 14px; } /* Cartes plus compactes */
    .hero-content { padding: 16px 8px 28px 8px; } /* Hero plus serré */
    .hero-title {
        font-size: clamp(2.2rem, 5.2vw, 4rem);
    }
    .hero-bullets-text:first-line {
        font-size: 1.4rem;
    }
    .hero-bottom-block {
        transform: translateY(50px);
    }
}

@media (min-width: 576px) and (max-width: 767.98px) { /* sm/mobile landscape ou petite tablette */
    .hero-lead { font-size: clamp(0.95rem, 1.2vw, 1.1rem); } /* Texte hero adapté */
    .team-card { flex-direction: column; align-items: center; } /* Équipe stackée si besoin */
}

@media (min-width: 1200px) { /* xl/large desktop */
    .hero-content { padding-top: 12px; padding-bottom: 84px; } /* Plus d'espace sur grands écrans */
}

img { max-width: 100%; height: auto; } /* Images toujours responsive */

/* Adaptation pour tablettes/large (992px-1399px) : réduit légèrement pour éviter débordement navbar */
@media (min-width: 992px) and (max-width: 1399.98px){
    .site-navbar .nav-link {
        padding-left: 0.2rem;
        padding-right: 0.2rem;
        font-size: 0.85rem !important;
        white-space: normal !important; /* Allow wrap if too long */
    }
    .site-navbar .nav-center {
        gap: 8px !important;
    }
    .site-nav-cta {
        padding: .50rem 0.5rem;
        font-size: 0.85rem !important;
    }

    /* Correction du décalage gauche du contenu hero sur tablette */
    .hero-content > :first-child {
        transform: translateX(0);
    }
    /* Ajustement global pour remonter le bloc bottom de 30px (réduit translateY de 100px à 70px) */
    .hero-bottom-block {
        transform: translateY(50px);
    }
}

/* Illustrations dans section-card : largeur fixe, hauteur auto, bords arrondis */
.section-card img{
    width: 200px;
    height: auto;
    border-radius: 8px;
}
.section-card {
    overflow: hidden;
}

/* ✅ AJOUT — Accueil + RDV (mobile uniquement) : images un peu plus grandes + espace légèrement augmenté avec la liste */
@media (max-width: 575.98px){
    .site-body.home .section-card > img.float-start,
    .site-body.rdv .section-card > img.float-start{
        width: 134px;                 /* ← règle la taille de l’image sur mobile */
        max-width: 134px;
        height: auto;

        margin-inline-end: 1.35rem !important; /* ← règle l’espace image → texte */
        margin-right: 1.35rem !important;      /* fallback */
    }
}

/* Modal for enlarged images */
#imageModal .modal-dialog {
    max-width: fit-content;
    margin: auto;
}
#imageModal .modal-body {
    padding: 0;
}
#imageModal img {
    max-width: 90vw;
    max-height: 80vh;
    display: block;
}

@media (max-width: 991.98px){
    .section-card h3 {
        font-size: 1.32rem;
    }
    .section-card ul {
        font-size: 0.85rem;
    }
}

/* Ajustement global pour élever le texte dans les boutons de 2px */
.site-body .btn {
    padding-top: calc(.375rem - 2px) !important;
    padding-bottom: calc(.375rem + 2px) !important;
}
.site-nav-cta {
    padding-top: calc(.5rem - 2px);
    padding-bottom: calc(.5rem + 2px);
}

/* Custom ratio for half height (32:9 for half of 16:9) */
.ratio-32x9 {
    --bs-aspect-ratio: calc(9 / 32 * 100%);
}

/* ============================================================
   FIX MOBILE : le dropdown caché ne doit PAS réserver de hauteur
   dans le menu hamburger (sinon gros espace + effet “ça se tasse”)
   ============================================================ */
@media (max-width: 991.98px){
    .navbar-collapse .site-dropdown{
        display: none;                 /* fermé = ne prend aucune place */
        visibility: visible;           /* neutralise le mode "visibility" desktop */
        opacity: 1;                    /* neutralise l'opacité desktop */
        pointer-events: auto;
        transition: none !important;   /* pas d'anim desktop dans le hamburger */
        position: static !important;   /* menu en flux quand il est ouvert */
        transform: none !important;
    }

    .navbar-collapse .site-dropdown.show,
    .navbar-collapse .dropdown.show > .site-dropdown{
        display: block;                /* ouvert = visible et en flux */
    }

    .navbar-collapse .site-dropdown.dd-fade-out{
        display: none;                 /* fermeture = pas de réserve d'espace */
        opacity: 1;
        pointer-events: none;
    }
}

/* Avis des patients (carousel) : cartes même taille + 6 lignes + footer en bas + lien à droite */
.reviews-carousel{
    --review-card-h: 270px;
}

/* === CORRECTION IMMEDIATE : La largeur des cartes est définie ICI pour éviter tout écrasement === */
.review-item {
    width: 300px;
    flex: 0 0 auto; /* Force le respect de la largeur dans le flexbox */
}

.reviews-carousel .card{
    height: var(--review-card-h);
    min-height: var(--review-card-h);
    max-height: var(--review-card-h);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.reviews-carousel .card .card-body{
    overflow: hidden;
    height: 100%;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
}

.reviews-carousel .card-title{
    font-size: 1.1rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 190px;
}

.reviews-carousel .review-text{
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 8.1em;
    margin-bottom: 1.35em;
    position: relative;
    line-height: 1.35;
    font-size: 0.95rem;
    color: var(--muted);
}

.reviews-carousel .review-text::after{
    content: '…';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 2.2em;
    text-align: right;
    background: linear-gradient(to right, rgba(255,255,255,0), #fff 55%);
    display: none;
    pointer-events: none;
}

.reviews-carousel .card.is-truncated .review-text::after{
    display: block;
}

/* Masque la fin de ligne pour éviter les doubles "..." */
.reviews-carousel .card.is-truncated .review-text{
    padding-right: 2.2em;
}

.reviews-carousel .card.expanded .review-text::after{
    display: none;
}

.reviews-carousel .card.expanded .review-text{
    -webkit-line-clamp: unset;
    display: block;
    overflow: auto;
    flex: 0 0 auto;
    max-height: 8.1em;
    margin-bottom: 1.35em;
    -webkit-overflow-scrolling: touch;
}

.reviews-carousel .review-footer{
    margin-top: auto;
    padding-top: 0;
    border-top: 0;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .6rem;
    white-space: nowrap;
}

.reviews-carousel .review-more-wrapper{
    display: none;
    white-space: nowrap;
}

.reviews-carousel .card.is-truncated .review-more-wrapper{
    display: inline;
}

.reviews-carousel .review-more-wrapper a{
    font-size: .875rem;
    white-space: nowrap;
}

/* Ellipsis : évite le double "..." (on laisse le line-clamp gérer l’ellipse) */
.reviews-carousel .review-text::after{
    content: none;
    display: none;
}
.reviews-carousel .card.is-truncated .review-text{
    padding-right: 0;
}

/* Justification + césure pour les textes dans les cartes (p et li) */
.page .section-card p,
.page .section-card li,
.page .team-card p,
.page .team-card li{
    text-align: justify;
    text-align-last: left;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
}

/* Mobile portrait : modal image en plein écran pour éviter les débordements */
@media (max-width: 575.98px) and (orientation: portrait) {
    #imageModal .modal-dialog {
        max-width: 100vw;
        max-height: 100vh;
        margin: 0;
    }
    #imageModal .modal-content {
        border: none;
        border-radius: 0;
        height: 100vh;
    }
    #imageModal .modal-header {
        padding: 10px;
        background: rgba(255,255,255,.9);
    }
    #imageModal .modal-body {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: auto;
    }
    #imageModal img {
        max-width: 100vw;
        max-height: none;
        width: auto;
        height: auto;
    }
}

/* ============================================================
   Optimisations Mobile (Jan 2026)
   ============================================================ */

@media (max-width: 575.98px) {
    /* Mobile : la carte Google est trop aplatie en 32x9, on passe en 4:3 */
    .ratio-32x9 {
        --bs-aspect-ratio: 75%; /* 4:3 */
    }

    /* Mobile : les avis prennent 85% de la largeur pour inciter au scroll */
    .review-item {
        width: 85vw !important;
    }
}