/* ============================================================================
   main.css — laurencerousseau.ca
   Surcouche de marque par-dessus Open Props (tokens runtime uniquement).
   Pas de PostCSS ici → @media (min-width:…) classiques, pas de custom-media.
   ============================================================================ */

/* ------------------------------------------------------- Polices locales ---- */
/* Auto-hébergées (ex-Google Fonts) → zéro tiers, zéro requête bloquante externe.
   Sous-ensembles latin (+ latin-ext) suffisants pour le français. Manrope est
   variable : un seul woff2 couvre 400–600. display:swap = texte système affiché
   immédiatement, échangé à l'arrivée de la police (pas de blocage du rendu). */
@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url("../fonts/manrope-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url("../fonts/manrope-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Ovo";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/ovo-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Yusei Magic";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/yuseimagic-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ----------------------------------------------- Transitions inter-pages ---- */
/* Fondu enchaîné au lieu du flash blanc lors d'un reload (login/logout admin =
   redirect serveur 302). Opt-in cross-document, même origine. Navigateurs sans
   support → comportement classique. Coupé en prefers-reduced-motion par l'UA. */
@view-transition {
    navigation: auto;
}

/* ---------------------------------------------------------------- Tokens ---- */
:root {
    /* Palette de marque (design.md) */
    --brand-primary: #417572; /* teal/sapin — signature, CTA */
    --brand-mint: #d5e8df; /* menthe pâle — fonds doux */
    --brand-cream: #f2f0ec; /* crème — fond de page */
    --brand-olive: #9c9258; /* olive/or — accent secondaire */
    --brand-white: #ffffff;

    --text-body: rgba(7, 8, 7, 0.9);
    --text-muted: rgba(7, 8, 7, 0.62);
    --on-dark: rgba(255, 255, 255, 0.92);
    --on-dark-muted: rgba(255, 255, 255, 0.66);

    --border-subtle: rgba(0, 0, 0, 0.15);
    --header-sticky: rgba(255, 255, 255, 0.7); /* #9C925880 */
    --overlay-white: rgba(255, 255, 255, 0.2);

    --radius: 24px;
    --radius-pill: 100px;
    --maxw: 1200px;

    /* surcouche Open Props (les tokens runtime marchent en CSS pur) */
    --transition: 0.3s var(--ease-3, ease);
    --shadow-card: var(--shadow-3, 0 8px 24px -8px rgba(7, 8, 7, 0.18));
    --shadow-cta: 0 14px 28px -14px rgba(65, 117, 114, 0.85);

    --font-display: "Ovo", Georgia, serif;
    --font-body: "Manrope", system-ui, sans-serif;
    --font-accent: "Bricolage Grotesque", var(--font-display);
}

/* ------------------------------------------------------------------ Base ---- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    background: var(--brand-cream);
    color: var(--text-body);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.9;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: -1px;
    line-height: 1.05;
    color: #1d2a29;
}

h1 {
    font-size: clamp(2.75rem, 7vw, 5rem);
    letter-spacing: -2px;
    line-height: 1;
}
h2 {
    font-size: clamp(2rem, 4.2vw, 2.6rem);
}
h3 {
    font-size: 1.4rem;
    letter-spacing: -0.5px;
}

a {
    color: var(--brand-primary);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover {
    color: var(--brand-olive);
}

img {
    display: block;
    max-width: 100%;
}

/* overline / label Manrope (design.md) */
.overline {
    display: inline-block;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--brand-olive);
}

