/**
 * KARTING OBERLIN MOBILE APP — STYLE SYSTEM V2
 * Palette : Noir Profond (#080c14), Bleu Électrique (#2563eb / #3b82f6) et Jaune Racing (#facc15 / #fde047)
 * Conforme au style du site kart-oberlin.com et du dashboard kartoberlin.tepra-services.fr
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&family=Space+Grotesk:wght@500;700&display=swap');

:root {
  /* Fond Sombre & Ardoise Karting */
  --bg-main: #080c14;
  --bg-surface: #0f172a;
  --bg-surface-hover: #1e293b;
  --bg-card: rgba(17, 24, 39, 0.85);
  --bg-card-header: #172033;
  --bg-glass: rgba(15, 23, 42, 0.75);

  /* Bleu Électrique Officiel */
  --primary: #2563eb;
  --primary-light: #3b82f6;
  --primary-hover: #1d4ed8;
  --primary-glow: rgba(37, 99, 235, 0.35);
  --primary-bg: rgba(37, 99, 235, 0.12);

  /* Jaune Racing Officiel (Karting Oberlin) */
  --accent-yellow: #facc15;
  --accent-yellow-light: #fde047;
  --accent-yellow-hover: #eab308;
  --accent-yellow-glow: rgba(250, 204, 21, 0.35);
  --accent-yellow-bg: rgba(250, 204, 21, 0.12);

  /* Accents Secondaires */
  --racing-red: #ef4444;
  --racing-green: #22c55e;
  --racing-cyan: #06b6d4;

  /* Typographie */
  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-highlight: #ffffff;

  /* Bordures & Ombres */
  --border-color: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.14);
  --border-blue: rgba(59, 130, 246, 0.4);
  --border-yellow: rgba(250, 204, 21, 0.4);

  /* Polices */
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'Space Grotesk', monospace;

  /* Rayons & Hauteurs */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --nav-height: 70px;
}

/* Reset de base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

/* Scrollbar ultra-propre, moderne et discrète */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 99px;
  transition: background 0.2s ease;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(250, 204, 21, 0.6);
}

html, body {
  min-height: 100%;
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  background: radial-gradient(circle at 50% 0%, #172554 0%, #080c14 65%);
  background-attachment: fixed;
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 16px);
  user-select: none;
  -webkit-user-select: none;
}

/* App Container */
.app-container {
  max-width: 600px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .app-container {
    max-width: 900px;
    padding: 0 16px;
  }
}

/* =========================================================================
   HEADER STICKY BLEU & JAUNE RACING
   ========================================================================= */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 12px 16px;
  background: rgba(8, 12, 20, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-blue);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo-img {
  height: 38px;
  width: auto;
  max-width: 130px;
  object-fit: contain;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  text-transform: uppercase;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-badge-yellow {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--accent-yellow);
  color: #080c14;
  letter-spacing: 0.5px;
}

.brand-status-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.status-dot-green {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--racing-green);
  box-shadow: 0 0 8px var(--racing-green);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-header-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s ease;
}

.btn-header-icon:active {
  transform: scale(0.92);
  background: rgba(37, 99, 235, 0.2);
}

.btn-notif-bell {
  position: relative;
  border-color: rgba(250, 204, 21, 0.3);
  transition: all 0.2s ease;
}

.btn-notif-bell.is-granted {
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.notif-badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.62rem;
  min-width: 17px;
  height: 17px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6), 0 0 8px rgba(239, 68, 68, 0.7);
  border: 1.5px solid #080c14;
  z-index: 2;
  pointer-events: none;
  animation: notifBadgePop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes notifBadgePop {
  0% { transform: scale(0); }
  80% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

.notif-badge-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-yellow);
  box-shadow: 0 0 8px var(--accent-yellow);
  transition: all 0.3s ease;
}

.notif-badge-dot.active {
  background: #10b981;
  box-shadow: 0 0 10px #10b981, 0 0 4px #fff;
  animation: pulseGreen 2s infinite ease-in-out;
}

.notif-badge-dot.denied {
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

@keyframes pulseGreen {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 6px #10b981;
  }
  50% {
    transform: scale(1.25);
    box-shadow: 0 0 12px #10b981, 0 0 6px #34d399;
  }
}

/* =========================================================================
   PAGE D'ACCUEIL : LES 3 GRANDES OPTIONS
   ========================================================================= */
