/* ── Design Tokens ──────────────────────────────────────────── */
:root {
  --bg: #FDF0F4;
  --surface: #ffffff;
  --primary: #2D2323;
  --accent: #E60064;
  --accent-light: #FDF0F4;
  --muted: #8A7F7F;
  --shadow-sm: 0 2px 6px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-accent: 0 4px 20px rgba(230,0,100,0.18);
  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-full: 50px;
  --trans-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --trans-normal: 0.25s ease;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--primary);
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-overflow-scrolling: touch;
  min-height: 100vh;
  line-height: 1.5;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ── Accessibility ──────────────────────────────────────────── */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity:0; transform: translateY(10px); }
  to   { opacity:1; transform: translateY(0); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes modalIn {
  from { opacity:0; transform: translateY(-16px) scale(0.96); }
  to   { opacity:1; transform: translateY(0) scale(1); }
}

/* ── Screen system ──────────────────────────────────────────── */
.screen { display: none; animation: fadeUp 0.3s ease-out; padding-bottom: 100px; }
.screen.active { display: block; }

/* ── HEADER ─────────────────────────────────────────────────── */
.header {
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding-top: calc(16px + env(safe-area-inset-top));
}
.header__inner { padding: 0 20px 16px; position: relative; }
.header__logo { display: flex; flex-direction: column; align-items: center; }

/* Logo image */
.logo-img {
  height: 52px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}
.logo-fallback {
  display: none;
  font-size: clamp(26px, 8vw, 34px);
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -1px;
  line-height: 0.95;
  text-transform: uppercase;
}



/* Header controls row */
.header__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  margin-top: 4px;
}

/* Back button */
.back-btn {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg);
  color: var(--accent);
  font-size: 22px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--trans-fast), background var(--trans-fast);
}
.back-btn:active { transform: translateY(-50%) scale(0.9); background: var(--accent-light); }

/* Language toggle */
.lang-toggle {
  display: flex;
  gap: 2px;
  background: var(--bg);
  border-radius: var(--radius-full);
  padding: 3px;
}
.lang-btn {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  color: var(--muted);
  letter-spacing: 0.05em;
  transition: all var(--trans-fast);
}
.lang-btn.active { background: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(230,0,100,0.3); }
.lang-btn:hover:not(.active) { color: var(--accent); }

