/* ═══════════════════════════════════════════════════════════════
   TOKENS
   ═══════════════════════════════════════════════════════════════ */
:root {
  /* Palette brand — Passal-Ma */
  --orange:       #E8560A;
  --orange-dark:  #c44508;
  --green:        #28C244;
  --green-dark:   #1A8A2C;
  --green-50:     #f0faf3;
  --green-100:    #d6eedc;
  --navy:         #0F4C23;
  --navy-800:     #1A6935;
  --navy-900:     #083318;
  --gold:         #f9b233;
  --red:          #c0392b;

  /* Surfaces */
  --bg:           #f2f5f3;
  --surface:      #ffffff;
  --surface-2:    #f8faf9;
  --text:         #0d1117;
  --text-2:       #2d3a3f;
  --muted:        #667c72;
  --border:       #e0e8e3;
  --border-2:     #c4d2cb;

  /* Shape */
  --radius:       16px;
  --radius-sm:    10px;
  --radius-xs:    6px;
  --radius-pill:  999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow:    0 1px 4px rgba(0,0,0,0.04), 0 6px 20px rgba(0,0,0,0.06);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.06), 0 14px 36px rgba(0,0,0,0.09);
  --shadow-lg: 0 8px 16px rgba(0,0,0,0.05), 0 28px 64px rgba(0,0,0,0.13);

  /* Misc */
  --max-w:     1100px;
  --t:         0.18s cubic-bezier(0.4,0,0.2,1);
  --transition: var(--t); /* alias */
}

/* ═══════════════════════════════════════════════════════════════
   BASE
   ═══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--green-dark); }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.22; letter-spacing: -0.025em; }
h2 { letter-spacing: -0.02em; }

/* ═══════════════════════════════════════════════════════════════
   HEADER — fond blanc, logo vert visible
   ═══════════════════════════════════════════════════════════════ */
.app-header {
  background: #ffffff;
  color: var(--navy);
  padding: 0 1.75rem;
  height: 68px;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  position: sticky; top: 0; z-index: 100;
  border-bottom: 2px solid var(--green-100);
  box-shadow: 0 2px 20px rgba(15,76,35,0.08);
}

.brand {
  display: flex; align-items: center; text-decoration: none; flex-shrink: 0;
  transition: opacity var(--t);
}
.brand:hover { opacity: 0.85; text-decoration: none; }
.brand-logo-full {
  height: 44px; width: auto; max-width: 160px;
  object-fit: contain; display: block;
}

.main-nav { display: flex; gap: 0.2rem; align-items: center; }
.main-nav a, .main-nav .link-btn {
  color: var(--navy);
  padding: 0.44rem 0.95rem;
  border-radius: var(--radius-sm);
  background: transparent; border: none; cursor: pointer;
  font-size: 0.875rem; font-weight: 600;
  font-family: inherit;
  transition: color var(--t), background var(--t);
  letter-spacing: 0.01em;
}
.main-nav a:hover, .main-nav .link-btn:hover {
  background: var(--green-50);
  color: var(--green-dark);
  text-decoration: none;
}
/* Déconnexion en rouge discret */
#logoutBtn { color: #c0392b !important; }
#logoutBtn:hover { background: #fdecea !important; color: #c0392b !important; }

/* ═══════════════════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════════════════ */
main {
  flex: 1; width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3.5rem;
}

/* Landing page — pas de max-width, pas de padding sur main */
main.lp-main {
  max-width: none;
  padding: 0;
}