.main-content {
  flex: 1;
  padding: 16px;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.2s ease forwards;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero Bannière Accueil */
.home-hero-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 58, 138, 0.35));
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-xl);
  padding: 20px 18px;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

.home-hero-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(250, 204, 21, 0.08));
  pointer-events: none;
}

.hero-subtitle-tag {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent-yellow);
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.hero-main-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1.25;
  color: #fff;
  margin-bottom: 6px;
}

.hero-main-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* LES 3 GRANDES CARTES D'ACCUEIL */
.home-menu-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 22px;
}

.home-choice-card {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 16px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.home-choice-card:active {
  transform: scale(0.97);
}

.home-choice-card:hover {
  border-color: var(--border-light);
  background: rgba(22, 33, 54, 0.95);
}

/* Variante Option 1 : Nos Promos (Bordure Jaune Racing) */
.card-choice-promos {
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.95), rgba(250, 204, 21, 0.1));
  border-color: rgba(250, 204, 21, 0.35);
}
.card-choice-promos:hover {
  border-color: var(--accent-yellow);
  box-shadow: 0 10px 30px var(--accent-yellow-glow);
}

/* Variante Option 2 : Espace Membre (Bordure Bleu Électrique) */
.card-choice-member {
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.95), rgba(37, 99, 235, 0.15));
  border-color: rgba(59, 130, 246, 0.4);
}
.card-choice-member:hover {
  border-color: var(--primary-light);
  box-shadow: 0 10px 30px var(--primary-glow);
}

/* Variante Option 3 : Actualités */
.card-choice-news {
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.95), rgba(6, 182, 212, 0.1));
  border-color: rgba(6, 182, 212, 0.35);
}
.card-choice-news:hover {
  border-color: var(--racing-cyan);
  box-shadow: 0 10px 30px rgba(6, 182, 212, 0.3);
}

.choice-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.choice-icon-yellow {
  background: linear-gradient(135deg, #facc15, #ca8a04);
  color: #080c14;
}

.choice-icon-blue {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff;
}

.choice-icon-cyan {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  color: #fff;
}

.choice-text-content {
  flex: 1;
  min-width: 0;
}

.choice-title {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
}

.choice-title-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.choice-badge-live {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 99px;
  white-space: nowrap;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  line-height: 1.3;
}

.choice-badge-live.badge-yellow {
  background: rgba(250, 204, 21, 0.16);
  color: var(--accent-yellow);
  border: 1px solid rgba(250, 204, 21, 0.45);
}

.choice-badge-live.badge-blue {
  background: rgba(37, 99, 235, 0.18);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.45);
}

.choice-badge-live.badge-cyan {
  background: rgba(6, 182, 212, 0.16);
  color: #67e8f9;
  border: 1px solid rgba(6, 182, 212, 0.45);
}

.choice-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.choice-arrow-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.home-choice-card:hover .choice-arrow-btn {
  transform: translateX(4px);
  background: var(--accent-yellow);
  color: #080c14;
}

/* =========================================================================
   SECTION 1 : NOS PROMOS (BONS PLANS KART-OBERLIN.COM)
   ========================================================================= */
.section-nav-back {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  cursor: pointer;
  color: var(--accent-yellow);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
}

.promo-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 20px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.promo-card:hover {
  border-color: var(--accent-yellow);
  transform: translateY(-2px);
}

.promo-badge-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(250, 204, 21, 0.15);
  color: var(--accent-yellow);
  border: 1px solid rgba(250, 204, 21, 0.35);
  margin-bottom: 10px;
}

.promo-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 8px;
}

.promo-details-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
}

.promo-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 12px;
}

.promo-price-tag {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--accent-yellow);
  text-shadow: 0 0 10px var(--accent-yellow-glow);
}

.btn-promo-action {
  padding: 8px 16px;
  border-radius: 99px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s ease;
}

.btn-promo-action:hover {
  background: var(--primary-light);
}

/* =========================================================================
   SECTION 2 : ESPACE MEMBRE (APEX TIMING CENTER 221 KIOSK) — INCRUSTATION PLEINE LARGEUR
   ========================================================================= */
