:root {
  --fond: #0b0d10;
  --fond-alterne: #0f1216;
  --carte: #14181d;
  --bord: #242a31;
  --texte: #e6e9ec;
  --texte-doux: #9aa4ae;
  --accent: #d97757;
  --accent-clair: #e8a287;
  --largeur: 1080px;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --fond: #ffffff;
    --fond-alterne: #f7f8f9;
    --carte: #ffffff;
    --bord: #e3e6e9;
    --texte: #14181d;
    --texte-doux: #5b6670;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 16px/1.65 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.saut {
  position: absolute;
  left: -9999px;
}
.saut:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--accent);
  color: #fff;
  padding: .6rem 1rem;
  border-radius: 6px;
}

/* --- bandeau --- */

.bandeau {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--fond) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--bord);
}

.bandeau nav {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 1rem 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.marque {
  font-weight: 650;
  letter-spacing: -.01em;
  color: var(--texte);
  text-decoration: none;
}
.marque::before {
  content: "◆";
  color: var(--accent);
  margin-right: .5rem;
}

.bandeau ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: .94rem;
}

.bandeau a {
  color: var(--texte-doux);
  text-decoration: none;
}
.bandeau a:hover,
.bandeau a:focus-visible { color: var(--texte); }

/* --- une --- */

.une {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 6rem 16px 4.5rem;
}

.surtitre {
  margin: 0 0 1.25rem;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(2.1rem, 5.5vw, 3.6rem);
  line-height: 1.1;
  letter-spacing: -.025em;
  font-weight: 680;
}

.chapo {
  max-width: 54ch;
  margin: 0 0 2.25rem;
  font-size: 1.12rem;
  color: var(--texte-doux);
}
.chapo.centre { margin-left: auto; margin-right: auto; }

.actions {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  flex-wrap: wrap;
  margin: 0;
}

.bouton {
  display: inline-block;
  background: var(--accent);
  color: #0b0d10;
  padding: .72rem 1.4rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s ease;
}
.bouton:hover,
.bouton:focus-visible { background: var(--accent-clair); }

.lien-simple {
  color: var(--texte-doux);
  text-decoration: none;
  font-size: .95rem;
}
.lien-simple:hover { color: var(--texte); }

/* --- blocs --- */

.bloc {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 4rem 16px;
}

.alterne {
  max-width: none;
  background: var(--fond-alterne);
  border-top: 1px solid var(--bord);
  border-bottom: 1px solid var(--bord);
}
.alterne > * {
  max-width: var(--largeur);
  margin-left: auto;
  margin-right: auto;
}

h2 {
  margin: 0 0 2.25rem;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  letter-spacing: -.015em;
  font-weight: 640;
}

h3 {
  margin: 0 0 .75rem;
  font-size: 1.1rem;
  font-weight: 620;
}

