/* TROCOZY — feuille de style du site vitrine
 *
 * Transcription web de 06_design/DESIGN_SYSTEM.md. Les valeurs des §2 (couleurs)
 * et §4 (rayons) sont reprises telles quelles ; le §11 (interdits) s'applique
 * intégralement — pas de glassmorphism étendu, pas de couleur vive hors accents,
 * pas de dégradé arc-en-ciel, pas de « pli montagne ».
 *
 * ── Trois écarts assumés, chacun pour une raison ─────────────────────────────
 *
 * 1. LES ÉTATS AU SURVOL. Le §7 les note « web only, non utilisé iOS » et ne
 *    les définit pas. Ils le sont ici : élévation et bordure éclaircie, jamais
 *    un changement de couleur d'accent — les accents portent une information
 *    (vert = sain, bleu = wallets, violet = règles), les faire bouger au survol
 *    leur ferait dire n'importe quoi.
 *
 * 2. LA LARGEUR. Le §4 raisonne en 390 px de téléphone. Le web ajoute une
 *    grille et des points de rupture. Les rayons et les espacements internes,
 *    eux, ne changent pas.
 *
 * 3. LA PILE DE POLICES. `-apple-system` seul laisse Windows et Android sans
 *    rien. Un repli est ajouté derrière, dans le même registre neutre.
 *
 * ── Ce que ce fichier n'appelle jamais ───────────────────────────────────────
 *
 * Aucune ressource externe : pas de police distante, pas d'image hébergée
 * ailleurs, pas de script tiers. Un site qui promet le zero-knowledge et charge
 * une police depuis un serveur publicitaire se contredit dans son propre code
 * source, et la politique de sécurité de `_headers` interdit d'ailleurs toute
 * connexion sortante.
 */

/* ══════════════════ Tokens — DESIGN_SYSTEM.md §2 ══════════════════ */

:root {
    /* Titane (cartes, surfaces principales) */
    --titane-1: #5a6478;
    --titane-2: #353a4a;
    --titane-3: #1d212c;
    --titane-4: #14171f;

    /* Accents fonctionnels */
    --accent-ok: #4ade80;
    --accent-blue: #5b8def;
    --accent-violet: #a78bfa;

    /* Texte (4 tiers) */
    --text-1: #fff;
    --text-2: rgba(255, 255, 255, 0.65);
    --text-3: rgba(255, 255, 255, 0.45);
    --text-4: rgba(255, 255, 255, 0.38);

    /* Lignes & fonds */
    --line: rgba(255, 255, 255, 0.10);
    --row-bg: rgba(255, 255, 255, 0.04);

    /* Urgence (palette ember dédiée) */
    --ember-1: #7f1d1d;
    --ember-2: #b91c1c;
    --ember-text: #fca5a5;

    /* Rayons — §4, système à 5 valeurs */
    --r-card: 22px;
    --r-cta: 16px;
    --r-row: 14px;
    --r-ic: 9px;
    --r-chip: 999px;

    /* Rythme vertical du site (le §4 ne couvre que l'intérieur des écrans) */
    --pas: 8px;
    --largeur: 1120px;
    --largeur-texte: 68ch;

    --police: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
              Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ══════════════════ Socle ══════════════════ */

*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    background: #000;
    color: var(--text-2);
    font-family: var(--police);
    font-size: clamp(0.9375rem, 0.4vw + 0.875rem, 1.0625rem);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img, svg { max-width: 100%; }

a { color: var(--text-1); text-decoration-color: var(--text-3); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--text-1); }

/* Le focus clavier doit se voir sur fond noir : blanc franc, jamais un accent. */
:focus-visible {
    outline: 2px solid var(--text-1);
    outline-offset: 3px;
    border-radius: 4px;
}

/* §8 : chaque animation a un rôle. Celles d'ici en ont peu, et toutes se coupent. */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ══════════════════ Typographie — §3 ══════════════════
 *
 * Les tailles du §3 sont le socle mobile ; elles grandissent avec la largeur,
 * comme `@ScaledMetric` les fait grandir avec le réglage système sur iOS
 * (§13, écart déjà assumé côté Swift). La pyramide et le ratio de 1,5× entre
 * deux niveaux successifs sont conservés.
 */