body.is-tab-member .app-container,
.app-container:has(#tab-member.active) {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

body.is-tab-member .app-header,
.app-container:has(#tab-member.active) .app-header {
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
}

body.is-tab-member .main-content,
.app-container:has(#tab-member.active) .main-content {
  padding: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
}

body.is-tab-member #tab-member,
.app-container:has(#tab-member.active) #tab-member {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
}

#tab-member .apex-top-bar,
#tab-member #member-guest-intro,
#tab-member .apex-pilot-toolbar,
#tab-member .apex-login-card {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
  box-sizing: border-box;
}

/* Masquer automatiquement l'en-tête de bienvenue quand le pilote est connecté */
#tab-member:has(#member-apex-logged-bar:not([style*="display: none"])) #member-guest-intro {
  display: none !important;
}

/* Barre de navigation pilote ultra-propre et collante sous le header */
/* Barre de navigation pilote ultra-propre et collante sous le header */
.apex-pilot-toolbar {
  position: sticky;
  top: 56px;
  z-index: 95;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 8px 12px;
  margin: 6px auto 10px auto !important;
  max-width: 600px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.55);
}

.pilot-identity-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 7px;
}

.pilot-identity-tags {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: nowrap;
}

.pilot-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
  flex-shrink: 0;
}

.pilot-badge-name {
  font-weight: 900;
  font-size: 0.92rem;
  color: var(--accent-yellow);
  white-space: nowrap;
  letter-spacing: -0.2px;
}

/* N° de carte toujours affiché proprement */
.pilot-badge-card {
  display: inline-flex !important;
  align-items: center;
  font-size: 0.72rem;
  color: #cbd5e1;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
}

/* Bouton / Badge Profil ultra-propre et pro placé juste après le n° de carte */
.btn-pilot-profile-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(59, 130, 246, 0.55);
  color: #38bdf8;
  font-size: 0.73rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.25);
  user-select: none;
}

.btn-pilot-profile-tag:hover {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.45), rgba(250, 204, 21, 0.15));
  border-color: var(--accent-yellow);
  color: var(--accent-yellow);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(250, 204, 21, 0.35);
}

.btn-pilot-profile-tag:active {
  transform: scale(0.95);
}

.profile-tag-icon {
  font-size: 0.78rem;
  line-height: 1;
}

.profile-tag-label {
  white-space: nowrap;
  letter-spacing: -0.1px;
}

.profile-tag-arrow {
  font-size: 0.65rem;
  opacity: 0.75;
  transition: transform 0.2s ease;
}

.btn-pilot-profile-tag:hover .profile-tag-arrow {
  transform: translateX(2px);
  opacity: 1;
}

.pilot-nav-pills {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 1px 0;
}

.pilot-nav-pills::-webkit-scrollbar {
  display: none;
}

@media (max-width: 540px) {
  .apex-pilot-toolbar {
    padding: 8px 10px;
  }
  .pilot-identity-bar {
    gap: 6px;
  }
  .pilot-badge-name {
    font-size: 0.88rem;
  }
  .pilot-badge-card {
    font-size: 0.68rem;
    padding: 2px 5px;
  }
  .btn-pilot-profile-tag {
    font-size: 0.68rem;
    padding: 2px 8px;
    gap: 4px;
  }
  .btn-pilot-nav {
    padding: 5px 8px !important;
    font-size: 0.72rem !important;
    gap: 3px !important;
  }
}

/* État actif pour le bouton Mon Profil */
.btn-pilot-profile-tag.active {
  background: var(--accent-yellow) !important;
  border-color: #fde047 !important;
  color: #080c14 !important;
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.6) !important;
  font-weight: 800 !important;
}

.btn-pilot-profile-tag.active .profile-tag-arrow {
  opacity: 1;
  color: #080c14;
}


.btn-pilot-nav {
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 99px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-pilot-nav:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-pilot-nav.active {
  background: var(--accent-yellow);
  color: #080c14;
  font-weight: 800;
  border-color: var(--accent-yellow);
  box-shadow: 0 2px 10px rgba(250, 204, 21, 0.35);
}

.btn-pilot-nav.btn-pilot-exit {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
  padding: 5px 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-pilot-nav.btn-pilot-exit svg {
  display: block;
  transition: transform 0.2s ease;
}

.btn-pilot-nav.btn-pilot-exit:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
  box-shadow: 0 2px 12px rgba(239, 68, 68, 0.45);
  transform: translateY(-1px);
}

.btn-pilot-nav.btn-pilot-exit:hover svg {
  transform: translateX(1px);
}

.apex-iframe-container {
  width: 100vw !important;
  max-width: 100% !important;
  min-height: 450px !important;
  height: auto !important;
  border-radius: 0 !important;
  border: none !important;
  overflow: visible !important;
  background: #080c14 !important;
  position: relative !important;
  box-shadow: none !important;
  margin: 0 !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 16px) !important;
}

