/* ============================================================
   GoPsy - Design system v2
   Mobile-first, accessible, modern. Aucune dep externe.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
    /* Palette principale */
    --c-bg:           #f7f5f2;
    --c-bg-alt:       #fefdfb;
    --c-surface:      #ffffff;
    --c-text:         #0f1b27;
    --c-text-soft:    #3b4a5e;
    --c-muted:        #647289;  /* AA sur fond clair (>=4.5:1) */

    --c-primary:      #7c3aed;
    --c-primary-soft: #ede9fe;
    --c-primary-dark: #6d28d9;
    --c-primary-ink:  #4c1d95;

    --c-accent:       #8b5cf6;
    --c-accent-soft:  #f3f0fe;
    --c-accent-dark:  #6d28d9;

    --c-ink:          #1b1633;   /* sections sombres (violet quasi noir) */
    --c-ink-2:        #2a2150;

    --c-border:       #e6e1d8;
    --c-border-strong:#cfc8bb;
    --c-error:        #b3261e;
    --c-error-soft:   #fdecea;
    --c-success:      #1f7a4d;
    --c-success-soft: #e6f4ec;
    --c-info:         #1f4f7a;
    --c-info-soft:    #eaf2f8;

    /* Layout */
    --radius-sm: 8px;
    --radius:    14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --shadow-sm: 0 1px 2px rgba(15, 27, 39, 0.05);
    --shadow:    0 4px 18px rgba(15, 27, 39, 0.06);
    --shadow-lg: 0 14px 40px rgba(15, 27, 39, 0.1);
    --shadow-ring: 0 0 0 4px rgba(124, 58, 237, 0.18);

    --container: 1180px;
    --gutter:    clamp(1rem, 3vw, 1.5rem);

    /* Typo */
    --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    /* Police d'affichage simple et neutre (demande client : plus de serif pour titres/chiffres) */
    --font-display: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    /* Motion */
    --ease:       cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
    --dur:        220ms;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

@media (prefers-color-scheme: dark) {
    /* On garde une palette claire pour la sante mentale, plus apaisante. */
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--c-bg);
    color: var(--c-text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; display: block; height: auto; }
svg { display: inline-block; vertical-align: middle; flex-shrink: 0; }
button { font: inherit; cursor: pointer; }
a { color: var(--c-primary-dark); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--c-primary); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Accessibility ---------- */
:focus-visible {
    outline: 2px solid var(--c-primary);
    outline-offset: 2px;
    border-radius: 4px;
}
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
    color: var(--c-text);
    line-height: 1.15;
    margin: 0 0 0.5em;
    font-weight: 700;
}
h1, h2 { font-family: var(--font-display); letter-spacing: -0.01em; }
h3, h4 { font-family: var(--font-sans); letter-spacing: -0.02em; }
h1 { font-size: clamp(2.1rem, 5vw + 0.5rem, 3.6rem); font-weight: 800; line-height: 1.1; }
h2 { font-size: clamp(1.7rem, 3vw + 0.5rem, 2.5rem); font-weight: 700; }
h3 { font-size: clamp(1.15rem, 1.5vw + 0.5rem, 1.4rem); }
h4 { font-size: 1.05rem; }
p  { margin: 0 0 1em; color: var(--c-text-soft); }
.lead { font-size: clamp(1.05rem, 1vw + 0.8rem, 1.25rem); color: var(--c-text-soft); }

::selection { background: var(--c-primary); color: #fff; }

/* ---------- Layout ---------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.section {
    padding: clamp(2.5rem, 6vw, 5rem) 0;
}
.section.alt { background: var(--c-bg-alt); }
.section.dark {
    background: linear-gradient(135deg, var(--c-ink) 0%, var(--c-ink-2) 100%);
    color: #ece9f6;
}
.section.dark h1, .section.dark h2, .section.dark h3 { color: #fff; }
.section.dark p { color: rgba(255,255,255,0.85); }
/* FAQ homepage : fond lavande pour marquer le changement de section */
.section.section-faq-home {
    background: linear-gradient(180deg, #f5f3ff 0%, var(--c-bg) 100%);
    border-top: 1px solid var(--c-border);
}

.section-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto clamp(2rem, 4vw, 3rem);
}
.section-head .eyebrow {
    display: inline-block;
    color: var(--c-primary-dark);
    background: var(--c-primary-soft);
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.8rem;
}

/* ---------- Header ---------- */
.site-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--c-border);
    position: sticky;
    top: 0;
    z-index: 50;
}
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 0;
    gap: 1rem;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--c-text);
    letter-spacing: -0.03em;
    text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-mark {
    width: 34px; height: 34px;
    display: block;
    object-fit: contain;
}
.brand .brand-accent { color: var(--c-primary); }

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-links a:not(.btn) {
    color: var(--c-text-soft);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.4rem 0;
    position: relative;
}
.nav-links a:not(.btn):hover {
    color: var(--c-primary-dark);
    text-decoration: none;
}
.nav-links a:not(.btn)::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    height: 2px;
    background: var(--c-primary);
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform var(--dur) var(--ease);
    transform-origin: left;
}
.nav-links a:not(.btn):hover::after { transform: scaleX(1); }
.nav-links a:not(.btn)[aria-current="page"] { color: var(--c-primary-dark); font-weight: 600; }
.nav-links a:not(.btn)[aria-current="page"]::after { transform: scaleX(1); }

.menu-toggle {
    background: var(--c-primary-soft);
    border: 0;
    width: 42px; height: 42px;
    border-radius: 12px;
    color: var(--c-primary-dark);
    font-size: 1.4rem;
    display: none;
    align-items: center;
    justify-content: center;
}
.menu-toggle:hover { background: var(--c-primary); color: #fff; }

/* Voile sombre derriere le menu mobile : le contenu de la page ne transparait
   plus au travers du panneau et un appui a cote referme le menu. */
.nav-scrim {
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(15, 27, 39, 0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s var(--ease-out), visibility 0.25s;
    display: none;
}
.nav-scrim.open { opacity: 1; visibility: visible; pointer-events: auto; }

@media (max-width: 900px) {
    .menu-toggle { display: inline-flex; }
    .nav-scrim { display: block; }
    /* Menu burger : panneau flottant au premier plan, entierement opaque
       (retour client : le menu laissait voir la page au travers). */
    .nav-links {
        position: fixed;
        top: calc(var(--header-h, 64px) + 8px);
        left: var(--gutter); right: var(--gutter); bottom: auto;
        background: var(--c-surface);
        background-color: #fff;
        border: 1px solid var(--c-border);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-lg);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.8rem 1.1rem 1.2rem;
        max-height: calc(100vh - var(--header-h, 64px) - 24px);
        overflow-y: auto;
        z-index: 60;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-14px);
        transition: transform 0.25s var(--ease-out), opacity 0.25s var(--ease-out), visibility 0.25s;
    }
    .nav-links.open { transform: translateY(0); opacity: 1; visibility: visible; pointer-events: auto; }
    .nav-links li {
        width: 100%;
        border-bottom: 1px solid var(--c-border);
    }
    .nav-links li:last-child { border-bottom: 0; }
    .nav-links a {
        display: block;
        padding: 1rem 0.5rem;
        font-size: 1.05rem;
    }
    .nav-links a.btn {
        display: block;
        margin-top: 1rem;
        text-align: center;
    }
    .nav-links a:not(.btn)::after { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.6rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.98rem;
    border: 0;
    cursor: pointer;
    transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), color var(--dur) var(--ease);
    text-align: center;
    line-height: 1;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    will-change: transform;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-dark); color: #fff; }
