/* ==========================================================================
   secher-en-scierie.fr — feuille de style
   Identité : B2B industriel. Anthracite / acier + un accent ambre (chaleur).
   Typo technique : sans-serif système pour le corps, monospace système pour
   les libellés de données et les kickers. Mobile-first, zéro dépendance.
   ========================================================================== */

:root {
  --anthracite: #14181d;
  --acier-fonce: #1e252d;
  --acier: #2b333d;
  --acier-clair: #3a4653;
  --gris-ligne: #d7dce2;
  --gris-fond: #f2f4f6;
  --gris-fond2: #e9edf1;
  --texte: #1d242c;
  --texte-doux: #55606c;
  --texte-inverse: #e8edf2;
  --texte-inverse-doux: #9aa7b4;
  --ambre: #d97a1e;
  --ambre-fonce: #b7620f;
  --ambre-voile: #fbf1e5;
  --lien: #a3560b;        /* teinte ambre assombrie pour contraste AA sur fond clair */
  --vert: #2f7d55;
  --ombre-carte: 0 1px 2px rgba(20, 24, 29, 0.04), 0 2px 8px rgba(20, 24, 29, 0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

/* Cible d'ancre : décale le point d'arrêt sous le sommet du viewport */
:target { scroll-margin-top: 1.2rem; }

/* ---------- Accessibilité : focus visible & lien d'évitement ---------- */

a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--ambre);
  outline-offset: 2px;
  border-radius: 2px;
}
.hero a:focus-visible,
.nav a:focus-visible,
.cta-bloc a:focus-visible,
.pied a:focus-visible {
  outline-color: #ffb968;
}

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -3rem;
  z-index: 100;
  background: var(--ambre);
  color: #1a1206;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.55rem 0.9rem;
  border-radius: 3px;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0.5rem; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--texte);
  background: #ffffff;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

/* ---------- En-tête ---------- */

.entete {
  background: var(--anthracite);
  border-bottom: 3px solid var(--ambre);
}

.entete-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 1.1rem 1.25rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.logo-mark { flex: 0 0 auto; line-height: 0; }

.marque {
  text-decoration: none;
  color: var(--texte-inverse);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.marque b { color: var(--ambre); font-weight: 800; }

.sous-marque {
  flex: 1 1 100%;
  font-size: 0.8rem;
  color: var(--texte-inverse-doux);
  letter-spacing: 0.01em;
  margin-top: 0.15rem;
}

/* ---------- Navigation ---------- */

.nav { background: var(--acier-fonce); }

.nav ul {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 0.6rem;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
}

.nav a {
  display: block;
  padding: 0.65rem 0.85rem;
  color: var(--texte-inverse-doux);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav a:hover, .nav a:focus { color: #fff; }
.nav a[aria-current="page"] {
  color: #fff;
  border-bottom-color: var(--ambre);
}
.nav .nav-cta { margin-left: auto; color: var(--ambre); }
.nav .nav-cta:hover { color: var(--ambre-fonce); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background: var(--anthracite);
  color: var(--texte-inverse);
  background-image:
    radial-gradient(120% 90% at 85% 0%, rgba(217, 122, 30, 0.10) 0%, rgba(217, 122, 30, 0) 55%),
    linear-gradient(180deg, #14181d 0%, #1a2129 100%);
}
.hero-inner {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
  padding: 2.4rem 1.25rem 2.6rem;
}
.kicker {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ambre);
  margin-bottom: 0.9rem;
}
.hero h1 {
  font-size: 1.9rem;
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
  margin-bottom: 0.9rem;
}
.hero h1 em { color: var(--ambre); font-style: normal; }
.hero-sub {
  font-size: 1.08rem;
  color: var(--texte-inverse-doux);
  max-width: 40em;
  margin-bottom: 1.5rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }

/* ---------- Boutons ---------- */

.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1.15rem;
  border-radius: 3px;
  letter-spacing: 0.01em;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}
.btn-primary { background: var(--ambre); color: #1a1206; border: 2px solid var(--ambre); }
.btn-primary:hover { background: var(--ambre-fonce); border-color: var(--ambre-fonce); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(217, 122, 30, 0.32); }
.btn-primary:active { transform: translateY(0); box-shadow: none; }
.btn-ghost { background: transparent; color: var(--texte-inverse); border: 2px solid var(--acier-clair); }
.btn-ghost:hover { border-color: var(--texte-inverse); transform: translateY(-1px); }
.btn-ghost:active { transform: translateY(0); }

/* ---------- Corps ---------- */

main { max-width: 880px; margin: 0 auto; padding: 2rem 1.25rem 3rem; }

.maj {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  color: var(--texte-doux);
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--anthracite);
  margin: 2.5rem 0 0.9rem;
  padding-top: 1.1rem;
  border-top: 2px solid var(--gris-ligne);
  scroll-margin-top: 1.2rem;
}
h2 .num {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--ambre);
  font-size: 1rem;
  margin-right: 0.5rem;
}

h3 {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--acier);
  margin: 1.6rem 0 0.5rem;
  scroll-margin-top: 1.2rem;
}

