/* ——— Pogo Info · thème cottage pastel ——— */
:root {
  --bg: #fff3e6;
  --bg-check: rgba(244, 167, 185, .13);
  --card: #fffbf5;
  --card-2: #fff6ec;
  --ink: #5a4636;
  --ink-soft: #8c7462;
  --line: #5a4636;
  --pink: #f8c8d4;  --pink-d: #e58fa6;
  --blue: #cfe6f7;  --blue-d: #7fb6de;
  --mint: #d3eedb;  --mint-d: #7fc496;
  --butter: #fcecb0; --butter-d: #e5bf4f;
  --lilac: #e3d7f4; --lilac-d: #a88bd9;
  --peach: #ffd9c2; --peach-d: #f0a274;
  --live: #6fbf8a;
  --radius: 22px;
  --radius-s: 14px;
  --shadow: 3px 4px 0 rgba(90, 70, 54, .16);
  --font-title: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --tabbar-h: 0px;
  color-scheme: light;
}

/* Nuit « gloomy » : prune et rose poudré */
:root[data-theme="dark"] {
  --bg: #2a2333;
  --bg-check: rgba(244, 167, 185, .05);
  --card: #382d43;
  --card-2: #42354f;
  --ink: #f8ebf1;
  --ink-soft: #c8b3c6;
  --line: #1c1622;
  --pink: #7a4a63;  --pink-d: #f4a7b9;
  --blue: #3c5571;  --blue-d: #9fcbec;
  --mint: #3b5c4c;  --mint-d: #9ad6ad;
  --butter: #6a5a35; --butter-d: #f3d77a;
  --lilac: #54457a; --lilac-d: #c9b4f2;
  --peach: #6e4a3c; --peach-d: #ffbe96;
  --shadow: 3px 4px 0 rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    linear-gradient(90deg, var(--bg-check) 50%, transparent 50%),
    linear-gradient(var(--bg-check) 50%, transparent 50%);
  background-size: 34px 34px;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  overflow-x: hidden;
}
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-title); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; }
code { font-family: ui-monospace, 'Cascadia Mono', monospace; font-size: .85em; }
.muted { color: var(--ink-soft); }
small { font-size: .82em; }