.btn-accent { background: var(--c-accent); color: var(--c-primary-ink); }
.btn-accent:hover { background: var(--c-accent-dark); color: #fff; }
.btn-outline {
    background: transparent;
    border: 1.5px solid var(--c-border-strong);
    color: var(--c-text);
    box-shadow: none;
}
.btn-outline:hover {
    background: var(--c-primary);
    color: #fff;
    border-color: var(--c-primary);
}
.btn-ghost {
    background: transparent;
    color: var(--c-primary-dark);
    box-shadow: none;
}
.btn-ghost:hover { background: var(--c-primary-soft); color: var(--c-primary-dark); }
.btn-block { width: 100%; }
.btn-sm { padding: 0.55rem 1rem; font-size: 0.88rem; }
.btn-lg { padding: 1.05rem 2rem; font-size: 1.05rem; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: clamp(3rem, 7vw, 6rem) 0 clamp(2.5rem, 5vw, 4.5rem);
    background:
        radial-gradient(ellipse at top right, rgba(167, 139, 250, 0.22), transparent 60%),
        radial-gradient(ellipse at bottom left, rgba(124, 58, 237, 0.14), transparent 60%),
        linear-gradient(180deg, #f5f3ff 0%, var(--c-bg) 100%);
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(15,27,39,0.05) 1px, transparent 0);
    background-size: 28px 28px;
    opacity: 0.5;
    pointer-events: none;
}
.hero > .container { position: relative; z-index: 1; }
.hero .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--c-primary-dark);
    background: rgba(255,255,255,0.7);
    border: 1px solid var(--c-border);
    padding: 0.4rem 0.95rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
}
.hero h1 { max-width: 900px; }
.hero p.lead {
    max-width: 660px;
    margin-bottom: 1.8rem;
}
/* Variante compacte (FAQ) : hero moitie moins haut */
.hero.hero-compact { padding: clamp(1.4rem, 3vw, 2.4rem) 0 clamp(1.2rem, 2.5vw, 2rem); }
.hero.hero-compact .eyebrow { margin-bottom: 0.7rem; }
.hero.hero-compact p.lead { margin-bottom: 0; }
.hero .ctas {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}
.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.badge {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 999px;
    padding: 0.45rem 0.95rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--c-text-soft);
    display: inline-block;
    line-height: 1.4;
}

/* ---------- Grids ---------- */
.grid { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
    .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
}

/* ---------- Cards ---------- */
.card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: clamp(1.2rem, 2vw, 1.8rem);
    box-shadow: var(--shadow-sm);
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.card.hoverable:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--c-primary-soft);
}
.card h3 { margin-top: 0; }
.card .icon {
    width: 48px; height: 48px;
    background: var(--c-primary-soft);
    color: var(--c-primary-dark);
    border-radius: 14px;
    display: grid;
    place-items: center;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}
.card .icon svg { width: 24px; height: 24px; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; display: grid; gap: 1.2rem; }
.step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: border-color var(--dur) var(--ease);
}
.step:hover { border-color: var(--c-primary-soft); }
.step::before {
    counter-increment: step;
    content: counter(step);
    flex: 0 0 42px;
    width: 42px; height: 42px;
    background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dark));
    color: #fff;
    border-radius: 50%;
    display: grid; place-items: center;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

/* ---------- Forms ---------- */
.form {
    background: var(--c-surface);
    padding: clamp(1.4rem, 3vw, 2rem);
    border-radius: var(--radius-lg);
    border: 1px solid var(--c-border);
    box-shadow: var(--shadow);
}
.form .row { margin-bottom: 1.15rem; }
.form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
    color: var(--c-text);
}
.form input[type=text], .form input[type=email], .form input[type=password],
.form input[type=number], .form input[type=tel], .form input[type=date],
.form input[type=time], .form input[type=url], .form select, .form textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1.5px solid var(--c-border-strong);
    border-radius: var(--radius-sm);
    font: inherit;
    background: #fff;
    color: var(--c-text);
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.form input::placeholder, .form textarea::placeholder { color: #a4adba; }
.form input:focus, .form select:focus, .form textarea:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: var(--shadow-ring);
}
.form textarea { min-height: 110px; resize: vertical; }
.form input[type=file] { width: 100%; max-width: 100%; font-size: 0.9rem; color: var(--c-text-soft); }
.form .hint { color: var(--c-muted); font-size: 0.85rem; margin-top: 0.35rem; }

/* Champ mot de passe avec bouton afficher/masquer */
.pw-field { position: relative; }
.form .pw-field input { padding-right: 3rem; }
.pw-toggle {
    position: absolute;
    top: 0; right: 0;
    height: 100%;
    width: 3rem;
    border: 0;
    background: transparent;
    color: var(--c-muted);
    display: grid;
    place-items: center;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    transition: color var(--dur) var(--ease);
}
.pw-toggle:hover { color: var(--c-primary-dark); }
.pw-toggle .eye-off { display: none; }
.pw-toggle.is-on .eye-on { display: none; }
.pw-toggle.is-on .eye-off { display: inline-block; }

.check-list { display: grid; gap: 0.55rem; margin: 0; padding: 0; list-style: none; }
.check-list label {
    display: flex; gap: 0.7rem; align-items: flex-start;
    padding: 0.85rem 1rem;
    border: 1.5px solid var(--c-border-strong);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: #fff;
    font-weight: 500;
    transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
    line-height: 1.4;
    margin-bottom: 0;
}
.check-list label:hover { border-color: var(--c-primary); }
.check-list input { margin-top: 0.2rem; accent-color: var(--c-primary); }
.check-list label:has(input:checked) {
    border-color: var(--c-primary);
    background: var(--c-primary-soft);
    box-shadow: var(--shadow-sm);
}
/* Choix de role a l'inscription : options empilees en pleine largeur
   (une par ligne) -> pas de retour a la ligne disgracieux, puce centree. */
.check-list.role-choice { display: grid; grid-template-columns: 1fr; gap: 0.55rem; }
.check-list.role-choice label { align-items: center; }
.check-list.role-choice input { margin-top: 0; }

/* ---------- Alerts ---------- */
/* Bulle simple, sans trait vertical au debut (retour client) */
.alert {
    padding: 0.95rem 1.1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    background: var(--c-surface);
    line-height: 1.5;
}
.alert strong { font-weight: 700; }
.alert a { text-decoration: underline; }
.alert.error   { background: var(--c-error-soft);   color: var(--c-error);   border-color: var(--c-error); }
.alert.success { background: var(--c-success-soft); color: var(--c-success); border-color: var(--c-success); }
.alert.info    { background: var(--c-info-soft);    color: var(--c-info);    border-color: var(--c-info); }

/* ---------- Therapist cards ---------- */
.therapist {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    gap: 1.2rem;
    align-items: center;
    padding: 1.2rem;
    background: #fff;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.therapist:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.therapist .avatar {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
    color: #fff;
    display: grid; place-items: center;
    font-weight: 800; font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
}
.therapist h3 { margin: 0 0 0.2rem; font-size: 1.15rem; }
.therapist .meta { color: var(--c-muted); font-size: 0.9rem; }
.tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.5rem; }
.tag {
    background: var(--c-primary-soft);
    color: var(--c-primary-dark);
    border-radius: 6px;
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 500;
}
.therapist .actions { display: flex; flex-direction: column; gap: 0.4rem; }
@media (max-width: 720px) {
    .therapist { grid-template-columns: 56px 1fr; }
    .therapist .avatar { width: 56px; height: 56px; font-size: 1.25rem; }
    .therapist .actions { grid-column: 1 / -1; flex-direction: row; }
    .therapist .actions .btn { flex: 1; }
}

/* ---------- Status badges ---------- */
.status-badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.5;
    vertical-align: middle;
    white-space: nowrap;
}
.status-badge.is-pending  { background: var(--c-accent-soft);  color: var(--c-accent-dark); }
.status-badge.is-accepted { background: var(--c-success-soft); color: var(--c-success); }
.status-badge.is-info     { background: var(--c-info-soft);    color: var(--c-info); }
.status-badge.is-refused  { background: var(--c-error-soft);   color: var(--c-error); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    min-width: 600px;
}
.table th, .table td {
    text-align: left;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--c-border);
    font-size: 0.92rem;
}
.table th {
    background: var(--c-bg-alt);
    font-weight: 700;
    color: var(--c-text);
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--c-primary-soft); }

