/* ==========================================================================
   Dark Side Energy - feuille de style principale
   Sommaire :
   1. Polices et variables
   2. Base
   3. Mise en page
   4. En-tête et navigation
   5. Composants (boutons, cartes, listes, chiffres...)
   6. Sections spécifiques (hero, schéma, références, article...)
   7. Formulaires et outils de calcul
   8. Pied de page
   9. Animations, accessibilité, impression
   ========================================================================== */

/* 1. Polices et variables ------------------------------------------------- */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-wdth-normal.woff2") format("woff2-variations"),
       url("../fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  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;
}

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2-variations"),
       url("../fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  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;
}

:root {
  color-scheme: dark;

  /* Couleurs */
  --c-bg: #09090a;
  --c-bg-2: #0e0e10;
  --c-surface: #141417;
  --c-surface-2: #1b1b1f;
  --c-surface-3: #222227;
  --c-line: #26262b;
  --c-line-2: #35353c;
  --c-text: #f3f3f4;
  --c-text-2: #b4b4bb;
  --c-text-3: #8b8b94;
  --c-brand: #c30000;          /* rouge du logo */
  --c-brand-hover: #d4140c;
  --c-brand-deep: #9f0700;
  --c-accent: #ff4a3d;         /* rouge lisible sur fond sombre */
  --c-glow: rgba(255, 44, 24, 0.42);
  --c-ok: #3ddc97;
  --c-warn: #ffb020;
  --c-bad: #ff5a4f;

  /* Typographie */
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-xs: 0.78rem;
  --fs-sm: 0.9rem;
  --fs-base: 1.0625rem;
  --fs-lg: clamp(1.125rem, 1.05rem + 0.35vw, 1.3rem);
  --fs-h4: clamp(1.1rem, 1.02rem + 0.35vw, 1.25rem);
  --fs-h3: clamp(1.25rem, 1.1rem + 0.7vw, 1.6rem);
  --fs-h2: clamp(1.9rem, 1.35rem + 2.3vw, 3.25rem);
  --fs-h1: clamp(2.35rem, 1.5rem + 3.6vw, 4.6rem);
  --fs-display: clamp(2.35rem, 1.45rem + 2.9vw, 4.15rem);

  /* Espacements */
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(64px, 9vw, 128px);
  --radius: 14px;
  --radius-sm: 8px;
  --container: 1240px;
  --header-h: 76px;

  --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* 2. Base ----------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  background: var(--c-bg);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: #d2d2d7;
  background: var(--c-bg);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
svg,
video,
picture {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

figure {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.5em;
  color: var(--c-text);
  font-weight: 780;
  font-stretch: 112%;
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.15; }
h4 { font-size: var(--fs-h4); line-height: 1.2; }

p {
  margin: 0 0 1.1em;
  text-wrap: pretty;
}

a {
  color: var(--c-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: #ff7a6f;
}

strong,
b {
  font-weight: 700;
  color: #fff;
}

ul,
ol {
  margin: 0 0 1.1em;
  padding-left: 1.25em;
}

hr {
  border: 0;
  height: 1px;
  background: var(--c-line);
  margin: 2.5rem 0;
}

::selection {
  background: var(--c-brand);
  color: #fff;
}

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

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--c-brand);
  color: #fff;
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

.num {
  font-variant-numeric: tabular-nums;
}

.nowrap {
  white-space: nowrap;
}

/* 3. Mise en page --------------------------------------------------------- */

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: calc(820px + 2 * var(--gutter));
}

.section {
  position: relative;
  padding-block: var(--section);
}

.section--tight {
  padding-block: calc(var(--section) * 0.6);
}

.section--alt {
  background: var(--c-bg-2);
  border-block: 1px solid var(--c-line);
}

.section--grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: -1px -1px;
}

.section-head {
  max-width: 780px;
  margin-bottom: clamp(32px, 5vw, 64px);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head--center .eyebrow {
  justify-content: center;
}

.section-head p:not(.eyebrow) {
  color: var(--c-text-2);
  font-size: var(--fs-lg);
}

.lead {
  font-size: var(--fs-lg);
  color: #e2e2e6;
  line-height: 1.6;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  font-size: var(--fs-xs);
  font-weight: 700;
  font-stretch: 118%;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-accent);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: currentColor;
  flex: none;
}

.eyebrow--plain::before {
  display: none;
}

.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
}

.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}

.split--top {
  align-items: start;
}

/* Section sur une seule colonne : largeur de lecture */
.measure {
  max-width: 780px;
}

.split--reverse > :first-child {
  order: 2;
}

.stack > * + * {
  margin-top: 1rem;
}

@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split--reverse > :first-child { order: 0; }
}

@media (max-width: 640px) {
  .grid--2,
  .grid--3,
  .grid--4 { grid-template-columns: 1fr; }
}

/* 4. En-tête et navigation ------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(9, 9, 10, 0.72);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}

.site-header.is-scrolled {
  background: rgba(9, 9, 10, 0.9);
  border-bottom-color: var(--c-line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 100%;
}

.brand {
  display: inline-flex;
  flex: none;
  color: var(--c-brand);
  line-height: 0;
}

.brand svg {
  width: 176px;
  height: auto;
}

.brand:hover {
  color: var(--c-brand-hover);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list > li {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 560;
  color: var(--c-text-2);
  text-decoration: none;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.nav-link:hover,
.nav-link[aria-expanded="true"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-link[aria-current="page"],
.nav-list > li.is-active > .nav-link {
  color: #fff;
  box-shadow: inset 0 -2px 0 var(--c-brand);
  border-radius: 8px 8px 0 0;
}

.nav-link .chevron {
  width: 10px;
  height: 10px;
  transition: transform 0.2s var(--ease);
}

/* Sélecteur de langue (FR / EN) */
.lang-switch {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--c-line-2);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  color: var(--c-text-2);
  text-decoration: none;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.lang-switch:hover {
  color: #fff;
  border-color: var(--c-brand);
}

.nav-link[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

.subnav {
  position: absolute;
  top: calc(100% + 10px);
  left: -12px;
  min-width: 330px;
  padding: 10px;
  background: var(--c-surface);
  border: 1px solid var(--c-line-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease), visibility 0.18s;
}

.subnav::before {
  content: "";
  position: absolute;
  inset: -12px 0 auto;
  height: 12px;
}

.has-sub.is-open > .subnav {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.subnav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.subnav a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--c-text);
  text-decoration: none;
  font-weight: 620;
  line-height: 1.3;
}

.subnav a span {
  display: block;
  margin-top: 2px;
  font-size: var(--fs-sm);
  font-weight: 400;
  color: var(--c-text-3);
}

.subnav a:hover,
.subnav a[aria-current="page"] {
  background: var(--c-surface-2);
  color: #fff;
}

.subnav a[aria-current="page"] {
  box-shadow: inset 2px 0 0 var(--c-brand);
}

.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--c-line-2);
  border-radius: 10px;
  background: var(--c-surface);
  color: var(--c-text);
  cursor: pointer;
}

.burger,
.burger::before,
.burger::after {
  position: absolute;
  left: 50%;
  width: 20px;
  height: 2px;
  margin-left: -10px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

.burger {
  top: 50%;
  margin-top: -1px;
}

.burger::before,
.burger::after {
  content: "";
}

.burger::before { top: -6px; }
.burger::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .burger {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .burger::before {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .burger::after {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 1180px) {
  .nav-link { padding: 10px 9px; font-size: 0.9rem; }
  .main-nav { gap: 12px; }
  .brand svg { width: 156px; }
}

@media (max-width: 1080px) {
  .nav-toggle { display: inline-block; }

  /* backdrop-filter crée un bloc conteneur qui piégerait le menu en position fixe */
  .site-header,
  .site-header.is-scrolled {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(9, 9, 10, 0.97);
  }

  .main-nav {
    position: fixed;
    inset: var(--header-h) 0 0;
    z-index: 99;
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    padding: 24px var(--gutter) 40px;
    background: var(--c-bg);
    border-top: 1px solid var(--c-line);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
  }

  .main-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-list > li {
    border-bottom: 1px solid var(--c-line);
  }

  .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 16px 4px;
    font-size: 1.15rem;
    font-weight: 650;
    color: var(--c-text);
    border-radius: 0;
  }

  .nav-link:hover,
  .nav-link[aria-expanded="true"] {
    background: none;
  }

  .nav-link[aria-current="page"],
  .nav-list > li.is-active > .nav-link {
    box-shadow: none;
    color: var(--c-accent);
  }

  .subnav {
    position: static;
    min-width: 0;
    margin: 0 0 12px;
    padding: 4px;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: var(--c-surface);
  }

  .has-sub.is-open > .subnav {
    display: block;
  }

  .lang-switch {
    align-self: flex-start;
    height: 40px;
    min-width: 48px;
    font-size: 0.9rem;
  }

  .nav-cta {
    align-self: stretch;
  }

  body.nav-open {
    overflow: hidden;
  }
}

/* 5. Composants ----------------------------------------------------------- */

.btn {
  --btn-bg: var(--c-brand);
  --btn-bg-hover: var(--c-brand-hover);
  --btn-color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--btn-bg);
  color: var(--btn-color);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 720;
  font-stretch: 112%;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.25s var(--ease), transform 0.2s var(--ease), color 0.2s;
}

.btn:hover {
  background: var(--btn-bg-hover);
  color: var(--btn-color);
  box-shadow: 0 10px 34px -10px var(--c-glow);
  transform: translateY(-1px);
}

.btn:active {
  transform: none;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
  transition: transform 0.2s var(--ease);
}

.btn:hover svg.arrow {
  transform: translateX(3px);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-bg-hover: rgba(255, 255, 255, 0.06);
  --btn-color: var(--c-text);
  border-color: var(--c-line-2);
}

.btn--ghost:hover {
  border-color: #55555e;
  box-shadow: none;
}

.btn--light {
  --btn-bg: #fff;
  --btn-bg-hover: #f1f1f1;
  --btn-color: #111;
}

.btn--case {
  text-transform: none;
  letter-spacing: 0.01em;
  font-stretch: 100%;
  font-size: 0.98rem;
}

.btn--sm {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 0.8rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--c-accent);
}

