/* ============================================================
   P2LL Padel — Design tokens & styles globaux
   Bootstrap 5.3 + surcharges P2LL
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Nunito+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Tokens ───────────────────────────────────────────────── */
:root {
  --p-bg:        #FFFFFF;
  --p-surface:   #FAFAF7;
  --p-surface2:  #F1EFE8;
  --p-line:      #E4E2D8;
  --p-line-soft: #EFEDE4;
  --p-ink:       #3A2E1F;
  --p-ink-soft:  #5C4A36;
  --p-muted:     #8A7D6A;

  --p-olive:     #A8BC3A;
  --p-olive-dk:  #7A8A1E;
  --p-olive-lt:  #C8D66A;
  --p-moss:      #5C6A2E;

  --p-accent:    #D9E500;
  --p-accent-dk: #B5C100;
  --p-terre:     #8B5A2B;
  --p-terre-dk:  #5E3B18;
  --p-warn:      #C98A1C;
  --p-warn-bg:   #FBF2DF;

  --p-r:    14px;
  --p-r-sm:  8px;
  --p-r-lg: 22px;
  --p-r-xl: 32px;

  --p-shadow-sm: 0 1px 3px rgba(58,46,31,.08);
  --p-shadow-md: 0 4px 20px -4px rgba(58,46,31,.18);
  --p-shadow-lg: 0 8px 40px -8px rgba(58,46,31,.22);

  --p-font-script: "Cormorant Garamond", Georgia, serif;
  --p-font-sans:   "Nunito Sans", -apple-system, "Segoe UI", sans-serif;
  --p-font-mono:   "JetBrains Mono", ui-monospace, Menlo, monospace;
}

/* ── Reset / base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
  height: 100%;
}

body {
  font-family: var(--p-font-sans);
  color: var(--p-ink);
  background: var(--p-bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  height: 100%;
  overflow: hidden; /* L'app gère son propre scroll */
}

/* ── Coquille applicative ─────────────────────────────────── */
#app-shell {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  background: var(--p-bg);
  position: relative;
  overflow: hidden;
}

/* Home header masqué partout quand authentifié (topbar/sidebar prennent le relais) */
#app-shell.is-authed .p-home-header { display: none; }

/* Sidebar — masquée par défaut (mobile/tablette) */
#app-sidebar {
  display: none;
  width: 260px;
  flex-shrink: 0;
  flex-direction: column;
  border-right: 1px solid var(--p-line);
  background: var(--p-bg);
  overflow-y: auto;
}

/* ── Topbar mobile ────────────────────────────────────────── */
#mobile-topbar {
  display: none;
  align-items: center;
  height: 52px;
  padding: 0 12px 0 4px;
  gap: 8px;
  background: var(--p-bg);
  border-bottom: 1px solid var(--p-line);
  flex-shrink: 0;
  z-index: 10;
}
#app-shell.is-authed #mobile-topbar { display: flex; }

#burger-btn {
  all: unset;
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--p-ink);
  -webkit-tap-highlight-color: transparent;
  transition: background .12s;
  flex-shrink: 0;
}
#burger-btn:hover { background: var(--p-surface2); }

.p-mobile-topbar-brand {
  flex: 1;
  font-size: 1.15rem;
  color: var(--p-ink);
  user-select: none;
}

#mobile-topbar-avatar { flex-shrink: 0; }
#mobile-topbar-avatar .p-avatar { cursor: pointer; }

/* ── Backdrop drawer ──────────────────────────────────────── */
#drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(58,46,31,.45);
  z-index: 99;
  opacity: 0;
  transition: opacity .22s;
}
#drawer-backdrop.open { display: block; opacity: 1; }

#screen-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

/* Scrollbar discrète */
#screen-container::-webkit-scrollbar { width: 3px; }
#screen-container::-webkit-scrollbar-thumb { background: var(--p-line); border-radius: 2px; }

/* ── Typographie ──────────────────────────────────────────── */
.p-script {
  font-family: var(--p-font-script);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -.01em;
}
.p-mono { font-family: var(--p-font-mono); }
.p-serif { font-family: var(--p-font-script); }
.p-label {
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--p-muted);
  font-weight: 600;
}

/* ── Boutons ──────────────────────────────────────────────── */
.btn-p-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--p-accent);
  color: var(--p-ink);
  font-family: var(--p-font-sans);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 14px 28px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: background .15s, transform .1s;
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn-p-primary:hover, .btn-p-primary:focus-visible {
  background: var(--p-accent-dk);
  color: var(--p-ink);
  transform: translateY(-1px);
}
.btn-p-primary:active { transform: translateY(0); }
.btn-p-primary:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn-p-primary.w-100 { width: 100%; }

.btn-p-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--p-surface);
  color: var(--p-ink);
  font-family: var(--p-font-sans);
  font-weight: 500;
  font-size: .85rem;
  padding: 11px 18px;
  border-radius: 10px;
  border: 1px solid var(--p-line);
  cursor: pointer;
  transition: background .15s;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.btn-p-ghost:hover { background: var(--p-surface2); color: var(--p-ink); }
.btn-p-ghost:disabled { opacity: .4; cursor: not-allowed; }

.btn-p-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--p-line);
  background: var(--p-surface);
  color: var(--p-ink);
  cursor: pointer;
  transition: background .15s;
  position: relative;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.btn-p-icon:hover { background: var(--p-surface2); }

.btn-p-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: transparent;
  color: var(--p-terre-dk);
  font-size: .85rem;
  font-weight: 500;
  padding: 11px 18px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--p-terre) 35%, var(--p-line));
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn-p-danger:hover { background: color-mix(in srgb, var(--p-terre) 8%, transparent); }

