/* CHESS33D — feuille de style du site.
 *
 * Une seule feuille pour les quatre pages : la vitrine et les pages légales partagent le
 * même cadre, et un visiteur qui clique « Confidentialité » ne doit pas avoir
 * l'impression de quitter le site.
 *
 * 🔴 Rien n'est chargé depuis un service tiers — ni police, ni script, ni image. C'est un
 * choix de vie privée (aucune requête vers Google ou un CDN au chargement d'une page
 * légale, ce serait contradictoire) et un choix de robustesse (le site marche derrière un
 * filtrage d'entreprise, et hors ligne dans l'application mobile).
 */

@font-face {
  font-family: 'Bebas Neue';
  src: url('../fonts/bebas-neue-400-latin.woff2') format('woff2');
  font-weight: 400; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC;
}
@font-face {
  font-family: 'DejaVu Sans';
  src: url('../fonts/dejavu-sans-400.woff2') format('woff2');
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: 'DejaVu Sans';
  src: url('../fonts/dejavu-sans-700.woff2') format('woff2');
  font-weight: 700; font-display: swap;
}

:root {
  --nuit: #15110c;
  --nuit-clair: #221a12;
  --bois: #3b2715;
  --or: #f0b429;
  --or-clair: #ffd977;
  --or-sombre: #a06f12;
  --craie: #f3e6cf;
  --gris: #a9997e;
  --vert: #6fd08c;
  --largeur: 1080px;
}

* { box-sizing: border-box; }

/* 🔴 `height: auto` n'est PAS décoratif. Une image qui porte les attributs `width` et
 * `height` (et il faut les porter — sans eux le navigateur ne réserve pas la place et la
 * page saute au chargement) voit ces valeurs servir d'INDICE DE PRÉSENTATION. Poser
 * `width: 100%` en CSS sans `height: auto` garde alors la hauteur de l'attribut :
 * l'aperçu de l'échiquier s'affichait en 448 × 1200 au lieu d'être carré, un plateau
 * étiré du simple au triple. Mesuré, pas supposé — et invisible tant qu'on ne compare
 * pas le rapport rendu au rapport naturel. */