.link-arrow svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s var(--ease);
}

.link-arrow:hover svg {
  transform: translateX(4px);
}

.link-arrow--case {
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 1rem;
}

/* Cartes */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(22px, 2.6vw, 32px);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.3s var(--ease), background-color 0.25s;
}

.card h3 {
  margin-bottom: 0.45em;
  font-size: clamp(1.2rem, 1.08rem + 0.5vw, 1.45rem);
}

.card p {
  color: var(--c-text-2);
}

.card > :last-child {
  margin-bottom: 0;
}

.card--link {
  text-decoration: none;
  color: inherit;
}

.card--link:hover {
  color: inherit;
  border-color: rgba(255, 74, 61, 0.55);
  background: #16161a;
  transform: translateY(-3px);
  box-shadow: 0 24px 60px -30px var(--c-glow);
}

.card--link .link-arrow {
  margin-top: auto;
  padding-top: 18px;
}

.card__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 22px;
  border-radius: 12px;
  background: rgba(195, 0, 0, 0.12);
  border: 1px solid rgba(255, 74, 61, 0.28);
  color: var(--c-accent);
}

.card__icon svg {
  width: 26px;
  height: 26px;
}

.card__index {
  position: absolute;
  top: 22px;
  right: 24px;
  font-size: var(--fs-xs);
  font-weight: 700;
  font-stretch: 118%;
  letter-spacing: 0.14em;
  color: var(--c-text-3);
}

.card--featured {
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(195, 0, 0, 0.22), transparent 55%),
    var(--c-surface);
}

/* Listes */
.check-list {
  margin: 0 0 1.2em;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 0.7em;
  color: var(--c-text-2);
}

.check-list li strong {
  color: var(--c-text);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 16px;
  height: 16px;
  background: var(--c-accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13 2 4 14h7l-1 8 9-12h-7l1-8z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13 2 4 14h7l-1 8 9-12h-7l1-8z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.check-list--cols {
  columns: 2;
  column-gap: 40px;
}

.check-list--cols li {
  break-inside: avoid;
}

@media (max-width: 640px) {
  .check-list--cols { columns: 1; }
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--c-line-2);
  border-radius: 999px;
  font-size: var(--fs-sm);
  color: var(--c-text-2);
  background: rgba(255, 255, 255, 0.02);
}

a.tag {
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}

a.tag:hover {
  color: #fff;
  border-color: var(--c-accent);
  background: rgba(195, 0, 0, 0.14);
}

.tag--red {
  border-color: rgba(255, 74, 61, 0.4);
  color: #ffd7d3;
  background: rgba(195, 0, 0, 0.14);
}

.tag--ok {
  border-color: rgba(61, 220, 151, 0.4);
  color: #c9f7e2;
  background: rgba(61, 220, 151, 0.1);
}

.tag--warn {
  border-color: rgba(255, 176, 32, 0.4);
  color: #ffe6b3;
  background: rgba(255, 176, 32, 0.1);
}

/* Chiffres clés */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: var(--c-surface);
  overflow: hidden;
}

.stat {
  padding: clamp(22px, 3vw, 36px);
  border-right: 1px solid var(--c-line);
}

.stat:last-child {
  border-right: 0;
}

.stat__value {
  display: block;
  margin-bottom: 12px;
  font-size: clamp(1.35rem, 1rem + 0.8vw, 1.7rem);
  white-space: nowrap;
  font-weight: 800;
  font-stretch: 108%;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
}

.stat__value em {
  font-style: normal;
  color: var(--c-accent);
}

.stat__label {
  display: block;
  font-size: var(--fs-sm);
  color: var(--c-text-2);
  line-height: 1.45;
}

@media (max-width: 1024px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n + 2) { border-bottom: 1px solid var(--c-line); }
}

@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--c-line); }
  .stat:last-child { border-bottom: 0; }
}

/* Étapes */
.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--c-line);
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 28px 24px 8px 0;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 14px;
  font-size: var(--fs-sm);
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: 0.1em;
  color: var(--c-accent);
}

.steps li::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c-brand);
  box-shadow: 0 0 0 4px rgba(195, 0, 0, 0.2), 0 0 18px var(--c-glow);
}

.steps h3 {
  font-size: var(--fs-h4);
  margin-bottom: 0.4em;
}

.steps p {
  color: var(--c-text-2);
  font-size: 0.97rem;
}

/* Bloc média */
.media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--c-line);
  background: var(--c-surface);
}

/* L'image est rognée dans son cadre : son mouvement au défilement ne recouvre jamais la légende */
.media picture {
  display: block;
  overflow: hidden;
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media figcaption,
.caption {
  position: relative;
  padding: 12px 16px;
  font-size: var(--fs-sm);
  color: var(--c-text-3);
  border-top: 1px solid var(--c-line);
  background: var(--c-surface);
}

.media--white {
  background: #fff;
}

.media--white img {
  object-fit: contain;
}

/* Note / encadré */
.note {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--c-line-2);
  background: var(--c-surface);
  color: var(--c-text-2);
  font-size: 0.95rem;
}

.note svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--c-warn);
}

.note p:last-child {
  margin-bottom: 0;
}

.note--info svg {
  color: var(--c-accent);
}

/* Tableaux */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: var(--c-surface);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.table caption {
  padding: 16px 18px 0;
  text-align: left;
  color: var(--c-text-3);
  font-size: var(--fs-sm);
}

.table th,
.table td {
  padding: 13px 18px;
  text-align: left;
  border-bottom: 1px solid var(--c-line);
  vertical-align: top;
}

.table thead th {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-text-3);
  background: var(--c-surface-2);
  white-space: nowrap;
}

.table tbody tr:last-child th,
.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody th {
  font-weight: 650;
  color: #fff;
}

.table td {
  color: var(--c-text-2);
}

.table .num {
  text-align: right;
  white-space: nowrap;
}

/* 6. Sections spécifiques ------------------------------------------------- */

/* Hero accueil */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(56px, 8vw, 112px) clamp(56px, 7vw, 96px);
  background:
    radial-gradient(60% 70% at 85% 30%, rgba(195, 0, 0, 0.2), transparent 65%),
    radial-gradient(40% 50% at 10% 100%, rgba(195, 0, 0, 0.08), transparent 70%),
    var(--c-bg);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(80% 80% at 70% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(80% 80% at 70% 40%, #000 20%, transparent 75%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero h1 {
  font-size: var(--fs-display);
  font-weight: 800;
  font-stretch: 110%;
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin-bottom: 0.45em;
}

.hero h1 .accent {
  color: var(--c-accent);
}

.hero .lead {
  max-width: 600px;
  margin-bottom: 32px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
  color: var(--c-text-3);
  font-size: var(--fs-sm);
}

.hero__meta li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero__meta li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-brand);
  box-shadow: 0 0 10px var(--c-glow);
}

@media (max-width: 960px) {
  .hero__inner { grid-template-columns: minmax(0, 1fr); }
  .hero__visual { max-width: 560px; }
}

/* Schéma unifilaire animé */
.sld {
  width: 100%;
  height: auto;
  overflow: visible;
  font-family: var(--font);
}

.sld .wire {
  fill: none;
  stroke: #3a3a42;
  stroke-width: 2;
}

.sld .flow {
  fill: none;
  stroke: var(--c-accent);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-dasharray: 7 200;
  stroke-dashoffset: 7;
  filter: drop-shadow(0 0 5px rgba(255, 60, 40, 0.9));
  animation: sld-flow 4.2s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.sld .flow.d1 { animation-delay: 0.7s; }
.sld .flow.d2 { animation-delay: 1.4s; }
.sld .flow.d3 { animation-delay: 2.1s; }
.sld .flow.d4 { animation-delay: 2.8s; }
.sld .flow.d5 { animation-delay: 3.5s; }

@keyframes sld-flow {
  to { stroke-dashoffset: -100; }
}

.sld .bus {
  stroke: #5a5a64;
  stroke-width: 5;
  stroke-linecap: round;
}

/* Pages thématiques : chapeau avec schéma animé */
.page-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(28px, 4.5vw, 64px);
  align-items: center;
}

.page-hero--visual h1 {
  max-width: 16ch;
}

@media (max-width: 960px) {
  .page-hero__grid { grid-template-columns: minmax(0, 1fr); }
  .page-hero__visual { max-width: 560px; }
}

/* Schémas animés : éléments communs */
.sld .hall {
  fill: none;
  stroke: #4a4a53;
  stroke-width: 1.5;
}

.sld .zone {
  fill: rgba(255, 255, 255, 0.025);
  stroke: #34343b;
  stroke-width: 1;
}

.sld .band {
  fill: rgba(255, 255, 255, 0.035);
  stroke: #2c2c32;
  stroke-width: 1;
}

.sld .grid {
  stroke: #222227;
  stroke-width: 1;
}

.sld .lbl--accent {
  fill: var(--c-accent);
}

/* Coffret de stand qui s'allume à l'arrivée du courant (même cycle que .flow) */
.sld .coffret {
  fill: var(--c-surface);
  stroke: var(--c-accent);
  stroke-width: 1.3;
}

.sld .coffret--hit {
  animation: sld-hit 4.2s linear infinite;
}

@keyframes sld-hit {
  0%, 84% { fill: var(--c-surface); }
  90% { fill: var(--c-accent); }
  100% { fill: var(--c-surface); }
}

/* Planning : barres qui se déploient, curseur du jour */
.sld .bar {
  fill: rgba(255, 74, 61, 0.16);
  stroke: var(--c-accent);
  stroke-width: 1.2;
  transform-box: fill-box;
  transform-origin: left center;
  animation: sld-grow 0.9s var(--ease) both;
}

.sld .bar--long {
  fill: rgba(255, 255, 255, 0.05);
  stroke: #5a5a64;
}

