/* TrustiScore : feuille de style commune (refonte 2026-10).
   Aucune ressource externe : polices du système, pas de CDN.
   Les pages définissent leurs propres compositions par-dessus ces bases. */

/* Palette « Ciel & encre bleue » : la même que l'application Trusti (mode clair uniquement). */
:root {
    --paper: #E9F0F6;        /* fond bleu-gris */
    --paper-2: #FFFFFF;      /* cartes et bandeaux */
    --ink: #1B2A3A;
    --ink-2: #44546A;
    --line: #DCE8EF;
    --line-strong: #B8C8D5;
    --nuit: #1F3A5F;         /* bleu nuit : boutons, pied de page */
    --azur: #3B82C4;
    --accent: #2F6BA5;       /* azur assombri : liens et accents lisibles sur fond clair */
    --on-accent: #FFFFFF;
    --foot-bg: #1F3A5F;
    --foot-fg: #F4F8FB;
    --warn-bg: #FFF4DB;
    --warn-line: #C98A12;
    --warn-ink: #5C3D00;
    --radius: 14px;
    --radius-lg: 24px;
    --shadow: 0 2px 12px rgba(31, 58, 95, 0.10);

    /* Notes A à E : couleurs exactes de l'application. */
    --ga: #006837;  --ga-ink: #FFFFFF;
    --gb: #8dc63f;  --gb-ink: #1B2A3A;
    --gc: #fbb03b;  --gc-ink: #1B2A3A;
    --gd: #f7931e;  --gd-ink: #1B2A3A;
    --ge: #c1272d;  --ge-ink: #FFFFFF;

    --serif: Nunito, ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, Roboto, sans-serif;
    --sans: Nunito, ui-rounded, "Segoe UI", system-ui, Roboto, sans-serif;
    --gutter: clamp(16px, 4vw, 40px);
    color-scheme: light;
}

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

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

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 1.0625rem;
    line-height: 1.6;
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
}

img { max-width: 100%; height: auto; }

a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
    border-radius: 2px;
}

strong { font-weight: 700; }

.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 200;
    background: var(--paper);
    color: var(--ink);
    padding: 0.7rem 1.2rem;
    border: 2px solid var(--ink);
    font-weight: 600;
    text-decoration: none;
}
.skip-link:focus { top: 0.5rem; }

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

/* ---------- Boutons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: var(--radius);
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: 1.5px solid transparent;
}
.btn-primary { background: var(--nuit); color: var(--on-accent); }
.btn-primary:hover { filter: brightness(1.12); }
.btn-ghost { border-color: var(--nuit); color: var(--nuit); background: var(--paper-2); }
.btn-ghost:hover { background: #F4F8FB; }

/* ---------- Pied de page commun ---------- */

footer {
    background: var(--foot-bg);
    color: var(--foot-fg);
    padding: 40px max(var(--gutter), calc((100% - 1120px) / 2));
    margin-top: 0;
}
body:not(.home) footer { padding-inline: max(var(--gutter), calc((100% - 760px) / 2)); }
footer p { font-size: 0.9375rem; opacity: 0.9; margin: 0.4rem 0 0; max-width: 70ch; }
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 24px;
    margin-bottom: 12px;
}
.footer-links a {
    color: var(--foot-fg);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

/* ---------- Pages d'information (confidentialité, mentions légales) ---------- */

body:not(.home) header {
    max-width: 760px;
    margin: 0 auto;
    padding: 28px var(--gutter) 8px;
}
body:not(.home) header img {
    display: block;
    height: 56px;
    width: auto;
    border-radius: 10px;
    margin-bottom: 28px;
}
body:not(.home) header h1 {
    font-family: var(--serif);
    font-weight: 700;
    font-size: clamp(2rem, 1.2rem + 3.6vw, 3.25rem);
    line-height: 1.08;
    letter-spacing: -0.01em;
    text-wrap: balance;
}
body:not(.home) header p {
    margin-top: 14px;
    color: var(--ink-2);
    max-width: 56ch;
}
.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-top: 14px;
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}
.nav-link:hover { text-decoration: underline; }

body:not(.home) main {
    max-width: 760px;
    margin: 0 auto;
    padding: 24px var(--gutter) 72px;
}
body:not(.home) main section {
    background: var(--paper-2);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 16px;
}
body:not(.home) main h2 {
    font-family: var(--serif);
    font-size: 1.5rem;
    line-height: 1.2;
    margin-bottom: 14px;
}
body:not(.home) main h3 { font-family: var(--serif); font-size: 1.15rem; margin: 22px 0 8px; }
body:not(.home) main p { margin-bottom: 14px; max-width: 66ch; }
body:not(.home) main p:last-child { margin-bottom: 0; }
body:not(.home) main ul,
body:not(.home) main ol { margin: 0 0 14px 1.25rem; max-width: 66ch; }
body:not(.home) main li { margin-bottom: 8px; }
body:not(.home) main dt { font-weight: 700; margin-top: 14px; }
body:not(.home) main dd { margin-left: 0; max-width: 66ch; }
body:not(.home) main code {
    font-family: ui-monospace, "SF Mono", Consolas, monospace;
    font-size: 0.9em;
    background: var(--paper-2);
    padding: 1px 6px;
    border-radius: 3px;
}

mark {
    background: var(--warn-bg);
    color: var(--warn-ink);
    border-bottom: 2px solid var(--warn-line);
    padding: 0 4px;
    font-weight: 600;
}

.good,
.todo {
    padding: 16px 18px;
    margin-bottom: 20px;
    border-radius: var(--radius);
    font-size: 1rem;
}
.good { background: #F4F8FB; border-top: 3px solid var(--ga); }
.todo { background: var(--warn-bg); color: var(--warn-ink); border: 1.5px dashed var(--warn-line); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

@media print {
    .skip-link { display: none; }
}
