/* Site public Asgard Factory — appliqué depuis la charte graphique (brand/docs/charte-graphique.md).
   Jetons repris de brand/tokens/tokens.css ; polices auto-hébergées (fonts.css). */
:root {
    --pierre: #F7F4EE;
    --surface-raised: #FFFFFF;
    --givre: #DCE7EE;
    --line: #E2DDD3;
    --nuit: #121A2B;
    --ink-muted: #5A6475;
    --forge: #E8552B;
    --forge-ink: #B23A15;
    --on-forge: #121A2B;
    --or: #F2B33D;
    --or-ink: #8A5A00;
    --fjord: #2C6E9B;
    --on-fjord: #FFFFFF;
    --ground-inverse: #121A2B;
    --ground-inverse-2: #22304A;
    --ink-inverse: #F7F4EE;
    --ink-inverse-muted: #A3ACBA;
    --success: #2E7D4F;
    --danger: #B42318;
    --focus-ring: #2C6E9B;
    --plate: #121A2B;
    --font-display: "Archivo", "Archivo Black", system-ui, sans-serif;
    --font-sans: "DM Sans", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, monospace;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --shadow-plate: 4px 4px 0 0 var(--plate);
}
@media (prefers-color-scheme: dark) {
    :root {
        --pierre: #0E1522;
        --surface-raised: #172033;
        --givre: #1E2B40;
        --line: #26324A;
        --nuit: #F3EFE7;
        --ink-muted: #A3ACBA;
        --forge: #FF6A3D;
        --forge-ink: #FF8A63;
        --on-forge: #0E1522;
        --or: #F5C25B;
        --or-ink: #F5C25B;
        --fjord: #7FB3DD;
        --on-fjord: #0E1522;
        --ground-inverse: #172033;
        --ground-inverse-2: #22304A;
        --ink-inverse: #F3EFE7;
        --success: #6BC38F;
        --danger: #FF8A80;
        --focus-ring: #7FB3DD;
        --plate: #000000;
    }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--pierre); color: var(--nuit); font-family: var(--font-sans); font-size: 16px; line-height: 24px; -webkit-font-smoothing: antialiased; }
a { color: var(--forge-ink); }
a:hover { color: var(--nuit); }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; border-radius: var(--radius-sm); }
img { max-width: 100%; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.mono { font-family: var(--font-mono); font-weight: 500; }
.muted { color: var(--ink-muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Échelle typographique de la charte */
.label { font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--forge-ink); }
h1, .display-xl { margin: 0; font-family: var(--font-display); font-weight: 900; font-size: clamp(2.75rem, 5vw, 4.25rem); line-height: 1; letter-spacing: -.025em; }
h2, .display-l { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1.09; letter-spacing: -.015em; }
h3 { margin: 0; font-size: 20px; line-height: 28px; font-weight: 700; }
.title { font-family: var(--font-display); font-weight: 900; font-size: 32px; line-height: 36px; }
.lead { margin: 0; font-size: 19px; line-height: 30px; color: var(--ink-muted); max-width: 540px; }
p { margin: 0; }

/* Boutons : hauteur fixe, bordure nuit, « plaque » réservée à l'élément mis en avant */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: var(--radius-md); border: 2px solid var(--nuit); background: var(--surface-raised); color: var(--nuit); font: inherit; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; transition: transform .1s ease, box-shadow .1s ease; }
.btn:hover { color: var(--nuit); }
.btn-forge { background: var(--forge); color: var(--on-forge); }
.btn-plate { box-shadow: var(--shadow-plate); }
.btn-plate:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 0 var(--plate); }
.btn-plate:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 0 var(--plate); }
.btn-lg { height: 56px; padding: 0 28px; font-size: 17px; }
.btn-ghost { border-color: transparent; background: transparent; padding: 0 12px; }
.btn-night { background: var(--nuit); color: var(--pierre); border-color: var(--nuit); }
.btn-night:hover { color: var(--pierre); }
.btn-block { width: 100%; }