@keyframes sld-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.sld .sweep {
  animation: sld-sweep 9s linear infinite;
}

@keyframes sld-sweep {
  from { transform: translateX(0); }
  to { transform: translateX(var(--sweep, 400px)); }
}

.sld .cursor {
  stroke: var(--c-accent);
  stroke-width: 1.4;
}

.sld .cursor-head {
  fill: var(--c-accent);
}

/* Tracé progressif, comme une table traçante, en boucle */
.sld .plot {
  stroke-dasharray: 100;
  animation: sld-plot 10s var(--ease) infinite both;
}

@keyframes sld-plot {
  0% { stroke-dashoffset: 100; opacity: 1; }
  22% { stroke-dashoffset: 0; }
  88% { stroke-dashoffset: 0; opacity: 1; }
  96%, 100% { stroke-dashoffset: 0; opacity: 0; }
}

.sld .appear {
  animation: sld-appear 10s ease infinite both;
}

@keyframes sld-appear {
  0%, 18% { opacity: 0; }
  24%, 88% { opacity: 1; }
  96%, 100% { opacity: 0; }
}

.sld .tick {
  fill: none;
  stroke: var(--c-accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sld .note-1 { animation: sld-note-1 10s ease infinite both; }
.sld .note-2 { animation: sld-note-2 10s ease infinite both; }
.sld .note-3 { animation: sld-note-3 10s ease infinite both; }
.sld .note-4 { animation: sld-note-4 10s ease infinite both; }
.sld .note-5 { animation: sld-note-5 10s ease infinite both; }

@keyframes sld-note-1 { 0%, 26% { opacity: 0; } 30%, 88% { opacity: 1; } 96%, 100% { opacity: 0; } }
@keyframes sld-note-2 { 0%, 34% { opacity: 0; } 38%, 88% { opacity: 1; } 96%, 100% { opacity: 0; } }
@keyframes sld-note-3 { 0%, 42% { opacity: 0; } 46%, 88% { opacity: 1; } 96%, 100% { opacity: 0; } }
@keyframes sld-note-4 { 0%, 50% { opacity: 0; } 54%, 88% { opacity: 1; } 96%, 100% { opacity: 0; } }
@keyframes sld-note-5 { 0%, 58% { opacity: 0; } 62%, 88% { opacity: 1; } 96%, 100% { opacity: 0; } }

/* Démarche : une impulsion parcourt les étapes, qui s'allument tour à tour */
.sld .flow--steps {
  animation: sld-steps 6s linear infinite;
  stroke-dasharray: 8 200;
}

@keyframes sld-steps {
  0% { stroke-dashoffset: 8; }
  70%, 100% { stroke-dashoffset: -100; }
}

.sld .step {
  fill: var(--c-surface);
  stroke: #4a4a53;
  stroke-width: 1.5;
}

.sld .step--on {
  fill: rgba(255, 74, 61, 0.18);
  stroke: var(--c-accent);
}

.sld .step-2 { animation: sld-step-2 6s linear infinite; }
.sld .step-3 { animation: sld-step-3 6s linear infinite; }
.sld .step-4 { animation: sld-step-4 6s linear infinite; }

@keyframes sld-step-2 { 0%, 21% { fill: var(--c-surface); stroke: #4a4a53; } 23%, 95% { fill: rgba(255, 74, 61, 0.18); stroke: var(--c-accent); } 100% { fill: var(--c-surface); stroke: #4a4a53; } }
@keyframes sld-step-3 { 0%, 43% { fill: var(--c-surface); stroke: #4a4a53; } 45%, 95% { fill: rgba(255, 74, 61, 0.18); stroke: var(--c-accent); } 100% { fill: var(--c-surface); stroke: #4a4a53; } }
@keyframes sld-step-4 { 0%, 65% { fill: var(--c-surface); stroke: #4a4a53; } 67%, 95% { fill: rgba(255, 74, 61, 0.18); stroke: var(--c-accent); } 100% { fill: var(--c-surface); stroke: #4a4a53; } }

/* Profil de charge : courbe tracée une fois, pointes couvertes par la batterie */
.sld .curve {
  fill: none;
  stroke: var(--c-text);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 100;
  animation: sld-draw 2.4s var(--ease) both;
}

@keyframes sld-draw {
  from { stroke-dashoffset: 100; }
  to { stroke-dashoffset: 0; }
}

.sld .area {
  fill: rgba(255, 74, 61, 0.34);
  animation: sld-fade 0.9s ease 2s both;
}

@keyframes sld-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.sld .scan {
  stroke: var(--c-accent);
  stroke-width: 1.2;
  opacity: 0.8;
}

@media (prefers-reduced-motion: reduce) {
  .sld .coffret--hit,
  .sld .bar,
  .sld .sweep,
  .sld .plot,
  .sld .appear,
  .sld [class*="note-"],
  .sld .step-2,
  .sld .step-3,
  .sld .step-4,
  .sld .curve,
  .sld .area {
    animation: none !important;
  }
  .sld .plot,
  .sld .curve { stroke-dashoffset: 0; }
  .sld .sweep,
  .sld .flow--steps { display: none; }
}

/* Carte des interventions */
.map {
  margin: 0 0 clamp(28px, 4vw, 48px);
}

.map__canvas {
  position: relative;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background:
    radial-gradient(45% 80% at 49% 23%, rgba(195, 0, 0, 0.14), transparent 62%),
    var(--c-bg-2);
  overflow: hidden;
}

.map__base,
.map__layer {
  display: block;
  width: 100%;
  height: auto;
}

.map__layer {
  position: absolute;
  inset: 0;
  height: 100%;
  font-family: var(--font);
}

.map__arc {
  fill: none;
  stroke: var(--c-accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  opacity: 0.8;
}

.map__flow {
  fill: none;
  stroke: #fff;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-dasharray: 0.035 2;
  stroke-dashoffset: 0.035;
  filter: drop-shadow(0 0 4px rgba(255, 60, 40, 0.95));
}

.map__pin {
  fill: var(--c-accent);
  filter: drop-shadow(0 0 5px rgba(255, 60, 40, 0.8));
  transform-box: fill-box;
  transform-origin: center;
}

.map__dot {
  fill: var(--c-accent);
  opacity: 0.5;
}

.map__hq {
  fill: #fff;
  filter: drop-shadow(0 0 6px rgba(255, 60, 40, 0.95));
}

.map__ring {
  fill: none;
  stroke: var(--c-accent);
  stroke-width: 1.5;
  transform-box: fill-box;
  transform-origin: center;
  animation: map-ring 2.6s ease-out infinite;
}

.map__label {
  fill: var(--c-text-2);
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  paint-order: stroke;
  stroke: var(--c-bg-2);
  stroke-width: 4px;
  stroke-linejoin: round;
}

.map__label--hq {
  fill: #fff;
}

.map__caption {
  margin-top: 12px;
  font-size: var(--fs-sm);
  color: var(--c-text-3);
}

/* Animation : les lignes se tracent quand la carte apparaît, puis le courant circule */
.js .map__arc { stroke-dashoffset: 1; }
.js .map__pin { opacity: 0; }
.js .map__flow { opacity: 0; }

.js .map.is-visible .map__arc {
  animation: map-draw 1.5s var(--ease) both;
  animation-delay: calc(var(--i) * 0.16s);
}

.js .map.is-visible .map__pin {
  animation: map-pin 0.5s var(--ease) both;
  animation-delay: calc(1.1s + var(--i) * 0.16s);
}

.js .map.is-visible .map__flow {
  opacity: 1;
  animation: map-flow 2.8s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite both;
  animation-delay: calc(1.8s + var(--i) * 0.42s);
}

@keyframes map-draw {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

@keyframes map-pin {
  from { opacity: 0; transform: scale(0.2); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes map-flow {
  from { stroke-dashoffset: 0.035; }
  to { stroke-dashoffset: -1; }
}

@keyframes map-ring {
  from { transform: scale(0.7); opacity: 0.9; }
  to { transform: scale(2.8); opacity: 0; }
}

@media (max-width: 640px) {
  .map__label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .js .map__arc { stroke-dashoffset: 0; animation: none !important; }
  .js .map__pin { opacity: 1; animation: none !important; }
  .map__flow { display: none; }
  .map__ring { animation: none; }
}

/* Cartouche façon plan */
.drawing {
  position: relative;
  margin: 0;
  border: 1px solid var(--c-line-2);
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    rgba(14, 14, 16, 0.85);
  background-size: 24px 24px, 24px 24px, auto;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.drawing__bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--c-line-2);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-text-3);
}

.drawing__bar span:first-child {
  color: var(--c-text-2);
}

.drawing__canvas {
  padding: 18px 20px 8px;
}

.drawing__foot {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.8fr;
  border-top: 1px solid var(--c-line-2);
  font-size: var(--fs-xs);
}

.drawing__foot div {
  padding: 10px 14px;
  border-right: 1px solid var(--c-line-2);
  color: var(--c-text-2);
}

.drawing__foot div:last-child {
  border-right: 0;
}

.drawing__foot b {
  display: block;
  margin-bottom: 2px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-text-3);
}

.sld .node {
  fill: var(--c-surface);
  stroke: #4a4a53;
  stroke-width: 1.5;
}

.sld .node--hot {
  stroke: var(--c-brand);
  stroke-width: 2;
}

.sld .sym {
  fill: none;
  stroke: #d6d6db;
  stroke-width: 1.6;
}

.sld .sym--red {
  stroke: var(--c-accent);
}

.sld .lbl {
  fill: var(--c-text-2);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sld .lbl--sm {
  fill: var(--c-text-3);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.sld .lbl--hot {
  fill: #fff;
}

.sld .dot {
  fill: var(--c-accent);
  filter: drop-shadow(0 0 6px rgba(255, 60, 40, 0.9));
  animation: sld-pulse 2.4s ease-in-out infinite;
}

@keyframes sld-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

/* Inverseur de sources : cadre et verrouillage mécanique */
.sld .frame {
  fill: none;
  stroke: #4a4a53;
  stroke-width: 1.2;
  stroke-dasharray: 4 4;
}

.sld .link {
  fill: none;
  stroke: #8b8b94;
  stroke-width: 1.2;
  stroke-dasharray: 3 3;
}

/* Groupe de secours en veille */
.sld .dot--idle {
  fill: none;
  stroke: var(--c-text-3);
  stroke-width: 1;
  filter: none;
  animation-duration: 3.6s;
}

/* Hero pages intérieures */
.page-hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(48px, 7vw, 96px) clamp(40px, 6vw, 80px);
  background:
    radial-gradient(55% 90% at 100% 0%, rgba(195, 0, 0, 0.18), transparent 60%),
    var(--c-bg);
  border-bottom: 1px solid var(--c-line);
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(90deg, transparent 25%, #000 90%);
  mask-image: linear-gradient(90deg, transparent 25%, #000 90%);
  pointer-events: none;
}

.page-hero > .container {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  max-width: 17ch;
}

.page-hero .lead {
  max-width: 680px;
  margin-bottom: 0;
}

/* Accroche sous le titre principal d'une page métier */
.page-hero__sub {
  margin: -4px 0 18px;
  max-width: 24ch;
  color: var(--c-accent);
  font-size: var(--fs-h3);
  font-weight: 750;
  font-stretch: 112%;
  line-height: 1.2;
}

/* Preuves de terrain juste après l'en-tête de l'accueil */
.proof .marquee {
  margin-top: clamp(32px, 4vw, 48px);
}

.page-hero .btn-row {
  margin-top: 32px;
}

.page-hero--photo {
  min-height: clamp(380px, 52vw, 560px);
  display: flex;
  align-items: flex-end;
}

.page-hero--photo .page-hero__bg {
  position: absolute;
  inset: 0;
}

.page-hero--photo .page-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.35) contrast(1.05);
}

.page-hero--photo .page-hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(9, 9, 10, 0.55) 0%, rgba(9, 9, 10, 0.72) 45%, rgba(9, 9, 10, 0.97) 100%),
    linear-gradient(90deg, rgba(120, 0, 0, 0.35), transparent 60%);
}

.page-hero--photo::before {
  display: none;
}

.breadcrumb {
  margin-bottom: 26px;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--fs-sm);
  color: var(--c-text-3);
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 6px;
  color: var(--c-line-2);
}

.breadcrumb a {
  color: var(--c-text-2);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: #fff;
}

.breadcrumb [aria-current="page"] {
  color: var(--c-text-3);
}

/* Bande logo / ligne comme dans le logo */
.rule {
  height: 2px;
  background: linear-gradient(90deg, var(--c-brand), rgba(195, 0, 0, 0));
  border: 0;
  margin: 0;
}

/* Univers d'événements */
.universe {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  background: var(--c-line);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  overflow: hidden;
}

.universe__item {
  padding: 26px 22px;
  background: var(--c-surface);
}

.universe__item svg {
  width: 30px;
  height: 30px;
  margin-bottom: 18px;
  color: var(--c-accent);
}

.universe__item h3 {
  font-size: 1.08rem;
  margin-bottom: 0.4em;
}

.universe__item p {
  margin: 0;
  font-size: 0.93rem;
  color: var(--c-text-2);
}

@media (max-width: 1080px) {
  .universe { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .universe { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 460px) {
  .universe { grid-template-columns: 1fr; }
}

/* Mur de références */
.venues {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1px;
  margin: 0;
  padding: 1px;
  list-style: none;
  border-radius: var(--radius);
  overflow: hidden;
}

.venues li {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 92px;
  padding: 18px 20px;
  background: var(--c-surface);
  box-shadow: 0 0 0 1px var(--c-line);
  transition: background-color 0.2s;
}

.venues li:hover {
  background: var(--c-surface-2);
}

.venues strong {
  font-size: 1rem;
  font-weight: 700;
  font-stretch: 108%;
  line-height: 1.25;
}

.venues span {
  margin-top: 4px;
  font-size: var(--fs-sm);
  color: var(--c-text-3);
}

.marquee {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee__track {
  display: flex;
  gap: 56px;
  width: max-content;
  padding-block: 8px;
  animation: marquee 60s linear infinite;
}

.marquee:hover .marquee__track {
  animation-play-state: paused;
}

.marquee__track span {
  display: inline-flex;
  align-items: center;
  gap: 56px;
  font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.35rem);
  font-weight: 700;
  font-stretch: 115%;
  color: var(--c-text-2);
  white-space: nowrap;
}

.marquee__track span::after {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--c-brand);
  transform: rotate(45deg);
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* Bandeau d'appel à l'action */
.cta-band {
  position: relative;
  overflow: hidden;
  padding: clamp(36px, 5vw, 64px);
  border-radius: calc(var(--radius) + 6px);
  background:
    radial-gradient(90% 160% at 100% 0%, rgba(255, 60, 30, 0.35), transparent 55%),
    linear-gradient(135deg, #7d0400 0%, #b30000 55%, #c30000 100%);
  border: 1px solid rgba(255, 110, 90, 0.35);
  box-shadow: 0 40px 120px -50px rgba(195, 0, 0, 0.9);
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000);
  mask-image: linear-gradient(90deg, transparent 30%, #000);
  pointer-events: none;
}

.cta-band__inner {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.cta-band h2 {
  margin-bottom: 0.25em;
  max-width: 18ch;
}

.cta-band p {
  margin: 0;
  max-width: 560px;
  color: #ffe1dd;
  font-size: var(--fs-lg);
}

.cta-band .btn--ghost {
  --btn-color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

.cta-band .btn--ghost:hover {
  border-color: #fff;
  --btn-bg-hover: rgba(255, 255, 255, 0.1);
}

/* Produits */
.product {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  padding-block: clamp(36px, 5vw, 56px);
  border-top: 1px solid var(--c-line);
}

.product:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.product__head .eyebrow {
  margin-bottom: 12px;
}

.product__head p:not(.eyebrow) {
  color: var(--c-text-2);
}

.spec {
  display: grid;
  gap: 1px;
  margin: 0;
  background: var(--c-line);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  overflow: hidden;
}

.spec > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 16px;
  padding: 14px 18px;
  background: var(--c-surface);
}

.spec dt {
  font-weight: 650;
  color: #fff;
}

.spec dd {
  margin: 0;
  color: var(--c-text-2);
}

@media (max-width: 860px) {
  .product { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .spec > div { grid-template-columns: 1fr; gap: 4px; }
}

/* Articles (Le sais-tu ?) */
.post-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.post-card .post-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-bottom: 14px;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-text-3);
}

.post-card .post-card__meta .kind {
  color: var(--c-accent);
}

.post-card h3 {
  font-size: 1.2rem;
}

.prose {
  font-size: 1.1rem;
  line-height: 1.75;
  color: #dcdce0;
}

.prose h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
  margin-top: 1.8em;
}

.prose h3 {
  margin-top: 1.6em;
}

.prose ul li,
.prose ol li {
  margin-bottom: 0.45em;
}

.prose blockquote {
  margin: 1.8em 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--c-brand);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 560;
}

.prose .dialog p {
  margin-bottom: 0.4em;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 22px;
  color: var(--c-text-3);
  font-size: var(--fs-sm);
}

.post-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--c-line);
}

/* Chronologie */
.timeline {
  position: relative;
  margin: 0;
  padding: 0 0 0 28px;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(var(--c-brand), rgba(195, 0, 0, 0.1));
}

.timeline li {
  position: relative;
  padding-bottom: 28px;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 7px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--c-bg);
  border: 2px solid var(--c-accent);
}

.timeline time,
.timeline .when {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 800;
  font-stretch: 120%;
  letter-spacing: 0.14em;
  color: var(--c-accent);
  text-transform: uppercase;
}

.timeline h3 {
  font-size: var(--fs-h4);
  margin: 6px 0 6px;
}

.timeline p {
  margin: 0;
  color: var(--c-text-2);
}

/* Labels RSE */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.badge-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.badge-status--ok { color: var(--c-ok); }
.badge-status--progress { color: var(--c-warn); }

/* Label : logo relié à la fiche officielle de l'organisme */
.label-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
  max-width: 880px;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: var(--c-surface);
}

.label-card__logo {
  display: block;
  width: 200px;
  border-radius: 12px;
  transition: transform 0.25s var(--ease);
}

.label-card__logo img {
  display: block;
  width: 100%;
  height: auto;
}

.label-card__logo:hover {
  transform: translateY(-3px);
}

.label-card__body h3 {
  margin: 12px 0 8px;
}

.label-card__body p {
  margin: 0 0 16px;
  color: var(--c-text-2);
}

@media (max-width: 640px) {
  .label-card {
    grid-template-columns: 1fr;
  }

  .label-card__logo {
    width: 160px;
  }
}

/* 7. Formulaires et outils ------------------------------------------------ */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label,
.field .label {
  font-size: var(--fs-sm);
  font-weight: 650;
  color: var(--c-text);
}

.field .hint {
  font-size: var(--fs-xs);
  color: var(--c-text-3);
  letter-spacing: 0.01em;
}

.req {
  color: var(--c-accent);
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--c-line-2);
  border-radius: var(--radius-sm);
  background: var(--c-bg);
  color: var(--c-text);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background-color 0.2s;
}

.textarea {
  min-height: 150px;
  resize: vertical;
}

.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b4b4bb' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
}

.input::placeholder,
.textarea::placeholder {
  color: #6c6c75;
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: #4a4a53;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(255, 74, 61, 0.2);
}

.input[aria-invalid="true"],
.textarea[aria-invalid="true"],
.select[aria-invalid="true"] {
  border-color: var(--c-bad);
}

.input--num {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.input-unit {
  position: relative;
  display: flex;
  align-items: stretch;
}

.input-unit .input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.input-unit .unit {
  display: grid;
  place-items: center;
  min-width: 52px;
  padding: 0 12px;
  border: 1px solid var(--c-line-2);
  border-left: 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--c-surface-2);
  color: var(--c-text-2);
  font-size: var(--fs-sm);
  font-weight: 650;
}

.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.93rem;
  color: var(--c-text-2);
}

.check input {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--c-brand);
}

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  padding: 4px;
  gap: 4px;
  border: 1px solid var(--c-line-2);
  border-radius: 10px;
  background: var(--c-bg);
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented label {
  padding: 8px 14px;
  border-radius: 7px;
  font-size: var(--fs-sm);
  font-weight: 650;
  color: var(--c-text-2);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.segmented input:checked + label {
  background: var(--c-brand);
  color: #fff;
}

.segmented input:focus-visible + label {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

.form-status {
  margin-top: 16px;
  font-weight: 600;
}

.form-status[data-state="ok"] { color: var(--c-ok); }
.form-status[data-state="error"] { color: var(--c-bad); }

.hp {
  position: absolute;
  left: -9999px;
}

/* Panneaux d'outils */
.tool {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  gap: clamp(20px, 3vw, 32px);
  align-items: start;
}

@media (max-width: 960px) {
  .tool { grid-template-columns: minmax(0, 1fr); }
}

.panel {
  padding: clamp(20px, 2.6vw, 30px);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: var(--c-surface);
}

.panel + .panel {
  margin-top: 20px;
}

.panel__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.panel__title h2,
.panel__title h3 {
  margin: 0;
  font-size: var(--fs-h4);
}

.panel--result {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(195, 0, 0, 0.16), transparent 60%),
    var(--c-surface);
  border-color: rgba(255, 74, 61, 0.3);
}

@media (max-width: 960px) {
  .panel--result { position: static; }
}

/* Accès client au bilan de puissance : démo, connexion, espace client */
.access {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: -6px 0 18px;
  padding: 10px 14px;
  border: 1px solid var(--c-line-2);
  border-radius: var(--radius-sm);
  background: var(--c-surface-2);
  font-size: var(--fs-sm);
  color: var(--c-text-2);
}

.access > span {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}

.access > span[hidden] {
  display: none;
}

.access svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--c-accent);
}