.apex-iframe {
  width: 100% !important;
  min-height: 450px !important;
  height: auto !important;
  border: none !important;
  display: block !important;
}

.apex-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.btn-apex-external {
  padding: 8px 14px;
  border-radius: 99px;
  background: rgba(37, 99, 235, 0.2);
  border: 1px solid var(--border-blue);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

/* CARTE DE CONNEXION OFFICIELLE DE L'APPLICATION */
.apex-login-card {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(8, 12, 20, 0.98));
  border: 1px solid rgba(250, 204, 21, 0.4);
  border-radius: var(--radius-xl);
  padding: 26px 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(37, 99, 235, 0.15);
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
}

.apex-login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-yellow), var(--primary), var(--accent-yellow));
}

.apex-login-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.apex-login-badge-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.2), rgba(37, 99, 235, 0.3));
  border: 1px solid rgba(250, 204, 21, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.apex-login-header-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
}

.apex-login-header-sub {
  font-size: 0.75rem;
  color: var(--accent-yellow);
  margin-top: 2px;
  font-weight: 600;
}

.apex-login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.apex-login-field-group {
  display: flex;
  flex-direction: column;
}

.apex-login-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.apex-login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.apex-login-input-icon {
  position: absolute;
  left: 14px;
  font-size: 1rem;
  color: var(--text-muted);
  pointer-events: none;
}

.apex-login-input {
  width: 100%;
  background: rgba(8, 12, 20, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 12px 14px 12px 42px;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.apex-login-input:focus {
  border-color: var(--accent-yellow);
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.25);
}

.btn-apex-login-main {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-yellow), #eab308);
  color: #080c14;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 900;
  border: none;
  padding: 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(250, 204, 21, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
  margin-top: 6px;
}

.btn-apex-login-main:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(250, 204, 21, 0.5);
}

.btn-apex-login-main:active {
  transform: translateY(1px);
}

/* =========================================================================
   SECTION 3 : ACTUALITÉS (CONNECTÉE BDD / JSON)
   ========================================================================= */
.news-cards-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease;
}

.news-card-img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  background: #0f172a;
}

.news-card-body {
  padding: 16px;
}

.news-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.news-category-badge {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary-light);
  background: rgba(37, 99, 235, 0.15);
  padding: 3px 8px;
  border-radius: 99px;
}

.news-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.news-card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.35;
  margin-bottom: 6px;
}

.news-card-summary {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* =========================================================================
   BARRE DE NAVIGATION DU BAS (THUMB ZONE)
   ========================================================================= */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: calc(var(--nav-height) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(8, 12, 20, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-around;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.7);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px 4px;
  position: relative;
  transition: color 0.2s ease, transform 0.15s ease;
}

.nav-item:active {
  transform: scale(0.92);
}

.nav-icon {
  font-size: 1.35rem;
}

.nav-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.nav-item.active {
  color: var(--accent-yellow);
}

.nav-item.active::after {
  content: '';
  position: absolute;
  top: 0;
  width: 26px;
  height: 3px;
  background: var(--accent-yellow);
  border-radius: 99px;
  box-shadow: 0 0 10px var(--accent-yellow);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 10000000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.open {
  display: flex;
}

.modal-sheet {
  background: #0f172a;
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-xl);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.85);
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: #fff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* =========================================================================
   MODAL : CENTRE DE NOTIFICATIONS PUSH
   ========================================================================= */
.modal-notif-sheet {
  max-width: 480px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: #0b1120;
  border: 1px solid rgba(250, 204, 21, 0.25);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(250, 204, 21, 0.08);
}

.notif-sheet-header {
  margin-bottom: 14px;
  padding-right: 36px;
}

.notif-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notif-title-icon {
  font-size: 1.3rem;
  filter: drop-shadow(0 0 6px rgba(250, 204, 21, 0.5));
}

.notif-sheet-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  letter-spacing: 0.5px;
}

