/* Petit Gateau Games — feuille de style unique, faite main, dans le style de l'interface du jeu
   (panneaux crème cernés de brun, boutons bombés, ciel bleu, prairie, blé doré). */

@font-face {
  font-family: "Fredoka";
  src: url("/fonts/Fredoka-600.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Fredoka";
  src: url("/fonts/Fredoka-700.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --outline: #3a2414;
  --ink: #3a2414;
  --ink-soft: #7a5a3f;
  --cream: #fff8ea;
  --cream-deep: #f7e3bd;
  --page: #fdf1da;
  --sky-top: #4cb0ee;
  --sky-bottom: #c4ebff;
  --grass: #7cc142;
  --grass-dark: #5a9e2c;
  --gold: #ffc23d;
  --gold-dark: #e8961c;
  --barn: #c8352b;
  --barn-dark: #7f1d17;
  --green-top: #8fd65a;
  --green-bottom: #4c9f2a;
  --radius: 24px;
  --pop: 0 5px 0 var(--outline);
  --title: "Fredoka", ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", system-ui, sans-serif;
  --text: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font: 400 1.0625rem/1.65 var(--text); overflow-wrap: break-word;
}
img, video { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { font-family: var(--title); font-weight: 700; line-height: 1.12; margin: 0 0 0.5em; letter-spacing: 0.005em; }
h1 { font-size: clamp(2.2rem, 9vw, 4rem); }
h2 { font-size: clamp(1.6rem, 5.5vw, 2.3rem); }
h3 { font-size: 1.22rem; }
p { margin: 0 0 1em; }
a { color: #2f7d1e; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--barn); }
:focus-visible { outline: 3px solid var(--gold-dark); outline-offset: 3px; border-radius: 8px; }

.wrap { width: min(100% - 32px, 1080px); margin-inline: auto; }
.narrow { width: min(100% - 32px, 760px); margin-inline: auto; }
.center { text-align: center; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.92rem; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; z-index: 20; background: var(--cream); padding: 8px 14px; border-radius: 99px; }

/* Titre « autocollant » : lettres dorées cernées, comme le logo du jeu */
.sticker {
  color: var(--gold);
  text-shadow:
    3px 0 0 var(--barn-dark), -3px 0 0 var(--barn-dark), 0 3px 0 var(--barn-dark), 0 -3px 0 var(--barn-dark),
    2px 2px 0 var(--barn-dark), -2px 2px 0 var(--barn-dark), 2px -2px 0 var(--barn-dark), -2px -2px 0 var(--barn-dark),
    0 7px 0 var(--barn-dark), 0 10px 14px rgba(58, 36, 20, 0.35);
}

/* En-tête : barre flottante */
.site-header { position: relative; z-index: 10; padding: 12px 0 0; }
.bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px;
  background: rgba(255, 248, 234, 0.92); border: 3px solid var(--outline); border-radius: 26px;
  box-shadow: 0 4px 0 var(--outline); padding: 6px 8px 6px 14px;
}
@supports (backdrop-filter: blur(8px)) { .bar { background: rgba(255, 248, 234, 0.8); backdrop-filter: blur(10px); } }
@media (min-width: 760px) {
  .site-header { position: sticky; top: 0; }
  .bar { border-radius: 99px; }
}
.brand { font: 700 1.15rem var(--title); color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.brand:hover { color: var(--ink); }
.brand .logo { height: 46px; width: auto; }
@media (max-width: 759px) { .brand .logo { height: 40px; } }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.nav a {
  display: block; padding: 6px 12px; border-radius: 99px;
  font: 600 1rem var(--title); color: var(--ink); text-decoration: none;
}
.nav a:hover, .nav a[aria-current="page"] { background: var(--cream-deep); color: var(--ink); }
.nav .lang a { background: var(--gold); border: 2px solid var(--outline); padding: 4px 12px; box-shadow: 0 2px 0 var(--outline); }
@media (max-width: 759px) {
  .bar nav { flex: 1 1 100%; }
  .nav { width: 100%; justify-content: space-between; flex-wrap: nowrap; gap: 0; }
  .nav a { padding: 5px 6px; font-size: 0.9rem; }
  .nav .lang a { padding: 3px 8px; }
}

.lang-hint { display: none; margin: 10px auto 0; text-align: center; position: relative; z-index: 9; }
.lang-hint.show { display: block; }
.lang-hint a {
  display: inline-block; font: 600 0.95rem var(--title); background: var(--cream); color: var(--ink);
  border: 2px solid var(--outline); border-radius: 99px; padding: 4px 14px; text-decoration: none;
}

/* Ciel, nuages et collines (formes CSS et SVG) */
.sky {
  position: relative; overflow: hidden; isolation: isolate;
  margin-top: -78px; padding: 120px 0 130px;
  background: linear-gradient(180deg, var(--sky-top) 0%, #86ccf5 45%, var(--sky-bottom) 100%);
  text-align: center;
}
.sky::before {
  content: ""; position: absolute; inset: 0 -5%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60px 36px at 12% 30%, #fff 98%, transparent), radial-gradient(80px 46px at 18% 34%, #fff 98%, transparent),
    radial-gradient(54px 32px at 24% 36%, #fff 98%, transparent),
    radial-gradient(70px 40px at 78% 22%, #fff 98%, transparent), radial-gradient(90px 50px at 86% 26%, #fff 98%, transparent),
    radial-gradient(56px 30px at 93% 28%, #fff 98%, transparent),
    radial-gradient(46px 24px at 58% 58%, rgba(255,255,255,.85) 98%, transparent), radial-gradient(60px 30px at 63% 60%, rgba(255,255,255,.85) 98%, transparent);
  opacity: 0.95; animation: drift 40s ease-in-out infinite alternate;
}
.sky::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 120px; z-index: -1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0 64 C180 14 360 22 560 60 S920 108 1200 40 V120 H0Z' fill='%237cc142'/%3E%3Cpath d='M0 92 C240 56 470 74 720 92 S1020 72 1200 86 V120 H0Z' fill='%235a9e2c'/%3E%3Cpath d='M0 112 C300 100 600 104 900 110 S1100 108 1200 106 V120 H0Z' fill='%23fdf1da'/%3E%3C/svg%3E") center bottom / 100% 100% no-repeat;
}
@keyframes drift { from { transform: translateX(-2%); } to { transform: translateX(2%); } }
.sky.short { padding: 116px 0 110px; }
.sky.short h1 { margin: 0 0 12px; font-size: clamp(2rem, 8vw, 3.2rem); }
.sky .lead { font: 600 clamp(1.1rem, 3.6vw, 1.35rem)/1.45 var(--title); max-width: 34ch; margin: 0 auto; color: var(--ink); }
.bubble {
  display: inline-block; font: 600 0.98rem var(--title); color: var(--ink);
  background: var(--cream); border: 3px solid var(--outline); border-radius: 99px; padding: 4px 16px;
  box-shadow: 0 3px 0 var(--outline); margin-bottom: 14px;
}
.hero-logo {
  width: min(82vw, 380px); margin: -10px auto 8px;
  filter: drop-shadow(0 10px 14px rgba(58, 36, 20, 0.28));
  animation: float 5s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-8px); } }

/* Titres de section en ruban */
.ribbon {
  display: inline-block; font: 700 clamp(1.35rem, 4.6vw, 1.85rem)/1.1 var(--title);
  background: linear-gradient(180deg, #ffd766, var(--gold) 55%, var(--gold-dark));
  border: 3px solid var(--outline); border-radius: 18px; box-shadow: var(--pop);
  padding: 8px 22px; margin: 0 0 26px; color: var(--ink);
}

section { padding: 34px 0; }

/* Panneaux crème comme dans le jeu */
.panel {
  background: linear-gradient(180deg, var(--cream), var(--cream-deep));
  border: 3px solid var(--outline); border-radius: var(--radius); box-shadow: var(--pop);
  padding: 22px 24px;
}
.panel > :last-child { margin-bottom: 0; }

.logo-title { margin: 0; }
.more-links { margin-top: 28px; }
.grid { text-align: left; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); }
.feature { transition: transform 0.18s ease; }
.feature:hover { transform: translateY(-4px) rotate(-0.4deg); }
.feature { display: grid; grid-template-columns: 56px 1fr; gap: 10px 14px; align-content: start; align-items: center; }
.feature img { width: 56px; height: 56px; }
.feature h3 { margin: 0; }
.feature p { margin: 0; grid-column: 1 / -1; }

/* Boutons bombés */
.buttons { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 22px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 24px;
  font: 700 1.08rem/1.15 var(--title); text-decoration: none; text-align: left; color: #fff;
  background: linear-gradient(180deg, var(--green-top), var(--green-bottom));
  border: 3px solid var(--outline); border-radius: 18px; box-shadow: var(--pop);
  text-shadow: 0 2px 0 rgba(31, 66, 16, 0.55); transition: transform 0.1s, box-shadow 0.1s;
}
.btn:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 7px 0 var(--outline); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--outline); }
.btn.cream { background: linear-gradient(180deg, #fffdf6, var(--cream-deep)); color: var(--ink); text-shadow: none; }
.btn.cream:hover { color: var(--ink); }
.btn.store { background: linear-gradient(180deg, #4d3423, #2b1a0e); color: #fff8ea; text-shadow: none; }
.btn.store small { display: block; font-size: 0.74rem; font-weight: 600; opacity: 0.8; }
.btn[aria-disabled="true"] { cursor: default; }
.btn[aria-disabled="true"]:hover { transform: none; box-shadow: var(--pop); }

/* Accueil : carte du jeu */
.game-card { display: grid; gap: 22px; align-items: center; padding: 20px; }
.game-card .art { border: 3px solid var(--outline); border-radius: 26px; box-shadow: var(--pop); width: 100%; max-width: 320px; margin-inline: auto; transform: rotate(-2deg); }
.game-card .logo { width: 200px; margin: 0 0 6px -6px; }
@media (min-width: 760px) { .game-card { grid-template-columns: 300px 1fr; padding: 28px; } .game-card .art { max-width: none; } }

/* Page du jeu : vidéo et pitch */
.media-row { display: grid; gap: 30px; align-items: center; }
@media (min-width: 860px) { .media-row { grid-template-columns: 300px 1fr; } }
.phone {
  aspect-ratio: 9 / 16; width: min(100%, 290px); margin-inline: auto; overflow: hidden;
  border: 8px solid var(--outline); border-radius: 38px; box-shadow: 0 8px 0 #1e120a, 0 18px 30px rgba(58, 36, 20, 0.25);
  background: linear-gradient(180deg, var(--sky-bottom), var(--cream) 55%, #d7ecb9);
  display: grid; place-items: center; text-align: center; padding: 18px;
}
.phone video { width: 100%; height: 100%; object-fit: cover; }
.placeholder { font: 600 1rem var(--title); color: var(--ink-soft); }
.pitch-icon { width: 92px; height: 92px; border-radius: 24px; border: 3px solid var(--outline); box-shadow: 0 4px 0 var(--outline); margin-bottom: 16px; }

.shots {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(64%, 230px); gap: 18px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 6px 22px; margin: 0; list-style: none;
}
.shots li { scroll-snap-align: center; }
.shots figure { margin: 0; }
.shots .shot {
  aspect-ratio: 9 / 16; border: 4px solid var(--outline); border-radius: 26px; box-shadow: var(--pop);
  background: linear-gradient(180deg, var(--sky-bottom), var(--cream) 60%, #d7ecb9);
  display: grid; place-items: center; padding: 14px; text-align: center;
}
.shots figcaption { font: 600 0.98rem/1.3 var(--title); margin: 12px 4px 0; text-align: center; }

/* Textes longs (politique, mentions, presse) */
.prose h2 { margin-top: 1.5em; font-size: 1.42rem; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: 0.35em; }
.prose .updated { color: var(--ink-soft); font-style: italic; }
.prose .summary { background: #fff; border: 3px dashed var(--grass-dark); border-radius: 20px; padding: 16px 22px; margin: 18px 0; }
.prose .summary h2 { margin-top: 0; }
.prose .summary ul { margin: 0; }

/* FAQ */
details {
  background: linear-gradient(180deg, var(--cream), var(--cream-deep));
  border: 3px solid var(--outline); border-radius: 20px; box-shadow: 0 4px 0 var(--outline);
  padding: 0 20px; margin-bottom: 14px;
}
summary {
  cursor: pointer; padding: 14px 0; font: 600 1.08rem/1.35 var(--title);
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; flex: none; width: 30px; height: 30px; display: grid; place-items: center; font-weight: 700; color: #fff;
  background: linear-gradient(180deg, var(--green-top), var(--green-bottom)); border: 2px solid var(--outline); border-radius: 10px;
}
details[open] summary::after { content: "−"; }
details > :last-child { padding-bottom: 16px; margin-bottom: 0; }

/* Fiche presse */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0; }
.facts dt { font: 600 1rem var(--title); }
.facts dd { margin: 0; }
@media (max-width: 500px) { .facts { grid-template-columns: 1fr; gap: 0; } .facts dd { margin-bottom: 10px; } }
.downloads { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.downloads li {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 14px;
  background: #fff; border: 3px solid var(--outline); border-radius: 18px; padding: 10px 12px 10px 18px;
}
.downloads .btn { min-height: 42px; padding: 6px 16px; font-size: 0.95rem; box-shadow: 0 3px 0 var(--outline); }
.tag { font: 600 0.85rem var(--title); background: var(--cream-deep); color: var(--ink-soft); padding: 4px 12px; border-radius: 99px; }
.press-art { display: flex; gap: 16px; align-items: center; justify-content: center; flex-wrap: wrap; margin-bottom: 22px; }
.press-art img { width: 150px; }
.press-art img.round { width: 120px; border-radius: 28px; border: 3px solid var(--outline); box-shadow: 0 4px 0 var(--outline); }

.mail {
  display: inline-block; font: 700 clamp(1rem, 4.2vw, 1.2rem) var(--title); color: var(--ink); text-decoration: none;
  background: #fff; border: 3px solid var(--outline); border-radius: 18px; box-shadow: var(--pop); padding: 10px 20px;
}
.mail:hover { color: var(--barn); }

/* Pied de page : prairie puis terre */
.site-footer { margin-top: 60px; position: relative; background: #4a2f1b; color: #fbe9c8; padding: 30px 0 40px; font-size: 0.95rem; }
.site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: -46px; height: 48px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 48' preserveAspectRatio='none'%3E%3Cpath d='M0 30 C200 0 420 10 620 26 S980 44 1200 14 V48 H0Z' fill='%237cc142'/%3E%3Cpath d='M0 40 C260 26 520 34 800 40 S1060 34 1200 34 V48 H0Z' fill='%234a2f1b'/%3E%3C/svg%3E") center bottom / 100% 100% no-repeat;
}
.site-footer .wrap { display: grid; gap: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: #fff3da; }
.site-footer a:hover { color: var(--gold); }
.site-footer .brand { color: #fff3da; }
.site-footer p { margin: 0; opacity: 0.8; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sky::before, .hero-logo { animation: none; }
  .btn, .feature { transition: none; }
}
