/* ==========================================================================
   MOTORAUTO — refonte v2 (couche finale). Même thèmes, nouvelle identité :
   surfaces plates et nettes, un seul rayon par famille de composants, accent réservé à l'action et à l'état actif,
   en-tête et barre d'onglets ancrés, menu « Moi » unique.
   ========================================================================== */
:root {
  --r-sm: 10px; --r-md: 14px; --r-lg: 20px;
  --bar-h: 64px;                         /* hauteur de la barre d'onglets mobile (hors zone sûre) */
  --head-h: 60px;
  --line: var(--stroke-line);
  --surface-1: var(--bg-surface);
  --surface-2: color-mix(in srgb, var(--bg-elevated) 70%, var(--bg-surface));
  --shadow-card: 0 1px 0 color-mix(in srgb, #fff 4%, transparent) inset, 0 8px 24px -16px rgba(0,0,0,.55);
  --focus: 0 0 0 3px color-mix(in srgb, var(--accent) 38%, transparent);
}
:root[data-theme="carrara-white"], :root[data-theme="silver-arrow"], :root[data-theme="ivory-dune"], :root[data-theme="nordic-frost"],
:root[data-theme="solar-flare"], :root[data-theme="alpine-horizon"], :root[data-theme="rose-gold-gt"], :root[data-theme="mint-speedway"] {
  --shadow-card: 0 1px 2px rgba(20,30,50,.06), 0 8px 24px -16px rgba(20,30,50,.25);
}

/* ---------- socle : lisibilité ---------- */
body { font-size: 16px; line-height: 1.55; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a, button { -webkit-tap-highlight-color: transparent; }
.page-title { font-size: clamp(1.7rem, 4.6vw, 2.8rem); letter-spacing: -.01em; }
.section-title, .section-head h2 { letter-spacing: -.005em; }

/* ---------- en-tête : barre ancrée (plus de pastille flottante) ---------- */
.app-header { padding: 0; pointer-events: auto; background: var(--bg-surface); border-bottom: 1px solid var(--line); padding-top: var(--safe-top); }
.app-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, var(--accent), transparent 55%); opacity: .85; pointer-events: none; }
.header-bar { min-height: var(--head-h); max-width: 1360px; margin: 0 auto; padding: 0 clamp(.75rem, 2.5vw, 1.5rem); background: none !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; gap: .75rem; }
.app-header.scrolled .header-bar { box-shadow: none !important; }
.app-header.scrolled { box-shadow: 0 10px 30px -22px rgba(0,0,0,.7); }
.header-actions { gap: .35rem; }
.icon-btn { border-radius: var(--r-sm); background: transparent; border-color: transparent; }
.icon-btn:hover { background: var(--glow-soft); border-color: transparent; box-shadow: none; transform: none; }
.pilot-chip { border-radius: var(--r-sm); height: 40px; background: var(--surface-2); }
.pilot-chip:hover { box-shadow: none; transform: none; border-color: var(--accent); }
@media (max-width: 999px) {
  .pilot-chip { display: none; }            /* le compte vit dans « Moi » (barre du bas) */
  .header-bar { min-height: 56px; }
}
/* navigation desktop : onglets plats */
.desktop-navigation { background: transparent !important; border: 0 !important; padding: 0; gap: .15rem; }
.nav-glider { display: none; }
.nav-link { height: 40px; border-radius: var(--r-sm); font-weight: 700; }
.nav-link.active { background: var(--glow-soft); color: var(--accent); }
.nav-link.active svg, .nav-link:hover svg { transform: none; }
.nav-me { display: none; }
.pilot-chip.is-here { border-color: var(--accent); color: var(--accent); }

/* ---------- barre d'onglets mobile : ancrée, 5 entrées égales ---------- */
@media (max-width: 999px) {
  body { padding-bottom: calc(var(--bar-h) + var(--safe-bottom)); }
  .mobile-touch-bar {
    left: 0; right: 0; bottom: 0; max-width: none; margin: 0; contain: layout;
    height: calc(var(--bar-h) + var(--safe-bottom)); padding: 0 .25rem var(--safe-bottom);
    grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: stretch;
    border-radius: 0; border: 0; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px -14px rgba(0,0,0,.6);
    background: var(--bg-surface);
  }
  .touch-bar-item { min-height: 0; height: var(--bar-h); margin: 0; padding: 8px 0 6px; gap: 3px; border-radius: 0; font-family: inherit; font-size: .66rem; font-weight: 700; letter-spacing: 0; color: var(--color-muted); background: none; border: 0; cursor: pointer; justify-content: center; }
  .touch-bar-item span { line-height: 1; white-space: nowrap; max-width: 100%; }
  .touch-bar-item svg { width: 24px; height: 24px; transform: none; }
  .touch-bar-item::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); transform: scaleX(0); transition: transform .25s var(--ease-out); }
  .touch-bar-item.active { background: none; color: var(--accent); }
  .touch-bar-item.active::before { transform: scaleX(1); }
  .touch-bar-item.active svg { transform: none; }
  .touch-bar-highlight, .touch-bar-highlight.active { margin-top: 0; min-height: 0; background: none; box-shadow: none; color: var(--color-muted); }
  .touch-bar-highlight.active { color: var(--accent); }
  .touch-bar-highlight svg { color: var(--accent); }
  .touch-bar-item:active { background: var(--glow-soft); }
  .page-wrap { padding-bottom: 2rem; }
  #toast-region { bottom: calc(var(--bar-h) + var(--safe-bottom) + .75rem) !important; }
  .to-top { bottom: calc(var(--bar-h) + var(--safe-bottom) + .75rem); }
}
@media (min-width: 1000px) { .mobile-touch-bar { display: none !important; } }