.notif-count-pill {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.7rem;
  padding: 1px 7px;
  border-radius: 99px;
}

.notif-sheet-subtitle {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 4px;
  margin-bottom: 0;
}

/* Barre d'état et actions rapides */
.notif-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  margin-bottom: 12px;
  gap: 8px;
}

.notif-perm-status {
  display: flex;
  align-items: center;
}

.notif-status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #10b981;
}

.notif-status-badge.denied {
  color: #ef4444;
}

.btn-notif-enable-chip {
  background: rgba(250, 204, 21, 0.15);
  color: var(--accent-yellow);
  border: 1px solid rgba(250, 204, 21, 0.35);
  border-radius: 99px;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-notif-enable-chip:hover {
  background: rgba(250, 204, 21, 0.25);
}

.notif-quick-buttons {
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-notif-quick {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-notif-quick:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.btn-notif-quick.danger:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.btn-notif-quick.test:hover {
  background: rgba(250, 204, 21, 0.15);
  border-color: rgba(250, 204, 21, 0.4);
  color: var(--accent-yellow);
}

/* Liste des notifications */
.notif-list-container {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 2px;
  max-height: 55vh;
}

.notif-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.notif-card.is-unread {
  border-color: rgba(59, 130, 246, 0.45);
  background: linear-gradient(135deg, rgba(20, 30, 55, 0.95), rgba(30, 41, 59, 0.9));
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.15);
}

.notif-card.sliding-out {
  transform: translateX(110%);
  opacity: 0;
  pointer-events: none;
  max-height: 0;
  margin: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.notif-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.notif-card-tags {
  display: flex;
  align-items: center;
  gap: 6px;
}

.notif-unread-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 6px #38bdf8;
  display: inline-block;
}

.notif-card-badge {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(37, 99, 235, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(37, 99, 235, 0.3);
}

.notif-card-badge.promo {
  background: rgba(250, 204, 21, 0.15);
  color: #facc15;
  border-color: rgba(250, 204, 21, 0.3);
}

.notif-card-badge.defi {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.notif-card-time {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.notif-card-title {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 4px 0;
}

.notif-card-message {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0 0 10px 0;
  word-break: break-word;
}

.notif-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 8px;
}

.btn-notif-target {
  background: rgba(250, 204, 21, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.3);
  color: var(--accent-yellow);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.72rem;
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-notif-target:hover {
  background: rgba(250, 204, 21, 0.25);
}

.btn-notif-delete {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-notif-delete:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
}

/* État vide */
.notif-empty-state {
  text-align: center;
  padding: 35px 16px;
}

.notif-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
  opacity: 0.6;
}

.notif-empty-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}

.notif-empty-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
  max-width: 300px;
  margin: 0 auto 16px auto;
}

.btn-notif-empty-action {
  background: rgba(250, 204, 21, 0.15);
  color: var(--accent-yellow);
  border: 1px solid rgba(250, 204, 21, 0.4);
  padding: 8px 18px;
  border-radius: 99px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-notif-empty-action:hover {
  background: var(--accent-yellow);
  color: #080c14;
}

/* =========================================================================
   MODAL : INVITATION DEMANDE DE NOTIFICATIONS SMARTPHONE (IPHONE / ANDROID)
   ========================================================================= */
.modal-push-sheet {
  max-width: 420px;
  width: 100%;
  padding: 24px 20px;
  background: linear-gradient(135deg, #0d1527, #070b14);
  border: 1px solid rgba(250, 204, 21, 0.35);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.9), 0 0 35px rgba(250, 204, 21, 0.12);
}

.notif-prompt-icon-wrap {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.2), rgba(37, 99, 235, 0.2));
  border: 2px solid var(--accent-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem;
  margin: 0 auto 12px auto;
  box-shadow: 0 8px 24px rgba(250, 204, 21, 0.25);
  animation: pulse-ring 2.5s infinite;
}

@keyframes pulse-ring {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.4); }
  50% { transform: scale(1.04); box-shadow: 0 0 0 10px rgba(250, 204, 21, 0); }
}

.notif-prompt-title {
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.notif-prompt-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 16px;
}

.notif-prompt-benefits {
  display: flex;
  flex-direction: column;
  gap: 9px;
  text-align: left;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 18px;
}

