/* ==========================================================================
   CORE — CONTRASTE
   --------------------------------------------------------------------------
   Charte de Core : violet #6355e0 unique accent, lavande, Lexend Deca.
   Les jetons viennent de site/src/styles/01-tokens.css de core-agency.be.
   ⚠️ UN SEUL ACCENT. Le vert et le rouge des verdicts y échappent parce
   qu'ils portent une INFORMATION — ça passe ou ça ne passe pas. Les
   couleurs saisies par l'utilisateur, elles, ne sont pas la charte : elles
   sont l'objet examiné, et n'apparaissent que dans les échantillons.
   ========================================================================== */

@font-face {
  font-family: 'Lexend Deca';
  src: url('../fonts/lexend-deca-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Lexend Deca';
  src: url('../fonts/lexend-deca-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jetbrains-mono-var.woff2') format('woff2');
  font-weight: 100 800; font-style: normal; font-display: swap;
}

[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }

:root {
  --papier: #F1EFFD;
  --carte:  #FFFFFF;
  --encre:  #0E0E12;
  --douce:  #6B6B7A;
  --filet:  rgba(14, 14, 18, .12);
  --accent: #6355E0;
  --accent-pale: #E7E3FB;
  --juste:  #0A7D5A;
  --juste-pale: #E4F4EE;
  --tiede:  #8A5A00;
  --tiede-pale: #FBF2E0;
  --faux:   #A33325;
  --faux-pale: #FBEAE7;
  --rayon:  10px;
  --ui: 'Lexend Deca', -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
  --chiffres: 'JetBrains Mono', ui-monospace, Consolas, monospace;
}

body {
  margin: 0;
  font-family: var(--ui);
  font-size: 15px; line-height: 1.55;
  color: var(--encre); background: var(--papier);
  -webkit-font-smoothing: antialiased;
}

.entete { max-width: 940px; margin: 0 auto; padding: 2rem 1.5rem 0; }
.entete__marque { display: flex; align-items: center; gap: .8rem; }
.signe { display: block; border-radius: 7px; }
.entete h1 { margin: 0; font-size: 1.28rem; font-weight: 700; letter-spacing: -.02em; }
.entete p { margin: .1rem 0 0; font-size: .87rem; color: var(--douce); }
.entete__lien { color: var(--accent); text-decoration: none; border-bottom: 1px solid currentColor; }
.entete__lien:hover { color: var(--encre); }
.entete__tiret { color: var(--accent); }

.page { max-width: 940px; margin: 0 auto; padding: 1.6rem 1.5rem 3rem; }

/* ------------------------------------------------------------- OUTILS */

.outil {
  margin-bottom: 1.2rem; padding: 1.4rem;
  background: var(--carte); border: 1px solid var(--filet); border-radius: var(--rayon);
}
.outil:last-child { margin-bottom: 0; }
.outil__titre { margin: 0 0 .3rem; font-size: 1.02rem; font-weight: 700; letter-spacing: -.01em; }
.outil__intro { margin: 0 0 1.1rem; font-size: .86rem; line-height: 1.5; color: var(--douce); max-width: 62ch; }
.outil__intro code {
  padding: .05rem .3rem; font-family: var(--chiffres); font-size: .82em;
  background: var(--accent-pale); border-radius: 4px;
}

.rangee { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.rangee:last-child { margin-bottom: 0; }
.champ { display: block; min-width: 0; }
.champ__nom { display: block; margin-bottom: .35rem; font-size: .78rem; font-weight: 600; color: var(--douce); }

.saisie {
  width: 100%; padding: .55rem .7rem;
  font: inherit; font-size: .9rem;
  color: var(--encre); background: var(--papier);
  border: 1px solid var(--filet); border-radius: 7px;
}
.saisie:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.couleur { display: flex; align-items: center; gap: .5rem; }
.couleur input[type="color"] {
  width: 44px; height: 36px; padding: 2px; flex: 0 0 auto;
  background: var(--papier); border: 1px solid var(--filet); border-radius: 7px; cursor: pointer;
}
.couleur .saisie { font-family: var(--chiffres); font-size: .84rem; text-transform: uppercase; }

.bouton {
  padding: .55rem .9rem; font: inherit; font-size: .84rem; font-weight: 550;
  border-radius: 7px; border: 1px solid var(--filet); cursor: pointer; white-space: nowrap;
}
.bouton--discret { color: var(--encre); background: var(--papier); }
.bouton--discret:hover { border-color: var(--accent); color: var(--accent); }
.bouton--plein { color: #fff; background: var(--accent); border-color: var(--accent); }
.bouton--plein:hover { background: #5245c9; }
.bouton:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ------------------------------------------------------- ÉCHANTILLON */

.echantillon {
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--filet); border-radius: 9px;
}
.echantillon p { margin: 0 0 .7rem; }
.echantillon p:last-child { margin-bottom: 0; }
.echantillon__grand { font-size: 24px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
.echantillon__courant { font-size: 16px; line-height: 1.6; }
.echantillon__petit { font-size: 13px; line-height: 1.5; }
.echantillon__ui {
  display: inline-block; margin-top: .3rem;
  padding: .45rem .8rem;
  font-size: .84rem; font-weight: 600;
  border: 2px solid currentColor; border-radius: 7px;
}

/* --------------------------------------------------------- VERDICTS */

.verdicts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .7rem; margin-top: 1rem; }

.mesure {
  padding: .8rem .9rem;
  background: var(--papier); border-radius: 9px;
}
.mesure__nom { font-size: .72rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--douce); }
.mesure__valeur { margin: .15rem 0 .1rem; font-family: var(--chiffres); font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.mesure__quoi { font-size: .76rem; line-height: 1.45; color: var(--douce); }

.notes { display: grid; gap: .3rem; margin-top: .6rem; }
.note-ligne {
  display: grid; grid-template-columns: 1fr auto;
  gap: .5rem; align-items: center;
  padding: .35rem .55rem;
  font-size: .78rem; border-radius: 6px;
}
.note-ligne__sceau { font-family: var(--chiffres); font-size: .72rem; font-weight: 700; letter-spacing: .04em; }
.note-ligne--vrai { color: var(--juste); background: var(--juste-pale); }
.note-ligne--faux { color: var(--faux); background: var(--faux-pale); }

/* --------------------------------------------------------- RÉPARATION */

.reparation {
  display: grid; grid-template-columns: auto 1fr; gap: .8rem; align-items: center;
  margin-top: 1rem; padding: .8rem .9rem;
  background: var(--accent-pale); border-radius: 9px;
}
.reparation__pastille {
  width: 46px; height: 46px; border-radius: 8px; border: 1px solid var(--filet);
}
.reparation__texte { font-size: .81rem; line-height: 1.5; }
.reparation__hex { font-family: var(--chiffres); font-weight: 700; }
.reparation__bouton { margin-top: .35rem; }

/* --------------------------------------------------------- ÉCHELLE */

.echelle { display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); gap: .4rem; }
.ton {
  display: grid; align-content: space-between;
  min-height: 104px; padding: .5rem .55rem;
  border-radius: 8px; border: 1px solid var(--filet);
  cursor: pointer; text-align: left;
  font: inherit;
}
.ton:focus-visible { outline: 2px solid var(--encre); outline-offset: 2px; }
.ton__cran { font-family: var(--chiffres); font-size: .74rem; font-weight: 700; opacity: .85; }
.ton__hex { font-family: var(--chiffres); font-size: .68rem; opacity: .8; }
.ton__rapport { font-family: var(--chiffres); font-size: .66rem; opacity: .7; }
.ton--base { box-shadow: 0 0 0 2px var(--encre); }
.ton__marque { font-size: .6rem; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }

.sortie__barre { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 1rem 0 .6rem; }
.sortie__etat { font-size: .76rem; color: var(--juste); }

.code {
  margin: 0; padding: .9rem 1rem; max-height: 20rem; overflow: auto;
  font-family: var(--chiffres); font-size: .74rem; line-height: 1.6;
  color: #E9E6FB; background: #17151F; border-radius: 8px;
  white-space: pre; tab-size: 2;
}
.code::-webkit-scrollbar { width: 10px; height: 10px; }
.code::-webkit-scrollbar-thumb { background: #3A3550; border-radius: 999px; }

.note { margin: .6rem 0 0; font-size: .78rem; line-height: 1.5; color: var(--douce); max-width: 68ch; }
.note a { color: var(--accent); }
.filet { margin: 1.2rem 0; border: none; border-top: 1px solid var(--filet); }

.pied { max-width: 940px; margin: 0 auto; padding: 0 1.5rem 3rem; font-size: .8rem; color: var(--douce); }
.pied p { margin: 0 0 .5rem; max-width: 66ch; }
.pied a { color: var(--encre); }
.pied__avertissement {
  padding: .6rem .8rem; background: var(--carte);
  border-left: 2px solid var(--accent); border-radius: 0 6px 6px 0;
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ------------------------------------------------------------ FAMILLE
   Les sept outils de Core ne se connaissaient pas entre eux. Quelqu'un
   qui arrive ici par une recherche n'avait aucun moyen d'apprendre que
   les six autres existent — c'est le seul lien qui manquait. */
.famille {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .3rem .75rem;
  margin: 0 0 .7rem;
  padding-top: .8rem;
  border-top: 1px solid var(--filet);
  font-size: .78rem;
}
.famille__titre { font-weight: 600; color: var(--encre); }
.famille a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.famille a:hover { border-bottom-color: currentColor; }
.famille a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