/* ── Champs de formulaire ─────────────────────────────────── */
.p-field { display: flex; flex-direction: column; gap: 5px; }
.p-field label {
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--p-muted);
  font-weight: 600;
}
.p-field input,
.p-field select,
.p-field textarea {
  border: 1.5px solid var(--p-line);
  background: var(--p-surface);
  border-radius: 10px;
  padding: 13px 14px;
  font-size: .95rem;
  font-family: var(--p-font-mono);
  letter-spacing: .03em;
  color: var(--p-ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
  -webkit-appearance: none;
}
.p-field input:focus,
.p-field select:focus,
.p-field textarea:focus {
  border-color: var(--p-olive);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--p-olive) 18%, transparent);
}
.p-field .p-hint {
  font-size: 11px;
  color: var(--p-muted);
  font-family: var(--p-font-sans);
  letter-spacing: normal;
}

/* ── Chips / Pills ────────────────────────────────────────── */
.p-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
}
.p-chip-olive {
  background: color-mix(in srgb, var(--p-olive) 14%, transparent);
  color: var(--p-olive-dk);
  border: 1px solid color-mix(in srgb, var(--p-olive) 28%, transparent);
}
.p-chip-terre {
  background: color-mix(in srgb, var(--p-terre) 12%, transparent);
  color: var(--p-terre-dk);
  border: 1px solid color-mix(in srgb, var(--p-terre) 28%, transparent);
}
.p-chip-warn {
  background: var(--p-warn-bg);
  color: #8C6010;
  border: 1px solid #EBD79A;
}
.p-chip-neutral {
  background: var(--p-surface2);
  color: var(--p-ink-soft);
  border: 1px solid var(--p-line);
}

/* ── Avatars joueurs ──────────────────────────────────────── */
.p-avatar {
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-family: var(--p-font-sans);
  flex-shrink: 0;
  font-size: .7rem;
  letter-spacing: .04em;
  border: 1.5px solid var(--p-line);
}
.p-avatar-associe   { background: color-mix(in srgb, var(--p-olive)    22%, var(--p-surface)); }
.p-avatar-ayant_droit { background: color-mix(in srgb, var(--p-olive-lt) 35%, var(--p-surface)); }
.p-avatar-invite,
.p-avatar-visiteur  { background: color-mix(in srgb, var(--p-terre)    16%, var(--p-surface)); }
.p-avatar-libre     { background: var(--p-surface2); border-style: dashed; color: var(--p-muted); }

/* ── TopBar ───────────────────────────────────────────────── */
.p-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px 14px;
  border-bottom: 1px solid var(--p-line-soft);
  background: var(--p-bg);
  position: sticky; top: 0; z-index: 10;
  min-height: 56px;
}
.p-topbar-title {
  font-family: var(--p-font-script);
  font-weight: 400;
  font-style: italic;
  font-size: 1.7rem;
  line-height: 1;
  margin: 0;
  color: var(--p-ink);
}
.p-topbar-left { display: flex; align-items: center; gap: 8px; }

/* ── Carte ticket (ma résa) ───────────────────────────────── */
.p-ticket {
  background: linear-gradient(160deg, var(--p-ink) 0%, #3A3428 100%);
  color: #F6F1E7;
  border-radius: var(--p-r-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--p-shadow-md);
}
/* ── Carte zone ───────────────────────────────────────────── */
.p-zone-card {
  background: var(--p-surface);
  border: 1.5px solid var(--p-line);
  border-radius: var(--p-r);
  padding: 14px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .1s;
  text-align: left;
  width: 100%;
  display: flex; flex-direction: column; gap: 10px;
  -webkit-tap-highlight-color: transparent;
}
.p-zone-card:hover, .p-zone-card:focus-visible {
  border-color: var(--p-olive);
  box-shadow: var(--p-shadow-sm);
  transform: translateY(-2px);
}
.p-zone-card:active { transform: translateY(0); }
.p-zone-card.inactive { opacity: .55; cursor: default; }
.p-zone-card.inactive:hover { transform: none; border-color: var(--p-line); }

/* ── Filtre rapide par sport (home) ───────────────────────── */
.p-sport-filter {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 10px;
}
.p-sport-chip {
  display: inline-flex; align-items: center;
  font-size: .78rem; font-weight: 600; letter-spacing: .02em;
  color: var(--p-ink-soft);
  background: var(--p-surface);
  border: 1.5px solid var(--p-line);
  border-radius: 999px; padding: 5px 14px;
  cursor: pointer; transition: background .15s, border-color .15s, color .15s;
  -webkit-tap-highlight-color: transparent;
}
.p-sport-chip:hover {
  border-color: var(--p-olive);
  color: var(--p-olive-dk);
}
.p-sport-chip.active {
  background: var(--p-olive);
  border-color: var(--p-olive);
  color: #fff;
}


/* ── Surface swatch ───────────────────────────────────────── */
.p-swatch {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}
.p-swatch-court {
  position: absolute;
  inset: 18% 26%;
  border: 1.5px solid rgba(255,255,255,.7);
  border-radius: 2px;
}
.p-swatch-net {
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: rgba(255,255,255,.55);
}
.p-swatch-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Sélecteur de jour ────────────────────────────────────── */
.p-day-btn {
  padding: 11px 12px; text-align: left;
  background: var(--p-surface);
  border: 1.5px solid var(--p-line);
  border-radius: 10px;
  cursor: pointer;
  transition: background .12s, border-color .12s;
  -webkit-tap-highlight-color: transparent;
}

/* ── Icône badge notification ─────────────────────────────── */
.p-badge {
  position: absolute; top: 5px; right: 5px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--p-terre);
}