h1, h2, h3 {
    color: var(--text-1);
    font-weight: 700;
    line-height: 1.15;
    margin: 0;
    text-wrap: balance;
}

h1 { font-size: clamp(2.125rem, 5.2vw, 3.75rem); letter-spacing: -1.5px; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.125rem); letter-spacing: -0.7px; }
h3 { font-size: clamp(1.0625rem, 1.1vw, 1.1875rem); letter-spacing: -0.3px; font-weight: 600; }

p { margin: 0 0 calc(var(--pas) * 2); max-width: var(--largeur-texte); }
p:last-child { margin-bottom: 0; }

strong { color: var(--text-1); font-weight: 600; }

.eyebrow {
    color: var(--text-3);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin: 0 0 calc(var(--pas) * 1.5);
}

.chapo {
    color: var(--text-2);
    font-size: clamp(1.0625rem, 1.3vw, 1.25rem);
    line-height: 1.55;
}

.mention { color: var(--text-3); font-size: 0.8125rem; line-height: 1.55; }
.micro { color: var(--text-4); font-size: 0.75rem; line-height: 1.5; }

/* ══════════════════ Mise en page ══════════════════ */

.large {
    width: 100%;
    max-width: var(--largeur);
    margin-inline: auto;
    padding-inline: clamp(20px, 4vw, 40px);
}

section { padding-block: clamp(56px, 8vw, 104px); }
section + section { border-top: 1px solid var(--line); }

.tete-de-section { margin-bottom: clamp(28px, 4vw, 44px); }
.tete-de-section p { color: var(--text-2); }

.grille {
    display: grid;
    gap: clamp(14px, 1.6vw, 18px);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}
.grille.duo { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }

/* ══════════════════ Carte titane — §5.2 ══════════════════ */

.carte {
    position: relative;
    overflow: hidden;
    padding: clamp(20px, 2.4vw, 28px);
    border-radius: var(--r-card);
    background:
        radial-gradient(ellipse 380px 220px at 25% -5%, rgba(180, 200, 225, 0.20) 0%, transparent 65%),
        radial-gradient(ellipse 320px 180px at 95% 105%, rgba(100, 120, 160, 0.16) 0%, transparent 70%),
        linear-gradient(150deg, var(--titane-1) 0%, var(--titane-2) 45%, var(--titane-3) 80%, var(--titane-4) 100%);
    box-shadow:
        0 18px 48px rgba(0, 0, 0, 0.5),
        0 1px 0 rgba(255, 255, 255, 0.07) inset;
}

/* Les deux pseudo-éléments de profondeur que le §5.2 demande d'ajouter. */
.carte::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 40%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent);
    pointer-events: none;
}
.carte::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 30%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.28), transparent);
    pointer-events: none;
}
.carte > * { position: relative; }

/* Bloc sobre, pour les listes et les sections qui ne sont pas des héros. */
.bloc {
    padding: clamp(18px, 2.2vw, 24px);
    border: 1px solid var(--line);
    border-radius: var(--r-row);
    background: var(--row-bg);
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.bloc h3 { margin-bottom: calc(var(--pas)); }

/* Écart n°1 : le survol élève et éclaircit la bordure. Jamais un accent. */
@media (hover: hover) {
    .bloc:hover { border-color: rgba(255, 255, 255, 0.22); transform: translateY(-2px); }
}

/* ══════════════════ Pastilles et icônes — §5.4, §5.5 ══════════════════ */

.pastille {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--r-chip);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.pastille.neutre {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid var(--line);
    color: var(--text-1);
    letter-spacing: 0.8px;
    font-weight: 700;
}
.pastille.stable { background: rgba(74, 222, 128, 0.14); color: var(--accent-ok); }
.pastille.stable::before {
    content: "";
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent-ok);
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.8);
    animation: pulse-ok 2.5s ease-in-out infinite;
}

