/* Heure Creuse — couleurs et polices (thème magazine). Papier frais, encre de nuit, violet d'heure creuse. Aucune couleur EDF/Enedis. */
:root {
  --paper: #f5f4f0; --card: #ebe9f3; --sunk: #e4e1ee; --ink: #17162a; --muted: #57546b; --faint: #67647a; --rule: #dcd9e6;
  --accent: #5b3fd1; --kick: #5b3fd1; --hero-kick: #d9d0ff; --hp: #c9c4dc; --ok: #1d7a55; --warn: #9a5b00;
  --display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif; --body: "Source Serif 4", Georgia, serif; --ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --paper: #121120; --card: #1d1b30; --sunk: #222037; --ink: #ecebf7; --muted: #b2afc6; --faint: #9592ab; --rule: #2e2c45;
  --accent: #b3a5ff; --kick: #b3a5ff; --hp: #3b3858; --ok: #52c493; --warn: #f0b45a; color-scheme: dark } }
:root[data-theme="dark"] {
  --paper: #121120; --card: #1d1b30; --sunk: #222037; --ink: #ecebf7; --muted: #b2afc6; --faint: #9592ab; --rule: #2e2c45;
  --accent: #b3a5ff; --kick: #b3a5ff; --hp: #3b3858; --ok: #52c493; --warn: #f0b45a; color-scheme: dark }

/* Thème « magazine » commun (direction A) : grande photo, titres serif éditoriaux, beaucoup d'air, cartes illustrées.
   Chaque site fournit ses couleurs dans assets/tokens.css (chargé avant) et ses composants propres dans assets/site.css (après). */

*, *::before, *::after { box-sizing: border-box }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 18px/1.65 var(--body); -webkit-font-smoothing: antialiased }
img, svg { max-width: 100%; height: auto }
img { display: block }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px }
a:hover { text-decoration-thickness: 2px }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.08; letter-spacing: -.015em; text-wrap: balance; margin: 0 }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 3px }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: 6px; z-index: 10 }
.skip:focus { left: 8px }
.wrap { max-width: 1240px; margin: 0 auto; padding-inline: var(--gutter, clamp(16px, 4vw, 40px)) }
.kick, .eyebrow, .step { font: 600 12px/1.3 var(--ui); letter-spacing: .15em; text-transform: uppercase; color: var(--kick); margin: 0 }

/* ---- en-tête ---- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px 28px; flex-wrap: wrap; padding-block: 20px }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 600 21px/1 var(--display); letter-spacing: -.01em; color: var(--ink); text-decoration: none }
.brand svg { flex: none }
.nav { display: flex; flex-wrap: wrap; gap: 4px 24px; font: 500 14.5px/1 var(--ui) }
.nav a { color: var(--muted); text-decoration: none; padding-block: 6px; border-bottom: 1.5px solid transparent }
.nav a:hover { color: var(--ink) }
.nav a[aria-current] { color: var(--ink); border-bottom-color: var(--accent) }

/* ---- accueil ---- */
.m-hero { position: relative; border-radius: 8px; overflow: hidden; min-height: clamp(460px, 62vw, 640px); display: flex; align-items: flex-end; background: var(--ink) }
.m-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover }
.m-hero-t { position: relative; z-index: 1; width: 100%; padding: clamp(110px, 14vw, 200px) clamp(24px, 4vw, 52px) clamp(24px, 4vw, 52px); color: #fff;
  background: linear-gradient(to bottom, rgba(15, 12, 8, 0), rgba(15, 12, 8, .58) 38%, rgba(15, 12, 8, .82)) }