/* ── Toast / alerte inline ────────────────────────────────── */
.p-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--p-ink);
  color: var(--p-bg);
  padding: 12px 20px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 500;
  overflow-wrap: break-word;
  z-index: 9999;
  box-shadow: var(--p-shadow-lg);
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s, bottom .2s;
  max-width: calc(100vw - 48px);
  text-align: center;
}
.p-toast.show { opacity: 1; bottom: 32px; }
.p-toast.error { background: #C0392B; }
.p-toast.success { background: var(--p-olive-dk); }

/* ── Loader ───────────────────────────────────────────────── */
.p-loader {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%;
  gap: 16px;
  color: var(--p-muted);
}
.p-spinner {
  width: 36px; height: 36px;
  border: 2.5px solid var(--p-line);
  border-top-color: var(--p-olive);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Séparateur ───────────────────────────────────────────── */
.p-divider { height: 1px; background: var(--p-line); margin: 14px 0; }

/* ── Section heading ──────────────────────────────────────── */
.p-section-title {
  font-family: var(--p-font-script);
  font-style: italic;
  font-weight: 400;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--p-ink);
  margin: 0 0 12px;
}

/* ── Logo ─────────────────────────────────────────────────── */
.p-logo { height: 40px; width: auto; display: block; }


/* ── Transitions écrans ───────────────────────────────────── */
.screen-enter {
  animation: screenIn .22s ease both;
}
@keyframes screenIn {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Barre de progression liste d'attente ─────────────────── */
.p-progress {
  height: 4px;
  background: var(--p-line-soft);
  border-radius: 2px;
  overflow: hidden;
}
.p-progress-bar {
  height: 100%;
  background: var(--p-olive);
  border-radius: 2px;
  transition: width .4s ease;
}

/* ── Sticky footer ────────────────────────────────────────── */
.p-sticky-footer {
  position: sticky; bottom: 0;
  background: var(--p-surface);
  border-top: 1px solid var(--p-line);
  padding: 12px 16px 20px;
  z-index: 10;
}

/* ── Utilitaires espacement ───────────────────────────────── */
.px-screen { padding-left: 16px; padding-right: 16px; }
.gap-p { gap: 10px; }

/* ── Responsive — tablette (≥ 768px) ─────────────────────── */
@media (min-width: 768px) {
  body { background: var(--p-surface); }
  .px-screen { padding-left: 28px; padding-right: 28px; }
  .p-zone-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .p-slot-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ── Responsive — mobile (< 1024px) — sidebar en drawer ──── */
@media (max-width: 1023px) {
  /* Sidebar en drawer fixe, hors du flux, off-screen par défaut */
  #app-shell.is-authed #app-sidebar {
    display: flex;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 280px;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: var(--p-shadow-lg);
    border-right: none;
  }
  #app-shell.is-authed #app-sidebar.drawer-open {
    transform: translateX(0);
  }
}

/* ── Responsive — desktop (≥ 1024px) ─────────────────────── */
@media (min-width: 1024px) {
  /* Layout 2 colonnes : sidebar + contenu */
  #app-shell { flex-direction: row; }

  /* Sidebar visible uniquement si authentifié */
  #app-shell.is-authed #app-sidebar { display: flex; }

  /* Topbar mobile masquée */
  #mobile-topbar { display: none !important; }

  /* Fond neutre derrière le contenu */
  #screen-container { background: var(--p-surface); }

  /* Padding écrans — aligne sur la maquette (48px) */
  .px-screen { padding-left: 48px; padding-right: 48px; }

  /* Contenu centré avec max-width */
  .screen-home,
  .screen-planning,
  .screen-book,
  .screen-confirm,
  .screen-myres,
  .screen-waitlist,
  .screen-join {
    max-width: 920px;
    margin: 0 auto;
    background: var(--p-bg);
  }

  /* Zone grid : 2 colonnes (conforme maquette) */
  .p-zone-grid { grid-template-columns: repeat(2, 1fr); }

  /* Slot grid : 4 colonnes (conforme maquette) */
  .p-slot-grid { grid-template-columns: repeat(4, 1fr); }

  /* Day strip : peut passer à la ligne plutôt que scroller */
  .p-day-strip { flex-wrap: wrap; overflow-x: visible; }

  /* Bottom sheet → modal centré */
  .p-bottom-sheet-backdrop { align-items: center; justify-content: center; }
  .p-bottom-sheet {
    border-radius: var(--p-r-xl);
    max-width: 520px;
    transform: scale(.94);
    opacity: 0;
    transition: transform .22s ease, opacity .18s;
  }
  .p-bottom-sheet-backdrop.open .p-bottom-sheet { transform: scale(1); opacity: 1; }

  /* Login : colonne contrainte et centrée (hero fixe 280px, conforme maquette) */
  .screen-login {
    display: flex;
    flex-direction: column;
    max-width: 720px;
    margin: 0 auto;
    min-height: 100%;
    background: var(--p-bg);
    box-shadow: var(--p-shadow-md);
  }
  .screen-login .p-hero {
    flex: 0 0 280px;
    min-height: 280px;
  }
  .screen-login .p-hero-img {
    height: 280px;
    object-fit: cover;
  }
  .screen-login > .px-screen {
    flex: 1;
    padding: 40px 48px 48px;
    overflow-y: auto;
  }
  .screen-login .p-hero-title { font-size: 4.8rem; }
}

/* ── Safe area iPhone ─────────────────────────────────────── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .p-sticky-footer { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
}

/* ============================================================
   Composants écrans — ajouts v1.0
   ============================================================ */

/* ── Champs : raccourcis de classe directe ────────────────── */
.p-input {
  border: 1.5px solid var(--p-line);
  background: var(--p-surface);
  border-radius: 10px;
  padding: 13px 14px;
  font-size: .95rem;
  font-family: var(--p-font-mono);
  letter-spacing: .03em;
  color: var(--p-ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
  -webkit-appearance: none;
  display: block;
}
.p-input:focus {
  border-color: var(--p-olive);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--p-olive) 18%, transparent);
}
.p-field .p-input { margin-top: 2px; }

