/* =====================================================
   choudoudou — Design System
   Palette : mauve doux, vert sauge, crème, blanc
   Principe : pas d'agressivité visuelle, pas de rouge,
   pas de notifications anxiogènes, contrastes doux
   ===================================================== */

:root {
    /* Couleurs principales */
    --mauve:      #7C3AED;
    --mauve-lt:   #A78BFA;
    --mauve-pale: #EDE9FE;
    --mauve-xlt:  #F5F3FF;

    --sage:       #059669;
    --sage-lt:    #6EE7B7;
    --sage-pale:  #D1FAE5;

    --coral:      #F97316;
    --coral-pale: #FFF7ED;

    --blue:       #0891B2;
    --blue-pale:  #E0F2FE;

    /* Neutres */
    --cream:      #FAFAF8;
    --cream-2:    #F1EFE9;
    --cream-3:    #E8E5DC;
    --white:      #FFFFFF;
    --dark:       #1C1917;
    --text:       #292524;
    --text-muted: #78716C;
    --text-light: #A8A29E;

    /* Feedback */
    --success:    #059669;
    --error:      #DC2626;
    --warning:    #D97706;

    /* Spacing */
    --radius:     14px;
    --radius-lg:  22px;
    --radius-xl:  32px;
    --shadow:     0 2px 12px rgba(28,25,23,.08);
    --shadow-lg:  0 8px 32px rgba(28,25,23,.12);
}

/* ── Reset ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--cream);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}
h1, h2, h3, h4 {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark);
}
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.75rem); }
h3 { font-size: 1.15rem; }
a  { color: var(--mauve); text-decoration: none; transition: color .2s; }
a:hover { text-decoration: underline; }
p  { line-height: 1.7; }
img { max-width: 100%; }
.hidden { display: none !important; }

/* ── Layout ─────────────────────────────────────────── */
main { flex: 1; }
.container { max-width: 1000px; margin: 0 auto; padding: 0 1.25rem; }
.container--narrow { max-width: 640px; margin: 0 auto; padding: 0 1.25rem; }

/* ── Navbar ─────────────────────────────────────────── */
.navbar {
    position: sticky; top: 0; z-index: 100;
    background: rgba(250,250,248,.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--cream-3);
    height: 60px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 1.5rem;
}
.navbar__logo {
    font-family: 'Syne', sans-serif;
    font-weight: 800; font-size: 1.2rem;
    color: var(--dark); text-decoration: none;
    display: flex; align-items: center; gap: .4rem;
    flex-shrink: 0;
}
.navbar__logo span { color: var(--mauve); }
.navbar__links { display: flex; align-items: center; gap: .5rem; }

/* Burger — caché par défaut sur desktop */
.navbar__burger {
    display: none;
    flex-direction: column; justify-content: space-between;
    width: 28px; height: 20px;
    min-width: 28px; min-height: 20px;
    background: none; border: none; cursor: pointer;
    padding: 2px; flex-shrink: 0;
    -webkit-appearance: none;
    touch-action: manipulation;
    z-index: 101;
    position: relative;
}
.navbar__burger span {
    display: block; width: 100%; height: 2.5px;
    background: #1C1917;
    border-radius: 2px;
    transition: transform .25s, opacity .25s;
    pointer-events: none;
}
.navbar__burger.open span:nth-child(1) { transform: translateY(8.75px) rotate(45deg); }
.navbar__burger.open span:nth-child(2) { opacity: 0; }
.navbar__burger.open span:nth-child(3) { transform: translateY(-8.75px) rotate(-45deg); }

/* Menu desktop */
.navbar--centered { justify-content: space-between; }
.navbar--centered .navbar__menu {
    display: flex; align-items: center;
    gap: 0; flex: 1;
    justify-content: space-between;
    margin-left: 1.5rem;
}
.navbar__menu { display: flex; align-items: center; gap: .5rem; }
.nav-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px;
    background: var(--mauve); color: white;
    border-radius: 50%; font-size: .65rem; font-weight: 700;
    position: absolute; top: -4px; right: -4px;
}
.nav-icon-btn {
    position: relative; padding: .4rem .5rem;
    border-radius: 10px; color: var(--text-muted);
    text-decoration: none; font-size: 1.1rem;
    transition: background .15s, color .15s;
}
.nav-icon-btn:hover { background: var(--cream-2); color: var(--dark); text-decoration: none; }