.notif-benefit-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.benefit-icon {
  font-size: 1.35rem;
  flex-shrink: 0;
}

.benefit-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.benefit-text strong {
  font-size: 0.83rem;
  color: #ffffff;
  font-weight: 700;
}

.benefit-text span {
  font-size: 0.72rem;
  color: #94a3b8;
}

.btn-notif-prompt-confirm {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #facc15, #eab308);
  color: #080c14;
  border: none;
  border-radius: 99px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(250, 204, 21, 0.35);
  transition: all 0.2s ease;
  margin-bottom: 10px;
}

.btn-notif-prompt-confirm:active {
  transform: scale(0.97);
}

.btn-notif-prompt-later {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 0.78rem;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.2s ease;
}

.btn-notif-prompt-later:hover {
  color: #cbd5e1;
}

/* =========================================================================
   SECTION DÉFIS & CHRONOS APEX (TAB-CHALLENGE)
   ========================================================================= */
.challenge-subnav {
  display: flex;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 4px;
  gap: 6px;
  margin-bottom: 16px;
}

.challenge-subnav-btn {
  flex: 1;
  padding: 10px 8px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.challenge-subnav-btn.active {
  background: var(--accent-yellow);
  color: #080c14;
  box-shadow: 0 4px 12px var(--accent-yellow-glow);
}

.challenge-subpane {
  display: none;
  animation: fadeIn 0.25s ease;
}

.challenge-subpane.active {
  display: block;
}

/* Carte Défi Apex */
.challenge-hero-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(37, 99, 235, 0.2));
  border: 1px solid rgba(250, 204, 21, 0.4);
  border-radius: var(--radius-xl);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.challenge-target-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(250, 204, 21, 0.15);
  border: 1px solid var(--accent-yellow);
  color: var(--accent-yellow);
  padding: 6px 14px;
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 900;
  margin: 10px 0;
}

.apex-verify-form {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-top: 14px;
}

.form-group-apex {
  margin-bottom: 12px;
}

.form-group-apex label {
  display: block;
  font-size: 0.76rem;
  color: var(--text-secondary);
  font-weight: 700;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.input-apex {
  width: 100%;
  padding: 12px 14px;
  background: rgba(8, 12, 20, 0.85);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.input-apex:focus {
  border-color: var(--accent-yellow);
  box-shadow: 0 0 10px var(--accent-yellow-glow);
}

/* Résultats Challenge */
.challenge-result-card {
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-top: 16px;
  animation: fadeIn 0.3s ease;
}

.challenge-result-card.success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(15, 23, 42, 0.95));
  border: 1px solid #10b981;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.challenge-result-card.failed {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(239, 68, 68, 0.3);
  text-align: center;
}

/* Pass Récompense Ticket */
.reward-ticket {
  background: #080c14;
  border: 2px dashed var(--accent-yellow);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 10px;
  position: relative;
}

.reward-ticket-header {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 6px;
  margin-bottom: 10px;
}

.reward-ticket-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 8px;
}

.reward-ticket-code {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--accent-yellow);
  background: rgba(250, 204, 21, 0.1);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  display: inline-block;
  border: 1px solid rgba(250, 204, 21, 0.3);
}

/* FEUX DE DÉPART F1 (MINI-JEU) */
.f1-gantry {
  display: flex;
  justify-content: center;
  gap: 10px;
  background: #05070c;
  padding: 16px 10px;
  border-radius: var(--radius-xl);
  border: 2px solid #1e293b;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.8), 0 10px 25px rgba(0, 0, 0, 0.5);
  margin-bottom: 16px;
}

.f1-column {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #0b0f19;
  padding: 6px;
  border-radius: var(--radius-md);
  border: 1px solid #1e293b;
}

.f1-light {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #2b1111;
  border: 2px solid #151a28;
  transition: all 0.05s ease;
}

.f1-light.active {
  background: #ff1e27;
  box-shadow: 0 0 18px #ff1e27, 0 0 30px #ff1e27, inset 0 0 8px #fff;
  border-color: #ff8589;
}

