/* Thermolearn Académie – site vitrine
   Concept : le cycle chaud/froid de la pompe à chaleur. Bandeau marine fixe aux couleurs du logo,
   un filet thermique (bleu froid → orange flamme) comme signature, listes techniques façon fiche produit. */
:root {
  --band: #12212F;         /* bandeau marine, identique dans les deux thèmes */
  --band-fg: #F3F6F8;
  --band-muted: #9AAAB6;
  --bg: #F5F7F9;
  --surface: #FFFFFF;
  --fg: #142231;
  --muted: #566778;
  --line: #D8E0E7;
  --hot: #B4410F;          /* orange lisible sur fond clair */
  --flame: #F08A4B;
  --cold: #1F6FB2;
  --ice: #6CB4F0;
  --tint-hot: #FBEDE4;
  --tint-cold: #E6F0F9;
  --focus: #1F6FB2;
  --thermal: linear-gradient(90deg, #6CB4F0 0%, #1F6FB2 30%, #B4410F 70%, #F08A4B 100%);

  --f-display: "Archivo", "Arial Narrow", Arial, sans-serif;
  --f-body: "IBM Plex Sans", "Segoe UI", Roboto, Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --step-0: 1rem;
  --step-1: 1.2rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.75rem, 1.4rem + 1.6vw, 2.4rem);
  --step-4: clamp(2.1rem, 1.5rem + 3vw, 3.4rem);
  --radius: 6px;
  --maxw: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --band: #0B1620; --band-fg: #F3F6F8; --band-muted: #9AAAB6;
    --bg: #0F1A24; --surface: #16242F; --fg: #E6ECF1; --muted: #9DADBA; --line: #26394A;
    --hot: #F08A4B; --flame: #F7A774; --cold: #6CB4F0; --ice: #9ACDF5;
    --tint-hot: #2A1E17; --tint-cold: #14283A; --focus: #6CB4F0;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --band: #0B1620; --band-fg: #F3F6F8; --band-muted: #9AAAB6;
  --bg: #0F1A24; --surface: #16242F; --fg: #E6ECF1; --muted: #9DADBA; --line: #26394A;
  --hot: #F08A4B; --flame: #F7A774; --cold: #6CB4F0; --ice: #9ACDF5;
  --tint-hot: #2A1E17; --tint-cold: #14283A; --focus: #6CB4F0;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-body);
  font-size: var(--step-0);
  line-height: 1.6;
}
img, svg { max-width: 100%; }
a { color: var(--cold); text-underline-offset: 3px; }
a:hover { color: var(--hot); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 {
  font-family: var(--f-display);
  font-stretch: 112%;
  line-height: 1.15;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: var(--step-4); font-weight: 750; letter-spacing: -0.01em; }
h2 { font-size: var(--step-3); font-weight: 700; }
h3 { font-size: var(--step-1); font-weight: 650; }
p { margin: 0; }
.mono { font-family: var(--f-mono); }

.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 50; background: var(--surface); padding: 8px 12px; }

