/* ==========================================================================
   POIDS PLUME
   --------------------------------------------------------------------------
   Lavande clair, encre noire, et le violet de Core comme unique accent.
   ⚠️ UN SEUL ACCENT, ET IL TIENT TOUTE LA PAGE — la règle est inscrite dans
   la charte de core-agency.be, et c'est elle qui fait qu'une palette se voit.
   Les jetons viennent de site/src/styles/01-tokens.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   LES POLICES SONT EMBARQUEES, PAS APPELEES.
   Lexend Deca et JetBrains Mono sont servies depuis fonts/, jamais depuis
   Google Fonts : un appel externe romprait la promesse « aucune requête
   réseau », qui est l'argument principal de cet outil. Les deux sont sous
   licence OFL — voir fonts/LICENCE-DES-POLICES.md.
   -------------------------------------------------------------------------- */
@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]` a une spécificité nulle : toute classe posant un `display` le
   bat, et l'élément « caché » reste visible. On le verrouille ici. */
[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;
  --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 */

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

.page { max-width: 1080px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }

/* ------------------------------------------------------------- LE DEPOT */

.depot {
  display: grid;
  place-items: center;
  gap: .35rem;
  padding: 3.2rem 1.5rem;
  text-align: center;
  color: var(--douce);
  background: var(--carte);
  border: 2px dashed var(--filet);
  border-radius: var(--rayon);
  transition: border-color .18s, background .18s, color .18s;
}
.depot.survol {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-pale);
}
.depot__icone { color: inherit; }
.depot__titre {
  margin: .35rem 0 0;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--encre);
}
.depot__aide { margin: 0; font-size: .87rem; }

.lien {
  padding: 0;
  font: inherit;
  color: var(--accent);
  background: none;
  border: none;
  border-bottom: 1px solid currentColor;
  cursor: pointer;
}

/* ---------------------------------------------------------- LES REGLAGES */

.reglages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  margin-top: 1.6rem;
  padding: 1.4rem;
  background: var(--carte);
  border: 1px solid var(--filet);
  border-radius: var(--rayon);
}
.reglage { display: block; }
.reglage__nom {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .5rem;
  margin-bottom: .5rem;
  font-size: .84rem;
  font-weight: 600;
}
.reglage__nom output { font-family: var(--chiffres); font-weight: 400; color: var(--accent); }
.reglage__aide {
  display: block;
  margin-top: .45rem;
  font-size: .78rem;
  line-height: 1.4;
  color: var(--douce);
}

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

.curseur { width: 100%; accent-color: var(--accent); }

/* ------------------------------------------------------------- LE BILAN */

.bilan {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1.6rem;
  padding: 1.1rem 1.4rem;
  background: var(--accent-pale);
  border: 1px solid #CFC9F4;
  border-radius: var(--rayon);
}
.bilan__gros {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  margin: 0;
}
.bilan__gros b {
  font-family: var(--chiffres);
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--accent);
}
.bilan__gros span { font-size: .9rem; color: var(--encre); }
.bilan__detail {
  margin: .1rem 0 0;
  font-family: var(--chiffres);
  font-size: .8rem;
  color: var(--douce);
}

.bouton {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .6rem 1rem;
  font: inherit;
  font-size: .87rem;
  font-weight: 550;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}
.bouton--plein { color: #fff; background: var(--accent); }
.bouton--plein:hover { background: #5344D4; }
.bouton--discret {
  color: var(--encre);
  background: var(--papier);
  border-color: var(--filet);
}
.bouton--discret:hover { border-color: var(--douce); }

/* ------------------------------------------------------------ LA GRILLE */

.grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1.6rem;
}

.carte {
  display: flex;
  flex-direction: column;
  background: var(--carte);
  border: 1px solid var(--filet);
  border-radius: var(--rayon);
  overflow: hidden;
}
.carte__vue {
  aspect-ratio: 4 / 3;
  background: repeating-conic-gradient(#EFECFB 0 25%, #fff 0 50%) 0 0 / 18px 18px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.carte__vue img { max-width: 100%; max-height: 100%; display: block; }
.carte__corps { padding: .8rem .9rem 1rem; }
.carte__nom {
  margin: 0 0 .45rem;
  font-size: .83rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.carte__mesures {
  display: flex;
  align-items: baseline;
  gap: .4rem;
  margin: 0 0 .2rem;
  font-family: var(--chiffres);
  font-size: .8rem;
  color: var(--douce);
}
.carte__mesures del { text-decoration: line-through; }
.carte__mesures ins { text-decoration: none; color: var(--encre); font-weight: 600; }
.carte__gain {
  display: inline-block;
  margin: .35rem 0 .7rem;
  padding: .1rem .45rem;
  font-family: var(--chiffres);
  font-size: .75rem;
  color: var(--accent);
  background: var(--accent-pale);
  border-radius: 5px;
}
.carte__gain--nul { color: #8A6D1F; background: #FBF3DD; }
.carte__dim { font-size: .76rem; color: var(--douce); }
.carte__actions { display: flex; gap: .4rem; margin-top: .7rem; }
.carte__actions .bouton { flex: 1; justify-content: center; padding: .42rem .5rem; font-size: .8rem; }

.vide { margin-top: 2.5rem; text-align: center; color: var(--douce); font-size: .9rem; }

/* --------------------------------------------------------------- LE PIED */

.pied {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  font-size: .82rem;
  color: var(--douce);
}
.pied p { margin: 0 0 .4rem; max-width: 62ch; }
.pied a { color: var(--encre); }
.pied__signature { font-size: .8rem; }

/* ---------------------------------------------------------- ECRANS ETROITS */

@media (max-width: 760px) {
  .reglages { grid-template-columns: 1fr; gap: 1.1rem; }
  .bilan { flex-direction: column; align-items: stretch; }
  .bilan .bouton { justify-content: center; }
}

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

.entete__tiret, .marque__tiret { color: #6355E0; }

/* ------------------------------------------------------------ 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; }
