/*
 * Charte Boni pour les pages web (documents légaux, suppression de compte) : mêmes couleurs,
 * même typographie et mêmes formes que l'application, en clair comme en sombre. L'app ouvre
 * ces pages avec ?theme=light|dark pour suivre son propre réglage d'apparence.
 */
@font-face {
    font-family: 'Quicksand';
    src: url('/assets/quicksand.ttf') format('truetype');
    font-weight: 300 700;
    font-display: swap;
}

:root {
    --bg: #FFFCF8;
    --surface: #F7F0E5;
    --card: #FFFFFF;
    --text: #11181C;
    --muted: #7A6852;
    --divider: #EADFCF;
    --carrot: #EC6637;
    --carrot-button: #D04514;
    --carrot-text: #BD3E12;
    --carrot-tint: #FDE6DC;
    --mint-tint: #E2EFE6;
    --mint-text: #3D7057;
    --error-tint: #FDECEA;
    --error: #B3261E;
    --logo: url('/assets/logo.png');
}

:root[data-theme="dark"] {
    --bg: #333332;
    --surface: #2C2C2E;
    --card: #3D3D3B;
    --text: #ECEDEE;
    --muted: #A8A29A;
    --divider: #444444;
    --carrot-text: #F18D6A;
    --carrot-tint: #4A3A33;
    --mint-tint: #2E3D34;
    --mint-text: #8FCBA8;
    --error-tint: #4A2C2A;
    --error: #F28B82;
    --logo: url('/assets/logo-light.png');
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #333332;
        --surface: #2C2C2E;
        --card: #3D3D3B;
        --text: #ECEDEE;
        --muted: #A8A29A;
        --divider: #444444;
        --carrot-text: #F18D6A;
        --carrot-tint: #4A3A33;
        --mint-tint: #2E3D34;
        --mint-text: #8FCBA8;
        --error-tint: #4A2C2A;
        --error: #F28B82;
        --logo: url('/assets/logo-light.png');
    }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

.page {
    max-width: 720px;
    margin: 0 auto;
    padding: 28px 20px 56px;
}

.brand {
    display: block;
    width: 72px;
    height: 57px;
    background: var(--logo) center / contain no-repeat;
    margin-bottom: 20px;
}

h1, h2, h3 {
    font-family: 'Quicksand', -apple-system, sans-serif;
    font-weight: 700;
    letter-spacing: -0.3px;
    line-height: 1.25;
}

h1 { font-size: 30px; margin: 0 0 6px; }

h2 {
    font-size: 20px;
    margin: 36px 0 10px;
    padding-top: 24px;
    border-top: 1px solid var(--divider);
}

h3 { font-size: 16px; margin: 22px 0 6px; color: var(--carrot-text); }

p, li { color: var(--text); }

ul { padding-left: 20px; }
li { margin-bottom: 8px; }
li::marker { color: var(--carrot); }

strong { font-weight: 650; }

a { color: var(--carrot-text); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

.date {
    display: inline-block;
    margin: 0 0 24px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--carrot-tint);
    color: var(--carrot-text);
    font-size: 13px;
    font-weight: 600;
}

/* Encadré d'attention (règles de la communauté…) */
.warning, .alert {
    background: var(--carrot-tint);
    border-radius: 16px;
    padding: 16px 18px;
    margin: 18px 0;
}
.warning p:first-child, .alert p:first-child { margin-top: 0; }
.warning p:last-child, .alert p:last-child { margin-bottom: 0; }

/* Formulaire de suppression de compte */
.card {
    background: var(--card);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(74, 59, 42, 0.08);
}
.card h1 { font-size: 26px; }

label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 8px; }

input[type="email"], input[type="password"] {
    width: 100%;
    height: 54px;
    padding: 0 16px;
    margin-bottom: 16px;
    border: 1.5px solid var(--divider);
    border-radius: 16px;
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    outline: none;
}
input:focus { border-color: var(--carrot); box-shadow: 0 0 0 4px rgba(236, 102, 55, 0.15); }

button {
    width: 100%;
    height: 56px;
    border: none;
    border-radius: 28px;
    background: var(--carrot-button);
    color: #FFFFFF;
    font-family: 'Quicksand', -apple-system, sans-serif;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(236, 102, 55, 0.3);
}
button:disabled { opacity: 0.6; cursor: wait; }

.note { font-size: 13px; color: var(--muted); text-align: center; margin-top: 20px; }

.success, .error { display: none; padding: 12px 16px; border-radius: 14px; margin-bottom: 16px; font-weight: 600; }
.success { background: var(--mint-tint); color: var(--mint-text); text-align: center; }
.error { background: var(--error-tint); color: var(--error); }

/* ===== Site boni-app.fr : en-tête, pied de page, accueil ===== */
.site-header {
    max-width: 960px;
    margin: 0 auto;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.site-header .home-link { display: block; width: 56px; height: 44px; background: var(--logo) center / contain no-repeat; }
.site-header nav { display: flex; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
.site-header nav a { font-weight: 600; text-decoration: none; color: var(--muted); font-size: 15px; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--carrot-text); }

.site-footer {
    border-top: 1px solid var(--divider);
    margin-top: 48px;
    padding: 24px 20px 40px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}
.site-footer nav { display: flex; gap: 8px 20px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.site-footer a { color: var(--muted); font-weight: 600; }

.page .brand + h1 { margin-top: 0; }

.hero {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 20px 8px;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 32px;
    align-items: center;
}
.hero h1 { font-size: clamp(34px, 6vw, 52px); margin: 0 0 14px; }
.hero h1 span { color: var(--carrot); }
.hero .lead { font-size: 18px; color: var(--muted); margin: 0 0 24px; max-width: 34em; }
.hero img { width: 100%; max-width: 360px; height: auto; justify-self: center; }

.badges { display: flex; flex-wrap: wrap; gap: 12px; }
.badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 28px;
    background: var(--carrot-button);
    color: #FFFFFF;
    font-family: 'Quicksand', -apple-system, sans-serif;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(236, 102, 55, 0.3);
}
.badge.soon { background: var(--surface); color: var(--muted); box-shadow: none; cursor: default; }
.badge small { display: block; font-size: 11px; font-weight: 600; opacity: 0.85; line-height: 1.1; }
.badge strong { display: block; font-size: 16px; line-height: 1.2; }

.features {
    max-width: 960px;
    margin: 40px auto 0;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.feature { background: var(--card); border-radius: 24px; padding: 22px; box-shadow: 0 4px 16px rgba(74, 59, 42, 0.08); }
.feature h2 { font-size: 18px; margin: 0 0 8px; padding: 0; border: none; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

.placeholder { background: var(--carrot-tint); color: var(--carrot-text); font-weight: 700; padding: 0 4px; border-radius: 4px; }

@media (max-width: 760px) {
    /* Sur téléphone, les liens légaux restent dans le pied de page */
    .site-header nav a:not(:last-child) { display: none; }
    .hero { grid-template-columns: 1fr; text-align: center; }
    .hero .lead { margin-left: auto; margin-right: auto; }
    .hero img { max-width: 220px; grid-row: 1; }
    .badges { justify-content: center; }
    .features { grid-template-columns: 1fr; }
}