.app-footer {
  background: var(--navy-900);
  color: rgba(255,255,255,0.42);
  padding: 2rem 1.25rem 1.75rem;
  text-align: center;
  font-size: 0.82rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.app-footer p { margin: 0.25rem 0; }
.footer-brand {
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 0.75rem;
}
.footer-logo-wrap {
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff;
  border-radius: 14px;
  padding: 8px 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.footer-logo-full {
  height: 40px; width: auto; max-width: 130px;
  object-fit: contain; display: block;
}
.app-footer .muted { color: rgba(255,255,255,0.28); }

/* ═══════════════════════════════════════════════════════════════
   HERO (pages internes)
   ═══════════════════════════════════════════════════════════════ */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-800) 55%, #0a4c1e 100%);
  color: #fff;
  padding: 2.2rem 1.8rem;
  border-radius: var(--radius);
  margin-bottom: 1.75rem;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-md);
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 85% 15%, rgba(26,138,44,0.22) 0%, transparent 55%),
    radial-gradient(circle at 15% 85%, rgba(232,86,10,0.07) 0%, transparent 45%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.hero h1 { margin: 0 0 0.45rem; font-size: 1.85rem; font-weight: 800; }
.hero p  { margin: 0; opacity: 0.86; font-size: 1rem; }

/* ═══════════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════════ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: box-shadow var(--t);
}
.card h2 { margin: 0 0 0.9rem; font-size: 1.1rem; font-weight: 700; }
.card h3 { margin: 0 0 0.45rem; font-size: 1rem; font-weight: 600; }

.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* ═══════════════════════════════════════════════════════════════
   BOUTONS
   ═══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: #fff;
  border: none;
  padding: 0.62rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 600;
  cursor: pointer; user-select: none;
  font-family: inherit;
  transition: opacity var(--t), box-shadow var(--t), transform var(--t);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 2px 8px rgba(18,96,32,0.2);
}
.btn:hover {
  opacity: 0.92;
  box-shadow: 0 2px 10px rgba(18,96,32,0.28), 0 4px 18px rgba(18,96,32,0.16);
  transform: translateY(-1px);
  text-decoration: none;
  color: #fff;
}
.btn:active { transform: scale(0.97); opacity: 1; }

.btn.secondary {
  background: var(--surface); color: var(--green);
  border: 1.5px solid var(--green);
  box-shadow: none;
}
.btn.secondary:hover { background: var(--green-50); box-shadow: none; }

.btn.danger {
  background: linear-gradient(135deg, #e04040 0%, var(--red) 100%);
  box-shadow: 0 2px 8px rgba(192,57,43,0.2);
}
.btn.danger:hover { opacity: 0.9; }

.btn.orange {
  background: linear-gradient(135deg, #f4680f 0%, var(--orange) 100%);
  box-shadow: 0 2px 8px rgba(232,86,10,0.2);
}
.btn.orange:hover { opacity: 0.9; }

.btn.full { width: 100%; }
.btn[disabled] { opacity: 0.42; cursor: not-allowed; box-shadow: none; transform: none; }

.btn-sm { padding: 0.32rem 0.85rem; font-size: 0.8rem; }

.link-btn {
  background: none; border: none; padding: 0;
  color: var(--green); cursor: pointer; font-size: inherit;
  font-family: inherit;
}

/* ═══════════════════════════════════════════════════════════════
   FORMULAIRES
   ═══════════════════════════════════════════════════════════════ */
.field { margin-bottom: 0.9rem; }
.field label {
  display: block; font-size: 0.8rem; margin-bottom: 0.32rem;
  color: var(--muted); font-weight: 600; letter-spacing: 0.01em;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.6rem 0.82rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem; font-family: inherit;
  background: #fff; color: var(--text);
  transition: border-color var(--t), box-shadow var(--t);
  appearance: none; -webkit-appearance: none;
}
.field input::placeholder, .field textarea::placeholder { color: #b8c4bc; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--border-2); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(26,138,44,0.1);
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7785' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.82rem center; padding-right: 2.4rem;
}
.row { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.row > .field { flex: 1 1 200px; margin-bottom: 0; }

/* ═══════════════════════════════════════════════════════════════
   ÉVÉNEMENTS — LISTE
   ═══════════════════════════════════════════════════════════════ */
.event-card {
  padding: 0; overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform var(--t), box-shadow var(--t);
}
.event-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.event-cover {
  width: 100%; aspect-ratio: 16/9;
  object-fit: cover; display: block;
  border-radius: var(--radius) var(--radius) 0 0;
  flex-shrink: 0;
}
.event-cover-placeholder {
  width: 100%; aspect-ratio: 16/9;
  background: linear-gradient(135deg, #1a5c28 0%, var(--navy) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.8rem;
  border-radius: var(--radius) var(--radius) 0 0;
  flex-shrink: 0;
}
.event-card-body { padding: 1rem; display: flex; flex-direction: column; flex: 1; }
.event-card-title { margin: 0 0 0.4rem; font-size: 0.975rem; font-weight: 700; line-height: 1.3; }
.event-card-meta {
  display: flex; flex-wrap: wrap; gap: 0.28rem 0.75rem;
  font-size: 0.79rem; color: var(--muted); margin-bottom: 0.3rem;
}
.event-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem; margin-top: auto; padding-top: 0.65rem; flex-wrap: wrap;
}

/* Event detail banner */
.event-cover-banner {
  width: 100%; max-height: 380px;
  object-fit: cover;
  border-radius: var(--radius);
  display: block; margin: 0.75rem 0;
  box-shadow: var(--shadow-md);
}

/* ═══════════════════════════════════════════════════════════════
   TRANSPORT PAGE
   ═══════════════════════════════════════════════════════════════ */
.tp-header { margin-bottom: 1.5rem; }
.tp-header h1 { margin-bottom: 0.2rem; }

.tp-filter-bar {
  margin-bottom: 1.25rem;
  display: flex; flex-direction: column; gap: 0.85rem;
}
.tp-filter-fields {
  display: grid;
  grid-template-columns: 1fr 1fr 180px;
  gap: 0.75rem;
  align-items: end;
}
.tp-filter-group { display: flex; flex-direction: column; gap: 0.3rem; }
.tp-filter-group label { font-size: 0.8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }

.tp-clear-btn { align-self: flex-start; }

.tp-count { margin: 0 0 0.9rem; font-size: 0.85rem; font-weight: 500; }

.tp-empty {
  grid-column: 1 / -1;
  text-align: center; padding: 3.5rem 1rem;
  color: var(--muted);
}
.tp-empty-icon { font-size: 3rem; margin-bottom: 0.6rem; }
.tp-empty p { margin: 0.2rem 0; }

.lp-trip-card--full { opacity: 0.65; }

@media (max-width: 640px) {
  .tp-filter-fields { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD — STATS
   ═══════════════════════════════════════════════════════════════ */
.stats {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1rem;
  box-shadow: var(--shadow);
  position: relative; overflow: hidden;
  transition: box-shadow var(--t), transform var(--t);
}
.stat:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--green) 0%, var(--green-dark) 100%);
  border-radius: 3px 0 0 3px;
}
.stat .stat-icon { font-size: 1.35rem; margin-bottom: 0.3rem; opacity: 0.88; }
.stat .label {
  font-size: 0.72rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.07em; font-weight: 600; margin-bottom: 0.12rem;
}
.stat .value { font-size: 1.45rem; font-weight: 800; color: var(--green-dark); line-height: 1.15; }
.stat .stat-sub { font-size: 0.72rem; color: var(--muted); margin-top: 0.2rem; }

/* ═══════════════════════════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════════════════════════ */
.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table th {
  background: var(--surface-2); font-weight: 600; color: var(--muted);
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.07em;
  padding: 0.65rem 0.75rem; border-bottom: 1.5px solid var(--border);
  white-space: nowrap;
}
.table td { padding: 0.62rem 0.75rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:hover { background: var(--green-50); }
.table tbody tr:last-child td { border-bottom: none; }

.table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border-radius: var(--radius); border: 1px solid var(--border);
}
.card > .table-wrap { margin: -1.25rem -1.25rem; border: none; border-top: 1px solid var(--border); }

/* ═══════════════════════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════════════════════ */
.toast {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  background: #1a2330; color: #fff;
  padding: 0.72rem 1.4rem;
  border-radius: 12px; font-size: 0.875rem; font-weight: 500;
  z-index: 9998; box-shadow: 0 4px 28px rgba(0,0,0,0.32);
  max-width: 92vw; white-space: nowrap;
  backdrop-filter: blur(6px);
  animation: toast-in 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.toast.error   { background: #8a2a22; }
.toast.success { background: var(--green-dark); }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════
   CHIPS / BADGES
   ═══════════════════════════════════════════════════════════════ */
.chip {
  display: inline-flex; align-items: center;
  padding: 0.2rem 0.65rem; border-radius: var(--radius-pill);
  font-size: 0.71rem; font-weight: 600; letter-spacing: 0.01em;
  background: var(--green-100); color: var(--green-dark);
  white-space: nowrap;
}
.chip.warn   { background: #fceedd; color: #7a5000; }
.chip.danger { background: #fce4e1; color: var(--red); }

/* ═══════════════════════════════════════════════════════════════
   UTILITAIRES
   ═══════════════════════════════════════════════════════════════ */
.muted  { color: var(--muted); }
.center { text-align: center; }
.mt-1   { margin-top: 1rem; }
.mt-2   { margin-top: 2rem; }

.price-tag {
  background: var(--gold); color: #3a2800;
  padding: 0.28rem 0.65rem; border-radius: 6px;
  font-weight: 700; font-size: 0.88rem; white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD — LAYOUT
   ═══════════════════════════════════════════════════════════════ */
.dashboard-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 1.4rem; flex-wrap: wrap; gap: 0.8rem;
}
.dashboard-header h1 { margin: 0 0 0.15rem; font-size: 1.6rem; font-weight: 800; }

.section-title {
  font-size: 0.92rem; font-weight: 700; margin: 0 0 0.9rem;
  color: var(--green-dark); letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 0.45rem;
}

/* ═══════════════════════════════════════════════════════════════
   ACTIONS RAPIDES
   ═══════════════════════════════════════════════════════════════ */
.action-grid {
  display: grid; gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
}
.action-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.45rem; padding: 1.1rem 0.6rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: #fff; text-decoration: none; color: var(--text);
  font-size: 0.875rem; font-weight: 600;
  transition: border-color var(--t), box-shadow var(--t), transform var(--t), background var(--t);
  cursor: pointer;
}
.action-card:hover {
  border-color: var(--green);
  background: var(--green-50);
  box-shadow: 0 4px 14px rgba(26,138,44,0.1);
  transform: translateY(-2px);
  text-decoration: none; color: var(--text);
}
.action-icon  { font-size: 1.75rem; }
.action-label { text-align: center; line-height: 1.25; }

/* ═══════════════════════════════════════════════════════════════
   PROGRESS BAR
   ═══════════════════════════════════════════════════════════════ */
.progress-wrap {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--green-100); border-radius: var(--radius-pill);
  overflow: hidden; min-width: 140px; position: relative; height: 22px;
}
.progress-bar {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, var(--green), var(--green-dark));
  opacity: 0.35; border-radius: var(--radius-pill);
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.progress-wrap span {
  position: relative; font-size: 0.78rem; font-weight: 700;
  z-index: 1; padding: 0 0.5rem; color: var(--green-dark);
}

/* ═══════════════════════════════════════════════════════════════
   LIVE INDICATOR
   ═══════════════════════════════════════════════════════════════ */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.28; transform: scale(0.68); }
}

/* ═══════════════════════════════════════════════════════════════
   SPLASH SCREEN
   ═══════════════════════════════════════════════════════════════ */
#splash {
  position: fixed; inset: 0;
  background: radial-gradient(ellipse 90% 80% at 50% 40%, #1a6935 0%, #083318 70%, #051f10 100%);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; transition: opacity 0.5s ease;
  overflow: hidden;
}
#splash::before {
  content: '';
  position: absolute;
  width: 520px; height: 520px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.06);
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  pointer-events: none;
}
#splash::after {
  content: '';
  position: absolute;
  width: 800px; height: 800px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.03);
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  pointer-events: none;
}
#splash.fade-out { opacity: 0; pointer-events: none; }
.splash-inner {
  text-align: center; position: relative; z-index: 1;
  animation: splash-rise 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.splash-logo-wrap {
  display: flex; align-items: center; justify-content: center;
  background: #ffffff;
  border-radius: 36px;
  width: 160px; height: 160px;
  margin: 0 auto 1.6rem;
  box-shadow:
    0 0 0 10px rgba(255,255,255,0.07),
    0 0 0 24px rgba(255,255,255,0.03),
    0 24px 64px rgba(0,0,0,0.55),
    0 8px 24px rgba(0,0,0,0.35);
  animation: splash-glow 3s ease-in-out infinite;
}
.splash-logo { width: 120px; height: 120px; display: block; object-fit: contain; }
.splash-brand-name {
  color: #ffffff;
  font-size: 1.6rem; font-weight: 800;
  letter-spacing: 0.04em;
  margin: 0 0 0.4rem;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.splash-tagline {
  color: rgba(255,255,255,0.5);
  font-size: 0.72rem; letter-spacing: 0.18em;
  text-transform: uppercase; margin: 0; font-weight: 500;
}
@keyframes splash-rise {
  from { opacity: 0; transform: translateY(28px) scale(0.93); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}
@keyframes splash-glow {
  0%, 100% { box-shadow: 0 0 0 10px rgba(255,255,255,0.07), 0 0 0 24px rgba(255,255,255,0.03), 0 24px 64px rgba(0,0,0,0.55), 0 8px 24px rgba(0,0,0,0.35); }
  50%       { box-shadow: 0 0 0 14px rgba(40,194,68,0.12),  0 0 0 32px rgba(40,194,68,0.05), 0 24px 64px rgba(0,0,0,0.55), 0 8px 24px rgba(0,0,0,0.35); }
}

/* ═══════════════════════════════════════════════════════════════
   PWA UPDATE BANNER
   ═══════════════════════════════════════════════════════════════ */
#sw-update-banner {
  position: fixed;
  bottom: env(safe-area-inset-bottom, 0);
  left: 0; right: 0;
  background: var(--navy);
  color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.88rem 1.25rem;
  z-index: 9999; font-size: 0.875rem;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.22);
  animation: slide-up 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
#sw-update-banner button {
  background: var(--green); color: #fff; border: none;
  border-radius: var(--radius-sm); padding: 0.45rem 1rem;
  font-size: 0.84rem; font-weight: 600; cursor: pointer;
  white-space: nowrap; flex-shrink: 0; font-family: inherit;
}
#sw-update-banner button:hover { background: var(--green-dark); }
@keyframes slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════════
   UPLOAD COVER
   ═══════════════════════════════════════════════════════════════ */
.cover-upload-area {
  position: relative;
  border: 2px dashed var(--green);
  border-radius: var(--radius-sm);
  min-height: 160px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; overflow: hidden;
  transition: background var(--t), border-color var(--t);
  background: var(--surface);
}
.cover-upload-area:hover { background: var(--green-50); border-color: var(--green-dark); }
.upload-hint {
  text-align: center; color: var(--muted);
  font-size: 0.84rem; pointer-events: none; padding: 1rem;
}

/* ═══════════════════════════════════════════════════════════════
   ╔══════════════════════════════════════════╗
   ║          LANDING PAGE                    ║
   ╚══════════════════════════════════════════╝
   ═══════════════════════════════════════════════════════════════ */

/* ── Hero ─────────────────────────────────────────────────────── */
.lp-hero {
  min-height: 90svh;
  background:
    linear-gradient(155deg,
      rgba(8,51,24,0.68) 0%,
      rgba(15,76,35,0.58) 45%,
      rgba(8,51,24,0.72) 100%
    ),
    url('./images/hero-bg.webp') center center / cover no-repeat;
  color: #fff;
  display: flex; align-items: center;
  padding: 5rem 1.5rem 6.5rem;
  text-align: center;
  position: relative; overflow: hidden;
}

/* Decorative concentric rings */
.lp-hero::before {
  content: '';
  position: absolute;
  width: 700px; height: 700px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.04);
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  pointer-events: none;
}
.lp-hero::after {
  content: '';
  position: absolute;
  width: 1100px; height: 1100px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.025);
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  pointer-events: none;
}