@keyframes pulse-ok {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

/* Le carré d'icône des rangées : trois variantes, une par accent (§5.5). */
.ic {
    display: grid;
    place-items: center;
    width: 34px; height: 34px;
    flex: 0 0 34px;
    border-radius: var(--r-ic);
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-1);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
}
.ic.verte   { color: var(--accent-ok);     background: rgba(74, 222, 128, 0.12); border-color: rgba(74, 222, 128, 0.28); }
.ic.bleue   { color: var(--accent-blue);   background: rgba(91, 141, 239, 0.12); border-color: rgba(91, 141, 239, 0.28); }
.ic.violette{ color: var(--accent-violet); background: rgba(167, 139, 250, 0.12); border-color: rgba(167, 139, 250, 0.28); }
.ic.ember   { color: var(--ember-text);    background: rgba(185, 28, 28, 0.16);  border-color: rgba(220, 38, 38, 0.34); }

/* ══════════════════ Rangées et listes ══════════════════ */

.liste { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--pas); }

.rangee {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--r-row);
    background: var(--row-bg);
}
.rangee .titre { color: var(--text-1); font-weight: 600; font-size: 0.9375rem; letter-spacing: -0.2px; }
/* La largeur de lecture vaut aussi hors des <p> : sur un écran large, une
 * rangée pleine largeur donne des lignes de 150 caractères, illisibles. */
.rangee .sous { color: var(--text-3); font-size: 0.8125rem; margin-top: 2px; max-width: var(--largeur-texte); }

/* Liste à puces sobre, sans marqueur de navigateur. */
.puces { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.puces li { position: relative; padding-left: 22px; color: var(--text-2); max-width: var(--largeur-texte); }
.puces li::before {
    content: "";
    position: absolute;
    left: 4px; top: 0.62em;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--text-4);
}
.puces.oui li::before { background: var(--accent-ok); box-shadow: 0 0 8px rgba(74, 222, 128, 0.45); }
.puces.non li::before {
    background: none;
    left: 2px; top: 0.34em;
    width: 11px; height: 2px;
    border-radius: 1px;
    background: var(--ember-text);
}

/* ══════════════════ En-tête ══════════════════
 *
 * ⚠️ Le fond opaque n'est pas décoratif. Le piège n°46 du projet est né d'une
 * barre de navigation SANS fond : le contenu défilé se lisait par-dessus
 * l'heure et par-dessus le titre, sur l'app, pendant trois phases. Une barre
 * collante sans fond répète exactement la même faute sur le web.
 */

.entete {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(0, 0, 0, 0.94);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border-bottom: 1px solid var(--line);
}
.entete .large {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 60px;
    padding-block: 10px;
}

.marque {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--text-1);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 1.6px;
    font-size: 0.9375rem;
}
.marque img { width: 30px; height: 30px; }

.nav-langue { display: flex; align-items: center; gap: 4px; font-size: 0.8125rem; }
.nav-langue a, .nav-langue span {
    display: inline-block;
    padding: 7px 11px;               /* cible confortable, jamais une hauteur figée */
    border-radius: var(--r-ic);
    text-decoration: none;
    color: var(--text-3);
}
.nav-langue a:hover { color: var(--text-1); background: var(--row-bg); }
.nav-langue [aria-current] { color: var(--text-1); background: var(--row-bg); font-weight: 600; }

/* ══════════════════ Hero ══════════════════ */

.hero { padding-block: clamp(64px, 11vw, 132px); text-align: center; }
.hero .large { display: grid; justify-items: center; gap: clamp(18px, 2.4vw, 26px); }
.hero p { margin-inline: auto; }

.hero-symbole {
    width: clamp(84px, 12vw, 116px);
    height: clamp(84px, 12vw, 116px);
    filter: drop-shadow(0 8px 30px rgba(180, 200, 225, 0.18));
}

.hero h1 { max-width: 16ch; }

/* La lueur du fond : une seule, très basse, jamais une couleur vive (§11). */
.hero {
    background:
        radial-gradient(ellipse 900px 420px at 50% -10%, rgba(90, 100, 120, 0.30) 0%, transparent 70%);
}

/* ══════════════════ Le chiffre du problème ══════════════════ */

.chiffre {
    color: var(--text-1);
    font-size: clamp(2.5rem, 6vw, 4.25rem);
    font-weight: 700;
    letter-spacing: -2px;
    line-height: 1;
    display: block;
}

/* ══════════════════ Étapes numérotées ══════════════════ */

