/* Les pages de règles, en français (regles-belote.html, regles-tarot.html) et en
   anglais (belote-rules.html, tarot-rules.html) : une seule feuille pour les quatre.
   Recopiée dans build/web/ par `flutter build web`, comme tout web/.

   Les couleurs sont celles de la charte de l'application (myvibes/lib/charte.dart)
   et du bloc #contenu-seo de index.html. */

:root {
  color-scheme: dark;
  --table: #0B4D26;   /* kVertTable */
  --sombre: #06331A;  /* kVertSombre */
  --clair: #1B7A3E;   /* kVertClair */
  --or: #FFD54F;
  --texte: #E8F5EC;
  --titre: #A5D6A7;
  --rouge: #FF8A80;   /* kRougeSymboleSurSombre : ♥ et ♦ sur fond sombre */
  --filet: rgba(232, 245, 236, 0.18);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--table);
  color: var(--texte);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
}

a { color: var(--or); }
a:focus-visible { outline: 2px solid var(--or); outline-offset: 2px; }

/* L'en-tête reste visible : le bouton Jouer est à portée à tout moment. */
.entete {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 1rem;
  background: var(--sombre);
  border-bottom: 1px solid var(--filet);
}

.marque {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--texte);
  font-weight: 700;
  text-decoration: none;
}
.marque img { border-radius: 6px; }

.droite {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.langue { color: var(--texte); font-size: 0.92rem; }

.bouton {
  display: inline-block;
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  background: var(--or);
  color: #1A1A1A;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.bouton:focus-visible { outline-color: var(--texte); }

main {
  max-width: 46rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 2.5rem;
}

h1 { margin: 0 0 0.75rem; font-size: 1.9rem; line-height: 1.2; color: var(--or); }

h2 {
  margin: 2.5rem 0 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--filet);
  font-size: 1.4rem;
  line-height: 1.25;
  color: var(--titre);
  scroll-margin-top: 3rem; /* la hauteur de l'en-tête, pour les liens du sommaire */
}

h3 { margin: 1.5rem 0 0.5rem; font-size: 1.05rem; color: var(--texte); }

p, ul, ol { margin: 0 0 0.9rem; }
ul, ol { padding-left: 1.3rem; }
li { margin-bottom: 0.35rem; }

.chapo { font-size: 1.08rem; }

.sommaire {
  margin: 1.25rem 0 0;
  padding: 0.9rem 1rem 0.9rem 0.5rem;
  background: rgba(6, 51, 26, 0.55);
  border-radius: 10px;
}
.sommaire ol { margin: 0; }
.sommaire li { margin-bottom: 0.15rem; }

/* Un tableau trop large défile dans son cadre : jamais la page. */
.defile { overflow-x: auto; margin: 0 0 1rem; }

table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }

th, td {
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--filet);
  text-align: left;
  vertical-align: top;
}
thead th { background: var(--sombre); color: var(--titre); }
tbody th { font-weight: 600; }

.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

.encadre {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  background: rgba(6, 51, 26, 0.55);
  border-left: 3px solid var(--or);
  border-radius: 0 8px 8px 0;
}
.encadre > :last-child { margin-bottom: 0; }

.r { color: var(--rouge); }

.appel {
  margin-top: 2.5rem;
  padding: 1.25rem 1rem;
  background: var(--sombre);
  border-radius: 12px;
  text-align: center;
}
.appel .bouton { padding: 0.6rem 1.5rem; }

footer {
  padding: 1rem;
  border-top: 1px solid var(--filet);
  text-align: center;
  font-size: 0.92rem;
}

@media (min-width: 40rem) {
  .sommaire ol { columns: 2; column-gap: 2rem; }
  h1 { font-size: 2.3rem; }
}
