/* Charte « relevé de temps » — bleu de travail, papier froid, surligneur */
:root {
  --papier: #F3F4EF;
  --papier-haut: #FBFBF8;
  --encre: #13233F;
  --encre-2: #4A5872;
  --trait: #CDD2DA;
  --barre: #A3ACBB;
  --surligneur: #F4D03F;
  --surligneur-doux: #FBEBA4;
  --ombre: 0 1px 2px rgba(19, 35, 63, .06), 0 8px 24px -12px rgba(19, 35, 63, .18);
  --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --texte: "Public Sans", "Segoe UI", system-ui, sans-serif;
  --r: 6px;
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 40px; --s5: 64px; --s6: 104px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --papier: #0E1729; --papier-haut: #15213A; --encre: #E9ECF2; --encre-2: #A9B3C6;
    --trait: #26344F; --barre: #56627A; --surligneur: #F4D03F; --surligneur-doux: #4B4220;
    --ombre: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -14px rgba(0,0,0,.6);
    color-scheme: dark; --logo-or: #C9A45C;
  }
}
:root[data-theme="dark"] { --logo-or: #C9A45C;
  --papier: #0E1729; --papier-haut: #15213A; --encre: #E9ECF2; --encre-2: #A9B3C6;
  --trait: #26344F; --barre: #56627A; --surligneur: #F4D03F; --surligneur-doux: #4B4220;
  --ombre: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -14px rgba(0,0,0,.6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--papier); color: var(--encre);
  font: 400 17px/1.7 var(--texte); font-feature-settings: "tnum" 0;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--surligneur); outline-offset: 3px; border-radius: 2px; }
strong { font-weight: 600; }
p { margin: 0; }

.page { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .page { padding: 0 40px; } }

/* ---------- typographie ---------- */
.titre-xl, .titre-l, .titre-m, .chiffre { font-family: var(--display); font-stretch: 112%; }
.titre-xl { font-weight: 700; font-size: clamp(32px, 4.6vw, 54px); line-height: 1.02; letter-spacing: -.03em; margin: 0; text-wrap: balance; }
.titre-l { font-weight: 700; font-size: clamp(26px, 3.6vw, 38px); line-height: 1.1; letter-spacing: -.025em; margin: 0; text-wrap: balance; }
.titre-m { font-weight: 650; font-size: 21px; line-height: 1.25; letter-spacing: -.01em; margin: 0; }
.chapo { font-size: clamp(18px, 2vw, 21px); line-height: 1.55; color: var(--encre-2); max-width: 60ch; }
.discret { color: var(--encre-2); font-size: 15px; }