.grille {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.grille.trois {
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

/* --- etapes numerotees --- */

.etapes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
  counter-reset: etape;
}

.etapes li {
  position: relative;
  background: var(--carte);
  border: 1px solid var(--bord);
  border-radius: 12px;
  padding: 1.6rem 1.75rem 1.6rem 4.5rem;
}

.etapes .numero {
  position: absolute;
  left: 1.75rem;
  top: 1.75rem;
  margin: 0;
  font-size: .95rem;
  font-weight: 650;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.etapes p { color: var(--texte-doux); margin: 0; }

.point {
  background: var(--carte);
  border: 1px solid var(--bord);
  border-radius: 12px;
  padding: 1.5rem;
}

.bouton.grand {
  font-size: 1.05rem;
  padding: .9rem 2rem;
}

.marque-pied {
  font-weight: 620;
  color: var(--texte) !important;
}
.marque-pied::before {
  content: "◆";
  color: var(--accent);
  margin-right: .45rem;
}

.carte {
  background: var(--carte);
  border: 1px solid var(--bord);
  border-radius: 12px;
  padding: 1.75rem;
}
.carte p { color: var(--texte-doux); margin: 0 0 1.1rem; }

.puces {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .94rem;
}
.puces li {
  position: relative;
  padding-left: 1.3rem;
  margin-bottom: .45rem;
  color: var(--texte-doux);
}
.puces li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.point p { color: var(--texte-doux); margin: 0; }

.numero {
  display: block;
  font-size: .78rem;
  letter-spacing: .1em;
  color: var(--accent);
  margin-bottom: .7rem;
  font-variant-numeric: tabular-nums;
}

.encadre {
  background: var(--carte);
  border: 1px solid var(--bord);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 1.75rem;
}
.encadre p {
  color: var(--texte-doux);
  margin: 0 0 1rem;
  max-width: 72ch;
}
.encadre p:last-child { margin-bottom: 0; }

.centre { text-align: center; }

.mention {
  font-size: .86rem;
  color: var(--texte-doux);
}

/* --- pied --- */

footer {
  border-top: 1px solid var(--bord);
  padding: 2.5rem 16px;
  text-align: center;
}
footer p { margin: 0 0 .5rem; color: var(--texte-doux); font-size: .9rem; }
footer a { color: var(--accent); }

@media (max-width: 600px) {
  .une { padding-top: 4rem; }
  .bandeau ul { gap: 1rem; font-size: .88rem; }
}

/* --- articles --- */

.article {
  max-width: 740px;
  margin: 0 auto;
  padding: 4rem 16px 5rem;
}

.article .meta {
  font-size: .86rem;
  color: var(--texte-doux);
  margin: 0 0 1.5rem;
}
.article .meta span + span::before {
  content: "·";
  margin: 0 .5rem;
  color: var(--bord);
}

.article h1 {
  font-size: clamp(1.8rem, 4.2vw, 2.7rem);
  margin-bottom: 1.25rem;
}

.article .intro {
  font-size: 1.14rem;
  color: var(--texte-doux);
  margin: 0 0 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--bord);
}

.article h2 {
  margin: 3rem 0 1.1rem;
  font-size: 1.4rem;
}

.article h3 {
  margin: 2rem 0 .75rem;
  font-size: 1.08rem;
}

.article p { margin: 0 0 1.15rem; }
.article ul, .article ol { margin: 0 0 1.5rem; padding-left: 1.3rem; }
.article li { margin-bottom: .5rem; }

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

.cle {
  background: var(--carte);
  border: 1px solid var(--bord);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}
.cle p { margin: 0; }
.cle strong { color: var(--texte); }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.75rem 0;
  font-size: .94rem;
}
th, td {
  text-align: left;
  padding: .7rem .8rem;
  border-bottom: 1px solid var(--bord);
}
th {
  color: var(--texte-doux);
  font-weight: 600;
  font-size: .86rem;
  letter-spacing: .02em;
}
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.hausse { color: #4ea571; }
.baisse { color: #d9605a; }

.sources {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--bord);
  font-size: .9rem;
  color: var(--texte-doux);
}
.sources h2 { font-size: 1rem; margin: 0 0 .9rem; }
.sources li { margin-bottom: .55rem; }

.retour {
  display: inline-block;
  margin-bottom: 2rem;
  color: var(--texte-doux);
  text-decoration: none;
  font-size: .92rem;
}
.retour:hover { color: var(--texte); }

.liste-articles {
  display: grid;
  gap: 1.25rem;
  margin-top: 2.5rem;
}
.liste-articles a {
  display: block;
  background: var(--carte);
  border: 1px solid var(--bord);
  border-radius: 12px;
  padding: 1.6rem 1.75rem;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease;
}
.liste-articles a:hover { border-color: var(--accent); }
.liste-articles h3 { margin: 0 0 .5rem; }
.liste-articles p { margin: 0; color: var(--texte-doux); font-size: .96rem; }
.liste-articles .meta { margin: .8rem 0 0; font-size: .82rem; }