/* ---------------------------------------------------------------- Layout ---- */
.container {
    width: 100%;
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.section {
    padding-block: clamp(3.5rem, 8vw, 6rem);
}
.section--mint {
    background: var(--brand-mint);
}
.section--cream {
    background: var(--brand-cream);
}

.section-head {
    max-width: 640px;
    margin-bottom: clamp(2rem, 5vw, 3rem);
}
.section-head p {
    color: var(--text-muted);
    margin-top: 0.75rem;
}

.grid-auto {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* desktop : 3 colonnes max */
    gap: 30px;
}
@media (max-width: 900px) {
    .grid-auto {
        grid-template-columns: repeat(2, 1fr);
    } /* tablette : 2 colonnes */
}
@media (max-width: 560px) {
    .grid-auto {
        grid-template-columns: 1fr;
    } /* mobile : 1 colonne */
}

/* Témoignages : 3 colonnes pleines, puis empilées (jamais d'orpheline) */
.grid-testimonials {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch; /* cartes de hauteur égale sur une même rangée */
    gap: 30px;
}
@media (max-width: 760px) {
    .grid-testimonials {
        grid-template-columns: 1fr;
    }
}

/* ------------------------------------------------------------ Utilitaires --- */
.text-center {
    text-align: center;
}
.text-left {
    text-align: left;
}
.text-right {
    text-align: right;
}
.mx-auto {
    margin-inline: auto;
}

/* ---------------------------------------------------------------- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.95rem 1.7rem;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition:
        transform 0.25s var(--ease-3, ease),
        background 0.25s ease,
        box-shadow 0.25s ease,
        color 0.25s ease;
}
.btn svg {
    transition: transform 0.25s ease;
}
.btn:hover svg {
    transform: translateX(3px);
}

.btn--primary {
    background: var(--brand-primary);
    color: var(--brand-white);
    box-shadow: var(--shadow-cta);
}
.btn--primary:hover,
.btn--primary:focus-visible {
    background: #355f5c;
    color: var(--brand-white);
    transform: translateY(-2px);
    box-shadow: 0 20px 34px -14px rgba(65, 117, 114, 0.9);
}

.btn--ghost {
    background: transparent;
    color: var(--brand-primary);
    border-color: var(--border-subtle);
}
.btn--ghost:hover {
    background: var(--brand-white);
    border-color: var(--brand-primary);
}

/* ghost sur fond foncé (bande CTA) — texte blanc, hover lisible */
.btn--ghost-on-dark {
    background: transparent;
    color: var(--brand-white);
    border-color: var(--overlay-white);
}
.btn--ghost-on-dark:hover,
.btn--ghost-on-dark:focus-visible {
    background: var(--brand-white);
    color: var(--brand-primary);
    border-color: var(--brand-white);
}

.btn--on-dark {
    background: var(--brand-white);
    color: var(--brand-primary);
}
.btn--on-dark:hover {
    background: var(--brand-mint);
    color: var(--brand-primary);
    transform: translateY(-2px);
}

:focus-visible {
    outline: 3px solid var(--brand-primary);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ----------------------------------------------------------- Site header ---- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: transparent;
    transition:
        background var(--transition),
        box-shadow var(--transition),
        backdrop-filter var(--transition);
}
.site-header.is-scrolled {
    background: var(--header-sticky);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 var(--border-subtle);
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 1rem;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--font-display);
    font-size: 1.65rem;
    letter-spacing: -0.5px;
    color: #1d2a29;
}
.brand__logo {
    height: 1.6em;
    width: auto;
    flex-shrink: 0;
}
.brand small {
    display: block;
    margin-top: -1rem;
    font-family: var(--font-body);
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--brand-olive);
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}
.nav__links {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    list-style: none;
}
.nav__links a {
    color: var(--text-body);
    font-size: 0.92rem;
    font-weight: 500;
}
.nav__links a:hover {
    color: var(--brand-primary);
}

.nav__toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    background: var(--brand-white);
    cursor: pointer;
}
.nav__toggle span,
.nav__toggle span::before,
.nav__toggle span::after {
    content: "";
    display: block;
    width: 20px;
    height: 2px;
    margin-inline: auto;
    background: var(--brand-primary);
    transition:
        transform var(--transition),
        opacity var(--transition);
}
.nav__toggle span {
    position: relative;
}
.nav__toggle span::before {
    position: absolute;
    top: -6px;
}
.nav__toggle span::after {
    position: absolute;
    top: 6px;
}

/* ------------------------------------------------------------------ Hero ---- */
.hero {
    padding-block: clamp(3rem, 7vw, 5.5rem) clamp(3.5rem, 8vw, 6rem);
}

/* Ligne 1 : badge + titre, pleine largeur */
.hero__title {
    margin-top: 0.8rem;
    max-width: 22ch;
}

/* Ligne 2 : lede + media côte à côte */
.hero__body {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: clamp(2rem, 5vw, 4rem);
    margin-top: clamp(1.5rem, 4vw, 2.5rem);
}
.hero__lede {
    max-width: 52ch;
    color: var(--text-muted);
    font-size: 1.3rem;
}

/* Ligne 3 : actions centrées */
.hero__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: clamp(2rem, 5vw, 3rem);
}