.access b {
  color: var(--c-text);
  overflow-wrap: anywhere;
}

.access--warn {
  border-color: rgba(255, 176, 32, 0.45);
  color: var(--c-text);
}

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 700;
  color: var(--c-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.link-btn:hover {
  color: var(--c-text);
}

.gate {
  margin-top: 20px;
  border-color: rgba(255, 74, 61, 0.45);
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(195, 0, 0, 0.14), transparent 60%),
    var(--c-surface);
}

.gate__head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.gate__head > svg {
  width: 28px;
  height: 28px;
  flex: none;
  margin-top: 2px;
  color: var(--c-accent);
}

.gate__head h2 {
  margin: 0 0 6px;
  font-size: var(--fs-h4);
}

.gate__head p {
  margin: 0;
  color: var(--c-text-2);
}

.gate__actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 12px 20px;
}

.gate__link {
  font-size: var(--fs-sm);
  color: var(--c-text-2);
}

.gate__foot {
  margin: 16px 0 0;
  font-size: var(--fs-sm);
  color: var(--c-text-3);
}

/* Export et impression : cadenas tant que le client n'est pas connecté */
[data-full] .ico-lock { display: none; }
#bilan-form:not(.is-client) [data-full] .ico-lock { display: inline-block; }
#bilan-form:not(.is-client) [data-full] .ico-full { display: none; }