.etapes { counter-reset: etape; }
.etapes .bloc { position: relative; padding-top: calc(var(--pas) * 4); }
.etapes .bloc::before {
    counter-increment: etape;
    content: counter(etape);
    position: absolute;
    top: 18px; left: clamp(18px, 2.2vw, 24px);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: var(--text-4);
}

/* ══════════════════ Offres ══════════════════ */

.offre { display: flex; flex-direction: column; gap: 14px; height: 100%; }
.offre .quotas {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    padding-block: 12px;
    border-block: 1px solid var(--line);
}
.offre .quotas span {
    color: var(--text-3);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}
/* ⚠️ Le séparateur appartient au quota qui PRÉCÈDE, jamais à celui qui suit.
 * Posé en `::before` sur le suivant, il se retrouve seul en début de ligne dès
 * que la carte se resserre — « · 1 code de détresse » commençait une ligne. */
.offre .quotas span:not(:last-child)::after { content: " ·"; color: var(--text-4); }
.offre .cible { color: var(--text-3); font-size: 0.8125rem; margin-top: auto; padding-top: 4px; }

/* La carte titane sert à distinguer l'offre du milieu, pas à crier. */
.offre-mise-en-avant { border: 1px solid rgba(255, 255, 255, 0.16); }

/* ══════════════════ FAQ ══════════════════ */

.question {
    border: 1px solid var(--line);
    border-radius: var(--r-row);
    background: var(--row-bg);
    padding: 0;
    overflow: hidden;
}
.question + .question { margin-top: var(--pas); }
.question > summary {
    cursor: pointer;
    padding: 16px 18px;
    color: var(--text-1);
    font-weight: 600;
    font-size: 0.9688rem;
    letter-spacing: -0.2px;
    list-style: none;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.question > summary::-webkit-details-marker { display: none; }
.question > summary::after {
    content: "+";
    margin-left: auto;
    color: var(--text-3);
    font-size: 1.1875rem;
    line-height: 1;
    flex: 0 0 auto;
}
.question[open] > summary::after { content: "–"; }
.question > summary:hover { background: rgba(255, 255, 255, 0.03); }
.question .reponse { padding: 0 18px 18px; }
.question .reponse > :first-child { margin-top: 0; }

/* ══════════════════ Pied de page ══════════════════ */

.pied {
    border-top: 1px solid var(--line);
    padding-block: clamp(36px, 5vw, 56px);
    color: var(--text-3);
}
.pied .large { display: grid; gap: 18px; }
.pied .rang {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.pied a { color: var(--text-2); }

/* Bandeau de statut : le site ne doit jamais laisser croire que l'app est
 * téléchargeable. Le piège n°44 du projet est né d'un libellé qui affirmait
 * plus que ce que la mesure disait. */
.statut {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border: 1px solid var(--line);
    border-radius: var(--r-chip);
    background: var(--row-bg);
    color: var(--text-2);
    font-size: 0.8125rem;
    font-weight: 500;
}
.statut::before {
    content: "";
    width: 7px; height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: var(--accent-blue);
    box-shadow: 0 0 9px rgba(91, 141, 239, 0.7);
}

/* ══════════════════ Utilitaires ══════════════════ */

/* ⚠️ Aucun style n'est écrit dans les pages elles-mêmes. La politique de
 * sécurité de `_headers` n'autorise ni script ni style en ligne : un attribut
 * `style=` oublié dans un fichier HTML ne s'appliquerait tout simplement pas,
 * et le défaut serait invisible en local où aucune politique ne s'applique.
 * Tout écart de mise en page passe donc par une classe d'ici. */

.centre { text-align: center; }
.centre p, .centre .chapo { margin-inline: auto; }

.detache { margin-top: 18px; }
.lien-suite { margin-top: 22px; }
.bloc .ic + h3 { margin-top: 12px; }
.pied .micro { margin: 0; }

.saut-au-contenu {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--text-1);
    color: #000;
    padding: 12px 18px;
    border-radius: var(--r-ic);
    font-weight: 600;
    z-index: 50;
}
.saut-au-contenu:focus { left: 12px; top: 12px; }

.visuellement-cache {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