.f1-reaction-pad {
  background: linear-gradient(180deg, #131c31, #0a0f1d);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-xl);
  padding: 26px 16px;
  text-align: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition: transform 0.05s ease, border-color 0.15s ease, background 0.15s ease;
  box-shadow: 0 12px 30px rgba(0,0,0,0.6);
  min-height: 170px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.f1-reaction-pad:active {
  transform: scale(0.97);
  background: linear-gradient(180deg, #1e2945, #0e1529);
}

.reaction-timer-big {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--accent-yellow);
  text-shadow: 0 0 15px var(--accent-yellow-glow);
  margin: 6px 0;
}

/* ==========================================================================
   ÉCRAN DE VERROUILLAGE / PWA INSTALL GATE
   Bloque l'accès en navigateur et force l'installation sur l'écran d'accueil
   ========================================================================== */
body.gate-active {
  overflow: hidden !important;
  height: 100vh !important;
}

.pwa-install-gate {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.pwa-gate-backdrop {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 20%, rgba(37, 99, 235, 0.28) 0%, rgba(8, 12, 20, 0.97) 65%, #05080e 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: -1;
}

.pwa-gate-card {
  background: linear-gradient(180deg, rgba(23, 32, 51, 0.96) 0%, rgba(13, 20, 36, 0.98) 100%);
  border: 1px solid rgba(250, 204, 21, 0.35);
  border-radius: 26px;
  padding: 26px 20px 20px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 40px rgba(250, 204, 21, 0.15);
  margin: auto;
  text-align: center;
  color: #f8fafc;
  animation: gateCardPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes gateCardPop {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(15px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.pwa-gate-logo-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 12px;
}

.pwa-gate-logo {
  width: 150px;
  max-width: 80vw;
  height: auto;
  max-height: 85px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(250, 204, 21, 0.5));
  position: relative;
  z-index: 2;
}

.pwa-gate-pulse {
  position: absolute;
  inset: -8px;
  border: 2px solid var(--accent-yellow);
  border-radius: 16px;
  opacity: 0;
  animation: gatePulse 2.2s infinite ease-out;
  z-index: 1;
}

@keyframes gatePulse {
  0% {
    transform: scale(0.85);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.45);
    opacity: 0;
  }
}

.pwa-gate-badge {
  display: inline-block;
  background: linear-gradient(90deg, #facc15, #fde047);
  color: #080c14;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 1px;
  padding: 4px 14px;
  border-radius: 99px;
  margin-bottom: 8px;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(250, 204, 21, 0.3);
}

.pwa-gate-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.pwa-gate-subtitle {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 18px;
}

.pwa-gate-subtitle strong {
  color: #fde047;
}

.pwa-gate-platform {
  margin-bottom: 16px;
}

.pwa-platform-header {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(37, 99, 235, 0.16);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 14px;
  text-align: left;
}

.platform-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.platform-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  color: #ffffff;
}

.platform-sub {
  font-size: 0.74rem;
  color: #93c5fd;
}

.pwa-gate-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.pwa-gate-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 11px 13px;
  font-size: 0.83rem;
  line-height: 1.4;
  color: #e2e8f0;
}

.pwa-gate-step.highlight-step {
  background: rgba(250, 204, 21, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.45);
  color: #ffffff;
}

.step-num {
  background: var(--primary);
  color: #ffffff;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.82rem;
  min-width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 10px var(--primary-glow);
  margin-top: 1px;
}

.highlight-step .step-num {
  background: var(--accent-yellow);
  color: #080c14;
  box-shadow: 0 0 12px var(--accent-yellow-glow);
}

.share-icon-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: rgba(59, 130, 246, 0.25);
  border-radius: 6px;
  font-weight: 900;
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
  margin: 0 2px;
  vertical-align: middle;
}

.add-home-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: rgba(250, 204, 21, 0.2);
  border-radius: 6px;
  font-weight: 900;
  color: #facc15;
  border: 1px solid rgba(250, 204, 21, 0.4);
  margin: 0 2px;
  vertical-align: middle;
}

.pwa-ios-arrow-pointer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px;
  margin-top: 12px;
  background: rgba(37, 99, 235, 0.12);
  border-radius: 12px;
  border: 1px dashed rgba(59, 130, 246, 0.45);
  animation: bounceArrow 1.5s infinite ease-in-out;
}

@keyframes bounceArrow {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(7px);
  }
}

.ios-pointer-text {
  font-size: 0.77rem;
  font-weight: 700;
  color: #93c5fd;
}

.ios-pointer-arrow {
  font-size: 1.3rem;
  line-height: 1;
}