.m-hero-t > * { max-width: 820px }
.m-hero .kick { color: var(--hero-kick, #ffd9b8) }
.m-hero h1 { font-size: clamp(38px, 6vw, 76px); line-height: 1.02; letter-spacing: -.025em; margin: 14px 0 16px; color: #fff }
.m-hero h1 em { font-style: italic; font-weight: 500 }
.m-hero .lede { font-size: clamp(18px, 1.8vw, 21px); margin: 0; color: rgba(255, 255, 255, .9); max-width: 52ch }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 0 }
.btn { display: inline-flex; align-items: center; padding: 14px 22px; border-radius: 99px; background: #fff; color: #17130e; font: 600 15px/1 var(--ui); text-decoration: none; border: 1px solid #fff }
.btn:hover { background: var(--paper); text-decoration: none }
.btn.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55) }
.btn.ghost:hover { background: rgba(255, 255, 255, .12) }
.credit { position: absolute; right: 14px; bottom: 10px; z-index: 1; font: 400 11px/1 var(--ui); color: rgba(255, 255, 255, .72) }
.m-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(24px, 5vw, 64px); padding-block: clamp(40px, 6vw, 72px) 28px; border-bottom: 1px solid var(--rule) }
.m-intro h2 { font-size: clamp(26px, 3vw, 36px) }
.m-intro p { margin: 0; color: var(--muted); font-size: clamp(18px, 1.6vw, 20px) }
.m-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin: 0 0 clamp(48px, 7vw, 88px); border-bottom: 1px solid var(--rule) }
.m-stats div { padding: 24px 20px 26px 0 }
.m-stats dt { font: 600 clamp(30px, 3.4vw, 42px)/1 var(--display); color: var(--accent); letter-spacing: -.02em }
.m-stats dd { margin: 8px 0 0; font: 400 14px/1.45 var(--ui); color: var(--muted); max-width: 26ch }
.m-block { margin-bottom: clamp(56px, 8vw, 104px) }
.m-head { display: grid; gap: 10px; margin-bottom: 30px; max-width: 760px }
.m-head h2 { font-size: clamp(30px, 3.6vw, 46px) }
.m-head .sub { margin: 0; color: var(--muted); font-size: 19px }
.m-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.5vw, 32px) }
.m-card { min-width: 0; display: flex; flex-direction: column; gap: 8px }
.m-card.big { grid-column: span 2; grid-row: span 2 }
.m-card .m-img { display: block; overflow: hidden; border-radius: 6px; margin-bottom: 10px }
.m-card .m-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .5s ease }
.m-card.big .m-img img { aspect-ratio: 16 / 11 }
.m-card:hover .m-img img { transform: scale(1.03) }
.m-card h3 { font-size: 24px } .m-card.big h3 { font-size: clamp(28px, 3vw, 38px) }
.m-card h3 a { color: var(--ink); text-decoration: none } .m-card h3 a:hover { color: var(--accent) }
.m-card > p:not(.kick) { margin: 0; color: var(--muted); font-size: 16.5px; line-height: 1.55 }
.m-card ul { list-style: none; margin: 8px 0 0; padding: 0; border-top: 1px solid var(--rule) }
.m-card li { border-bottom: 1px solid var(--rule) }
.m-card li a { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; color: var(--ink); text-decoration: none; font: 500 14.5px/1.35 var(--ui) }
.m-card li a::after { content: "→"; color: var(--faint) } .m-card li a:hover { color: var(--accent) }
.m-card.text { background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 24px }
.m-checks { margin-bottom: clamp(56px, 8vw, 96px); padding-top: 32px; border-top: 2px solid var(--ink); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(24px, 4vw, 48px) }
.m-checks h2 { font-size: clamp(26px, 3vw, 34px) }
.m-checks ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 36px }
.m-checks li { font-size: 16.5px; color: var(--muted); line-height: 1.55 }
.m-checks li b { display: block; font: 600 12px/1.3 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--kick); margin-bottom: 6px }
.src { display: inline-block; margin-top: 6px; font: 500 12.5px/1 var(--ui); color: var(--faint) }