/* ---------- surfaces & cartes ---------- */
.car-box, .hub-tile, .ribbon-card, .record-line, .cmp-cell, .import-box, .badge-tile, .xp-bar { box-shadow: var(--shadow-card); }
.car-box { border-radius: var(--r-lg); background: var(--surface-1); }
.car-box::before, .car-box::after { display: none; }
.car-box:hover, .car-box:focus-visible { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: var(--shadow-card), 0 18px 36px -24px rgba(0,0,0,.7); transform: translateY(-2px); }
.hub-tile { border-radius: var(--r-lg); }
.hub-tile:hover, .hub-tile:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.ribbon-card { border-radius: var(--r-md); background: var(--surface-2); }
.modal-dialog { border-radius: var(--r-lg); background: var(--surface-1); box-shadow: var(--shadow-pop); }
.modal-dialog::before { height: 2px; }
@media (max-width: 560px) {
  .modal-layer { align-items: flex-end; padding: 0; }
  .modal-dialog { max-width: 100%; border-radius: var(--r-lg) var(--r-lg) 0 0; max-height: 92dvh; padding-bottom: var(--safe-bottom); }
}

/* ---------- boutons & champs : une seule hauteur, un seul rayon ---------- */
.cta-btn, .btn { border-radius: var(--r-md); min-height: 44px; font-weight: 800; }
.btn-ghost { background: var(--surface-2); }
.btn-ghost:hover { box-shadow: none; border-color: var(--accent); }
.chip { min-height: 38px; }
:where(input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea) { border-radius: var(--r-md); }
:where(input, select, textarea):focus-visible { box-shadow: var(--focus); outline: none; border-color: var(--accent); }
.page-tabs { margin-bottom: 1rem; }
.page-tab { font-size: .92rem; }

