/* Site public de Pokémon Explorateur du Monde : mêmes couleurs, police et cadres que le jeu (assets de la ROM). */
@font-face { font-family: 'PMD Font'; src: url('/assets/fonts/pmd-font.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Pixelify'; src: url('/assets/fonts/PixelifySans.ttf') format('truetype'); font-weight: 400 700; font-display: swap; }

:root {
  --ink: #070d24; --panel: #0d1838; --line: #31508f; --line-in: #7fa6ef; --line-hi: #cfe0ff;
  --gold: #ffd35c; --gold2: #f0a830; --txt: #eef3ff; --dim: #a9badf; --ok: #6ee27a;
  --shadow: 0 2px 0 #030716;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: linear-gradient(rgba(4,8,22,.9), rgba(4,8,22,.9)), #040816 url('/assets/ui/fonds/motif_explorateur.png') repeat; background-size: auto, 512px 384px; image-rendering: pixelated;
  color: var(--txt); font-family: 'PMD Font', 'Pixelify', system-ui, sans-serif; font-size: 24px; line-height: 1.3; overflow-x: hidden; }
img { image-rendering: pixelated; max-width: 100%; display: block; }
a { color: var(--gold); }
h1, h2, h3 { font-weight: normal; margin: 0 0 12px; text-shadow: var(--shadow); }
h2 { font-size: 40px; color: var(--gold); }
h3 { font-size: 28px; color: var(--line-hi); }
p { margin: 0 0 12px; }
.muted { color: var(--dim); }
.wrap { width: min(1100px, 100% - 32px); margin: 0 auto; }

/* Cadres officiels (9-slice) */
.box { border: 16px solid transparent; border-image: url('/assets/ui/cadres/cadre1_blue_translucide.png') 8 fill / 16px stretch; padding: 8px 12px; }
.box.gold { border-image-source: url('/assets/ui/cadres/cadre1_yellow_translucide.png'); }
.btn { display: inline-flex; align-items: center; gap: 8px; border: 12px solid transparent; border-image: url('/assets/ui/cadres/cadre1_blue_fin.png') 8 fill / 12px stretch;
  padding: 2px 10px; color: var(--txt); text-decoration: none; font: inherit; cursor: pointer; background: none; transition: transform .12s, filter .12s; }
.btn:hover { transform: translateY(-2px); filter: brightness(1.15); }
.btn.primary { border-image-source: url('/assets/ui/cadres/cadre1_yellow_fin.png'); color: #ffe27a; }
.btn.big { font-size: 32px; padding: 6px 22px; }

/* En-tête */
header.top { position: sticky; top: 0; z-index: 10; background: rgba(5,10,30,.92); border-bottom: 2px solid var(--line); backdrop-filter: blur(3px); }
header.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-size: 32px; color: var(--gold); text-decoration: none; text-shadow: 0 3px 0 #6b3b00; white-space: nowrap; }
.logo img { width: 36px; height: 36px; transition: transform .3s cubic-bezier(.2,1.6,.4,1); }
.logo:hover img { transform: rotate(-12deg) scale(1.12); }
nav { display: flex; gap: 18px; margin-left: auto; align-items: center; }
nav a { color: var(--line-hi); text-decoration: none; }
nav a:hover { color: var(--gold); }

/* Haut de page */
.hero { position: relative; overflow: hidden; border-bottom: 2px solid var(--line); }
.hero-bg { position: absolute; inset: 0; background: url('/assets/ui/fonds/titre_1.png') center / cover no-repeat; image-rendering: pixelated; filter: saturate(1.05); animation: lent 40s ease-in-out infinite alternate; }
@keyframes lent { from { transform: scale(1.04) translateX(-1%); } to { transform: scale(1.1) translateX(1%); } }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4,8,22,.15) 0%, rgba(4,8,22,.55) 55%, rgba(4,8,22,.96) 100%); }
.hero .wrap { position: relative; z-index: 1; padding: 120px 0 56px; }
.hero h1 { font-size: 64px; color: var(--gold); text-shadow: 0 4px 0 #6b3b00, 0 0 24px rgba(0,0,0,.6); line-height: 1.05; }
.hero h1 small { display: block; font-size: 32px; color: var(--line-hi); text-shadow: 0 3px 0 #030716; margin-top: 8px; }
.hero .accroche { font-size: 28px; max-width: 760px; text-shadow: 0 2px 0 #030716, 0 0 12px rgba(0,0,0,.7); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 18px; }
.hero .note { font-size: 18px; color: var(--line-hi); text-shadow: 0 2px 0 #030716; }

section { padding: 64px 0 8px; scroll-margin-top: 64px; }
.grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.carte { display: flex; flex-direction: column; gap: 8px; }
.carte img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 2px solid var(--line); border-radius: 3px; transition: transform .2s; }
.carte:hover img { transform: scale(1.02); }
.carte p { font-size: 20px; color: var(--dim); }

.galerie { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.galerie img { width: 100%; height: 100%; object-fit: cover; border: 2px solid var(--line); border-radius: 3px; cursor: zoom-in; }
.galerie .petites { display: grid; gap: 12px; }

kbd { font: inherit; font-size: 18px; padding: 0 6px; border: 1px solid var(--line-in); border-radius: 3px; background: #0a1430; color: var(--gold); }

.notes .note-v { margin-bottom: 14px; }
.notes .note-v b { color: var(--gold); }
.notes ul { margin: 6px 0 0; padding-left: 22px; font-size: 20px; }
.notes li { margin-bottom: 4px; }

.discord { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.discord img { width: 160px; }

footer { margin-top: 56px; padding: 24px 0 40px; border-top: 2px solid var(--line); background: rgba(5,10,30,.85); font-size: 18px; color: var(--dim); }
footer .liens { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 8px; }

/* Visionneuse des captures */
#zoom { position: fixed; inset: 0; background: rgba(0,0,0,.88); display: none; align-items: center; justify-content: center; z-index: 50; cursor: zoom-out; padding: 16px; }
#zoom.on { display: flex; }
#zoom img { max-height: 92vh; border: 2px solid var(--line-in); }

/* Pages de texte (mentions légales, confidentialité) */
.texte { padding-top: 32px; }
.texte .box { font-size: 20px; }
.texte h2 { font-size: 32px; margin-top: 8px; }
.texte li { margin-bottom: 6px; }

/* Apparition douce au défilement */
.apparait { opacity: 0; transform: translateY(14px); transition: opacity .6s, transform .6s; }
.apparait.vu { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .hero-bg { animation: none; } .apparait { opacity: 1; transform: none; transition: none; } }

/* Téléphone */
@media (max-width: 860px) {
  body { font-size: 20px; }
  .grille { grid-template-columns: 1fr; }
  .galerie { grid-template-columns: 1fr; }
  .hero .wrap { padding: 72px 0 40px; }
  .hero h1 { font-size: 44px; }
  .hero h1 small { font-size: 24px; }
  .hero .accroche { font-size: 22px; }
  h2 { font-size: 32px; }
  nav a:not(.btn) { display: none; }
  .logo { font-size: 24px; }
}

/* ---------- Page d'accueil refaite (5/11) ---------- */
/* Langues */
.langues { display: inline-flex; gap: 2px; border: 2px solid var(--line); border-radius: 4px; padding: 2px; background: rgba(4,8,22,.6); }
.langues button { font: inherit; font-size: 16px; color: var(--dim); background: none; border: 0; padding: 0 6px; cursor: pointer; border-radius: 2px; }
.langues button:hover { color: var(--line-hi); }
.langues button.on { background: var(--line); color: var(--gold); text-shadow: var(--shadow); }

/* Haut de page : texte à gauche, l'écran titre du jeu à droite */
.hero-grille { display: grid; grid-template-columns: 1.15fr .85fr; gap: 32px; align-items: center; }
.hero .wrap.hero-grille { padding: 88px 0 56px; }
.hero h1 .h1-mot { display: block; font-size: 36px; color: #fff; letter-spacing: 4px; text-shadow: 0 3px 0 #3a6fd8, 0 6px 0 #0b1a4a; }
.hero h1 > span[data-t] { display: inline-block; animation: h1-tombe .7s .15s cubic-bezier(.2,1.5,.4,1) both; }
@keyframes h1-tombe { from { transform: translateY(-30px); opacity: 0; } to { transform: none; opacity: 1; } }
.ruban-evt { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 2px 12px 2px 6px; font-size: 18px; color: #ffe2b0; text-decoration: none;
  background: linear-gradient(90deg, rgba(120,40,140,.9), rgba(200,90,20,.9)); border: 2px solid #ffb45a; border-radius: 3px; box-shadow: 0 3px 0 #2a0b30; animation: ruban 2.4s ease-in-out infinite; }
.ruban-evt[hidden] { display: none; }
.ruban-evt img { width: 26px; height: 26px; animation: citrouille 1.2s steps(2, end) infinite; }
.ruban-evt:hover { filter: brightness(1.15); }
@keyframes ruban { 50% { box-shadow: 0 3px 0 #2a0b30, 0 0 18px rgba(255,150,40,.55); } }
@keyframes citrouille { 50% { transform: translateY(-2px) rotate(-6deg); } }
.reseaux { display: flex; gap: 8px; }
.reseaux a { width: 56px; height: 56px; justify-content: center; padding: 0; }
.reseaux img, .reseaux svg { width: 30px; height: 30px; image-rendering: pixelated; }
.pastilles { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 18px 0 0; }
.pastilles li { font-size: 17px; color: var(--line-hi); padding: 0 10px; border: 2px solid var(--line); border-radius: 3px; background: rgba(4,8,22,.55); text-shadow: var(--shadow); }
.pastilles li::before { content: '◆ '; color: var(--gold); }
.hero-ecran { position: relative; display: block; border: 16px solid transparent; border-image: url('/assets/ui/cadres/cadre1_yellow_translucide.png') 8 fill / 16px stretch;
  transform: rotate(1.5deg); transition: transform .25s cubic-bezier(.2,1.4,.4,1); box-shadow: 0 18px 40px rgba(0,0,0,.55); animation: flotte 5s ease-in-out infinite; }
.hero-ecran:hover { transform: rotate(0) scale(1.03); animation-play-state: paused; }
.hero-ecran img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.hero-play { position: absolute; left: 50%; bottom: 10%; transform: translateX(-50%); white-space: nowrap; font-size: 20px; color: #fff; text-shadow: 0 2px 0 #000;
  padding: 0 12px; background: rgba(4,8,22,.75); border: 2px solid var(--gold); border-radius: 3px; animation: clignote 1.2s 1s steps(2) infinite; }
@keyframes flotte { 50% { translate: 0 -6px; } }
@keyframes clignote { 50% { opacity: .35; } }
/* Lucioles : des grains de lumière qui montent doucement */
.hero-lucioles { position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.hero-lucioles i { position: absolute; bottom: -10px; width: 4px; height: 4px; background: #ffe9a0; box-shadow: 0 0 8px 2px rgba(255,220,120,.7); animation: luciole 9s linear infinite; opacity: 0; }
.hero-lucioles i:nth-child(1) { left: 6%; animation-delay: 0s; } .hero-lucioles i:nth-child(2) { left: 18%; animation-delay: 3.2s; }
.hero-lucioles i:nth-child(3) { left: 31%; animation-delay: 6.1s; } .hero-lucioles i:nth-child(4) { left: 44%; animation-delay: 1.7s; }
.hero-lucioles i:nth-child(5) { left: 58%; animation-delay: 4.6s; } .hero-lucioles i:nth-child(6) { left: 69%; animation-delay: 7.4s; }
.hero-lucioles i:nth-child(7) { left: 82%; animation-delay: 2.5s; } .hero-lucioles i:nth-child(8) { left: 93%; animation-delay: 5.5s; }
@keyframes luciole { 0% { transform: translate(0, 0); opacity: 0; } 15% { opacity: 1; } 50% { transform: translate(14px, -260px); } 85% { opacity: .9; } 100% { transform: translate(-8px, -520px); opacity: 0; } }

/* Titres de section avec un petit trait doré */
main h2 { display: flex; align-items: center; gap: 14px; }
main h2::after { content: ''; flex: 1; height: 4px; background: linear-gradient(90deg, var(--gold2), rgba(240,168,48,0)); box-shadow: 0 2px 0 #030716; }

/* « À la une » : grandes images et textes, en alternance */
.vedette { display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; align-items: center; margin-bottom: 36px; }
.vedette.inverse .vedette-img { order: 2; }
.vedette-img { display: grid; gap: 10px; min-width: 0; }
.vedette-img img, .carte img { border: 2px solid var(--line-in); border-radius: 3px; box-shadow: 0 6px 0 #030716; cursor: zoom-in; }
.vedette-img > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .25s; }
.vedette-img > img:hover { transform: scale(1.015); }
.vignettes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vignettes img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .2s, filter .2s; filter: saturate(.85); }
.vignettes img:hover { transform: translateY(-3px); filter: none; }
.vedette-txt { position: relative; min-width: 0; }
.vedette-txt h3 { display: flex; align-items: center; gap: 10px; font-size: 32px; color: var(--gold); margin-top: 6px; }
.vedette-txt h3 img { width: 36px; height: 36px; flex: none; }
.vedette-txt p { font-size: 21px; }
.vedette-txt ul { margin: 0 0 8px; padding: 0; list-style: none; font-size: 19px; color: var(--line-hi); }
.vedette-txt li { position: relative; padding-left: 22px; margin-bottom: 6px; }
.vedette-txt li::before { content: ''; position: absolute; left: 2px; top: .45em; width: 10px; height: 10px; background: var(--gold); box-shadow: 2px 2px 0 #6b3b00; transform: rotate(45deg); }
.petit { font-size: 17px !important; }
.badge { display: inline-block; font-size: 16px; padding: 0 8px; border-radius: 3px; text-shadow: var(--shadow); }
.badge.nouveau { color: #0b1a0d; background: var(--ok); box-shadow: 0 2px 0 #1f5a26; text-shadow: none; animation: badge 1.8s ease-in-out infinite; }
.badge.evt-badge { color: #fff; background: linear-gradient(90deg, #7a2b8c, #d0661c); box-shadow: 0 2px 0 #2a0b30; }
@keyframes badge { 50% { transform: translateY(-2px); } }
/* Halloween : cadre doré et lueurs orange et violettes */
.vedette.evt .vedette-txt { border-image-source: url('/assets/ui/cadres/cadre1_yellow_translucide.png'); }
.vedette.evt .vedette-txt::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at top right, rgba(160,60,200,.22), transparent 60%), radial-gradient(ellipse at bottom left, rgba(240,120,30,.18), transparent 60%); }
.vedette.evt.fini .vedette-txt { filter: saturate(.6); }

/* Le jeu */
.carte h3 { font-size: 26px; }
.etapes { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.etapes li { display: flex; align-items: center; gap: 12px; font-size: 20px; color: var(--line-hi); padding: 10px 14px; border: 2px dashed var(--line); border-radius: 4px; background: rgba(4,8,22,.45); }
.etapes b { flex: none; display: grid; place-items: center; width: 40px; height: 40px; font-size: 26px; font-weight: normal; color: #3a1b00; background: var(--gold); border-radius: 50%; box-shadow: 0 3px 0 #a35b00; }

/* Nouveautés : la plus récente ouverte, les autres repliées */
.notes { display: grid; gap: 12px; }
.notes details { border: 16px solid transparent; border-image: url('/assets/ui/cadres/cadre1_blue_translucide.png') 8 fill / 16px stretch; padding: 4px 12px; }
.notes details[open] { border-image-source: url('/assets/ui/cadres/cadre1_yellow_translucide.png'); }
.notes summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.notes summary::-webkit-details-marker { display: none; }
.notes summary::before { content: '▶'; color: var(--gold); font-size: 16px; transition: transform .15s; }
.notes details[open] summary::before { transform: rotate(90deg); }
.notes summary b { color: var(--gold); font-weight: normal; font-size: 24px; }
.notes .quand { font-size: 17px; color: var(--dim); }
.notes .tout { text-align: right; font-size: 18px; margin: 0; }

/* Communauté : le Discord (gardé tel quel) et, à côté, TikTok et YouTube */
.com-grille { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: stretch; }
.com-grille .discord { height: 100%; }
.com-videos { display: grid; gap: 16px; }
.video { display: flex; align-items: center; gap: 14px; color: var(--txt); text-decoration: none; transition: transform .15s, filter .15s; }
.video:hover { transform: translateY(-3px); filter: brightness(1.15); }
.video[hidden] { display: none; }
.video b { display: block; font-size: 26px; font-weight: normal; color: var(--line-hi); }
.video small { display: block; font-size: 16px; color: var(--gold); word-break: break-all; }
.video .v-txt { display: block; font-size: 17px; color: var(--dim); }
.v-ico { flex: none; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 6px; box-shadow: 0 4px 0 #030716; }
.v-ico svg { width: 40px; height: 40px; }
.tiktok .v-ico { background: #111; box-shadow: inset 0 0 0 2px #25f4ee, 0 4px 0 #030716; }
.youtube .v-ico { background: #d81d1d; }
.instagram .v-ico { background: linear-gradient(45deg, #f9b233 0%, #e8402e 38%, #c13584 68%, #5b51d8 100%); }
.reseaux a[title="Instagram"] { background: linear-gradient(45deg, rgba(249,178,51,.35), rgba(193,53,132,.35) 60%, rgba(91,81,216,.35)); }
.video:hover .v-ico { animation: v-saute .4s cubic-bezier(.2,1.6,.4,1); }
@keyframes v-saute { 40% { transform: translateY(-6px) scale(1.06); } }
footer .liens a[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  .hero-lucioles, .ruban-evt img, .hero-ecran, .hero-play, .badge.nouveau, .hero h1 > span[data-t] { animation: none !important; }
}
/* Tablette et téléphone */
@media (max-width: 980px) {
  .hero-grille { grid-template-columns: 1fr; }
  .hero-ecran { max-width: 560px; transform: none; }
  .vedette, .com-grille { grid-template-columns: 1fr; }
  .vedette.inverse .vedette-img { order: 0; }
}
@media (max-width: 860px) {
  header.top .wrap { gap: 8px; }
  .hero .wrap.hero-grille { padding: 40px 0 36px; gap: 22px; }
  .hero h1 .h1-mot { font-size: 26px; }
  .vedette-txt h3 { font-size: 26px; }
  .vedette-txt p { font-size: 19px; }
  .vedette-txt ul { font-size: 17px; }
  .etapes { grid-template-columns: 1fr; }
  .reseaux a { width: 50px; height: 50px; }
  .pastilles li { font-size: 15px; }
  .notes summary b { font-size: 20px; }
  .langues button { font-size: 15px; padding: 0 4px; }
}
@media (max-width: 420px) {
  .logo span { display: none; }
  .hero h1 { font-size: 38px; }
  .hero .accroche { font-size: 20px; }
  .btn.big { font-size: 26px; padding: 4px 14px; }
  .discord img { width: 120px; }
}

/* (26/11) Bouton « Télécharger le jeu » (lanceur PC, appli Android, iPhone) : caché dans le lanceur et le jeu installé */
.btn-telecharger img { width: 32px; height: 32px; image-rendering: pixelated; margin: -4px 0; border-radius: 6px; animation: tel-saute 2.4s ease-in-out infinite; }
@keyframes tel-saute { 0%, 80%, 100% { transform: none; } 86% { transform: translateY(-5px); } 92% { transform: translateY(1px); } }
.en-appli [data-telecharger] { display: none !important; }
/* Les 3 gros boutons (Jouer, Wiki, Télécharger) sur une ligne, les réseaux juste en dessous */
.hero .actions .reseaux { flex-basis: 100%; }
@media (min-width: 861px) { .hero .actions .btn.big { font-size: 28px; padding: 4px 16px; } .btn-telecharger img { width: 28px; height: 28px; } }
@media (min-width: 861px) and (max-width: 1100px) { .hero .actions .btn.big { font-size: 24px; padding: 4px 12px; } }