.lp-hero-inner {
  position: relative; z-index: 1;
  max-width: 650px; margin: 0 auto;
}

.lp-logo-wrap {
  display: inline-flex; align-items: center; justify-content: center;
  background: #ffffff;
  border-radius: 24px;
  padding: 14px 20px;
  margin: 0 auto 1.75rem;
  box-shadow: 0 8px 40px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.12);
}
.lp-logo {
  width: 120px; height: 120px;
  object-fit: contain;
  display: block;
}

.lp-eyebrow {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: rgba(26,138,44,0.15);
  border: 1px solid rgba(26,138,44,0.3);
  color: rgba(120,220,140,0.95);
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: 0.76rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.35rem;
}

.lp-title {
  font-size: clamp(2.1rem, 7vw, 3.4rem);
  font-weight: 900;
  line-height: 1.06;
  margin: 0 0 1.1rem;
  letter-spacing: -0.04em;
}
.lp-title-accent { color: var(--green); }

.lp-sub {
  font-size: clamp(0.95rem, 2.2vw, 1.05rem);
  color: rgba(255,255,255,0.68);
  margin: 0 auto 2.75rem;
  max-width: 480px;
  line-height: 1.72;
}

.lp-ctas { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; }

.lp-btn-primary {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: linear-gradient(135deg, #20a035 0%, var(--green) 50%, var(--green-dark) 100%);
  color: #fff;
  padding: 0.9rem 2.1rem; border-radius: var(--radius-pill);
  font-size: 1rem; font-weight: 700; text-decoration: none;
  box-shadow: 0 4px 28px rgba(26,138,44,0.48), 0 0 0 1px rgba(26,138,44,0.22);
  transition: transform var(--t), box-shadow var(--t), opacity var(--t);
}
.lp-btn-primary:hover {
  opacity: 0.92; transform: translateY(-2px);
  box-shadow: 0 6px 36px rgba(26,138,44,0.55), 0 0 0 1px rgba(26,138,44,0.3);
  text-decoration: none; color: #fff;
}

.lp-btn-navy {
  background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy) 50%, var(--navy-900) 100%) !important;
  box-shadow: 0 4px 28px rgba(27,42,74,0.5), 0 0 0 1px rgba(27,42,74,0.25) !important;
}
.lp-btn-navy:hover {
  box-shadow: 0 6px 36px rgba(27,42,74,0.6), 0 0 0 1px rgba(27,42,74,0.35) !important;
}