/* Étiquettes */
.tag { display: inline-flex; align-self: flex-start; font-size: 12px; line-height: 16px; font-weight: 700; padding: 4px 10px; border-radius: var(--radius-sm); }
.tag-or { background: var(--or); color: #121A2B; }
.tag-forge { background: var(--forge); color: var(--on-forge); }
.tag-fjord { background: var(--fjord); color: var(--on-fjord); }
.tag-neutral { background: var(--givre); color: var(--nuit); }

/* En-tête */
.site-header { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); background: var(--pierre); }
.site-header .container { padding-top: 16px; padding-bottom: 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.site-header .logo { display: flex; }
.site-header .logo img { height: 44px; width: auto; }
.main-nav { display: flex; flex-wrap: wrap; gap: 28px; font-size: 15px; font-weight: 500; }
.main-nav a { color: var(--nuit); text-decoration: none; }
.main-nav a:hover { color: var(--forge-ink); }
.header-actions { display: flex; gap: 12px; align-items: center; }

/* Héros */
.hero { padding: 80px 0 96px; }
.hero .container { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.hero-copy { flex: 1 1 460px; display: flex; flex-direction: column; gap: 24px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; padding-top: 8px; }
.checks { display: flex; flex-wrap: wrap; gap: 20px; font-size: 14px; color: var(--ink-muted); padding-top: 4px; }
.checks span { display: inline-flex; gap: 8px; align-items: center; }
.checks svg { color: var(--success); }
.hero-visual { flex: 1 1 480px; position: relative; min-height: 460px; }
.browser { position: absolute; top: 0; right: 0; width: 88%; background: #121A2B; border-radius: var(--radius-lg); padding: 16px; box-shadow: 8px 8px 0 0 var(--forge); }
.browser-bar { display: flex; align-items: center; gap: 8px; padding: 4px 4px 14px; }
.browser-bar .dot { width: 12px; height: 12px; border-radius: 6px; }
.browser-bar .url { margin-left: 12px; flex-grow: 1; background: #22304A; border-radius: 6px; padding: 6px 12px; font-family: var(--font-mono); font-size: 13px; color: #F3EFE7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser-page { background: #FFFFFF; border-radius: var(--radius-md); overflow: hidden; }
.browser-hero { background: #2C6E9B; padding: 28px 24px; display: flex; flex-direction: column; gap: 10px; color: #FFFFFF; }
.browser-hero .big { font-family: var(--font-display); font-weight: 900; font-size: 30px; line-height: 32px; }
.browser-hero .cta { align-self: flex-start; background: #F7F4EE; color: #121A2B; font-size: 13px; font-weight: 700; padding: 8px 14px; border-radius: 6px; }
.browser-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 16px 24px 24px; }
.browser-grid div { display: flex; flex-direction: column; gap: 8px; }
.bar { height: 8px; border-radius: 4px; }
.forge-status { position: absolute; left: 0; bottom: 0; width: 290px; background: var(--surface-raised); border: 2px solid var(--nuit); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-plate); }
.forge-status .row { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.forge-status svg { color: var(--success); flex-shrink: 0; }
.ember { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; }
.ember::before { content: ""; width: 10px; height: 10px; border-radius: 5px; background: var(--forge); }
.progress { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.progress span { display: block; height: 100%; width: 72%; background: var(--forge); }

/* Sections */
.section { padding: 96px 0; }
.section-head { display: flex; flex-direction: column; gap: 12px; max-width: 660px; margin-bottom: 48px; }
.band-white { background: var(--surface-raised); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-givre { background: var(--givre); }
.band-night { background: var(--ground-inverse); color: var(--ink-inverse); }
.band-night .label { color: #FF8A63; }
.band-night .muted { color: var(--ink-inverse-muted); }

/* Comment ça marche */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.step { display: flex; flex-direction: column; gap: 16px; padding: 28px; border-radius: var(--radius-lg); background: var(--pierre); }
.step .num { font-family: var(--font-display); font-weight: 900; font-size: 48px; line-height: 48px; color: var(--forge); }
.step code { font-family: var(--font-mono); font-size: 14px; background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1px 6px; }

/* Offres */
.offers-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 48px; }
.offers-head p { max-width: 420px; color: var(--ink-muted); }
.offers { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; align-items: stretch; }
.offer { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 32px; display: flex; flex-direction: column; gap: 20px; }
.offer-featured { background: #121A2B; color: #F7F4EE; border-color: #121A2B; box-shadow: 8px 8px 0 0 var(--forge); }
.offer-featured .muted { color: #A3ACBA; }
.offer-logo { height: 40px; width: auto; align-self: flex-start; }
.offer ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 22px; }
.offer li { display: flex; gap: 10px; }
.offer li::before { content: ""; width: 8px; height: 8px; margin-top: 7px; border-radius: 4px; flex-shrink: 0; background: var(--bullet, var(--forge)); }
.offer-apprenti { --bullet: var(--or); }
.offer-royaume { --bullet: var(--fjord); }
.offer .price { margin-top: auto; display: flex; flex-direction: column; gap: 16px; }
.offer .price strong { font-family: var(--font-display); font-weight: 800; font-size: 24px; line-height: 30px; }
.offer-featured .btn { border-color: var(--forge); }
.price-list { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px 32px; font-size: 15px; color: var(--ink-muted); }
.price-list strong { color: var(--nuit); }

/* Ce que construisent les élèves */
.engines { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 24px; }
.engine { background: var(--surface-raised); border-radius: var(--radius-lg); padding: 32px; display: flex; flex-direction: column; gap: 24px; }
.engine-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.engine-head h3 { font-family: var(--font-display); font-weight: 900; font-size: 28px; line-height: 34px; }
.thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.thumb { display: flex; flex-direction: column; gap: 10px; font-size: 14px; font-weight: 700; }
.thumb .shot { height: 120px; border-radius: var(--radius-md); padding: 10px; display: flex; flex-direction: column; gap: 6px; border: 1px solid #E2DDD3; background: #FFFFFF; }
.thumb .shot.dark { background: #121A2B; border-color: #121A2B; }
.thumb .shot.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.thumb .shot.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: #F7F4EE; }
.thumb .shot .b { border-radius: 4px; }

/* Pour la classe */
.class-grid { display: flex; flex-wrap: wrap; gap: 56px; }
.class-copy { flex: 1 1 360px; display: flex; flex-direction: column; gap: 16px; }
.class-copy p { font-size: 17px; line-height: 26px; }
.class-cards { flex: 1 1 520px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.class-card { background: var(--ground-inverse-2); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.class-card svg { color: var(--or); }
.class-card h3 { font-size: 18px; line-height: 26px; }
.class-card p { font-size: 15px; line-height: 22px; }

/* FAQ */
.faq { max-width: 820px; }
.faq details { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 18px 22px; margin-bottom: 12px; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; font-weight: 700; font-size: 17px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--forge-ink); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin-top: 10px; color: var(--ink-muted); }

/* Appel final */
.cta-plate { background: var(--forge); border: 2px solid #121A2B; border-radius: var(--radius-lg); box-shadow: 8px 8px 0 0 #121A2B; padding: 56px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 32px; color: #121A2B; }
.cta-plate h2 { color: #121A2B; }
.cta-plate p { font-size: 18px; line-height: 28px; max-width: 640px; }
.cta-plate .btn { border-color: #121A2B; }
.cta-plate .btn-night { background: #121A2B; color: #F7F4EE; }
.cta-plate .btn-light { background: #F7F4EE; color: #121A2B; }

/* Pied de page */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .container { padding-top: 48px; padding-bottom: 56px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.footer-brand { display: flex; flex-direction: column; gap: 12px; max-width: 320px; font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.footer-brand img { height: 40px; width: auto; align-self: flex-start; }
.footer-links { display: flex; flex-wrap: wrap; gap: 56px; font-size: 14px; line-height: 20px; }
.footer-links div { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: var(--ink-muted); text-decoration: none; }
.footer-links a:hover { color: var(--nuit); }

/* Inscription */
.signup-head { padding: 64px 0 8px; display: flex; flex-direction: column; gap: 16px; }
.signup { display: grid; gap: 32px; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; padding: 32px 0 96px; }
.panel { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 32px; }
.form-section + .form-section { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line); }
.form-section h2 { font-size: 24px; line-height: 30px; display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.form-section h2 .num { font-family: var(--font-display); font-weight: 900; color: var(--forge); font-size: 24px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number] { width: 100%; height: 48px; padding: 0 14px; border: 2px solid var(--line); border-radius: var(--radius-md); background: var(--pierre); color: var(--nuit); font: inherit; }
.field input:focus { border-color: var(--focus-ring); outline: none; }
.field-row { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.hint { font-size: 14px; line-height: 20px; color: var(--ink-muted); margin-top: 6px; }
.error { font-size: 14px; line-height: 20px; color: var(--danger); font-weight: 700; margin-top: 6px; }
.alert { background: color-mix(in srgb, var(--danger) 10%, var(--surface-raised)); color: var(--danger); border: 2px solid currentColor; border-radius: var(--radius-md); padding: 12px 16px; margin-bottom: 20px; font-weight: 700; }
.type-choice { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.type-choice input { position: absolute; opacity: 0; pointer-events: none; }
.type-choice label { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 18px; border: 2px solid var(--line); border-radius: var(--radius-md); cursor: pointer; background: var(--pierre); font-weight: 400 !important; }
.type-choice label strong { font-family: var(--font-display); font-weight: 900; font-size: 22px; line-height: 26px; }
.type-choice input:checked + label { border-color: var(--nuit); background: var(--surface-raised); box-shadow: var(--shadow-plate); }
.type-choice input:focus-visible + label { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.stepper { display: flex; align-items: stretch; height: 48px; border: 2px solid var(--line); border-radius: var(--radius-md); overflow: hidden; background: var(--pierre); }
.stepper button { width: 48px; border: 0; background: transparent; color: var(--nuit); font-size: 20px; font-weight: 700; cursor: pointer; }
.stepper button:hover { background: var(--givre); }
.stepper input[type=number] { height: 100% !important; border: 0 !important; border-radius: 0 !important; text-align: center; font-family: var(--font-mono); font-weight: 500; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.checkbox { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; }
.checkbox input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--forge); }
.summary { position: sticky; top: 104px; }
.summary .panel { border: 2px solid var(--nuit); box-shadow: var(--shadow-plate); }
.summary h2 { font-size: 24px; line-height: 30px; margin-bottom: 8px; }
.summary-line { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.summary-total { font-family: var(--font-display); font-size: 48px; line-height: 48px; font-weight: 900; }
.meter { height: 8px; border-radius: 4px; overflow: hidden; background: var(--line); margin: 14px 0 6px; }
.meter span { display: block; height: 100%; width: 0; background: var(--success); transition: width .2s ease; }
.meter.is-below span { background: var(--forge); }
.dots-list { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--ink-muted); }
.dots-list li { display: flex; gap: 10px; }
.dots-list li::before { content: ""; width: 8px; height: 8px; margin-top: 7px; border-radius: 4px; background: var(--forge); flex-shrink: 0; }

/* Adaptation mobile */
@media (max-width: 900px) {
    .main-nav { display: none; }
    .signup { grid-template-columns: 1fr; }
    .summary { position: static; }
}
@media (max-width: 640px) {
    .container { padding: 0 16px; }
    .hero { padding: 48px 0 64px; }
    .hero-visual { min-height: 400px; }
    .browser { width: 100%; }
    .forge-status { width: 250px; }
    .section { padding: 64px 0; }
    .cta-plate { padding: 32px; }
    .field-row, .type-choice { grid-template-columns: 1fr; }
    .hero-actions .btn { width: 100%; }
    .header-actions .btn-ghost { display: none; }
    .panel { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
    .btn { transition: none; }
}