/* ── Hero photo login ─────────────────────────────────────── */
.screen-login { min-height: 100%; display: flex; flex-direction: column; }
.p-hero { position: relative; min-height: 240px; overflow: hidden; flex-shrink: 0; }
.p-hero-img {
  width: 100%; height: 260px; object-fit: cover; object-position: center 30%;
  display: block;
}
.p-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(58,46,31,.12) 0%, rgba(58,46,31,.65) 100%);
}
.p-hero-content {
  position: absolute; bottom: 0; left: 0; right: 0;
  z-index: 2; text-align: center;
  color: #fff; padding: 0 24px 52px;
}
.p-hero-title {
  margin: 0;
  font-family: var(--p-font-script);
  font-weight: 400; font-style: italic;
  font-size: 3.2rem; line-height: .95;
  text-shadow: 0 2px 24px rgba(0,0,0,.28);
  letter-spacing: -.01em;
}
.p-hero-eyebrow {
  font-family: var(--p-font-sans);
  font-size: .65rem; letter-spacing: .3em;
  text-transform: uppercase; opacity: .9;
  margin: 0 0 10px; font-weight: 500;
}
.p-hero-sub {
  margin: 14px 0 0; font-size: .78rem;
  letter-spacing: .22em; text-transform: uppercase;
  opacity: .82; font-family: var(--p-font-sans);
}
.p-hero-wave {
  position: absolute; left: 0; right: 0; bottom: -1px;
  width: 100%; height: 40px; display: block; z-index: 3;
}

/* Info box */
.p-info-box {
  display: flex; gap: 10px; align-items: flex-start;
  background: color-mix(in srgb, var(--p-olive) 7%, var(--p-surface));
  border: 1px solid color-mix(in srgb, var(--p-olive) 22%, var(--p-line));
  border-radius: var(--p-r-sm);
  padding: 12px 14px;
  font-size: .82rem; color: var(--p-olive-dk); line-height: 1.55;
}
.p-info-box svg { flex-shrink: 0; margin-top: 2px; }

/* ── Home ─────────────────────────────────────────────────── */
.screen-home { min-height: 100%; padding-bottom: 24px; }
.p-home-header {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 16px; padding-bottom: 12px;
}
.p-home-logo { display: flex; align-items: center; gap: 10px; }
.p-home-logo img { border-radius: 8px; }
.p-home-logo-text {
  font-family: var(--p-font-script); font-style: italic;
  font-weight: 400; font-size: 1.4rem; line-height: 1;
  color: var(--p-ink);
}
.p-home-user { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.p-greeting {
  font-family: var(--p-font-script); font-style: italic;
  font-size: 2rem; font-weight: 400; line-height: 1.1;
  margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.p-zone-grid { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.p-zone-card-body { display: flex; flex-direction: column; gap: 4px; }
.p-zone-card-name {
  font-family: var(--p-font-script); font-style: italic;
  font-size: 1.8rem; font-weight: 400; line-height: 1; color: var(--p-ink);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.p-zone-card-name .p-chip {
  font-family: var(--p-font-sans); font-style: normal;
}
.p-zone-card-meta {
  display: flex; align-items: center; gap: 6px;
  font-size: .75rem; color: var(--p-muted);
}
.p-zone-card > svg { align-self: flex-end; color: var(--p-muted); margin-top: -4px; }

/* Active booking card */
.p-active-card {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, var(--p-ink) 0%, #4A3E2F 100%);
  color: #F6F1E7; border-radius: var(--p-r);
  padding: 14px 16px; cursor: pointer;
  box-shadow: var(--p-shadow-md);
  -webkit-tap-highlight-color: transparent;
}
.p-active-card-badge {
  display: flex; align-items: center; gap: 6px;
  font-size: .7rem; letter-spacing: .15em; text-transform: uppercase;
  opacity: .8; font-weight: 600; white-space: nowrap;
}
.p-active-card-body { flex: 1; }
.p-active-card-zone {
  font-family: var(--p-font-script); font-style: italic;
  font-size: 1.5rem; line-height: 1;
}
.p-active-card-time { font-size: .78rem; opacity: .75; margin-top: 4px; }

/* ── Aide contextuelle login ──────────────────────────────── */
.p-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--p-muted);
  transition: color .15s;
  flex-shrink: 0;
  line-height: 1;
}
.p-help-btn:hover,
.p-help-btn:focus-visible { color: var(--p-olive); outline: none; }
.p-help-tip {
  padding: 10px 12px;
  background: color-mix(in srgb, var(--p-olive) 8%, var(--p-surface));
  border: 1px solid color-mix(in srgb, var(--p-olive) 28%, transparent);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--p-ink-soft);
  font-family: var(--p-font-sans);
}

/* ── Écran règlement intérieur ────────────────────────────── */
.p-reglement-content { padding-bottom: 40px; }
.p-reglement-content h2 {
  font-family: var(--p-font-script);
  font-style: italic;
  font-size: 2rem;
  font-weight: 400;
  color: var(--p-ink);
  margin: 0 0 24px;
}
.p-reglement-body {
  font-size: .9rem;
  line-height: 1.7;
  color: var(--p-ink-soft);
}
.p-reglement-body h1,
.p-reglement-body h2,
.p-reglement-body h3 {
  font-family: var(--p-font-sans);
  font-size: 1rem;
  font-weight: 700;
  color: var(--p-ink);
  margin: 20px 0 8px;
}
.p-reglement-body p  { margin: 0 0 12px; }
.p-reglement-body ul,
.p-reglement-body ol { padding-left: 20px; margin: 0 0 12px; }
.p-reglement-body li { margin-bottom: 6px; }
.p-reglement-body strong { color: var(--p-ink); }
.p-reglement-body a  { color: var(--p-olive); }

/* Modal rules list */
.p-modal-content { border-radius: var(--p-r-lg) !important; border: none !important; }
.p-modal-title {
  font-family: var(--p-font-script); font-style: italic;
  font-size: 1.8rem; font-weight: 400; color: var(--p-ink);
}
.p-modal-body { padding: 12px 24px 28px; }
.p-rules-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.p-rules-list li {
  padding-left: 20px; position: relative;
  font-size: .9rem; line-height: 1.55; color: var(--p-ink-soft);
}
.p-rules-list li::before {
  content: '—'; position: absolute; left: 0; color: var(--p-olive);
}

/* Empty state */
.p-empty {
  text-align: center; color: var(--p-muted); font-size: .88rem;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}

/* ── Planning ─────────────────────────────────────────────── */
.screen-planning { min-height: 100%; padding-bottom: 24px; }
.p-day-bar {
  padding-top: 14px; padding-bottom: 2px;
  position: sticky; top: 56px; background: var(--p-bg); z-index: 9;
}
.p-day-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; }
.p-day-strip::-webkit-scrollbar { display: none; }
.p-day-btn {
  flex-shrink: 0;
  padding: 10px 16px; text-align: left;
  background: var(--p-surface);
  border: 1.5px solid var(--p-line);
  border-radius: 10px;
  cursor: pointer; font-family: var(--p-font-sans);
  transition: background .12s, border-color .12s;
  -webkit-tap-highlight-color: transparent;
  font-size: .85rem; font-weight: 500;
  white-space: nowrap; color: var(--p-ink);
}
.p-day-btn.active {
  background: var(--p-ink); border-color: var(--p-ink); color: var(--p-bg);
}