.account {
  max-width: 640px;
}

.account .panel h2 {
  margin: 0 0 10px;
  font-size: var(--fs-h3);
}

.account .panel > p {
  color: var(--c-text-2);
}

.account .form-grid {
  margin-top: 20px;
}

.readout {
  display: grid;
  gap: 1px;
  margin: 0;
  background: var(--c-line);
  border: 1px solid var(--c-line);
  border-radius: 10px;
  overflow: hidden;
}

.readout > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 16px;
  padding: 12px 16px;
  background: var(--c-bg);
}

.readout dt {
  color: var(--c-text-2);
  font-size: 0.93rem;
}

.readout dd {
  margin: 0;
  font-weight: 750;
  font-stretch: 112%;
  font-variant-numeric: tabular-nums;
  color: #fff;
  text-align: right;
  white-space: nowrap;
}

.readout .big dd {
  font-size: 1.6rem;
  color: #fff;
}

.readout .big dd small {
  font-size: 0.95rem;
  color: var(--c-text-2);
  font-weight: 600;
}

.meter {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.meter__row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  font-size: var(--fs-sm);
}

.meter__row b {
  color: var(--c-text-2);
  font-weight: 700;
}

.meter__bar {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  overflow: hidden;
}

.meter__bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--c-brand-deep), var(--c-accent));
  box-shadow: 0 0 12px var(--c-glow);
  transition: width 0.35s var(--ease);
}

.meter__row output {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #fff;
  min-width: 72px;
  text-align: right;
}

.verdict {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--c-line-2);
  background: var(--c-bg);
  font-size: 0.95rem;
  color: var(--c-text-2);
}

.verdict::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--c-text-3);
}

.verdict[data-level="ok"] { border-color: rgba(61, 220, 151, 0.4); }
.verdict[data-level="ok"]::before { background: var(--c-ok); box-shadow: 0 0 10px rgba(61, 220, 151, 0.6); }
.verdict[data-level="warn"] { border-color: rgba(255, 176, 32, 0.45); }
.verdict[data-level="warn"]::before { background: var(--c-warn); box-shadow: 0 0 10px rgba(255, 176, 32, 0.6); }
.verdict[data-level="bad"] { border-color: rgba(255, 90, 79, 0.5); }
.verdict[data-level="bad"]::before { background: var(--c-bad); box-shadow: 0 0 10px rgba(255, 90, 79, 0.7); }

.formula {
  margin: 16px 0 0;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px dashed var(--c-line-2);
  font-size: var(--fs-sm);
  color: var(--c-text-3);
  line-height: 1.6;
}

.formula code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  color: var(--c-text-2);
}

/* Tableau du bilan de puissance */
.loads {
  width: 100%;
  min-width: 860px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.92rem;
}

.loads th {
  padding: 0 6px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--c-text-3);
  text-align: left;
  vertical-align: bottom;
}

.loads input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.loads input[type="number"]::-webkit-inner-spin-button,
.loads input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.loads td {
  padding: 6px 4px;
  vertical-align: middle;
  border-top: 1px solid var(--c-line);
}

.loads .input,
.loads .select {
  min-height: 42px;
  padding: 8px 10px;
  font-size: 0.95rem;
}

.loads .select {
  padding-right: 24px;
  padding-left: 8px;
  background-position: right 5px center;
  background-size: 14px;
}

.loads .cell-out {
  padding-inline: 10px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #fff;
  text-align: right;
  white-space: nowrap;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--c-line-2);
  border-radius: 8px;
  background: transparent;
  color: var(--c-text-3);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}

.icon-btn:hover {
  color: var(--c-bad);
  border-color: rgba(255, 90, 79, 0.5);
  background: rgba(255, 90, 79, 0.08);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.loads-wrap {
  overflow-x: auto;
  margin: 0 -4px;
  padding: 0 4px;
}

.loads col.c-name { width: 21%; }
.loads col.c-zone { width: 12%; }
.loads col.c-qty { width: 7%; }
.loads col.c-power { width: 12%; }
.loads col.c-type { width: 9%; }
.loads col.c-phase { width: 9%; }
.loads col.c-cos { width: 8%; }
.loads col.c-ks { width: 9%; }
.loads col.c-out { width: 9%; }
.loads col.c-del { width: 52px; }

/* Cartes sur petit écran seulement : à l'impression, le tableau garde ses colonnes */
@media screen and (max-width: 900px) {
  .loads,
  .loads tbody,
  .loads tr,
  .loads td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .loads thead {
    display: none;
  }

  .loads tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--c-line);
    border-radius: 12px;
    background: var(--c-bg);
  }

  .loads td {
    padding: 0;
    border: 0;
  }

  .loads td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 6px;
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--c-text-3);
  }

  .loads td.wide {
    grid-column: 1 / -1;
  }

  .loads .cell-out {
    text-align: left;
    padding: 0;
    align-self: end;
  }
}

/* 8. Pied de page --------------------------------------------------------- */

.site-footer {
  position: relative;
  margin-top: 0;
  padding-top: clamp(56px, 7vw, 88px);
  background: #060607;
  border-top: 1px solid var(--c-line);
  font-size: 0.95rem;
  color: var(--c-text-2);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: min(420px, 60%);
  height: 2px;
  background: linear-gradient(90deg, var(--c-brand), transparent);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
  padding-bottom: 48px;
}

.footer-brand .brand svg {
  width: 190px;
}

.footer-brand p {
  margin: 20px 0 22px;
  max-width: 320px;
  font-size: 1.05rem;
  font-weight: 560;
  color: #fff;
  line-height: 1.45;
}

.footer-title {
  margin: 0 0 16px;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-text-3);
}

.footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a,
.footer-contact a {
  color: var(--c-text-2);
  text-decoration: none;
}

.footer-links a:hover,
.footer-contact a:hover {
  color: #fff;
}

.footer-contact {
  font-style: normal;
  line-height: 1.7;
}

.footer-contact p {
  margin-bottom: 12px;
}

.social {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.social a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--c-line-2);
  border-radius: 10px;
  color: var(--c-text-2);
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}

.social a:hover {
  color: #fff;
  border-color: var(--c-brand);
  background: rgba(195, 0, 0, 0.15);
}

