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

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

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

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

/* =====================================================
   Formulaires — règles génériques
   ===================================================== */
input[type="text"],
input[type="email"],
textarea,
select {
    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,
select: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;
}

/* 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 éditoriales simples (asso, fonctionnement). */
.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;
}

/* =====================================================
   Page « L’asso » : photo en colonne de gauche, texte à droite
   ===================================================== */
/* La photo occupe la colonne de gauche et reste collée au défilement ; elle
   n’est plus une image de fond plein écran. Sous 900px, tout passe en une
   seule colonne (photo au-dessus du texte). */
.asso-layout {
    display: grid;
    grid-template-columns: minmax(0, 340px) minmax(0, 720px);
    gap: clamp(24px, 4vw, 56px);
    justify-content: center;
    align-items: start;
    padding: 48px clamp(18px, 4vw, 48px) 80px;
}
.asso-layout .page {
    margin: 0;
    padding: 0;
    max-width: none;
    background: transparent;
}
.asso-layout__media {
    margin: 0;
    position: sticky;
    top: 80px;
}
.asso-layout__image {
    display: block;
    width: 100%;
    height: auto;
    border: 2px solid var(--ink);
}
@media (max-width: 900px) {
    .asso-layout {
        grid-template-columns: minmax(0, 720px);
    }
    .asso-layout__media {
        position: static;
        max-width: 420px;
        justify-self: center;
    }
}

/* =====================================================
   Image de fond plein écran, fixe (pages don, transparence, caisse)
   ===================================================== */
/* Une seule photo couvre tout l’écran et reste fixe au défilement. Les blocs
   de contenu opaques (en-tête, contenu, newsletter, pied de page) flottent
   par-dessus : la photo n’apparaît que dans les marges, comme une seule image
   continue qui encadre le contenu. */
.page-background {
    background-image: var(--page-image);
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}
.page-background--donation     { --page-image: url("/donsverses.jpg"); }
.page-background--transparency { --page-image: url("/transparence.jpg"); }
.page-background--fund         { --page-image: url("/creersacaisse.jpg"); }
.page-background--payouts      { --page-image: url("/donsverses.jpg"); }