/* Zone nav (tabs) */
.zone-nav {
  display: flex;
  overflow-x: auto;
  gap: 8px;
  padding: 0 20px 14px;
  scrollbar-width: none;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.zone-nav::-webkit-scrollbar { display: none; }
.zone-btn {
  background: var(--bg);
  color: var(--muted);
  border: 2px solid transparent;
  padding: 9px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--trans-normal);
}
.zone-btn:hover { background: var(--accent-light); color: var(--accent); }
.zone-btn.active { background: var(--accent); color: #fff; box-shadow: 0 3px 12px rgba(230,0,100,0.25); }

/* ── CARDS ──────────────────────────────────────────────────── */
.card-container {
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 600px;
  margin: 0 auto;
}
.zone-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 4px 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.zone-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(0,0,0,0.06);
}
.zone-label-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 20px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
}
.badge-terrasse { background: #e8fce8; color: #1a6a1a; }
.badge-pavillon { background: #e8e8fc; color: #1a1a6a; }
.badge-other    { background: #fff3e0; color: #8a4a00; }

/* Zone group container */
.zone-group { display: none; flex-direction: column; gap: 10px; }
.zone-group.active { display: flex; }

.card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid rgba(230,0,100,0.04);
  cursor: pointer;
  transition: transform var(--trans-fast), background var(--trans-fast), box-shadow var(--trans-fast);
  text-decoration: none;
  color: var(--primary);
}
.card:hover { background: #FFFAFC; box-shadow: var(--shadow-md); transform: translateY(-1px); }
.card:active { transform: scale(0.97) translateY(1px); background: #FFFAFC; }

/* Zone card (home screen) */
.card--zone { background: var(--surface); }

/* Stand card */
.card__icon {
  width: 50px; height: 50px;
  background: var(--accent-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.card__icon svg { width: 24px; height: 24px; stroke: var(--accent); fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.card__icon--stand { background: #f5f5f5; }
.card__icon--stand svg { stroke: var(--primary); width: 28px; height: 28px; }
.card__content { flex: 1; min-width: 0; }
.card__title { font-size: 16px; font-weight: 800; letter-spacing: -0.2px; line-height: 1.3; }
.card__desc { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.3; }
.location-badge { font-size: 11px; color: var(--accent); font-weight: 600; margin-top: 2px; text-transform: uppercase; letter-spacing: 0.05em; }
.card__arrow {
  width: 32px; height: 32px;
  background: var(--bg);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}
.card__arrow svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2.5; fill: none; }
.card__link-badge {
  flex-shrink: 0;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 20px;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  letter-spacing: 0.04em;
}

/* ── FILTERS ────────────────────────────────────────────────── */
.filters {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding: 0 20px 16px;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.filter-btn {
  background: var(--surface);
  border: 1.5px solid var(--border);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  transition: all var(--trans-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}
.filter-btn--online svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.5; }
.filter-btn.active {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

/* Home zone-type separator labels */
.home-section-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 14px 4px 6px;
}

/* ── LOADING ─────────────────────────────────────────────────── */
.loading {
  display: flex; justify-content: center; align-items: center;
  padding: 60px 20px;
}
.loading__spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--accent-light);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ── MODAL ───────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  display: none; align-items: flex-end; justify-content: center;
  z-index: 1000;
  padding: 0;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--surface);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  animation: modalIn 0.25s ease-out;
  padding-bottom: env(safe-area-inset-bottom);
}
@media (min-width: 600px) {
  .modal-overlay { align-items: center; padding: 20px; }
  .modal { border-radius: var(--radius-md); max-height: 90vh; }
}
.modal__handle {
  width: 36px; height: 4px;
  background: rgba(0,0,0,0.12);
  border-radius: 2px;
  margin: 12px auto 0;
}
@media (min-width: 600px) { .modal__handle { display: none; } }
.modal__header {
  padding: 16px 20px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.modal__hall {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.modal__title { font-size: 20px; font-weight: 900; letter-spacing: -0.3px; }
.modal__close {
  width: 32px; height: 32px;
  background: var(--bg);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  color: var(--muted);
  flex-shrink: 0;
  margin-left: 12px;
  transition: all var(--trans-fast);
}
.modal__close:hover { background: var(--accent-light); color: var(--accent); }
.modal__body { padding: 18px 20px 24px; }
.modal__label {
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 5px;
  margin-top: 14px;
}
.modal__label:first-child { margin-top: 0; }
.modal__value { font-size: 15px; color: var(--primary); line-height: 1.5; }
.order-options { display: flex; gap: 8px; margin-top: 6px; }
.order-option {
  flex: 1;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}
.order-option.available { background: #e8fce8; color: #166534; }
.order-option.unavailable { background: var(--bg); color: var(--muted); }
.modal__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  margin-top: 18px;
  transition: opacity var(--trans-fast), transform var(--trans-fast);
  letter-spacing: 0.02em;
}
.modal__btn:hover { opacity: 0.88; transform: translateY(-1px); }
.modal__btn:active { transform: scale(0.98); }
.modal__btn.disabled { background: var(--bg); color: var(--muted); pointer-events: none; }

/* ── Responsive tweaks ──────────────────────────────────────── */
@media (max-width: 480px) {
  .card__title { font-size: 15px; }
  .card-container { padding: 14px 12px; gap: 10px; }
}

/* ── Multi-brand groups (Par Enseigne) ──────────────────────── */
.multi-brand-group {
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid rgba(230,0,100,0.08);
}
.multi-brand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 10px;
  border-bottom: 1px solid rgba(230,0,100,0.06);
  background: var(--accent-light);
}
.multi-brand-name {
  font-size: 15px;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -0.2px;
}
.multi-brand-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(230,0,100,0.1);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}
.card--sub {
  border-radius: 0 !important;
  box-shadow: none !important;
  border: none !important;
  border-bottom: 1px solid rgba(0,0,0,0.04) !important;
  background: var(--surface) !important;
}
.card--sub:last-child {
  border-bottom: none !important;
}
.card--sub:hover {
  background: #FFFAFC !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}