.lp-btn-ghost {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.88);
  border: 1.5px solid rgba(255,255,255,0.2);
  padding: 0.9rem 1.65rem; border-radius: var(--radius-pill);
  font-size: 0.95rem; font-weight: 500; text-decoration: none;
  backdrop-filter: blur(8px);
  transition: background var(--t), border-color var(--t);
}
.lp-btn-ghost:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.38);
  color: #fff; text-decoration: none;
}

/* Scroll hint */
.lp-scroll-hint {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.28);
  font-size: 1.4rem; line-height: 1;
  animation: lp-bounce 2.2s ease-in-out infinite;
  z-index: 2;
}
@keyframes lp-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ── Trust strip ──────────────────────────────────────────────── */
.lp-trust {
  background: var(--navy-900);
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  position: relative; z-index: 2;
  padding: 1rem 1.25rem;
}
.lp-trust-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  gap: 2rem; flex-wrap: wrap;
}
.lp-trust-item {
  display: flex; align-items: center; gap: 0.45rem;
  font-size: 0.8rem; color: rgba(255,255,255,0.46);
  font-weight: 500;
}
.lp-trust-item span:first-child { font-size: 0.95rem; opacity: 0.65; }

/* ── Sections générales ───────────────────────────────────────── */
.lp-section {
  max-width: var(--max-w);
  margin: 4.5rem auto 0;
  padding: 0 1.25rem;
}
.lp-section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.4rem;
}
.lp-section-head h2 { margin: 0; font-size: 1.45rem; font-weight: 800; }
.lp-see-all {
  color: var(--green); font-weight: 600; font-size: 0.84rem;
  text-decoration: none; display: inline-flex; align-items: center; gap: 0.2rem;
}
.lp-see-all:hover { color: var(--green-dark); text-decoration: none; }
.lp-empty { text-align: center; padding: 3rem 0; color: var(--muted); }