.social svg {
  width: 18px;
  height: 18px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  padding-block: 22px 28px;
  border-top: 1px solid var(--c-line);
  font-size: var(--fs-sm);
  color: var(--c-text-3);
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-bottom a {
  color: var(--c-text-3);
  text-decoration: none;
}

.footer-bottom a:hover {
  color: #fff;
}

.footer-consent {
  padding: 0;
  border: 0;
  background: none;
  color: var(--c-text-3);
  font: inherit;
  cursor: pointer;
}

.footer-consent:hover {
  color: #fff;
}

.footer-consent[hidden] {
  display: none;
}

/* Bandeau de consentement (mesure d'audience) : accepter et refuser au même niveau */
.consent {
  position: fixed;
  z-index: 150;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  left: 16px;
  max-width: 480px;
  padding: 18px 20px;
  border: 1px solid var(--c-line-2);
  border-radius: 16px;
  background: #141417;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.9);
  color: var(--c-text-2);
  font-size: var(--fs-sm);
}

.consent p {
  margin: 0 0 14px;
}

.consent .consent__title {
  margin-bottom: 6px;
  color: #fff;
  font-weight: 700;
}

.consent a {
  color: var(--c-accent);
}

.consent__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 640px) {
  .consent {
    right: auto;
    bottom: 24px;
    left: 24px;
  }
}

@media (max-width: 960px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* 9. Animations, accessibilité, impression -------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(6px);
  transition: opacity 0.8s var(--ease), transform 0.9s var(--ease), filter 0.8s var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
  filter: none;
}

.js .reveal[data-delay="1"] { transition-delay: 0.08s; }
.js .reveal[data-delay="2"] { transition-delay: 0.16s; }
.js .reveal[data-delay="3"] { transition-delay: 0.24s; }
.js .reveal[data-delay="4"] { transition-delay: 0.32s; }

/* 10. Mouvement ----------------------------------------------------------- */

/* Transitions entre les pages (navigateurs compatibles, sinon navigation classique) */
@view-transition {
  navigation: auto;
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
}

::view-transition-old(root) {
  animation: vt-out 0.22s var(--ease) both;
}

::view-transition-new(root) {
  animation: vt-in 0.42s var(--ease) both;
}

.site-header {
  view-transition-name: site-header;
}

@keyframes vt-out {
  to { opacity: 0; transform: translateY(-8px); }
}

@keyframes vt-in {
  from { opacity: 0; transform: translateY(12px); }
}

/* Barre de progression de lecture sous l'en-tête */
@supports (animation-timeline: scroll()) {
  .site-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: linear-gradient(90deg, var(--c-brand-deep), var(--c-accent));
    box-shadow: 0 0 12px var(--c-glow);
    transform: scaleX(0);
    transform-origin: 0 50%;
    animation: read-progress linear both;
    animation-timeline: scroll(root block);
    pointer-events: none;
  }

  @keyframes read-progress {
    to { transform: scaleX(1); }
  }
}

/* Titres principaux : les mots montent un à un (découpage par main.js) */
.split-words .w {
  display: inline-block;
  overflow: hidden;
  padding: 0.12em 0 0.14em;
  margin: -0.12em 0 -0.14em;
  vertical-align: top;
}

.split-words .w > span {
  display: inline-block;
  transform: translateY(115%);
  animation: word-up 0.9s var(--ease) both;
  animation-delay: calc(0.08s + var(--i) * 0.045s);
}

@keyframes word-up {
  to { transform: none; }
}

/* Surtitres : le trait se dessine */
.hero .eyebrow::before,
.page-hero .eyebrow::before {
  animation: line-in 0.8s 0.15s var(--ease) both;
}

.js .reveal .eyebrow::before,
.js .eyebrow.reveal::before {
  width: 0;
  transition: width 0.7s 0.25s var(--ease);
}

.js .reveal.is-visible .eyebrow::before,
.js .eyebrow.reveal.is-visible::before {
  width: 28px;
}

@keyframes line-in {
  from { width: 0; }
}

/* Cartes : lueur qui suit le pointeur, bordure éclairée, pictogramme qui s'anime */
.card {
  isolation: isolate;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 74, 61, 0.13), transparent 45%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}

.card::after {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: inherit;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 96, 76, 0.85), transparent 65%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}

.card:hover::before,
.card:hover::after,
.card:focus-within::before {
  opacity: 1;
}

.card__icon {
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), background-color 0.4s var(--ease);
}

.card:hover .card__icon {
  transform: translateY(-3px) scale(1.06);
  background: rgba(195, 0, 0, 0.22);
  box-shadow: 0 0 28px -6px var(--c-glow);
}

/* Boutons : reflet qui balaie le bouton au survol */
.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.btn::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  width: 55%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: translateX(-170%) skewX(-14deg);
  pointer-events: none;
}

.btn:hover::after {
  transform: translateX(270%) skewX(-14deg);
  transition: transform 0.8s var(--ease);
}

.btn--ghost::after {
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.12), transparent);
}

/* Courant électrique : une impulsion court le long des bordures de section */
.section--alt::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-accent), transparent) no-repeat;
  background-size: 22% 100%;
  animation: wire 9s linear infinite;
  opacity: 0.8;
  pointer-events: none;
}

@keyframes wire {
  from { background-position: -40% 0; }
  to { background-position: 140% 0; }
}

/* En-tête des pages : impulsion le long d'une ligne de la grille */
.page-hero::after {
  content: "";
  position: absolute;
  top: 144px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-accent), transparent) no-repeat;
  background-size: 18% 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent 25%, #000 90%);
  mask-image: linear-gradient(90deg, transparent 25%, #000 90%);
  filter: drop-shadow(0 0 4px var(--c-accent));
  animation: wire 7s 1s linear infinite both;
  pointer-events: none;
}

/* Accueil : lueur qui suit le pointeur et impulsions dans la grille */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(520px circle at var(--px, 72%) var(--py, 30%), rgba(255, 60, 40, 0.11), transparent 60%);
  pointer-events: none;
}

.hero__pulses {
  position: absolute;
  inset: 0;
  -webkit-mask-image: radial-gradient(80% 80% at 70% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(80% 80% at 70% 40%, #000 20%, transparent 75%);
  pointer-events: none;
}

.hero__pulses span {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-accent), transparent) no-repeat;
  background-size: 16% 100%;
  filter: drop-shadow(0 0 5px var(--c-accent));
  animation: wire 8s linear infinite both;
}

.hero__pulses span:nth-child(1) { top: 168px; }
.hero__pulses span:nth-child(2) { top: 336px; animation-duration: 11s; animation-delay: -4s; }
.hero__pulses span:nth-child(3) { top: 504px; animation-duration: 9s; animation-delay: -7s; }

.hero__pulses span:nth-child(n + 4) {
  top: 0;
  bottom: 0;
  left: auto;
  right: auto;
  width: 1px;
  height: auto;
  background: linear-gradient(180deg, transparent, var(--c-accent), transparent) no-repeat;
  background-size: 100% 22%;
  animation-name: wire-y;
}

.hero__pulses span:nth-child(4) { left: 784px; animation-duration: 10s; animation-delay: -2s; }
.hero__pulses span:nth-child(5) { left: 1120px; animation-duration: 13s; animation-delay: -6s; }

@keyframes wire-y {
  from { background-position: 0 -40%; }
  to { background-position: 0 140%; }
}

@media (max-width: 960px) {
  .hero__pulses {
    display: none;
  }
}

/* Accueil : grand bandeau des métiers, qui défile avec la page */
.kinetic {
  overflow: hidden;
  padding-block: clamp(28px, 5vw, 64px);
  border-top: 1px solid var(--c-line);
  background: var(--c-bg);
}

.kinetic__row + .kinetic__row {
  margin-top: 0.1em;
}

.kinetic__track {
  display: flex;
  width: max-content;
  font-size: clamp(2.6rem, 1.4rem + 5.2vw, 7rem);
  font-weight: 800;
  font-stretch: 112%;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  transform: translate3d(var(--shift, 0px), 0, 0);
  will-change: transform;
}

.kinetic__track span {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding-right: 0.45em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
}

.kinetic__track span:nth-child(3n + 2) {
  color: var(--c-accent);
  -webkit-text-stroke: 0;
}

/* Texte du bandeau porté par data-t : purement décoratif, il n'est ni lu ni indexé */
.kinetic__track span::before {
  content: attr(data-t);
}

.kinetic__track span::after {
  content: "";
  width: 0.2em;
  height: 0.2em;
  background: var(--c-brand);
  transform: rotate(45deg);
}

.kinetic__row--alt .kinetic__track {
  font-size: clamp(1.6rem, 1rem + 2.8vw, 3.8rem);
}

.kinetic__row--alt .kinetic__track span {
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.22);
}

.kinetic__row--alt .kinetic__track span:nth-child(3n + 2) {
  color: var(--c-text);
}

/* Bandeau d'appel à l'action : reflet qui tourne lentement */
.cta-band::after {
  content: "";
  position: absolute;
  inset: -60%;
  background: conic-gradient(from 0deg, transparent 0 70%, rgba(255, 255, 255, 0.1) 80%, transparent 90%);
  animation: cta-spin 14s linear infinite;
  pointer-events: none;
}

.cta-band__inner {
  z-index: 1;
}

@keyframes cta-spin {
  to { transform: rotate(1turn); }
}

/* Photos : léger mouvement au défilement */
@supports (animation-timeline: view()) {
  .media:not(.media--white) img {
    animation: media-drift linear both;
    animation-timeline: view();
  }

  @keyframes media-drift {
    from { transform: scale(1.12) translateY(-3%); }
    to { transform: scale(1.12) translateY(3%); }
  }
}

/* 11. Calculette électro ------------------------------------------------- */
.page-hero--compact {
  padding-block: clamp(40px, 5vw, 72px) clamp(28px, 4vw, 48px);
}

.calc-section {
  padding-top: clamp(28px, 4vw, 48px);
}

.calc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(16px, 2.4vw, 28px);
  align-items: start;
}

.readout > div[hidden] {
  display: none;
}

/* Appareil : réglages, écran, pavé */
.calc__device {
  display: grid;
  gap: 16px;
  padding: clamp(16px, 2.2vw, 24px);
  border: 1px solid var(--c-line-2);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 40%), var(--c-surface);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.calc__settings {
  display: grid;
  gap: 14px;
}