/* ---- article ---- */
.crumbs { margin: 6px 0 0; font: 500 13.5px/1.4 var(--ui); color: var(--faint) }
.crumbs a { color: var(--muted) }
.art-head { max-width: 900px; padding-block: clamp(22px, 4vw, 44px) clamp(22px, 3vw, 30px) }
.art-head h1 { font-size: clamp(34px, 5vw, 60px); line-height: 1.04; letter-spacing: -.02em; margin: 12px 0 16px }
.art-head .lede { margin: 0; font-size: clamp(19px, 1.8vw, 22px); color: var(--muted); max-width: 60ch }
.meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 18px; font: 500 13.5px/1.4 var(--ui); color: var(--faint) }
.meta span + span::before { content: "·"; margin-right: 18px }
.head-photo { margin: 0 0 clamp(32px, 4vw, 52px) }
.head-photo img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; border-radius: 8px }
.head-photo figcaption { margin-top: 8px; font: 400 12px/1.4 var(--ui); color: var(--faint); text-align: right }
.art { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; margin-bottom: 96px }
.toc { position: sticky; top: 24px; font: 500 14px/1.35 var(--ui) }
.toc ol { list-style: none; margin: 12px 0 0; padding: 0; border-left: 1px solid var(--rule) }
.toc li a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none }
.toc li a:hover { color: var(--ink); border-left-color: var(--accent) }
.prose { max-width: 68ch; min-width: 0 }
.prose > * + * { margin-top: 1.05em }
.prose h2 { font-size: clamp(27px, 2.8vw, 34px); margin-top: 2em; scroll-margin-top: 20px }
.prose h3 { font-size: 22px; margin-top: 1.6em }
.prose h2 + *, .prose h3 + * { margin-top: .6em }
.prose ul, .prose ol { padding-left: 1.3em } .prose li + li { margin-top: .35em } .prose li::marker { color: var(--faint) }
.prose strong { font-weight: 600 }
.prose blockquote { margin-inline: 0; padding: 20px 24px; background: var(--card); border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; font-size: 17.5px }
.prose blockquote p { margin: 0 } .prose blockquote p + p { margin-top: .6em }
.prose blockquote p:first-child strong:first-child { display: block; font: 600 12px/1.3 var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--kick); margin-bottom: 6px }
.tbl { overflow-x: auto; border-top: 2px solid var(--ink) }
table { border-collapse: collapse; width: 100%; font: 400 15px/1.45 var(--ui) }
th, td { text-align: left; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--rule); vertical-align: top }
th { font: 600 11.5px/1.3 var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--muted) }
td:first-child { font-weight: 600 }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap }
.tbl-note { font: 400 13px/1.5 var(--ui); color: var(--faint); margin-top: .5em !important }
figure.illu { margin-inline: 0; padding: 22px; background: var(--card); border-radius: 8px; color: var(--ink) }
figure.illu svg { display: block; width: 100% }
figure.illu figcaption { margin-top: 12px; font: 400 13.5px/1.5 var(--ui); color: var(--muted) }
.faq { border-top: 1px solid var(--rule) }
.faq details { border-bottom: 1px solid var(--rule) }
.faq summary { cursor: pointer; list-style: none; padding: 18px 34px 18px 0; position: relative; font: 600 20px/1.3 var(--display) }
.faq summary::-webkit-details-marker { display: none }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font: 300 28px/1 var(--ui); color: var(--faint) }
.faq details[open] summary::after { content: "−" }
.faq details p { margin: 0 0 20px; color: var(--muted) }
.sources { font: 400 14px/1.5 var(--ui); color: var(--muted); padding-left: 1.2em } .sources a { color: var(--muted); word-break: break-word }
.author { display: flex; gap: 16px; align-items: flex-start; margin-top: 48px !important; padding: 22px; background: var(--card); border-radius: 8px }
.author .av { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: var(--ink) }
.author p { margin: 0; font-size: 16px; color: var(--muted) } .author b { color: var(--ink); font-family: var(--display); font-weight: 600 }
.related { display: grid; margin-top: 44px !important; border-top: 2px solid var(--ink) }
.related .eyebrow { padding: 16px 0 6px }
.related a { padding: 13px 0; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; font: 600 19px/1.3 var(--display) }
.related a:hover { color: var(--accent) }

figure.video { margin-inline: 0 }
figure.video .video-play, figure.video video { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border-radius: 8px; overflow: hidden; background: var(--ink) }
figure.video .video-play { position: relative; padding: 0; border: 0; cursor: pointer }
figure.video .video-play img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease }
figure.video .video-play:hover img { transform: scale(1.02) }
figure.video .vp-icon { position: absolute; right: 22px; bottom: 22px; width: 68px; height: 68px; border-radius: 50%; background: rgba(255, 255, 255, .92); box-shadow: 0 10px 30px rgba(0, 0, 0, .3) }
figure.video .vp-icon::after { content: ""; position: absolute; left: 27px; top: 21px; border-style: solid; border-width: 13px 0 13px 20px; border-color: transparent transparent transparent var(--accent) }
figure.video figcaption { margin-top: 10px; font: 400 14px/1.5 var(--ui); color: var(--muted) }
figure.video figcaption b { color: var(--kick); font-weight: 600; margin-right: 6px }

/* ---- pages dossier ---- */
.hub-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; margin-bottom: 64px; border-top: 2px solid var(--ink) }
.hcard { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 22px 0 26px; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none }
.hcard b { font: 600 21px/1.2 var(--display) }
.hcard:hover b { color: var(--accent) }
.hcard .note { color: var(--muted); font-size: 16px; line-height: 1.5 }

/* ---- pied de page ---- */
footer { border-top: 1px solid var(--rule); padding-block: 30px 44px; font: 400 14px/1.6 var(--ui); color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px }
footer p { margin: 0; max-width: 62ch } footer a { color: var(--muted) }