/* Clairière — bouton central */
.nav-foret-btn {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 1px;
    background: var(--mauve); color: white;
    border-radius: 14px; padding: .35rem .85rem;
    text-decoration: none;
    transition: transform .15s, box-shadow .15s, background .15s;
    box-shadow: 0 3px 14px rgba(124,58,237,.3);
    min-width: 64px; flex-shrink: 0;
}
.nav-foret-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 18px rgba(124,58,237,.45);
    background: #6D28D9; text-decoration: none; color: white;
}
.nav-foret-ico { font-size: 1.25rem; line-height: 1; }
.nav-foret-lbl { font-size: .6rem; font-weight: 700; letter-spacing: .04em; line-height: 1; opacity: .9; }
body.page-foret .nav-foret-btn { background: #5B21B6; box-shadow: 0 4px 16px rgba(124,58,237,.5); }
.nav-group { display: flex; align-items: center; gap: .25rem; }

/* ── Boutons ────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    padding: .65rem 1.4rem;
    border-radius: 50px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600; font-size: .92rem;
    border: none; cursor: pointer;
    text-decoration: none;
    transition: all .2s;
    white-space: nowrap;
}
.btn--primary {
    background: var(--mauve); color: white;
    box-shadow: 0 4px 14px rgba(124,58,237,.3);
}
.btn--primary:hover {
    background: #6D28D9; transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(124,58,237,.4);
    color: white; text-decoration: none;
}
.btn--ghost {
    background: transparent; color: var(--text);
    border: 1.5px solid var(--cream-3);
}
.btn--ghost:hover { border-color: var(--mauve); color: var(--mauve); text-decoration: none; }
.btn--soft {
    background: var(--mauve-pale); color: var(--mauve);
    border: none;
}
.btn--soft:hover { background: var(--mauve-pale); color: #6D28D9; text-decoration: none; }
.btn--sage {
    background: var(--sage-pale); color: var(--sage);
}
.btn--sage:hover { background: var(--sage-lt); color: var(--sage); text-decoration: none; }
.btn--danger { background: #FEE2E2; color: var(--error); border: none; }
.btn--danger:hover { background: #FECACA; text-decoration: none; }
.btn--full { width: 100%; }
.btn--sm { padding: .4rem .9rem; font-size: .82rem; }
.btn--lg { padding: .85rem 2rem; font-size: 1rem; }
.btn:disabled { opacity: .5; cursor: default; transform: none !important; }

/* ── Cartes ─────────────────────────────────────────── */
.card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--cream-2);
}
.card--mauve { background: var(--mauve-xlt); border-color: var(--mauve-pale); }
.card--sage  { background: #F0FDF4; border-color: var(--sage-pale); }

/* ── Formulaires ────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: .35rem; }
.form-group label {
    font-size: .85rem; font-weight: 600; color: var(--text);
}
.form-group input,
.form-group textarea,
.form-group select {
    padding: .7rem 1rem;
    border: 1.5px solid var(--cream-3);
    border-radius: var(--radius);
    font-family: 'DM Sans', sans-serif;
    font-size: .95rem;
    background: white;
    color: var(--text);
    transition: border-color .2s, box-shadow .2s;
    width: 100%;
    outline: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--mauve);
    box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}
.form-group textarea { resize: vertical; min-height: 90px; }
.form-hint { font-size: .78rem; color: var(--text-muted); margin-top: .2rem; }

/* ── Toggle chips ───────────────────────────────────── */
.chips {
    display: flex; flex-wrap: wrap; gap: .4rem;
    margin-top: .3rem;
}
.chip-input { display: none; }
.chip-label {
    padding: .35rem .85rem;
    border-radius: 50px;
    border: 1.5px solid var(--cream-3);
    font-size: .82rem;
    cursor: pointer;
    transition: all .15s;
    user-select: none;
    background: white;
    color: var(--text-muted);
}
.chip-input:checked + .chip-label {
    background: var(--mauve-pale);
    border-color: var(--mauve);
    color: var(--mauve);
    font-weight: 600;
}

/* ── Slider énergie ─────────────────────────────────── */
.energy-slider { display: flex; align-items: center; gap: .75rem; }
.energy-slider input[type="range"] {
    flex: 1; -webkit-appearance: none; appearance: none;
    height: 6px; border-radius: 50px;
    background: linear-gradient(to right, var(--mauve) 0%, var(--mauve) var(--fill, 60%), var(--cream-3) var(--fill, 60%), var(--cream-3) 100%);
    outline: none; cursor: pointer;
}
.energy-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--mauve);
    box-shadow: 0 1px 6px rgba(124,58,237,.4);
    cursor: pointer;
}
.energy-dots {
    display: flex; gap: .3rem; align-items: center;
}
.energy-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--cream-3);
    transition: background .2s, transform .2s;
}
.energy-dot.active { background: var(--mauve); transform: scale(1.2); }