/* ── Event cards ──────────────────────────────────────────────── */
.lp-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 1.1rem;
}
.lp-event-card {
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow); overflow: hidden;
  text-decoration: none; color: var(--text);
  transition: transform var(--t), box-shadow var(--t);
}
.lp-event-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); text-decoration: none; }
.lp-event-img { width: 100%; aspect-ratio: 3/2; object-fit: cover; display: block; }
.lp-event-thumb {
  width: 100%; aspect-ratio: 3/2;
  background: linear-gradient(135deg, #1a5c28 0%, var(--navy) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
}
.lp-event-body { padding: 1rem; flex: 1; display: flex; flex-direction: column; gap: 0.3rem; }
.lp-event-name { font-weight: 700; font-size: 0.9rem; line-height: 1.3; }
.lp-event-meta { display: flex; flex-direction: column; gap: 0.12rem; font-size: 0.76rem; color: var(--muted); }
.lp-event-price { font-size: 0.82rem; color: var(--green-dark); font-weight: 700; margin-top: auto; padding-top: 0.4rem; }

/* ── Trip cards ───────────────────────────────────────────────── */
.lp-section--transport { margin-top: 3.5rem; }

.lp-trips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.lp-trip-card {
  display: flex; flex-direction: column; gap: 0.6rem;
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border);
  border-left: 4px solid var(--navy);
  box-shadow: var(--shadow); padding: 1.1rem 1.2rem;
  text-decoration: none; color: var(--text);
  transition: transform var(--t), box-shadow var(--t);
}
.lp-trip-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); text-decoration: none; }