/* ---------- valeurs barrées / surlignées : l'élément signature ---------- */
.avant { color: var(--encre-2); text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: var(--encre); white-space: nowrap; }
.apres { position: relative; z-index: 0; font-weight: 650; white-space: nowrap; padding: 0 .2em; color: #13233F; }
.apres::before { content: ""; position: absolute; inset: 10% 0; background: var(--surligneur); border-radius: 2px; z-index: -1; transform-origin: left center; }

/* ---------- relevé de temps (barres appariées) ---------- */
.releve { margin: 0; background: var(--papier-haut); border: 1px solid var(--trait); border-radius: var(--r); box-shadow: var(--ombre); padding: var(--s3); }
.releve-tete { display: flex; justify-content: space-between; gap: var(--s2); font-size: 14px; color: var(--encre-2); padding-bottom: var(--s2); border-bottom: 1px solid var(--trait); }
.ligne { position: relative; padding: var(--s2) 12px; margin: 0 -12px; border-bottom: 1px dashed var(--trait); border-radius: 4px; cursor: default; transition: background-color .2s ease; }
.ligne:hover, .ligne:focus-visible, .ligne.actif { background: color-mix(in srgb, var(--surligneur) 9%, transparent); }
.ligne:focus-visible { outline: 2px solid var(--surligneur); outline-offset: -2px; }
.barres { position: relative; }
.ligne-gain { position: absolute; left: calc(var(--w) + 10px); bottom: -5px; font-size: 12.5px; line-height: 16px; font-weight: 600; color: var(--encre-2); white-space: nowrap; opacity: 0; transform: translateX(-6px); transition: opacity .2s ease, transform .2s ease; pointer-events: none; }
.ligne:hover .ligne-gain, .ligne:focus-visible .ligne-gain, .ligne.actif .ligne-gain { opacity: 1; transform: none; transition: opacity .35s ease .55s, transform .45s cubic-bezier(.2,.8,.2,1) .55s; }
@media (prefers-reduced-motion: reduce) { .ligne-gain, .ligne:hover .ligne-gain { transition: none; } }
.ligne:last-child { border-bottom: 0; }
.ligne-haut { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); flex-wrap: wrap; }
.ligne-tache { font-weight: 600; }
.ligne-valeurs { font-family: var(--display); font-stretch: 100%; font-variant-numeric: tabular-nums; display: flex; gap: 10px; align-items: baseline; }
.barres { display: grid; gap: 4px; margin-top: 10px; }
.barre { height: 6px; border-radius: 3px; transform-origin: left center; }
.barre.b-avant { background: repeating-linear-gradient(135deg, var(--barre) 0 4px, transparent 4px 7px); width: 100%; }
.barre.b-apres { background: var(--encre); width: var(--w); min-width: 6px; }

@media (prefers-reduced-motion: no-preference) {
  .anime .barre.b-apres { animation: fond 1.1s cubic-bezier(.65,0,.25,1) both; animation-delay: calc(.35s + var(--i) * .12s); }
  .anime .apres::before { animation: pousse .6s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(.9s + var(--i) * .12s); }
  .anime .ligne.joue .barre.b-apres { animation: fond-bis .9s cubic-bezier(.65,0,.25,1) both; }
  .anime .ligne.joue .apres::before { animation: pousse-bis .5s cubic-bezier(.2,.8,.2,1) .45s both; }
  @keyframes fond { from { transform: scaleX(var(--s)); } }
  @keyframes fond-bis { from { transform: scaleX(var(--s)); } }
  @keyframes pousse { from { transform: scaleX(0); } }
  @keyframes pousse-bis { from { transform: scaleX(0); } }
}

