/* ==========================================================================
   guide-jeux-exterieurs — feuille de style principale
   Palette : vert forêt / prairie, bois, sable, jaune balise
   Typo : Anton (affichage / scores) + Work Sans (texte courant)
   ========================================================================== */

:root {
  --forest: #1f3a2c;
  --forest-deep: #142720;
  --grass: #3c6e47;
  --grass-tint: #e4ecdf;
  --wood: #8b5e34;
  --wood-light: #c9a876;
  --sand: #f3efe4;
  --paper: #fbf9f4;
  --white: #ffffff;
  --flag: #e8a93b;
  --flag-deep: #c78a1f;
  --ink: #1b1b18;
  --ink-soft: #4a493f;
  --line: rgba(31, 58, 44, 0.16);

  /* accent surchargé par page (thème de jeu) */
  --accent: var(--grass);
  --accent-deep: #2b5136;

  --font-display: "Anton", "Arial Narrow", sans-serif;
  --font-body: "Work Sans", "Segoe UI", sans-serif;

  --max-width: 1120px;
  --radius: 6px;
}

body.theme-molkky {
  --accent: #3c6e47;
  --accent-deep: #2b5136;
}
body.theme-kubb {
  --accent: #2e4a7a;
  --accent-deep: #1f3457;
}
body.theme-cornhole {
  --accent: #c0392b;
  --accent-deep: #942a1f;
}
body.theme-petanque {
  --accent: #a9673b;
  --accent-deep: #7c4b27;
}
body.theme-pingpong {
  --accent: #1f5c8b;
  --accent-deep: #163f5e;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent-deep);
}

a:focus-visible,
button:focus-visible,
.nav-link:focus-visible {
  outline: 3px solid var(--flag);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--forest);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  z-index: 100;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--forest);
  line-height: 1.08;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

p { margin: 0 0 1em; max-width: 68ch; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- en-tête ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--forest);
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex: none;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}

.brand-name span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
}

.nav-link {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  padding-bottom: 4px;
  border-bottom: 3px solid transparent;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  border-bottom-color: var(--flag);
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--forest);
  border-radius: var(--radius);
  width: 42px;
  height: 38px;
  padding: 0;
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: var(--forest);
  margin: 5px auto;
}

/* ---------- sous-menu « Autres jeux » ---------- */

.nav-dropdown {
  position: relative;
}
.nav-dropdown summary {
  cursor: pointer;
  list-style: none;
}
.nav-dropdown summary::-webkit-details-marker { display: none; }
.nav-dropdown summary::after {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-left: 0.4rem;
  transition: transform 0.15s ease;
}
.nav-dropdown[open] summary::after { transform: rotate(-135deg); }

.dropdown-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 761px) {
  .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 8px 20px rgba(31, 58, 44, 0.12);
    min-width: 160px;
    padding: 0.4rem 0;
    z-index: 50;
  }
  .dropdown-menu li a {
    display: block;
    padding: 0.55rem 1rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--ink);
    border-bottom: none !important;
  }
  .dropdown-menu li a:hover { background: var(--grass-tint); }
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 72px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }
  .main-nav.is-open { display: block; }
  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 1.5rem 1.5rem;
  }
  .main-nav li { border-top: 1px solid var(--line); }
  .main-nav a { display: block; padding: 0.85rem 0; }
  .dropdown-menu { padding-left: 1rem; }
  .dropdown-menu li { border-top: 1px solid var(--line); }
  .dropdown-menu li a { display: block; padding: 0.7rem 0; }
}

/* petites cartes pour les jeux additionnels sur l'accueil */

.other-games-section { padding: 0 0 4.5rem; }

.other-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.other-game-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.5rem;
  background: var(--white);
  text-decoration: none;
  color: var(--ink);
  display: block;
}
.other-game-card h3 { margin-bottom: 0.3rem; }
.other-game-card p { margin-bottom: 0; color: var(--ink-soft); font-size: 0.92rem; }
.other-game-card span.other-game-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-deep);
  background: var(--grass-tint);
  padding: 0.15rem 0.55rem;
  border-radius: 3px;
  margin-bottom: 0.6rem;
}