.hero__media {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 460px;
    box-shadow: var(--shadow-card);
    background: var(--brand-mint);
}
.hero__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 28%;
}
.hero__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 55%,
        rgba(29, 42, 41, 0.22)
    );
    z-index: 3; /* le gradient reste au-dessus des calques du diaporama */
}
/* Diaporama : calques empilés par-dessus la photo de base, fondu enchaîné lent.
   La position/taille/object-fit sont héritées de `.hero__media img`. */
.hero__slide {
    opacity: 0;
    z-index: 0;
    transition: opacity 2s ease-in-out;
}
.hero__slide.is-active {
    opacity: 1;
}

/* badge pill (repris d'index.cfm) */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.4rem 0.9rem;
    background: var(--brand-mint);
    color: var(--brand-primary);
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    cursor: pointer;
}
.badge .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brand-primary);
    animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(65, 117, 114, 0.55);
    }
    70% {
        box-shadow: 0 0 0 9px rgba(65, 117, 114, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(65, 117, 114, 0);
    }
}

/* ----------------------------------------------------------------- About ---- */
.about__grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    align-items: center;
    gap: clamp(2rem, 5vw, 4rem);
}
.about__media {
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4 / 5;
    box-shadow: var(--shadow-card);
}
.about__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 25%;
}
.about__body p {
    margin-top: 1.1rem;
}
.about__list {
    list-style: none;
    margin-top: 1.5rem;
    display: grid;
    gap: 0.6rem;
}
.about__list li {
    display: flex;
    gap: 0.65rem;
    color: var(--text-body);
}
.about__list li::before {
    content: "—";
    color: var(--brand-olive);
}

/* -------------------------------------------------------------- Services ---- */
.card {
    background: var(--brand-white);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: clamp(1.5rem, 3vw, 2.1rem);
    box-shadow: var(--shadow-card);
    transition:
        transform var(--transition),
        box-shadow var(--transition);
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px -18px rgba(7, 8, 7, 0.25);
}
.card__icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: var(--brand-mint);
    color: var(--brand-primary);
    margin-bottom: 1.1rem;
}
.card h3 {
    margin-bottom: 0.5rem;
}
.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ------------------------------------------------------------- Conditions --- */
/* Soins → Conditions traitées sont logiquement liés : on resserre l'espace
   entre les deux sections (remonte la section Conditions). Vaut ~-131px sur
   desktop ; le clamp évite tout chevauchement sur petits écrans. */
#conditions {
    margin-top: clamp(-131px, -9vw, -40px);
}

/* Boîte menthe arrondie : texte + liste de pastilles à gauche, silhouette
   interactive à droite (points animés survolables). Inspiré de Flexora. */
.conditions {
    display: grid;
    grid-template-columns: 1fr 0.85fr;
    align-items: center;
    gap: clamp(1.5rem, 4vw, 3.5rem);
    padding: clamp(1.75rem, 5vw, 3.5rem);
    background: var(--brand-mint);
    border-radius: var(--radius);
}
.conditions__text h2 {
    margin-top: 0.6rem;
    max-width: 14ch;
}
.conditions__text p {
    color: var(--text-muted);
    margin-top: 1rem;
    max-width: 46ch;
}

/* Pastilles (pills) */
.pills {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1.5rem 0;
}
.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--brand-white);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-body);
}
.pill::before {
    content: "\2724"; /* sparkle four-pétales */
    color: var(--brand-primary);
    font-size: 0.85rem;
    line-height: 1;
}

/* Silhouette + points anatomiques */
.anatomy {
    position: relative;
    width: 100%;
    max-width: 380px;
    margin-inline: auto;
    justify-self: center;
}
.anatomy__img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 18px 30px rgba(7, 8, 7, 0.12));
}
.anatomy__point {
    position: absolute;
    top: var(--y);
    left: var(--x);
    width: 16px;
    height: 16px;
    padding: 0;
    transform: translate(-50%, -50%);
    border: 2px solid var(--brand-white);
    border-radius: 50%;
    background: var(--brand-primary);
    cursor: pointer;
    z-index: 1;
}
.anatomy__point::after {
    /* halo pulsé */
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    animation: anatomy-pulse 2.4s ease-out infinite;
}
.anatomy__point:nth-child(3)::after {
    animation-delay: 0.3s;
}
.anatomy__point:nth-child(5)::after {
    animation-delay: 0.6s;
}
.anatomy__point:nth-child(7)::after {
    animation-delay: 0.9s;
}
.anatomy__point:nth-child(9)::after {
    animation-delay: 1.2s;
}
.anatomy__point:hover,
.anatomy__point:focus-visible {
    z-index: 3;
}