/* Slot items (grille planning) */
.p-slot {
  all: unset;
  display: flex; align-items: center; gap: 8px;
  background: var(--p-surface);
  border: 1.5px solid var(--p-line);
  border-radius: 10px;
  padding: 14px 12px;
  cursor: pointer; text-align: left;
  transition: border-color .12s, transform .1s;
  -webkit-tap-highlight-color: transparent;
  flex-direction: column; align-items: flex-start;
}
.p-slot:hover:not([disabled]) { border-color: var(--p-olive); transform: translateY(-1px); }
.p-slot:active:not([disabled]) { transform: translateY(0); }
.p-slot[disabled] { opacity: .5; cursor: not-allowed; }
.p-slot-free { border-left: 3px solid var(--p-olive); }
.p-slot-full { border-left: 3px solid var(--p-terre); }
.p-slot-past { border-left: 3px solid var(--p-line); }
.p-slot-mine {
  border-left: 3px solid var(--p-olive-dk);
  background: color-mix(in srgb, var(--p-olive) 10%, var(--p-surface));
}
.p-slot-mine .p-slot-label { color: var(--p-olive-dk); font-weight: 600; }
.p-slot-public {
  border-left: 3px solid #FF4506;
  background: color-mix(in srgb, #FF4506 9%, var(--p-surface));
}
.p-slot-public .p-slot-label { color: #CC3300; font-weight: 500; }
.p-slot-time {
  font-family: var(--p-font-mono); font-size: .9rem;
  font-weight: 500; color: var(--p-ink);
}
.p-slot-end { font-family: var(--p-font-mono); font-size: .75rem; color: var(--p-muted); }
.p-slot-label { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--p-muted); margin-top: 2px; }
.p-slot-free .p-slot-label { color: var(--p-olive-dk); }
.p-slot-full .p-slot-label { color: var(--p-terre); }

.p-slot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.p-slots-header { display: flex; align-items: center; justify-content: flex-end; margin-bottom: 10px; }
.p-slots-info { font-size: .75rem; color: var(--p-muted); }

/* ── Bandeau filtre terrain (vue mono) ────────────────────── */
.p-planning-filter {
  padding: 6px 16px 0;
}
.p-planning-filter-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .75rem; color: var(--p-olive-dk);
  background: color-mix(in srgb, var(--p-olive) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--p-olive) 30%, transparent);
  border-radius: 20px; padding: 4px 12px;
  cursor: pointer; transition: background .15s;
}
.p-planning-filter-btn:hover {
  background: color-mix(in srgb, var(--p-olive) 20%, transparent);
}

/* ── Section terrain (vue multi) ──────────────────────────── */
.p-zone-section { margin-bottom: 28px; }
.p-zone-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--p-border);
}
.p-zone-section-name {
  font-size: .9rem; font-weight: 600; color: var(--p-text);
}

/* ── Terrain fermé ────────────────────────────────────────── */
.p-closed-banner {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; padding: 28px 16px; text-align: center;
  background: var(--p-surface2); border: 1.5px dashed var(--p-line);
  border-radius: var(--p-r); color: var(--p-muted);
}
.p-closed-title {
  font-size: .85rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--p-ink-soft);
}
.p-closed-reason { font-size: .8rem; color: var(--p-muted); white-space: pre-line; }

/* Jour fermé dans le sélecteur de dates */
.p-day-btn.closed {
  opacity: .45;
  text-decoration: line-through;
  cursor: not-allowed;
}
.p-day-btn.closed.active {
  background: var(--p-surface2); border-color: var(--p-line);
  color: var(--p-muted);
}

/* Jour à quota atteint (verrouillé) — reste cliquable : le clic ouvre l'explication */
.p-day-btn.quota {
  color: var(--p-muted);
  background: var(--p-surface2);
  border-style: dashed;
  border-color: var(--p-line);
}
.p-day-lock { margin-left: 6px; vertical-align: -1px; opacity: .85; }

/* ── Book ─────────────────────────────────────────────────── */
.screen-book { min-height: 100%; padding-bottom: 100px; }
.p-recap-card {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--p-surface); border: 1.5px solid var(--p-line);
  border-radius: var(--p-r); padding: 14px; overflow: hidden;
}
.p-recap-card .p-swatch { border-radius: 8px; max-height: 100px; }
.p-recap-card-body { padding: 0 2px; }
.p-recap-zone {
  font-family: var(--p-font-script); font-style: italic;
  font-size: 1.8rem; font-weight: 400; color: var(--p-ink); line-height: 1;
}
.p-recap-datetime {
  display: flex; align-items: center; gap: 6px;
  font-size: .82rem; color: var(--p-muted); margin-top: 6px;
}