/* ---------- boutons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 20px;
  font: 600 16px/1 var(--texte); text-decoration: none; border-radius: var(--r); cursor: pointer;
  border: 1.5px solid var(--encre); transition: transform .15s ease, background-color .15s ease, color .15s ease;
}
.btn-plein { background: var(--encre); color: var(--papier); }
.btn-plein:hover { background: var(--encre-2); border-color: var(--encre-2); }
.btn-trait { background: transparent; color: var(--encre); }
.btn-trait:hover { background: var(--papier-haut); }
.btn:active { transform: translateY(1px); }

/* ---------- en-tête ---------- */
.entete { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); padding: var(--s3) 0 var(--s2); }
.entete-nom { display: inline-flex; text-decoration: none; }
.entete-nom .logo { height: 78px; width: auto; display: block; }
@media (max-width: 640px) { .entete-nom .logo { height: auto; width: min(320px, 100%); } }
:root { --logo-fg: var(--encre); --logo-discret: var(--encre-2); --logo-fond: var(--papier); --logo-or: #A8843F; }
.entete nav { display: flex; gap: var(--s3); font-size: 15px; }
.entete nav a { text-decoration: none; color: var(--encre-2); }
.entete nav a:hover { color: var(--encre); text-decoration: underline; }
@media (max-width: 640px) { .entete nav { display: none; } }

/* ---------- hero ---------- */
.hero { display: grid; gap: var(--s4); padding: var(--s4) 0 var(--s5); align-items: start; }
.hero-texte { display: grid; gap: var(--s3); }
.hero-titre-poste { font-weight: 600; color: var(--encre-2); font-size: 16px; }
.hero-bilan { font-size: 15px; color: var(--encre-2); max-width: 52ch; }
@media (min-width: 960px) { .hero { grid-template-columns: 1.3fr .9fr; gap: var(--s5); padding-top: var(--s5); } .hero .releve { margin-top: var(--s2); } }

/* ---------- sections ---------- */
.bloc { padding: var(--s5) 0; border-top: 1px solid var(--trait); }
.bloc-tete { display: grid; gap: var(--s2); margin-bottom: var(--s4); max-width: 68ch; }

/* ---------- cas (liste, pas des cartes identiques) ---------- */
.cas-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.cas { display: grid; gap: var(--s2); padding: var(--s4) 0; border-bottom: 1px solid var(--trait); }
.cas:first-child { padding-top: 0; }
.cas-entete { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; font-size: 14px; color: var(--encre-2); }
.statut { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--encre); }
.statut::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--encre); }
.statut.s-pret::before, .statut.s-teste::before { background: transparent; border: 2px solid var(--encre); width: 9px; height: 9px; }
.cas-mesures { display: grid; gap: 12px; margin: 4px 0; }
.cas-mesure { display: grid; gap: 2px; font-variant-numeric: tabular-nums; }
.cas-mesure > span:first-child { color: var(--encre-2); font-size: 15px; }
.cas-mesure > span:last-child { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.cas-bas { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s2); }
.pile { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--encre-2); }
.pile span { border: 1px solid var(--trait); border-radius: 4px; padding: 2px 8px; }
.lien-cas { font-weight: 600; }
.cas.cas-vitrine { background: var(--papier-haut); border: 1px solid var(--trait); border-radius: var(--r); box-shadow: var(--ombre); padding: var(--s4) var(--s3); margin-bottom: var(--s4); }
.cas.cas-vitrine .titre-m { font-size: clamp(24px, 3vw, 30px); }
@media (min-width: 900px) {
  .cas { grid-template-columns: 1fr 1.1fr; column-gap: var(--s5); }
  .cas > .cas-col-gauche { grid-column: 1; align-content: start; } .cas > .cas-col-droite { grid-column: 2; }
  .cas.cas-vitrine { padding: var(--s4); }
}

