/* ==========================================================================
   Plucky Pop · styles communs à toutes les pages
   Couleurs et boutons repris de l'interface du jeu (core/assets/art/ui).
   Règles d'animation : voir docs/guidelines-decoration.md
   ========================================================================== */

@font-face {
  font-family: "Lilita One";
  src: url("/assets/fonts/lilita-one.ttf") format("truetype");
  font-weight: 100 900;  /* une seule graisse : pas de faux gras */
  font-display: swap;
}

:root {
  --ink: #3a2e1f;          /* brun terre, texte principal */
  --ink-soft: #66543f;     /* texte secondaire (7:1 sur la crème) */
  --cream: #fff8ea;        /* coquille d'œuf */
  --cream-2: #f6ead2;
  --paper: #fffdf7;
  --honey: #f6c26c;        /* cadre des popups du jeu */
  --honey-edge: #e9a94d;
  --honey-deep: #9a5a0c;   /* texte miel lisible sur crème */
  --grass-top: #9ada62;    /* bouton vert du jeu */
  --grass: #7cc94a;
  --grass-edge: #4f9a2a;
  --grass-deep: #2e6a1c;   /* liens sur crème */
  --orange-top: #ffc959;   /* bouton orange du jeu */
  --orange: #ffb432;
  --orange-edge: #d38414;
  --sky: #4fb3e8;
  --sky-deep: #17629a;
  --carrot: #f58a3c;
  --sun: #ffce3d;
  --berry: #e4657e;
  --plum: #9c6bd4;
  --forest: #1d3f28;       /* section sombre */
  --bark: #2a2017;         /* pied de page */
  --focus: #17629a;

  --font-title: "Lilita One", "Arial Rounded MT Bold", ui-rounded, system-ui, sans-serif;
  --font-body: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 22px;
  --nav-h: 64px;
  --wrap: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 17px/1.6 var(--font-body);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }

h1, h2, h3, .title {
  font-family: var(--font-title);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: .01em;
  margin: 0 0 .4em;
  text-wrap: balance;
}
h2 { font-size: clamp(2rem, 4.6vw, 3.3rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; text-wrap: pretty; }

a { color: var(--grass-deep); text-underline-offset: .18em; }
a:hover, a:focus-visible { color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 300;
  background: var(--ink); color: var(--cream); padding: 10px 16px; border-radius: 12px;
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--cream); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-title);
  font-size: .95rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--honey-deep);
  margin-bottom: .6rem;
}