/* Players list */
.p-player-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--p-surface);
  border: 1px solid var(--p-line); border-radius: 10px; margin-bottom: 8px;
}
.p-player-info { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.p-player-name { font-size: .9rem; font-weight: 600; color: var(--p-ink); }
.p-player-role { font-size: .72rem; color: var(--p-muted); }
.p-player-add {
  all: unset; box-sizing: border-box; display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 12px;
  border: 1.5px dashed var(--p-line); border-radius: 10px;
  color: var(--p-muted); font-size: .85rem; cursor: pointer;
  transition: border-color .12s, color .12s; margin-top: 4px;
  -webkit-tap-highlight-color: transparent;
}
.p-player-add:hover { border-color: var(--p-olive); color: var(--p-olive-dk); }

/* Bottom sheet */
.p-bottom-sheet-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 100;
  display: flex; align-items: flex-end;
  opacity: 0; transition: opacity .25s;
}
.p-bottom-sheet-backdrop.open { opacity: 1; }
.p-bottom-sheet {
  width: 100%; max-width: 480px; margin: 0 auto;
  background: var(--p-bg); border-radius: var(--p-r-xl) var(--p-r-xl) 0 0;
  padding: 12px 20px 32px;
  transform: translateY(100%); transition: transform .3s cubic-bezier(.32,0,.67,0);
}
.p-bottom-sheet-backdrop.open .p-bottom-sheet { transform: translateY(0); }
.p-bottom-sheet-handle {
  width: 40px; height: 4px; border-radius: 2px;
  background: var(--p-line); margin: 0 auto 20px;
}
.p-bottom-sheet-title {
  font-family: var(--p-font-script); font-style: italic;
  font-size: 1.6rem; font-weight: 400; color: var(--p-ink);
  margin: 0 0 20px;
}
.p-add-player-tabs { display: flex; gap: 6px; margin-bottom: 20px; }
.p-tab {
  all: unset; padding: 8px 18px; border-radius: 999px; font-size: .82rem;
  font-weight: 500; cursor: pointer; transition: background .12s, color .12s;
  background: var(--p-surface); border: 1.5px solid var(--p-line);
  color: var(--p-muted);
  -webkit-tap-highlight-color: transparent;
}
.p-tab.active { background: var(--p-ink); border-color: var(--p-ink); color: var(--p-bg); }

/* ── Confirm ──────────────────────────────────────────────── */
.screen-confirm { min-height: 100%; padding: 32px 16px 40px; text-align: center; }
.p-confirm-seal {
  width: 88px; height: 88px; border-radius: 50%;
  background: color-mix(in srgb, var(--p-olive) 12%, var(--p-surface));
  border: 1.5px solid color-mix(in srgb, var(--p-olive) 30%, var(--p-line));
  display: flex; align-items: center; justify-content: center;
  position: relative; margin: 0 auto 16px;
}
.p-confirm-seal::after {
  content: ''; position: absolute; inset: -9px;
  border: 1px dashed var(--p-olive-lt); border-radius: 50%; opacity: .55;
}
.p-confirm-check {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--p-accent); color: var(--p-ink);
  display: flex; align-items: center; justify-content: center;
}
.p-confirm-title {
  font-family: var(--p-font-script); font-style: italic; font-weight: 400;
  font-size: 2.2rem; color: var(--p-ink); margin: 0;
}
.p-confirm-sub { color: var(--p-muted); font-size: .88rem; margin: 6px 0 24px; }

/* Ticket rows */
.p-ticket-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 10px 0;
}
.p-ticket-label { font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; opacity: .65; margin-bottom: 6px; }
.p-ticket-value { font-size: .9rem; text-align: right; }
.p-ticket-sep { height: 1px; background: rgba(255,255,255,.08); margin: 0; }

/* Share block */
.p-share-block { text-align: left; }
.p-share-label {
  display: flex; align-items: center; gap: 8px;
  font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--p-muted); font-weight: 600; margin-bottom: 8px;
}
.p-share-url-row {
  display: flex; align-items: center; gap: 8px;
  background: var(--p-surface); border: 1px solid var(--p-line);
  border-radius: 10px; padding: 8px 10px;
}
.p-share-url {
  flex: 1; font-family: var(--p-font-mono); font-size: .7rem;
  color: var(--p-ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.p-share-hint { font-size: .78rem; color: var(--p-muted); margin: 8px 0 0; }

/* ── My reservations ──────────────────────────────────────── */
.screen-myres { min-height: 100%; padding-bottom: 24px; }
.p-ticket { border-radius: var(--p-r); padding: 18px; box-shadow: var(--p-shadow-sm); }
.p-ticket-active {
  background: linear-gradient(160deg, var(--p-ink) 0%, #3A3428 100%);
  color: #F6F1E7; box-shadow: var(--p-shadow-md);
}
.p-ticket-past { background: var(--p-surface); border: 1px solid var(--p-line); color: var(--p-ink); opacity: .75; }
.p-ticket-cancel { background: var(--p-surface2); border: 1px solid var(--p-line); color: var(--p-muted); }
.p-ticket + .p-ticket { margin-top: 12px; }
.p-ticket-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  margin-bottom: 4px;
}
.p-ticket-zone {
  font-family: var(--p-font-script); font-style: italic; font-weight: 400;
  font-size: 1.8rem; line-height: 1;
}
.p-ticket-datetime {
  display: flex; align-items: center; gap: 6px;
  font-size: .78rem; opacity: .72; margin-top: 5px;
}
.p-ticket-players { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0; }
.p-player-mini { display: flex; align-items: center; gap: 6px; font-size: .8rem; }
.p-ticket-note { font-size: .82rem; opacity: .7; padding: 10px 0; font-style: italic; display: flex; align-items: flex-start; gap: 6px; }
.p-ticket-actions {
  display: flex; gap: 10px; padding-top: 10px; flex-wrap: wrap;
}
.p-ticket-actions .btn-p-ghost {
  border-color: rgba(255,255,255,.14); color: rgba(255,255,255,.82);
  background: rgba(255,255,255,.06); font-size: .8rem;
}
.p-ticket-actions .text-danger {
  color: #FF7B6B !important;
  border-color: rgba(255,123,107,.22) !important;
}
.p-ticket-active .p-chip {
  background: transparent;
}
.p-ticket-active .p-chip-success {
  color: #A8D9A5; border-color: rgba(168,217,165,.35);
}
.p-ticket-active .p-chip-public {
  color: #FF7A45; border-color: rgba(255,122,69,.38);
}
.p-ticket-active .p-chip-error {
  color: #FF7B6B; border-color: rgba(255,123,107,.35);
}
.p-ticket-active .p-chip-neutral {
  color: rgba(255,255,255,.55); border-color: rgba(255,255,255,.18);
}

.p-manage-player-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--p-line);
}
.p-manage-player-row:last-child { border-bottom: none; }
.p-manage-player-name { flex: 1; font-size: .88rem; }