/* ---- responsive ---- */
@media (max-width: 960px) {
  .m-intro, .m-checks, .art { grid-template-columns: minmax(0, 1fr) }
  .m-grid, .hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .m-card.big { grid-column: span 2; grid-row: auto }
  .toc { position: static; background: var(--card); border-radius: 8px; padding: 16px 18px }
  .head-photo img { aspect-ratio: 16 / 9 }
}
@media (max-width: 620px) {
  body { font-size: 17px }
  .m-grid, .hub-grid, .m-checks ul { grid-template-columns: minmax(0, 1fr) }
  .m-card.big { grid-column: auto }
  .nav { gap: 2px 16px }
  .head-photo img { aspect-ratio: 4 / 3 }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto } .m-card .m-img img { transition: none } }

/* Heure Creuse : comparateur, graphique horaire, tableaux de grille. */
.cmp { background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: clamp(18px, 2.5vw, 28px) }
.prose .cmp { margin-block: 32px }
.cmp-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font: 600 12px/1.3 var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--kick) }
.cmp-src { color: var(--muted); letter-spacing: .04em; text-transform: none; font-weight: 500 }
.cmp-in { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 18px }
.prose .cmp-in { grid-template-columns: repeat(2, minmax(0, 1fr)) }
.cmp-in label { display: grid; gap: 6px; font: 600 13px/1.3 var(--ui); color: var(--muted) }
.cmp-in select, .cmp-in input { font: 500 15px/1.2 var(--ui); color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; padding: 10px; width: 100%; min-width: 0 }
.cmp-out { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 20px }
.c-opt { background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; padding: 14px }
.c-opt span { display: block; font: 600 12px/1.2 var(--ui); text-transform: uppercase; letter-spacing: .08em; color: var(--muted) }
.c-opt b { display: block; font: 700 clamp(24px, 3vw, 34px)/1.1 var(--display); margin-top: 8px; font-variant-numeric: tabular-nums }
.c-opt i { font: 400 13px/1 var(--ui); font-style: normal; color: var(--muted) }
.c-opt.best { border: 2px solid var(--accent); padding: 13px }
.c-opt.best span::after { content: " · le moins cher"; color: var(--accent) }
.o-verdict { font: 400 16px/1.55 var(--ui); margin: 16px 0 0 }
.cmp-note { font: 400 12.5px/1.5 var(--ui); color: var(--muted); margin: 12px 0 0 }
.profil { margin: 28px 0 }
.profil svg { width: 100%; height: auto; display: block }
.profil .b-hp { fill: var(--hp) } .profil .b-hc { fill: var(--accent) }
.profil text { font: 500 10px var(--ui); fill: var(--muted) }
.profil figcaption, .tab-src { font: 400 13.5px/1.5 var(--ui); color: var(--muted); margin-top: 8px }
.tab { overflow-x: auto }
@media (max-width: 900px) { .cmp-in { grid-template-columns: repeat(2, minmax(0, 1fr)) } }
@media (max-width: 600px) { .cmp-in, .prose .cmp-in, .cmp-out { grid-template-columns: minmax(0, 1fr) } }
/* générateur du code d'intégration */
.embed { background: var(--card); border-radius: 10px; padding: 20px; margin-block: 24px }
.embed-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px }
.embed label { display: grid; gap: 6px; font: 600 12.5px/1.2 var(--ui); color: var(--muted) }
.embed select, .embed input, .embed textarea { font: 400 14px/1.4 var(--ui); padding: 9px 10px; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); color: var(--ink); width: 100% }
.embed textarea { font-family: var(--mono); font-size: 12.5px; resize: vertical }
.embed-code-l { margin-top: 16px }
.embed-h { font: 600 12px/1.3 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--kick); margin: 20px 0 8px }
.copybtn { font: 600 14px/1 var(--ui); background: var(--ink); color: var(--paper); border: 0; border-radius: 8px; padding: 10px 14px; cursor: pointer; margin-top: 12px }
.e-ok { font: 500 13px var(--ui); color: var(--ok) }
@media (max-width: 760px) { .embed-form { grid-template-columns: repeat(2, minmax(0, 1fr)) } }
/* formulaire de contact */
.contact { display: grid; gap: 14px; background: var(--card); border-radius: 12px; padding: 20px; margin-block: 20px; max-width: 620px }
.contact label { display: grid; gap: 6px; font: 600 13px/1.3 var(--ui); color: var(--muted) }
.contact input, .contact textarea { font: 400 15px/1.4 var(--ui); padding: 10px; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); color: var(--ink); width: 100% }
.contact .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden }
.c-legal, .c-status { font: 400 13px/1.5 var(--ui); color: var(--muted); margin: 0 }
.c-status { color: var(--ok); font-weight: 500 }
