/* Commit & Conquer — feuille de style du site.
   Couleurs : packaging/branding/04_palette_couleurs.json */
@font-face {
  font-family: "Russo One";
  src: url("../fonts/RussoOne-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --blue: #168FE8;
  --green: #80C92B;
  --lemon: #D8F43F;
  --coral: #FF493E;
  --night: #142C40;
  --sky: #8BD9FF;
  --ivory: #FFF9ED;
  --sky-soft: #E6F6FF;
  --ink: #142C40;
  --ink-soft: #3E5568;
  --card: #FFFFFF;
  --line: #DCE7EE;
  --radius: 18px;
  --shadow: 0 10px 30px -12px rgba(20, 44, 64, .28);
  --title: "Russo One", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", "Noto Sans", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font: 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--title); font-weight: 400; line-height: 1.15; margin: 0 0 .5em; letter-spacing: .01em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.25rem; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--ivory); padding: 8px 12px; }

/* ---- En-tête ---------------------------------------------------------- */
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px clamp(16px, 4vw, 48px);
  background: rgba(255, 249, 237, .86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(20, 44, 64, .08);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.wordmark { display: flex; flex-direction: column; font-family: var(--title); font-size: 14px; line-height: 1; }
.wordmark .and { color: var(--green); font-size: 9px; letter-spacing: .3em; padding: 2px 0 2px 14px; }
.nav { display: flex; align-items: center; gap: clamp(10px, 2.4vw, 28px); }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; white-space: nowrap; }
.nav a:hover { color: var(--blue); }
.nav .lang { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1.5px solid var(--line); border-radius: 99px; font-size: 13px; }
.flag { width: 22px; height: 15px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
@media (max-width: 640px) {
  .wordmark { display: none; }
  .nav a:not(.lang) { font-size: 14px; }
}

/* ---- Boutons ---------------------------------------------------------- */
.btn {
  display: inline-block; padding: 13px 24px; border-radius: 99px;
  font-weight: 700; text-decoration: none; transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-main { background: var(--blue); color: #fff; box-shadow: 0 8px 20px -8px var(--blue); }
.btn-ghost { background: rgba(255,255,255,.8); color: var(--ink); border: 2px solid var(--ink); }
.btn.disabled { opacity: .55; cursor: default; transform: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---- Accueil : ouverture en 3D ---------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  min-height: min(92vh, 860px);
  display: flex; align-items: center;
  padding: 40px clamp(16px, 6vw, 80px);
  background: linear-gradient(180deg, var(--ciel-haut) 0%, var(--ciel-milieu) 45%, var(--ciel-bas) 100%);
  transition: background .6s;
}
#hero-3d, .hero-fallback { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-fallback { background-size: cover; background-position: center; opacity: 0; transition: opacity .6s; }
.no-3d .hero-fallback { opacity: 1; }
.hero-text {
  position: relative; max-width: 620px;
  padding: 28px 30px; border-radius: 26px;
  background: rgba(255, 249, 237, .78);
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow);
}
.hero h1 { color: var(--night); }
.lede { font-size: 1.15rem; color: var(--ink-soft); margin: 0; }
@media (max-width: 860px) {
  .hero { align-items: flex-end; min-height: 100vh; padding-bottom: 28px; }
  .hero-text { padding: 22px; }
}

/* ---- Bandes de l'accueil ---------------------------------------------- */
.band { position: relative; padding: clamp(56px, 8vw, 96px) clamp(16px, 6vw, 80px); }
.band > h2, .band > .intro, .band-in > h2, .band-in > .intro { text-align: center; }
.intro { max-width: 680px; margin: 0 auto 36px; color: var(--ink-soft); }
.band-in { max-width: 1180px; margin: 0 auto; }
.ridge { position: absolute; left: 0; width: 100%; height: 60px; top: -59px; display: block; }

.piliers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; max-width: 1180px; margin: 0 auto; }
.pilier { background: var(--card); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.pilier-icon { width: 58px; height: 58px; margin-bottom: 10px; }
.pilier p { margin: 0; color: var(--ink-soft); }

@media (max-width: 1100px) { .piliers { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .piliers { grid-template-columns: 1fr; } }
.blog-band { background: var(--sky-soft); }
.blog-band .maj-liste { max-width: 760px; }

.tag {
  display: inline-block; font: 700 12px/1 var(--body); letter-spacing: .04em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 99px; background: var(--ivory); color: var(--ink); text-decoration: none;
}

.jeux-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 18px; max-width: 1180px; margin: 0 auto; }
.jeu-card {
  display: flex; gap: 16px; align-items: flex-start; padding: 16px; border-radius: var(--radius);
  background: var(--card); color: var(--ink); text-decoration: none; box-shadow: var(--shadow);
  transition: transform .2s;
}
.jeu-card[hidden] { display: none; }
.jeu-card:hover { transform: translateY(-4px); }
.jeu-card img { width: 96px; height: 96px; border-radius: 20px; flex: none; }
@media (max-width: 400px) { .jeu-card img { width: 72px; height: 72px; border-radius: 16px; } }
.jeu-card h3 { margin: 8px 0 4px; font-size: 1.1rem; }
.jeu-card p { margin: 0; font-size: 14.5px; color: var(--ink-soft); }

.libre { background: var(--night); color: var(--ivory); }
.libre-in { max-width: 1000px; margin: 0 auto; display: flex; gap: 32px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.libre-in > div { max-width: 640px; }
.libre p { color: #C9D8E4; margin: 0; }

/* ---- Pages intérieures ------------------------------------------------ */
.page-head { text-align: center; padding: clamp(48px, 7vw, 80px) 16px 28px; }
.prose { max-width: 760px; margin: 0 auto; padding: 0 16px 64px; }
.prose h2 { margin-top: 1.6em; font-size: 1.6rem; }
.prose img { display: block; max-width: 100%; height: auto; margin: 1.2em auto; border-radius: 14px; box-shadow: 0 6px 20px rgba(10, 30, 60, .18); }
.retour { text-align: center; padding-bottom: 64px; }

.jeu-hero {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(20px, 4vw, 56px); align-items: center;
  padding: clamp(40px, 6vw, 80px) clamp(16px, 6vw, 80px);
}
.jeu-hero { grid-template-columns: auto 1fr; }
.jeu-icone { width: clamp(120px, 18vw, 200px); border-radius: 36px; box-shadow: var(--shadow); }
@media (max-width: 760px) {
  .jeu-hero { grid-template-columns: 1fr; }
}
.jeu-corps { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; max-width: 1100px; margin: 0 auto; padding: 24px 16px 0; }
.jeu-corps .prose { padding: 0; margin: 0; }
.commandes { padding: 0; list-style: none; }
.commandes li { background: #fff; border-radius: 12px; padding: 10px 14px; margin-bottom: 8px; box-shadow: 0 2px 8px -4px rgba(20,44,64,.25); }
.plateformes { background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); align-self: start; }
.plateformes h2 { font-size: 1.3rem; }
.plateformes ul { list-style: none; padding: 0; margin: 0; }
.plateformes li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.plateformes li span { font-weight: 500; color: var(--ink-soft); font-size: 14px; }
.plateformes li.ok span { color: #3D6B10; font-weight: 700; }
@media (max-width: 860px) { .jeu-corps { grid-template-columns: 1fr; } }

/* ---- Catalogue : jeu à la une et cartes ------------------------------ */
.chiffres-puces { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 10px 0 0; }
.chiffres-puces li { background: var(--ivory); border-radius: 99px; padding: 4px 10px; font-size: 13px; color: var(--ink-soft); }
.chiffres-puces strong { color: var(--ink); }
.maj-jeu { margin: 10px 0 0; font-size: 13px; color: var(--ink-soft); }
.jeu-vedette {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(20px, 4vw, 48px); align-items: center;
  margin: 0 auto 40px; padding: clamp(16px, 3vw, 28px); border-radius: calc(var(--radius) * 1.4);
  background: var(--card); box-shadow: var(--shadow);
}
.vedette-image { display: block; overflow: hidden; border-radius: var(--radius); }
.vedette-image img { display: block; width: 100%; height: auto; transition: transform .4s; }
.vedette-image:hover img { transform: scale(1.03); }
.vedette-image img.icone { width: 60%; margin: 0 auto; padding: 8%; }
.vedette-logo { display: block; width: min(100%, 420px); height: auto; margin-bottom: 8px; }
.vedette-texte h2 { margin: 0 0 8px; font-size: clamp(2rem, 4vw, 3rem); }
.vedette-texte .lede { margin: 0; }
.vedette-texte .actions { margin-top: 20px; }
@media (max-width: 860px) { .jeu-vedette { grid-template-columns: 1fr; } }

/* ---- Fiche d'un jeu --------------------------------------------------- */
.jeu-hero { background: linear-gradient(180deg, #E5F5D2, var(--ivory)); }
.jeu-blog { max-width: 760px; margin: 32px auto 0; padding: 0 16px; }
.jeu-blog h2 a { color: inherit; text-decoration: none; }
.jeu-blog h3 { margin: 0; font-size: 1.1rem; }
.maj .tag { margin-left: 8px; }

/* ---- Pied de page ----------------------------------------------------- */
.foot { position: relative; background: var(--night); color: var(--ivory); margin-top: 60px; padding: 40px clamp(16px, 6vw, 80px) 24px; }
.libre + .foot, main:has(> .libre:last-child) + .foot { margin-top: 0; }
.foot-in { max-width: 1180px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; }
.foot-brand { display: flex; gap: 16px; align-items: flex-start; }
.foot-brand p { margin: 0 0 4px; }
.foot-title { font-family: var(--title); font-size: 1.2rem; }
.muted { color: #9DB2C3; font-size: 14px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.foot-links a { color: var(--ivory); text-decoration: none; opacity: .85; }
.foot-links a:hover { opacity: 1; color: var(--lemon); }
.foot-copy { text-align: center; color: #9DB2C3; font-size: 13px; margin: 32px 0 0; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ---- Montagnes en parallaxe ------------------------------------------- */
.montagnes {
  --m1: #CDEAF8; --m1b: #B9DFF3; --m2: #A9D86E; --m2b: #92C957; --m3: var(--ivory);
  position: relative; z-index: 1; pointer-events: none; overflow: hidden;
  height: clamp(110px, 15vw, 220px);
  margin-top: calc(-1 * clamp(110px, 15vw, 220px));
}
.montagnes svg { position: absolute; left: 0; width: 100%; will-change: transform; }
.montagnes svg:nth-child(1) { bottom: -90px; height: calc(100% + 90px); }
.montagnes svg:nth-child(2) { bottom: -60px; height: calc(100% + 60px); }
.montagnes svg:nth-child(3) { bottom: -40px; height: calc(100% + 40px); }
.m1 { fill: var(--m1); } .m1b { fill: var(--m1b); }
.m2 { fill: var(--m2); } .m2b { fill: var(--m2b); }
.m3 { fill: var(--m3); }


/* ---- Ambiance : moment, saison, météo (classes posées par ambiance.js) -- */
:root { --ciel-haut: #5FC3FA; --ciel-milieu: var(--sky); --ciel-bas: var(--ivory); }
.moment-matin { --ciel-haut: #8EC9F2; --ciel-milieu: #FFD3B5; --ciel-bas: #FFF1DD; }
.moment-soir  { --ciel-haut: #5A6FB8; --ciel-milieu: #F49A72; --ciel-bas: #FFE0C2; }
.moment-nuit  { --ciel-haut: #0B1A2C; --ciel-milieu: #1D3557; --ciel-bas: #3B5577; }
.meteo-nuageux:not(.moment-nuit) { --ciel-haut: #8FB3CC; --ciel-milieu: #C6DAE6; }
.meteo-pluie:not(.moment-nuit), .meteo-orage:not(.moment-nuit) { --ciel-haut: #5E7487; --ciel-milieu: #93A8B8; --ciel-bas: #DCE4EA; }
.meteo-brouillard:not(.moment-nuit) { --ciel-haut: #B9C6CF; --ciel-milieu: #DCE3E8; --ciel-bas: #F2F4F5; }
.meteo-neige:not(.moment-nuit) { --ciel-haut: #A9C4D8; --ciel-milieu: #DCE9F2; --ciel-bas: #F7FAFC; }
.moment-nuit .hero h1 { color: var(--night); }
/* Montagnes : neige l'hiver, roux l'automne, bleu sombre la nuit. */
.saison-hiver .montagnes { --m1: #EEF5FB; --m1b: #DCE8F1; --m2: #E3EDF3; --m2b: #CFDDE7; }
.saison-automne .montagnes { --m2: #D9A55A; --m2b: #C48A3E; }
.saison-printemps .montagnes { --m2: #A7DC7A; --m2b: #93CF62; }
.moment-nuit .montagnes { --m1: #2B4A6B; --m1b: #24405D; --m2: #36603F; --m2b: #2D5236; }
.moment-nuit.saison-hiver .montagnes { --m1: #4A6684; --m1b: #3E5A78; --m2: #6E88A0; --m2b: #5F7A93; }

/* Message de fête, sous l'en-tête. */
.fete-bandeau {
  display: flex; justify-content: center; align-items: center; gap: 10px;
  padding: 8px 16px; font-weight: 700; font-size: 15px; text-align: center;
  background: var(--lemon); color: var(--night);
}
.fete-halloween .fete-bandeau { background: #FF8A1F; color: #1B1026; }
.fete-noel .fete-bandeau, .fete-avent .fete-bandeau, .fete-saint-nicolas .fete-bandeau { background: #C8102E; color: #FFF9ED; }
.fete-paques .fete-bandeau, .fete-rameaux .fete-bandeau { background: #F7D6E6; color: var(--night); }
.fete-bandeau[hidden] { display: none; }

/* Bouton météo de l'en-tête et sa fenêtre. */
.meteo-btn { border: 1.5px solid var(--line); background: transparent; border-radius: 99px; padding: 4px 10px; font-size: 16px; cursor: pointer; line-height: 1.4; }
.meteo-pop {
  position: fixed; z-index: 40; top: 70px; right: 16px; width: min(360px, calc(100vw - 32px));
  max-height: calc(100vh - 86px); overflow-y: auto; overscroll-behavior: contain;
  background: #fff; color: var(--ink); border-radius: 18px; padding: 18px; box-shadow: 0 20px 50px -15px rgba(20,44,64,.45);
}
.meteo-pop h3 { margin: 0 0 6px; font-size: 1.1rem; }
.meteo-pop p { margin: 0 0 12px; font-size: 14px; color: var(--ink-soft); }
.meteo-pop .ligne { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.meteo-pop button, .meteo-pop input { font: 600 14px var(--body); border-radius: 12px; padding: 9px 12px; }
.meteo-pop button { border: 0; background: var(--blue); color: #fff; cursor: pointer; }
.meteo-pop button.second { background: var(--sky-soft); color: var(--ink); }
.meteo-pop input { border: 1.5px solid var(--line); flex: 1; min-width: 0; }
.meteo-pop .etat { font-size: 13px; color: var(--ink-soft); min-height: 1.2em; margin: 6px 0 0; }

/* Panneau de démonstration de l'ambiance (serveur de développement seulement). */
.dev-ambiance { position: fixed; right: 16px; bottom: 16px; z-index: 30; font: 600 13px var(--body); }
.dev-ambiance > button { border: 0; border-radius: 99px; padding: 12px 16px; background: var(--night); color: var(--lemon); box-shadow: var(--shadow); cursor: pointer; }
.dev-ambiance .panneau {
  position: absolute; right: 0; bottom: 56px; width: min(290px, calc(100vw - 32px)); background: var(--night); color: var(--ivory);
  border-radius: 16px; padding: 14px; box-shadow: var(--shadow);
}
.dev-ambiance label { display: grid; grid-template-columns: 80px 1fr; align-items: center; gap: 8px; margin-bottom: 8px; }
.dev-ambiance select { font: inherit; padding: 6px; border-radius: 8px; width: 100%; min-width: 0; }
.dev-ambiance .panneau > button { font: inherit; border: 0; border-radius: 10px; padding: 8px 12px; background: var(--lemon); color: var(--night); cursor: pointer; }
.dev-ambiance .actuel { color: #9DB2C3; font-weight: 500; margin: 6px 0 0; font-size: 12px; }
@media (max-width: 420px) {
  .nav { gap: 9px; }
  .nav .lang span { display: none; }
  .nav .lang, .meteo-btn { padding: 4px 7px; }
  .brand img { width: 34px; height: auto; }
}
/* Sans 3D, l'illustration suit aussi l'ambiance. */
html.moment-nuit .hero-fallback { filter: brightness(.42) saturate(.75) hue-rotate(12deg); }
.moment-soir .hero-fallback { filter: sepia(.25) saturate(1.2) brightness(.92); }
.meteo-pluie .hero-fallback, .meteo-orage .hero-fallback { filter: saturate(.55) brightness(.8); }
.meteo-neige .hero-fallback { filter: saturate(.6) brightness(1.08); }

/* ---- Page « Jouer » : le jeu en plein écran ---------------------------- */
.page-jouer { margin: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: var(--night); overflow: hidden; }
.jouer-barre { display: flex; align-items: center; gap: 14px; padding: 6px 14px; background: var(--ivory); font-family: var(--title); }
.jouer-barre strong { font-weight: 400; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.retour-fiche { font: 700 14px var(--body); color: var(--blue); text-decoration: none; white-space: nowrap; }
.jouer-zone { position: relative; flex: 1; min-height: 0; }
.jouer-zone canvas { display: block; width: 100%; height: 100%; outline: none; touch-action: none; }
.jouer-attente { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--ivory); text-align: center; padding: 16px; }
.jouer-attente img { border-radius: 26px; margin-bottom: 12px; animation: respire 1.6s ease-in-out infinite; }
@keyframes respire { 50% { transform: scale(1.06); } }
.btn.btn-main.jouer { display: inline-block; }

/* Blocs de commandes (page Installer). */
.prose pre { background: var(--night); color: #E6F6FF; border-radius: 14px; padding: 14px 16px; overflow-x: auto; font-size: 14px; line-height: 1.5; }
.prose code { font-family: ui-monospace, "JetBrains Mono", "DejaVu Sans Mono", monospace; }
.prose p code, .prose li code { background: var(--sky-soft); padding: 1px 6px; border-radius: 6px; font-size: .92em; }
.installer-lien { margin: 14px 0 0; font-weight: 700; }
.installer-lien a { text-decoration: none; }
@media (max-width: 760px) { .nav { gap: 8px; } .nav a { font-size: 13px; } }
@media (max-width: 560px) {
  .top { flex-wrap: wrap; row-gap: 6px; padding-top: 8px; padding-bottom: 8px; }
  .nav { width: 100%; justify-content: space-between; }
}
@media (max-width: 420px) {
  .nav { flex-wrap: wrap; justify-content: flex-start; row-gap: 6px; column-gap: 12px; }
}

/* Mises à jour : un journal daté. */
.maj-liste { list-style: none; padding: 0; margin: 32px 0 0; }
.maj { border-left: 3px solid var(--blue); padding: 4px 0 8px 20px; margin-bottom: 32px; }
.maj time, .maj-date { color: var(--muted, #5a6b7a); font-size: .95rem; font-weight: 600; }
.maj h2 { margin: 4px 0 8px; font-size: 1.35rem; }
.maj h2 a { color: inherit; text-decoration: none; }
.maj h2 a:hover { text-decoration: underline; }

/* Fiche de jeu : chiffres clés et galerie de captures */
.jeu-chiffres { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; max-width: 1100px; margin: 32px auto 0; padding: 0 16px; }
.jeu-chiffres div { flex: 1 1 140px; background: var(--sky-soft); border-radius: 16px; padding: 14px 12px; text-align: center; }
.jeu-chiffres strong { display: block; font-size: 2rem; line-height: 1.1; }
.jeu-chiffres span { font-size: .95rem; opacity: .8; }
.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; max-width: 1100px; margin: 32px auto; padding: 0 16px; }
.galerie figure { margin: 0; }
.galerie img { width: 100%; height: auto; display: block; border-radius: 14px; box-shadow: 0 4px 16px rgba(0,0,0,.18); }
.galerie figcaption { margin-top: 6px; font-size: .95rem; text-align: center; opacity: .85; }

/* Logo d'un jeu (fiche) : l'image dit le titre, le h1 reste pour les lecteurs d'écran et les moteurs de recherche. */
.jeu-logo { display: block; width: min(100%, 460px); height: auto; margin: 0 0 .6rem; }
.jeu-hero h1.cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }


/* ---- Fiche d'un jeu : plein écran ------------------------------------- */
.jeu-plein {
  position: relative; display: flex; align-items: center; color: #fff;
  min-height: calc(100vh - 76px); min-height: calc(100svh - 76px);
  background: radial-gradient(ellipse at 75% 40%, #1E4A6E 0%, var(--night) 65%);
  background-size: cover; background-position: center;
}
.jeu-plein.avec-image::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10, 26, 42, .88) 0%, rgba(10, 26, 42, .6) 42%, rgba(10, 26, 42, .1) 100%),
              linear-gradient(0deg, rgba(10, 26, 42, .55) 0%, transparent 30%);
}
.jeu-plein-in {
  position: relative; z-index: 1; width: 100%; max-width: 1240px; margin: 0 auto;
  padding: clamp(32px, 6vw, 72px) clamp(16px, 6vw, 80px);
  display: flex; align-items: center; justify-content: space-between; gap: 40px;
}
.jeu-plein-texte { max-width: 600px; }
.jeu-plein .jeu-logo { display: block; width: min(100%, 520px); height: auto; margin-bottom: 14px; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .45)); }
.jeu-plein h1 { color: #fff; font-size: clamp(2.4rem, 6vw, 4.4rem); line-height: 1.05; margin: 0 0 14px; }
.jeu-plein .cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.jeu-plein .lede { color: #E8F1F8; font-size: clamp(1.05rem, 2vw, 1.3rem); text-shadow: 0 2px 12px rgba(0, 0, 0, .5); }
.jeu-plein .chiffres-puces { margin-top: 18px; }
.jeu-plein .chiffres-puces li { background: rgba(255, 255, 255, .16); color: #fff; backdrop-filter: blur(4px); }
.jeu-plein .chiffres-puces strong { color: #fff; }
.jeu-plein .btn-ghost { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .8); }
.jeu-plein-icone { width: clamp(140px, 22vw, 260px); border-radius: 15%; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .7); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 22px 0 0; }
.badges li { font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 99px; background: rgba(255, 255, 255, .12); color: #C9D8E4; }
.badges li.ok { background: rgba(216, 244, 63, .2); color: #E8FA8C; }
.defiler {
  position: absolute; z-index: 1; left: 50%; bottom: 14px; transform: translateX(-50%);
  color: #fff; font-size: 34px; line-height: 1; text-decoration: none; animation: rebond 1.8s ease-in-out infinite;
}
@keyframes rebond { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }
@media (prefers-reduced-motion: reduce) { .defiler { animation: none; } }
@media (max-width: 760px) {
  .jeu-plein-in { flex-direction: column; align-items: flex-start; }
  .jeu-plein.avec-image::before { background: linear-gradient(0deg, rgba(10, 26, 42, .9) 0%, rgba(10, 26, 42, .45) 100%); }
}
#suite { scroll-margin-top: 64px; }
.jeu-fin { text-align: center; }
.jeu-fin .actions { justify-content: center; }
.band h2 { margin-top: 0; }

/* ---- Actualités : grande image et liste ------------------------------- */
.actus { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(18px, 3vw, 36px); align-items: stretch; max-width: 1180px; margin: 0 auto; }
.actu-image { position: relative; display: block; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--night); min-height: 260px; }
.actu-image img { display: block; width: 100%; height: 100%; min-height: 260px; object-fit: cover; aspect-ratio: 16 / 9; }
.actu-legende {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 20px 16px; color: #fff; font-weight: 700; font-size: 1.1rem;
  background: linear-gradient(0deg, rgba(10, 26, 42, .85), transparent);
}
.actu-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.actu { display: block; padding: 18px 8px 16px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: background .2s, padding .2s; }
.actu:hover, .actu:focus-visible, .actu.on { background: rgba(255, 255, 255, .7); padding-left: 16px; }
.actu-titre { display: block; font-weight: 700; font-size: 1.05rem; line-height: 1.3; }
.actu-meta { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 13px; color: var(--ink-soft); }
.actu-meta .tag { background: #DDEFFF; color: #0B5DA0; }
.actus-suite { margin: 24px auto 0; text-align: center; }
@media (max-width: 860px) { .actus { grid-template-columns: 1fr; } }

/* ---- Les mondes : carrousel ------------------------------------------- */
.mondes-rail {
  display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px max(16px, calc((100% - 1180px) / 2)) 24px;
  scrollbar-width: thin;
}
.monde { position: relative; flex: 0 0 min(80vw, 520px); margin: 0; scroll-snap-align: center; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--night); }
.monde img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.monde figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 48px 18px 16px; color: #fff;
  background: linear-gradient(0deg, rgba(10, 26, 42, .88), transparent); display: flex; flex-direction: column; gap: 2px;
}
.monde figcaption span { font-size: 14px; color: #D5E2EC; }

/* ---- Galerie ----------------------------------------------------------- */
.galerie-band .galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 16px; max-width: 1180px; margin: 0 auto; }
.galerie-band .galerie figure { margin: 0; border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.galerie-band .galerie img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.galerie-band .galerie figcaption { padding: 10px 14px 14px; font-size: 14px; color: var(--ink-soft); }

/* ---- Vitrine des jeux : plein écran façon boutique -------------------- */
.vitrine { position: relative; min-height: calc(100vh - 76px); min-height: calc(100svh - 76px); overflow: hidden; color: #fff; background: var(--night); }
.vitrine-slide {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; gap: 40px;
  padding: clamp(32px, 6vw, 72px) clamp(16px, 8vw, 120px) 120px;
  background: radial-gradient(ellipse at 75% 40%, #1E4A6E 0%, var(--night) 65%); background-size: cover; background-position: center;
  opacity: 0; visibility: hidden; transition: opacity .7s, visibility .7s;
}
.vitrine-slide.on { opacity: 1; visibility: visible; }
.vitrine-slide::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10, 26, 42, .88) 0%, rgba(10, 26, 42, .55) 42%, rgba(10, 26, 42, .05) 100%), linear-gradient(0deg, rgba(10, 26, 42, .8) 0%, transparent 35%);
}
.vitrine-texte { position: relative; z-index: 1; max-width: 600px; }
.vitrine-texte h2 { color: #fff; font-size: clamp(2.4rem, 6vw, 4.4rem); line-height: 1.05; margin: 0 0 14px; }
.vitrine-texte .vedette-logo { filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .45)); width: min(100%, 520px); }
.vitrine-texte .lede { color: #E8F1F8; font-size: clamp(1.05rem, 2vw, 1.3rem); text-shadow: 0 2px 12px rgba(0, 0, 0, .5); }
.vitrine-texte .chiffres-puces { margin-top: 18px; }
.vitrine-texte .chiffres-puces li { background: rgba(255, 255, 255, .16); color: #fff; backdrop-filter: blur(4px); }
.vitrine-texte .chiffres-puces strong { color: #fff; }
.vitrine-texte .btn-ghost { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .8); }
.vitrine-icone { position: relative; z-index: 1; width: clamp(140px, 22vw, 260px); border-radius: 15%; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .7); }
.vitrine-bas {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 8px;
  padding: 14px clamp(8px, 3vw, 40px) 16px; background: linear-gradient(0deg, rgba(10, 26, 42, .92), rgba(10, 26, 42, .5));
}
.vitrine-vignettes { display: flex; flex: 1; gap: 10px; list-style: none; margin: 0; padding: 0; overflow-x: auto; justify-content: center; scrollbar-width: none; }
.vitrine-vignette {
  display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 12px; border: 2px solid transparent;
  background: rgba(255, 255, 255, .1); color: #D5E2EC; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: background .2s, border-color .2s;
}
.vitrine-vignette img { width: 40px; height: 40px; border-radius: 10px; }
.vitrine-vignette:hover { background: rgba(255, 255, 255, .2); }
.vitrine-vignette.on { background: rgba(255, 255, 255, .22); border-color: var(--lemon); color: #fff; }
.vitrine-fleche { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .16); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.vitrine-fleche:hover { background: rgba(255, 255, 255, .3); }
@media (max-width: 760px) {
  .vitrine-slide { flex-direction: column; align-items: flex-start; justify-content: flex-end; padding-bottom: 130px; }
  .vitrine-slide::before { background: linear-gradient(0deg, rgba(10, 26, 42, .92) 0%, rgba(10, 26, 42, .4) 100%); }
  .vitrine-icone { display: none; }
  .vitrine-vignette span { display: none; }
  .vitrine-vignette { padding: 6px; }
}
@media (prefers-reduced-motion: reduce) { .vitrine-slide { transition: none; } }

/* ---- Carrousel des mondes : flèches et points ------------------------- */
.carrousel { position: relative; }
.mondes-rail { scroll-behavior: smooth; }
.monde { flex-basis: min(86vw, 760px); }
.monde img { cursor: zoom-in; }
.carrousel-fleche {
  position: absolute; top: calc(50% - 30px); z-index: 2; width: 48px; height: 48px; border-radius: 50%; border: 0;
  background: rgba(20, 44, 64, .75); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; box-shadow: var(--shadow);
}
.carrousel-fleche:hover { background: var(--night); }
.carrousel-fleche.prec { left: max(8px, calc((100% - 1180px) / 2)); }
.carrousel-fleche.suiv { right: max(8px, calc((100% - 1180px) / 2)); }
.carrousel-points { display: flex; justify-content: center; gap: 8px; margin-top: 4px; }
.carrousel-points button { width: 11px; height: 11px; padding: 0; border-radius: 50%; border: 0; background: var(--line); cursor: pointer; }
.carrousel-points button.on { background: var(--blue); transform: scale(1.25); }
@media (max-width: 600px) { .carrousel-fleche { display: none; } }

/* ---- Agrandissement des images ---------------------------------------- */
.galerie-band .galerie img { cursor: zoom-in; transition: transform .25s; }
.galerie-band .galerie figure:hover img { transform: scale(1.03); }
.zoom { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; background: rgba(6, 14, 24, .92); padding: 24px 64px; }
.zoom[hidden] { display: none; }
.zoom figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.zoom img { max-width: 100%; max-height: calc(100vh - 110px); border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.zoom figcaption { color: #E8F1F8; font-size: 15px; text-align: center; }
.zoom button { position: absolute; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; cursor: pointer; line-height: 1; }
.zoom button:hover { background: rgba(255, 255, 255, .32); }
.zoom-x { top: 16px; right: 16px; width: 44px; height: 44px; font-size: 28px; }
.zoom-fl { top: calc(50% - 24px); width: 48px; height: 48px; font-size: 30px; }
.zoom-fl.prec { left: 10px; }
.zoom-fl.suiv { right: 10px; }
.zoom-ouvert { overflow: hidden; }
@media (max-width: 600px) { .zoom { padding: 56px 8px 16px; } .zoom-fl { top: auto; bottom: 14px; } }
.cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Fiche : onglets illustrés ---------------------------------------- */
.onglets-band { padding-top: clamp(40px, 6vw, 72px); background: linear-gradient(180deg, var(--ivory), #fff); }
.onglets-source { max-width: 760px; margin: 0 auto; }
.onglets-band.pret { padding-left: clamp(16px, 5vw, 64px); padding-right: clamp(16px, 5vw, 64px); }
.onglets-barre { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 1180px; margin: 0 auto 28px; }
.onglet {
  font: inherit; font-weight: 700; font-size: 15px; padding: 10px 20px; border-radius: 99px; cursor: pointer;
  border: 2px solid var(--line); background: #fff; color: var(--ink-soft); transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.onglet:hover { border-color: var(--blue); color: var(--blue); }
.onglet.on { background: var(--night); border-color: var(--night); color: #fff; transform: translateY(-2px); }
.onglets-scene { max-width: 1180px; margin: 0 auto; }
.onglet-panneau {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(20px, 4vw, 48px); align-items: center;
  background: #fff; border-radius: 26px; padding: clamp(20px, 3.5vw, 40px); box-shadow: var(--shadow); animation: apparait .35s ease;
}
.onglet-panneau[hidden] { display: none; }
.onglet-panneau.sans-visuel { grid-template-columns: minmax(0, 760px); justify-content: center; }
@keyframes apparait { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.onglet-texte h3 { margin: 0 0 .5em; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.onglet-texte h2 { margin: 0 0 .5em; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.onglet-texte p { font-size: 1.05rem; line-height: 1.65; }
.onglet-visuel { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 18px; cursor: zoom-in; box-shadow: 0 14px 34px -14px rgba(20, 44, 64, .5); }
.onglet-texte .commandes { display: grid; gap: 10px; margin: 0; }
.onglet-texte .commandes li { margin: 0; padding: 14px 18px; font-weight: 600; background: var(--sky-soft); box-shadow: none; border-left: 5px solid var(--blue); }
@media (max-width: 860px) { .onglet-panneau { grid-template-columns: 1fr; } .onglet { padding: 8px 14px; font-size: 14px; } }
@media (prefers-reduced-motion: reduce) { .onglet-panneau { animation: none; } }

/* ---- Les mondes : bandeau pleine largeur, défilement automatique ------ */
.band.mondes { padding: clamp(40px, 6vw, 72px) 0 0; background: var(--night); color: #fff; }
.band.mondes > h2 { color: #fff; margin-bottom: 24px; padding: 0 16px; }
.mondes .mondes-rail { padding: 0; gap: 0; }
.mondes .monde { flex: 0 0 100%; border-radius: 0; box-shadow: none; }
.mondes .monde img { width: 100%; height: min(56.25vw, 82vh); aspect-ratio: auto; object-fit: cover; }
.mondes .monde figcaption { padding: 90px clamp(20px, 6vw, 90px) clamp(34px, 5vw, 56px); }
.mondes .monde figcaption strong { font-size: clamp(1.4rem, 3.4vw, 2.6rem); font-family: var(--title); }
.mondes .monde figcaption span { font-size: clamp(.95rem, 1.6vw, 1.2rem); }
.mondes .carrousel-points { position: absolute; left: 0; right: 0; bottom: 14px; margin: 0; }
.mondes .carrousel-points button { background: rgba(255, 255, 255, .45); }
.mondes .carrousel-points button.on { background: #fff; }
.mondes .carrousel-fleche.prec { left: 14px; }
.mondes .carrousel-fleche.suiv { right: 14px; }
@media (max-width: 600px) {
  .onglets-barre { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; scrollbar-width: none; padding-bottom: 4px; }
  .onglet { flex: none; white-space: nowrap; }
}

/* ---- Transitions entre les blocs : bords en biais et fonds en dégradé -- */
:root { --pente: clamp(28px, 4.5vw, 68px); }
.band.mondes::before, .band.libre::before, .band.blog-band::before, .band.onglets-band::before,
.band.galerie-band::before, .band.jeu-fin::before, .band.jeux-band::before {
  content: ""; position: absolute; z-index: 1; left: 0; right: 0; top: calc(1px - var(--pente)); height: var(--pente); pointer-events: none;
}
/* Blocs sombres : le biais monte vers la droite. */
.band.mondes::before, .band.libre::before { background: var(--night); clip-path: polygon(0 100%, 100% 0, 100% 100%); }
/* Blocs clairs : le biais monte vers la gauche, couleur du début du dégradé. */
.band.blog-band::before, .band.onglets-band::before, .band.galerie-band::before, .band.jeu-fin::before, .band.jeux-band::before {
  background: var(--ivory); clip-path: polygon(0 0, 100% 100%, 0 100%);
}
/* Fonds clairs : fondu doux au lieu d'aplats. */
.blog-band { background: linear-gradient(180deg, var(--ivory) 0, var(--sky-soft) 120px, var(--sky-soft) calc(100% - 120px), var(--ivory) 100%); }
.onglets-band { background: linear-gradient(180deg, var(--ivory) 0, #fff 40%, var(--ivory) 100%); }
.galerie-band { background: linear-gradient(180deg, var(--ivory) 0, #EEF8FF 50%, var(--ivory) 100%); }
/* Le dernier bloc clair avant un bloc sombre : pas de biais supplémentaire. */
.band.mondes + .galerie-band::before { display: block; }

/* Petite illustration (kit du jeu) au pied de la fiche */
.jeu-fin { position: relative; }
.jeu-fin-deco { display: block; margin: 0 auto 8px; height: clamp(110px, 16vw, 190px); width: auto; filter: drop-shadow(0 8px 10px rgba(0,0,0,.25)); }
/* Logos carrés (Berger) : on borne la hauteur pour garder le texte et les boutons dans l'écran */
.jeu-plein .jeu-logo { max-height: min(34vh, 300px); width: auto; max-width: 100%; }