/* ── Waitlist ─────────────────────────────────────────────── */
.screen-waitlist { min-height: 100%; padding-bottom: 24px; }
.p-waitlist-card {
  border-radius: var(--p-r); padding: 16px; margin-bottom: 12px;
}
.p-waitlist-active {
  background: var(--p-surface); border: 1.5px solid color-mix(in srgb, var(--p-olive) 30%, var(--p-line));
}
.p-waitlist-past { background: var(--p-surface2); border: 1px solid var(--p-line); opacity: .7; }
.p-waitlist-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  margin-bottom: 12px;
}
.p-waitlist-zone {
  font-family: var(--p-font-script); font-style: italic;
  font-size: 1.6rem; font-weight: 400; line-height: 1; color: var(--p-ink);
}
.p-waitlist-datetime {
  display: flex; align-items: center; gap: 6px;
  font-size: .78rem; color: var(--p-muted); margin-top: 5px;
}
.p-waitlist-progress-wrap { margin-bottom: 12px; }
.p-waitlist-progress {
  height: 5px; background: var(--p-line); border-radius: 3px; overflow: hidden;
}
.p-waitlist-progress-bar {
  height: 100%; background: var(--p-olive); border-radius: 3px;
  transition: width .4s ease;
}
.p-waitlist-progress-label { font-size: .75rem; color: var(--p-muted); margin-top: 5px; }
.p-waitlist-actions { border-top: 1px solid var(--p-line-soft); padding-top: 10px; }

/* ── Join ─────────────────────────────────────────────────── */
.screen-join { min-height: 100%; padding: 40px 16px; text-align: center; }

/* ── Chips supplémentaires ────────────────────────────────── */
.p-chip-success {
  background: color-mix(in srgb, var(--p-olive) 14%, transparent);
  color: var(--p-olive-dk);
  border: 1px solid color-mix(in srgb, var(--p-olive) 28%, transparent);
}
.p-chip-info {
  background: color-mix(in srgb, #4A9EBF 10%, transparent);
  color: #1E6A88;
  border: 1px solid color-mix(in srgb, #4A9EBF 25%, transparent);
}
.p-chip-error {
  background: color-mix(in srgb, var(--p-terre) 10%, transparent);
  color: var(--p-terre-dk);
  border: 1px solid color-mix(in srgb, var(--p-terre) 25%, transparent);
}

/* ── Badge public ─────────────────────────────────────────── */
.p-chip-public {
  background: color-mix(in srgb, #FF4506 14%, transparent);
  color: #CC3300;
  border: 1px solid color-mix(in srgb, #FF4506 35%, transparent);
}

/* ── Toggle switch public/privé ───────────────────────────── */
.p-toggle-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px;
  background: var(--p-surface2);
  border-radius: var(--p-radius);
  border: 1px solid var(--p-line-soft);
}
.p-toggle-label { font-size: .85rem; font-weight: 500; color: var(--p-ink); }
.p-toggle-hint  { font-size: .75rem; color: var(--p-muted); margin-top: 2px; }
.p-toggle-switch {
  position: relative; display: inline-block;
  width: 42px; height: 24px; flex-shrink: 0; cursor: pointer;
}
.p-toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.p-toggle-thumb {
  position: absolute; inset: 0;
  background: var(--p-line);
  border-radius: 12px;
  transition: background .2s;
}
.p-toggle-thumb::after {
  content: '';
  position: absolute;
  left: 3px; top: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s;
}
.p-toggle-switch input:checked + .p-toggle-thumb { background: #3B82F6; }
.p-toggle-switch input:checked + .p-toggle-thumb::after { transform: translateX(18px); }

/* ── Lignes joueurs récents ───────────────────────────────── */
.p-recent-player-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--p-line-soft);
}
.p-recent-player-row:last-child { border-bottom: none; }

/* ── Flex helpers ─────────────────────────────────────────── */
.flex-1 { flex: 1; }

/* ── Sidebar (desktop) ────────────────────────────────────── */
.p-sidebar-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--p-line-soft);
  flex-shrink: 0;
}
.p-sidebar-logo {
  width: 40px; height: 40px;
  border-radius: 10px; object-fit: cover; flex-shrink: 0;
}
.p-sidebar-app-name {
  font-family: var(--p-font-script); font-style: italic;
  font-size: 1.2rem; line-height: 1.1; color: var(--p-ink);
}
.p-sidebar-app-sub {
  font-size: .6rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--p-muted); margin-top: 2px;
}

.p-sidebar-nav {
  flex: 1;
  display: flex; flex-direction: column;
  padding: 16px 10px;
  gap: 2px;
}
.p-sidebar-link {
  all: unset;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--p-ink-soft);
  font-size: .88rem; font-weight: 500;
  cursor: pointer;
  transition: background .12s, color .12s;
  -webkit-tap-highlight-color: transparent;
}
.p-sidebar-link:hover { background: var(--p-surface2); color: var(--p-ink); }
.p-sidebar-link.active { background: var(--p-ink); color: var(--p-bg); }
.p-sidebar-link svg { opacity: .6; flex-shrink: 0; }
.p-sidebar-link.active svg { opacity: 1; }