@keyframes anatomy-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(65, 117, 114, 0.55);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(65, 117, 114, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(65, 117, 114, 0);
    }
}

/* Infobulle au survol / focus du point */
.anatomy__tip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    white-space: nowrap;
    padding: 0.4rem 0.7rem;
    background: #1d2a29;
    color: var(--brand-white);
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.3;
    opacity: 0;
    pointer-events: none;
    transition:
        opacity var(--transition),
        transform var(--transition);
}
.anatomy__tip::after {
    /* petite flèche */
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1d2a29;
}
.anatomy__point:hover .anatomy__tip,
.anatomy__point:focus-visible .anatomy__tip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Liste complète des conditions (modale) */
.conditions-group + .conditions-group {
    margin-top: 1.75rem;
}
.conditions-group h3 {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--brand-olive);
    margin-bottom: 0.85rem;
}
.conditions-list {
    list-style: none;
    display: grid;
    gap: 0.5rem;
}
.conditions-list li {
    display: flex;
    gap: 0.6rem;
    color: var(--text-body);
    max-inline-size: none; /* neutralise la limite Open Props sur li */
}
.conditions-list li::before {
    content: "\2724";
    color: var(--brand-primary);
    flex-shrink: 0;
}

/* ------------------------------------------------------------ Testimonials -- */
.testimonial {
    position: relative; /* ancre le bouton de suppression admin */
    background: var(--brand-cream);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: clamp(1.6rem, 3vw, 2.2rem);
    display: flex;
    flex-direction: column;
    align-items: center; /* étoiles centrées (surcharge le place-items:center d'Open Props) */
    gap: 1rem;
}

/* Bouton de suppression douce (admin) — coin haut droit de la carte */
.testimonial__del {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    margin: 0;
}
.testimonial__del-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    background: var(--brand-white);
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    font-size: 1rem;
    line-height: 1;
    color: #b3261e;
    cursor: pointer;
    transition:
        color var(--transition),
        border-color var(--transition),
        background var(--transition);
}
.testimonial__del-btn:hover {
    color: var(--brand-white);
    background: #b3261e;
    border-color: #b3261e;
}
.testimonial__stars {
    color: var(--brand-olive);
    letter-spacing: 2px;
    font-size: 0.9rem;
}
.testimonial__quote {
    font-family: var(--font-display);
    font-size: 1.15rem;
    line-height: 1.5;
    color: #1d2a29;
    align-self: stretch; /* citation sur toute la largeur, alignée à gauche */
    max-inline-size: none; /* neutralise la limite d'Open Props sur blockquote */
    padding: 0;
    text-align: left;
    text-wrap: balance;
}
.testimonial__who {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    align-self: flex-end; /* nom à droite */
    max-inline-size: none;
    text-align: right;
}

/* Dans la grille : citations clampées (max 5 lignes) — au-delà, lien « lire la
   suite ». La modale, elle, montre le texte complet. */
.grid-testimonials .testimonial__quote {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.grid-testimonials .testimonial__who {
    margin-top: auto;
} /* nom collé en bas (hauteurs égales) */

/* Lien « ( lire la suite >> ) » — révèle le témoignage complet dans une modale */
.testimonial__more-link {
    align-self: flex-start;
    margin-top: -0.25rem;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--brand-primary);
    transition: color var(--transition);
}
.testimonial__more-link:hover {
    color: var(--brand-olive);
    text-decoration: underline;
}

/* Lien « En voir plus… » — aligné à droite sous la grille */
.testimonials__more {
    display: flex;
    justify-content: flex-end;
    margin-top: clamp(1.5rem, 4vw, 2.25rem);
}
.link-more {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    color: var(--brand-primary);
    transition: color var(--transition);
}
.link-more:hover {
    color: var(--brand-olive);
}
.link-more svg {
    transition: transform 0.25s ease;
}
.link-more:hover svg {
    transform: translateX(3px);
}

/* ----------------------------------------------------------------- Modale ---- */
.modal[hidden] {
    display: none;
}
.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 4vw, 2.5rem);
}
.modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(7, 8, 7, 0.45);
    backdrop-filter: blur(3px);
}
.modal__dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 680px;
    max-height: min(80vh, 760px);
    background: var(--brand-cream);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}