.btn-gate-install-android {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 18px;
  background: linear-gradient(135deg, #facc15, #eab308);
  color: #080c14;
  border: none;
  border-radius: 16px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(250, 204, 21, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-gate-install-android:active {
  transform: scale(0.98);
}

.gate-android-tip {
  font-size: 0.77rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-top: 10px;
  background: rgba(0,0,0,0.3);
  padding: 10px 12px;
  border-radius: 10px;
}

.gate-desktop-qr-box {
  background: #ffffff;
  padding: 12px;
  border-radius: 18px;
  display: inline-block;
  margin: 10px auto;
  box-shadow: 0 12px 30px rgba(0,0,0,0.6);
}

.gate-qr-image {
  width: 180px;
  height: 180px;
  display: block;
}

.gate-desktop-tip {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-top: 8px;
}

.pwa-gate-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-gate-bypass {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.76rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 6px 10px;
  transition: color 0.15s ease;
}

/* Badge 3 petits points iOS / Android */
.dots-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(250, 204, 21, 0.22);
  border: 1px solid rgba(250, 204, 21, 0.5);
  color: #fde047;
  padding: 1px 7px;
  border-radius: 6px;
  font-weight: 900;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  letter-spacing: 1px;
  vertical-align: middle;
  line-height: 1;
}

/* Guide Visuel Photo PWA */
.pwa-visual-guide-box {
  margin: 14px 0 10px;
  text-align: left;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(250, 204, 21, 0.3);
  border-radius: 14px;
  padding: 10px;
}

.visual-guide-header {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--accent-yellow);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.visual-guide-img-wrapper {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #000;
  touch-action: manipulation;
}

.visual-guide-img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.25s ease;
}

.visual-guide-img-wrapper:hover .visual-guide-img {
  transform: scale(1.02);
}

.visual-guide-zoom-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(8, 12, 20, 0.88);
  border: 1px solid rgba(250, 204, 21, 0.45);
  color: #fde047;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 6px;
  backdrop-filter: blur(6px);
  pointer-events: none;
}

/* Mode Zoom Plein Écran de la Photo */
.visual-guide-img-wrapper.is-zoomed {
  position: fixed;
  inset: 12px;
  z-index: 1000000;
  background: rgba(8, 12, 20, 0.98);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-radius: 20px;
  border: 2px solid var(--accent-yellow);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(250, 204, 21, 0.3);
}

.visual-guide-img-wrapper.is-zoomed .visual-guide-img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  transform: none;
}

.visual-guide-img-wrapper.is-zoomed .visual-guide-zoom-badge {
  top: 14px;
  bottom: auto;
  right: 14px;
  font-size: 0.85rem;
  padding: 8px 14px;
  background: #ef4444;
  color: #fff;
  border-color: #f87171;
}

/* ==========================================================================
   DÉSACTIVATION AUTOMATIQUE DU GATE EN MODE AUTONOME / APPLICATION
   Quand l'app est ouverte depuis l'icône de l'écran d'accueil
   ========================================================================== */
/* Modal Lightbox Photo Grand Écran */
.photo-lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 12, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 100000000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  cursor: pointer;
  animation: fadeInLightBox 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInLightBox {
  from { opacity: 0; }
  to { opacity: 1; }
}

.photo-lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-yellow);
  color: #080c14;
  border: none;
  font-size: 1.3rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(250, 204, 21, 0.5);
  z-index: 10;
  transition: transform 0.15s ease;
}

.photo-lightbox-close:active {
  transform: scale(0.92);
}

.photo-lightbox-content {
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: default;
}

.photo-lightbox-img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 16px;
  border: 2px solid rgba(250, 204, 21, 0.45);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.95), 0 0 35px rgba(250, 204, 21, 0.25);
}

.photo-lightbox-caption {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 800;
  color: #fde047;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

/* ==========================================================================
   DÉSACTIVATION AUTOMATIQUE DU GATE EN MODE AUTONOME / APPLICATION
   Quand l'app est ouverte depuis l'icône de l'écran d'accueil
   ========================================================================== */
@media all and (display-mode: standalone) {
  #pwa-install-gate,
  .pwa-install-gate {
    display: none !important;
  }
  body.gate-active {
    overflow: auto !important;
    height: auto !important;
  }
}