/* ---------- menu « Moi » ---------- */
.me-layer { position: fixed; inset: 0; z-index: 900; pointer-events: none; }
.me-layer.on { pointer-events: auto; }
.me-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); opacity: 0; transition: opacity .25s; }
.me-layer.on .me-backdrop { opacity: 1; }
.me-sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: min(88dvh, 720px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: .75rem 1rem calc(1.25rem + var(--safe-bottom)); border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--bg-surface); border: 1px solid var(--line); border-bottom: 0; box-shadow: var(--shadow-pop); transform: translateY(100%); transition: transform .3s var(--ease-out); }
.me-layer.on .me-sheet { transform: none; }
.me-grip { display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto .6rem; }
.me-close { position: absolute; top: .6rem; right: .75rem; width: 40px; height: 40px; border: 0; border-radius: var(--r-sm); background: none; color: var(--color-muted); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.me-card { display: flex; align-items: center; gap: .85rem; padding: .5rem 2.5rem .75rem 0; }
.me-card.guest { flex-direction: column; align-items: stretch; padding-right: 0; gap: .75rem; }
.me-avatar { flex: none; width: 52px; height: 52px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--surface-2); border: 2px solid var(--accent); color: var(--accent); }
.me-avatar img { width: 100%; height: 100%; object-fit: cover; }
.me-avatar svg { width: 26px; height: 26px; }
.me-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.me-who b { font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-who small { color: var(--color-muted); }
.me-group { margin-top: .5rem; border-top: 1px solid var(--line); padding-top: .4rem; }
.me-group h3 { margin: .35rem .25rem .2rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--color-muted); font-weight: 800; }
.me-row { display: flex; align-items: center; gap: .8rem; width: 100%; min-height: 50px; padding: .4rem .5rem; border: 0; border-radius: var(--r-sm); background: none; color: var(--color-ink); font: inherit; font-weight: 650; text-align: left; text-decoration: none; cursor: pointer; }
.me-row:hover, .me-row:focus-visible { background: var(--glow-soft); }
.me-row:active { background: var(--glow-soft); }
.me-ico { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: var(--surface-2); color: var(--accent); }
.me-ico svg { width: 19px; height: 19px; }
.me-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.me-chev { flex: none; color: var(--color-muted); font-style: normal; font-size: 1.3rem; line-height: 1; }
.me-badge { flex: none; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--accent); color: var(--on-accent); font-size: .75rem; font-weight: 800; display: grid; place-items: center; }
.me-row.danger { color: #ef4444; }
.me-row.danger .me-ico { color: #ef4444; }
.me-login { width: 100%; }
.me-legal { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin-top: .75rem; padding: .75rem .5rem 0; border-top: 1px solid var(--line); font-size: .8rem; }
.me-legal a { color: var(--color-muted); text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.me-legal a:hover { color: var(--accent); }
body.me-open { overflow: hidden; }
@media (min-width: 1000px) {
  .me-backdrop { background: transparent; }
  .me-sheet { left: auto; right: max(1rem, calc((100vw - 1360px) / 2 + 1rem)); bottom: auto; top: calc(var(--head-h) + var(--safe-top) + .4rem); width: 360px; max-height: calc(100dvh - var(--head-h) - 2rem); border-radius: var(--r-lg); border-bottom: 1px solid var(--line); transform: translateY(-8px) scale(.98); opacity: 0; transition: transform .2s var(--ease-out), opacity .2s; }
  .me-layer.on .me-sheet { transform: none; opacity: 1; }
  .me-grip { display: none; }
}
@media (prefers-reduced-motion: reduce) { .me-sheet, .me-backdrop, .touch-bar-item::before { transition: none; } }

/* boutons principaux : aplat d'accent, ombre discrète */
.cta-btn:not(.btn-ghost):not(.secondary-destructive-btn), .btn:not(.btn-ghost) { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: 0 6px 16px -10px var(--accent); }
.cta-btn:not(.btn-ghost):not(.secondary-destructive-btn):hover, .btn:not(.btn-ghost):hover { filter: brightness(1.08); box-shadow: 0 8px 20px -10px var(--accent); }


/* ==========================================================================
   FLUIDITÉ (Android / tactile) : zéro flou temps réel, zéro couche 3D, zéro animation de fond.
   Les flous (backdrop-filter, blur(80px)), les perspectives sur chaque carte et les animations infinies saturent
   le GPU des téléphones Android : l'écran clignote. Ici tout est opaque et statique.
   ========================================================================== */
.app-header, .mobile-touch-bar, .toolbar-cluster, .modal-layer, .modal-dialog, .notif-panel, .to-top, .toast, .command-search-wrapper, .search-suggestions-dropdown, .badge-hero-pill, .gauge-chip { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.toolbar-cluster { background: var(--bg-surface); }
.modal-layer { background: rgba(0,0,0,.62); }
@media (max-width: 999px), (hover: none), (pointer: coarse) {
  html { scroll-behavior: auto; }
  body { transition: none; }
  .hero-aurora, .hero-streaks, .hero-grid-lines, .scroll-progress, .marquee-track::before { display: none !important; }
  .hero-stage { background: var(--bg-core); }
  .hero-gauge { transform: none !important; transform-style: flat; animation: none; transition: none; }
  .hero-visual { perspective: none; }
  .gauge-chip { transform: none !important; }
  .gauge-ring { animation: none !important; }
  .car-box { transform: none !important; transition: border-color .2s, box-shadow .2s; will-change: auto; }
  .car-box:hover { transform: none !important; }
  .js-reveal #vehicles-grid .car-box:not(.in) { opacity: 1; translate: none; }
  .car-box .car-thumb-wrap img { transition: none !important; transform: none !important; filter: none !important; }
  .tcg, .flip-in, .gauge-needle, .hero-gauge, .car-box { will-change: auto; }
  .pulse-optic, .unread-pip, .streak-chip.blaze, .tcg-pack.ready, .empty-ico, .tcg-skeleton > i { animation: none !important; }
  .tcg-foil, .tcg-holo { mix-blend-mode: normal; }
  [data-reveal], .reveal { opacity: 1 !important; transform: none !important; }
  * { scroll-snap-stop: normal; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ---- fin du « verre » : surfaces opaques partout (le verre translucide + flou était la source du clignotement et de la barre transparente) ---- */
.app-header { background: var(--bg-surface) !important; box-shadow: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.app-header.scrolled { box-shadow: 0 10px 26px -20px rgba(0,0,0,.7) !important; }
.mobile-touch-bar { background: var(--bg-surface) !important; }
.page-box, .feed-item, .event-card, .rank-row, .circuit-card, .chart-box, .dash-card, .cost-card, .comments-box, .history-box, .mini-row,
.mk-card, .mk-form, .club-new, .quiz-card, .play-tile, .game-card, .badge-tile, .streak-chip, .maint-row, .log-row, .cmp-col, .rating-box,
.contest-box, .contest-hero, .pilot-trade, .chal-card, .hub-tile, .hall-card, .photo-card, .hub-card, .profile-card, .notif-panel, .mini-card, .gate-card {
  background: var(--bg-surface) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  border-color: var(--line) !important; box-shadow: var(--shadow-card) !important;
}
body::before { position: absolute; inset: 0 0 auto 0; height: 70vh; max-height: 640px; z-index: -1; pointer-events: none;
  background: radial-gradient(60vmax 40vmax at 8% -10%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 65%); }

/* bandeau des marques : défilement piloté par js/marquee.js (glisser, molette, doigt) */
.brand-marquee.is-scroller { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -ms-overflow-style: none; cursor: grab; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; user-select: none; -webkit-user-select: none; }
.brand-marquee.is-scroller::-webkit-scrollbar { display: none; }
.brand-marquee.is-scroller.grabbing { cursor: grabbing; }
.brand-marquee.is-scroller .marquee-track { animation: none !important; transform: none !important; }
.brand-marquee .marquee-item { touch-action: pan-x pan-y; }

/* ===== Duel v2 ===== */
.duel-pickers { display: grid; grid-template-columns: 1fr auto 1fr; gap: .6rem; align-items: center; }
.duel-slot { position: relative; display: grid; gap: .25rem; text-align: left; padding: .6rem; border-radius: 16px; border: 1px solid var(--stroke-line, rgba(255,255,255,.14)); background: var(--bg-surface, #151a26); color: inherit; cursor: pointer; min-width: 0; transition: border-color .15s, transform .15s; }
.duel-slot:hover { border-color: var(--accent); transform: translateY(-2px); }
.duel-slot img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 10px; display: block; }
.duel-slot b { font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duel-slot small { color: var(--color-muted); font-size: .75rem; }
.duel-slot em { font-style: normal; font-size: .75rem; color: var(--accent); font-weight: 700; }
.duel-slot-tag { position: absolute; top: .9rem; left: .9rem; background: var(--accent); color: #fff; font-weight: 800; width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; z-index: 1; }
.duel-tools { display: flex; gap: .5rem; justify-content: center; margin: .6rem 0; flex-wrap: wrap; }
.duel-opts { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; margin-bottom: .8rem; }
.duel-opts .seg-switch { flex-wrap: wrap; }
.duel-hud > div { display: grid; justify-items: center; gap: .1rem; min-width: 0; }
.duel-gear { font-weight: 800; font-size: .8rem; background: rgba(255,255,255,.1); border-radius: 8px; padding: .05rem .5rem; }
.duel-rpm { display: block; width: 90px; height: 6px; border-radius: 4px; background: rgba(255,255,255,.12); overflow: hidden; }
.duel-rpm u { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #22c55e, #f59e0b 70%, #ef4444); text-decoration: none; }
.duel-row .win { color: #22c55e; font-weight: 800; }
.duel-why { margin: 1rem 0; padding: .9rem 1rem; border-radius: 14px; border: 1px solid var(--stroke-line, rgba(255,255,255,.12)); background: var(--bg-surface, #151a26); }
.duel-why h3 { margin: 0 0 .4rem; font-size: 1rem; } .duel-why ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .35rem; font-size: .9rem; }
.duel-sheet { position: fixed; inset: 0; z-index: 9000; background: rgba(0,0,0,.65); display: flex; align-items: flex-end; justify-content: center; }
.duel-sheet-box { width: min(640px, 100%); max-height: 86vh; display: flex; flex-direction: column; background: var(--bg-surface, #151a26); border-radius: 20px 20px 0 0; border: 1px solid var(--stroke-line, rgba(255,255,255,.14)); }
@media (min-width: 700px) { .duel-sheet { align-items: center; } .duel-sheet-box { border-radius: 20px; } }
.duel-sheet-head { display: flex; gap: .5rem; padding: .8rem; border-bottom: 1px solid var(--stroke-line, rgba(255,255,255,.12)); }
.duel-sheet-head input { flex: 1; min-width: 0; padding: .7rem .9rem; border-radius: 12px; border: 1px solid var(--stroke-line, rgba(255,255,255,.2)); background: transparent; color: inherit; font-size: 1rem; }
.duel-sheet-list { overflow-y: auto; padding: .4rem; display: grid; gap: .25rem; -webkit-overflow-scrolling: touch; }
.duel-opt { display: flex; gap: .7rem; align-items: center; text-align: left; padding: .5rem; border-radius: 12px; border: 0; background: transparent; color: inherit; cursor: pointer; }
.duel-opt:hover, .duel-opt:focus-visible { background: rgba(255,255,255,.08); }
.duel-opt img { width: 64px; height: 42px; object-fit: cover; border-radius: 8px; flex: none; background: #222; }
.duel-opt span { display: grid; min-width: 0; } .duel-opt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .duel-opt small { color: var(--color-muted); }
@media (max-width: 560px) { .duel-pickers { grid-template-columns: 1fr 1fr; gap: .4rem; } .duel-vs { position: absolute; left: 50%; transform: translateX(-50%); z-index: 2; background: var(--bg-surface, #151a26); border-radius: 50%; padding: .3rem; font-size: .8rem; } .duel-pickers { position: relative; } .duel-slot small { font-size: .68rem; } }

.own-badge { display: inline-block; margin-top: .3rem; font-size: .7rem; font-weight: 700; padding: .15rem .5rem; border-radius: 999px; background: rgba(245,158,11,.18); color: #f59e0b; } .own-badge.new { background: rgba(34,197,94,.18); color: #22c55e; }

.sharecar-prev { display: grid; grid-template-columns: 72px 1fr; gap: .1rem .7rem; align-items: center; margin-top: .4rem; } .sharecar-prev img { grid-row: span 2; width: 72px; height: 48px; object-fit: cover; border-radius: 8px; } .sharecar-prev small { color: var(--color-muted); }
.sharecar-dest.on { border-color: var(--accent); background: rgba(239,68,68,.12); }
.chal-daily { margin-bottom: 1.4rem; padding-bottom: 1rem; border-bottom: 1px solid var(--stroke-line, rgba(255,255,255,.12)); }

/* ===== Raretés : Shiny (arc-en-ciel) + couleurs des éditions limitées (Silver, Carbone…) ===== */
.tcg-shiny { --rc: #ff7ad9; --rc2: #5ac8fa; --glow: rgba(255,122,217,.6); }
.tcg-shiny::before { background: linear-gradient(120deg, #ff5f6d, #ffc371, #f7ff7d, #7bffb2, #5ac8fa, #a78bfa, #ff7ad9, #ff5f6d) !important; background-size: 300% 300% !important; animation: shinyflow 6s linear infinite; }
.tcg-shiny .tcg-foil { opacity: .7; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.65) 50%, transparent 70%); }
.tcg-shiny .tcg-holo { opacity: .5; }
.tcg-shiny { box-shadow: 0 12px 30px -10px rgba(255,122,217,.7), 0 0 0 1px rgba(255,255,255,.12) inset; }
.tcg-shiny .tcg-body { background: linear-gradient(180deg, transparent, rgba(30,10,60,.55)); }
@keyframes shinyflow { to { background-position: 300% 0; } }
.tcg-c-silver { --rc: #e5e7eb; --rc2: #374151; --glow: rgba(229,231,235,.5); }
.tcg-c-silver .tcg-body { background: linear-gradient(180deg, transparent, rgba(0,0,0,.7)); }
.tcg-c-silver .tcg-art { filter: grayscale(.35) contrast(1.05); }
.tcg-c-carbon { --rc: #9ca3af; --rc2: #111827; --glow: rgba(156,163,175,.4); }
.tcg-c-carbon::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .14; background: repeating-linear-gradient(45deg, #fff 0 1px, transparent 1px 5px), repeating-linear-gradient(-45deg, #fff 0 1px, transparent 1px 5px); }
.tcg-c-crimson { --rc: #ef4444; --rc2: #450a0a; --glow: rgba(239,68,68,.55); }
.tcg-c-bronze { --rc: #d6955b; --rc2: #5b2f10; --glow: rgba(214,149,91,.5); }
.tcg-c-neon { --rc: #a3e635; --rc2: #0e7490; --glow: rgba(163,230,53,.55); }
.tcg-c-sunset { --rc: #fb7185; --rc2: #7c3aed; --glow: rgba(251,113,133,.55); }
.flip[data-r="shiny"] { --ring: #ff7ad9; } .flip[data-r="shiny"] .flip-back { box-shadow: 0 0 0 2px var(--ring) inset, 0 0 26px -2px var(--ring); }
.tcg-rar-chip.shiny { background: linear-gradient(90deg, #ff5f6d, #ffc371, #7bffb2, #5ac8fa, #a78bfa); color: #111; font-weight: 800; }
@media (hover: none), (max-width: 999px) { .tcg-shiny::before { animation: none; } }

/* ===== Concours (accueil + page) ===== */
.home-contest-card { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem; border-radius: 18px; text-decoration: none; color: inherit; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 22%, var(--bg-surface, #151a26)), var(--bg-surface, #151a26)); transition: transform .15s; }
.home-contest-card:hover { transform: translateY(-2px); }
.home-contest-card > div { display: grid; gap: .15rem; min-width: 0; flex: 1; } .home-contest-card small { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: .7rem; }
.home-contest-card b { font-size: 1.15rem; } .home-contest-card span { color: var(--color-muted); font-size: .85rem; } .home-contest-card em { font-style: normal; font-size: .8rem; color: var(--color-muted); }
.hc-ico { font-size: 2rem; } .hc-go { font-style: normal; font-weight: 800; color: var(--accent); white-space: nowrap; }
@media (max-width: 560px) { .hc-go { display: none; } }
.contest-desc { margin: .3rem 0; }

/* ===== Carte interactive ===== */
#events-map-bar { margin: .6rem 0 0; } .mm-bar { display: flex; gap: .4rem; flex-wrap: wrap; }
.mm-bar .chip { cursor: pointer; opacity: .55; } .mm-bar .chip.on { opacity: 1; border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, transparent); }
.mm.mm-full { position: fixed; inset: 0; z-index: 9500; height: 100dvh; border-radius: 0; } body.mm-lock { overflow: hidden; }
.mm-pin.pilot { border-radius: 50%; width: 30px; height: 30px; top: -15px; left: -15px; background: #0ea5e9; overflow: hidden; } .mm-pin.pilot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mm-ctl button { touch-action: manipulation; }

/* ===== Réglages ===== */
.set-card { display: flex; gap: 1rem; padding: 1rem 1.1rem; margin-bottom: 1rem; border-radius: 16px; border: 1px solid var(--stroke-line, rgba(255,255,255,.12)); background: var(--bg-surface, #151a26); }
.set-card.col { flex-direction: column; gap: .5rem; } .set-card h3 { margin: 0; font-size: 1.05rem; } .set-ico { font-size: 1.8rem; } .set-main { display: grid; gap: .4rem; min-width: 0; }
.set-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .3rem; }
.set-toggles { display: grid; gap: .2rem; }
.set-toggle { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .65rem .2rem; border-bottom: 1px solid var(--stroke-line, rgba(255,255,255,.08)); cursor: pointer; }
.set-toggle:last-child { border-bottom: 0; } .set-toggle span { display: grid; min-width: 0; } .set-toggle small { color: var(--color-muted); }
.set-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.set-sw { flex: none; width: 46px; height: 26px; border-radius: 99px; background: rgba(255,255,255,.18); position: relative; transition: background .2s; }
.set-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; }
.set-toggle input:checked + .set-sw { background: var(--accent); } .set-toggle input:checked + .set-sw::after { transform: translateX(20px); }
.set-toggle input:focus-visible + .set-sw { outline: 2px solid var(--accent); outline-offset: 2px; }
.set-state { margin: .2rem 0; } .set-state.ok { color: #22c55e; }
.set-loc { display: grid; gap: .5rem; max-width: 420px; }
.settings-theme-body { padding: 0; }

/* ===== Point rouge admin ===== */
#nav-me-btn, #touch-me-btn { position: relative; }
body:not([data-admin-todo="0"])[data-admin-todo] #nav-me-btn::after, body:not([data-admin-todo="0"])[data-admin-todo] #touch-me-btn::after { content: ""; position: absolute; top: 6px; right: 14px; width: 10px; height: 10px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 2px var(--bg-base, #0b0f19); }
body:not([data-admin-todo="0"])[data-admin-todo] .page-tab[data-tab="tableau"] { position: relative; }
body:not([data-admin-todo="0"])[data-admin-todo] .page-tab[data-tab="tableau"]::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: .4rem; border-radius: 50%; background: #ef4444; vertical-align: middle; }

/* voiture liée à une fiche du catalogue */
.comm-base { font-size: .82rem; color: var(--color-muted); margin: -.1rem 0 .4rem; }
.comm-base a { color: var(--accent); font-weight: 600; text-decoration: none; }
.comm-base a:hover { text-decoration: underline; }

/* ---- Mon thème (personnalisé) ---- */
.ct-box { padding: 1rem; margin-bottom: 1.4rem; border: 1px solid var(--stroke-line); border-radius: 18px; background: var(--bg-surface); }
.ct-box .theme-family-title { margin-top: 0; }
.ct-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.ct-field { display: flex; flex-direction: column; gap: .35rem; font-size: .8rem; color: var(--color-secondary); }
.ct-field input[type=color] { width: 64px; height: 44px; padding: 0; border: 1px solid var(--stroke-line); border-radius: 12px; background: none; cursor: pointer; }
.ct-preview { flex: 1 1 180px; min-width: 160px; display: flex; align-items: center; gap: .8rem; padding: .7rem 1rem; border: 2px solid; border-radius: 14px; }
.ct-preview b { font-size: 1.4rem; }
.ct-preview span { flex: 1; font-size: .85rem; }
.ct-preview i { font-style: normal; font-weight: 700; font-size: .8rem; padding: .35rem .8rem; border-radius: 999px; }
.ct-note { margin: .7rem 0; font-size: .8rem; color: var(--color-secondary); }
.ct-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.ct-code { flex: 1 1 150px; min-width: 0; padding: .55rem .8rem; border-radius: 12px; border: 1px solid var(--stroke-line); background: var(--bg-core); color: var(--color-ink); font: inherit; font-size: .85rem; }

/* ---- Sorties : À venir / Passés ---- */
.ev-when { margin: .6rem 0 1rem; }
.seg-n:not(:empty) { margin-left: .35rem; padding: .05rem .45rem; border-radius: 999px; font-size: .72rem; background: var(--glow-soft); color: var(--color-ink); }
.ev-month { margin: 1.4rem 0 .6rem; font-size: 1rem; text-transform: capitalize; color: var(--color-ink); display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: baseline; }
.ev-month small { font-size: .78rem; font-weight: 400; color: var(--color-muted); text-transform: none; }

/* ---- Confidentialité groupée ---- */
.priv-group { margin: 1rem 0; padding: .6rem 1rem; border: 1px solid var(--stroke-line); border-radius: 16px; background: var(--bg-surface); }
.priv-group legend { padding: 0 .5rem; font-weight: 700; color: var(--color-ink); }
.social-count.is-hidden { opacity: .6; }
.dnd-times { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: .6rem; color: var(--color-secondary); }
.dnd-times input { margin-left: .4rem; padding: .45rem .6rem; border-radius: 10px; border: 1px solid var(--stroke-line); background: var(--bg-core); color: var(--color-ink); font: inherit; }

/* ---- Squelettes + tirer pour actualiser ---- */
.skel-wrap { display: grid; gap: .7rem; padding: .4rem 0; }
.skel { display: block; border-radius: 10px; background: linear-gradient(100deg, var(--bg-elevated) 30%, color-mix(in srgb, var(--color-ink) 12%, var(--bg-elevated)) 50%, var(--bg-elevated) 70%); background-size: 220% 100%; animation: skelMove 1.3s linear infinite; }
.skel-line { height: 14px; } .skel-block { height: 84px; border-radius: 16px; }
.skel.w60 { width: 60%; } .skel.w80 { width: 80%; } .skel.w40 { width: 40%; }
.ptr { position: fixed; top: env(safe-area-inset-top, 0); left: 50%; transform: translate(-50%, -30px); z-index: 9000; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-elevated); border: 1px solid var(--stroke-line); box-shadow: 0 8px 24px rgba(0,0,0,.25); pointer-events: none; }
.ptr span { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--color-muted); border-top-color: var(--accent); transition: transform .2s; }
.ptr.ready span { border-color: var(--accent); transform: rotate(180deg); }
.ptr.spin span { animation: ptrSpin .7s linear infinite; }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }

/* ---- transmission, boîtes, fiabilité circuit ---- */
.drive-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: .8rem 0 0; }
.drive-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .75rem .3rem .6rem; border-radius: 999px; border: 1px solid var(--stroke-line); background: var(--bg-surface); color: var(--color-ink); font-size: .8rem; font-weight: 700; }
.drive-ic .body { fill: none; stroke: currentColor; stroke-width: 1.6; opacity: .55; }
.drive-ic rect:not(.body):not(.eng) { fill: none; stroke: currentColor; stroke-width: 1.3; opacity: .55; }
.drive-ic rect.on { fill: var(--accent); stroke: var(--accent); opacity: 1; }
.drive-ic .eng { fill: var(--accent); opacity: .5; }
.eng-trans { display: flex; flex-wrap: wrap; gap: .35rem .5rem; align-items: center; margin-top: .6rem; }
.eng-trans-l { color: var(--color-muted); font-size: .78rem; margin-right: .2rem; }
.gear-chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.gear-chip { padding: .15rem .6rem; border-radius: 999px; background: var(--glow-soft); color: var(--color-ink); font-size: .78rem; font-weight: 700; border: 1px solid var(--stroke-line); }
.track-box { padding: 1rem 1.1rem; border-radius: 18px; border: 1px solid var(--stroke-line); background: var(--bg-surface); border-left: 5px solid var(--tv, var(--accent)); }
.track-box.verdict-ideal { --tv: #22c55e; } .track-box.verdict-correct { --tv: #eab308; } .track-box.verdict-watch { --tv: #f97316; } .track-box.verdict-avoid { --tv: #ef4444; } .track-box.verdict-race { --tv: var(--accent); }
.track-head { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; }
.track-badge { padding: .3rem .8rem; border-radius: 999px; font-weight: 800; font-size: .85rem; background: color-mix(in srgb, var(--tv) 22%, transparent); color: var(--color-ink); border: 1px solid var(--tv); }
.track-score { color: var(--color-secondary); font-size: .85rem; } .track-score b { color: var(--color-ink); font-size: 1.1rem; }
.track-sub { margin: .5rem 0; color: var(--color-secondary); font-size: .9rem; }
.track-rates { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin: .7rem 0; }
.track-rates > div { display: grid; gap: .2rem; font-size: .78rem; color: var(--color-muted); }
.rate { color: var(--tv, var(--accent)); letter-spacing: 2px; font-size: .8rem; } .rate i { font-style: normal; opacity: .22; }
.track-note { margin: .4rem 0; color: var(--color-ink); font-size: .92rem; }
.track-legal { margin: .8rem 0 0; font-size: .74rem; line-height: 1.4; color: var(--color-muted); }
@media (max-width: 520px) { .track-rates { grid-template-columns: 1fr; } }
.adm-track { padding: .9rem 1rem; border: 1px dashed var(--stroke-line); border-radius: 16px; }
.adm-drives { display: flex; flex-wrap: wrap; gap: .5rem; }
.chk-pill { position: relative; cursor: pointer; }
.chk-pill input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chk-pill span { display: inline-block; padding: .4rem .85rem; border-radius: 999px; border: 1px solid var(--stroke-line); background: var(--bg-surface); color: var(--color-ink); font-size: .85rem; font-weight: 700; transition: background .2s, border-color .2s; }
.chk-pill input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chk-pill input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.gear-quick { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .4rem; }
.gear-quick-btn { padding: .2rem .6rem; border-radius: 999px; border: 1px dashed var(--stroke-line); background: none; color: var(--color-secondary); font: inherit; font-size: .75rem; cursor: pointer; }
.gear-quick-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ---- brouillon retrouvé ---- */
.draft-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin: 0 0 1rem; padding: .7rem .9rem; border-radius: 14px; border: 1px dashed var(--accent); background: var(--glow-soft); color: var(--color-ink); font-size: .9rem; }
.draft-banner small { color: var(--color-muted); } .draft-banner > span:last-child { display: flex; gap: .4rem; }

/* Tour 22 — éditeur de véhicule en 3 étapes */
.adm-steps [data-step]:not(.step-on) { display: none !important; }
.adm-stepbar { display: flex; gap: .4rem; margin: 0 0 1rem; position: sticky; top: 0; z-index: 3; padding: .3rem 0; background: var(--bg-surface); }
.adm-stepbar button { flex: 1; display: flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: var(--color-secondary); font-weight: 700; font-size: .84rem; }
.adm-stepbar button b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-elevated); font-size: .75rem; }
.adm-stepbar button.on { color: var(--on-accent, #fff); background: var(--accent); border-color: var(--accent); }
.adm-stepbar button.on b { background: rgba(255,255,255,.25); }
@media (max-width: 520px) { .adm-stepbar button span { font-size: .72rem; } }
.adm-stepnav { display: flex; gap: .6rem; margin-top: 1rem; }
.adm-stepnav .cta-btn { flex: 1; }

/* Tour 22 — recherche globale */
#spotlight { position: fixed; inset: 0; z-index: 3000; display: flex; justify-content: center; align-items: flex-start; padding: calc(var(--safe-top, 0px) + 9vh) 12px 12px; background: rgba(8,10,16,.42); opacity: 0; transition: opacity .22s var(--ma-ease-out, ease); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
#spotlight.on { opacity: 1; }
.spot-box { width: min(640px, 100%); max-height: 78dvh; display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; background: color-mix(in srgb, var(--bg-surface) 90%, transparent); border: 1px solid var(--glass-line, var(--line)); box-shadow: 0 30px 70px -20px rgba(0,0,0,.6); transform: translateY(-10px) scale(.98); transition: transform .3s var(--ma-ease, ease); }
#spotlight.on .spot-box { transform: none; }
.spot-field { display: flex; align-items: center; gap: .6rem; padding: .85rem 1rem; border-bottom: 1px solid var(--line); }
.spot-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--color-ink); font-size: 1rem; }
.spot-x { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--bg-elevated); color: inherit; font-size: 1.2rem; }
.spot-list { overflow-y: auto; overscroll-behavior: contain; padding: .3rem .4rem .6rem; }
.spot-grp { padding: .6rem .7rem .2rem; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--color-muted); }
.spot-item { display: flex; align-items: center; gap: .75rem; padding: .55rem .7rem; border-radius: 14px; color: inherit; text-decoration: none; }
.spot-item.on, .spot-item:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.spot-item img, .spot-noimg { width: 52px; height: 36px; object-fit: cover; border-radius: 8px; flex: none; background: var(--bg-elevated); }
.spot-item img.round { width: 38px; height: 38px; border-radius: 50%; }
.spot-item span { display: flex; flex-direction: column; min-width: 0; }
.spot-item small { color: var(--color-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spot-hint { padding: 1.2rem 1rem; text-align: center; color: var(--color-secondary); }
.cmp-cell.txt b { font-size: .82rem; line-height: 1.25; }

/* Tour 22 — fiche voiture en onglets */
.sheet-tabbed [data-tab]:not(.tab-on) { display: none !important; }
.sheet-tabs { display: flex; gap: .3rem; padding: .3rem; margin: .4rem 0 1rem; border-radius: 16px; background: var(--bg-elevated); position: sticky; top: calc(var(--safe-top, 0px) + 4px); z-index: 4; overflow-x: auto; scrollbar-width: none; }
.sheet-tabs::-webkit-scrollbar { display: none; }
.sheet-tabs button { flex: 1 0 auto; min-height: 42px; padding: 0 1rem; border: 0; border-radius: 12px; background: transparent; color: var(--color-secondary); font-weight: 700; transition: background .25s var(--ma-ease, ease), color .25s; }
.sheet-tabs button[aria-selected="true"] { background: var(--accent); color: var(--on-accent, #fff); }
.sheet-tabbed .tab-on { animation: sheetTabIn .28s var(--ma-ease-out, ease) both; }
@keyframes sheetTabIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Tour 22 — fenêtre de signalement */
#report-sheet { position: fixed; inset: 0; z-index: 3200; display: flex; align-items: flex-end; justify-content: center; padding: 12px; background: rgba(8,10,16,.45); opacity: 0; transition: opacity .2s; }
#report-sheet.on { opacity: 1; }
.rp-box { width: min(420px, 100%); display: grid; gap: .5rem; padding: 1rem; border-radius: 22px; background: color-mix(in srgb, var(--bg-surface) 92%, transparent); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border: 1px solid var(--glass-line, var(--line)); transform: translateY(24px); transition: transform .3s var(--ma-ease, ease); padding-bottom: calc(1rem + var(--safe-bottom, 0px)); }
#report-sheet.on .rp-box { transform: none; }
.rp-box p { margin: 0 0 .3rem; color: var(--color-secondary); font-size: .88rem; }
.rp-box button { display: flex; align-items: center; gap: .7rem; min-height: 48px; padding: 0 1rem; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-elevated); color: inherit; font-weight: 700; text-align: left; }
.rp-box .rp-cancel { justify-content: center; background: transparent; color: var(--color-secondary); }
@media (min-width: 700px) { #report-sheet { align-items: center; } }
.photo-card { position: relative; }
.photo-flag { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(0,0,0,.5); color: #fff; opacity: .8; }
.pub-challenge { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .8rem 0; }

/* Tour 22 — clubs : calendrier, classement, annonces épinglées */
.club-plus { margin: 1rem 0; padding: 1rem; border-radius: 18px; background: color-mix(in srgb, var(--bg-surface) 70%, transparent); border: 1px solid var(--glass-line, var(--line)); }
.cev { display: flex; gap: .8rem; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.cev-date { flex: none; width: 52px; text-align: center; padding: .35rem 0; border-radius: 12px; background: var(--bg-elevated); display: grid; }
.cev-date b { font-size: 1.2rem; line-height: 1; }
.cev-main { flex: 1; min-width: 0; display: grid; gap: .1rem; }
.cev-main small { color: var(--color-secondary); }
.cev-act { display: flex; gap: .4rem; align-items: center; }
.cev-form { display: grid; gap: .5rem; margin-top: .8rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.cev-form input { min-height: 44px; padding: 0 .8rem; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-elevated); color: inherit; }
.club-rank { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .3rem; }
.club-rank li { display: grid; grid-template-columns: 28px 1fr auto auto; gap: .6rem; align-items: center; padding: .45rem .6rem; border-radius: 12px; background: var(--bg-elevated); }
.club-rank .rk { font-weight: 800; color: var(--accent); }
.club-rank small { color: var(--color-muted); }
.seg-mini { margin-top: .4rem; }
.seg-mini button { min-height: 38px; padding: 0 .9rem; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: inherit; font-weight: 700; }
.seg-mini button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent, #fff); border-color: var(--accent); }
.feed-item.pinned { border-color: var(--accent) !important; }
.pin-tag { font-style: normal; font-size: .72rem; font-weight: 800; color: var(--accent); }

/* Tour 22 — statistiques admin */
.admin-stats { margin-top: 1.5rem; }
.stat-bars { display: flex; align-items: flex-end; gap: 4px; height: 90px; margin: .8rem 0; }
.stat-bars i { flex: 1; height: var(--h); min-height: 3px; border-radius: 4px 4px 0 0; background: var(--accent); opacity: .85; }
.stat-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.stat-cols ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.stat-cols li { display: flex; justify-content: space-between; gap: .6rem; padding: .35rem .6rem; border-radius: 10px; background: var(--bg-elevated); }
.stat-cols h4 { margin: .2rem 0 .5rem; }

/* Tour 22.4 — concours : la légende ne recouvre plus le nom de la voiture */
.photo-card .photo-cap { position: static; background: none; color: var(--color-secondary); padding: 0 .9rem .7rem; font-size: .8rem; }
.photo-meta { flex-wrap: wrap; }
.photo-meta small { white-space: normal; }