.modal:not([hidden]) .modal__dialog {
    animation: modal-in 0.3s var(--ease-3, ease);
}
@keyframes modal-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}
.modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: clamp(1.25rem, 3vw, 1.75rem);
    border-bottom: 1px solid var(--border-subtle);
}
.modal__head h2 {
    font-size: 1.5rem;
}
.modal__close {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.75rem;
    line-height: 1;
    color: var(--text-muted);
    padding: 0.25rem;
    transition: color var(--transition);
}
.modal__close:hover {
    color: var(--brand-primary);
}
.modal__body {
    padding: clamp(1.25rem, 3vw, 1.75rem);
    overflow-y: auto;
}
.testimonials-list {
    list-style: none;
}
/* Le li est plafonné par Open Props (:where(li){max-inline-size}). On l'accepte
   et on centre la bulle horizontalement ; 1em d'espace vertical entre cartes. */
.testimonials-list li {
    margin: 1em auto;
}
.testimonials-list .testimonial {
    width: 100%;
}

/* Politique de confidentialité (modale legal) — bloc de prose lisible */
.legal {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--ink, currentColor);
}
.legal p {
    max-inline-size: none;
    margin-block: 0.5rem;
}
.legal__intro {
    color: var(--brand-olive, inherit);
}
.legal__group + .legal__group,
.legal__intro + .legal__group {
    margin-top: 1.5rem;
}
.legal__group h3 {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--brand-olive);
    margin-bottom: 0.6rem;
}
.legal__list {
    list-style: disc;
    padding-left: 1.2rem;
    display: grid;
    gap: 0.5rem;
    margin-block: 0.5rem;
}
.legal__list li {
    max-inline-size: none;
}
.legal__updated {
    margin-top: 1.75rem;
    font-size: 0.78rem;
    font-style: italic;
    opacity: 0.7;
}

/* Verrouille le scroll de la page quand la modale est ouverte */
body.has-modal {
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .modal:not([hidden]) .modal__dialog {
        animation: none;
    }
}

/* ----------------------------------------------------- Admin / formulaires -- */
.nav__lock {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    background: none;
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    color: var(--text-body);
    cursor: pointer;
    transition:
        color var(--transition),
        border-color var(--transition);
}
.nav__lock:hover {
    color: var(--brand-primary);
    border-color: var(--brand-primary);
}
/* Session admin active : cadenas rouge (signal visuel du mode édition). */
.nav__lock.is-admin {
    color: #b3261e;
    border-color: #b3261e;
}
.nav__lock.is-admin:hover {
    color: #98201a;
    border-color: #98201a;
}

.modal__dialog--narrow {
    max-width: 420px;
}

/* ---- Modale messages (admin) : grande feuille quasi plein écran -------------- */
/* Réutilise le fond crème + head/body de .modal__dialog ; on l'élargit et on
   l'étend en hauteur pour héberger le tableau paginé DataTables. */
.modal__dialog--sheet {
    max-width: 1180px;
    height: 100%;
    max-height: 92vh;
}
.messages-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}
.messages-table th,
.messages-table td {
    text-align: left;
    vertical-align: top;
}
.messages-table__msg {
    white-space: normal;
    max-width: 38ch;
    line-height: 1.5;
}
/* Distinction visuelle de l'origine (colonne « source ») : message reçu du site
   en italique, note admin (rolodex) en gras. Le style est porté par le <i>/<b>
   autour du contenu (pas une classe du <td>) → il suit dans la ligne de détail
   repliée de DataTables Responsive, qui recopie le HTML interne de la cellule. */
.messages-empty {
    color: var(--text-muted);
    padding: 1.5rem 0;
    text-align: center;
}
/* DataTables : harmonise les contrôles avec la palette de marque. */
.modal--messages .dt-paging .dt-paging-button.current {
    color: var(--brand-white) !important;
    background: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
}
.modal--messages .dt-search input,
.modal--messages .dt-paging .dt-paging-button {
    border-radius: 8px;
}