p { margin-bottom: 1rem; }
ul, ol { margin: 0 0 1rem 1.35rem; }
li { margin-bottom: 0.45rem; }

a { color: var(--lien); }
a:hover { color: var(--ambre-fonce); }

strong { color: var(--anthracite); }

.chapeau { font-size: 1.12rem; color: var(--texte-doux); margin-bottom: 1.6rem; }

/* ---------- Bandeau de chiffres (stats) ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--gris-ligne);
  border: 1px solid var(--gris-ligne);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--ombre-carte);
  margin: 1.8rem 0;
}
.stat { background: #fff; padding: 1rem 1.1rem; position: relative; }
.stat::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--ambre);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.stat:hover::before { opacity: 1; }
.stat .n {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ambre-fonce);
  line-height: 1.1;
}
.stat .l { font-size: 0.85rem; color: var(--texte-doux); margin-top: 0.25rem; }

/* ---------- Sommaire (ancres) ---------- */

.sommaire {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.65rem;
  background: var(--gris-fond);
  border: 1px solid var(--gris-ligne);
  border-left: 4px solid var(--ambre);
  padding: 0.75rem 1rem;
  margin: 1.8rem 0;
}
.sommaire-titre {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--texte-doux);
  margin-right: 0.2rem;
}
.sommaire a {
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--acier);
  border-bottom: 1px solid var(--gris-ligne);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.sommaire a:hover { color: var(--ambre-fonce); border-bottom-color: var(--ambre); }

/* ---------- Encadrés ---------- */

.encadre {
  background: var(--gris-fond);
  border: 1px solid var(--gris-ligne);
  border-left: 4px solid var(--acier);
  border-radius: 0 4px 4px 0;
  padding: 1rem 1.2rem;
  margin: 1.3rem 0;
  font-size: 0.98rem;
  box-shadow: var(--ombre-carte);
}
.encadre-titre {
  display: block;
  font-weight: 700;
  color: var(--anthracite);
  margin-bottom: 0.35rem;
  letter-spacing: 0.01em;
}
.encadre.exemple { border-left-color: var(--ambre); background: var(--ambre-voile); }
.encadre.alerte { border-left-color: var(--acier-clair); background: var(--gris-fond2); }

/* ---------- Repères techniques (grille de specs) ---------- */

