/* =====================================================
   Caisse de solidarité — 10 ans = 10 questions
   Charte : rouge solidarité / jaune / noir / blanc
   Direction : moderne, militant, typographie condensée
   ===================================================== */

:root {
    --red:        #E30613;
    --red-deep:   #B70510;
    --red-wash:   #FEEBED;
    --yellow:     #FFCD00;
    --yellow-deep:#E8B900;
    --ink:        #1A1A1A;
    --ink-soft:   #4A4A4A;
    --muted:      #8A8A8A;
    --paper:      #FFFFFF;
    --surface:    #FAFAF7;
    --border:     #E8E5DF;
    --border-strong: #1A1A1A;

    --display: "Anton", "Arial Narrow", Impact, sans-serif;
    --body:    "Archivo", system-ui, -apple-system, sans-serif;
    --mono:    "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--body);
    font-size: 17px;
    line-height: 1.55;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection { background: var(--red); color: var(--paper); }

a { color: var(--red); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--ink); }

/* =====================================================
   Formulaires — règles génériques
   ===================================================== */
input[type="text"],
input[type="email"],
textarea {
    font-family: var(--body);
    font-size: 17px;
    color: var(--ink);
    background: var(--surface);
    border: 1.5px solid var(--border);
    padding: 12px 14px;
    width: 100%;
    outline: none;
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
    border-radius: 2px;
}
input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    border-color: var(--red);
    background: var(--paper);
    box-shadow: 0 0 0 4px var(--red-wash);
}
textarea { resize: vertical; min-height: 96px; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: var(--muted); }

/* =====================================================
   Flash messages & erreurs
   ===================================================== */
.flash {
    margin: 24px 0 0;
    padding: 14px 18px;
    border-left: 4px solid var(--red);
    background: var(--red-wash);
    font-weight: 500;
    color: var(--ink);
    border-radius: 2px;
}
.flash--success {
    border-left-color: var(--ink);
    background: var(--yellow);
}

.errors {
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
    color: var(--red);
    font-weight: 600;
}

/* =====================================================
   Animations & accessibilité
   ===================================================== */
@keyframes rise {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

/* =====================================================
   Primitives partagées (a11y, ancres)
   ===================================================== */
html { scroll-padding-top: 96px; }

.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 100;
    background: var(--ink);
    color: var(--paper);
    padding: 10px 16px;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    transition: top 160ms ease;
}
.skip-link:focus { top: 12px; color: var(--paper); }

.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0; border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