/* ---------- Footer ---------- */
.site-footer {
    background: linear-gradient(135deg, #5b21b6 0%, #4c1d95 100%);
    color: #ddd6fe;
    padding: 4rem 0 2rem;
    margin-top: 5rem;
}
.site-footer a { color: #f1ecff; }
.site-footer a:hover { color: #fff; }
.site-footer h4 {
    color: #fff;
    margin: 0 0 1rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.site-footer p { color: #c4b5fd; line-height: 1.7; }
.site-footer .grid { gap: 2.5rem; }
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    padding-top: 1.5rem;
    margin-top: 3rem;
    font-size: 0.85rem;
    color: #c4b5fd;
    text-align: center;
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.text-muted  { color: var(--c-muted); }
.mt-1 { margin-top: 0.5rem; }  .mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }  .mt-4 { margin-top: 2.5rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2.5rem; }
.hidden { display: none !important; }

/* ---------- Wizard ---------- */
.wizard-progress {
    height: 6px;
    background: var(--c-border);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 2rem;
}
.wizard-progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--c-primary), var(--c-primary-dark));
    width: 10%;
    transition: width 0.4s var(--ease-out);
}
.wizard-count {
    display: block;
    margin-bottom: 1.2rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--c-primary-dark);
    letter-spacing: 0.02em;
}
.wizard-error {
    background: var(--c-error-soft);
    color: var(--c-error);
    border-left: 4px solid var(--c-error);
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.2rem;
    font-weight: 500;
    font-size: 0.95rem;
}
.consent-box {
    display: flex; gap: 0.7rem; align-items: flex-start;
    padding: 0.95rem 1.1rem;
    border: 1.5px solid var(--c-border-strong);
    border-radius: var(--radius-sm);
    background: var(--c-primary-soft);
    cursor: pointer;
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--c-text-soft);
}
.consent-box input { margin-top: 0.2rem; accent-color: var(--c-primary); flex-shrink: 0; }
.consent-box:has(input:checked) { border-color: var(--c-primary); }
/* Sommaire du questionnaire : aller directement a une question */
.wizard-jump {
    display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
    margin: -0.6rem 0 1.4rem;
}
.wizard-jump-label {
    font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.07em; color: var(--c-muted); margin: 0;
}
.wizard-jump-select {
    flex: 1 1 220px; min-width: 0; max-width: 100%;
    min-height: 44px; padding: 0.5rem 0.9rem;
    border: 1.5px solid var(--c-border-strong); border-radius: var(--radius-sm);
    background: #fff; color: var(--c-text); font: inherit; font-size: 0.92rem;
}
.wizard-jump-select:focus { outline: none; border-color: var(--c-primary); box-shadow: var(--shadow-ring); }

/* Commandes du questionnaire : toujours a portee, meme sur les etapes longues */
.wizard-nav {
    position: sticky;
    bottom: 0;
    z-index: 20;
    display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
    margin: 1.6rem calc(-1 * clamp(1.4rem, 3vw, 2rem)) 0;
    padding: 0.85rem clamp(1.4rem, 3vw, 2rem);
    padding-bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    border-top: 1px solid var(--c-border);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: 0 -6px 20px rgba(15, 27, 39, 0.07);
}
.wizard-nav-spacer { flex: 1; }
@media (max-width: 520px) {
    .wizard-nav { gap: 0.5rem; }
    .wizard-nav-spacer { flex-basis: 100%; height: 0; }
    .wizard-nav .btn { flex: 1 1 auto; }
}

.wizard-step { animation: fadeUp 0.4s var(--ease-out) both; }
/* Questionnaire : titres d'etape plus discrets, questions homogenes et aerees */
.wizard-step h2 { font-size: 1.35rem; }
.wizard-step h3 { font-size: 1.05rem; }
.wizard-step .mt-3 { margin-top: 2rem; }

/* Champ date jj.mm.aaaa + bouton calendrier natif */
.date-field { position: relative; display: flex; align-items: center; }
.date-field input[type="text"] { flex: 1; padding-right: 2.6rem; }
.date-field-native {
    position: absolute; right: 0.6rem; bottom: 0;
    width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0;
}
.date-field-btn {
    position: absolute; right: 0.4rem;
    background: none; border: 0; font-size: 1.05rem; line-height: 1;
    padding: 0.3rem 0.35rem; border-radius: 6px; cursor: pointer;
}
.date-field-btn:hover { background: var(--c-primary-soft); }
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Emergency banner (violet, demande client) ---------- */
.emergency-banner {
    background: #f5f3ff;
    color: var(--c-primary-dark);
    border: 1px solid #ddd6fe;
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius-sm);
    text-align: left;
    font-size: 0.95rem;
    margin: 1rem 0;
}
.emergency-banner strong { font-weight: 700; }

/* ---------- FAQ accordion ---------- */
details.card {
    cursor: pointer;
    padding: 1.1rem 1.3rem;
}
details.card summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    color: var(--c-text);
}
details.card summary::-webkit-details-marker { display: none; }
details.card summary::after {
    content: '+';
    display: grid; place-items: center;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--c-primary-soft);
    color: var(--c-primary-dark);
    font-weight: 800;
    transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
details.card[open] summary::after {
    transform: rotate(45deg);
    background: var(--c-primary);
    color: #fff;
}
details.card[open] { box-shadow: var(--shadow); }
details.card p { margin-top: 0.8rem; margin-bottom: 0; color: var(--c-text-soft); }

/* ---------- CTA card ---------- */
.cta-block {
    background:
        radial-gradient(ellipse at top right, rgba(167, 139, 250, 0.35), transparent 60%),
        linear-gradient(135deg, var(--c-primary), var(--c-primary-ink));
    color: #fff;
    border-radius: var(--radius-xl);
    padding: clamp(2rem, 4vw, 3.5rem);
    position: relative;
    overflow: hidden;
}
.cta-block h2 { color: #fff; }
.cta-block p { color: rgba(255,255,255,0.85); }

/* ============================================================
   Charte graphique - composants page d'accueil
   ============================================================ */

/* Hero : texte + carte therapeute */
.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}
.hero h1 em { font-style: italic; color: var(--c-primary); }
@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-card { margin-top: 1rem; }
}

/* Carte de compatibilite therapeute (signature) */
.hero-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    position: relative;
}
.hc-head { display: flex; gap: 0.9rem; align-items: center; }
.hc-avatar {
    width: 54px; height: 54px; border-radius: 50%;
    background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
    color: #fff; display: grid; place-items: center;
    font-weight: 800; font-size: 1.2rem;
}
.hc-name { font-weight: 700; font-family: var(--font-sans); line-height: 1.2; }
.hc-role { color: var(--c-muted); font-size: 0.85rem; }
.hc-avail {
    margin-left: auto; align-self: flex-start;
    display: inline-flex; align-items: center; gap: 0.4rem;
    background: var(--c-success-soft); color: var(--c-success);
    font-size: 0.75rem; font-weight: 600; padding: 0.25rem 0.6rem; border-radius: 999px;
}
.hc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-success); }
.hc-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1.1rem 0; }
.hc-compat-label { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--c-muted); margin-bottom: 0.4rem; }
.hc-compat-label b { color: var(--c-primary-dark); font-weight: 700; }
.hc-bar { height: 8px; background: var(--c-primary-soft); border-radius: 999px; overflow: hidden; }
.hc-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--c-primary), var(--c-primary-dark)); border-radius: 999px; }
.hc-toast {
    position: absolute; right: -10px; bottom: -18px;
    background: #fff; border: 1px solid var(--c-border); border-radius: 14px;
    padding: 0.6rem 0.85rem; box-shadow: var(--shadow); display: flex; gap: 0.55rem; align-items: center;
}
.hc-toast .ok { width: 26px; height: 26px; border-radius: 50%; background: var(--c-success-soft); color: var(--c-success); display: grid; place-items: center; flex-shrink: 0; }
.hc-toast small { color: var(--c-muted); display: block; }
.hc-toast strong { font-size: 0.88rem; }