/* ---------- Boutons façon jeu ---------- */
.btn {
  --top: var(--grass-top); --mid: var(--grass); --edge: var(--grass-edge); --txt: #1b3a0d;
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px;
  padding: .6em 1.35em .7em;
  border: 0; border-radius: 999px;
  font: 1.12rem/1.1 var(--font-title);
  letter-spacing: .02em;
  color: var(--txt);
  text-decoration: none;
  cursor: pointer;
  background: linear-gradient(var(--top), var(--mid) 58%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, .55),
    inset 0 -3px 0 rgba(0, 0, 0, .06),
    0 5px 0 var(--edge),
    0 9px 16px rgba(42, 32, 23, .18);
}
.btn:hover, .btn:focus-visible { color: var(--txt); filter: brightness(1.05); }
.btn:active { transform: translateY(3px); box-shadow: inset 0 2px 0 rgba(255,255,255,.5), 0 2px 0 var(--edge), 0 4px 8px rgba(42,32,23,.16); }
@media (prefers-reduced-motion: no-preference) {
  .btn { transition: transform .12s ease, filter .12s ease, box-shadow .12s ease; }
  .btn:hover { transform: translateY(-2px); }
  .btn:active { transform: translateY(3px); }
}
.btn-orange { --top: var(--orange-top); --mid: var(--orange); --edge: var(--orange-edge); --txt: #3d2305; }
.btn-cream { --top: #fffbf1; --mid: #fff3dc; --edge: #d9b47e; --txt: var(--ink); }
/* Planche de bois miel du jeu (bouts arrondis conservés, milieu étiré) */
.btn-wood {
  --txt: #4a2508;
  background: none;
  box-shadow: none;
  border: solid transparent; border-width: 0 26px;
  border-image: url("/assets/img/wood-plank.webp") 0 49 fill / 0 26px stretch;
  min-height: 56px;
  padding-inline: .35em;
  text-shadow: 0 1px 0 rgba(255, 236, 190, .7);
  filter: drop-shadow(0 4px 0 rgba(122, 63, 18, .35));
}
.btn-wood.btn-sm { min-height: 42px; border-width: 0 20px; border-image-width: 0 20px; }
.btn-wood:hover, .btn-wood:focus-visible { filter: drop-shadow(0 4px 0 rgba(122, 63, 18, .35)) brightness(1.06); }
.btn-wood:active { box-shadow: none; filter: drop-shadow(0 1px 0 rgba(122, 63, 18, .35)); }
.btn-sm { min-height: 40px; font-size: 1rem; padding: .45em 1.1em .55em; }
.btn svg { width: 1.2em; height: 1.2em; flex: none; }
.btn .sub { display: block; font: 700 .72rem/1 var(--font-body); letter-spacing: .04em; text-transform: uppercase; opacity: .85; }
.btn .two-lines { display: flex; flex-direction: column; align-items: flex-start; gap: .2em; text-align: left; }

/* ---------- Carte « popup » du jeu : cadre miel, couture pointillée ---------- */
.popup {
  position: relative;
  /* cadre en bois miel (texture de la planche du jeu), intérieur crème */
  background:
    linear-gradient(var(--paper), var(--paper)) padding-box,
    url("/assets/img/wood-texture.webp") 0 0 / 420px auto border-box;
  border: 10px solid transparent;
  border-radius: 30px;
  box-shadow: 0 0 0 3px #8a4a16, inset 0 0 0 2px rgba(122, 63, 18, .3), 0 10px 0 rgba(122, 63, 18, .28), 0 22px 40px rgba(42, 32, 23, .18);
  padding: clamp(22px, 4vw, 40px);
}
.popup::before {
  content: "";
  position: absolute; inset: 6px;
  border: 2px dashed rgba(201, 125, 48, .35);
  border-radius: 18px;
  pointer-events: none;
}

/* ---------- Navigation ---------- */
.site-nav {
  position: fixed; inset: 0 0 auto; z-index: 100;
  height: var(--nav-h);
  background: rgba(255, 248, 234, .92);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  backdrop-filter: blur(12px) saturate(1.3);
}
.site-nav::after {  /* liseré de bois miel sous la barre */
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 6px;
  background: url("/assets/img/wood-texture.webp") 0 50% / 420px auto;
  box-shadow: 0 1px 0 #8a4a16, 0 3px 8px rgba(42, 32, 23, .15);
}
.site-nav .wrap { height: 100%; display: flex; align-items: center; gap: 20px; }
.nav-logo { display: block; flex: none; line-height: 0; border-radius: 10px; }
.nav-logo img { height: 40px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links a:not(.btn) {
  font: 1.02rem/1 var(--font-title);
  letter-spacing: .02em;
  color: var(--ink);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 12px;
}
.nav-links a:not(.btn):hover, .nav-links a:not(.btn):focus-visible { background: rgba(246, 194, 108, .35); }
.nav-links a[aria-current="page"] { background: rgba(246, 194, 108, .35); }
.nav-links .btn { margin-left: 8px; }

.nav-menu { display: none; margin-left: auto; position: relative; }
.nav-menu summary {
  list-style: none; cursor: pointer;
  width: 48px; height: 48px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--paper); border: 2px solid var(--honey);
}
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu summary svg { width: 26px; height: 26px; }
.nav-menu[open] summary { background: var(--honey); }
.nav-menu .panel {
  position: absolute; right: 0; top: calc(100% + 10px);
  width: min(300px, calc(100vw - 32px));
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px;
  background: var(--paper);
  border: 4px solid var(--honey); border-radius: 22px;
  box-shadow: 0 16px 32px rgba(42, 32, 23, .22);
}
.nav-menu .panel a:not(.btn) {
  font: 1.15rem/1 var(--font-title); color: var(--ink); text-decoration: none;
  padding: 14px 12px; border-radius: 12px;
}
.nav-menu .panel a:not(.btn):hover, .nav-menu .panel a:not(.btn):focus-visible { background: rgba(246, 194, 108, .35); }
.nav-menu .panel .btn { margin-top: 6px; }

/* Bouton FR / EN : lien vers la même page dans l'autre langue, visible aussi sur mobile */
.nav-lang {
  flex: none; margin-left: -8px;
  min-width: 48px; height: 44px; padding: 0 10px; border-radius: 14px;
  display: grid; place-items: center;
  font: 1.02rem/1 var(--font-title); letter-spacing: .04em;
  color: var(--ink); text-decoration: none;
  background: var(--paper); border: 2px solid var(--honey);
}
.nav-lang:hover, .nav-lang:focus-visible { background: var(--honey); }
.nav-logo + .nav-lang { margin-left: auto; }   /* page sans menu (404) */

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-menu { display: block; }
}

/* ---------- Pied de page ---------- */
.site-footer {
  background: var(--bark);
  color: #efe3cf;
  padding: 56px 0 32px;
  font-size: .95rem;
}
.site-footer a { color: #ffe3a6; }
.site-footer a:hover, .site-footer a:focus-visible { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-brand img { width: 190px; height: auto; margin-bottom: 12px; }
.footer-brand p { color: #d9c9ae; max-width: 34ch; }
.site-footer h2 {
  font-size: 1rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--honey); margin-bottom: .9em;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer ul a { text-decoration: none; }
.site-footer ul a:hover, .site-footer ul a:focus-visible { text-decoration: underline; }
.footer-bottom {
  margin-top: 40px; padding-top: 20px;
  border-top: 1px solid rgba(239, 227, 207, .16);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  color: #cbb99c; font-size: .88rem;
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ---------- Pages de texte (confidentialité, aide, suppression) ---------- */
.page-hero {
  position: relative;
  padding: calc(var(--nav-h) + 48px) 0 88px;
  background:
    radial-gradient(120% 90% at 85% 110%, rgba(255, 206, 61, .35), transparent 60%),
    linear-gradient(180deg, #5aa8e2 0%, #8cc5ef 55%, #d6ecfb 100%);
  overflow: hidden;
  color: var(--ink);
}
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); color: var(--ink); text-shadow: 0 3px 0 rgba(255, 255, 255, .55); }
.page-hero p { max-width: 60ch; font-size: 1.1rem; color: #0f3552; font-weight: 600; }
.page-hero .hero-bank {
  position: absolute; left: 50%; bottom: -2px;
  width: max(1200px, 110vw); max-width: none; height: clamp(90px, 13vw, 160px);
  object-fit: cover; object-position: 50% 0;
  transform: translateX(-50%); pointer-events: none;
}
.page-hero .hero-bird {
  position: absolute; right: max(16px, calc(50% - 600px)); bottom: 40px;
  height: clamp(150px, 20vw, 230px); width: auto; z-index: 1; pointer-events: none;
  filter: drop-shadow(0 10px 10px rgba(23, 70, 120, .25));
}
@media (max-width: 700px) {
  .page-hero .hero-bird { display: none; }
}

.doc { padding: 16px 0 88px; background: #fdfcfa; }
.doc-body { max-width: 780px; margin: -40px auto 0; position: relative; z-index: 2; }
.doc-title { font-size: clamp(1.8rem, 4vw, 2.4rem); margin: .2em 0 .25em; }
.doc .popup h3 { font-size: 1.45rem; margin: 1.7em 0 .45em; }
.doc .popup h4 { font: 400 1.15rem/1.2 var(--font-title); margin: 1.4em 0 .4em; }
.doc ul { padding-left: 1.25em; }
.doc li { margin: .35em 0; }
.meta { color: var(--ink-soft); font-weight: 600; }
.note {
  background: #fff4d9; border: 2px solid var(--honey); border-radius: 18px;
  padding: 14px 18px; margin: 18px 0;
}
.table-wrap { overflow-x: auto; margin: 12px 0; }
.doc table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid #efe1c6; }
.doc th { color: var(--ink-soft); font-weight: 800; }
.lang-switch { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 12px; }
.doc-divider { border: 0; border-top: 3px dashed rgba(233, 169, 77, .5); margin: 56px 0; }