/* Nuages qui flottent en fond */
.sky { position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
.cloud {
  position: absolute; width: 140px; height: 44px; border-radius: 44px; background: var(--card); opacity: .7;
  animation: drift 70s linear infinite;
}
.cloud::before, .cloud::after { content: ''; position: absolute; background: inherit; border-radius: 50%; }
.cloud::before { width: 60px; height: 60px; top: -28px; left: 22px; }
.cloud::after { width: 46px; height: 46px; top: -20px; left: 70px; }
.c1 { top: 14%; left: -160px; }
.c2 { top: 48%; left: -160px; animation-delay: -30s; transform: scale(.7); }
.c3 { top: 78%; left: -160px; animation-delay: -52s; transform: scale(1.2); }
@keyframes drift { to { translate: calc(100vw + 320px) 0; } }
@media (prefers-reduced-motion: reduce) { .cloud { animation: none; display: none; } }

/* ——— En-tête ——— */
.top {
  display: flex; align-items: center; gap: 12px;
  max-width: 1040px; margin: 0 auto; padding: 14px 16px 8px;
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-family: var(--font-title); font-size: 1.45rem; }
.brand b { color: var(--pink-d); font-weight: 700; }
.brand img { filter: drop-shadow(2px 2px 0 rgba(90, 70, 54, .15)); }
.mode-switch {
  margin-left: auto; display: flex; background: var(--card); border: 2px solid var(--line);
  border-radius: 99px; padding: 3px; box-shadow: var(--shadow);
}
.mode-switch a {
  text-decoration: none; font-weight: 800; font-size: .9rem; padding: 6px 12px; border-radius: 99px; white-space: nowrap;
}
.mode-switch a.on[data-mode="fr"] { background: var(--pink); }
.mode-switch a.on[data-mode="voyage"] { background: var(--blue); }
.theme-btn {
  border: 2px solid var(--line); background: var(--card); color: var(--ink); width: 40px; height: 40px; border-radius: 50%;
  font-size: 1.1rem; cursor: pointer; box-shadow: var(--shadow); flex: none;
}

/* ——— Onglets ——— */
.tabs {
  display: flex; gap: 8px; max-width: 1040px; margin: 6px auto 0; padding: 4px 16px 10px; overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  flex: none; text-decoration: none; font-weight: 700; padding: 8px 14px; border-radius: 99px;
  background: var(--card); border: 2px solid var(--line); box-shadow: var(--shadow); font-size: .95rem;
  display: flex; align-items: center; gap: 6px;
}
.tabs a.on { background: var(--butter); translate: 0 -1px; }
.tabs a .ic { font-size: 1.05rem; }

@media (max-width: 720px) {
  :root { --tabbar-h: 70px; }
  .top { padding: 12px 16px 4px; gap: 8px; }
  .brand span { display: none; }
  .mode-switch a { padding: 6px 10px; font-size: .86rem; }
  .tabs {
    position: fixed; z-index: 30; bottom: 0; left: 0; right: 0; margin: 0; gap: 0;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: var(--card); border-top: 2px solid var(--line); justify-content: space-around;
    border-radius: 22px 22px 0 0; box-shadow: 0 -3px 0 rgba(90, 70, 54, .08);
  }
  .tabs a {
    flex: 1; flex-direction: column; gap: 0; border: 0; box-shadow: none; background: none;
    font-size: .68rem; padding: 4px 2px; border-radius: 14px; min-width: 0;
  }
  .tabs a .ic { font-size: 1.35rem; line-height: 1.2; }
  .tabs a.on { background: var(--butter); translate: none; }
}

/* ——— Contenu ——— */
main { max-width: 1040px; margin: 0 auto; padding: 8px 16px 24px; outline: none; }
.page-title { font-size: 1.7rem; margin: 10px 0 4px; }
.page-sub { margin: 0 0 16px; color: var(--ink-soft); }

.hero {
  position: relative; background: var(--card); border: 2px solid var(--line); border-radius: 28px;
  padding: 18px 20px; box-shadow: var(--shadow); margin: 8px 0 18px; overflow: hidden;
}
.hero.fr { background: linear-gradient(135deg, var(--pink) 0%, var(--card) 70%); }
.hero.voyage { background: linear-gradient(135deg, var(--blue) 0%, var(--card) 70%); }
.hero h1 { font-size: 1.6rem; margin: 0 0 4px; }
.hero p { margin: 0; }
.hero .flowers { position: absolute; right: 14px; top: 10px; font-size: 1.6rem; opacity: .85; letter-spacing: 4px; }

.block { margin: 22px 0; }
.block-title { font-size: 1.25rem; display: flex; align-items: center; gap: 8px; }
.block-title .deco { color: var(--pink-d); font-size: 1rem; }
.block-title .more { margin-left: auto; font-family: var(--font); font-size: .85rem; font-weight: 700; }
.block-title .more a { text-decoration: none; background: var(--card); border: 2px solid var(--line); border-radius: 99px; padding: 3px 10px; }

.card {
  background: var(--card); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow);
}
.card + .card { margin-top: 12px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid-s { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }

.tone-pink { --tone: var(--pink); --tone-d: var(--pink-d); }
.tone-blue { --tone: var(--blue); --tone-d: var(--blue-d); }
.tone-mint { --tone: var(--mint); --tone-d: var(--mint-d); }
.tone-butter { --tone: var(--butter); --tone-d: var(--butter-d); }
.tone-lilac { --tone: var(--lilac); --tone-d: var(--lilac-d); }
.tone-peach { --tone: var(--peach); --tone-d: var(--peach-d); }

/* Cartes d'évènement */
.ev-card {
  display: flex; flex-direction: column; text-decoration: none; background: var(--card); border: 2px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: 4px 5px 0 var(--tone, var(--pink));
  transition: translate .15s, box-shadow .15s;
}
.ev-card:hover, .ev-card:focus-visible { translate: -1px -2px; box-shadow: 6px 7px 0 var(--tone, var(--pink)); }
.ev-img { position: relative; aspect-ratio: 16 / 7; background: var(--tone, var(--pink)); border-bottom: 2px solid var(--line); }
.ev-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ev-type {
  position: absolute; left: 10px; bottom: -12px; background: var(--tone); border: 2px solid var(--line);
  border-radius: 99px; padding: 1px 10px; font-size: .78rem; font-weight: 800;
}
.ev-body { padding: 18px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.ev-body h3 { font-size: 1.08rem; margin: 0; }
.ev-when { margin: 0; font-size: .88rem; font-weight: 600; }
.ev-bonus { margin: 0; font-size: .88rem; }
.ev-mini { display: flex; gap: 6px; margin-top: 2px; }
.ev-mini span { position: relative; width: 42px; height: 42px; border-radius: 50%; background: var(--card-2); border: 2px solid var(--tone-d, var(--line)); display: grid; place-items: center; }
.ev-mini img { width: 34px; height: 34px; object-fit: contain; }
.ev-mini i { position: absolute; right: -6px; top: -6px; font-style: normal; font-size: .8rem; }
.ev-body .badge { margin-top: auto; align-self: flex-start; }

.badge { display: inline-block; font-size: .78rem; font-weight: 800; padding: 2px 10px; border-radius: 99px; border: 2px solid var(--line); background: var(--card-2); }
.badge.live { background: var(--mint); }
.badge.soon { background: var(--butter); }
.badge.past { opacity: .6; }
.pill { display: inline-block; font-size: .78rem; font-weight: 700; padding: 1px 9px; border-radius: 99px; background: var(--tone, var(--card-2)); border: 1.5px solid var(--line); }

/* Puces Pokémon */
.pk-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px 8px; }
.pk-chip { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; min-width: 0; }
.pk-bubble {
  position: relative; width: 78px; height: 78px; border-radius: 50%; background: var(--tone, var(--card-2));
  border: 2px solid var(--line); display: grid; place-items: center; box-shadow: var(--shadow);
}
.pk-bubble img { width: 64px; height: 64px; object-fit: contain; }
.pk-bubble .shiny { position: absolute; top: -6px; right: -6px; font-size: 1rem; background: var(--butter); border: 2px solid var(--line); border-radius: 50%; width: 26px; height: 26px; display: grid; place-items: center; }
.pk-label { font-weight: 800; font-size: .85rem; line-height: 1.15; margin-top: 4px; overflow-wrap: anywhere; }
.pk-sub { font-size: .75rem; color: var(--ink-soft); }

/* Contenu d'article (officiel / LeekDuck) */
.prose { overflow-wrap: anywhere; }
.prose h2 { font-size: 1.2rem; margin-top: 1.3em; padding-bottom: 4px; border-bottom: 2px dashed var(--pink-d); }
.prose h3 { font-size: 1.05rem; margin-top: 1em; }
.prose img { border-radius: 16px; border: 2px solid var(--line); display: block; margin: 10px auto; height: auto; }
.prose ul { padding-left: 1.2em; }
.prose li::marker { color: var(--pink-d); }
.prose table { border-collapse: collapse; width: 100%; font-size: .9rem; }
.prose td, .prose th { border: 1.5px solid var(--line); padding: 4px 8px; }
.prose ul.pk-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px 8px; }
.prose li.pk { display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; }
.prose li.pk img { width: 72px; height: 72px; object-fit: contain; border: 2px solid var(--line); border-radius: 50%; background: var(--card-2); margin: 0 0 4px; padding: 4px; }
.prose li.pk[data-shiny]::after { content: '✨'; position: absolute; top: -4px; right: calc(50% - 44px); }
.prose li.pk .pk-name { font-weight: 800; font-size: .85rem; line-height: 1.15; }
.prose ul.bonus-list { list-style: none; padding: 0; display: grid; gap: 8px; }
.prose li.bonus { display: flex; align-items: center; gap: 10px; background: var(--card-2); border: 2px solid var(--line); border-radius: 16px; padding: 6px 10px; font-weight: 700; }
.prose li.bonus img { width: 36px; height: 36px; margin: 0; border: 0; border-radius: 0; }
.ev-section { margin-top: 14px; }
.ev-section > h2 { font-size: 1.25rem; display: flex; gap: 8px; align-items: center; }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; gap: 6px; font: inherit; font-weight: 800; color: var(--ink); text-decoration: none;
  background: var(--butter); border: 2px solid var(--line); border-radius: 99px; padding: 8px 16px; cursor: pointer;
  box-shadow: var(--shadow);
}
.btn:active { translate: 1px 2px; box-shadow: none; }
.btn.ghost { background: var(--card); }
.btn.pink { background: var(--pink); }
.btn.blue { background: var(--blue); }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }

.seg { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.seg button, .seg a {
  font: inherit; font-size: .88rem; font-weight: 800; color: var(--ink); text-decoration: none; cursor: pointer;
  background: var(--card); border: 2px solid var(--line); border-radius: 99px; padding: 5px 12px;
}
.seg .on { background: var(--blue); }
.mode-fr .seg .on { background: var(--pink); }

select, input[type="text"], input[type="number"], input[type="search"] {
  font: inherit; color: var(--ink); background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 8px 12px; max-width: 100%;
}
label.field { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: .9rem; }

/* Coordonnées */
.coord { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.coord-copy {
  font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; background: var(--blue); border: 2px solid var(--line);
  border-radius: 12px; padding: 4px 10px; display: inline-flex; align-items: center; gap: 6px; transition: background .2s;
}
.coord-copy code { font-size: .8rem; }
.coord-copy.copied { background: var(--mint); }
.coord-map { text-decoration: none; font-size: 1.1rem; }
.coord-cd { font-size: .78rem; font-weight: 800; padding: 2px 8px; border-radius: 99px; }
.coord-cd:empty { display: none; }
.coord-cd.ok { background: var(--mint); }
.coord-cd.wait { background: var(--peach); }
.coord.compact .coord-copy { padding: 3px 8px; }

/* Listes de lieux / spawns */
.list { display: flex; flex-direction: column; gap: 10px; }
.row {
  display: flex; gap: 12px; align-items: center; background: var(--card); border: 2px solid var(--line);
  border-radius: 18px; padding: 10px 12px; box-shadow: var(--shadow);
}
.row .pk-bubble { width: 60px; height: 60px; flex: none; }
.row .pk-bubble img { width: 50px; height: 50px; }
.row .info { min-width: 0; flex: 1; }
.row .title { font-weight: 800; font-family: var(--font-title); font-size: 1.02rem; }
.row .meta { font-size: .85rem; color: var(--ink-soft); }
.row.is-live { border-color: var(--line); background: linear-gradient(90deg, var(--mint) 0 8px, var(--card) 8px); }
.row.is-past { opacity: .5; }

.world-row .when { font-weight: 800; }
.world-row .flag { font-size: 1.6rem; flex: none; width: 44px; text-align: center; }

/* Bandeau position */
.posbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: var(--card); border: 2px dashed var(--blue-d);
  border-radius: 18px; padding: 10px 12px; margin: 0 0 14px; font-size: .9rem;
}
.posbar b { font-weight: 800; }

/* Divers */
.loading { padding: 40px 0; text-align: center; font-weight: 700; color: var(--ink-soft); }
.bounce { display: inline-block; animation: bounce 1s ease-in-out infinite; font-size: 1.4rem; }
@keyframes bounce { 50% { translate: 0 -8px; } }
.empty { color: var(--ink-soft); font-weight: 600; }
.error-card { text-align: center; }
.error-card .big { font-size: 2.4rem; }
.stale { font-size: .82rem; background: var(--butter); border-radius: 12px; padding: 4px 10px; display: inline-block; }
.note { font-size: .88rem; background: var(--card-2); border: 2px dashed var(--line); border-radius: 16px; padding: 10px 12px; }
.note.warn { border-color: var(--peach-d); background: color-mix(in srgb, var(--peach) 45%, var(--card)); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: .92rem; }
.kv dt { font-weight: 800; }
.kv dd { margin: 0; }
.split { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .split { grid-template-columns: 1.4fr 1fr; } }
.countdown { font-family: var(--font-title); font-size: 1.5rem; font-weight: 700; }
details.card summary { cursor: pointer; font-weight: 800; font-family: var(--font-title); font-size: 1.05rem; }
details.card[open] summary { margin-bottom: 10px; }
.news-card { display: flex; gap: 12px; text-decoration: none; align-items: center; }
.news-card img { width: 110px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; border: 2px solid var(--line); flex: none; }
.news-card h3 { font-size: 1rem; margin: 0 0 4px; }
.cover { width: 100%; border-radius: 20px; border: 2px solid var(--line); display: block; margin-bottom: 12px; }
.back { display: inline-block; margin: 6px 0 10px; font-weight: 800; text-decoration: none; }
.map { height: 380px; border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 14px; z-index: 0; }
.leaflet-container { font-family: var(--font); }
.map-pin { width: 38px; height: 38px; border-radius: 50%; background: var(--card); border: 2px solid var(--line); display: grid; place-items: center; }
.map-pin img { width: 32px; height: 32px; }

#toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 18px + env(safe-area-inset-bottom)); translate: -50% 20px; opacity: 0;
  background: var(--card); border: 2px solid var(--line); border-radius: 18px; padding: 10px 16px; box-shadow: var(--shadow);
  font-weight: 700; text-align: center; z-index: 50; transition: .25s; pointer-events: none; width: max-content; max-width: calc(100vw - 32px);
}
#toast.show { opacity: 1; translate: -50% 0; }

.foot { max-width: 1040px; margin: 10px auto 0; padding: 14px 16px 26px; font-size: .8rem; text-align: center; }
.foot p { margin: 4px 0; }

/* Carrousel horizontal (accueil, mobile) */
@media (max-width: 720px) {
  .scroller {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px;
    margin: 0 -16px; padding: 4px 16px 10px; scrollbar-width: none;
  }
  .scroller::-webkit-scrollbar { display: none; }
  .scroller > * { flex: 0 0 82%; scroll-snap-align: start; }
  .ev-img { aspect-ratio: 16 / 6; }
}