/* ---------- pied de page ---------- */

.site-footer {
  background: var(--forest-deep);
  color: #d9e2d6;
  margin-top: 4rem;
}

.site-footer .container {
  padding-top: 3rem;
  padding-bottom: 2rem;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2rem;
}

.site-footer h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.site-footer a {
  color: #cfe0cb;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer li { margin-bottom: 0.45rem; }

.footer-disclosure {
  font-size: 0.85rem;
  color: #a9bda5;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 1.25rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  text-align: center;
  padding: 1rem 0 1.75rem;
  font-size: 0.82rem;
  color: #93a690;
}

@media (max-width: 760px) {
  .site-footer .container { grid-template-columns: 1fr; }
}

/* ---------- bandeau de rappel (affiliation) ---------- */

.affiliate-note {
  background: var(--sand);
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--ink-soft);
  text-align: center;
  padding: 0.45rem 1rem;
}

/* ---------- hero accueil ---------- */

.hero {
  background: var(--forest);
  color: var(--sand);
  padding: 4.5rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.hero h1 { color: var(--white); }

.hero-eyebrow {
  font-weight: 600;
  color: var(--flag);
  margin-bottom: 0.6rem;
}

.hero p.lead {
  font-size: 1.15rem;
  color: #cfe0cb;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.75rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  font-weight: 700;
  text-decoration: none;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--flag);
  color: var(--forest-deep);
}
.btn-primary:hover { background: #f3bb5a; }

.btn-outline {
  border-color: rgba(255,255,255,0.5);
  color: var(--white);
}
.btn-outline:hover { border-color: var(--white); }

.btn-accent {
  background: var(--accent);
  color: var(--white);
}
.btn-accent:hover { background: var(--accent-deep); }

/* pastilles de score dans le hero (illustration du terrain) */

.score-board {
  background: var(--forest-deep);
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 1.75rem;
}

.score-board-title {
  font-family: var(--font-display);
  color: var(--flag);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.score-row:first-of-type { border-top: none; }

.score-row a {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
}
.score-row a:hover { color: var(--flag); }

.score-num {
  font-family: var(--font-display);
  color: var(--flag);
  font-size: 1.4rem;
}

/* ---------- cartes jeux (accueil) ---------- */

.games-section { padding: 4.5rem 0; }

.section-intro { max-width: 62ch; margin-bottom: 2.5rem; }

.game-row {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 2.5rem;
  align-items: center;
  padding: 2.75rem 0;
  border-top: 1px solid var(--line);
}
.game-row:last-child { border-bottom: 1px solid var(--line); }
.game-row.reverse { grid-template-columns: 1.15fr 0.85fr; }
.game-row.reverse .game-copy { order: 2; }
.game-row.reverse .game-figure { order: 1; }

@media (max-width: 760px) {
  .game-row, .game-row.reverse {
    grid-template-columns: 1fr;
  }
  .game-row.reverse .game-copy,
  .game-row.reverse .game-figure { order: initial; }
}

.game-figure {
  background: var(--sand);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-figure svg { width: 100%; height: auto; max-height: 220px; }

.game-tag {
  display: inline-block;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--accent-deep);
  background: var(--grass-tint);
  padding: 0.2rem 0.65rem;
  border-radius: 3px;
  margin-bottom: 0.75rem;
}

.game-links { margin-top: 1.25rem; display: flex; gap: 1.25rem; flex-wrap: wrap; }
.game-links a { font-weight: 700; text-decoration: none; }
.game-links a.secondary { color: var(--ink-soft); }

/* ---------- pages jeu : contenu ---------- */

.page-hero {
  background: var(--accent);
  color: var(--white);
  padding: 3.25rem 0 2.75rem;
}
.page-hero .container { max-width: 900px; }
.page-hero h1 { color: var(--white); }
.page-hero .lead { color: rgba(255,255,255,0.9); font-size: 1.1rem; }

.breadcrumb {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 1rem;
}
.breadcrumb a { color: rgba(255,255,255,0.9); }
.breadcrumb ol { list-style: none; display: flex; gap: 0.4rem; padding: 0; margin: 0; }
.breadcrumb li:not(:last-child)::after { content: "/"; margin-left: 0.4rem; }

.content-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 3rem 1.5rem 1rem;
}

.content-wrap h2 {
  margin-top: 2.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
}
.content-wrap h2:first-of-type { border-top: none; }

.fact-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin: 1.75rem 0 2.5rem;
}
.fact-strip div {
  background: var(--white);
  padding: 1rem;
  text-align: center;
}
.fact-strip strong {
  display: block;
  font-family: var(--font-display);
  color: var(--accent-deep);
  font-size: 1.3rem;
}
.fact-strip span { font-size: 0.82rem; color: var(--ink-soft); }

