/* Ritchie Dagonia — échecs à Bruxelles. Feuille de style écrite à la main, sans framework. */

:root {
  --noir: #121212;
  --blanc: #fbfaf5;
  --vert: #1f5f3f;
  --vert-sombre: #16452e;
  --case-claire: #efe9d8;
  --case-sombre: #1a1a1a;
  --encre-douce: #55554f;
  --trait: #d9d3c2;
  --largeur: 46rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--blanc);
  color: var(--noir);
  font-family: "Rubik", "Segoe UI", Roboto, system-ui, sans-serif;
  font-size: 1.05rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "DM Serif Display", Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: 1.15;
  margin: 0;
}

p { margin: 0 0 1.1rem; }
a { color: var(--vert); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover, a:focus-visible { color: var(--vert-sombre); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--vert); outline-offset: 3px; }

.acces-rapide {
  position: absolute; left: -999px; top: 0;
  background: var(--vert); color: #fff; padding: .6rem 1rem; z-index: 10;
}
.acces-rapide:focus { left: 1rem; top: 1rem; }

/* ---- En-tête ---- */
.bandeau {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 1.1rem 1.25rem;
}
.marque {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--noir);
  text-decoration: none;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.3rem;
}
.marque svg { width: 1.9rem; height: 1.9rem; }
.menu ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.2rem; }
.menu a {
  color: var(--noir);
  text-decoration: none;
  padding-bottom: .15rem;
  border-bottom: 2px solid transparent;
}
.menu a:hover, .menu a[aria-current="page"] { border-bottom-color: var(--vert); color: var(--noir); }

/* ---- Bandeau d'ouverture : damier discret ---- */
.ouverture {
  background-color: var(--case-sombre);
  background-image: repeating-conic-gradient(rgba(255, 255, 255, .055) 0 25%, transparent 0 50%);
  background-size: 72px 72px;
  color: var(--blanc);
  border-top: 6px solid var(--vert);
  border-bottom: 6px solid var(--vert);
}
.ouverture .interieur {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 3.2rem 1.25rem 2.6rem;
}
.ouverture .etiquette {
  display: inline-block;
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #bfe3cd;
  margin-bottom: .9rem;
}
.ouverture h1 {
  font-size: clamp(1.9rem, 4.6vw, 3rem);
  color: #fff;
  max-width: 22ch;
}
.ouverture .chapeau {
  font-size: 1.12rem;
  max-width: 58ch;
  margin-top: 1.2rem;
  color: #e8e6df;
}

/* ---- Corps de page ---- */
.page {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 2.4rem 1.25rem 3.5rem;
  counter-reset: coup;
}
.page section { margin-bottom: 2.6rem; }
.page h2 {
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  margin: 0 0 .9rem;
  padding-left: 2.4rem;
  position: relative;
}
.page h2::before {
  counter-increment: coup;
  content: counter(coup) ".";
  position: absolute;
  left: 0;
  top: .1em;
  color: var(--vert);
  font-size: .8em;
}
.page h3 { font-size: 1.25rem; margin: 1.4rem 0 .5rem; }

/* Deux cases côte à côte : l'une claire, l'autre sombre */
.deux-cases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.1rem;
  margin: 1.4rem 0 .6rem;
}
.case {
  padding: 1.3rem 1.4rem;
  border: 3px solid var(--noir);
}
.case h3 { margin-top: 0; }
.case ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.case li { margin-bottom: .45rem; }
.case-claire { background: var(--case-claire); }
.case-sombre { background: var(--case-sombre); color: var(--blanc); border-color: var(--vert); }
.case-sombre h3 { color: #bfe3cd; }

/* Encadré en vert */
.note-verte {
  border-left: 6px solid var(--vert);
  background: var(--case-claire);
  padding: 1rem 1.3rem;
  margin: 1.4rem 0;
}
.note-verte p:last-child { margin-bottom: 0; }

/* Conseils numérotés comme une feuille de partie */
.conseils { list-style: none; padding: 0; margin: 1rem 0 0; counter-reset: conseil; }
.conseils li {
  position: relative;
  padding: .75rem 0 .75rem 3rem;
  border-top: 1px solid var(--trait);
}
.conseils li:last-child { border-bottom: 1px solid var(--trait); }
.conseils li::before {
  counter-increment: conseil;
  content: counter(conseil);
  position: absolute;
  left: 0;
  top: .8rem;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  background: var(--vert);
  color: #fff;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.05rem;
}

/* ---- Page des ouvertures ---- */
.couleur { margin-bottom: 3rem; }
.fiche {
  border: 3px solid var(--noir);
  padding: 1.4rem 1.5rem 1.1rem;
  margin: 1.4rem 0;
  background: #fff;
}
.fiche.sombre { background: var(--case-sombre); color: var(--blanc); border-color: var(--vert); }
.fiche h3 { margin: 0 0 .3rem; font-size: 1.45rem; }
.fiche.sombre h3 { color: #bfe3cd; }
.fiche .coups {
  font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  font-size: .95rem;
  color: var(--encre-douce);
  margin-bottom: 1rem;
}
.fiche.sombre .coups { color: #cfd6cf; }
.fiche dl { margin: 0; }
.fiche dt {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.05rem;
  color: var(--vert);
  margin-top: .8rem;
}
.fiche.sombre dt { color: #bfe3cd; }
.fiche dd { margin: .15rem 0 0; }

/* Séparateur : une rangée de pions en CSS */
.rangee-pions {
  height: 14px;
  margin: 2.4rem auto 0;
  max-width: 14rem;
  background: radial-gradient(circle at 50% 40%, var(--vert) 0 4px, transparent 5px);
  background-size: 22px 14px;
  background-repeat: repeat-x;
}

/* ---- Pied de page ---- */
.pied {
  background: var(--vert);
  color: #f2f7f3;
  margin-top: 2rem;
}
.pied .interieur {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 2.2rem 1.25rem 2.6rem;
}
.pied p { margin-bottom: .7rem; }
.pied a { color: #fff; }
.pied .contact {
  border-top: 1px solid rgba(255, 255, 255, .35);
  padding-top: 1rem;
  margin-top: 1rem;
}
.pied nav ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 1rem; }
.pied .adresse { font-family: ui-monospace, Menlo, Consolas, monospace; background: rgba(0,0,0,.25); padding: .1rem .4rem; }

/* ---- Page mentions ---- */
.mentions h2 { font-size: 1.4rem; margin: 1.8rem 0 .5rem; padding-left: 0; }
.mentions h2::before { content: none; }
.mentions address { font-style: normal; }

@media (max-width: 480px) {
  body { font-size: 1rem; }
  .bandeau { padding: .9rem 1rem; }
  .menu ul { gap: .9rem; }
  .ouverture .interieur { padding: 2.4rem 1rem 2rem; }
  .page, .pied .interieur { padding-left: 1rem; padding-right: 1rem; }
  .page h2 { padding-left: 2rem; }
  .case, .fiche { padding: 1.1rem 1rem; }
}

/* photos */
.photos{display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin:2rem 0}.photos figure{margin:0}.photos img{width:100%;height:auto;display:block;aspect-ratio:1/1;object-fit:cover;border:1px solid #111}.photos figcaption{font-family:'DM Serif Display',serif;font-size:.95rem;margin-top:.4rem}@media(max-width:560px){.photos{grid-template-columns:1fr}}