/* ── Auth pages ─────────────────────────────────────── */
.auth-section {
    flex: 1; display: flex; align-items: center; justify-content: center;
    padding: 2.5rem 1rem;
    background: radial-gradient(ellipse at 30% 20%, rgba(124,58,237,.06) 0%, transparent 60%);
}
.auth-card {
    background: white; border-radius: var(--radius-xl);
    padding: 2.5rem; width: 100%; max-width: 440px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--cream-2);
}
.auth-card__header { text-align: center; margin-bottom: 2rem; }
.auth-icon { font-size: 2.5rem; margin-bottom: .75rem; }
.auth-card__header h1 { font-size: 1.6rem; margin-bottom: .4rem; }
.auth-card__header p { color: var(--text-muted); font-size: .9rem; }
.auth-form { display: flex; flex-direction: column; gap: 1.1rem; }
.auth-footer { text-align: center; margin-top: 1.5rem; color: var(--text-muted); font-size: .88rem; }

/* ── Captcha ────────────────────────────────────────── */
.captcha-wrap { display: flex; align-items: center; gap: .75rem; }
.captcha-question {
    font-family: 'Syne', sans-serif; font-weight: 800;
    font-size: 1.25rem; letter-spacing: .05em;
    background: var(--mauve-xlt); color: var(--mauve);
    padding: .45rem 1rem; border-radius: 10px;
    white-space: nowrap; flex-shrink: 0;
}
.captcha-wrap input {
    width: 90px; text-align: center;
    font-family: 'Syne', sans-serif; font-weight: 700;
    font-size: 1.1rem;
}
.captcha-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ── RGPD Consentement ──────────────────────────────── */
.rgpd-consent {
    background: var(--mauve-xlt);
    border: 1.5px solid var(--mauve-pale);
    border-radius: var(--radius);
    padding: .85rem 1rem;
}
.rgpd-consent label {
    display: flex; align-items: flex-start; gap: .65rem;
    font-size: .83rem; line-height: 1.5; cursor: pointer; color: var(--text);
}
.rgpd-consent input[type="checkbox"] {
    width: 17px; height: 17px; flex-shrink: 0;
    margin-top: 2px; accent-color: var(--mauve); cursor: pointer;
}