/* ---- Rolodex : barre d'action + bouton « + » flottant + formulaire d'ajout -- */
.messages-added {
    margin-bottom: 1rem;
}
.messages-toolbar {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.85rem;
    margin-bottom: 0.5rem;
    background: var(--brand-cream);   /* masque le tableau qui défile dessous */
    border-bottom: 1px solid var(--border-subtle);
}
.messages-toolbar__hint {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.messages-fab {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    background: var(--brand-primary);
    color: var(--brand-white);
    border: none;
    border-radius: 999px;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-card);
    transition: background var(--transition), transform var(--transition);
}
.messages-fab:hover,
.messages-fab:focus-visible {
    background: var(--brand-primary-dark, #356058);
    transform: translateY(-1px);
}
.messages-fab svg {
    flex-shrink: 0;
}

.client-form {
    margin-bottom: 1.25rem;
    padding: 1.1rem 1.25rem 1.25rem;
    background: var(--brand-white);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm, 14px);
}
.client-form[hidden] {
    display: none;
}
.client-form__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1rem;
}
.client-form__full {
    grid-column: 1 / -1;
}
.client-form label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
    font-weight: 600;
}
.client-form__opt {
    font-weight: 400;
    color: var(--text-muted);
}
.client-form input,
.client-form textarea {
    width: 100%;
    padding: 0.55rem 0.7rem;
    font: inherit;
    background: var(--brand-cream);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
}
.client-form input:focus-visible,
.client-form textarea:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 1px;
}
.client-form textarea {
    resize: vertical;
}
.client-form__hint {
    margin-top: 0.6rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.client-form__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-top: 0.9rem;
}
@media (max-width: 560px) {
    .client-form__grid {
        grid-template-columns: 1fr;
    }
    .messages-toolbar__hint {
        display: none;   /* on garde juste le bouton sur petit écran */
    }
}

/* ---- Modale réservation : plein écran sur mobile, encadrée en desktop ------ */
/* Mobile : bord à bord (max d'espace pour le widget). Desktop : marge autour
   pour qu'on comprenne que c'est une modale + zone d'overlay cliquable (clic
   à l'extérieur = fermeture, comme la touche Échap). */
.modal--booking {
    padding: 0;
}
/* Mobile : on ancre le dialog directement aux bords de la modale (fixe, inset:0)
   au lieu de le centrer en flex avec une hauteur en %. iOS Safari résout mal la
   chaîne height:100% à travers un flex item centré → le dialog s'effondre à la
   hauteur de son contenu. position:absolute + inset:0 garantit le plein écran. */
.modal__dialog--full {
    position: absolute;
    inset: 0;
    width: auto;
    max-width: none;
    height: auto;
    max-height: none;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}
/* iOS Safari ignore flex:1 / height:100% sur un <iframe> et le réduit à la
   hauteur intrinsèque de son contenu (l'iframe flotte alors, petit, centré par
   align-items:center). On le positionne en absolu (dialog = position:relative)
   pour forcer le remplissage — fiable sur WebKit iOS, là où height:100% échoue. */
.booking-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
}
@media (min-width: 768px) {
    /* ~90 % du viewport (marge auto de 5 % via le centrage flex, padding 0)
       → on comprend que c'est une modale sans provoquer de scrollbar. */
    .modal__dialog--full {
        position: relative;   /* re-rentre dans le centrage flex de .modal */
        inset: auto;
        width: 90vw;
        max-width: none;
        height: 90vh;
        max-height: none;
        background: var(--brand-white);
        border-radius: var(--radius);
        box-shadow: var(--shadow-card);
        overflow: hidden;        /* arrondit les coins de l'iframe */
    }
}
/* Bouton fermer flottant (l'iframe occupe tout l'espace, pas de barre d'en-tête) */
.modal__close--float {
    position: absolute;
    top: clamp(0.75rem, 2vw, 1.25rem);
    right: clamp(0.75rem, 2vw, 1.25rem);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    color: var(--text-body);
    background: rgba(255, 255, 255, 0.92);
    border-radius: 50%;
    box-shadow: var(--shadow-card);
}
.modal__close--float:hover {
    color: var(--brand-primary);
}

/* Champs de formulaire (login + contact + ajout témoignage) */
.login-form input,
.contact-form input,
.contact-form textarea,
.testimonial-add input,
.testimonial-add textarea {
    width: 100%;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-body);
    background: var(--brand-white);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 0.7rem 0.9rem;
}
.login-form input:focus-visible,
.contact-form input:focus-visible,
.contact-form textarea:focus-visible,
.testimonial-add input:focus-visible,
.testimonial-add textarea:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 1px;
    border-color: var(--brand-primary);
}
.testimonial-add textarea,
.contact-form textarea {
    resize: vertical;
    min-height: 2.6rem;
}

.form-error {
    color: #b3261e;
    font-size: 0.85rem;
    font-weight: 500;
}

.form-success {
    color: var(--brand-primary);
    font-weight: 500;
    margin-bottom: 1.25rem;
}

