/* Carton Plein (version en ligne) (KaraDan') — styles communs aux écrans. */
@font-face { font-family: "Bricolage"; src: url("vendor/bricolage.woff2") format("woff2"); font-weight: 200 800; font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Bricolage"; src: url("vendor/bricolage-ext.woff2") format("woff2"); font-weight: 200 800; font-display: swap;
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

:root {
  --tapis: #0f3b2e;      /* fond : tapis de jeu vert */
  --tapis-2: #154a3a;    /* panneaux */
  --tapis-3: #23604d;    /* champs, lignes */
  --creme: #fff6e0;      /* texte, cartons */
  --brume: #b9d6c8;      /* texte secondaire */
  --encre: #13221c;      /* texte sur crème */
  --rouge: #e5484d;      /* boules, pastilles */
  --or: #ffc94a;         /* étape, gagnants */
  --lagon: #3fd6b5;      /* validé */
  --alerte: #ff9d8f;
  --rayon: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--tapis); color: var(--creme);
  font-family: "Bricolage", "Segoe UI", system-ui, sans-serif; font-size: 17px; line-height: 1.45;
  font-variant-numeric: tabular-nums;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.8rem, 6vw, 2.6rem); font-weight: 800; line-height: 1.02; letter-spacing: -0.02em; }
h2 { font-size: 1.3rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
h3 { font-size: 1rem; font-weight: 600; color: var(--brume); }
.discret { color: var(--brume); }
.petit { font-size: 0.9rem; }
.pile > * + * { margin-top: var(--pas, 14px); }
.ligne { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ecart { justify-content: space-between; }
.cache { display: none !important; }
a { color: var(--creme); }

/* --- boutons et champs */
button, input, select, textarea { font: inherit; color: inherit; }
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 18px; border-radius: 999px; border: 2px solid var(--tapis-3);
  background: transparent; color: var(--creme); font-weight: 600; cursor: pointer; text-decoration: none;
}
.bouton:hover { border-color: var(--brume); }
.bouton.principal { background: var(--creme); border-color: var(--creme); color: var(--encre); font-weight: 700; }
.bouton.principal:hover { background: #fff; border-color: #fff; }
.bouton.or { background: var(--or); border-color: var(--or); color: var(--encre); font-weight: 800; }
.bouton.geant { min-height: 66px; padding: 14px 30px; font-size: 1.3rem; width: 100%; }
.bouton.mini { min-height: 34px; padding: 4px 12px; font-size: 0.88rem; }
.bouton:disabled { opacity: 0.45; cursor: default; }
:focus-visible { outline: 3px solid var(--or); outline-offset: 2px; }
label { display: block; font-weight: 600; margin-bottom: 6px; }
input[type="text"], input[type="number"], select {
  width: 100%; padding: 11px 14px; border-radius: var(--rayon); border: 2px solid var(--tapis-3);
  background: var(--tapis); color: var(--creme);
}
input::placeholder { color: #7fa594; }
.case { display: flex; align-items: center; gap: 10px; font-weight: 500; margin: 0; cursor: pointer; }
.case input { width: 22px; height: 22px; accent-color: var(--or); }
.erreur { color: var(--alerte); font-weight: 600; min-height: 1.45em; }
.ok { color: var(--lagon); font-weight: 600; }
.panneau { background: var(--tapis-2); border-radius: 20px; padding: 18px; }

/* --- la boule */
.boule {
  --t: 120px;
  width: var(--t); height: var(--t); border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: radial-gradient(circle at 32% 28%, #ff9a9d 0, var(--rouge) 38%, #9c1d22 100%);
  box-shadow: inset -6px -8px 14px rgba(0,0,0,.28), 0 8px 18px rgba(0,0,0,.35);
}
.boule span {
  width: 64%; height: 64%; border-radius: 50%; background: #fffdf6; color: var(--encre);
  display: grid; place-items: center; font-weight: 800; font-size: calc(var(--t) * 0.34); letter-spacing: -0.03em; line-height: 1;
}
.boule.vide { background: radial-gradient(circle at 32% 28%, #5f8a7a 0, #2f5a4a 60%, #1d3d31 100%); }
.boule.vide span { background: rgba(255,255,255,.12); color: var(--brume); }
.boule.neuve { animation: rouler .7s cubic-bezier(.2,.9,.3,1.2); }
@keyframes rouler { from { transform: scale(.3) rotate(-160deg); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .boule.neuve { animation: none; } }

/* --- le carton (3 lignes x 9 colonnes) */
.carton { background: var(--creme); color: var(--encre); border-radius: 12px; padding: 8px; }
.carton .tete { display: flex; justify-content: space-between; align-items: baseline; padding: 0 4px 6px; font-weight: 700; font-size: 0.85rem; color: #4d5f57; }
.carton table { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; }
.carton td {
  height: 2.3em; border-radius: 7px; text-align: center; vertical-align: middle;
  font-weight: 800; font-size: 1.12rem; background: #fff; position: relative; padding: 0;
}
.carton td.vide { background: repeating-linear-gradient(135deg, #e7dcc0 0 5px, #efe6cf 5px 10px); }
.carton td.coche::after {
  content: ""; position: absolute; inset: 3px; border-radius: 50%;
  background: rgba(229,72,77,.82); mix-blend-mode: multiply;
}
.carton td.coche { color: #fff; }
.carton td.coche span { position: relative; z-index: 1; }
.carton td.dernier { box-shadow: 0 0 0 3px var(--or); }
.carton tr.complete td:not(.vide) { background: #ffe9a6; }
.carton tr.complete td.coche::after { background: rgba(229,72,77,.9); }
.carton.gagnant { box-shadow: 0 0 0 4px var(--or); }
.carton tr.cible td { box-shadow: inset 0 -4px 0 var(--or); }
.carton tr.cible td.vide { box-shadow: inset 0 -4px 0 var(--or); }
.surnom-tele { color: var(--or); font-weight: 800; letter-spacing: -0.01em; }
.express { font-weight: 800; color: var(--or); }

/* --- le tableau des 90 numéros */
.tableau { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.tableau span {
  aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%;
  font-weight: 700; color: rgba(255,246,224,.38); background: rgba(255,255,255,.05);
}
.tableau span.sorti { background: var(--rouge); color: #fff; }
.tableau span.dernier { background: var(--or); color: var(--encre); }

/* --- étiquettes */
.etiquette { display: inline-block; padding: 3px 12px; border-radius: 999px; font-weight: 700; font-size: 0.9rem; background: rgba(255,201,74,.16); color: var(--or); }
.etape-bandeau { background: var(--or); color: var(--encre); border-radius: 16px; padding: 10px 16px; font-weight: 800; }
.etape-bandeau .lot { font-weight: 600; }

/* --- fête des gagnants */
.fete {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; text-align: center; padding: 24px;
  background: radial-gradient(circle at 50% 40%, rgba(255,201,74,.96), rgba(229,72,77,.96));
  color: var(--encre); animation: apparait .4s ease-out;
}
.fete .quoi { font-size: clamp(2.2rem, 10vw, 7rem); font-weight: 800; line-height: .95; letter-spacing: -0.03em; }
.fete .qui { font-size: clamp(1.4rem, 5vw, 3.4rem); font-weight: 800; margin-top: .4em; overflow-wrap: anywhere; }
.fete .lot { font-size: clamp(1rem, 3vw, 2rem); font-weight: 600; margin-top: .4em; }
@keyframes apparait { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