/* ── Flash messages ─────────────────────────────────── */
.flash {
    padding: .8rem 1rem; border-radius: var(--radius);
    margin-bottom: 1rem; font-size: .88rem; font-weight: 500;
    animation: slideIn .25s ease;
}
.flash--success { background: var(--sage-pale); color: #065F46; border-left: 3px solid var(--sage); }
.flash--error   { background: #FEE2E2; color: #991B1B; border-left: 3px solid var(--error); }
.flash--info    { background: var(--mauve-xlt); color: #5B21B6; border-left: 3px solid var(--mauve); }
@keyframes slideIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:none; } }

/* ── Alerte ─────────────────────────────────────────── */
.alert { padding: .75rem 1rem; border-radius: 10px; margin-bottom: 1rem; font-size: .88rem; }
.alert--error { background: #FEE2E2; color: #991B1B; }

/* ── Badge compatibilité ────────────────────────────── */
.compat-badge {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .3rem .75rem; border-radius: 50px;
    font-size: .78rem; font-weight: 600;
    background: var(--mauve-pale); color: var(--mauve);
}

/* ── Carte profil (découverte) ──────────────────────── */
.profile-card {
    background: white; border-radius: var(--radius-xl);
    padding: 1.75rem; box-shadow: var(--shadow-lg);
    border: 1px solid var(--cream-2);
    transition: transform .2s, box-shadow .2s;
}
.profile-card:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(28,25,23,.14); }
.profile-card__avatar {
    font-size: 3rem; text-align: center;
    width: 72px; height: 72px; border-radius: 50%;
    background: var(--mauve-xlt);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1rem;
}
.profile-card__name { font-size: 1.25rem; font-weight: 700; margin-bottom: .2rem; }
.profile-card__bio  { color: var(--text-muted); font-size: .88rem; line-height: 1.6; margin-bottom: 1rem; }

/* ── Indicateur énergie ─────────────────────────────── */
.energy-indicator {
    display: flex; align-items: center; gap: .35rem;
    font-size: .8rem; color: var(--text-muted);
}
.energy-bar {
    display: flex; gap: 2px;
}
.energy-bar__seg {
    width: 8px; height: 10px; border-radius: 2px;
    background: var(--cream-3);
    transition: background .3s;
}
.energy-bar__seg.on { background: var(--mauve); }

/* ── Tags (sensibilités, besoins) ───────────────────── */
.tag-list { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .4rem; }
.tag {
    padding: .2rem .65rem; border-radius: 50px;
    font-size: .75rem; font-weight: 500;
    background: var(--cream-2); color: var(--text-muted);
}
.tag--mauve { background: var(--mauve-pale); color: var(--mauve); }
.tag--sage  { background: var(--sage-pale);  color: var(--sage); }
.tag--blue  { background: var(--blue-pale);  color: var(--blue); }

/* ── Messagerie ─────────────────────────────────────── */
.inbox { max-width: 680px; margin: 0 auto; padding: 1.5rem 1.25rem; }
.inbox__item {
    display: flex; align-items: center; gap: 1rem;
    padding: 1rem 1.25rem;
    background: white; border-radius: var(--radius);
    border: 1px solid var(--cream-2);
    margin-bottom: .5rem;
    cursor: pointer;
    transition: box-shadow .15s, border-color .15s;
    text-decoration: none; color: var(--text);
}
.inbox__item:hover { border-color: var(--mauve-pale); box-shadow: var(--shadow); text-decoration: none; }
.inbox__item--unread { border-left: 3px solid var(--mauve); }
.inbox__avatar {
    font-size: 1.6rem; width: 48px; height: 48px;
    background: var(--mauve-xlt); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.inbox__name { font-weight: 600; font-size: .95rem; }
.inbox__preview { font-size: .83rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.inbox__time  { font-size: .72rem; color: var(--text-light); flex-shrink: 0; }
.inbox__unread-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--mauve); flex-shrink: 0;
}

/* ── Conversation ───────────────────────────────────── */
.conv-wrap { max-width: 680px; margin: 0 auto; display: flex; flex-direction: column; height: calc(100vh - 60px); }
.conv-header {
    padding: 1rem 1.25rem;
    background: white; border-bottom: 1px solid var(--cream-2);
    display: flex; align-items: center; gap: .75rem;
    flex-shrink: 0;
}
.conv-header__avatar { font-size: 1.4rem; width: 40px; height: 40px; background: var(--mauve-xlt); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.conv-header__name { font-weight: 700; font-size: .95rem; }
.conv-header__status { font-size: .75rem; color: var(--text-muted); }
.conv-header__actions { margin-left: auto; display: flex; gap: .4rem; }

.conv-messages {
    flex: 1; overflow-y: auto;
    padding: 1.25rem;
    display: flex; flex-direction: column; gap: .6rem;
    background: var(--cream);
}
.conv-messages::-webkit-scrollbar { width: 4px; }
.conv-messages::-webkit-scrollbar-thumb { background: var(--cream-3); border-radius: 2px; }

.msg-bubble {
    max-width: 72%; padding: .65rem .95rem;
    border-radius: 18px;
    font-size: .9rem; line-height: 1.55;
    word-break: break-word;
}
.msg-bubble--mine {
    background: var(--mauve); color: white;
    border-bottom-right-radius: 4px;
    align-self: flex-end;
}
.msg-bubble--other {
    background: white; color: var(--text);
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 4px rgba(28,25,23,.08);
    align-self: flex-start;
}
.msg-meta { font-size: .68rem; color: var(--text-light); margin-top: .2rem; }
.msg-mine  .msg-meta { text-align: right; }

.msg-group { display: flex; flex-direction: column; }
.msg-group--mine  { align-items: flex-end; }
.msg-group--other { align-items: flex-start; }

/* Zone de saisie */
.conv-input-bar {
    padding: .85rem 1.25rem;
    background: white; border-top: 1px solid var(--cream-2);
    display: flex; align-items: flex-end; gap: .6rem;
    flex-shrink: 0;
}
.conv-input {
    flex: 1; padding: .65rem 1rem;
    border: 1.5px solid var(--cream-3);
    border-radius: 20px;
    font-family: 'DM Sans', sans-serif; font-size: .9rem;
    resize: none; outline: none; max-height: 120px;
    transition: border-color .2s;
    line-height: 1.5;
}
.conv-input:focus { border-color: var(--mauve); }
.conv-send-btn {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--mauve); color: white; border: none;
    cursor: pointer; font-size: 1rem; flex-shrink: 0;
    transition: background .2s, transform .15s;
    display: flex; align-items: center; justify-content: center;
}
.conv-send-btn:hover { background: #6D28D9; transform: scale(1.05); }

/* ── Bandeau mode pause ─────────────────────────────── */
.pause-banner {
    background: var(--coral-pale);
    border: 1px solid #FED7AA;
    border-radius: var(--radius); padding: .75rem 1rem;
    display: flex; align-items: center; gap: .6rem;
    font-size: .85rem; color: #92400E; margin: 1rem 0;
}

/* ── Statut d'énergie (messagerie) ──────────────────── */
.energy-status {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .2rem .65rem; border-radius: 50px;
    font-size: .72rem; font-weight: 500;
    background: var(--mauve-xlt); color: var(--mauve);
}

/* ── Dashboard ──────────────────────────────────────── */
.dashboard { padding: 2rem 1.25rem; max-width: 900px; margin: 0 auto; }
.dashboard__greeting { margin-bottom: 2rem; }
.dashboard__greeting h1 { font-size: 1.6rem; }
.dashboard__greeting p { color: var(--text-muted); }

.dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

/* ── Page profil setup ──────────────────────────────── */
.setup-wrap { max-width: 600px; margin: 0 auto; padding: 2rem 1.25rem; }
.setup-steps {
    display: flex; gap: .35rem; margin-bottom: 2rem;
}
.setup-step {
    flex: 1; height: 4px; border-radius: 2px;
    background: var(--cream-3);
    transition: background .3s;
}
.setup-step.done    { background: var(--sage); }
.setup-step.active  { background: var(--mauve); }

/* ── Page landing ───────────────────────────────────── */
.hero {
    padding: 4rem 1.25rem 5rem;
    text-align: center;
    background: radial-gradient(ellipse at 50% 0%, rgba(124,58,237,.07) 0%, transparent 65%);
}
.hero__emoji { font-size: 3.5rem; margin-bottom: 1.25rem; }
.hero__title { margin-bottom: 1rem; }
.hero__title em { color: var(--mauve); font-style: normal; }
.hero__subtitle { color: var(--text-muted); font-size: 1.05rem; max-width: 520px; margin: 0 auto 2rem; line-height: 1.75; }
.hero__cta { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

.features { padding: 3.5rem 1.25rem; background: white; }
.features__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    max-width: 900px; margin: 0 auto;
}
.feature-card {
    padding: 1.5rem; border-radius: var(--radius-lg);
    background: var(--cream); border: 1px solid var(--cream-2);
}
.feature-card__icon { font-size: 1.75rem; margin-bottom: .75rem; }
.feature-card h3 { font-size: 1rem; margin-bottom: .5rem; }
.feature-card p { font-size: .88rem; color: var(--text-muted); line-height: 1.65; }

/* ── Footer ─────────────────────────────────────────── */
.footer {
    padding: 1.5rem;
    text-align: center;
    border-top: 1px solid var(--cream-2);
    font-size: .8rem; color: var(--text-muted);
}
.footer__links { display: flex; justify-content: center; gap: 1rem; margin-bottom: .5rem; flex-wrap: wrap; }
.footer__links a { color: var(--text-muted); transition: color .2s; }
.footer__links a:hover { color: var(--mauve); text-decoration: none; }

/* ── Cookie banner ──────────────────────────────────── */
.cookie-banner {
    position: fixed; bottom: 1rem; left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 2rem); max-width: 680px;
    background: var(--dark); color: rgba(255,255,255,.85);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    box-shadow: 0 8px 32px rgba(0,0,0,.25);
    z-index: 9999; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.cookie-banner__text { flex: 1; font-size: .83rem; line-height: 1.5; }
.cookie-banner a { color: var(--mauve-lt); }
.cookie-btn {
    padding: .45rem 1rem; border-radius: 50px;
    font-size: .83rem; font-weight: 600; cursor: pointer;
    white-space: nowrap; text-decoration: none;
}
.cookie-btn--accept { background: var(--mauve); color: white; border: none; }
.cookie-btn--accept:hover { background: #6D28D9; }

/* ── Errors ─────────────────────────────────────────── */
.error-page { text-align: center; padding: 5rem 1.25rem; }
.error-page h1 { font-size: 5rem; color: var(--mauve); }
.error-page p { color: var(--text-muted); margin: 1rem 0 2rem; }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 768px) {
    /* ── Burger visible sur mobile ── */
    .navbar__burger { display: flex !important; width: 28px; height: 20px; }

    /* ── Menu : caché par défaut, overlay absolu quand ouvert ── */
    .navbar__menu,
    .navbar--centered .navbar__menu {
        display: none !important;
        position: fixed; top: 60px; left: 0; right: 0;
        background: var(--cream);
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
        border-bottom: 1.5px solid var(--cream-3);
        padding: 1rem 1.25rem 1.5rem;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: .5rem;
        box-shadow: 0 8px 32px rgba(28,25,23,.12);
        z-index: 200;
        margin-left: 0 !important;
        flex: none !important;
    }
    .navbar__menu.open,
    .navbar--centered .navbar__menu.open {
        display: flex !important;
    }

    /* ── Groupes d'icônes en rangée centrée ── */
    .nav-group {
        display: flex; justify-content: center;
        flex-wrap: wrap; gap: .4rem;
        padding: .5rem 0;
        border-bottom: 1px solid var(--cream-3);
    }
    .nav-group--right { border-bottom: none; padding-bottom: 0; }

    /* ── Bouton Clairière en pleine largeur ── */
    .nav-foret-btn {
        flex-direction: row !important;
        gap: .6rem; padding: .7rem 1.25rem;
        border-radius: 14px;
        justify-content: center;
        margin: .35rem 0;
        min-width: 0;
    }
    .nav-foret-ico { font-size: 1.1rem; }
    .nav-foret-lbl { font-size: .82rem; }

    /* ── Reste ── */
    .dash-grid { grid-template-columns: 1fr; }
    .hero { padding: 3rem 1.25rem 4rem; }
    .conv-wrap { height: calc(100dvh - 60px); }
    .msg-bubble { max-width: 85%; }
    .auth-card { padding: 1.75rem 1.25rem; }
}


@media (max-width: 480px) {
    .hero__emoji { font-size: 2.5rem; }
    .features__grid { grid-template-columns: 1fr; }
    .inbox__preview { max-width: 160px; }
    .cookie-banner { bottom: 0; left: 0; transform: none; width: 100%; border-radius: var(--radius) var(--radius) 0 0; }
}

/* ── Animations ─────────────────────────────────────── */
@keyframes pulse { 0%,100%{box-shadow:0 4px 14px rgba(124,58,237,.3);} 50%{box-shadow:0 4px 28px rgba(124,58,237,.55);} }
.pulse { animation: pulse 2.5s infinite; }
@keyframes fadeIn { from{opacity:0;transform:translateY(8px);} to{opacity:1;transform:none;} }
.fade-in { animation: fadeIn .3s ease; }

/* ── Input toggle password ──────────────────────────── */
.input-with-toggle { position: relative; }
.input-with-toggle input { padding-right: 2.75rem; }
.toggle-password {
    position: absolute; right: .75rem; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; color: var(--text-muted);
    font-size: .9rem; padding: 0;
}

/* ── Force password strength bar ────────────────────── */
.pwd-strength-bar {
    height: 3px; border-radius: 2px;
    background: var(--cream-3);
    overflow: hidden; margin-top: 5px;
}
.pwd-strength-bar__fill { height: 100%; border-radius: 2px; transition: width .25s, background .25s; }

/* ── Améliorations dashboard ──────────────────────── */
.dashboard__greeting {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    border: 1px solid var(--cream-2);
    box-shadow: var(--shadow);
}

/* ── Inbox vide ───────────────────────────────────── */
.inbox-empty {
    text-align: center;
    padding: 3rem 1.5rem;
}

/* ── Setup profil : panel visible/caché ──────────── */
.setup-step-panel { margin-bottom: 1rem; }
.setup-step-panel.hidden { display: none; }

/* ── Discover : aucune suggestion ────────────────── */
.discover-empty {
    text-align: center;
    padding: 3rem 1.5rem;
}

/* ── Match list : connexion item ─────────────────── */
.match-item {
    display: flex;
    align-items: center;
    gap: .9rem;
    background: white;
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    border: 1px solid var(--cream-2);
    margin-bottom: .5rem;
    text-decoration: none;
    color: var(--text);
    transition: box-shadow .15s, border-color .15s;
}
.match-item:hover {
    border-color: var(--mauve-pale);
    box-shadow: var(--shadow);
    text-decoration: none;
}

/* ── Profil card tags ─────────────────────────────── */
.profile-section-label {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    margin-bottom: .4rem;
    font-weight: 600;
}

/* ── Responsive dashboard ─────────────────────────── */
@media (max-width: 600px) {
    .dashboard {
        padding: 1.25rem 1rem;
    }
    .dashboard__greeting {
        padding: 1.25rem;
    }
    .dashboard__greeting h1 {
        font-size: 1.3rem;
    }
    .dash-grid {
        gap: .75rem;
    }
}


/* ══════════════════════════════════════════════════
   MODE SOMBRE
   Activé par .dark-mode sur <html> OU préférence OS
   ══════════════════════════════════════════════════ */
:root {
    --dm-bg:      #1A1614;
    --dm-bg2:     #211D1B;
    --dm-bg3:     #2A2522;
    --dm-border:  #3A3330;
    --dm-text:    #F5F3EF;
    --dm-muted:   #A8A29E;
    --dm-light:   #78716C;
}

/* Application du mode sombre via classe */
html.dark-mode {
    --cream:      var(--dm-bg);
    --cream-2:    var(--dm-bg2);
    --cream-3:    var(--dm-bg3);
    --white:      var(--dm-bg2);
    --text:       var(--dm-text);
    --text-muted: var(--dm-muted);
    --text-light: var(--dm-light);
    --shadow:     0 2px 12px rgba(0,0,0,.35);
    --shadow-lg:  0 8px 32px rgba(0,0,0,.5);
    background:   var(--dm-bg);
    color:        var(--dm-text);
}

html.dark-mode .card {
    background: var(--dm-bg2);
    border-color: var(--dm-border);
}

html.dark-mode .navbar {
    background: rgba(26,22,20,.95);
    border-bottom-color: var(--dm-border);
}

html.dark-mode .btn--ghost {
    border-color: var(--dm-border);
    color: var(--dm-muted);
}
html.dark-mode .btn--ghost:hover {
    border-color: var(--mauve);
    color: var(--mauve);
}

html.dark-mode .form-input,
html.dark-mode input[type="text"],
html.dark-mode input[type="email"],
html.dark-mode input[type="password"],
html.dark-mode textarea,
html.dark-mode select {
    background: var(--dm-bg3);
    border-color: var(--dm-border);
    color: var(--dm-text);
}

html.dark-mode .conv-messages {
    background: var(--dm-bg);
}

html.dark-mode .msg-bubble--mine {
    background: #4C1D95;
    color: #EDE9FE;
}

html.dark-mode .msg-bubble--other {
    background: var(--dm-bg3);
    color: var(--dm-text);
    border-color: var(--dm-border);
}

html.dark-mode .conv-header,
html.dark-mode .conv-input-bar {
    background: var(--dm-bg2);
    border-color: var(--dm-border);
}

html.dark-mode .flash,
html.dark-mode .pause-banner {
    background: var(--dm-bg3);
    border-color: var(--dm-border);
}

/* Préférence OS automatique */
@media (prefers-color-scheme: dark) {
    html:not(.light-mode) {
        --cream:      var(--dm-bg);
        --cream-2:    var(--dm-bg2);
        --cream-3:    var(--dm-bg3);
        --white:      var(--dm-bg2);
        --text:       var(--dm-text);
        --text-muted: var(--dm-muted);
        --text-light: var(--dm-light);
        --shadow:     0 2px 12px rgba(0,0,0,.35);
        --shadow-lg:  0 8px 32px rgba(0,0,0,.5);
        background:   var(--dm-bg);
        color:        var(--dm-text);
    }
    html:not(.light-mode) .card {
        background: var(--dm-bg2);
        border-color: var(--dm-border);
    }
    html:not(.light-mode) .navbar {
        background: rgba(26,22,20,.95);
        border-bottom-color: var(--dm-border);
    }
    html:not(.light-mode) .msg-bubble--mine {
        background: #4C1D95;
        color: #EDE9FE;
    }
    html:not(.light-mode) .msg-bubble--other {
        background: var(--dm-bg3);
        color: var(--dm-text);
        border-color: var(--dm-border);
    }
    html:not(.light-mode) .conv-messages,
    html:not(.light-mode) .conv-header,
    html:not(.light-mode) .conv-input-bar {
        background: var(--dm-bg2);
        border-color: var(--dm-border);
    }
    html:not(.light-mode) .btn--ghost {
        border-color: var(--dm-border);
        color: var(--dm-muted);
    }
    html:not(.light-mode) .form-input,
    html:not(.light-mode) input,
    html:not(.light-mode) textarea,
    html:not(.light-mode) select {
        background: var(--dm-bg3);
        border-color: var(--dm-border);
        color: var(--dm-text);
    }
}

/* Bouton toggle mode sombre */
.dark-toggle {
    background: none;
    border: 1.5px solid var(--cream-3);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: .9rem;
    transition: all .2s;
    flex-shrink: 0;
}
.dark-toggle:hover {
    border-color: var(--mauve);
    transform: rotate(20deg);
}

/* ── Indicateur "en train d'écrire" ─────────────────────── */
.typing-dots {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.typing-dots span {
    width: 5px;
    height: 5px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typing-bounce .9s ease-in-out infinite;
}
.typing-dots span:nth-child(2) { animation-delay: .15s; }
.typing-dots span:nth-child(3) { animation-delay: .30s; }
@keyframes typing-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: .4; }
    30%           { transform: translateY(-4px); opacity: 1; }
}