.login-form,
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.login-form label,
.contact-form label {
    font-size: 0.85rem;
    font-weight: 600;
}
.contact-form__hint {
    margin-top: -0.25rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.login-form .btn,
.contact-form .btn {
    align-self: flex-start;
    margin-top: 0.5rem;
}
.contact-form .btn {
    align-self: flex-end;
}

/* Formulaire d'ajout de témoignage (admin) */
.testimonial-add {
    margin-bottom: clamp(1.5rem, 4vw, 2.25rem);
    padding: clamp(1rem, 3vw, 1.5rem);
    background: var(--brand-white);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
}
.testimonial-add__label {
    font-weight: 600;
    margin-bottom: 0.75rem;
}
.testimonial-add__row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.75rem;
}
.testimonial-add__row input {
    flex: 1 1 200px;
}
.testimonial-add__row textarea {
    flex: 2 1 320px;
}
.testimonial-add__row .btn {
    flex: 0 0 auto;
}

/* --------------------------------------------------------------- CTA band ---- */
.cta-band {
    background: var(--brand-primary);
    color: var(--on-dark);
    text-align: center;
}
.cta-band h2 {
    color: var(--brand-white);
}
.cta-band p {
    color: var(--on-dark-muted);
    max-width: 52ch;
    margin: 1rem auto 2rem;
}
.cta-band .overline {
    color: var(--brand-mint);
}

/* ----------------------------------------------------------------- Footer ---- */
.site-footer {
    background: #1d2a29;
    color: var(--on-dark-muted);
    padding-block: clamp(2.5rem, 6vw, 4rem) 1.5rem;
    font-size: 0.9rem;
}
.site-footer__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
}
.site-footer h4 {
    color: var(--brand-white);
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}
.site-footer a {
    color: var(--on-dark);
}
.site-footer a:hover {
    color: var(--brand-mint);
}
.site-footer ul {
    list-style: none;
    display: grid;
    gap: 0.5rem;
}
.site-footer__brand {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--brand-white);
    letter-spacing: -0.5px;
}
.site-footer__contact {
    font-style: normal;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--on-dark);
    margin-bottom: 1.25rem;
}

.site-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 1.5rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem 1.5rem;
    font-size: 0.8rem;
    color: var(--on-dark-muted);
}
/* 2e élément de chaque rangée aligné à droite (comme site-footer__contact) */
.site-footer__bottom > :nth-child(even) {
    text-align: right;
}
/* Badge hébergement vert — centré tout en bas du footer */
.site-footer__green {
    margin-top: 1.5rem;
    text-align: center;
}
.site-footer__green img {
    display: inline-block;
    height: auto;
}
.neuronex-font {
    font-family: 'Yusei Magic', sans-serif;
}

/* ------------------------------------------------------------- Responsive ---- */
@media (max-width: 900px) {
    .hero__body,
    .about__grid {
        grid-template-columns: 1fr;
    }
    .hero__title {
        max-width: none;
    }
    .hero__media {
        min-height: 340px;
        order: -1;
    } /* image en premier une fois empilé */
    .about__media {
        aspect-ratio: 16 / 10;
    }
    .site-footer__grid {
        grid-template-columns: 1fr 1fr;
    }
    .conditions {
        grid-template-columns: 1fr;
    }
    .conditions__text h2 {
        max-width: none;
    }
    .anatomy {
        max-width: 320px;
        order: -1;
    } /* silhouette en haut sur mobile */
}

@media (max-width: 760px) {
    .nav__toggle {
        display: block;
    }
    .nav__links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: flex-end;
        gap: 0.25rem;
        padding: 1rem clamp(1.25rem, 4vw, 2.5rem) 1.5rem;
        background: var(--brand-cream);
        border-bottom: 1px solid var(--border-subtle);
        box-shadow: 0 12px 24px -12px rgba(7, 8, 7, 0.25);
        transform: translateY(-8px);
        opacity: 0;
        pointer-events: none;
        transition:
            transform var(--transition),
            opacity var(--transition);
    }
    .nav__links a {
        padding-block: 0.5rem;
        width: 100%;
        text-align: right;
    }
    /* cadenas logout : garder le cercle 38×38, pas l'étirement pleine largeur */
    .nav__links a.nav__lock {
        width: 38px;
        padding-block: 0;
        flex: none;
    }
    .nav.is-open .nav__links {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
    .nav.is-open .nav__toggle span {
        background: transparent;
    }
    .nav.is-open .nav__toggle span::before {
        top: 0;
        transform: rotate(45deg);
    }
    .nav.is-open .nav__toggle span::after {
        top: 0;
        transform: rotate(-45deg);
    }
    .site-header {
        position: relative;
    } /* nav déroulant ancré au header */
    .nav .btn--primary {
        display: none;
    } /* CTA déplacé dans le menu déroulant */
}