/* ---------- méthode & parcours (vraies séquences) ---------- */
.etapes-wrap { position: relative; }
.rail { position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: var(--trait); }
.rail-plein { position: absolute; inset: 0; background: var(--encre); transform-origin: top center; }
.etapes { list-style: none; margin: 0; padding: 0 0 0 30px; display: grid; gap: var(--s3); counter-reset: e; }
.etape { position: relative; align-content: start; }
.etape::after { content: ""; position: absolute; left: -30px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--papier); border: 2px solid var(--encre); box-sizing: border-box; }
.etape .point, .frise .point { position: absolute; z-index: 1; width: 6px; height: 6px; border-radius: 50%; background: var(--encre); }
.etape .point { left: -27px; top: 9px; background: #C9A227; }
@media (min-width: 900px) {
  .rail { left: 6px; right: calc(20% - 25px); top: 5px; bottom: auto; width: auto; height: 2px; }
  .rail-plein { transform-origin: left center; }
  .etapes { padding: 30px 0 0; }
  .etape::after { left: 0; top: -30px; }
  .etape .point { left: 3px; top: -27px; }
}
.etape { counter-increment: e; display: grid; grid-template-columns: 44px 1fr; gap: 4px var(--s2); }
.etape::before { content: counter(e); grid-row: span 2; font-family: var(--display); font-weight: 700; font-size: 28px; line-height: 1; color: var(--encre); }
.etape b { font-weight: 650; }
.etape p { color: var(--encre-2); max-width: 60ch; }
@media (min-width: 900px) { .etapes { grid-template-columns: repeat(5, 1fr); } .etape { grid-template-columns: 1fr; } .etape::before { grid-row: auto; margin-bottom: 6px; } }

.frise-wrap { position: relative; }
.frise { list-style: none; margin: 0; padding: 0 0 0 22px; border-left: 2px solid var(--trait); display: grid; gap: var(--s3); }
.frise-plein { position: absolute; z-index: 0; left: 0; top: 0; bottom: 0; width: 2px; background: var(--encre); transform-origin: top center; }
.frise li { position: relative; display: grid; gap: 4px; }
.frise li::before { content: ""; position: absolute; z-index: 1; left: -29px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--papier); border: 2px solid var(--encre); }
.frise .point { left: -26px; top: 11px; z-index: 2; }
.frise li.fort .point { background: #C9A227; }
.frise .date { font-size: 14px; color: var(--encre-2); font-variant-numeric: tabular-nums; }
.frise p { color: var(--encre-2); max-width: 64ch; }

.labo { display: grid; gap: var(--s2); }
@media (min-width: 900px) { .labo { grid-template-columns: repeat(3, 1fr); gap: var(--s3); } }
.labo article { border-top: 2px solid var(--barre); padding-top: var(--s2); display: grid; gap: 6px; }
.labo p { color: var(--encre-2); font-size: 15px; }

.contact { display: grid; gap: var(--s3); padding: var(--s5) 0 var(--s6); border-top: 1px solid var(--trait); }
.pied { font-size: 14px; color: var(--encre-2); padding-bottom: var(--s4); }

/* ---------- page étude de cas ---------- */
.fil { font-size: 15px; padding-top: var(--s3); }
.cas-page { display: grid; gap: var(--s5); padding: var(--s4) 0 var(--s6); max-width: 860px; }
.cas-page section { display: grid; gap: var(--s2); }
.cas-page ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; max-width: 70ch; }
.tableau-wrap { overflow-x: auto; border: 1px solid var(--trait); border-radius: var(--r); background: var(--papier-haut); }
table.tableau { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 520px; }
.tableau th { text-align: left; font-weight: 600; font-size: 14px; color: var(--encre-2); padding: 12px 16px; border-bottom: 1px solid var(--trait); }
.tableau td { padding: 12px 16px; border-bottom: 1px dashed var(--trait); vertical-align: top; }
.tableau tr:last-child td { border-bottom: 0; }
.tableau td.num, .tableau th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tableau td.calc { font-size: 14px; color: var(--encre-2); }
.tableau tr.total td { border-top: 2px solid var(--encre); font-weight: 650; }
.chiffres { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--trait); border: 1px solid var(--trait); border-radius: var(--r); overflow: hidden; }
.chiffres div { background: var(--papier-haut); padding: var(--s2) var(--s3); display: grid; gap: 4px; align-content: start; }
.chiffres b.long { font-size: 18px; line-height: 1.3; letter-spacing: 0; }
.chiffres b { font-family: var(--display); font-stretch: 112%; font-size: clamp(22px, 3vw, 30px); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.chiffres span { font-size: 14px; color: var(--encre-2); }
@media (min-width: 720px) { .chiffres { grid-template-columns: repeat(4, 1fr); } }
.flux { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: f; }
.flux li { counter-increment: f; display: grid; grid-template-columns: 32px 1fr; gap: 0 12px; padding: 12px 16px; background: var(--papier-haut); border: 1px solid var(--trait); border-radius: var(--r); }
.flux li::before { content: counter(f); grid-row: span 2; font-family: var(--display); font-weight: 700; font-size: 20px; }
.flux span { color: var(--encre-2); font-size: 15px; }
dl.pourquoi { margin: 0; display: grid; gap: var(--s2); }
dl.pourquoi dt { font-weight: 650; }
dl.pourquoi dd { margin: 0; color: var(--encre-2); max-width: 66ch; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
code { font-size: .92em; background: var(--surligneur-doux); padding: 1px 5px; border-radius: 3px; }