.calc__phases .segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
}

/* Japon : monophasé, biphasé et triphasé */
.calc__phases .segmented.has-bi {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.calc__phases .segmented [hidden] {
  display: none;
}

.calc__phases .segmented label {
  text-align: center;
}

.calc__phases,
.calc__units,
.calc__limit {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.calc__phases legend {
  margin-bottom: 8px;
  font-size: var(--fs-sm);
  font-weight: 650;
  color: var(--c-text);
}

.calc__phases label span {
  font-weight: 500;
}

.calc__custom {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.calc__custom[hidden] {
  display: none;
}

.calc__screen {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--c-line);
  border-radius: 16px;
  background:
    repeating-linear-gradient(180deg, rgba(255, 74, 61, 0.035) 0 1px, transparent 1px 22px),
    radial-gradient(120% 120% at 100% 0%, rgba(195, 0, 0, 0.2), transparent 55%),
    #060607;
  box-shadow: inset 0 2px 14px rgba(0, 0, 0, 0.7);
}

.calc__entry {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  transition: border-color 0.2s, background-color 0.2s;
}

.calc__entry.is-active {
  border-color: rgba(255, 74, 61, 0.55);
  background: rgba(255, 74, 61, 0.07);
}

.calc__entry:focus-within {
  border-color: var(--c-accent);
}

.calc__entry.is-invalid {
  border-color: var(--c-bad);
}

.calc__label {
  margin: 0;
  font-size: var(--fs-xs);
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-text-3);
}

/* « cos φ » : pas de majuscules (φ deviendrait Φ) */
.calc__label--plain {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: none;
}

.calc__line {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.calc__input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 1.5rem;
  font-weight: 750;
  font-stretch: 112%;
  font-variant-numeric: tabular-nums;
  caret-color: var(--c-accent);
}

.calc__input::placeholder {
  color: var(--c-text-3);
}

.calc__input--main {
  font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.2rem);
  line-height: 1.1;
  text-align: right;
}

.calc__unit {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--c-accent);
}

.calc__entry--main .calc__unit {
  min-width: 2.6em;
  font-size: 1.4rem;
}

.segmented--fill {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: 100%;
}

.segmented--fill label {
  padding: 10px 4px;
  text-align: center;
}

.segmented--sm label {
  padding: 6px 10px;
  font-size: var(--fs-xs);
}

.calc__minis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.calc__pad {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.calc__key {
  display: grid;
  place-items: center;
  min-height: 58px;
  border: 1px solid var(--c-line-2);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--c-surface-3), var(--c-surface-2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 0 rgba(0, 0, 0, 0.5);
  color: #fff;
  font: inherit;
  font-size: 1.45rem;
  font-weight: 700;
  font-stretch: 112%;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s, transform 0.08s;
}

.calc__key svg {
  width: 24px;
  height: 24px;
}

.calc__key:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.calc__key:active {
  transform: translateY(1px) scale(0.98);
}

.calc__key.is-pressed {
  animation: calc-key 0.3s var(--ease);
}

.calc__key:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

.calc__key--fn {
  color: var(--c-text-2);
  font-size: 1.2rem;
}

.calc__key--zero {
  grid-column: span 2;
}

.calc__key--save {
  border-color: transparent;
  background: linear-gradient(180deg, var(--c-brand-hover), var(--c-brand));
  font-size: 1.9rem;
}

.calc__key--save:hover {
  border-color: transparent;
  background: var(--c-brand-hover);
}

@keyframes calc-key {
  from { box-shadow: 0 0 0 3px rgba(255, 74, 61, 0.45); }
  to { box-shadow: 0 0 0 0 rgba(255, 74, 61, 0); }
}

.calc.is-pad-off .calc__pad {
  display: none;
}

.calc__padtoggle {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--c-text-2);
  font: inherit;
  font-size: var(--fs-sm);
  cursor: pointer;
}

.calc__padtoggle[hidden] {
  display: none;
}

.calc__padtoggle svg {
  width: 18px;
  height: 18px;
}

/* Résultats */
.calc__results {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  display: grid;
  gap: 14px;
  padding: clamp(18px, 2.4vw, 28px);
  border: 1px solid rgba(255, 74, 61, 0.3);
  border-radius: 22px;
  background: radial-gradient(120% 80% at 100% 0%, rgba(195, 0, 0, 0.16), transparent 60%), var(--c-surface);
}

.calc__main {
  display: grid;
  gap: 4px;
}

.calc__big {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
  color: #fff;
  font-size: clamp(2.8rem, 2rem + 3vw, 4.4rem);
  font-weight: 800;
  font-stretch: 115%;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.02em;
}

.calc__big small {
  color: var(--c-accent);
  font-size: 0.4em;
  font-weight: 700;
  letter-spacing: 0;
}

.calc__big output.is-updated {
  animation: calc-flash 0.5s var(--ease);
}

@keyframes calc-flash {
  from { color: #ffd9d6; text-shadow: 0 0 24px var(--c-glow); }
  to { color: #fff; text-shadow: none; }
}

.calc__context {
  margin: 6px 0 0;
  color: var(--c-text-2);
  font-size: var(--fs-sm);
}

.calc__block {
  padding: 16px;
  border: 1px solid var(--c-line);
  border-radius: 14px;
  background: var(--c-bg);
}

.calc__h {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin: 0 0 12px;
  font-size: var(--fs-h4);
}

.calc__h svg {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--c-accent);
}

.calc__h-sub {
  color: var(--c-text-2);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.calc__pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.calc__pair strong {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-size: 1.15rem;
  font-stretch: 108%;
}

.calc__load {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  align-items: center;
  margin-top: 14px;
}

.calc__load .calc__label {
  grid-column: 1 / -1;
}

.calc__gauge {
  height: 10px;
  overflow: hidden;
  border: 1px solid var(--c-line);
  border-radius: 999px;
  background: var(--c-surface-2);
}

.calc__gauge i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--c-ok), #8ff0c4);
  transition: width 0.4s var(--ease);
}

.calc__gauge i[data-level="warn"] {
  background: linear-gradient(90deg, var(--c-warn), #ffd27a);
}

.calc__loadval {
  color: var(--c-text);
  font-size: var(--fs-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.calc__note {
  margin: 12px 0 0;
  color: var(--c-warn);
  font-size: var(--fs-sm);
}

.calc__hint {
  margin: 0;
  color: var(--c-text-2);
  font-size: var(--fs-sm);
}

.calc__dropval {
  margin: 0 0 12px;
  color: #fff;
  font-size: 2.2rem;
  font-weight: 800;
  font-stretch: 112%;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.calc__dropval small {
  color: var(--c-accent);
  font-size: 0.5em;
}

.calc__drop .verdict {
  margin-top: 14px;
}

.readout--sm {
  margin-top: 14px;
}

.readout--sm > div {
  padding: 10px 14px;
}

.readout--sm dd {
  font-size: 0.95rem;
}

.calc__other {
  margin-top: 14px;
}

.calc__other summary {
  color: var(--c-text-2);
  font-size: var(--fs-sm);
  font-weight: 650;
  cursor: pointer;
}

.calc__other .form-grid {
  margin-top: 12px;
}

.calc__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.calc__actions .btn svg,
.calc-history__head .btn svg {
  width: 18px;
  height: 18px;
}

.calc__toast {
  min-height: 1.4em;
  margin: 0;
  color: var(--c-ok);
  font-size: var(--fs-sm);
  font-weight: 650;
  opacity: 0;
  transition: opacity 0.2s;
}

.calc__toast.is-shown {
  opacity: 1;
}

.calc.is-saved .calc__results {
  animation: calc-saved 0.7s var(--ease);
}

@keyframes calc-saved {
  from { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.5); }
  to { box-shadow: 0 0 0 16px rgba(61, 220, 151, 0); }
}

/* Historique */
.calc-history {
  margin-top: clamp(24px, 3vw, 36px);
  padding: clamp(18px, 2.4vw, 26px);
  border: 1px solid var(--c-line);
  border-radius: 22px;
  background: var(--c-bg-2);
}

.calc-history__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.calc-history__head h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: var(--fs-h4);
}

.calc-history__head h3 svg {
  width: 20px;
  height: 20px;
  color: var(--c-accent);
}

.calc-history__head .btn[hidden] {
  display: none;
}

.calc-history__head .btn.is-armed {
  border-color: var(--c-bad);
  color: var(--c-bad);
}

.calc-history__empty {
  margin: 12px 0 0;
  color: var(--c-text-3);
  font-size: var(--fs-sm);
}

.calc-history__list {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.calc-history__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 16px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--c-line);
  border-radius: 12px;
  background: var(--c-surface);
}

.calc-history__main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin: 0;
}

.calc-history__main strong {
  color: #fff;
  font-size: 1.2rem;
  font-stretch: 112%;
  font-variant-numeric: tabular-nums;
}

.calc-history__main span {
  color: var(--c-text-2);
  font-size: var(--fs-sm);
}

.calc-history__meta {
  margin: 4px 0 0;
  color: var(--c-text-3);
  font-size: var(--fs-xs);
}

.calc-history__acts {
  display: flex;
  gap: 6px;
}

.calc-history__btn {
  display: inline-grid;
  place-items: center;
  min-height: 40px;
  min-width: 40px;
  padding: 6px 12px;
  border: 1px solid var(--c-line-2);
  border-radius: 9px;
  background: var(--c-bg);
  color: var(--c-text);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 650;
  cursor: pointer;
}

.calc-history__btn:hover {
  border-color: rgba(255, 255, 255, 0.25);
}

.calc-history__btn:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

.calc-history__btn svg {
  display: block;
  width: 16px;
  height: 16px;
}

/* Installation */
.calc-install {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  color: var(--c-text-2);
}

.calc-install li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.calc-install svg,
.calc-install__done svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--c-accent);
}

.calc-install__done {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--c-ok);
  font-weight: 650;
}

.calc-install__done svg {
  color: var(--c-ok);
}

.calc-install__done[hidden] {
  display: none;
}

