/* =====================================================================
   Styles propres à chaque page.
   ===================================================================== */

/* ---------------------------------------------------------------- connexion */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(ellipse at 20% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 55%),
  radial-gradient(ellipse at 90% 100%, color-mix(in srgb, var(--r-legendary) 14%, transparent), transparent 50%), var(--bg); }
.auth-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 30px; box-shadow: var(--shadow-lg); }
.auth-card .brand { justify-content: center; font-size: calc(24px * var(--fs)); margin-bottom: 6px; }
.auth-card .brand-mark { width: 38px; height: 38px; }
.auth-card .tagline { text-align: center; color: var(--text-2); margin-bottom: 22px; }
.auth-card form { display: grid; gap: 14px; }
.auth-card .legal { font-size: calc(12px * var(--fs)); color: var(--muted); text-align: center; margin-top: 16px; }

/* ---------------------------------------------------------------- boosters */
.shop { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: 28px; align-items: center; min-height: calc(100vh - var(--header-h) - 140px); }
.shop-stage { position: relative; display: grid; place-items: center; padding: 30px 0; min-height: 440px;
  background: radial-gradient(ellipse at 50% 55%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 62%); border-radius: 28px; }
.shop-stage .pack { width: clamp(210px, 30vh, 290px); }
.shop-panel { display: grid; gap: 18px; }
.shop-panel h1 { font-size: calc(30px * var(--fs)); font-weight: 800; letter-spacing: -0.03em; }
.shop-panel .lead { color: var(--text-2); }
.zone-fields { display: grid; gap: 10px; }
.zone-fields .select { width: 100%; }
.price-line { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.price-line b { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.stock { display: grid; gap: 8px; }
.stock-slots { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; }
.stock-slots span { height: 22px; border-radius: 4px; background: var(--surface-3); }
.stock-slots span.on { background: linear-gradient(180deg, var(--accent), var(--accent-strong)); box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 50%, transparent); }
.stock-slots span.charging { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 55%, transparent) calc(var(--p, 0) * 100%), var(--surface-3) 0); }
/* chrono de recharge : anneau de progression + compte à rebours */
.recharge { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--border); }
.recharge-ring { width: 44px; height: 44px; transform: rotate(-90deg); }
.recharge-ring circle { fill: none; stroke-width: 4.5; }
.recharge-ring .track { stroke: var(--surface-3); }
.recharge-ring .fill { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 0 100; transition: stroke-dasharray 1s linear; filter: drop-shadow(0 0 4px color-mix(in srgb, var(--accent) 60%, transparent)); }
.recharge-text { display: grid; line-height: 1.2; min-width: 0; }
.recharge-text > span { font-size: calc(12px * var(--fs)); }
.recharge-text b { font-size: calc(24px * var(--fs)); font-weight: 800; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.recharge-text small { font-size: calc(11.5px * var(--fs)); }
.recharge-count { font-weight: 800; font-size: calc(17px * var(--fs)); padding: 4px 10px; border-radius: 999px; background: var(--surface-3); }
.recharge.full .recharge-ring .fill { stroke: var(--success, #2fbf71); }
.recharge.full .recharge-text > span { font-size: calc(15px * var(--fs)); font-weight: 700; color: var(--text); }
.rates-link { font-size: calc(12.5px * var(--fs)); color: var(--muted); text-align: center; display: inline-flex; align-items: center; gap: 5px; }
.shop-links { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.shop-stage-wrap { position: relative; }
.daily { font-size: calc(13px * var(--fs)); padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--text); display: flex; gap: 8px; align-items: center; }

/* bouton « i » et fenêtre d'informations des boosters */
.info-btn { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; }
.info-btn:hover { background: var(--surface-3); }
.pack-holder { position: relative; }
.info-btn.on-pack { position: absolute; top: 6%; right: -46px; z-index: 2; }
.opening .info-btn { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); color: #fff; }
.pack-info h3 { font-size: calc(15px * var(--fs)); margin: 18px 0 8px; display: flex; gap: 8px; align-items: center; }
.pack-info ul { display: grid; gap: 6px; padding-left: 18px; font-size: calc(13.5px * var(--fs)); color: var(--text-2); }
.pack-info .warning { margin-top: 18px; padding: 4px 16px 14px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--warning, #f59e0b) 45%, transparent);
  background: color-mix(in srgb, var(--warning, #f59e0b) 8%, transparent); }
.pack-info .modal-title { display: flex; gap: 10px; align-items: center; }
@media (max-width: 900px) {
  .shop { grid-template-columns: 1fr; gap: 10px; }
  .shop-stage { min-height: 360px; padding: 20px 0; }
}

/* ---------------------------------------------------------------- atlas */
.atlas { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.map-panel { isolation: isolate; /* les calques Leaflet (z-index 400+) restent sous les fenêtres et l'en-tête */  position: relative; overflow: hidden; height: calc(100vh - var(--header-h) - 150px); min-height: 460px; }
.map-panel canvas.globe { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.map-panel canvas.globe.dragging { cursor: grabbing; }
.map-panel .leaflet { position: absolute; inset: 0; background: var(--map-ocean); }
.map-controls { position: absolute; top: 14px; left: 14px; z-index: 500; display: flex; gap: 8px; flex-wrap: wrap; }
.map-zoom { position: absolute; right: 14px; bottom: 14px; z-index: 500; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; }
.map-zoom button { width: 36px; height: 36px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; color: var(--text); }
.map-zoom button + button { border-top: 1px solid var(--border); }
.map-zoom button:hover { background: var(--surface-3); }
.map-tip { position: absolute; pointer-events: none; z-index: 600; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 10px 12px; font-size: calc(13px * var(--fs)); min-width: 180px; transform: translate(12px, 12px); }
.map-tip b { display: block; font-size: calc(14px * var(--fs)); }
.map-legend { position: absolute; left: 14px; bottom: 14px; z-index: 500; background: color-mix(in srgb, var(--bg-elevated) 92%, transparent); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; display: flex; gap: 10px; flex-wrap: wrap; font-size: calc(12px * var(--fs)); color: var(--text-2); max-width: calc(100% - 90px); }
.map-legend span { display: inline-flex; align-items: center; gap: 5px; }
.layer-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: calc(13.5px * var(--fs)); cursor: pointer; }
.layer-row:last-child { border-bottom: 0; }
.layer-row .lbl { display: flex; align-items: center; gap: 9px; }
.swatch { width: 18px; height: 4px; border-radius: 2px; }
.leaflet-container { font-family: var(--font); background: var(--map-ocean); }
.leaflet-tooltip.cdx-tip { background: var(--bg-elevated); color: var(--text); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); font-size: calc(12.5px * var(--fs)); }
@media (max-width: 1000px) { .atlas { grid-template-columns: 1fr; } .map-panel { height: 62vh; } }
@media (max-width: 600px) { .map-legend { display: none; } }

/* ---------------------------------------------------------------- fiche ville */
.detail { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 28px; padding: 28px; }
.detail .card-col { perspective: 1000px; }
.detail-card { position: relative; }
/* niveau d'une ville (fiche) */
.level-panel { display: grid; gap: 10px; margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.level-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.level-steps { display: flex; gap: 4px; }
.level-steps i { width: 22px; height: 7px; border-radius: 99px; background: var(--surface-3); }
.level-steps i.on { background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #fff)); }
.level-next { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; font-size: calc(13px * var(--fs)); }
/* étoile des favoris, en haut à droite de la carte */
.detail-fav { position: absolute; top: -12px; right: -12px; z-index: 5; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border-strong, var(--border)); color: var(--muted); box-shadow: var(--shadow);
  transition: transform .15s, color .15s, border-color .15s; }
.detail-fav:hover { transform: scale(1.1); color: var(--coin-ink); }
.detail-fav svg { width: 22px; height: 22px; }
.detail-fav.on { color: var(--coin); border-color: color-mix(in srgb, var(--coin) 60%, var(--border)); }
.detail-fav.on svg { fill: currentColor; animation: fav-pop .35s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes fav-pop { from { transform: scale(.4); } }
.detail .card-col .links-row { justify-content: center; }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-right: 34px; /* place de la croix de fermeture */ }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.detail h2 { font-size: calc(28px * var(--fs)); font-weight: 780; letter-spacing: -0.025em; }
.detail .sub { color: var(--text-2); margin-top: 4px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; margin: 18px 0; }
.fact { padding: 10px 0; border-bottom: 1px solid var(--border); }
.fact dt { font-size: calc(12px * var(--fs)); color: var(--muted); font-weight: 620; }
.fact dd { margin: 2px 0 0; font-weight: 660; font-variant-numeric: tabular-nums; }
.fact.obtained { grid-column: 1 / -1; }
.fact dd small { color: var(--muted); font-weight: 500; margin-left: 4px; }
.breakdown { background: var(--surface-solid-2); border-radius: 12px; padding: 14px 16px; }
.breakdown .row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: calc(13.5px * var(--fs)); }
.breakdown .row.total { border-top: 1px solid var(--border-strong); margin-top: 6px; padding-top: 10px; font-weight: 760; }
.breakdown .row span:last-child { font-variant-numeric: tabular-nums; font-weight: 620; white-space: nowrap; }
.links-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
@media (max-width: 780px) { .detail { grid-template-columns: 1fr; padding: 20px; } .detail .card-col { max-width: 260px; margin: 0 auto; width: 100%; } }

/* ---------------------------------------------------------------- économie */
/* histogramme des gains : une seule série, une teinte ; aujourd'hui en plein, les autres jours atténués */
.eco-chart { position: relative; display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px; align-items: end; height: 170px; padding-top: 8px;
  border-bottom: 1px solid var(--border); }
.eco-chart .bar-col { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; cursor: default; outline: none; }
.eco-chart .bar { display: block; border-radius: 4px 4px 0 0; background: color-mix(in srgb, var(--accent) 55%, transparent); min-height: 0; transition: background .15s; }
.eco-chart .bar.today { background: var(--accent); }
.eco-chart .bar-col:hover .bar, .eco-chart .bar-col:focus-visible .bar { background: var(--accent-strong, var(--accent)); }
.eco-chart .bar-label { position: absolute; bottom: -20px; left: 0; right: 0; text-align: center; font-size: calc(11px * var(--fs)); color: var(--muted); }
.chart-tip { position: absolute; z-index: 20; transform: translate(-50%, -100%); padding: 5px 9px; border-radius: 8px; pointer-events: none; white-space: nowrap;
  background: var(--surface-3); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow); font-size: calc(12px * var(--fs)); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* sources de revenu : barres horizontales proportionnelles */
.src-row { display: grid; grid-template-columns: minmax(120px, 34%) 1fr auto; gap: 10px; align-items: center; padding: 6px 0; font-size: calc(13.5px * var(--fs)); }
.src-track { height: 10px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.src-bar { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.src-row.lost .src-bar { background: var(--danger); }
.src-row.lost b, .src-row.lost .src-name { color: var(--danger); }
.src-total { display: flex; justify-content: space-between; padding-top: 10px; margin-top: 6px; border-top: 1px solid var(--border); font-weight: 700; }
/* monuments */
/* mégalopoles */

/* ---------------------------------------------------------------- marché */
.ref-prices { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: -6px 0 14px; font-size: calc(12.5px * var(--fs)); }
.ref-chip { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); }
.ref-line { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: calc(13px * var(--fs)); }
.auction-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.auction { display: grid; gap: 10px; cursor: pointer; }
.auction .info { display: grid; gap: 4px; padding: 0 2px; font-size: calc(13px * var(--fs)); }
.auction .info .price { display: flex; align-items: center; gap: 6px; font-weight: 760; font-size: calc(15px * var(--fs)); font-variant-numeric: tabular-nums; }
.auction .info .meta { display: flex; justify-content: space-between; color: var(--muted); font-size: calc(12px * var(--fs)); }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; max-height: 46vh; overflow: auto; padding: 4px; }
.picker-item { position: relative; border-radius: 12px; outline: 2px solid transparent; outline-offset: 2px; }
.picker-item.selected { outline-color: var(--accent); }
.picker-item .copy-tag { position: absolute; left: 6px; bottom: 6px; z-index: 4; }
.trade-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .trade-cols { grid-template-columns: 1fr; } }
.trade-side { display: flex; gap: 8px; flex-wrap: wrap; }
.trade-side .mini { width: 84px; }

/* ---------------------------------------------------------------- profil */
.profile-hero { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.avatar { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; font-size: calc(30px * var(--fs)); font-weight: 800; color: #fff; }
.profile-hero h1 { font-size: calc(28px * var(--fs)); font-weight: 800; }
/* succès : médailles hexagonales, couleur selon le palier */
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.ach-tile { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.ach-tile.done { border-color: color-mix(in srgb, var(--success) 40%, var(--border)); }
.ach-text { display: grid; gap: 2px; min-width: 0; font-size: calc(13px * var(--fs)); }
.ach-text .muted { font-size: calc(12px * var(--fs)); }
.medal { --c1: #e7a46a; --c2: #8a4b1f; --glow: rgba(205,127,50,.45); position: relative; width: 44px; height: 48px; flex: none; display: grid; place-items: center; }
.medal.silver { --c1: #f1f4f8; --c2: #8d97a6; --glow: rgba(200,210,225,.45); }
.medal.gold { --c1: #ffe38a; --c2: #c28a0c; --glow: rgba(245,190,40,.5); }
.medal.platinum { --c1: #c9fbff; --c2: #3aa7b8; --glow: rgba(90,220,240,.5); }
.medal.diamond { --c1: #e7d6ff; --c2: #7a46e0; --glow: rgba(170,120,255,.55); }
.medal .hex { position: absolute; inset: 0; display: grid; place-items: center; color: #fff;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: linear-gradient(150deg, var(--c1), var(--c2)); filter: drop-shadow(0 4px 10px var(--glow)); }
.medal .hex::before { content: ""; position: absolute; inset: 3px; clip-path: inherit; background: linear-gradient(150deg, color-mix(in srgb, var(--c2) 70%, #000), var(--c2) 60%, color-mix(in srgb, var(--c1) 50%, var(--c2))); }
.medal .hex > svg { position: relative; width: 22px; height: 22px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.medal.lg { width: 58px; height: 64px; }
.medal.lg .hex > svg { width: 28px; height: 28px; }
.medal.locked .hex { background: linear-gradient(150deg, var(--surface-3), var(--border)); filter: none; color: var(--muted); }
.medal.locked .hex::before { background: var(--surface-2); }
/* progression d'un succès verrouillé : anneau autour de la médaille */
.medal-ring { position: absolute; inset: -4px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), transparent 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 0); mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 0); opacity: .8; }
/* badges du profil */
.badge-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; max-height: 55vh; overflow: auto; padding: 2px; }
.badge-option { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; text-align: left; font: inherit; font-size: calc(12.5px * var(--fs)); }
.badge-option.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.badge-option .medal { width: 34px; height: 37px; }
.badge-option .medal .hex > svg { width: 17px; height: 17px; }
.profile-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.profile-badge { display: inline-flex; gap: 8px; align-items: center; padding: 4px 12px 4px 4px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); font-size: calc(12.5px * var(--fs)); font-weight: 650; }
.profile-badge .medal { width: 30px; height: 33px; }
.profile-badge .medal .hex > svg { width: 15px; height: 15px; }
.profile-badges-cta { display: inline-flex; gap: 6px; align-items: center; margin-top: 8px; font-size: calc(12.5px * var(--fs)); }

/* ---------------------------------------------------------------- paramètres */
.settings { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.settings-nav { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 2px; }
.settings-nav a { padding: 8px 12px; border-radius: 9px; color: var(--text-2); font-weight: 600; }
.settings-nav a:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.setting { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.setting:last-child { border-bottom: 0; }
.setting .txt { min-width: 0; }
.setting .txt b { display: block; font-weight: 640; }
.setting .txt span { color: var(--muted); font-size: calc(12.5px * var(--fs)); }
.legal-text { font-size: calc(13px * var(--fs)); color: var(--text-2); display: grid; gap: 10px; }
.legal-text h4 { color: var(--text); font-size: calc(13.5px * var(--fs)); margin-top: 6px; }
.legal-text code { font-size: calc(12px * var(--fs)); background: var(--surface-3); padding: 1px 5px; border-radius: 5px; }
@media (max-width: 860px) { .settings { grid-template-columns: 1fr; } .settings-nav { position: static; display: flex; flex-wrap: wrap; } }

/* tableau points / noms par rareté (Atlas) */
.rarity-layers { width: 100%; border-collapse: collapse; font-size: calc(13.5px * var(--fs)); margin-bottom: 6px; }
.rarity-layers th { font-size: calc(11.5px * var(--fs)); color: var(--muted); font-weight: 650; text-align: center; padding: 4px 0 6px; }
.rarity-layers td { padding: 7px 0; border-bottom: 1px solid var(--border); }
.rarity-layers td:not(:first-child) { text-align: center; width: 64px; }

/* ---------------------------------------------------------------- boutique */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; align-items: stretch; }
.plan { display: grid; gap: 14px; align-content: start; padding: 22px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); }
.plan.featured { border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent), var(--shadow);
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 14%, var(--surface)), var(--surface) 60%); }
.plan h2 { font-size: calc(20px * var(--fs)); display: flex; gap: 10px; align-items: center; }
.plan .price { font-size: calc(30px * var(--fs)); font-weight: 800; letter-spacing: -.02em; }
.plan .price small { font-size: calc(14px * var(--fs)); color: var(--muted); font-weight: 620; }
.plan ul { display: grid; gap: 8px; list-style: none; padding: 0; font-size: calc(13.5px * var(--fs)); }
.plan li { display: flex; gap: 8px; align-items: flex-start; }
.plan li svg { flex: none; color: var(--success); margin-top: 2px; }
.plan .actions { display: grid; gap: 8px; margin-top: auto; }
.shop-note { font-size: calc(12.5px * var(--fs)); color: var(--muted); display: grid; gap: 6px; margin-top: 22px; }
.badge.globetrotter { background: linear-gradient(90deg, #6d8bff, #37d0c0); color: #fff; }

/* ---------------------------------------------------------------- crédits */
.credits-table td { vertical-align: top; }
.credits-table td:first-child { font-weight: 640; white-space: nowrap; }
.photo-credit { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: calc(13px * var(--fs)); }
.photo-credit img { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; background: var(--surface-3); }
.photo-credit .file { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* inscription : case d'acceptation et indication du mot de passe */
.auth-card .check { display: flex; gap: 10px; align-items: flex-start; font-size: calc(13px * var(--fs)); color: var(--text-2); line-height: 1.45; }
.auth-card .check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.auth-card .hint.ok { color: var(--success); }

/* document juridique (conditions d'utilisation) */
.legal-doc { display: grid; gap: 14px; font-size: calc(13.5px * var(--fs)); line-height: 1.6; color: var(--text-2); max-width: 760px; }
.legal-doc h2 { color: var(--text); font-size: calc(20px * var(--fs)); }
.legal-doc h3 { color: var(--text); font-size: calc(14.5px * var(--fs)); margin-bottom: 4px; }
.legal-doc ul { padding-left: 20px; display: grid; gap: 4px; }

/* crédits (Paramètres) : catégories repliables */
.credit-group { border: 1px solid var(--border); border-radius: 12px; padding: 0 14px; margin-bottom: 10px; background: var(--surface); }
.credit-group > summary { cursor: pointer; padding: 12px 0; font-weight: 650; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.credit-group > summary::-webkit-details-marker { display: none; }
.credit-group > summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: calc(18px * var(--fs)); }
.credit-group[open] > summary::after { content: "−"; }
.credit-group[open] { padding-bottom: 12px; }

/* paramètres : aperçu du style des cartes, volume, zone sensible */
.volume { display: flex; align-items: center; gap: 10px; }
.volume input[type=range] { width: 160px; accent-color: var(--accent); }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 55%, transparent); background: color-mix(in srgb, var(--danger) 5%, var(--surface)); }
.danger-zone .panel-head h3 { color: var(--danger); display: flex; gap: 8px; align-items: center; }
.danger-lead { display: flex; gap: 8px; align-items: center; font-size: calc(13px * var(--fs)); color: var(--text-2); margin: 6px 0 4px; }
.danger-block { display: grid; gap: 8px; padding: 14px 0; border-bottom: 1px solid color-mix(in srgb, var(--danger) 22%, transparent); max-width: 460px; }
.danger-block:last-child { border-bottom: 0; }
.btn.danger-outline { border-color: color-mix(in srgb, var(--danger) 60%, transparent); color: var(--danger); background: transparent; }
.btn.danger-outline:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); }
.settings-nav a.danger-link { color: var(--danger); }
.setting .segmented { flex-wrap: wrap; }
@media (max-width: 600px) {
  .setting { flex-direction: column; align-items: flex-start; }
  .settings-nav { display: none; }
}
.credit-group > summary .num { margin: 0 auto 0 8px; }

/* téléphone : enchères sur deux colonnes, onglets défilants */
@media (max-width: 520px) {
  .auction-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .auction .info { font-size: calc(12px * var(--fs)); }
  .auction .info .price { font-size: calc(14px * var(--fs)); }
  .tabs { scrollbar-width: none; }
  .info-btn.on-pack { right: -38px; }
}

/* ---------------------------------------------------------------- classements */
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: end; max-width: 720px; margin: 0 auto 18px; }
.podium-step { display: grid; justify-items: center; gap: 6px; text-align: center; min-width: 0; }
.podium-step .who { font-weight: 720; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-step .val { font-size: calc(13px * var(--fs)); color: var(--text-2); display: inline-flex; gap: 6px; align-items: center; }
.podium-step .block { width: 100%; border-radius: 14px 14px 0 0; display: grid; place-items: start center; padding-top: 10px;
  font-size: calc(26px * var(--fs)); font-weight: 850; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.3); }
.podium-step.p1 .block { height: 120px; background: linear-gradient(160deg, #ffe48a, #e0a314); }
.podium-step.p2 .block { height: 88px; background: linear-gradient(160deg, #e9edf5, #9aa3b5); }
.podium-step.p3 .block { height: 66px; background: linear-gradient(160deg, #f3c69b, #b8733b); }
.podium-step.me .who a { color: var(--accent); }
.lb-list { padding-top: 4px; }
.lb-row { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--border); border-radius: 10px; }
.lb-row:last-child { border-bottom: 0; }
.lb-row .rank { width: 32px; text-align: right; color: var(--muted); font-weight: 700; }
.lb-row .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-row.me { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.lb-row.sep { margin-top: 10px; border-top: 1px dashed var(--border-strong); }
.badge.globetrotter .i { width: 12px; height: 12px; }
@media (max-width: 520px) { .podium { gap: 8px; } .podium-step .block { font-size: calc(20px * var(--fs)); } }

/* ---------------------------------------------------------------- fil d'actualité */
.feed { display: grid; padding-top: 6px; }
.feed-item { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.feed-item:last-child { border-bottom: 0; }
.feed-main p { font-size: calc(14px * var(--fs)); line-height: 1.45; }
.feed-meta { display: inline-flex; gap: 6px; align-items: center; font-size: calc(12px * var(--fs)); margin-top: 2px; }
.feed-cards { margin-top: 10px; }
.feed-cards .mini { width: 96px; cursor: pointer; }

/* ---------------------------------------------------------------- collections thématiques */
.set > summary { list-style: none; cursor: pointer; padding: 16px 18px; }
.set > summary::-webkit-details-marker { display: none; }
.set[open] > summary { border-bottom: 1px solid var(--border); }
.set.done { border-color: color-mix(in srgb, var(--success) 45%, var(--border)); }
.set-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.set-title h3 { font-size: calc(16px * var(--fs)); font-weight: 700; }
.set-head > p { margin: 4px 0 10px; font-size: calc(13px * var(--fs)); }
.set-meta { display: grid; grid-template-columns: auto minmax(80px, 1fr) auto auto; gap: 12px; align-items: center; font-size: calc(13px * var(--fs)); }
.set-meta .progress { height: 8px; }
.set.done .progress > span { background: var(--success); }
.set-cities { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(96px * var(--fs)), 1fr)); gap: 10px; padding: 16px 18px 18px; }
.set-cities .mini { cursor: pointer; }
.set-ghost { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; aspect-ratio: 5 / 7;
  border: 1.5px dashed var(--border-strong); border-radius: 10px; padding: 8px; cursor: pointer; font-size: calc(12px * var(--fs)); color: var(--text-2); }
.set-ghost .flag { width: 22px; border-radius: 3px; opacity: .8; }
.set-ghost b { color: var(--text); font-weight: 650; line-height: 1.2; }
.set-ghost span { font-size: calc(11px * var(--fs)); }
@media (max-width: 640px) { .set-meta { grid-template-columns: auto minmax(60px, 1fr); } }
@media (max-width: 520px) {
  .set-cities { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 12px; }
  .set-ghost { padding: 4px; }
}

/* ---------------------------------------------------------------- fusion */
.fusion-lab { padding: 18px; margin-bottom: 22px; overflow: hidden; }
.fusion-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 22px; align-items: center; }
.fusion-side { display: grid; gap: 10px; align-content: start; padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.fusion-side .field-label { font-size: calc(12px * var(--fs)); font-weight: 650; color: var(--text-2); }
.fusion-side .select { width: 100%; }
.fusion-chance { display: grid; gap: 6px; padding-top: 10px; border-top: 1px solid var(--border); }
.chance-head { display: flex; justify-content: space-between; align-items: baseline; font-size: calc(13px * var(--fs)); }
.chance-head b { font-size: calc(22px * var(--fs)); font-weight: 800; }
.chance-bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.chance-bar span { display: block; height: 100%; border-radius: inherit; transition: width .2s, background .2s; }
.fusion-chance .range { width: 100%; accent-color: var(--accent); }
.fusion-chance small { font-size: calc(11.5px * var(--fs)); line-height: 1.35; }

.fusion-bench { position: relative; display: flex; align-items: center; justify-content: center; gap: clamp(10px, 2.4vw, 30px); padding: 10px 0 26px; }
.fusion-inputs { position: relative; display: flex; gap: clamp(8px, 1.4vw, 14px); }
.fusion-slot { width: clamp(84px, 11vw, 140px); aspect-ratio: 5 / 7.2; border-radius: 12px; position: relative; }
.fusion-slot:not(.filled) { border: 2px dashed var(--border-strong, var(--border)); display: grid; place-items: center; color: var(--muted); background: var(--surface-2); }
.fusion-slot.filled { cursor: pointer; }
.fusion-slot.filled:hover .cd { transform: translateY(-4px) rotate(-1.5deg); }
.fusion-slot.drop .cd { animation: slot-drop .35s cubic-bezier(.2, .9, .3, 1.3); }
@keyframes slot-drop { from { transform: translateY(-24px) scale(.85); opacity: 0; } }
.fusion-empty svg { width: 28px; height: 28px; opacity: .6; }
.fusion-arrow { color: var(--muted); display: grid; place-items: center; }
.fusion-arrow svg { width: 30px; height: 30px; transform: rotate(-90deg); } /* l'icône pointe vers le bas : vers la droite sur grand écran */
.fusion-target { position: relative; width: clamp(96px, 13vw, 160px); aspect-ratio: 5 / 7.2; }
.fusion-target .cd-back { position: absolute; inset: 0; border-radius: 12px; box-shadow: 0 0 0 3px var(--rc), 0 0 30px -4px var(--rc); animation: target-pulse 2.4s ease-in-out infinite; }
.fusion-target .cd-back .mark { opacity: .18; }
.fusion-q { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(40px, 6vw, 70px); font-weight: 800; color: #fff; text-shadow: 0 0 18px var(--rc); }
.fusion-target-label { position: absolute; left: 0; right: 0; bottom: -26px; text-align: center; font-size: calc(12.5px * var(--fs)); font-weight: 700; display: flex; gap: 5px; justify-content: center; align-items: center; }
@keyframes target-pulse { 50% { box-shadow: 0 0 0 3px var(--rc), 0 0 46px 2px var(--rc); } }
.fusion-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 16px; border-top: 1px solid var(--border); margin-top: 14px; }
.fusion-bar .grow { flex: 1; }
.fusion-pool-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.fusion-pool-head h2 { display: flex; align-items: center; gap: 8px; font-size: calc(18px * var(--fs)); }
.fusion-pool-head .search { width: min(280px, 100%); }
.fusion-pool .picker-item { cursor: pointer; }
.fusion-pool .picker-item.spent { opacity: .4; }
.fusion-rules { font-size: calc(12.5px * var(--fs)); margin-top: 16px; }
.confirm-list { margin: 6px 0 10px; padding-left: 20px; display: grid; gap: 3px; color: var(--text); font-weight: 600; }
.confirm-body p + p { margin-top: 6px; }
.warn-line { color: var(--warning, #f59e0b); }
@media (max-width: 900px) {
  .fusion-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .fusion-bench { flex-direction: column; }
  .fusion-arrow svg { transform: none; }
  .fusion-slot { width: 26vw; }
  .fusion-target { width: 34vw; margin-bottom: 22px; }
}

/* animation : les 3 cartes glissent l'une sur l'autre au centre de leur rangée, une lueur monte,
   puis petit éclat (réussite) ou tremblement et dispersion (échec) */
.fusion-core { position: absolute; left: 50%; top: 50%; width: 140px; height: 140px; margin: -70px 0 0 -70px; border-radius: 50%; pointer-events: none; z-index: 5; opacity: 0;
  background: radial-gradient(circle, #fff 0 12%, color-mix(in srgb, var(--rc, #fff) 70%, transparent) 38%, transparent 68%); }
.gathering .fusion-slot.filled { z-index: 4; transition: transform .7s cubic-bezier(.5, 0, .3, 1), filter .7s; transform: translate(var(--dx), var(--dy)) scale(.92); filter: brightness(1.15); }
.gathering .fusion-slot.filled:nth-child(1) { transform: translate(var(--dx), var(--dy)) scale(.92) rotate(-6deg); }
.gathering .fusion-slot.filled:nth-child(3) { transform: translate(var(--dx), var(--dy)) scale(.92) rotate(6deg); }
.gathering .fusion-slot.filled .cd { box-shadow: 0 0 26px 4px color-mix(in srgb, var(--rc) 70%, transparent); border-radius: 12px; }
.gathering .fusion-core { animation: core-glow .9s ease-in forwards; }
.gathering .fusion-target, .gathering .fusion-arrow { opacity: .35; transition: opacity .4s; }
@keyframes core-glow { from { opacity: 0; transform: scale(.3); } to { opacity: .55; transform: scale(.9); } }
.merge-ok .fusion-slot.filled { transition: transform .35s ease-in, opacity .35s; transform: translate(var(--dx), var(--dy)) scale(.4) !important; opacity: 0; }
.merge-ok .fusion-core { animation: core-burst .45s ease-out forwards; }
@keyframes core-burst { from { opacity: .6; transform: scale(.9); } 40% { opacity: 1; } to { opacity: 0; transform: scale(2.2); } }
.merge-fail .fusion-slot.filled { animation: fail-shake .45s ease-in-out, fail-scatter .6s .45s cubic-bezier(.4, 0, .9, .6) forwards; filter: grayscale(.9) brightness(.8); }
.merge-fail .fusion-slot.filled:nth-child(1) { --fx: -160px; --fr: -28deg; }
.merge-fail .fusion-slot.filled:nth-child(2) { --fx: 0px; --fr: 12deg; }
.merge-fail .fusion-slot.filled:nth-child(3) { --fx: 160px; --fr: 30deg; }
.merge-fail .fusion-core { animation: core-fail .9s ease-out forwards;
  background: radial-gradient(circle, rgba(255,90,80,.9) 0 15%, rgba(226,69,60,.45) 40%, transparent 68%); }
@keyframes fail-shake {
  0% { transform: translate(var(--dx), var(--dy)) scale(.92); }
  20%, 60% { transform: translate(calc(var(--dx) - 7px), var(--dy)) scale(.92) rotate(-3deg); }
  40%, 80% { transform: translate(calc(var(--dx) + 7px), var(--dy)) scale(.92) rotate(3deg); }
  100% { transform: translate(var(--dx), var(--dy)) scale(.92); }
}
@keyframes fail-scatter { to { transform: translate(calc(var(--dx) + var(--fx)), calc(var(--dy) + 140px)) rotate(var(--fr)) scale(.7); opacity: 0; } }
@keyframes core-fail { 0% { opacity: .6; transform: scale(.9); } 45% { opacity: .9; transform: scale(1.1); } 100% { opacity: 0; transform: scale(1.6); } }

/* résultats */
.fusion-result { text-align: center; position: relative; overflow: hidden; }
.fusion-burst { position: absolute; left: 50%; top: 42%; width: 520px; height: 520px; margin: -260px 0 0 -260px; pointer-events: none; z-index: 0; opacity: .55;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--rc) 70%, transparent) 0 8deg, transparent 8deg 20deg);
  -webkit-mask: radial-gradient(circle, #000 10%, transparent 65%); mask: radial-gradient(circle, #000 10%, transparent 65%);
  animation: burst-spin 14s linear infinite; }
.fusion-result > :not(.fusion-burst) { position: relative; z-index: 1; }
@keyframes burst-spin { to { transform: rotate(360deg); } }
.fusion-card { width: min(240px, 70vw); margin: 6px auto 14px; text-align: left; animation: fusion-in .8s cubic-bezier(.2, .9, .3, 1.25) both; }
.fusion-card.kept { width: min(170px, 50vw); animation: kept-in .6s ease-out both; }
@keyframes fusion-in { from { transform: scale(.3) rotateY(180deg); opacity: 0; filter: brightness(3); } 60% { filter: brightness(1.4); } to { transform: none; opacity: 1; filter: none; } }
@keyframes kept-in { from { transform: translateY(20px) rotate(-6deg); opacity: 0; } }
.fusion-result.failed .modal-title { color: var(--danger); }
:root[data-animations="off"] .fusion-card, :root[data-animations="off"] .fusion-burst, :root[data-animations="off"] .fusion-target .cd-back,
:root[data-animations="off"] .fusion-slot.drop .cd { animation: none; }

/* ---------------------------------------------------------------- vitrine du profil */
.showcase-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.showcase-slot { position: relative; }
.showcase-slot.empty { aspect-ratio: 5 / 7.2; border-radius: 14px; border: 2px dashed var(--border-strong, var(--border)); background: transparent; color: var(--muted);
  display: grid; place-content: center; justify-items: center; gap: 8px; cursor: pointer; font: inherit; font-size: calc(12.5px * var(--fs)); transition: border-color .15s, color .15s; }
.showcase-slot.empty:hover { border-color: var(--accent); color: var(--text); }
.showcase-slot.empty > svg { width: 28px; height: 28px; }
.showcase-remove { position: absolute; top: -8px; right: -8px; z-index: 5; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border-strong, var(--border)); color: var(--text-2); box-shadow: var(--shadow); opacity: 0; transition: opacity .15s; }
.showcase-slot:hover .showcase-remove, .showcase-remove:focus-visible { opacity: 1; }
@media (hover: none) { .showcase-remove { opacity: 1; } }
@media (max-width: 900px) { .showcase-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .showcase-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

/* ---------------------------------------------------------------- accessibilité */
.rarity-sample { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 4px 0 12px; font-size: calc(13px * var(--fs)); }
.rarity-sample span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------------------------------------------------------------- défis du jour (page Boosters) */
.challenges { border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; background: var(--surface-solid-2); }
.challenges-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.challenges-head b { display: inline-flex; align-items: center; gap: 6px; font-size: calc(14px * var(--fs)); }
.challenges ul { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.challenges li { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; font-size: calc(13px * var(--fs)); }
.challenges li .progress { grid-column: 2 / -1; height: 4px; }
.challenges li.ok .lbl { color: var(--text-2); }
.challenges li.ok .progress > span { background: var(--success); }
.challenges .tick { display: inline-flex; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--border-strong); align-items: center; justify-content: center; }
.challenges li.ok .tick { background: var(--success); border-color: var(--success); color: #fff; }
.challenges .tick .i { width: 11px; height: 11px; }
.challenges-foot { font-size: calc(12px * var(--fs)); margin: 0; }

/* ---------------------------------------------------------------- profil : actions, signalement */
.profile-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.report-reasons { display: grid; gap: 8px; margin: 12px 0; }
.radio { display: flex; gap: 8px; align-items: center; cursor: pointer; }

/* ---------------------------------------------------------------- administration */
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-user .profile-hero { display: flex; gap: 14px; align-items: center; }

/* Ville gelée par une catastrophe : croix rouge (légende et carte 2D) */
.frozen-x { width: 13px; height: 13px; fill: none; flex: none; }
.map-legend .frozen-x { margin-right: 2px; }
.frozen-marker { background: none; border: 0; }
.frozen-marker .frozen-x { width: 100%; height: 100%; display: block; }
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 22px; font-size: calc(13.5px * var(--fs)); color: var(--text-2); }

/* ---------------------------------------------------------------- boutique en GeoCoins */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-bottom: 22px; }
.shop-item { display: grid; gap: 10px; align-content: start; padding: 18px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); }
.shop-item.active { border-color: color-mix(in srgb, var(--success) 50%, var(--border)); }
.shop-item h3, .shop-item h4 { font-size: calc(15px * var(--fs)); }
.shop-item .text-2 { font-size: calc(13px * var(--fs)); }
.shop-item .btn { justify-self: start; }
.shop-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #fff; }
.shop-icon svg { width: 28px; height: 28px; }
.shop-icon.shield { background: linear-gradient(150deg, #5fa8ff, #2b5fd9); box-shadow: 0 8px 22px -8px #2b5fd9; }
.shop-icon.luck { background: linear-gradient(150deg, #c9a2ff, #7a3fe0); box-shadow: 0 8px 22px -8px #7a3fe0; }
.shop-icon.iris { background: linear-gradient(135deg, #ff4d6d, #ffe14d, #3ddc84, #2ec4f5, #d24dff); box-shadow: 0 8px 22px -8px #d24dff; }
.shop-grid.cosmetics { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.shop-item.cosmetic { justify-items: center; text-align: center; }
.shop-item.cosmetic .btn { justify-self: center; }
.cosmetic-preview { height: 96px; display: grid; place-items: center; }
.back-preview { width: 62px; aspect-ratio: 5 / 7.2; position: relative; }
.back-preview .cd-back { position: absolute; inset: 0; border-radius: 8px; }
.back-preview .cd-back .word { display: none; }
.stepper { display: inline-flex; gap: 4px; align-items: center; }
.stepper .input { width: 70px; text-align: center; }

/* tombola */
.raffle { display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: 34px; align-items: center; padding: 26px; border-radius: 20px;
  background: radial-gradient(120% 120% at 0% 0%, color-mix(in srgb, #d24dff 16%, transparent), transparent 60%), var(--surface); border: 1px solid var(--border); }
.raffle-prize { position: relative; perspective: 1000px; }
.raffle-glow { position: absolute; inset: -30px; border-radius: 50%; background: conic-gradient(from 0deg, #ff4d6d, #ffe14d, #3ddc84, #2ec4f5, #d24dff, #ff4d6d);
  filter: blur(40px); opacity: .35; animation: raffle-spin 10s linear infinite; }
@keyframes raffle-spin { to { transform: rotate(360deg); } }
.raffle-prize .cd { position: relative; }
.raffle-info { display: grid; gap: 12px; }
.raffle-info .badge { justify-self: start; }
.raffle-info h2 { font-size: calc(30px * var(--fs)); font-weight: 800; }
.raffle-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.raffle-stats > div { display: grid; gap: 2px; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: calc(12.5px * var(--fs)); }
.raffle-stats b { font-size: calc(20px * var(--fs)); }
.raffle-buy { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.raffle-note, .raffle-last { font-size: calc(12.5px * var(--fs)); }
.raffle-last { display: flex; gap: 6px; align-items: center; color: var(--text-2); }
:root[data-animations="off"] .raffle-glow { animation: none; }
@media (max-width: 760px) { .raffle { grid-template-columns: 1fr; } .raffle-prize { max-width: 260px; margin: 0 auto; } .raffle-stats { grid-template-columns: 1fr; } }

/* cosmétiques : cadres d'avatar */
.avatar-frame { position: relative; display: inline-grid; padding: 4px; border-radius: 30%; flex: none; }
.avatar-frame > .avatar { position: relative; z-index: 1; }
.avatar-frame::before { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.frame-gold::before { background: linear-gradient(135deg, #fff1b8, #f0b01a, #a86800, #ffd76a); box-shadow: 0 0 16px rgba(240,176,26,.5); }
.frame-neon::before { background: linear-gradient(135deg, #00f0ff, #ff00d4); box-shadow: 0 0 18px #00f0ff, 0 0 26px rgba(255,0,212,.6); }
.frame-aurora::before { background: linear-gradient(135deg, #3df5b0, #3cc8ff, #8b6bff, #ff5fd2); background-size: 300% 300%; animation: frame-flow 6s ease-in-out infinite; }
.frame-flame::before { background: linear-gradient(0deg, #ff3d1f, #ff8a3d, #ffd25e); box-shadow: 0 -6px 22px rgba(255,110,40,.7); animation: frame-flicker 1.4s ease-in-out infinite; }
.frame-diamond::before { background: linear-gradient(135deg, #ffffff, #b8e9ff, #d8c6ff, #ffffff); box-shadow: 0 0 22px rgba(190,230,255,.9); }
@keyframes frame-flow { 50% { background-position: 100% 100%; } }
@keyframes frame-flicker { 50% { box-shadow: 0 -10px 30px rgba(255,140,40,.9); } }
:root[data-animations="off"] .avatar-frame::before { animation: none; }
/* couleurs de pseudo */
.name-color { -webkit-background-clip: text; background-clip: text; color: transparent; }
.name-sunset { background-image: linear-gradient(90deg, #ff7a59, #ffb347, #ff5f8f); }
.name-ocean { background-image: linear-gradient(90deg, #2ec4f5, #3d7bff); }
.name-emerald { background-image: linear-gradient(90deg, #3ddc84, #17b07a); }
.name-rainbow { background-image: linear-gradient(90deg, #ff4d6d, #ff9f1c, #ffe14d, #3ddc84, #2ec4f5, #6a5cff, #d24dff); background-size: 200% 100%; animation: iris-frame 16s linear infinite; }

/* ---------------------------------------------------------------- catastrophes (tableau de bord) */
.cat-list { display: grid; gap: 10px; }
.cat-row {
  --c1: #ffb3a8; --c2: #ef4f46;
  display: flex; gap: 12px; padding: 12px; border-radius: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c2) 14%, var(--surface)), var(--surface) 70%);
  border: 1px solid color-mix(in srgb, var(--c2) 35%, var(--border));
}
.cat-row.k-temporary { --c1: #ffd59a; --c2: #f58a1f; }
.cat-row.k-traffic { --c1: #c8c0ff; --c2: #7a68ff; }
.cat-row.t-blizzard { --c2: #4aa8e8; }
.cat-row.t-flood, .cat-row.t-tsunami, .cat-row.t-storm { --c2: #2d8fd6; }
.cat-tile { width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center; color: #fff;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--c2) 80%, #fff), var(--c2)); box-shadow: 0 6px 16px -6px var(--c2); }
.cat-tile svg { width: 22px; height: 22px; }
.cat-row .grow { flex: 1; min-width: 0; }
.cat-row-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cat-kind { font-size: calc(11px * var(--fs)); font-weight: 760; text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 99px;
  color: color-mix(in srgb, var(--c2) 75%, var(--text)); background: color-mix(in srgb, var(--c2) 16%, transparent); }
.cat-row .muted { font-size: calc(12.5px * var(--fs)); display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.cat-row .cat-meta { display: block; margin: 6px 0 8px; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.cat-chips span { display: inline-flex; align-items: center; gap: 4px; font-size: calc(11.5px * var(--fs)); font-weight: 650; padding: 2px 8px 2px 6px; border-radius: 99px;
  background: var(--surface-2); border: 1px solid var(--border); }
.cat-chips svg { width: 13px; height: 13px; color: var(--c2); }

/* ---------------------------------------------------------------- transports */
.line-form label { display: grid; gap: 4px; font-size: calc(12.5px * var(--fs)); color: var(--text-2); }
.line-form select { width: 100%; min-width: 0; }
.line-preview { display: grid; gap: 8px; margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--surface-2); font-size: calc(13px * var(--fs)); }
.line-preview span { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.line-preview .btn { justify-self: start; }
.line-row .muted { font-size: calc(12.5px * var(--fs)); }
.line-row.closed { opacity: .8; }
.coin-ink { color: var(--coin-ink, var(--coin)); }
.hub-marker { border-radius: 2px; transform: rotate(45deg); border: 1.5px solid #fff; background: #5b8cff; box-shadow: 0 0 0 1px rgba(0,0,0,.35); }
.hub-marker.sea { background: #2ec4b6; }
.map-traffic { position: absolute; left: 0; top: 0; pointer-events: none; }
.hub-marker.closed { background: var(--danger); }
/* ---------------------------------------------------------------- Ma Cité */
.city-title { display: flex; align-items: center; gap: 6px; }
.city-kpis { margin-bottom: 16px; }
.mood-bar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin: 6px 0 4px; }
.mood-bar span { display: block; height: 100%; border-radius: inherit; background: var(--success); }
.mood-bar.ok span { background: #f0b429; }
.mood-bar.unhappy span { background: var(--danger); }
.city-board-panel { overflow: hidden; }
.city-toolbar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); min-height: 52px; }
.city-toolbar .grow { flex: 1; }
.city-board { overflow: auto; max-height: 76vh; padding: 8px; display: grid; justify-items: center;
  background: radial-gradient(120% 90% at 50% 30%, color-mix(in srgb, #4caf50 10%, var(--surface)), var(--surface)); }
.city-svg { display: block; max-width: none; height: auto; touch-action: manipulation; user-select: none; }
.city-svg .ground { fill: #4f8f3f; stroke: #3d7330; stroke-width: 2; }
.city-svg .tile { fill: #6db35a; stroke: rgba(255,255,255,.12); stroke-width: .8; }
.city-svg .tile.alt { fill: #66ab53; }
.city-svg .city-item { cursor: pointer; }
.city-svg image { pointer-events: none; } /* seule la silhouette (.hit) d'un bâtiment capte les clics */
.city-svg .city-item .hit { fill: transparent; stroke: none; pointer-events: all; }
.city-svg .city-item:not(.hit-pos):not(.hit-neg):hover { filter: brightness(1.08); }
.city-svg .city-item.hit-pos { filter: url(#cz-tint-pos); }
.city-svg .city-item.hit-neg { filter: url(#cz-tint-neg); }
.city-svg .city-item.moving { opacity: .25; }
.city-svg .sel { color: var(--accent); opacity: .35; }
.city-svg .ok { color: #3ddc84; opacity: .45; }
.city-svg .bad { color: #ef4f46; opacity: .5; }
.city-svg .job-tag { pointer-events: none; }
.city-svg .job-tag .bg { fill: rgba(17,22,33,.88); stroke: rgba(255,255,255,.85); stroke-width: 1.2; }
.city-svg .job-tag text { fill: #fff; font: 700 10.5px Inter, system-ui, sans-serif; }
.city-svg .job-tag .track { fill: rgba(255,255,255,.22); }
.city-svg .job-tag .fill { fill: #f5b82e; }
.city-thumb { flex: none; display: block; }
.small { font-size: calc(12.5px * var(--fs)); }
.city-cost { display: flex; align-items: center; gap: 4px; font-size: calc(12px * var(--fs)); color: var(--text-2); margin-top: 2px; flex-wrap: wrap; }
.city-why { font-size: calc(12px * var(--fs)); color: var(--danger); margin-top: 2px; }
.city-fx { display: grid; gap: 2px; padding: 10px; border-radius: 10px; background: var(--surface-2); font-size: calc(13px * var(--fs)); }
.city-fx span { color: var(--muted); font-size: calc(11.5px * var(--fs)); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.city-fx.next { border: 1px dashed color-mix(in srgb, var(--accent) 50%, var(--border)); }
.city-reqs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.city-reqs li { display: inline-flex; align-items: center; gap: 4px; font-size: calc(12.5px * var(--fs)); padding: 3px 9px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.callout { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; border-radius: 12px; font-size: calc(13px * var(--fs));
  background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border)); }
.hub-marker.rail { background: #f5a524; }
.profile-city { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: calc(13px * var(--fs)); color: var(--text-2); }
.city-board.painting .city-svg { touch-action: none; cursor: crosshair; }
.city-svg .unlinked { animation: unlinked-pulse 1.6s ease-in-out infinite; }
@keyframes unlinked-pulse { 50% { opacity: .55; } }
:root[data-animations="off"] .city-svg .unlinked { animation: none; }
.success-text { color: var(--success); display: flex; align-items: center; gap: 6px; }

/* Ma Cité : petites animations (fumée, gyrophares, panneaux solaires, flamme, vagues, cotations) */
.city-svg .puff, .city-thumb .puff { transform-box: fill-box; transform-origin: center; animation: city-puff 3.9s linear infinite; }
@keyframes city-puff { 0% { transform: translate(0, 0) scale(.5); opacity: .85; } 100% { transform: translate(16px, -30px) scale(1.9); opacity: 0; } }
.city-svg .anim-blink { animation: city-blink 1s steps(2, jump-none) infinite; }
.city-svg .anim-blink.slow { animation: city-glow 3s ease-in-out infinite; }
@keyframes city-blink { 0% { opacity: 1; } 100% { opacity: .15; } }
@keyframes city-glow { 50% { opacity: .35; } }
.city-svg .anim-glint { animation: city-glint 4s ease-in-out infinite; opacity: 0; }
@keyframes city-glint { 40% { opacity: 0; } 55% { opacity: .9; } 70% { opacity: 0; } }
.city-svg .anim-pulse { transform-box: fill-box; transform-origin: center; animation: city-pulse 2s ease-in-out infinite; }
@keyframes city-pulse { 50% { transform: scale(1.15); opacity: .75; } }
.city-svg .anim-flame { transform-box: fill-box; transform-origin: 50% 100%; animation: city-flame .6s ease-in-out infinite alternate; }
@keyframes city-flame { to { transform: scale(.85, 1.15); } }
.city-svg .anim-spray { animation: city-glow 1.4s ease-in-out infinite; }
.city-svg .anim-wave { animation: city-wave 2.4s ease-in-out infinite; }
@keyframes city-wave { 50% { transform: translateX(4px); opacity: .3; } }
.city-svg .anim-ticker { animation: city-ticker 1.2s linear infinite; }
@keyframes city-ticker { to { stroke-dashoffset: -14; } }
.city-thumb * { animation: none !important; }
:root[data-animations="off"] .city-svg * { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .city-svg * { animation: none !important; } }
.city-section { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: calc(14px * var(--fs)); }

/* Succès évolutifs : étiquette de palier, crans et barre vers le palier suivant */
.ach-text .progress.sm { height: 5px; margin-top: 4px; }
.ach-tile.maxed { background: linear-gradient(135deg, color-mix(in srgb, #7a46e0 8%, var(--surface)), var(--surface)); }
.tier-tag { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 99px; font-size: calc(10.5px * var(--fs)); font-weight: 750; letter-spacing: .03em; vertical-align: 1px; color: #fff; background: #a8622c; }
.tier-tag.silver { background: #8d97a6; } .tier-tag.gold { background: #c28a0c; } .tier-tag.platinum { background: #2f97a8; } .tier-tag.diamond { background: #7a46e0; }
.ach-pips { display: flex; gap: 4px; margin-top: 4px; }
.ach-pips i { width: 16px; height: 4px; border-radius: 99px; background: var(--surface-3); }
.ach-pips i.bronze { background: #c98a52; } .ach-pips i.silver { background: #aab3c0; } .ach-pips i.gold { background: #e2b33a; }
.ach-pips i.platinum { background: #4cc1d1; } .ach-pips i.diamond { background: #9b6cf0; }

/* Profil : toutes les statistiques dans un seul bloc */
.profile-stats { margin-bottom: 18px; overflow: hidden; }
.profile-stats .panel-body { display: grid; gap: 16px; }
.pstat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.pstat { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; column-gap: 10px; align-items: center; padding: 14px 16px; background: var(--surface); min-width: 0; }
.pstat-ic { grid-row: 1 / span 3; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.pstat b { font-size: calc(21px * var(--fs)); font-weight: 780; line-height: 1.1; }
.pstat b small { font-size: .62em; color: var(--muted); font-weight: 600; }
.pstat-label { font-size: calc(12.5px * var(--fs)); color: var(--text-2); }
.pstat small.muted { font-size: calc(11.5px * var(--fs)); }
.pstat-world { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; font-size: calc(13px * var(--fs)); font-weight: 650; }
.pstat-world span { display: inline-flex; gap: 6px; align-items: center; }
.pstat-world .progress { height: 8px; }
@media (max-width: 900px) { .pstat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .pstat { padding: 12px; } .pstat-ic { width: 30px; height: 30px; } }

.city-reqs li.ok { color: var(--text-2); }
.city-reqs li.ok svg { color: var(--success); }
.city-reqs li.ko { color: var(--danger); }
.city-influence svg { vertical-align: -2px; margin-right: 3px; }
.city-fx.neg b { color: var(--danger); }
.ghost-info.pos { color: var(--success); } .ghost-info.neg { color: var(--danger); }
.locked-feature { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 36px 20px; }
.locked-ic { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.locked-ic svg { width: 28px; height: 28px; }

/* Plateau de la cité : dessin fixe + calque des animations (seul redessiné à chaque image) */
.city-stack { position: relative; max-width: none; }
.city-stack > .city-svg { width: 100%; }
.city-svg.city-anim { position: absolute; inset: 0; height: 100%; pointer-events: none; will-change: transform; }


/* ---------------------------------------------------------------- page d'accueil (visiteurs) */
.auth-card { position: relative; }
.auth-back { position: absolute; top: 12px; left: 12px; }
.landing { min-height: 100vh; background:
  radial-gradient(ellipse at 15% 0%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 50%),
  radial-gradient(ellipse at 95% 30%, color-mix(in srgb, var(--r-legendary) 12%, transparent), transparent 45%), var(--bg); }
.landing > * { max-width: 1120px; margin-inline: auto; padding-inline: 24px; }
.lp-head { display: flex; justify-content: space-between; align-items: center; padding-block: 18px; }
.lp-head .brand { font-size: calc(22px * var(--fs)); }
.lp-head .brand-mark { width: 34px; height: 34px; }
.lp-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; padding-block: 48px 40px; }
.lp-hero h1 { font-size: clamp(32px, 5vw, 54px); line-height: 1.05; letter-spacing: -.02em; margin-bottom: 18px; }
.lp-lead { font-size: calc(18px * var(--fs)); color: var(--text-2); line-height: 1.5; margin-bottom: 26px; max-width: 34em; }
.lp-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.lp-cta.center { justify-content: center; }
.lp-free { display: flex; align-items: center; gap: 8px; margin-top: 18px; color: var(--muted); font-size: calc(13.5px * var(--fs)); }

.lp-fan { position: relative; height: 340px; }
.lp-card { --rc: var(--r-common); position: absolute; left: 50%; top: 50%; width: 190px; height: 268px; padding: 14px; border-radius: 16px;
  background: var(--surface); border: 2px solid var(--rc); box-shadow: var(--shadow-lg), 0 0 0 4px color-mix(in srgb, var(--rc) 18%, transparent);
  display: flex; flex-direction: column; gap: 6px;
  transform: translate(-50%, -50%) translateX(calc((var(--i) - 1) * 120px)) rotate(calc((var(--i) - 1) * 9deg)) translateY(calc(var(--i) * var(--i) * 6px - var(--i) * 12px));
  transition: transform .3s ease; }
.lp-card:nth-child(2) { z-index: 2; }
.lp-fan:hover .lp-card { transform: translate(-50%, -50%) translateX(calc((var(--i) - 1) * 150px)) rotate(calc((var(--i) - 1) * 12deg)) translateY(calc(var(--i) * var(--i) * 8px - var(--i) * 16px)); }
.lp-card.r-uncommon { --rc: var(--r-uncommon); } .lp-card.r-rare { --rc: var(--r-rare); }
.lp-card.r-epic { --rc: var(--r-epic); } .lp-card.r-legendary { --rc: var(--r-legendary); }
.lp-card.shiny { background: linear-gradient(135deg, color-mix(in srgb, #ff9ad5 16%, var(--surface)), color-mix(in srgb, #8fd3ff 18%, var(--surface)) 50%, color-mix(in srgb, #ffe58f 16%, var(--surface))); }
.lp-card-top { display: flex; align-items: center; gap: 6px; color: var(--rc); font-weight: 700; font-size: calc(12.5px * var(--fs)); }
.lp-card-top svg { width: 16px; height: 16px; }
.lp-card-top b { margin-left: auto; font-size: calc(11px * var(--fs)); padding: 2px 7px; border-radius: 99px; background: color-mix(in srgb, var(--rc) 18%, transparent); }
.lp-card-art { flex: 1; display: grid; place-items: center; border-radius: 10px; color: var(--rc);
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--rc) 26%, transparent), color-mix(in srgb, var(--rc) 6%, var(--surface-2, var(--surface)))); }
.lp-card-art svg { width: 64px; height: 64px; opacity: .85; }
.lp-card h3 { font-size: calc(19px * var(--fs)); margin: 4px 0 0; }
.lp-card p { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--text-2); font-size: calc(13px * var(--fs)); }
.lp-card .flag { width: 18px; height: 13px; border-radius: 2px; object-fit: cover; }
.lp-card-pop { color: var(--muted) !important; }

.lp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding-block: 8px 30px; }
.lp-stats > div { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px; text-align: center; }
.lp-stats b { display: block; font-size: calc(28px * var(--fs)); }
.lp-stats span { color: var(--text-2); font-size: calc(13.5px * var(--fs)); }

.lp-section { padding-block: 34px; }
.lp-section h2, .lp-final h2 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 10px; letter-spacing: -.01em; }
.lp-sub { color: var(--text-2); line-height: 1.55; max-width: 46em; margin-bottom: 22px; }
.lp-steps { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lp-steps li, .lp-features article { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 22px; }
.lp-steps h3, .lp-features h3 { font-size: calc(17px * var(--fs)); margin: 12px 0 6px; }
.lp-steps p, .lp-features p { color: var(--text-2); line-height: 1.5; margin: 0; }
.lp-step-n { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; }
.lp-rarities { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.lp-rarity { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 18px 10px; border-radius: 16px;
  background: color-mix(in srgb, currentColor 9%, var(--surface)); border: 1px solid color-mix(in srgb, currentColor 35%, transparent); }
.lp-rarity svg { width: 30px; height: 30px; }
.lp-rarity span { color: var(--text-2); font-size: calc(13px * var(--fs)); }
.lp-city { display: grid; grid-template-columns: 1fr 1.2fr; gap: 30px; align-items: center; }
.lp-skyline { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center; gap: 4px; padding: 20px; border-radius: 20px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 10%, var(--surface)), color-mix(in srgb, #5fbf5f 22%, var(--surface))); border: 1px solid var(--border); }
.lp-skyline img { height: 96px; width: auto; }
.lp-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lp-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.lp-final { text-align: center; padding-block: 44px 30px; }
.lp-final p { color: var(--text-2); max-width: 40em; margin: 0 auto 22px; line-height: 1.5; }
.lp-foot { display: flex; justify-content: space-between; padding-block: 24px; border-top: 1px solid var(--border); color: var(--muted); font-size: calc(13px * var(--fs)); }

@media (max-width: 860px) {
  .lp-hero, .lp-city { grid-template-columns: 1fr; }
  .lp-hero { padding-block: 24px; gap: 10px; }
  .lp-fan { height: 300px; }
  .lp-card { width: 150px; height: 214px; }
  .lp-card { transform: translate(-50%, -50%) translateX(calc((var(--i) - 1) * 90px)) rotate(calc((var(--i) - 1) * 9deg)); }
  .lp-fan:hover .lp-card { transform: translate(-50%, -50%) translateX(calc((var(--i) - 1) * 90px)) rotate(calc((var(--i) - 1) * 9deg)); }
  .lp-steps, .lp-features { grid-template-columns: 1fr; }
  .lp-stats { grid-template-columns: repeat(2, 1fr); }
  .lp-rarities { grid-template-columns: repeat(2, 1fr); }
  .lp-skyline img { height: 64px; }
}
@media (max-width: 480px) { .landing > * { padding-inline: 16px; } .lp-cta .btn { flex: 1; } }
@media (prefers-reduced-motion: reduce) { .lp-card { transition: none; } }

/* ---------------------------------------------------------------- Ma Cité en plein écran */
body.city-full main.page { max-width: none; padding: 0; }
.cz { position: relative; height: calc(100dvh - var(--header-h)); overflow: hidden; user-select: none; -webkit-user-select: none;
  background: radial-gradient(ellipse at 50% 45%, color-mix(in srgb, #7cc26b 34%, var(--bg)), color-mix(in srgb, #4f8f3f 26%, var(--bg)) 75%); }
.cz-viewport { position: absolute; inset: 0; touch-action: none; cursor: grab; }
.cz.panning .cz-viewport { cursor: grabbing; }
.cz.mode-road .cz-viewport, .cz.mode-bulldoze .cz-viewport { cursor: crosshair; }
.cz.mode-place .cz-viewport, .cz.mode-move .cz-viewport { cursor: copy; }
.cz-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.cz.panning .cz-world { will-change: transform; } /* nette dès que le geste s'arrête */
.cz-world .city-svg { touch-action: none; }
.cz[class*="mode-"] .city-svg .tile { stroke: rgba(255,255,255,.35); }
.cz .city-svg .ghost-art { opacity: .82; }

/* boutons et panneaux posés sur la cité */
.cz-ui { --glass: color-mix(in srgb, var(--surface) 94%, transparent); }
.cz-round { width: 40px; height: 40px; padding: 0; border-radius: 50%; justify-content: center; flex: none; }
.cz-zoom .cz-round, .cz-bar .cz-round { background: var(--glass, var(--surface)); box-shadow: var(--shadow); }

/* barre du haut : nom, population et bonheur, ouvriers, électricité */
.cz-hud { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; pointer-events: none; z-index: 3; }
.cz-hud > * { pointer-events: auto; }
.cz-name, .cz-chip { background: var(--glass); border: 1px solid var(--border); box-shadow: var(--shadow); color: var(--text); }
.cz-name { display: grid; text-align: left; padding: 5px 14px; border-radius: 14px; line-height: 1.2; cursor: pointer; max-width: 46vw; }
.cz-name b { font-size: calc(15px * var(--fs)); font-weight: 780; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cz-name span { font-size: calc(11.5px * var(--fs)); color: var(--muted); font-weight: 650; }
.cz-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.cz-chip { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 13px; border-radius: 99px; font-weight: 750; font-size: calc(14px * var(--fs)); cursor: pointer; transition: transform .12s ease, border-color .12s; }
.cz-chip:hover { transform: translateY(-1px); }
.cz-chip.open { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent), var(--shadow); }
.cz-chip small { color: var(--muted); font-weight: 650; font-size: calc(12px * var(--fs)); margin-left: -3px; }
.cz-chip .sep { width: 1px; height: 16px; background: var(--border); margin: 0 3px; }
.cz-chip svg { color: var(--text-2); }
.cz-chip.mood-radiant svg:nth-of-type(2) { color: var(--success); }
.cz-chip.mood-unhappy svg:nth-of-type(2), .cz-chip.mood-unhappy b:last-of-type { color: var(--danger); }
.cz-chip.busy b { color: var(--muted); }
.cz-chip.warn { border-color: color-mix(in srgb, var(--danger) 50%, var(--border)); }
.cz-chip.warn svg, .cz-chip.warn b { color: var(--danger); }
.cz-chip.event.bonus { background: color-mix(in srgb, var(--success) 14%, var(--surface)); }
.cz-chip.event.bonus svg { color: var(--success); }
.cz-chip.event.malus { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); }
.cz-chip.event.malus svg { color: var(--danger); }
.cz-ev-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cz-pop { position: absolute; top: calc(100% + 8px); left: 0; width: min(330px, 100%); padding: 14px 16px; border-radius: 16px; background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-lg); display: grid; gap: 8px; animation: cz-in .16s ease-out; }
.cz-pop h4 { display: flex; align-items: center; gap: 6px; font-size: calc(13px * var(--fs)); color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }
.cz-pop h4:not(:first-child) { margin-top: 6px; }
.cz-big { font-size: calc(26px * var(--fs)); font-weight: 800; letter-spacing: -.02em; }
.cz-big small { font-size: calc(14px * var(--fs)); color: var(--muted); font-weight: 650; }
.cz-lines { list-style: none; margin: 0; padding: 0; display: grid; }
.cz-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--border); font-size: calc(13px * var(--fs)); }
.cz-lines li:last-child { border-bottom: 0; }
.cz-lines li span { color: var(--text-2); }
.cz-lines b.neg { color: var(--danger); }
.cz-lines.big li { font-size: calc(14px * var(--fs)); padding: 8px 0; }
.danger-text { color: var(--danger); }
@keyframes cz-in { from { opacity: 0; transform: translateY(-4px); } }

/* zoom */
.cz-zoom { position: absolute; left: 12px; bottom: 18px; display: grid; gap: 6px; z-index: 2; }

/* marteau : ouvre le menu de construction */
.cz-fab { position: absolute; right: 18px; bottom: 18px; z-index: 4; width: 64px; height: 64px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; color: #fff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 80%, #fff), var(--accent)); box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 45%, transparent), 0 2px 6px rgba(0,0,0,.2);
  transition: transform .15s ease; }
.cz-fab:hover { transform: scale(1.06); }
.cz-fab:active { transform: scale(.96); }
.cz-fab svg { width: 28px; height: 28px; stroke-width: 2; }

/* menu de construction */
.cz-drawer { position: absolute; right: 12px; top: 64px; bottom: 96px; width: min(420px, calc(100% - 24px)); z-index: 4; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden; animation: cz-slide .2s ease-out; }
@keyframes cz-slide { from { opacity: 0; transform: translateX(20px); } }
.cz-drawer-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 12px; border-bottom: 1px solid var(--border); }
.cz-drawer-head h3 { flex: 1; display: flex; align-items: center; gap: 8px; font-size: calc(16px * var(--fs)); }
.cz-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 10px 12px; border-bottom: 1px solid var(--border); flex: none; scrollbar-width: none; }
.cz-tabs::-webkit-scrollbar { display: none; }
.cz-tabs button { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 99px; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); font-weight: 700; font-size: calc(13px * var(--fs)); }
.cz-tabs button:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.cz-tabs button.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.cz-drawer-body { overflow: auto; padding: 12px; overscroll-behavior: contain; }
.cz-lead { margin-bottom: 10px; }
.cz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.cz-grid .city-section, .cz-span { grid-column: 1 / -1; margin: 6px 0 -2px; }
.cz-item { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; padding: 10px 8px 10px; border-radius: 14px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; transition: transform .12s ease, border-color .12s; }
.cz-item:hover { border-color: var(--accent); transform: translateY(-2px); }
.cz-item b { font-size: calc(13.5px * var(--fs)); line-height: 1.2; }
.cz-item-fx { font-size: calc(11.5px * var(--fs)); color: var(--text-2); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cz-item-cost { display: inline-flex; align-items: center; gap: 4px; font-size: calc(12px * var(--fs)); font-weight: 650; margin-top: auto; padding-top: 3px; flex-wrap: wrap; justify-content: center; }
.cz-item-why { font-size: calc(11px * var(--fs)); color: var(--danger); display: inline-flex; gap: 3px; align-items: center; margin-top: auto; padding-top: 3px; }
.cz-item-count { position: absolute; top: 7px; right: 8px; font-size: calc(11px * var(--fs)); color: var(--muted); font-weight: 700; }
.cz-item.locked { opacity: .6; cursor: not-allowed; }
.cz-item.locked:hover { transform: none; border-color: var(--border); }
.cz-item .city-thumb { margin-bottom: 2px; }
.cz-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.cz-tool { display: grid; justify-items: center; gap: 4px; padding: 16px 10px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; font: inherit; text-align: center; }
.cz-tool:hover { border-color: var(--accent); }
.cz-tool svg { width: 28px; height: 28px; color: var(--accent); }

/* barre de placement / de tracé */
.cz-bar { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 4; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px;
  max-width: calc(100% - 24px); border-radius: 20px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: cz-up .18s ease-out; }
@keyframes cz-up { from { opacity: 0; transform: translate(-50%, 10px); } }
.cz-bar-text { display: grid; min-width: 0; margin-right: 4px; }
.cz-bar-text b { font-size: calc(14px * var(--fs)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cz-bar-text small { font-size: calc(12px * var(--fs)); color: var(--muted); }
.cz-bar .cz-ok { height: 40px; border-radius: 12px; padding: 0 16px; white-space: nowrap; }
.cz-bar .cz-round.active { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, var(--border)); }
.ghost-info { font-weight: 700; }
.ghost-info.pos { color: var(--success); } .ghost-info.neg { color: var(--danger); }

/* fiche du bâtiment sélectionné */
.cz-card { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 4; width: min(460px, calc(100% - 24px)); max-height: calc(100% - 90px); overflow: auto;
  padding: 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); display: grid; gap: 8px; animation: cz-up .18s ease-out; }
.cz-card-head { display: flex; align-items: center; gap: 10px; }
.cz-card-head .grow { flex: 1; min-width: 0; }
.cz-card-head h3 { font-size: calc(17px * var(--fs)); }
.cz-card-head .cz-round { width: 34px; height: 34px; }
.cz-status { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 10px; font-size: calc(13px * var(--fs)); }
.cz-status.warn { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, var(--surface)); }
.cz-status.job { background: color-mix(in srgb, #f0a020 14%, var(--surface)); flex-wrap: wrap; }
.cz-status .cz-rush { margin-left: auto; }
.cz-rush { gap: 4px; white-space: nowrap; }
.cz-rush svg.i { color: #f5b82e; }
.cz-rush.primary svg.i { color: #fff; }
.cz-pop .cz-lines li { align-items: center; }
.cz-now { font-size: calc(13.5px * var(--fs)); color: var(--text-2); }
.cz-grow { color: var(--accent); display: flex; align-items: center; gap: 6px; }
.cz-more { display: grid; gap: 8px; }
.cz-more .city-fx em { font-style: normal; color: var(--accent); display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.cz-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 2px; }
.cz-actions [data-details] { margin-left: auto; }
.city-why { font-size: calc(12px * var(--fs)); color: var(--danger); }
.city-fx { display: grid; gap: 2px; padding: 10px; border-radius: 10px; background: var(--surface-2); font-size: calc(13px * var(--fs)); }
.city-fx span { color: var(--muted); font-size: calc(11.5px * var(--fs)); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.city-fx.next { border: 1px dashed color-mix(in srgb, var(--accent) 50%, var(--border)); }

/* aura d'un bâtiment : voile transparent bordé de pointillés, effet en couleur au-dessus des résidences */
.city-svg .aura-zone { pointer-events: none; stroke-width: 2.2; stroke-dasharray: 8 6; stroke-linejoin: round; animation: cz-march 1.4s linear infinite; }
.city-svg .aura-zone.pos { fill: rgba(61, 220, 132, .14); stroke: #3ddc84; }
.city-svg .aura-zone.neg { fill: rgba(255, 94, 77, .14); stroke: #ff5e4d; }
.city-svg .aura-num { pointer-events: none; font: 900 15px Inter, system-ui, sans-serif; paint-order: stroke; stroke: #fff; stroke-width: 3.5px; stroke-linejoin: round; }
.city-svg .aura-num.pos { fill: #17a957; }
.city-svg .aura-num.neg { fill: #e0352b; }
@keyframes cz-march { to { stroke-dashoffset: -28; } }

@media (max-width: 860px) {
  .cz { height: calc(100dvh - var(--header-h) - 62px - env(safe-area-inset-bottom)); }
  .cz-hud { top: 8px; left: 8px; right: 8px; gap: 6px; }
  .cz-name { padding: 4px 10px; max-width: 100%; }
  .cz-chip { height: 34px; padding: 0 10px; font-size: calc(13px * var(--fs)); gap: 5px; }
  .cz-ev-name { display: none; }
  .cz-zoom { left: 8px; bottom: 14px; }
  .cz-zoom [data-zoom="in"], .cz-zoom [data-zoom="out"] { display: none; }
  .cz-fab { right: 14px; bottom: 14px; width: 58px; height: 58px; }
  .cz-drawer { left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 72%; border-radius: 20px 20px 0 0; border-bottom: 0; animation-name: cz-sheet; }
  @keyframes cz-sheet { from { transform: translateY(30px); opacity: 0; } }
  .cz-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
  .cz-card, .cz-bar { bottom: 10px; }
  .cz:has(.cz-card) .cz-fab, .cz:has(.cz-drawer) .cz-fab { display: none; }
  .cz:has(.cz-card) .cz-zoom, .cz:has(.cz-bar) .cz-zoom, .cz:has(.cz-drawer) .cz-zoom { display: none; }
  .cz-bar { left: 10px; right: 10px; transform: none; max-width: none; flex-wrap: wrap; padding: 10px; animation-name: cz-sheet; }
  .cz-bar-text { flex: 1 1 100%; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin: 0 0 2px 4px; }
  .cz-bar .cz-ok { flex: 1; justify-content: center; }
  .cz-actions .btn span { display: none; }
  .cz-actions .btn[data-upgrade] span, .cz-actions .btn[data-move] span { display: inline; }
}
:root[data-animations="off"] .city-svg .aura-zone { animation: none; }
@media (prefers-reduced-motion: reduce) { .cz-pop, .cz-drawer, .cz-bar, .cz-card { animation: none; } }

/* Ma Cité : effets en liste, conditions, fiche technique */
.cz-fx { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: calc(13.5px * var(--fs)); }
.cz-fx li { position: relative; padding-left: 15px; line-height: 1.35; color: var(--text); }
.cz-fx li::before { content: ""; position: absolute; left: 3px; top: .5em; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.cz-fx li.pos::before { background: var(--success); }
.cz-fx li.neg { color: var(--danger); }
.cz-fx li.neg::before { background: var(--danger); }
.cz-fx.small { font-size: calc(12.5px * var(--fs)); }
.cz-fx.mini { font-size: calc(11.5px * var(--fs)); gap: 1px; text-align: left; align-self: stretch; color: var(--text-2); }
.cz-fx.mini li { color: var(--text-2); padding-left: 12px; }
.cz-fx.mini li::before { width: 5px; height: 5px; left: 2px; }
.cz-fx.mini li.neg { color: var(--danger); }
.cz-item-size { display: inline-flex; align-items: center; gap: 4px; font-size: calc(11px * var(--fs)); color: var(--muted); }
.cz-specs li b { text-align: right; font-weight: 650; }
.cz-upgrade { display: grid; gap: 10px; }
.cz-upgrade h4 { font-size: calc(12.5px * var(--fs)); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: 4px; }
.cz-conds { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cz-conds li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; font-size: calc(13.5px * var(--fs));
  background: color-mix(in srgb, var(--success) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--success) 25%, var(--border)); }
.cz-conds li svg { color: var(--success); flex: none; }
.cz-conds li span { flex: 1; }
.cz-conds li.ko { background: color-mix(in srgb, var(--danger) 8%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 30%, var(--border)); }
.cz-conds li.ko svg { color: var(--danger); }
.cz-conds li small { color: var(--danger); font-weight: 700; }

/* ---------------------------------------------------------------- Économie : chiffres, courbes, tuiles */
.eco-hero { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.eco-strip { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; margin-bottom: 18px; }
.eco-strip .chips { margin-left: auto; align-self: center; }
.eco-stat { display: grid; gap: 4px; align-content: center; padding: 14px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); min-width: 150px; }
.eco-stat .label { display: flex; align-items: center; gap: 6px; font-size: calc(12.5px * var(--fs)); color: var(--muted); font-weight: 650; }
.eco-stat b { display: flex; align-items: center; gap: 6px; font-size: calc(24px * var(--fs)); font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.eco-stat b small { font-size: calc(13px * var(--fs)); color: var(--muted); font-weight: 650; }
.eco-stat.main { background: linear-gradient(135deg, color-mix(in srgb, var(--coin) 16%, var(--surface)), var(--surface)); border-color: color-mix(in srgb, var(--coin) 40%, var(--border)); }
.eco-stat.main b { font-size: calc(32px * var(--fs)); }
.trend { font-size: calc(12.5px * var(--fs)); font-weight: 700; }
.trend.up { color: var(--success); } .trend.down { color: var(--danger); }
.eco-chart-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.eco-chart-empty { display: flex; align-items: center; gap: 8px; padding: 40px 0; justify-content: center; }
.seg-mini { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface-2); gap: 2px; }
.seg-mini button { border: 0; background: transparent; color: var(--text-2); font-weight: 700; font-size: calc(12.5px * var(--fs)); padding: 5px 10px; border-radius: 8px; cursor: pointer; }
.seg-mini button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.eco-chart { margin-bottom: 22px; }

/* courbe (ui/lineChart.js) */
.line-chart { position: relative; margin: 0; }
.line-chart svg { display: block; width: 100%; height: auto; max-height: 300px; overflow: visible; touch-action: pan-y; }
.line-chart .lc-grid { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.line-chart .lc-axis { fill: var(--muted); font: 600 11px Inter, system-ui, sans-serif; }
.line-chart .lc-line { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.line-chart .lc-cursor { stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.line-chart .lc-dot, .line-chart .lc-end { fill: var(--accent); stroke: var(--surface); stroke-width: 2; vector-effect: non-scaling-stroke; }
.line-chart .lc-tip { position: absolute; transform: translate(-50%, calc(-100% - 12px)); padding: 6px 10px; border-radius: 10px; pointer-events: none; white-space: nowrap;
  background: var(--text); color: var(--bg); display: grid; gap: 1px; font-size: calc(12px * var(--fs)); box-shadow: var(--shadow-lg); }
.line-chart .lc-tip b { font-size: calc(14px * var(--fs)); }
.line-chart .lc-tip[hidden] { display: none; }

/* tuiles : monuments et hubs de transport */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tile { display: grid; grid-template-rows: auto 1fr auto; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.tile.locked { opacity: .55; }
.tile.owned { border-color: color-mix(in srgb, var(--coin) 50%, var(--border)); }
.tile-art { position: relative; height: 78px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(140deg, #c8a04a, #8a6420); }
.tile-art svg.i { width: 34px; height: 34px; stroke-width: 1.6; }
.tile.hub.k-air .tile-art { background: linear-gradient(140deg, #5b8cff, #2b4fc7); }
.tile.hub.k-sea .tile-art { background: linear-gradient(140deg, #2ec4b6, #127a8a); }
.tile.hub.k-rail .tile-art { background: linear-gradient(140deg, #f5a524, #c26d0a); }
.tile-art .dots { position: absolute; bottom: 8px; left: 0; right: 0; display: flex; gap: 4px; justify-content: center; }
.tile-art .dots i { width: 16px; height: 5px; border-radius: 99px; background: rgba(255,255,255,.35); }
.tile-art .dots i.on { background: #fff; }
.tile-size { position: absolute; bottom: 7px; font-size: calc(11px * var(--fs)); font-weight: 700; color: rgba(255,255,255,.9); }
.tile-body { display: grid; gap: 3px; align-content: start; padding: 12px 14px 4px; }
.tile-title { font-size: calc(14.5px * var(--fs)); line-height: 1.25; }
.tile-gain { font-size: calc(18px * var(--fs)); font-weight: 800; color: var(--coin-ink, var(--text)); margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.tile-gain small { font-size: calc(12px * var(--fs)); color: var(--muted); font-weight: 650; display: inline-flex; align-items: center; gap: 3px; }
.tile-action { padding: 10px 14px 14px; }
.tile-action .btn { width: 100%; justify-content: center; }
.tile-lock { display: flex; align-items: center; gap: 6px; font-size: calc(12px * var(--fs)); color: var(--muted); }
.hub-dot { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: #fff; flex: none; background: #2b4fc7; }
.hub-dot.k-sea { background: #127a8a; } .hub-dot.k-rail { background: #c26d0a; }

/* mégalopoles */
.mega-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.mega-card { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 16px; align-items: start; }
.mega-card.frozen { opacity: .7; }
.mega-radar { width: 120px; height: 120px; }
.mega-radar .mr-zone { fill: color-mix(in srgb, var(--accent) 8%, transparent); stroke: color-mix(in srgb, var(--accent) 45%, transparent); stroke-dasharray: 4 4; }
.mega-radar .mr-ring { fill: none; stroke: color-mix(in srgb, var(--accent) 22%, transparent); }
.mega-radar .mr-road { stroke: var(--coin); stroke-width: 1.5; opacity: .8; }
.mega-radar .mr-sub { fill: var(--surface); stroke: var(--coin); stroke-width: 2; }
.mega-radar .mr-core { fill: var(--r-legendary); stroke: var(--surface); stroke-width: 2.5; }
.mega-info { display: grid; gap: 6px; min-width: 0; }
.mega-name { font-size: calc(16px * var(--fs)); cursor: pointer; }
.mega-gain { font-size: calc(22px * var(--fs)); font-weight: 800; color: var(--coin-ink, var(--text)); }
.mega-subs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.mega-subs .chip small { color: var(--muted); margin-left: 4px; }
.mega-idle { margin-top: 16px; padding: 14px 18px; }
.mega-idle summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: calc(13px * var(--fs)); font-weight: 600; }
.mega-idle summary::-webkit-details-marker { display: none; }
.mega-idle summary::before { content: "▸"; transition: transform .15s; }
.mega-idle[open] summary::before { transform: rotate(90deg); }
.mega-idle[open] .mega-subs { margin-top: 12px; }
@media (max-width: 860px) {
  .eco-hero { grid-template-columns: 1fr 1fr; }
  .eco-hero .eco-stat.main { grid-column: 1 / -1; }
  .eco-strip .eco-stat { flex: 1 1 140px; }
  .eco-strip .chips { margin-left: 0; width: 100%; }
  .tile-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .mega-card { grid-template-columns: 90px 1fr; }
  .mega-radar { width: 90px; height: 90px; }
}

/* Boosters : plus de boosters en réserve */
.out-of-packs { display: grid; gap: 6px; padding: 14px 16px; border-radius: 14px; text-align: center; justify-items: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), color-mix(in srgb, var(--r-legendary) 10%, var(--surface)));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border)); }
.out-of-packs b { display: flex; align-items: center; gap: 6px; }
.out-of-packs .text-2 { font-size: calc(13px * var(--fs)); }
.out-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.raffle-locked-title { margin-top: 28px; }
/* Transports : un sous-onglet par type (aéroports, ports, gares) */
.kind-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.kind-tab { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 14px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--text-2); font: inherit; font-weight: 700; }
.kind-tab .num { font-weight: 700; padding: 1px 8px; border-radius: 99px; background: var(--surface-2); }
.kind-tab:hover { border-color: var(--line-strong, var(--muted)); }
.kind-tab.active { color: var(--text); background: var(--surface-2); }
.kind-tab.active.k-air { border-color: #5b8cff; box-shadow: 0 0 0 3px rgba(91,140,255,.18); }
.kind-tab.active.k-sea { border-color: #2ec4b6; box-shadow: 0 0 0 3px rgba(46,196,182,.18); }
.kind-tab.active.k-rail { border-color: #f5a524; box-shadow: 0 0 0 3px rgba(245,165,36,.18); }
@media (max-width: 560px) {
  .kind-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .kind-tab { padding: 6px; gap: 6px; justify-content: center; font-size: 13px; }
  .kind-tab .hub-dot { width: 22px; height: 22px; }
  .kind-tab .num { padding: 0 6px; }
}
/* Administration : mode admin (outils de test sur le compte de l'administrateur) */
.admin-mode { margin-bottom: 16px; }
.admin-mode.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.admin-mode .setting { border: 0; padding: 0; }
.admin-mode-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-weight: 650; }