img { max-width: 100%; height: auto; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background:
    radial-gradient(1200px 700px at 70% -10%, #2a1e12 0%, transparent 60%),
    var(--nuit);
  color: var(--craie);
  font-family: 'DejaVu Sans', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3 {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-weight: 400;
  letter-spacing: .5px;
  color: var(--or-clair);
  line-height: 1.1;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.4rem, 7vw, 4.2rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-top: 2.2em; }
h3 { font-size: 1.3rem; margin-top: 1.8em; color: var(--or); }

a { color: var(--or-clair); text-decoration-color: var(--or-sombre); text-underline-offset: 3px; }
a:hover { color: #fff; }

p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }
li { margin-bottom: .4em; }

.enveloppe { max-width: var(--largeur); margin: 0 auto; padding: 0 20px; }

/* ─── En-tête ─────────────────────────────────────────────────────────────────── */

header.principal {
  position: sticky; top: 0; z-index: 10;
  background: rgba(21, 17, 12, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #38291a;
}
header.principal .enveloppe {
  display: flex; align-items: center; gap: 18px;
  min-height: 62px;
}
.marque {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 1.6rem; color: var(--or-clair); text-decoration: none; letter-spacing: 1px;
}
header.principal nav { margin-left: auto; display: flex; gap: 18px; flex-wrap: wrap; }
header.principal nav a { font-size: .95rem; text-decoration: none; color: var(--craie); }
header.principal nav a:hover { color: var(--or-clair); }

/* Sur telephone, quatre liens ne tiennent pas a cote de la marque : ils passent DESSOUS,
   sur une seule ligne qui defile, au lieu de s'enrouler par-dessus le logo. */
@media (max-width: 620px) {
  header.principal .enveloppe { flex-wrap: wrap; padding-top: 10px; padding-bottom: 6px; }
  header.principal nav {
    margin-left: 0; width: 100%; gap: 16px;
    flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }
  header.principal nav a { white-space: nowrap; }
}

/* ─── Boutons ─────────────────────────────────────────────────────────────────── */

.bouton, a.bouton {
  display: inline-block;
  padding: 14px 28px;
  min-height: 48px;                 /* cible tactile : le minimum des deux magasins */
  border-radius: 10px;
  background: linear-gradient(#f5c243, #b57f13);
  color: #2a1c06;
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 1.3rem; letter-spacing: .5px;
  text-decoration: none;
  border: 1px solid #7d5407;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
}
.bouton:hover { filter: brightness(1.08); color: #2a1c06; }
.bouton.discret {
  background: #2c2118; color: var(--craie); border-color: #55401f;
  box-shadow: none;
}
.bouton.discret:hover { color: var(--or-clair); }

/* ─── Bandeau d'accueil ───────────────────────────────────────────────────────── */

.heros { padding: clamp(40px, 8vw, 96px) 0 40px; }
.heros p.accroche { font-size: clamp(1.05rem, 2.6vw, 1.35rem); color: var(--craie); max-width: 40ch; }
.heros .actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.heros .colonnes { display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; align-items: center; }
@media (max-width: 820px) { .heros .colonnes { grid-template-columns: 1fr; } }

.echiquier-apercu {
  width: 100%; height: auto; border-radius: 14px; display: block;
  border: 1px solid #4a3418;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
}

/* ─── Cartes ──────────────────────────────────────────────────────────────────── */

.grille { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.carte {
  background: linear-gradient(160deg, var(--nuit-clair), #1a140e);
  border: 1px solid #3a2b1a;
  border-radius: 14px;
  padding: 22px 22px 18px;
}
.carte h3 { margin-top: 0; }
.carte p { margin-bottom: 0; color: #d9caae; font-size: .97rem; }

/* Tableau des niveaux de bot. */
table.niveaux { width: 100%; border-collapse: collapse; margin: 18px 0 8px; font-size: .95rem; }
table.niveaux th, table.niveaux td { padding: 9px 12px; text-align: left; border-bottom: 1px solid #33261a; }
table.niveaux th { color: var(--or); font-weight: 700; }
table.niveaux td.cote { color: var(--or-clair); font-family: 'Bebas Neue', sans-serif; font-size: 1.15rem; }
/* Sur téléphone, un tableau de cinq colonnes déborde : il défile dans SON cadre, jamais
   la page (une page qui défile de côté est le défaut mobile le plus signalé). */
.defilable { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ─── Pages légales ───────────────────────────────────────────────────────────── */

.legal { padding: 40px 0 70px; max-width: 76ch; }
.legal h1 { font-size: clamp(2rem, 5vw, 3rem); }
.legal .maj { color: var(--gris); font-size: .9rem; margin-top: -.6em; }
.legal h2 { font-size: 1.5rem; margin-top: 2em; color: var(--or); }
.legal .encadre {
  background: #1d1710; border-left: 3px solid var(--or); border-radius: 0 10px 10px 0;
  padding: 14px 18px; margin: 18px 0;
}
.legal table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: .95rem; }
.legal th, .legal td { padding: 9px 12px; border-bottom: 1px solid #33261a; text-align: left; vertical-align: top; }
.legal th { color: var(--or); }

/* ─── Pied ────────────────────────────────────────────────────────────────────── */

footer.principal {
  border-top: 1px solid #33261a; margin-top: 60px; padding: 28px 0 40px;
  color: var(--gris); font-size: .92rem;
}
footer.principal nav { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 10px; }
footer.principal a { text-decoration: none; }

/* ─── Apparition au défilement ────────────────────────────────────────────────── */
/* 🔴 L'effacement est posé PAR LE SCRIPT (classe `.anime` sur <html>), jamais par la
   feuille seule. Une première version mettait `opacity: 0` en CSS : sans JavaScript, la
   page restait entièrement invisible — et ça ne s'était vu que sur une capture mobile. */
html.anime .apparait { opacity: 0; transform: translateY(14px); transition: opacity .5s, transform .5s; }
html.anime .apparait.vu { opacity: 1; transform: none; }