#calc-install svg {
  width: 18px;
  height: 18px;
}

.calc-phone {
  justify-self: center;
  width: min(320px, 70vw);
  margin: 0;
  padding: 10px;
  border-radius: 36px;
  background: linear-gradient(160deg, #2a2a30, #0c0c0e);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 60px -20px var(--c-glow);
}

.calc-phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 28px;
}

/* Barre de l'appli installée : visible seulement en mode application */
.calc-appbar {
  display: none;
}

/* Mobile : réglages, écran, résultat principal, pavé, puis le détail */
@media (max-width: 960px) {
  .calc {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .calc__device,
  .calc__results {
    display: contents;
  }

  .calc__settings { order: 1; }
  .calc__screen { order: 2; }
  .calc__main { order: 3; }
  .calc__pad { order: 4; }
  .calc__padtoggle { order: 5; }
  .calc__powers { order: 6; }
  #calc-reco { order: 7; }
  #chute-de-tension { order: 8; }
  .calc__actions { order: 9; }
  .calc__toast { order: 10; }

  .calc__main {
    gap: 2px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 74, 61, 0.3);
    border-radius: 16px;
    background: radial-gradient(120% 80% at 100% 0%, rgba(195, 0, 0, 0.16), transparent 60%), var(--c-surface);
  }

  .calc__big {
    font-size: clamp(2.2rem, 1.7rem + 4vw, 3.2rem);
  }

  .calc__context {
    margin-top: 4px;
  }

  /* Écran compact : tout tient sur un téléphone, du réseau au pavé */
  .calc__settings {
    gap: 10px;
  }

  .calc__settings .field > label,
  .calc__phases legend {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .calc__screen {
    gap: 8px;
    padding: 10px;
  }

  .calc__entry {
    padding: 8px 10px;
  }

  .calc__more {
    display: none;
  }

  .calc__input--main {
    font-size: clamp(2rem, 1.5rem + 3vw, 2.6rem);
  }

  .calc__pad {
    gap: 7px;
  }
}

@media (max-width: 520px) {
  .calc__custom {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Trois raccordements côte à côte : la tension passe sous le nom */
  .calc__phases .segmented label {
    padding: 7px 4px;
    line-height: 1.25;
  }

  .calc__phases label span {
    display: block;
    font-size: 0.85em;
  }

  .calc__key {
    min-height: 52px;
  }
}

/* Mode application (calculette installée sur l'écran d'accueil) */
.is-app .skip-link,
.is-app .site-header,
.is-app .site-footer,
.is-app main > section:not(.calc-section) {
  display: none;
}

.is-app .calc-appbar {
  display: flex;
  justify-content: center;
  padding: calc(env(safe-area-inset-top) + 8px) 16px 0;
}

.is-app .calc-appbar__brand {
  display: inline-flex;
  color: var(--c-brand);
}

.is-app .calc-appbar__brand svg {
  width: auto;
  height: 18px;
}

.is-app .calc-section {
  padding-top: 8px;
  padding-bottom: calc(env(safe-area-inset-bottom) + 24px);
}

.is-app .calc__results {
  top: 12px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
    filter: none;
  }

  .js .reveal .eyebrow::before,
  .js .eyebrow.reveal::before {
    width: 28px;
  }

  .section--alt::after,
  .page-hero::after,
  .hero__pulses,
  .cta-band::after {
    display: none;
  }

  .media:not(.media--white) img {
    animation: none;
  }

  .kinetic__track {
    transform: none;
  }

  .sld .flow {
    display: none;
  }

  .marquee__track {
    animation: none;
    flex-wrap: wrap;
    width: auto;
    gap: 16px 40px;
  }

  .marquee__track [aria-hidden="true"] {
    display: none;
  }

  .calc__big output.is-updated,
  .calc.is-saved .calc__results,
  .calc__key.is-pressed {
    animation: none;
  }

  .calc__gauge i,
  .calc__key {
    transition: none;
  }
}

.print-only {
  display: none;
}

@media print {
  :root {
    color-scheme: light;
    --c-bg: #fff;
    --c-text: #111;
    --c-text-2: #333;
    --c-text-3: #555;
    --c-surface: #fff;
    --c-line: #ccc;
  }

  /* Aucun fond à l'impression : Safari repeint le fond de la page par-dessus le formulaire,
     qui disparaissait du PDF. Le papier est blanc de toute façon. */
  html,
  body {
    background: none !important;
  }

  body {
    color: #111;
    font-size: 11pt;
  }

  /* Pas de transition : l'impression montre l'état final de chaque élément */
  *,
  *::before,
  *::after {
    transition: none !important;
  }

  .js .reveal {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  .consent,
  #nl-badge-frame,
  #nl-hud-frame {
    display: none !important;
  }

  .site-header,
  .site-footer,
  .no-print,
  .skip-link,
  .cta-band,
  .breadcrumb {
    display: none !important;
  }

  .print-only {
    display: block;
  }

  .page-hero,
  .section,
  .panel,
  .panel--result {
    background: none !important;
    border-color: #ccc !important;
    padding-block: 12px;
    position: static;
  }

  .page-hero::before,
  .section--grid {
    background-image: none;
  }

  h1, h2, h3, strong, .readout dd, .loads .cell-out {
    color: #000 !important;
  }

  .readout,
  .readout > div,
  .loads tr {
    background: none !important;
  }

  .readout > div + div {
    border-top: 1px solid #ccc;
  }

  .input,
  .select {
    border-color: #999;
    background: none;
    color: #000;
  }

  .input:focus,
  .select:focus {
    border-color: #999 !important;
    outline: none !important;
    box-shadow: none !important;
  }

  /* Champs vides : pas d'exemple imprimé comme s'il s'agissait d'une donnée */
  .input::placeholder,
  .textarea::placeholder {
    color: transparent !important;
  }

  /* Réseau choisi : lisible sans fond coloré */
  .segmented input:checked + label {
    background: none;
    color: #000;
    font-weight: 700;
    text-decoration: underline;
  }

  .segmented label {
    color: #888;
  }

  /* Tableau des lignes : en entier, sans la colonne de suppression */
  .loads-wrap {
    overflow: visible;
  }

  .loads th:last-child,
  .loads td:last-child,
  .loads tbody tr:has([data-k="power"]:placeholder-shown) {
    display: none;
  }

  .loads {
    min-width: 0;
  }

  .loads col.c-del {
    width: 0;
  }

  .loads th {
    font-size: 7pt;
  }

  .loads .input,
  .loads .select {
    min-height: 0;
    height: auto;
    padding: 4px 6px;
    font-size: 9pt;
  }

  .loads tr {
    break-inside: avoid;
  }

  .tool {
    grid-template-columns: 1fr;
  }

  a {
    color: #000;
  }
}

/* Éléments à compléter avant mise en ligne */
mark.todo {
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 176, 32, 0.16);
  color: #ffd58a;
  font-weight: 600;
}

/* Questions fréquentes */
.faq h2 {
  margin: 64px 0 8px;
  font-size: clamp(1.45rem, 1.2rem + 1vw, 2rem);
}

.faq h2:first-child {
  margin-top: 0;
}

.faq-item {
  padding: 24px 0;
  border-bottom: 1px solid var(--c-line);
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.faq-item h3 {
  margin-bottom: 10px;
  font-size: var(--fs-h4);
  font-stretch: 105%;
}

.faq-answer p {
  margin: 0;
  color: var(--c-text-2);
}

.faq-answer p + p {
  margin-top: 0.8em;
}

/* Lexique */
.glossary {
  margin: 0;
}

.glossary__item {
  display: grid;
  grid-template-columns: minmax(0, 0.36fr) minmax(0, 1fr);
  gap: 6px 32px;
  padding: 20px 0;
  border-bottom: 1px solid var(--c-line);
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.glossary dt {
  font-weight: 750;
  font-stretch: 108%;
  color: #fff;
}

.glossary dd {
  margin: 0;
  color: var(--c-text-2);
}

.glossary__item:target,
.glossary__item:has(> dt:target) {
  background: rgba(195, 0, 0, 0.08);
  box-shadow: inset 3px 0 0 var(--c-brand);
  padding-left: 16px;
}

@media (max-width: 640px) {
  .glossary__item { grid-template-columns: minmax(0, 1fr); }
}

/* Recherche dans le lexique : champ collé sous l'en-tête pendant le défilement */
.glossary-search {
  position: sticky;
  top: var(--header-h);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-line);
}

.glossary-search[hidden],
.glossary-empty[hidden],
.glossary__item[hidden] {
  display: none;
}

.glossary-search__field {
  position: relative;
  flex: 1;
  min-width: 0;
}

.glossary-search__field svg {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--c-text-3);
  transform: translateY(-50%);
  pointer-events: none;
}

.glossary-search__field .input {
  padding-left: 42px;
  -webkit-appearance: none;
  appearance: none;
}

.glossary-search__count {
  flex: none;
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--c-text-3);
  font-variant-numeric: tabular-nums;
}

.glossary-empty {
  margin: 0;
  padding: 24px 0;
  color: var(--c-text-2);
}

/* Lien vers un terme : il s'affiche sous la barre de recherche (l'ancre est portée par le terme) */
.glossary-search:not([hidden]) ~ .glossary dt {
  scroll-margin-top: 84px;
}

/* Encadré « À retenir » et bloc « En bref » */
.takeaways {
  margin: 0 0 40px;
  padding: 22px 24px;
  border: 1px solid rgba(255, 74, 61, 0.3);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(195, 0, 0, 0.14), transparent 60%),
    var(--c-surface);
}

.takeaways .check-list {
  margin: 0;
}

.takeaways .check-list li:last-child {
  margin-bottom: 0;
}

.brief {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}

.brief__text > p:not(.eyebrow) {
  margin: 0;
  font-size: var(--fs-lg);
  color: #e2e2e6;
}

.brief__media {
  margin: 0;
}

@media (max-width: 860px) {
  .brief { grid-template-columns: minmax(0, 1fr); }
}