/* Stats du hero */
.hero-stats { display: flex; gap: 0.8rem; margin-top: 2.2rem; flex-wrap: wrap; }
.hero-stat {
    flex: 1 1 150px;
    position: relative;
    background: linear-gradient(160deg, #ffffff 0%, var(--c-primary-soft) 130%);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 0.95rem 1.15rem 0.95rem 1.35rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.hero-stat::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--c-accent), var(--c-primary-dark));
    border-radius: 0 4px 4px 0;
}
.hero-stat::after {
    content: '';
    position: absolute;
    right: -22px; top: -22px;
    width: 64px; height: 64px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.14), transparent 70%);
    pointer-events: none;
}
.hero-stat:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--c-accent);
}
.hero-stat .num {
    font-family: var(--font-sans);
    letter-spacing: -0.03em;
    font-size: clamp(1.6rem, 2vw + 0.9rem, 2.05rem);
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(100deg, var(--c-primary) 0%, var(--c-primary-ink) 90%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero-stat .lbl { color: var(--c-text-soft); font-size: 0.85rem; font-weight: 500; margin-top: 0.35rem; line-height: 1.35; }

/* Cartes "etapes" numerotees */
.step-num {
    width: 44px; height: 44px; border-radius: 13px;
    background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dark));
    color: #fff; display: grid; place-items: center;
    font-weight: 800; font-size: 1.15rem; margin-bottom: 1rem;
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.3);
}

/* Section sombre : cartes "fonctionnalites" */
.feature-card {
    display: flex; gap: 1rem; align-items: flex-start;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    padding: 1.1rem 1.2rem;
    transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.feature-card:hover { border-color: rgba(167, 139, 250, 0.5); background: rgba(255, 255, 255, 0.08); }
.feature-card .ic {
    flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px;
    background: rgba(139, 92, 246, 0.22); color: #c4b5fd; display: grid; place-items: center;
}
.feature-card h3 { color: #fff; font-size: 1.05rem; margin: 0 0 0.25rem; }
.feature-card p { color: rgba(255, 255, 255, 0.72); margin: 0; font-size: 0.92rem; }

/* Compatibilite affichee sur les cartes therapeute (resultats) */
.compat { margin-top: 0.55rem; max-width: 280px; }
.compat-label { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--c-muted); margin-bottom: 0.25rem; }
.compat-label b { color: var(--c-primary-dark); }
.compat-bar { height: 7px; background: var(--c-primary-soft); border-radius: 999px; overflow: hidden; }
.compat-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--c-primary), var(--c-primary-dark)); border-radius: 999px; }

/* ============================================================
   Espace app (patient & therapeute)
   ============================================================ */
.app-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.app-head h1 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.3rem); }