.lp-trip-route {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 1rem; font-weight: 800;
}
.lp-trip-city { color: var(--navy); }
.lp-trip-arrow { color: var(--muted); font-size: 0.8rem; }

.lp-trip-meta {
  display: flex; flex-direction: column; gap: 0.15rem;
  font-size: 0.76rem; color: var(--muted);
}

.lp-trip-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: auto; padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}
.lp-trip-price { font-size: 1.05rem; font-weight: 800; color: var(--green-dark); }
.lp-trip-seats { font-size: 0.78rem; font-weight: 600; color: var(--green); background: var(--green-50); padding: 0.15rem 0.5rem; border-radius: 99px; }
.lp-trip-seats--full { color: var(--red); background: #fdecea; }

/* ── Features section ─────────────────────────────────────────── */
.lp-features-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 4.5rem 0 0;
  padding: 4rem 0;
}
.lp-features-section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.lp-features-section h2 {
  text-align: center; font-size: 1.5rem; font-weight: 800;
  margin: 0 0 0.55rem;
}
.lp-sub-heading {
  text-align: center; color: var(--muted); font-size: 0.95rem;
  margin: 0 auto 2.75rem; max-width: 360px; line-height: 1.65;
}
.lp-features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.1rem;
}
.lp-feat {
  display: flex; flex-direction: column; gap: 0.85rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.2rem;
  transition: box-shadow var(--t), transform var(--t);
}
.lp-feat:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.lp-feat-icon {
  width: 46px; height: 46px; border-radius: 13px;
  background: var(--green-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0;
}
.lp-feat strong { display: block; font-size: 0.9rem; font-weight: 700; margin-bottom: 0.18rem; }
.lp-feat p { margin: 0; font-size: 0.8rem; color: var(--muted); line-height: 1.55; }

/* ── Pro CTA ──────────────────────────────────────────────────── */
.lp-pro {
  max-width: var(--max-w);
  margin: 4.5rem auto 4rem;
  padding: 0 1.25rem;
}
.lp-pro-inner {
  background: linear-gradient(140deg, var(--navy) 0%, var(--navy-900) 100%);
  border-radius: var(--radius);
  padding: 2.5rem 2.5rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.lp-pro-inner::before {
  content: '';
  position: absolute;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(26,138,44,0.14) 0%, transparent 70%);
  right: -80px; top: -120px;
  pointer-events: none;
}
.lp-pro-inner::after {
  content: '';
  position: absolute;
  width: 250px; height: 250px; border-radius: 50%;
  background: radial-gradient(circle, rgba(232,86,10,0.08) 0%, transparent 70%);
  left: -50px; bottom: -60px;
  pointer-events: none;
}
.lp-pro-text { position: relative; z-index: 1; }
.lp-pro-inner h3 { margin: 0 0 0.45rem; color: #fff; font-size: 1.25rem; font-weight: 800; }
.lp-pro-inner p  { margin: 0; color: rgba(255,255,255,0.52); font-size: 0.875rem; max-width: 360px; line-height: 1.6; }
.lp-pro-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: linear-gradient(135deg, #f4680f 0%, var(--orange) 100%);
  color: #fff; padding: 0.85rem 1.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.92rem; font-weight: 700; text-decoration: none; white-space: nowrap;
  box-shadow: 0 4px 24px rgba(232,86,10,0.42);
  transition: transform var(--t), box-shadow var(--t), opacity var(--t);
  position: relative; z-index: 1; flex-shrink: 0;
}
.lp-pro-btn:hover {
  opacity: 0.9; transform: translateY(-2px);
  box-shadow: 0 6px 32px rgba(232,86,10,0.5);
  text-decoration: none; color: #fff;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — Tablet ≤ 768px
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .lp-trust-inner { gap: 1.2rem; }
  .lp-trust-item { font-size: 0.78rem; }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — Mobile ≤ 640px
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .app-header { padding: 0 1rem; height: 60px; }
  .brand-logo-full { height: 36px; max-width: 130px; }
  .main-nav {
    flex-wrap: nowrap; overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.05rem; scrollbar-width: none;
  }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav a, .main-nav .link-btn {
    padding: 0.32rem 0.62rem; font-size: 0.8rem; white-space: nowrap; flex-shrink: 0;
  }

  main { padding: 1rem 0.9rem 2.5rem; }
  .card { padding: 1rem; border-radius: 12px; margin-bottom: 0.75rem; }
  .card > .table-wrap { margin: -1rem -1rem; }

  .hero { padding: 1.4rem 1.1rem; border-radius: 12px; margin-bottom: 1.1rem; }
  .hero h1 { font-size: 1.35rem; }

  .stats { grid-template-columns: repeat(2, 1fr); gap: 0.65rem; }
  .stat { padding: 0.8rem 0.75rem; }
  .stat .value { font-size: 1.15rem; }
  .stat .label { font-size: 0.68rem; }

  .action-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
  .action-card { padding: 0.9rem 0.4rem; }
  .action-icon { font-size: 1.5rem; }
  .action-label { font-size: 0.78rem; }

  .row { gap: 0.5rem; }
  .row > .field { flex: 1 1 100%; }

  .table { font-size: 0.8rem; }
  .table th, .table td { padding: 0.45rem 0.5rem; }
  .table th { font-size: 0.68rem; }

  .dashboard-header h1 { font-size: 1.3rem; }
  .btn { padding: 0.55rem 0.95rem; font-size: 0.875rem; }
  .grid { grid-template-columns: 1fr; }
  .chip { font-size: 0.67rem; padding: 0.14rem 0.48rem; }

  /* Landing page mobile */
  .lp-hero {
    min-height: 88svh; padding: 3.5rem 1.1rem 5.5rem;
    background:
      linear-gradient(to bottom,
        rgba(8,51,24,0.52) 0%,
        rgba(8,51,24,0.65) 50%,
        rgba(8,51,24,0.85) 100%
      ),
      url('./images/hero-bg.webp') 28% center / cover no-repeat;
  }
  .lp-logo { width: 62px; height: 62px; border-radius: 16px; margin-bottom: 1.35rem; }
  .lp-eyebrow { font-size: 0.7rem; padding: 0.26rem 0.8rem; margin-bottom: 1rem; }
  .lp-sub { margin-bottom: 2.2rem; }
  .lp-ctas { gap: 0.65rem; }
  .lp-btn-primary { padding: 0.78rem 1.6rem; font-size: 0.95rem; }
  .lp-btn-ghost   { padding: 0.78rem 1.3rem; font-size: 0.9rem; }

  .lp-section { margin-top: 3rem; padding: 0 1rem; }
  .lp-section-head h2 { font-size: 1.2rem; }
  .lp-events-grid { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }

  .lp-features-section { padding: 2.8rem 0; margin-top: 3rem; }
  .lp-features { grid-template-columns: repeat(2, 1fr); gap: 0.85rem; }
  .lp-feat { padding: 1rem; }
  .lp-feat-icon { width: 40px; height: 40px; font-size: 1.2rem; }

  .lp-pro { margin-top: 3rem 0 3rem; padding: 0 1rem; }
  .lp-pro-inner { flex-direction: column; text-align: center; padding: 2rem 1.5rem; }
  .lp-pro-inner p { max-width: 100%; }
}

/* ═══════════════════════════════════════════════════════════════
   SCANNER QR
   ═══════════════════════════════════════════════════════════════ */
.scan-box {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  line-height: 0;
}

/* Cadre de visée */
.scan-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.scan-frame {
  width: 62%;
  aspect-ratio: 1;
  border: 3px solid rgba(255,255,255,0.9);
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.42);
  position: relative;
}
/* Coins colorés */
.scan-frame::before, .scan-frame::after {
  content: '';
  position: absolute;
  width: 22px; height: 22px;
  border-color: var(--green);
  border-style: solid;
  border-width: 0;
}
.scan-frame::before { top: -3px; left: -3px; border-top-width: 4px; border-left-width: 4px; border-radius: 4px 0 0 0; }
.scan-frame::after  { bottom: -3px; right: -3px; border-bottom-width: 4px; border-right-width: 4px; border-radius: 0 0 4px 0; }

/* Badge résultat */
.scan-result-card { line-height: 1.4; }

.scan-badge {
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.scan-badge__title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.scan-badge__body { font-size: 0.9rem; }
.scan-badge__sub  { font-size: 0.78rem; opacity: 0.75; margin-top: 0.1rem; }

.scan-badge--valid   { background: #e6f9ec; border-left: 5px solid var(--green); color: #0d4d1c; }
.scan-badge--used    { background: #fff8e1; border-left: 5px solid #e6a817; color: #6b4c00; }
.scan-badge--refused { background: #fdecea; border-left: 5px solid var(--red);  color: #7a1c15; }
.scan-badge--loading { background: var(--surface-2); border-left: 5px solid var(--border-2); color: var(--muted); }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — Small mobile ≤ 400px
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 400px) {
  main { padding: 0.65rem 0.65rem 2rem; }
  .card { padding: 0.85rem 0.72rem; }
  .stat { padding: 0.65rem 0.6rem; }
  .stat .value { font-size: 1rem; }
  .action-card { padding: 0.7rem 0.3rem; }
  .lp-events-grid { grid-template-columns: 1fr; }
  .lp-trips-grid  { grid-template-columns: 1fr; }
  .lp-features { grid-template-columns: 1fr; }
  .lp-pro-inner { padding: 1.5rem 1.1rem; }
}

/* ── Grille sièges transport ───────────────────────────────────── */
.seat-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.5rem 0;
}

.seat {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s, background 0.15s;
}

.seat--free {
  background: var(--green-50);
  border-color: var(--green-100);
  color: var(--green-dark);
  cursor: pointer;
}
.seat--free:hover {
  background: var(--green-100);
  transform: scale(1.12);
}

.seat--selected {
  background: var(--green);
  border-color: var(--green-dark);
  color: #fff;
  cursor: pointer;
  transform: scale(1.08);
}

.seat--taken,
.seat--locked {
  background: #f3f3f3;
  border-color: #ddd;
  color: #aaa;
  cursor: not-allowed;
  text-decoration: line-through;
}