@media (max-width: 600px) {
  .fact-strip { grid-template-columns: 1fr; }
}

.steps { padding-left: 0; list-style: none; counter-reset: step; }
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.75rem;
  margin-bottom: 1.35rem;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 1.9rem; height: 1.9rem;
  background: var(--accent);
  color: var(--white);
  border-radius: 50%;
  font-family: var(--font-display);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem;
}

.callout {
  background: var(--sand);
  border-left: 4px solid var(--accent);
  padding: 1rem 1.25rem;
  border-radius: 0 8px 8px 0;
  margin: 1.75rem 0;
}
.callout p:last-child { margin-bottom: 0; }

.pins-diagram { margin: 1.75rem auto; max-width: 340px; }

.faq-item {
  border-top: 1px solid var(--line);
  padding: 1.1rem 0;
}
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item h3 { margin-bottom: 0.4rem; font-size: 1.05rem; }

.cta-panel {
  background: var(--accent);
  color: var(--white);
  border-radius: 10px;
  padding: 2rem;
  margin: 2.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.cta-panel h3 { color: var(--white); margin: 0 0 0.35rem; }
.cta-panel p { margin: 0; color: rgba(255,255,255,0.88); }

/* ---------- guides d'achat ---------- */

.intro-block { max-width: 720px; margin: 0 auto 2.5rem; padding: 0 1.5rem; }

.compare-table-wrap { overflow-x: auto; margin: 2rem 0; }
table.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  background: var(--white);
}
.compare-table th, .compare-table td {
  border: 1px solid var(--line);
  padding: 0.75rem 0.9rem;
  text-align: left;
  font-size: 0.92rem;
  vertical-align: top;
}
.compare-table th {
  background: var(--sand);
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--forest);
}
.compare-table td a { font-weight: 700; text-decoration: none; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.75rem;
  margin: 2rem 0 3rem;
}

.product-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.product-photo {
  aspect-ratio: 4 / 3;
  background: var(--sand);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  text-align: center;
  padding: 1rem;
}
.product-photo svg { width: 46px; height: 46px; margin-bottom: 0.5rem; opacity: 0.55; }
.product-photo span { font-size: 0.72rem; display: block; }
.product-photo img { width: 100%; height: 100%; object-fit: cover; }

.product-body { padding: 1.25rem; display: flex; flex-direction: column; flex: 1; }
.product-pick {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-deep);
  background: var(--grass-tint);
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 3px;
  margin-bottom: 0.6rem;
  align-self: flex-start;
}
.product-body h3 { margin-bottom: 0.35rem; font-size: 1.1rem; }
.product-price { font-weight: 700; color: var(--ink-soft); margin-bottom: 0.6rem; font-size: 0.9rem; }
.product-body ul { padding-left: 1.15rem; margin: 0 0 1.1rem; font-size: 0.9rem; color: var(--ink-soft); }
.product-body ul li { margin-bottom: 0.3rem; }
.product-cta { margin-top: auto; }

.sponsored-btn {
  display: block;
  text-align: center;
  background: var(--flag);
  color: var(--forest-deep);
  font-weight: 700;
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
}
.sponsored-btn:hover { background: #f3bb5a; }
.sponsored-tag { display: block; text-align: center; font-size: 0.7rem; color: var(--ink-soft); margin-top: 0.4rem; }

/* ---------- page mentions légales ---------- */

.legal-wrap { max-width: 720px; margin: 0 auto; padding: 3rem 1.5rem 4rem; }
.legal-wrap h2 { margin-top: 2rem; }