/* ---------- Bandeau ---------- */
.site-header { background: var(--band); color: var(--band-fg); position: relative; }
.site-header::after { content: ""; display: block; height: 4px; background: var(--thermal); }
.nav-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }
.brand { display: block; line-height: 0; }
.brand img { height: 46px; width: auto; }
.nav-toggle {
  display: none; background: none; border: 1px solid #3A4D5E; color: var(--band-fg);
  font: 600 0.9rem var(--f-body); padding: 8px 12px; border-radius: var(--radius); cursor: pointer;
}
.nav { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.nav a {
  color: var(--band-fg); text-decoration: none; font-weight: 500; font-size: 0.95rem;
  padding: 8px 12px; border-radius: var(--radius);
}
.nav a:hover { background: #1E3346; color: #fff; }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--flame); }
.nav a.nav-cta { background: var(--flame); color: #12212F; font-weight: 650; margin-left: 6px; }
.nav a.nav-cta:hover { background: #F7A774; color: #12212F; }
@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: 12px; }
  .nav.open { display: flex; }
  .nav a.nav-cta { margin-left: 0; text-align: center; margin-top: 6px; }
  .nav-bar { flex-wrap: wrap; }
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  font-weight: 600; padding: 12px 20px; border-radius: var(--radius);
  border: 2px solid transparent; font-size: 1rem; line-height: 1.2; cursor: pointer; font-family: var(--f-body);
}
.btn-hot { background: var(--flame); color: #12212F; }
.btn-hot:hover { background: #F7A774; color: #12212F; }
.btn-ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn-ghost:hover { color: var(--flame); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Héros ---------- */
.hero { background: var(--band); color: var(--band-fg); }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; align-items: center;
  padding-block: 56px 64px;
}
.eyebrow {
  font-family: var(--f-mono); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--band-muted);
}
.hero h1 { margin-block: 14px 18px; color: #fff; }
.hero h1 em { font-style: normal; color: var(--flame); }
.hero .lead { color: #C9D4DD; font-size: 1.12rem; max-width: 36em; margin-bottom: 28px; }
.cycle { width: 100%; height: auto; }
.cycle text { font-family: var(--f-mono); font-size: 11px; fill: #C9D4DD; }
.cycle .lbl { font-family: var(--f-body); font-size: 13px; font-weight: 600; fill: #fff; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; padding-block: 40px 44px; }
  .cycle-box { max-width: 420px; }
}

/* ---------- Sections ---------- */
.section { padding-block: 64px; }
.section + .section { padding-top: 8px; }
.section-head { display: grid; gap: 10px; margin-bottom: 28px; max-width: 46em; }
.section-head p { color: var(--muted); }
.kicker { font-family: var(--f-mono); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--hot); }

/* Liste des formations façon fiche technique */
.course-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--fg); }
.course {
  display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) 6rem 14rem 2rem; gap: 20px; align-items: baseline;
  padding: 20px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit;
}
.course:hover { background: var(--surface); }
.course:hover .arrow { color: var(--hot); transform: translateX(3px); }
.course .ref { font-family: var(--f-mono); font-weight: 600; color: var(--hot); font-size: 0.95rem; }
.course h3 { margin-bottom: 4px; }
.course .pub { color: var(--muted); font-size: 0.95rem; }
.course .dur { font-family: var(--f-mono); font-variant-numeric: tabular-nums; font-weight: 600; }
.course .arrow { color: var(--muted); font-size: 1.3rem; transition: transform .15s; justify-self: end; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 0.78rem; font-weight: 600; padding: 3px 8px; border-radius: 3px; white-space: nowrap;
  background: var(--tint-cold); color: var(--cold);
}
.chip.hot { background: var(--tint-hot); color: var(--hot); }
@media (max-width: 860px) {
  .course { grid-template-columns: 5.5rem minmax(0, 1fr); gap: 6px 14px; }
  .course .dur, .course .chips { grid-column: 2; }
  .course .arrow { display: none; }
}

/* Formats */
.formats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.format { padding: 26px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); display: grid; gap: 8px; align-content: start; }
.format .tag { font-family: var(--f-mono); font-size: 0.8rem; color: var(--muted); }
.format p { color: var(--muted); }
@media (max-width: 640px) { .formats { grid-template-columns: 1fr; } }

/* Étapes (vraie séquence) */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; counter-reset: st; }
.steps li { counter-increment: st; border-top: 3px solid var(--line); padding-top: 14px; display: grid; gap: 6px; align-content: start; }
.steps li:nth-child(1) { border-color: var(--ice); }
.steps li:nth-child(2) { border-color: var(--cold); }
.steps li:nth-child(3) { border-color: #7A5A7A; }
.steps li:nth-child(4) { border-color: var(--hot); }
.steps li:nth-child(5) { border-color: var(--flame); }
.steps li::before { content: counter(st, decimal-leading-zero); font-family: var(--f-mono); color: var(--muted); font-size: 0.85rem; }
.steps strong { font-family: var(--f-display); font-stretch: 112%; font-size: 1.05rem; }
.steps span { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }

/* Atouts */
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.pillars div { display: grid; gap: 8px; align-content: start; }
.pillars p { color: var(--muted); }
@media (max-width: 760px) { .pillars { grid-template-columns: 1fr; gap: 22px; } }

/* Bandeau d'appel */
.cta-band { background: var(--band); color: var(--band-fg); }
.cta-band .wrap { padding-block: 48px; display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; }
.cta-band h2 { color: #fff; max-width: 22em; }
.cta-band p { color: #C9D4DD; margin-top: 8px; }

/* ---------- Pages intérieures ---------- */
.page-head { background: var(--band); color: var(--band-fg); }
.page-head .wrap { padding-block: 44px 40px; display: grid; gap: 12px; }
.page-head h1 { color: #fff; font-size: var(--step-3); max-width: 26em; }
.page-head p { color: #C9D4DD; max-width: 44em; }
.crumbs { font-size: 0.85rem; color: var(--band-muted); }
.crumbs a { color: var(--band-muted); }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0; border-top: 1px solid #2B3F51; margin-top: 18px; }
.facts div { padding: 14px 16px 4px 0; display: grid; gap: 2px; }
.facts dt { font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--band-muted); }
.facts dd { margin: 0; color: #fff; font-weight: 500; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; padding-block: 48px 64px; align-items: start; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; gap: 32px; } }
.prose { display: grid; gap: 18px; max-width: 46em; min-width: 0; }
.prose h2 { font-size: var(--step-2); margin-top: 18px; }
.prose ul, .prose ol { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }
.prose li::marker { color: var(--hot); }
.prose p { color: var(--fg); }
.prose .muted { color: var(--muted); }

.objectives { counter-reset: ob; list-style: none; padding: 0 !important; }
.objectives li { counter-increment: ob; display: grid; grid-template-columns: 2.4rem 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.objectives li::before { content: counter(ob); font-family: var(--f-mono); font-weight: 600; color: var(--hot); }

.timeline { display: grid; gap: 0; border-left: 3px solid; border-image: linear-gradient(180deg, var(--ice), var(--cold), var(--hot), var(--flame)) 1; }
.timeline section { padding: 4px 0 22px 22px; display: grid; gap: 8px; }
.timeline h3 { font-size: 1.05rem; }
.timeline ul { color: var(--fg); }

.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

.aside { display: grid; gap: 16px; position: sticky; top: 16px; }
@media (max-width: 900px) { .aside { position: static; } }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 10px; }
.box h2 { font-size: 1.1rem; }
.box p, .box li { font-size: 0.95rem; color: var(--muted); }
.box ul { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; }
.box.accent { border-top: 4px solid var(--flame); }

.note { background: var(--tint-cold); color: var(--fg); border-radius: var(--radius); padding: 14px 16px; font-size: 0.95rem; }

/* Formulaire */
.form { display: grid; gap: 16px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form .row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-weight: 600; font-size: 0.92rem; }
.field input, .field select, .field textarea {
  font: inherit; color: var(--fg); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px 12px; width: 100%;
}
.field textarea { min-height: 140px; resize: vertical; }
.check { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; font-size: 0.92rem; color: var(--muted); }
.check input { margin-top: 4px; }
.hp { position: absolute; left: -5000px; }
.form-status { font-weight: 600; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--band); color: var(--band-muted); font-size: 0.92rem; }
.site-footer::before { content: ""; display: block; height: 4px; background: var(--thermal); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-block: 44px 24px; }
.foot-grid h2 { font-size: 0.8rem; font-family: var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--band-fg); margin-bottom: 10px; font-stretch: 100%; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--band-fg); text-decoration: none; }
.site-footer a:hover { color: var(--flame); }
.foot-legal { border-top: 1px solid #2B3F51; padding-block: 16px 28px; font-size: 0.82rem; line-height: 1.5; }
.foot-brand img { height: 40px; width: auto; margin-bottom: 12px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; gap: 24px; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media (prefers-reduced-motion: no-preference) {
  .cycle .flow { stroke-dasharray: 6 10; animation: flow 2.4s linear infinite; }
  @keyframes flow { to { stroke-dashoffset: -32; } }
}

/* Illustrations techniques */
.ill { width: 100%; height: auto; display: block; }
.ill .l { fill: none; stroke: var(--fg); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ill .l.f { fill: var(--surface); }
.ill .l.h { stroke: var(--hot); }
.ill .l.c { stroke: var(--cold); }
.ill text { fill: var(--muted); font-family: var(--f-mono); font-size: 10px; }
.format .ill { max-width: 220px; height: 120px; margin-bottom: 6px; }
.page-head .ill .l { stroke: #C9D4DD; }
.page-head .ill .l.f { fill: var(--band); }
.page-head .ill .l.h { stroke: #F08A4B; }
.page-head .ill .l.c { stroke: #6CB4F0; }
.page-head .ill text { fill: #9AAAB6; }
.head-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 40px; align-items: center; }
.head-text { display: grid; gap: 12px; min-width: 0; }
.head-ill { max-width: 440px; }
@media (max-width: 760px) { .head-split { grid-template-columns: 1fr; gap: 16px; } .head-ill { max-width: 100%; } }

/* ---------- Photos ---------- */
.photo { display: block; width: 100%; height: auto; aspect-ratio: 1312 / 816; object-fit: cover; border-radius: 12px; background: var(--line); }
.hero-photo { margin: 0; }
.hero-photo .photo { box-shadow: 0 18px 40px rgba(0, 0, 0, .35); }
.page-head .photo { box-shadow: 0 12px 30px rgba(0, 0, 0, .3); }
.format-photo { border-radius: 8px; margin-bottom: 8px; }