/* Layout sidebar (espaces patient & therapeute) */
.app-shell { display: grid; grid-template-columns: 264px 1fr; gap: clamp(1.5rem, 3vw, 2.5rem); align-items: start; }
.app-main { min-width: 0; }
.app-sidebar { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 1.4rem; }
.side-user { display: flex; gap: 0.7rem; align-items: center; background: var(--c-primary-soft); border-radius: var(--radius); padding: 0.8rem 0.9rem; }
.side-ava { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, var(--c-primary), var(--c-accent)); color: #fff; display: grid; place-items: center; font-weight: 800; flex-shrink: 0; }
.side-id { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.side-id strong { color: var(--c-text); }
.side-role { font-size: 0.8rem; color: var(--c-muted); }
.side-group { display: flex; flex-direction: column; gap: 0.2rem; }
.side-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--c-muted); font-weight: 700; padding: 0 0.6rem; margin-bottom: 0.3rem; }
.side-link { display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0.7rem; border-radius: var(--radius-sm); color: var(--c-text-soft); font-weight: 600; font-size: 0.94rem; transition: background var(--dur) var(--ease), color var(--dur) var(--ease); }
.side-link:hover { background: var(--c-primary-soft); color: var(--c-primary-dark); text-decoration: none; }
.side-link.is-active { background: var(--c-primary); color: #fff; box-shadow: var(--shadow-sm); }
.side-link.is-active:hover { color: #fff; }
.side-ic { display: inline-grid; place-items: center; color: inherit; }
.side-text { flex: 1; }
.side-badge { background: var(--c-accent); color: #fff; border-radius: 999px; min-width: 20px; height: 20px; display: inline-grid; place-items: center; font-size: 0.72rem; padding: 0 0.35rem; }
.side-link.is-active .side-badge { background: #fff; color: var(--c-primary-dark); }
@media (max-width: 900px) {
    .app-shell { grid-template-columns: 1fr; gap: 1.2rem; }
    /* La sidebar devient une barre d'onglets qui defile horizontalement.
       Chaque pastille garde sa largeur naturelle (flex: 0 0 auto) : sans cela
       les onglets se compriment et leurs libelles se chevauchent. */
    .app-sidebar {
        position: static;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: 0.5rem;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        scrollbar-width: thin;
        min-width: 0;
        /* Debordement bord a bord : le dernier onglet ne parait plus coupe */
        margin-left: calc(var(--gutter) * -1);
        margin-right: calc(var(--gutter) * -1);
        padding-left: var(--gutter);
        padding-right: var(--gutter);
        scroll-padding-left: var(--gutter);
        scroll-padding-right: var(--gutter);
    }
    .side-user { display: none; }
    .side-group {
        flex: 0 0 auto;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.4rem;
        min-width: 0;
    }
    .side-label { display: none; }
    .side-link {
        flex: 0 0 auto;
        max-width: none;
        white-space: nowrap;
        border: 1px solid var(--c-border);
        background: var(--c-surface);
    }
    .side-link.is-active { border-color: var(--c-primary); }
    .side-ic, .side-badge { flex: 0 0 auto; }
    .side-text { flex: 0 0 auto; }
}

/* Onglets */
.app-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.8rem; border-bottom: 1px solid var(--c-border); padding-bottom: 0.9rem; }
.app-tab {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.55rem 1.1rem; border-radius: 999px;
    background: var(--c-surface); border: 1px solid var(--c-border);
    color: var(--c-text-soft); font-weight: 600; font-size: 0.92rem;
    transition: all var(--dur) var(--ease);
}
.app-tab:hover { border-color: var(--c-primary); color: var(--c-primary-dark); text-decoration: none; }
.app-tab.is-active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; box-shadow: var(--shadow-sm); }
.app-tab.is-active:hover { color: #fff; }
.app-tab-badge { background: var(--c-accent); color: #fff; border-radius: 999px; min-width: 20px; height: 20px; display: inline-grid; place-items: center; font-size: 0.72rem; padding: 0 0.35rem; }
.app-tab.is-active .app-tab-badge { background: #fff; color: var(--c-primary-dark); }

/* Carte proposition therapeute */
.prop-card {
    display: flex; gap: 1.1rem; align-items: flex-start;
    background: var(--c-surface); border: 1px solid var(--c-border);
    border-radius: var(--radius); padding: 1.3rem;
    box-shadow: var(--shadow-sm); transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.prop-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.prop-avatar {
    flex: 0 0 56px; width: 56px; height: 56px; border-radius: 50%;
    background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
    color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.1rem;
}
.prop-body { flex: 1; min-width: 0; }
.prop-top { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; min-width: 0; }
.prop-top > div:first-child { min-width: 0; }
.prop-top h3 { margin: 0; font-size: 1.15rem; overflow-wrap: anywhere; }
.prop-sub { color: var(--c-muted); font-size: 0.9rem; overflow-wrap: anywhere; }
.prop-compat { text-align: center; flex-shrink: 0; }
.prop-compat-num { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: var(--c-primary); line-height: 1; }
.prop-compat-lbl { font-size: 0.7rem; color: var(--c-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.prop-meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin-top: 0.7rem; color: var(--c-text-soft); font-size: 0.88rem; }
.prop-actions { display: flex; gap: 0.5rem; margin-top: 1rem; flex-wrap: wrap; }
.prop-card .tags { margin-top: 0.6rem; }

/* Fiche therapeute (detail) */
.prof-head { display: flex; gap: 1.2rem; align-items: center; }
.prof-ava { flex: 0 0 72px; width: 72px; height: 72px; border-radius: 50%; background: linear-gradient(135deg, var(--c-primary), var(--c-accent)); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.6rem; }
.prof-meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; color: var(--c-text-soft); font-size: 0.9rem; margin-top: 0.3rem; }
@media (max-width: 560px) { .prof-head { flex-direction: column; text-align: center; } }

/* Rendez-vous */
.appt { display: flex; gap: 1rem; align-items: center; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 1rem 1.2rem; box-shadow: var(--shadow-sm); }
.appt-date { flex: 0 0 56px; text-align: center; background: var(--c-primary-soft); border-radius: var(--radius-sm); padding: 0.5rem 0; }
.appt-day { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; color: var(--c-primary-dark); line-height: 1; }
.appt-mon { display: block; font-size: 0.72rem; text-transform: uppercase; color: var(--c-primary-dark); letter-spacing: 0.05em; }
.appt-info { flex: 1; }
.appt-info strong { display: block; }
.appt-side { display: flex; flex-direction: column; align-items: flex-end; gap: 0.4rem; flex-shrink: 0; }
.btn.appt-cancel { color: var(--c-error); box-shadow: none; }
.btn.appt-cancel:hover { background: var(--c-error-soft); color: var(--c-error); }

/* ---------- Avis (affichage sur la fiche publique) ---------- */
.review-item { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-sm); padding: 0.8rem 1rem; }
.review-stars { color: #f5b301; letter-spacing: 0.12em; font-size: 1rem; }
.review-item p { margin: 0.4rem 0 0.3rem; }

/* Messagerie */
.msg-secure { color: var(--c-muted); font-size: 0.88rem; margin-bottom: 1rem; }
.msg-layout { display: grid; grid-template-columns: 240px 1fr; gap: 1rem; align-items: stretch; }
.msg-list { display: flex; flex-direction: column; gap: 0.35rem; }
.msg-list-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.8rem; border-radius: var(--radius-sm); border: 1px solid var(--c-border); background: var(--c-surface); color: var(--c-text); font-weight: 500; }
.msg-list-item:hover { border-color: var(--c-primary); text-decoration: none; }
.msg-list-item.is-active { background: var(--c-primary-soft); border-color: var(--c-primary); color: var(--c-primary-dark); }
.msg-ava { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--c-primary), var(--c-accent)); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 0.82rem; flex-shrink: 0; }
.msg-thread-wrap { display: flex; flex-direction: column; border: 1px solid var(--c-border); border-radius: var(--radius); background: var(--c-bg-alt); overflow: hidden; }
.msg-thread { display: flex; flex-direction: column; gap: 0.6rem; padding: 1.2rem; min-height: 320px; max-height: 460px; overflow-y: auto; }
.msg-bubble { max-width: 75%; padding: 0.65rem 0.9rem; border-radius: 14px; font-size: 0.92rem; line-height: 1.45; position: relative; }
.msg-bubble time { display: block; font-size: 0.68rem; opacity: 0.7; margin-top: 0.3rem; }
.msg-bubble.mine { align-self: flex-end; background: var(--c-primary); color: #fff; border-bottom-right-radius: 4px; }
.msg-bubble.theirs { align-self: flex-start; background: var(--c-surface); border: 1px solid var(--c-border); border-bottom-left-radius: 4px; }
.msg-form { display: flex; gap: 0.5rem; padding: 0.8rem; border-top: 1px solid var(--c-border); background: var(--c-surface); }
.msg-form input { flex: 1; padding: 0.7rem 1rem; border: 1.5px solid var(--c-border-strong); border-radius: 999px; font: inherit; }
.msg-form input:focus { outline: none; border-color: var(--c-primary); box-shadow: var(--shadow-ring); }
@media (max-width: 720px) {
    .msg-layout { grid-template-columns: 1fr; }
    .msg-list { flex-direction: row; overflow-x: auto; }
    .msg-list-item { white-space: nowrap; }
}

/* KPIs (espace therapeute) */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
@media (max-width: 760px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
.kpi { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow-sm); transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.kpi:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.kpi-ic { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--c-primary-soft); color: var(--c-primary-dark); margin-bottom: 0.8rem; }
.kpi-num { font-family: var(--font-display); font-weight: 800; font-size: 2rem; color: var(--c-primary-dark); line-height: 1; }
.kpi-lbl { color: var(--c-text); font-weight: 600; font-size: 0.92rem; margin-top: 0.45rem; }
.kpi-sub { color: var(--c-muted); font-size: 0.78rem; margin-top: 0.25rem; }

/* Sous-onglets (filtres) */
.subtabs { display: flex; gap: 1.2rem; border-bottom: 1px solid var(--c-border); margin-bottom: 1.2rem; }
.subtab { padding: 0.5rem 0.1rem; color: var(--c-text-soft); font-weight: 600; font-size: 0.92rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subtab:hover { color: var(--c-primary-dark); text-decoration: none; }
.subtab.is-active { color: var(--c-primary-dark); border-bottom-color: var(--c-primary); }

/* Pastilles de creneaux (calendrier therapeute) */
.slot-chip { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.45rem 0.8rem; border-radius: 999px; font-size: 0.88rem; font-weight: 600; border: 1.5px solid var(--c-border-strong); background: #fff; color: var(--c-text); cursor: pointer; transition: all var(--dur) var(--ease); }
.slot-chip.is-free:hover { border-color: var(--c-error); color: var(--c-error); background: var(--c-error-soft); }
.slot-chip.is-booked { background: var(--c-primary-soft); color: var(--c-primary-dark); border-color: var(--c-primary-soft); cursor: default; }

/* ---------- Recapitulatif du questionnaire (espace particulier) ---------- */
.qz-recap { padding: clamp(1.2rem, 2.5vw, 1.9rem); }
.qz-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem;
    padding-bottom: 1rem; margin-bottom: 0.4rem;
    border-bottom: 1px solid var(--c-border);
    font-size: 0.86rem;
}
.qz-section { padding-top: 1.4rem; }
.qz-section + .qz-section { border-top: 1px solid var(--c-border); }
.qz-section-title {
    font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--c-primary-dark); margin: 0 0 0.9rem;
}
.qz-list { margin: 0; display: grid; gap: 0.9rem; }
.qz-row { display: grid; grid-template-columns: minmax(140px, 12rem) 1fr; gap: 0.3rem 1.2rem; align-items: start; }
.qz-label { margin: 0; font-weight: 600; color: var(--c-text-soft); font-size: 0.92rem; }
.qz-value { margin: 0; color: var(--c-text); overflow-wrap: anywhere; }
.qz-value .tags { margin-top: 0; }
.qz-actions {
    display: flex; flex-wrap: wrap; gap: 0.6rem;
    margin-top: 1.6rem; padding-top: 1.4rem;
    border-top: 1px solid var(--c-border);
}
@media (max-width: 640px) {
    .qz-row { grid-template-columns: 1fr; gap: 0.2rem; }
    .qz-label { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--c-muted); }
    .qz-actions .btn { flex: 1 1 auto; }
}

/* Mois repliables dans la liste des creneaux (espace psychotherapeute) */
.slot-month { margin-bottom: 0.7rem; }
.slot-month-toggle {
    display: flex; align-items: center; gap: 0.6rem; width: 100%;
    min-height: 48px; padding: 0.7rem 1rem;
    background: var(--c-bg-alt); border: 1px solid var(--c-border);
    border-radius: var(--radius); color: var(--c-text);
    font-weight: 700; text-align: left;
    transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.slot-month-toggle:hover { border-color: var(--c-primary); background: var(--c-primary-soft); }
.slot-month-name { text-transform: capitalize; }
.slot-month-meta { font-size: 0.82rem; font-weight: 500; margin-left: auto; }
.slot-month-caret { transition: transform var(--dur) var(--ease); color: var(--c-muted); }
.slot-month-toggle[aria-expanded="true"] .slot-month-caret { transform: rotate(180deg); }
.slot-month-body { display: flex; flex-direction: column; gap: 0.6rem; padding-top: 0.6rem; }
.slot-day-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.6rem;
}
.slot-day-head .slot-day-label { margin-bottom: 0; }
.slot-day-clear { color: var(--c-error); }
.slot-day-clear:hover { background: var(--c-error-soft); color: var(--c-error); }

/* Notifications */
.notif { display: flex; gap: 0.8rem; align-items: flex-start; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-sm); padding: 0.9rem 1.1rem; }
.notif-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c-border-strong); margin-top: 0.4rem; flex-shrink: 0; }
.notif.is-new { background: var(--c-primary-soft); border-color: var(--c-primary-soft); }
.notif.is-new .notif-dot { background: var(--c-primary); }
.notif time { font-size: 0.78rem; }