.specs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--gris-ligne);
  border: 1px solid var(--gris-ligne);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--ombre-carte);
  margin: 1.4rem 0;
}
.spec { background: #fff; padding: 0.85rem 1.1rem; display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.spec .k { font-size: 0.9rem; color: var(--texte-doux); }
.spec .v {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  color: var(--anthracite);
  text-align: right;
}

.normes {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  color: var(--texte-doux);
  background: var(--gris-fond);
  border: 1px solid var(--gris-ligne);
  padding: 0.75rem 1rem;
  margin: 1rem 0 1.4rem;
  line-height: 1.9;
}
.normes b { color: var(--anthracite); }

/* ---------- Tableaux ---------- */

.tableau-wrap {
  overflow-x: auto;
  margin: 1.4rem 0;
  border: 1px solid var(--gris-ligne);
  border-radius: 4px;
  box-shadow: var(--ombre-carte);
  -webkit-overflow-scrolling: touch;
}
.tableau-wrap table { margin: 0; }
table { border-collapse: collapse; width: 100%; min-width: 30rem; font-size: 0.94rem; }
.tableau-wrap th:first-child, .tableau-wrap td:first-child { border-left: none; }
.tableau-wrap th:last-child, .tableau-wrap td:last-child { border-right: none; }
.tableau-wrap tr:first-child th { border-top: none; }
th, td { border: 1px solid var(--gris-ligne); padding: 0.6rem 0.75rem; text-align: left; vertical-align: top; }
th {
  background: var(--acier);
  color: #fff;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
td.mono, th.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
tr:nth-child(even) td { background: var(--gris-fond); }
tr.surligne td { background: var(--ambre-voile); font-weight: 600; }

/* Table comparative vendre vert / sécher */
.calc-table th:first-child { background: var(--anthracite); }
.calc-table td:first-child { font-weight: 600; color: var(--anthracite); }
.calc-table th:last-child { background: #9a5109; }  /* ambre profond, contraste AA avec le texte blanc */

/* ---------- Étapes (procédé) ---------- */

.etapes { list-style: none; margin: 1.5rem 0; padding: 0; }
.etape {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--gris-ligne);
}
.etape:last-child { border-bottom: none; }
.etape .idx {
  flex: 0 0 auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  background: var(--acier);
  width: 2.2rem; height: 2.2rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 3px;
}
.etape:nth-child(odd) .idx { background: var(--ambre); color: #1a1206; }
.etape .corps h3 { margin: 0 0 0.25rem; }
.etape .corps p { margin: 0; }

/* ---------- Deux configurations ---------- */

.configs { display: grid; grid-template-columns: 1fr; gap: 1rem; margin: 1.5rem 0; }
.config {
  border: 1px solid var(--gris-ligne);
  border-top: 3px solid var(--acier);
  padding: 1.1rem 1.2rem;
  background: #fff;
  box-shadow: var(--ombre-carte);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.config:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(20, 24, 29, 0.10); }
.config.solaire { border-top-color: var(--ambre); }
.config h3 { margin-top: 0.2rem; }
.config .tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--texte-doux);
}
.config .config-pour {
  font-size: 0.78rem;
  color: var(--texte-doux);
  margin: 0.6rem 0 0;
  padding-top: 0.55rem;
  border-top: 1px dashed var(--gris-ligne);
}

/* ---------- FAQ ---------- */

.faq-item { border-bottom: 1px solid var(--gris-ligne); padding-bottom: 1.1rem; margin-bottom: 1.2rem; }
.faq-item h3 { margin-top: 1.2rem; font-size: 1.08rem; color: var(--anthracite); }

/* ---------- Bloc CTA fort ---------- */

.cta-bloc {
  background: var(--anthracite);
  background-image: linear-gradient(180deg, #1a2129 0%, #14181d 100%);
  color: var(--texte-inverse);
  padding: 1.8rem 1.4rem;
  margin: 2.5rem 0 1rem;
  border-radius: 4px;
  border-left: 4px solid var(--ambre);
  box-shadow: 0 6px 22px rgba(20, 24, 29, 0.14);
}
.cta-bloc h2 { color: #fff; border-top: none; padding-top: 0; margin-top: 0; }
.cta-bloc p { color: var(--texte-inverse-doux); }
.cta-bloc .hero-actions { margin-top: 1.1rem; }

/* ---------- Passerelle / guide ---------- */

.passerelle {
  margin: 2rem 0 0;
  padding: 0.9rem 1.2rem;
  border: 1px solid var(--gris-ligne);
  background: var(--gris-fond);
  font-size: 0.92rem;
  color: var(--texte-doux);
}
.passerelle a { font-weight: 700; text-decoration: none; }
.passerelle a:hover { text-decoration: underline; }
.note-bas { font-size: 0.82rem; color: var(--texte-doux); margin-top: 0.5rem; }

/* ---------- Pied de page ---------- */

.pied { background: var(--anthracite); color: var(--texte-inverse-doux); margin-top: 2.5rem; border-top: 3px solid var(--ambre); }
.pied-inner { max-width: 880px; margin: 0 auto; padding: 1.6rem 1.25rem 2.2rem; font-size: 0.84rem; }
.pied-inner p { margin-bottom: 0.55rem; }
.pied-inner nav { margin-bottom: 0.9rem; }
.pied-inner nav a { color: var(--texte-inverse-doux); margin-right: 1.1rem; text-decoration: none; font-size: 0.82rem; }
.pied-inner nav a:hover { color: #fff; }
.pied-inner a { color: var(--ambre); }

/* ---------- Écrans larges ---------- */

@media (min-width: 640px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .configs { grid-template-columns: 1fr 1fr; }
  .specs { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 720px) {
  body { font-size: 1.1rem; }
  .hero h1 { font-size: 2.5rem; }
  h2 { font-size: 1.7rem; }
  .hero-inner { padding: 3rem 1.25rem 3.2rem; }
}

/* ---------- Réduction des animations (préférence système) ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .btn:hover, .config:hover { transform: none !important; }
}