@media (max-width: 560px) {
    .site-footer__grid {
        grid-template-columns: 1fr;
    }
    .hero {
        padding-top: 0;
    }
    /* badge "nouveaux patients" centré sur téléphone */
    .hero__head .badge {
        display: flex;
        width: fit-content;
        margin-inline: auto;
    }
    /* bas de footer empilé et centré sur téléphone */
    .site-footer__bottom {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .site-footer__bottom > :nth-child(even) {
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* --------------------------------------------- Édition inline (admin) ----- */
/* Visible uniquement en session admin : chaque <p class="editable"> reçoit en
   JS un bouton crayon (coin haut-droit). Crayon → édition (crochet rouge =
   dirty) ; crochet → lecture seule + crochet vert (confirmation), puis crayon. */
.editable {
    position: relative;
}

.editable.is-editing {
    outline: 2px dashed var(--brand-olive);
    outline-offset: 6px;
    border-radius: 8px;
}

.edit-toggle {
    position: absolute;
    top: 0;
    right: -0.5rem;
    margin-top: -2.4rem; /* remonte au-dessus du <p> pour ne pas masquer le texte */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    background: var(--brand-white);
    color: var(--brand-primary);
    cursor: pointer;
    box-shadow: var(--shadow-card);
    transition:
        background var(--transition),
        color var(--transition),
        border-color var(--transition);
    z-index: 2;
}
.edit-toggle:hover {
    color: var(--brand-olive);
}
.edit-toggle svg {
    width: 17px;
    height: 17px;
}

/* État « dirty » : en cours d'édition → crochet rouge */
.edit-toggle.is-dirty {
    color: var(--brand-white);
    background: #b3261e;
    border-color: #b3261e;
}
.edit-toggle.is-dirty:hover {
    color: var(--brand-white);
    background: #98201a;
}

/* État « saved » : confirmation → crochet vert (transitoire) */
.edit-toggle.is-saved {
    color: var(--brand-white);
    background: #2e7d4f;
    border-color: #2e7d4f;
}
.edit-toggle.is-saved:hover {
    color: var(--brand-white);
}

/* ---------------------------------- Gestionnaire d'images du diaporama (admin) */
/* Bouton d'édition en coin haut-droit du cadre hero (au-dessus du gradient). */
.diaporama-edit {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 4; /* > .hero__media::after (gradient, z-index 3) */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    background: var(--brand-white);
    color: var(--brand-primary);
    cursor: pointer;
    box-shadow: var(--shadow-card);
    transition: background var(--transition), color var(--transition);
}
.diaporama-edit:hover { color: var(--brand-olive); }
.diaporama-edit svg { width: 19px; height: 19px; }

/* Formulaire d'ajout : le <label> stylé en bouton déclenche l'input file caché. */
.diaporama-add { margin-bottom: 1.5rem; }
.diaporama-add__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}
.diaporama-add__hint {
    margin: 0.5rem 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Grille de vignettes. */
.diaporama-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.85rem;
}
.diaporama-item {
    position: relative;
    border-radius: var(--radius-sm, 14px);
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: var(--brand-mint);
    box-shadow: var(--shadow-card);
}
.diaporama-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.diaporama-item.is-deleted img {
    opacity: 0.4;
    filter: grayscale(1);
}
.diaporama-item__action { margin: 0; }
.diaporama-item__btn {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(179, 38, 30, 0.92); /* rouge = retirer */
    color: #fff;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.diaporama-item__btn--restore { background: rgba(46, 125, 79, 0.92); } /* vert = restaurer */
.diaporama-badge-deleted {
    position: absolute;
    bottom: 0.4rem;
    left: 0.4rem;
    font-size: 0.7rem;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}

/* ---- Anti-spam : honeypot ------------------------------------------------
   Champ leurre du formulaire de contact. Sorti du flux et hors écran (pas
   display:none, que certains bots ignorent), non focusable, invisible aux
   lecteurs d'écran (aria-hidden dans le HTML). Un humain ne le remplit jamais. */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
