/* Benchmark des logiciels d'énergétique : l'identité d'Altorbe (fond nuit, Manrope, bleu glacier),
   reprise de la vitrine APEX, avec une mise en page de lecture longue pour les documents. */
@font-face { font-family: 'Manrope Variable'; font-style: normal; font-display: swap; font-weight: 200 800; src: url('/fonts/manrope-latin-ext-wght-normal.woff2') format('woff2-variations'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Manrope Variable'; font-style: normal; font-display: swap; font-weight: 200 800; src: url('/fonts/manrope-latin-wght-normal.woff2') format('woff2-variations'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --background: #081116; --surface: #0b161d; --surface-2: #0f1d26; --text: #f4f3f0; --muted: #bec7cd; --soft: #8fa1ab;
  --accent: #acd8ef; --cyan: #50b6d9; --teal: #1f6e8c; --line: #37464e; --card-line: #26343d;
  --green: #7fd1a8; --red: #f29b9b; --amber: #f2c46d;
  --gutter: clamp(20px, 2.5vw, 42px);
  --header: clamp(64px, 5.5vw, 80px);
  font-family: 'Manrope Variable', system-ui, sans-serif; color: var(--text); background: var(--background);
  font-synthesis: none; color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 24px); }
body { margin: 0; min-width: 320px; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; line-height: 1.6; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--background); }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
strong { color: var(--text); font-weight: 650; }
button { font: inherit; color: inherit; }
.frame { width: calc(100% - var(--gutter) * 2); max-width: 1240px; margin-inline: auto; }
.frame-wide { width: calc(100% - var(--gutter) * 2); max-width: 1680px; margin-inline: auto; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 50; padding: 12px 20px; border-radius: 40px; background: var(--accent); color: var(--background); font-weight: 600; transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.eyebrow { color: var(--accent); text-transform: uppercase; font-weight: 550; font-size: clamp(11px, .9vw, 12.5px); letter-spacing: .24em; line-height: 1.6; }
.eyebrow a:hover { color: var(--text); }
.lead { color: var(--muted); font-size: clamp(16px, 1.3vw, 18.5px); line-height: 1.7; max-width: 46em; }

/* ------------------------------------------------------------------ en-tête */
.site-header { position: sticky; top: 0; z-index: 20; background: rgb(8 17 22 / 82%); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid #1d2b33; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header); width: calc(100% - var(--gutter) * 2); max-width: 1680px; margin-inline: auto; }
.wordmark { display: inline-flex; align-items: center; gap: 11px; font-size: clamp(18px, 1.5vw, 21px); font-weight: 700; letter-spacing: .06em; white-space: nowrap; }
.wordmark em { font-style: normal; font-weight: 450; color: var(--soft); letter-spacing: .02em; }
.wordmark .mark { width: 26px; height: 26px; color: var(--cyan); }
.main-nav { display: flex; gap: clamp(4px, .6vw, 10px); }
.main-nav a { padding: 8px clamp(8px, .8vw, 13px); border-radius: 30px; color: var(--muted); font-size: 14px; font-weight: 560; white-space: nowrap; transition: color .18s, background .18s; }
.main-nav a:hover { color: var(--text); background: rgb(172 216 239 / 7%); }
.main-nav a[aria-current="page"] { color: var(--background); background: var(--accent); }
.menu-toggle { display: none; padding: 9px 16px; border: 1px solid var(--line); border-radius: 30px; background: none; font-size: 14px; font-weight: 600; cursor: pointer; }
@media (max-width: 1120px) {
  .menu-toggle { display: block; }
  .main-nav { position: absolute; top: var(--header); left: 0; right: 0; display: none; flex-direction: column; gap: 2px; padding: 12px var(--gutter) 20px; background: rgb(8 17 22 / 97%); border-bottom: 1px solid var(--line); }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 16px; font-size: 16px; }
}

/* ------------------------------------------------------------------ accueil */
.hero { position: relative; overflow: hidden; padding-bottom: clamp(50px, 6vw, 96px); margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); border-bottom: 1px solid #22323b; }
.hero-text { position: relative; z-index: 1; text-align: center; padding-top: clamp(44px, 5vw, 80px); }
.hero h1 { margin: 10px 0 8px; padding-bottom: .12em; font-size: clamp(46px, 7vw, 100px); font-weight: 650; line-height: 1.02; letter-spacing: -.035em; background: linear-gradient(180deg, #f4f3f0 35%, #9fd6ea); -webkit-background-clip: text; background-clip: text; color: transparent; text-wrap: balance; }
.hero-description { max-width: 44em; margin: 0 auto; color: var(--muted); font-size: clamp(16px, 1.45vw, 19.5px); line-height: 1.7; text-wrap: balance; }
.film { position: relative; z-index: 1; max-width: 1120px; margin: clamp(30px, 3.4vw, 50px) auto 0; }
.player { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid #3c5562; border-radius: clamp(10px, 1.2vw, 16px); background: #050b0f; box-shadow: 0 0 0 1px rgb(172 216 239 / 6%), 0 30px 90px -20px rgb(80 182 217 / 32%), 0 18px 60px rgb(0 0 0 / 55%); }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.film figcaption { margin-top: 16px; color: var(--soft); font-size: 13.5px; text-align: center; }
.hero-art { position: absolute; z-index: 0; left: 50%; bottom: 0; width: max(1500px, 125%); max-width: none; transform: translateX(-50%); opacity: .8; pointer-events: none; -webkit-mask-image: linear-gradient(to bottom, transparent 8%, #000 45%); mask-image: linear-gradient(to bottom, transparent 8%, #000 45%); }

.block { padding-top: clamp(56px, 6.4vw, 100px); }
.block:last-child { padding-bottom: clamp(56px, 6vw, 90px); }
.section-label { display: flex; align-items: center; gap: 20px; margin-bottom: clamp(24px, 2.6vw, 36px); }
.section-label .eyebrow { flex-shrink: 0; }
.section-label span { height: 1px; flex-grow: 1; background: linear-gradient(90deg, #4a626e, transparent); }
h2 { font-size: clamp(28px, 3.4vw, 48px); font-weight: 620; line-height: 1.12; letter-spacing: -.04em; text-wrap: balance; }
.section-title { max-width: 16em; margin-bottom: 20px; }

.chapters-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.chapters-grid > div { position: sticky; top: calc(var(--header) + 30px); display: grid; gap: 18px; }
.chapters { list-style: none; padding: 0; columns: 2; column-gap: 28px; }
.chapters.compact { columns: 1; margin-top: 18px; }
.chapters li { break-inside: avoid; }
.chapters button { display: flex; gap: 14px; align-items: baseline; width: 100%; padding: 9px 12px; border: 0; border-radius: 10px; background: none; text-align: left; cursor: pointer; color: var(--muted); font-size: 15px; line-height: 1.4; transition: background .18s, color .18s; }
.chapters li.main button { color: var(--text); font-weight: 620; margin-top: 6px; }
.chapters li.sub button { padding-left: 26px; font-size: 14px; }
.chapters button:hover { background: rgb(172 216 239 / 8%); color: var(--text); }
.chapters .time { flex-shrink: 0; min-width: 52px; color: var(--cyan); font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 600; }

.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); padding: 0; list-style: none; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats li { display: grid; gap: 8px; padding: 30px 22px 32px 0; }
.stats li + li { padding-left: 22px; border-left: 1px solid var(--card-line); }
.stats strong { font-size: clamp(34px, 3.6vw, 52px); font-weight: 650; letter-spacing: -.04em; line-height: 1; background: linear-gradient(180deg, #fff, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats span { color: var(--soft); font-size: 14px; line-height: 1.45; }

.takeaways { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding: 0; list-style: none; }
.takeaways li { display: flex; gap: 20px; padding: 26px 28px; border: 1px solid var(--card-line); border-radius: 16px; background: linear-gradient(160deg, rgb(80 182 217 / 7%), transparent 60%); }
.takeaways span { color: var(--cyan); font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; padding-top: 3px; }
.takeaways p { font-size: clamp(16px, 1.3vw, 18.5px); line-height: 1.6; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.card { position: relative; display: grid; align-content: start; gap: 10px; padding: 26px 26px 28px; border: 1px solid var(--card-line); border-radius: 16px; background: var(--surface); transition: border-color .2s, transform .2s, background .2s; }
.card:hover { border-color: #4b6a79; background: var(--surface-2); transform: translateY(-2px); }
.card h3 { font-size: 21px; font-weight: 650; letter-spacing: -.02em; line-height: 1.25; }
.card p { color: var(--muted); font-size: 15px; line-height: 1.55; }
.card .meta { color: var(--soft); font-size: 13px; }
.card::after { content: "→"; position: absolute; right: 24px; top: 22px; color: var(--soft); transition: transform .2s, color .2s; }
.card:hover::after { transform: translateX(4px); color: var(--accent); }
.badge { justify-self: start; margin-top: 4px; padding: 3px 10px; border-radius: 20px; background: rgb(127 209 168 / 14%); color: var(--green); font-size: 12px; font-weight: 650; letter-spacing: .02em; }
.button { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border: 0; border-radius: 40px; background: var(--accent); color: var(--background); font-weight: 650; font-size: 15px; cursor: pointer; transition: background .18s, transform .18s; }
.button:hover { background: #fff; }
.button.ghost { background: none; color: var(--accent); border: 1px solid #3f5864; }
.button.ghost:hover { background: rgb(172 216 239 / 8%); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* ------------------------------------------------------------------ pages intérieures */
.page-head { padding: clamp(40px, 4.4vw, 72px) 0 clamp(24px, 2.6vw, 36px); }
.page-head h1 { margin-top: 10px; font-size: clamp(36px, 4.6vw, 64px); font-weight: 650; letter-spacing: -.045em; line-height: 1.08; text-wrap: balance; }
.page-head .lead { margin-top: 16px; }
.page-head p + p { margin-top: 18px; }
.video-row { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 60px); align-items: start; padding: 28px 0 56px; border-top: 1px solid var(--line); }
.video-row h2 { margin: 8px 0 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.chips button { padding: 8px 16px; border: 1px solid var(--line); border-radius: 30px; background: none; color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer; }
.chips button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--background); }
.cards.tools { grid-template-columns: repeat(4, minmax(0, 1fr)); padding-bottom: 80px; }
.cards.tools .card[hidden] { display: none; }

/* Mise en page de lecture : sommaire collant à gauche, texte à 72 caractères. */
.doc-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(30px, 4vw, 64px); padding-bottom: 90px; }
.toc { position: sticky; top: calc(var(--header) + 24px); align-self: start; max-height: calc(100vh - var(--header) - 48px); overflow: auto; padding: 26px 6px 20px 0; scrollbar-width: thin; }
.toc summary { list-style: none; cursor: default; }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; padding: 0; margin-top: 12px; display: grid; gap: 1px; border-left: 1px solid var(--card-line); }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--soft); font-size: 13.5px; line-height: 1.35; transition: color .15s, border-color .15s; }
.toc .niv3 a, .toc .niv2 + .niv3 a { padding-left: 26px; font-size: 13px; }
.lecture .toc .niv2 a { color: var(--muted); }
.toc a:hover { color: var(--text); }
.toc a.active { color: var(--accent); border-left-color: var(--accent); }
.doc { min-width: 0; max-width: 860px; }
.doc h1 { margin: 56px 0 16px; font-size: clamp(30px, 3vw, 42px); font-weight: 650; letter-spacing: -.035em; line-height: 1.12; }
.doc h1.titre-doc { margin-top: 0; font-size: clamp(36px, 4.4vw, 60px); }
.doc h2 { margin: 52px 0 14px; font-size: clamp(24px, 2.3vw, 32px); letter-spacing: -.03em; padding-top: 6px; }
.doc h3 { margin: 32px 0 10px; font-size: 20px; font-weight: 650; letter-spacing: -.015em; color: var(--accent); }
.doc h4 { margin: 24px 0 8px; font-size: 17px; font-weight: 650; }
.doc p, .doc li { color: #d6dde1; font-size: 16.5px; line-height: 1.75; }
.doc p { margin: 0 0 14px; }
.doc ul, .doc ol { margin: 0 0 18px; padding-left: 22px; }
.doc li { margin: 4px 0; }
.doc li::marker { color: var(--cyan); }
.doc a { color: var(--accent); text-decoration: underline; text-decoration-color: rgb(172 216 239 / 35%); text-underline-offset: 3px; overflow-wrap: anywhere; }
.doc a:hover { text-decoration-color: var(--accent); }
.doc blockquote { margin: 18px 0; padding: 14px 20px; border-left: 3px solid var(--cyan); border-radius: 0 10px 10px 0; background: rgb(80 182 217 / 7%); }
.doc blockquote p { margin: 0; color: var(--muted); }
.doc code { padding: 1px 6px; border-radius: 5px; background: #13232c; color: #cfe7f3; font-size: .88em; }
.doc pre { overflow: auto; padding: 16px; border-radius: 12px; background: #0d1a21; border: 1px solid var(--card-line); }
.doc img { margin: 22px 0; border-radius: 12px; border: 1px solid var(--card-line); cursor: zoom-in; }
.doc .ref { color: var(--soft); font-size: .78em; vertical-align: .15em; white-space: nowrap; }
.doc .preuve { padding: 10px 16px; border: 1px solid #2e4753; border-radius: 10px; background: rgb(172 216 239 / 5%); font-size: 15px; color: var(--muted); }
.table-scroll { overflow-x: auto; margin: 18px 0 24px; border: 1px solid var(--card-line); border-radius: 12px; scrollbar-width: thin; }
.doc table, table.data { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; }
.doc th, .doc td, .data th, .data td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid #1c2b33; }
.doc thead th, .data thead th { position: sticky; top: 0; background: #102029; color: var(--accent); font-weight: 650; font-size: 13.5px; white-space: nowrap; }
.doc tbody tr:nth-child(even), .data tbody tr:nth-child(even) { background: rgb(255 255 255 / 2%); }
.doc td p, .doc th p { margin: 0; font-size: inherit; line-height: inherit; }
.download-inline { margin-top: 40px; }

/* Fiches outils */
.tool-head h1 { font-size: clamp(40px, 5vw, 72px); }
.identity { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 6px 0 26px; border: 1px solid var(--card-line); border-radius: 14px; overflow: hidden; background: var(--card-line); }
.identity div { padding: 14px 18px; background: var(--surface); }
.identity dt { color: var(--soft); font-size: 12px; text-transform: uppercase; letter-spacing: .14em; font-weight: 600; }
.identity dd { margin-top: 4px; font-size: 14.5px; line-height: 1.5; color: #dce3e7; }
.summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 30px; }
.summary { padding: 18px 20px; border: 1px solid var(--card-line); border-radius: 14px; background: linear-gradient(160deg, rgb(80 182 217 / 6%), transparent 70%); }
.summary p:last-child { margin: 8px 0 0; font-size: 15px; line-height: 1.6; color: #d6dde1; }
.summary.plus { border-color: rgb(127 209 168 / 35%); background: linear-gradient(160deg, rgb(127 209 168 / 9%), transparent 70%); }
.summary.plus .eyebrow { color: var(--green); }
.summary.moins { border-color: rgb(242 155 155 / 30%); background: linear-gradient(160deg, rgb(242 155 155 / 8%), transparent 70%); }
.summary.moins .eyebrow { color: var(--red); }

/* Galerie et visionneuse */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; margin: 14px 0 34px; }
.shot { margin: 0; }
.zoomable { display: block; width: 100%; padding: 0; border: 1px solid var(--card-line); border-radius: 10px; overflow: hidden; background: #050b0f; cursor: zoom-in; transition: border-color .2s, transform .2s; }
.zoomable:hover { border-color: #557686; transform: translateY(-2px); }
.zoomable img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; margin: 0; border: 0; border-radius: 0; }
.shot figcaption { margin-top: 8px; color: var(--soft); font-size: 13px; line-height: 1.4; }
.zoomable.inline { display: inline; width: auto; padding: 1px 7px; border-radius: 6px; background: #13232c; color: var(--accent); font-size: .88em; cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 4vh 4vw; background: rgb(3 7 10 / 92%); backdrop-filter: blur(6px); }
.lightbox[hidden] { display: none; }
.lightbox figure { max-width: 100%; max-height: 100%; display: grid; gap: 12px; justify-items: center; }
.lightbox img { max-width: 92vw; max-height: 84vh; border-radius: 10px; box-shadow: 0 30px 100px rgb(0 0 0 / 60%); }
.lightbox figcaption { color: var(--muted); font-size: 14px; }
.lightbox-close { position: absolute; top: 18px; right: 22px; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: rgb(8 17 22 / 80%); font-size: 26px; line-height: 1; cursor: pointer; }

/* Grille */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.tabs button { padding: 10px 16px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--soft); font-size: 14.5px; font-weight: 600; cursor: pointer; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.grid-tools { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.filter { flex: 0 1 380px; padding: 11px 16px; border: 1px solid var(--line); border-radius: 30px; background: var(--surface); color: var(--text); font: inherit; font-size: 15px; }
.filter:focus { outline: none; border-color: var(--accent); }
.count { color: var(--soft); font-size: 13.5px; }
.sheet { max-height: calc(100vh - var(--header) - 120px); margin-bottom: 70px; }
.data { min-width: 1400px; }
.data td { min-width: 220px; max-width: 420px; color: #d2dadf; }
.data tbody th { position: sticky; left: 0; z-index: 1; min-width: 180px; background: #0c1820; color: var(--text); font-weight: 650; border-right: 1px solid var(--line); }
.data thead th:first-child { left: 0; z-index: 2; }
.data a { color: var(--accent); }
.data tr[hidden] { display: none; }
.tab-panel.prose { max-width: 760px; padding-bottom: 60px; color: var(--muted); }
.tab-panel.prose p { margin-bottom: 12px; }

/* Téléchargements */
.downloads { list-style: none; padding: 0 0 90px; display: grid; gap: 12px; max-width: 880px; }
.downloads a { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 26px; border: 1px solid var(--card-line); border-radius: 14px; background: var(--surface); transition: border-color .2s, background .2s; }
.downloads a:hover { border-color: #4b6a79; background: var(--surface-2); }
.downloads strong { display: block; font-size: 18px; }
.downloads small { display: block; margin-top: 4px; color: var(--soft); font-size: 14px; line-height: 1.5; }
.downloads .size { flex-shrink: 0; color: var(--accent); font-weight: 650; font-variant-numeric: tabular-nums; }

/* Pied de page */
.site-footer { border-top: 1px solid #1d2b33; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; padding: 28px 0 34px; color: var(--soft); font-size: 13px; }
.footer-inner a:hover { color: var(--accent); }

/* Connexion */
body.login { min-height: 100vh; display: grid; place-items: center; overflow: hidden; }
.login-card { position: relative; width: min(460px, calc(100% - 40px)); }
.login-art { position: fixed; left: 50%; bottom: 0; width: max(1500px, 120vw); max-width: none; transform: translateX(-50%); opacity: .75; pointer-events: none; -webkit-mask-image: linear-gradient(to bottom, transparent 15%, #000 60%); mask-image: linear-gradient(to bottom, transparent 15%, #000 60%); }
.login form { position: relative; display: grid; gap: 14px; padding: 38px 36px 36px; border: 1px solid #2b414c; border-radius: 22px; background: rgb(11 22 29 / 86%); backdrop-filter: blur(12px); box-shadow: 0 30px 90px -20px rgb(80 182 217 / 30%), 0 20px 60px rgb(0 0 0 / 50%); }
.login h1 { font-size: clamp(26px, 3vw, 32px); line-height: 1.15; letter-spacing: -.035em; font-weight: 650; }
.login .lead { font-size: 15.5px; }
.login label { margin-top: 8px; color: var(--muted); font-size: 14px; font-weight: 600; }
.login input[type="password"], .login input[type="text"] { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #071016; color: var(--text); font: inherit; font-size: 16px; }
.login input[type="password"]:focus, .login input[type="text"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgb(172 216 239 / 15%); }
.login .button { justify-content: center; margin-top: 6px; padding: 14px; font-size: 16px; }
.login .error { color: var(--red); font-size: 14.5px; font-weight: 600; }

/* ------------------------------------------------------------------ adaptatif */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats li:nth-child(4) { padding-left: 0; border-left: 0; }
  .stats li:nth-child(n + 4) { border-top: 1px solid var(--card-line); }
  .cards.tools { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .chapters-grid, .video-row { grid-template-columns: 1fr; }
  .chapters-grid > div { position: static; }
  .chapters { columns: 1; }
  .cards, .cards.tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc-layout { grid-template-columns: 1fr; }
  .toc { position: static; max-height: none; margin-top: 18px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; }
  .toc summary { cursor: pointer; display: flex; justify-content: space-between; }
  .toc summary::after { content: "+"; color: var(--soft); font-size: 18px; letter-spacing: 0; }
  .toc[open] summary::after { content: "−"; }
  .takeaways { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .hero-art { opacity: .4; width: 1100px; }
  .hero-description { text-shadow: 0 2px 14px #081116; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats li, .stats li + li { padding: 20px 14px 22px 0; border-left: 0; }
  .stats li:nth-child(even) { padding-left: 14px; border-left: 1px solid var(--card-line); }
  .stats li:nth-child(n + 3) { border-top: 1px solid var(--card-line); }
  .cards, .cards.tools, .identity, .summary-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
  .wordmark em { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

.meta-line { margin-top: 14px; color: var(--soft); font-size: 14px; }
.doc .statut { padding: 16px 20px; border: 1px solid #2e4753; border-radius: 12px; background: rgb(80 182 217 / 6%); }
.login #code { font-variant-numeric: tabular-nums; letter-spacing: .3em; font-size: 20px; }
