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

/* Font Awesome — fichiers servis depuis public/fonts, utilisés par les classes
   .fa-solid / .fa-brand du pied de page. */
@font-face {
    font-family: "FontAwesomeSolid";
    src: url("/fonts/fa-solid-900.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "FontAwesomeBrands";
    src: url("/fonts/fa-brands-400.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

* { box-sizing: border-box; }

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

/* Colonne pleine hauteur : sur une page plus courte que la fenêtre, le footer
   descend au bas de l'écran au lieu de laisser du blanc sous son aplat rouge. */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--body);
    font-size: 16px;
    line-height: 1.65;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Tous les titres prennent la typo display (Anton) — surchargeable localement. */
h1, h2 {
    font-family: var(--display);
    font-weight: 400;
    line-height: 1.1;
}

::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); }

mark {
    background: var(--yellow);
    color: inherit;
    padding: 0 0.12em;
}

/* =====================================================
   Formulaires — règles génériques
   ===================================================== */
input[type="text"],
input[type="email"],
textarea,
select {
    font-family: var(--body);
    font-size: 16px;
    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,
select:focus {
    outline: 3px solid var(--yellow);
    outline-offset: 2px;
}
textarea { resize: vertical; min-height: 96px; line-height: 1.65; }
input::placeholder, textarea::placeholder { color: var(--muted); }

/* =====================================================
   Flash messages & erreurs
   ===================================================== */
.flash {
    margin: 24px 0 0 80px;
}
.flash--success {
    border-left-color: var(--ink);
    background: var(--yellow);
}

/* =====================================================
   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;
}

/* Utilitaires génériques (typographie, boutons, espacement) : voir
   typography.css / buttons.css / utilities.css, chargés juste après base.css. */

.align-center {
    margin: auto;
}

/* Conteneur des pages simples sans loi de grille (proposition de caisse). */
.page {
    max-width: 720px;
    margin: 0 auto;
    padding: 48px clamp(18px, 4vw, 48px) 80px;
    background: var(--paper);
}
.page h1 {
    font-size: clamp(34px, 6vw, 52px);
    text-transform: uppercase;
    margin: 0 0 8px;
}

/* Texte enrichi (WYSIWYG) des pages éditoriales. */
.page__content {
    margin-top: 24px;
}
.page__content > * + * {
    margin-top: 1em;
}
.page__content h1,
.page__content h2 {
    font-size: clamp(22px, 4vw, 32px);
    text-transform: uppercase;
    margin: 32px 0 12px;
}