/* Creneaux de reservation */
.slots { display: flex; flex-direction: column; gap: 0.9rem; }
.slot-day { border: 1px solid var(--c-border); border-radius: var(--radius); padding: 0.9rem 1rem; background: var(--c-surface); }
.slot-day-label { font-weight: 700; margin-bottom: 0.6rem; text-transform: capitalize; }

/* --- Prise de rendez-vous : navigation dans de longues listes de dates --- */
.booking-form { padding-bottom: 0; }
.slots-head {
    display: flex; flex-wrap: wrap; align-items: baseline;
    justify-content: space-between; gap: 0.35rem 1rem;
    margin: 1.6rem 0 0.75rem;
}
.slots-title { font-weight: 700; font-size: 1.02rem; }
.slots-count { font-size: 0.86rem; }

/* Puces de navigation par mois : collantes sous l'en-tete du site */
.slots-months {
    display: flex; gap: 0.4rem; flex-wrap: wrap;
    margin-bottom: 0.9rem;
}
.slots-month-chip {
    display: inline-flex; align-items: center; gap: 0.4rem;
    min-height: 40px; padding: 0.35rem 0.9rem;
    border: 1.5px solid var(--c-border-strong); border-radius: 999px;
    background: #fff; color: var(--c-text-soft);
    font-weight: 600; font-size: 0.88rem; text-transform: capitalize;
    transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.slots-month-chip:hover { border-color: var(--c-primary); color: var(--c-primary-dark); background: var(--c-primary-soft); }
.slots-month-n {
    background: var(--c-primary-soft); color: var(--c-primary-dark);
    border-radius: 999px; padding: 0 0.45rem; font-size: 0.75rem; font-weight: 700;
}
.slots-month-chip:hover .slots-month-n { background: #fff; }
.slots-month-head {
    font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--c-muted); margin: 0.6rem 0 0; scroll-margin-top: calc(var(--header-h, 64px) + 16px);
}
.slots-month-head:first-child { margin-top: 0; }
.slots-more { margin: 0.9rem 0 0; }

/* Barre d'action collante : valider sans avoir a descendre en bas de page */
.booking-bar {
    position: sticky;
    bottom: 0;
    z-index: 20;
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
    margin: 1.4rem calc(-1 * clamp(1.4rem, 3vw, 2rem)) 0;
    padding: 0.9rem clamp(1.4rem, 3vw, 2rem);
    padding-bottom: calc(0.9rem + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    border-top: 1px solid var(--c-border);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: 0 -6px 20px rgba(15, 27, 39, 0.07);
}
.booking-bar-info { flex: 1 1 220px; min-width: 0; margin: 0; line-height: 1.35; }
.booking-bar-label {
    display: block; font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.07em; color: var(--c-muted);
}
.booking-bar-info strong { color: var(--c-text); font-size: 0.98rem; overflow-wrap: anywhere; }
.booking-bar.is-empty .booking-bar-info strong { color: var(--c-muted); font-weight: 500; }
.booking-bar-btn { flex-shrink: 0; }
.booking-bar-btn[disabled] { opacity: 0.5; pointer-events: none; box-shadow: none; }
@media (max-width: 560px) {
    .booking-bar { gap: 0.6rem; }
    .booking-bar-btn { width: 100%; }
}
.slot-times { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.slot { cursor: pointer; }
.slot input { position: absolute; opacity: 0; pointer-events: none; }
.slot span {
    display: inline-block; padding: 0.5rem 0.95rem; border-radius: 999px;
    border: 1.5px solid var(--c-border-strong); font-weight: 600; font-size: 0.92rem;
    transition: all var(--dur) var(--ease);
}
.slot:hover span { border-color: var(--c-primary); color: var(--c-primary-dark); }
.slot input:checked + span { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.slot input:focus-visible + span { box-shadow: var(--shadow-ring); }

/* ---------- Animations on scroll ---------- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
    }
    .reveal.in { opacity: 1; transform: translateY(0); }
}

/* ---------- Print ---------- */
@media print {
    .site-header, .site-footer, .menu-toggle, .btn { display: none !important; }
    body { background: #fff; }
    a { color: var(--c-text); text-decoration: underline; }
}

/* ============================================================
   Retours client - nouveaux composants
   ============================================================ */

/* Hero accueil : titre sur toute la largeur, grille en dessous */
.hero-full { margin-bottom: clamp(1.2rem, 3vw, 2rem); }
.hero-full h1 { max-width: none; }

/* Vignette "Exemple illustratif" (cartes de demonstration) */
.demo-badge {
    position: absolute;
    top: -12px; left: 18px;
    background: var(--c-ink);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 0.28rem 0.75rem;
    border-radius: 999px;
    box-shadow: var(--shadow);
    z-index: 2;
}

/* Maquette flottante (mini apercu de l'espace personnel) */
.mockup {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 1.1rem 1.2rem 1.3rem;
    position: relative;
    transform: rotate(-1.4deg);
}
.mockup.tilt-r { transform: rotate(1.4deg); }
.mockup-bar { display: flex; gap: 0.35rem; margin-bottom: 0.9rem; }
.mockup-bar i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.mockup-bar i:nth-child(1) { background: #f6a5a0; }
.mockup-bar i:nth-child(2) { background: #f5d58e; }
.mockup-bar i:nth-child(3) { background: #a8dcbc; }
.mockup-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 0.7rem; color: var(--c-text); }
.mockup .notif { padding: 0.7rem 0.85rem; }
.mockup .appt { padding: 0.7rem 0.85rem; }
@media (max-width: 900px) { .mockup, .mockup.tilt-r { transform: none; } }

/* Encart "psychotherapeutes certifies" (page Comment ca marche) */
.cert-card {
    background: linear-gradient(150deg, var(--c-primary-soft) 0%, #fff 70%);
    border: 1.5px solid var(--c-primary);
}
.cert-card ul { list-style: none; padding: 0; margin: 0.8rem 0 0; display: grid; gap: 0.55rem; }
.cert-card li { display: flex; gap: 0.55rem; align-items: flex-start; color: var(--c-text-soft); }
.cert-card li::before { content: '\2713'; color: var(--c-success); font-weight: 800; flex-shrink: 0; }

/* Photos de profil (avatar image) */
.prof-ava, .prop-avatar, .msg-ava, .side-ava, .hc-avatar { overflow: hidden; }
.prof-ava img, .prop-avatar img, .msg-ava img, .side-ava img, .hc-avatar img {
    width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}

/* Fiche psychotherapeute : interlignes plus aeres */
.prof-detail p { line-height: 1.8; }
.prof-detail h2 { margin-top: 1.6em; }
.prof-detail .card { margin-bottom: 1.2rem; }

/* Calendrier mensuel (espace psychotherapeute) */
.cal { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.cal-head { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; padding: 0.8rem 1rem; border-bottom: 1px solid var(--c-border); background: var(--c-bg-alt); }
.cal-head strong { font-size: 1.02rem; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-dow { padding: 0.45rem 0.3rem; text-align: center; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--c-muted); border-bottom: 1px solid var(--c-border); }
.cal-cell { min-height: 84px; border-right: 1px solid var(--c-border); border-top: 1px solid var(--c-border); padding: 0.3rem; font-size: 0.76rem; min-width: 0; }
.cal-grid .cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell.is-out { background: var(--c-bg-alt); }
.cal-day { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-weight: 700; margin-bottom: 0.2rem; color: var(--c-text-soft); }
.cal-cell.is-out .cal-day { color: var(--c-border-strong); }
.cal-cell.is-today .cal-day { background: var(--c-primary); color: #fff; }
.cal-ev { display: block; border-radius: 6px; padding: 0.12rem 0.4rem; margin-bottom: 0.18rem; font-weight: 600; font-size: 0.7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.cal-ev:hover { text-decoration: none; filter: brightness(0.96); }
.cal-ev.ev-rdv     { background: var(--c-primary-soft); color: var(--c-primary-dark); }
.cal-ev.ev-pending { background: var(--c-accent-soft); color: var(--c-accent-dark); border: 1px dashed var(--c-accent); }
.cal-ev.ev-slot    { background: var(--c-success-soft); color: var(--c-success); }
.cal-legend { display: flex; gap: 1rem; flex-wrap: wrap; padding: 0.7rem 1rem; border-top: 1px solid var(--c-border); font-size: 0.78rem; color: var(--c-muted); }
.cal-legend .cal-ev { display: inline-block; margin: 0 0.3rem 0 0; }
.cal-more { display: none; font-size: 0.62rem; font-weight: 700; color: var(--c-muted); }
@media (max-width: 900px) and (min-width: 641px) {
    .cal-cell { min-height: 70px; }
    .cal-ev { font-size: 0.62rem; padding: 0.1rem 0.25rem; }
}
/* Sous ~640px une case fait moins de 50px : les libelles y sont illisibles.
   On les reduit a des points colores (le libelle reste accessible via le
   titre et la liste detaillee sous le calendrier). */
@media (max-width: 640px) {
    .cal-cell { min-height: 54px; padding: 0.25rem 0.2rem; }
    .cal-day { width: 20px; height: 20px; font-size: 0.72rem; }
    .cal-ev {
        display: inline-block;
        width: 8px; height: 8px;
        padding: 0; margin: 0 3px 3px 0;
        border-radius: 50%;
        overflow: hidden; text-indent: -999px;
        vertical-align: middle;
    }
    .cal-ev.ev-rdv     { background: var(--c-primary); }
    .cal-ev.ev-pending { background: var(--c-accent); border: 0; }
    .cal-ev.ev-slot    { background: var(--c-success); }
    /* .cal-day occupe le 1er rang : les 4 premieres pastilles sont donc
       les enfants 2 a 5. On masque a partir du 6e. */
    .cal-cell .cal-ev:nth-child(n+6) { display: none; }
    .cal-more { display: inline-block; vertical-align: middle; }
    /* La legende garde des pastilles lisibles */
    .cal-legend { flex-direction: column; gap: 0.35rem; }
    .cal-legend .cal-ev { width: 10px; height: 10px; margin-right: 0.4rem; }
}

/* FAQ : recherche + filtres */
.faq-tools { display: flex; gap: 0.7rem; flex-wrap: wrap; align-items: center; margin: 1.4rem 0 1.8rem; }
.faq-search { flex: 1; min-width: 230px; position: relative; }
.faq-search input {
    width: 100%;
    padding: 0.85rem 1.1rem 0.85rem 2.7rem;
    border: 1.5px solid var(--c-border-strong);
    border-radius: 999px;
    font: inherit;
    background: #fff;
}
.faq-search input:focus { outline: none; border-color: var(--c-primary); box-shadow: var(--shadow-ring); }
.faq-search svg { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--c-muted); pointer-events: none; }
.faq-filter { display: flex; gap: 0.45rem; flex-wrap: wrap; }
details.card.faq-hit { border-color: var(--c-primary); box-shadow: var(--shadow-ring); }
details.card mark { background: #fde68a; border-radius: 3px; padding: 0 0.12em; }

/* Espace app : anti-chevauchement mobile */
@media (max-width: 640px) {
    .appt { flex-wrap: wrap; }
    .appt-info { flex: 1 1 55%; min-width: 0; overflow-wrap: anywhere; }
    .appt-side { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-end; width: 100%; }
    .prop-card { flex-wrap: wrap; }
    .prop-top { flex-wrap: wrap; }
    .prop-actions .btn { flex: 1 1 auto; }
    .app-head { flex-direction: column; align-items: flex-start; }
    .subtabs { flex-wrap: wrap; gap: 0.4rem 1.1rem; }
    .form .grid.cols-2 { grid-template-columns: 1fr; }
}

/* Pages legales : memes polices que le site, titres plus discrets (retour client) */
.legal h1 { font-family: var(--font-sans); font-size: clamp(1.5rem, 2.5vw, 1.9rem); font-weight: 800; }
.legal h2 { font-family: var(--font-sans); font-size: clamp(1.1rem, 1.6vw, 1.3rem); font-weight: 700; color: var(--c-primary-dark); margin-top: 1.6em; }
.legal h3 { font-size: 1.02rem; color: var(--c-text); }
.legal p, .legal li { color: var(--c-text-soft); font-size: 0.95rem; line-height: 1.7; }

/* ============================================================
   Polish UI/UX (sans impact sur les contenus client)
   ============================================================ */

/* Ancres : ne pas passer sous le header colle */
html { scroll-padding-top: calc(var(--header-h, 64px) + 16px); }

/* Lien d'evitement (accessibilite clavier) */
.skip-link {
    position: absolute;
    top: -48px; left: 12px;
    background: var(--c-primary);
    color: #fff;
    padding: 0.6rem 1.1rem;
    border-radius: 0 0 10px 10px;
    font-weight: 600;
    z-index: 100;
    transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 0; color: #fff; text-decoration: none; }

/* Ombre du header au defilement */
.site-header { transition: box-shadow 0.25s var(--ease); }
.site-header.is-scrolled { box-shadow: 0 4px 20px rgba(15, 27, 39, 0.08); }

/* Etat de chargement des boutons (anti double-soumission) */
.btn.is-loading {
    pointer-events: none;
    opacity: 0.75;
    position: relative;
    color: transparent !important;
}
.btn.is-loading::after {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    top: calc(50% - 9px); left: calc(50% - 9px);
    border: 2.5px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btn-spin 0.7s linear infinite;
}
.btn-outline.is-loading::after, .btn-ghost.is-loading::after {
    border-color: rgba(124, 58, 237, 0.3);
    border-top-color: var(--c-primary);
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* Alertes flash : apparition douce + bouton de fermeture */
main > .container > .alert[role="alert"] {
    position: relative;
    padding-right: 2.8rem;
    animation: alert-in 0.35s var(--ease-out) both;
    transition: opacity 0.2s var(--ease);
}
@keyframes alert-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.alert-close {
    position: absolute;
    top: 50%; right: 0.6rem;
    transform: translateY(-50%);
    width: 30px; height: 30px;
    border: 0; border-radius: 50%;
    background: transparent;
    color: inherit;
    font-size: 1.25rem;
    line-height: 1;
    display: grid; place-items: center;
    opacity: 0.65;
}
.alert-close:hover { opacity: 1; background: rgba(0, 0, 0, 0.06); }

/* Accordeons : contenu qui apparait en douceur */
details.card[open] > *:not(summary) { animation: fadeUp 0.3s var(--ease-out) both; }

/* Bouton retour en haut */
.back-to-top {
    position: fixed;
    right: clamp(1rem, 3vw, 1.6rem);
    bottom: clamp(1rem, 3vw, 1.6rem);
    width: 46px; height: 46px;
    border: 1px solid var(--c-border);
    border-radius: 50%;
    background: var(--c-surface);
    color: var(--c-primary-dark);
    box-shadow: var(--shadow-lg);
    display: grid; place-items: center;
    z-index: 45;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--c-primary); color: #fff; }

/* Champs invalides apres interaction (retour visuel immediat) */
.form input:user-invalid, .form select:user-invalid, .form textarea:user-invalid {
    border-color: var(--c-error);
}

/* Valeur des echelles 0-10 mieux mise en evidence */
input[type="range"][data-scale] { height: 26px; }

/* Titres equilibres : evite les lignes orphelines (mot ou ponctuation seuls) */
h1, h2, h3, .lead { text-wrap: balance; }

/* ============================================================
   Polish visuel coherent (presentation only) - v2
   Aesthetique apaisante : profondeur douce, jamais tape-a-l'oeil
   ============================================================ */

/* --- Cartes d'etapes (accueil "Un parcours simple") --- */
.card.hoverable { position: relative; overflow: hidden; }
.card.hoverable::before {
    content: '';
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--c-accent), var(--c-primary-dark));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease-out);
}
.card.hoverable:hover::before { transform: scaleX(1); }
/* Badge numerote : reflet doux + halo au survol de la carte */
.step-num {
    position: relative;
    overflow: hidden;
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.step-num::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(150deg, rgba(255,255,255,0.35), transparent 55%);
    pointer-events: none;
}
.card.hoverable:hover .step-num {
    transform: scale(1.06) rotate(-3deg);
    box-shadow: 0 8px 22px rgba(124, 58, 237, 0.42);
}

/* --- Vignettes de fonctionnalites (section sombre) : leger relief au survol --- */
.feature-card {
    transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.feature-card:hover { transform: translateY(-2px); }
.feature-card .ic { transition: transform var(--dur) var(--ease), background var(--dur) var(--ease); }
.feature-card:hover .ic { transform: scale(1.08); background: rgba(139, 92, 246, 0.32); }

/* --- Encart certifies (page Comment ca marche) : leger relief --- */
.cert-card { box-shadow: var(--shadow); }

/* --- Cartes propositions / rendez-vous : transition d'ombre plus douce --- */
.prop-card, .appt { transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.appt:hover { box-shadow: var(--shadow); border-color: var(--c-primary-soft); }

/* --- Cohérence : les tags gagnent un contour tres leger --- */
.tag { border: 1px solid rgba(124, 58, 237, 0.12); }

/* ============================================================
   Passe responsive : rythme des marges, cibles tactiles, encoches
   ============================================================ */

/* --- 1. Gouttieres : on respecte les encoches (iPhone en paysage) --- */
.container {
    padding-left:  max(var(--gutter), env(safe-area-inset-left, 0px));
    padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

/* --- 2. Aucun mot long (email, URL, nom compose) ne deborde --- */
p, li, dd, dt, h1, h2, h3, h4, .badge, .tag, .alert, .side-id strong,
.prop-sub, .appt-info, .msg-bubble, .notif { overflow-wrap: break-word; }

/* --- 3. Rythme vertical homogene entre sections --- */
.site-footer {
    margin-top: clamp(2.5rem, 6vw, 5rem);
    padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(1.5rem, 3vw, 2rem);
    padding-bottom: calc(clamp(1.5rem, 3vw, 2rem) + env(safe-area-inset-bottom, 0px));
}
.footer-bottom { margin-top: clamp(1.8rem, 4vw, 3rem); }
.site-footer .grid { gap: clamp(1.6rem, 4vw, 2.5rem); }
/* Les espaces applicatifs n'ont pas besoin du grand rembourrage editorial */
.section.app { padding: clamp(1.6rem, 4vw, 3rem) 0 clamp(2rem, 5vw, 3.5rem); }

/* --- 4. Cibles tactiles : 44px minimum sur ecran tactile (WCAG 2.5.5) --- */
@media (pointer: coarse) {
    .btn { min-height: 44px; }
    .btn-sm { min-height: 44px; padding-top: 0.5rem; padding-bottom: 0.5rem; }
    .app-tab, .slot-chip, .slots-month-chip, .side-link,
    .msg-list-item, .faq-filter .btn { min-height: 44px; }
    .subtab { display: inline-flex; align-items: center; min-height: 44px; }
    .slot span { padding-top: 0.7rem; padding-bottom: 0.7rem; }
    .check-list label, .consent-box { min-height: 48px; align-items: center; }
    .alert-close, .date-field-btn, .pw-toggle, .menu-toggle, .back-to-top { min-width: 44px; min-height: 44px; }
    .nav-links a:not(.btn) { padding-top: 0.7rem; padding-bottom: 0.7rem; }
    .site-footer a, .footer-bottom a { display: inline-block; padding: 0.25rem 0; }
    /* Sous 16px, iOS zoome au focus et casse la mise en page */
    input, select, textarea, .wizard-jump-select, .msg-form input { font-size: max(16px, 1em); }
}

/* --- 5. Elements flottants : au-dessus de l'encoche, jamais sur une barre d'action --- */
.back-to-top { bottom: calc(clamp(1rem, 3vw, 1.6rem) + env(safe-area-inset-bottom, 0px)); }

/* --- 6. Fil de discussion : hauteur proportionnelle a l'ecran --- */
.msg-thread { min-height: min(320px, 40vh); max-height: min(460px, 60vh); }

/* --- 7. Formats de champs : liste d'options en colonnes fluides --- */
.check-list-inline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
}

/* --- 8. Ecrans etroits (<=380px) : on resserre sans jamais tronquer --- */
@media (max-width: 380px) {
    :root { --gutter: 0.9rem; }
    .btn { padding-left: 1.15rem; padding-right: 1.15rem; }
    .btn-lg { padding: 0.95rem 1.3rem; font-size: 1rem; }
    .card { padding: 1.05rem; }
    .form { padding: 1.1rem; }
    .kpi { padding: 1rem; }
    .kpi-num { font-size: 1.7rem; }
    .app-tabs { gap: 0.4rem; }
    .prop-card, .appt { padding: 1rem; }
    .booking-bar, .wizard-nav { margin-left: -1.1rem; margin-right: -1.1rem; padding-left: 1.1rem; padding-right: 1.1rem; }
}

/* --- 9. Paysage sur petit ecran : les barres collantes ne mangent pas l'ecran --- */
@media (max-height: 480px) and (orientation: landscape) {
    .booking-bar, .wizard-nav { position: static; box-shadow: none; }
    .app-sidebar { position: static; }
}


/* ============================================================
   Admin - Editeur du questionnaire d'orientation
   ============================================================ */
.qedit-step {
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 0.9rem 1.1rem 1.1rem;
    margin: 1.1rem 0 0;
    min-width: 0;
}
.qedit-step > legend {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--c-primary-ink);
    padding: 0 0.4rem;
}
.qedit-field { margin-top: 1rem; min-width: 0; }
.qedit-field > label,
.qedit-title { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 0.3rem; }
.qedit-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.2rem; }
.qedit-head .qedit-title { margin-bottom: 0; }
.qedit-field .hint,
.alert .hint { color: var(--c-muted); font-size: 0.84rem; margin: 0.15rem 0 0.5rem; }
.qedit-field input[type="text"],
.qedit-field textarea {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1.5px solid var(--c-border-strong);
    border-radius: 8px;
    font: inherit;
    font-size: 0.94rem;
    background: var(--c-surface);
    color: var(--c-text);
}
.qedit-field textarea { resize: vertical; }

.qedit-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 999px;
    padding: 0.1rem 0.55rem;
    white-space: nowrap;
}
.qedit-badge.is-free  { background: var(--c-success-soft); color: var(--c-success); }
.qedit-badge.is-keyed { background: var(--c-info-soft); color: var(--c-info); }

.qedit-rows { display: flex; flex-direction: column; gap: 0.45rem; }
.qedit-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    background: var(--c-bg-alt);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.5rem;
    min-width: 0;
}
.qedit-inputs { flex: 1; display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.qedit-move { display: flex; flex-direction: column; gap: 0.15rem; flex: 0 0 auto; }
.qedit-mini {
    width: 28px; height: 24px;
    display: inline-grid; place-items: center;
    border: 1px solid var(--c-border-strong);
    background: var(--c-surface);
    color: var(--c-text-soft);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.7rem;
    line-height: 1;
    padding: 0;
}
.qedit-mini:hover { background: var(--c-primary-soft); color: var(--c-primary-dark); border-color: var(--c-primary); }
.qedit-del { flex: 0 0 auto; height: 32px; width: 32px; font-size: 1.1rem; }
.qedit-del:hover { background: var(--c-error-soft); color: var(--c-error); border-color: var(--c-error); }
.qedit-key {
    max-width: 220px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.82rem !important;
    color: var(--c-muted) !important;
    background: var(--c-bg) !important;
}
.qedit-alert { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: var(--c-text-soft); }
.qedit-alert input { accent-color: var(--c-primary); }
.qedit-actions {
    position: sticky;
    bottom: 0;
    background: linear-gradient(to top, var(--c-surface) 65%, transparent);
    padding: 0.9rem 0 0.3rem;
    margin-top: 1rem;
}
@media (max-width: 640px) {
    .qedit-step { padding: 0.7rem 0.6rem 0.9rem; }
    .qedit-key { max-width: none; }
}