.p-sidebar-footer {
  border-top: 1px solid var(--p-line-soft);
  padding: 14px 14px 10px;
  display: flex; flex-direction: column; gap: 10px;
  flex-shrink: 0;
}
.p-sidebar-version {
  padding: 0 14px 16px;
  font-size: .65rem; letter-spacing: .08em;
  color: var(--p-muted); text-align: center;
  flex-shrink: 0;
}
.p-sidebar-user-card {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 4px;
}
.p-sidebar-user-info { flex: 1; min-width: 0; }
.p-sidebar-user-name {
  font-size: .85rem; font-weight: 600; color: var(--p-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.p-sidebar-user-meta { font-size: .7rem; color: var(--p-muted); margin-top: 1px; }

/* ── Spinner small ────────────────────────────────────────────── */
.p-spinner-sm { width: 18px; height: 18px; border-width: 2px; }

/* ── Pull-to-refresh ──────────────────────────────────────────── */
#ptr-indicator {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-50px); /* caché au-dessus du viewport */
  z-index: 96;
  background: var(--p-bg);
  border-radius: 50%;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--p-shadow-md);
  transition: transform .22s ease;
  pointer-events: none;
}
#ptr-indicator.ptr-visible { transform: translateX(-50%) translateY(60px); }
@media (min-width: 1024px) {
  #ptr-indicator.ptr-visible { transform: translateX(-50%) translateY(12px); }
}

/* ── Bannière offline ─────────────────────────────────────────── */
#p-offline-bar {
  position: fixed;
  top: 58px; /* sous la topbar mobile */
  right: 12px;
  background: var(--p-warn-bg);
  color: var(--p-warn);
  border: 1px solid color-mix(in srgb, var(--p-warn) 40%, transparent);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: .72rem; font-weight: 600;
  display: flex; align-items: center; gap: 5px;
  z-index: 90;
  pointer-events: none;
}
@media (min-width: 1024px) { #p-offline-bar { top: 12px; } }

/* ── Bannière mise à jour ─────────────────────────────────────── */
#p-update-bar {
  position: fixed;
  top: 52px; /* sous la topbar mobile */
  left: 0; right: 0;
  background: var(--p-olive);
  color: var(--p-ink);
  padding: 10px 16px;
  display: flex; align-items: center; gap: 12px;
  z-index: 97;
  font-size: .85rem; font-weight: 500;
}
#p-update-bar #btn-update-reload {
  all: unset;
  cursor: pointer;
  font-weight: 700;
  text-decoration: underline;
  -webkit-tap-highlight-color: transparent;
}
@media (min-width: 1024px) { #p-update-bar { top: 0; } }

/* ── Bannière installation PWA ────────────────────────────────── */
#p-install-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--p-bg);
  border-top: 1px solid var(--p-line);
  padding: 14px 16px;
  padding-bottom: max(14px, env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 10px;
  z-index: 95;
  box-shadow: var(--p-shadow-lg);
}
.p-install-text {
  flex: 1;
  font-size: .85rem;
  color: var(--p-ink);
  display: flex; align-items: center; gap: 5px;
  flex-wrap: wrap;
}
.p-install-close {
  all: unset;
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--p-muted);
  padding: 4px 8px;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}

/* ── Utilitaires ── */
.p-hidden { display: none; }                        /* SANS !important (compat jQuery .show/.hide) */
.p-note-empty  { color: var(--p-muted); font-size: .85rem; text-align: center; padding: 12px 0; }
.p-note-center { color: var(--p-muted); font-size: .85rem; text-align: center; }
.p-sheet-note  { color: var(--p-muted); font-size: .85rem; margin-bottom: 1rem; }
.p-sheet-text  { color: var(--p-muted); font-size: .9rem; line-height: 1.6; }
.p-modal-text  { color: var(--p-muted); font-size: .9rem; }
.p-modal-quote {
  border-left: 3px solid var(--p-line);
  margin: 12px 0;
  padding: 2px 0 2px 14px;
  text-align: left;
}
.p-modal-list  {
  color: var(--p-muted); font-size: .9rem;
  text-align: left; margin: 0; padding-left: 1.2em;
}
.p-modal-list li { margin-bottom: 2px; }
.p-loader-msg  { color: var(--p-muted); font-size: .75rem; }
.p-loader-full   { height: 100dvh; }
.p-loader-inline { height: 60vh; }
.p-error-text  { color: var(--p-terre-dk); font-size: .85rem; }
.p-join-note   { font-size: .95rem; color: var(--p-muted); }
.btn-p-primary.is-danger { background: var(--p-terre-dk); }
.btn-p-ghost.is-sm       { font-size: .78rem; padding: 5px 10px; }
.btn-p-primary.is-sm     { padding: 7px 16px; font-size: .8rem; flex-shrink: 0; }
.p-chip.is-xs { font-size: .65rem; padding: 1px 6px; }
.p-topbar-spacer  { width: 40px; }
.p-label-inline   { display: flex; align-items: center; gap: 6px; }
.p-ticket-chips   { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.p-sidebar-logout { font-size: .8rem; justify-content: flex-start; gap: 8px; }
.p-avatar-img     { overflow: hidden; }
.p-avatar-photo   { width: 100%; height: 100%; object-fit: cover; }
.p-avatar-libre-mini { width: 26px; height: 26px; border-radius: 50%; border: 1.5px dashed var(--p-muted);
                       display: inline-flex; align-items: center; justify-content: center;
                       flex-shrink: 0; opacity: .5; }
.p-player-mini-libre { color: var(--p-muted); font-style: italic; font-size: .8rem; }
.p-svg-mid { vertical-align: middle; }
.p-info-box.is-accent { background: color-mix(in srgb, var(--p-olive) 12%, var(--p-bg)); border-color: var(--p-olive); }
.p-confirm-check.is-olive { background: var(--p-olive); }
