/* ============================================================
   WILL — Nav home unifiee (profile + bienvenue logo + pills + login)
   Importer via <link rel="stylesheet" href="/assets/will-home-nav.css">.
   ============================================================ */

/* Sur le dashboard React (#root), les composants PublicHeader / OrgaHeader
   rendent leur propre <nav class="will-nav-top">. Notre partial nav est
   injecte au-dessus de #root. On cache les nav internes du dashboard pour
   eviter le doublon. */
#root nav.will-nav-top { display: none !important; }

.home-nav .container {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
}
/* Logo Will centre dans le header, toujours visible (logged-out + logged-in
   + in-space). Position absolute pour centrage exact independant des
   largeurs gauche/droite. Color violet primary (charte). */
.home-nav .nav-logo-center {
  display: inline-flex;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: var(--violet-600);
  text-decoration: none;
  pointer-events: auto;
}
.home-nav .nav-logo-center svg { display: block; }
.home-nav .nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
/* Override will.css : .auth-nav margin-left auto + min-width 130px. */
.home-nav .nav-left .auth-nav,
.home-nav .nav-right .auth-nav {
  margin-left: 0;
  min-width: 0;
  justify-content: flex-start;
}

/* ── Avatar gauche : visible seulement si connecte ET pas dans un espace
   dashboard. Dans /orga ou /photographe, on cache l avatar pour focaliser
   sur le label "Espace X" + le logo central. */
.home-nav .auth-nav-slot-left { display: none; }
.will-runner-loggedin .home-nav .auth-nav-slot-left { display: inline-flex; }
.will-in-space .home-nav .auth-nav-slot-left { display: none; }
.home-nav .auth-nav-slot-left .auth-nav-panel {
  left: 0;
  right: auto;
}
/* Dropdown panel header masqué partout (mobile + desktop) : on a basculé
   sur un modal profil centré (#profile-modal) qui s ouvre au click avatar.
   Le panel reste dans le DOM pour le wiring will-auth-nav.js, juste pas visible. */
.home-nav .auth-nav-account .auth-nav-panel { display: none !important; }

/* ============================================================
   PROFILE MODAL — bottom sheet mirror EXACT app
   (~/WillApp/App.js:9277-9522 ProfileMenuModal).
   ============================================================ */
/* Backdrop : flou frosted glass LIGHT (mirror BlurView intensity 10 tint light
   de l app). Tint blanc translucide + saturation > flou foncé : on garde la
   page derriere lisible mais désaturée et brouillée. */
.profile-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1090;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
.profile-sheet-backdrop.is-open { opacity: 1; pointer-events: auto; cursor: pointer; }

/* Bottom sheet : slide-up depuis le bas, top rounded 28, padding 22 (mirror
   s.modalSheet). Sur desktop, max-width 460 centré pour rester lisible. */
.profile-sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1100;
  background: #fff;
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  padding: 22px 22px 40px;
  padding-bottom: calc(40px + env(safe-area-inset-bottom, 0));
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
  box-shadow: 0 -8px 28px rgba(15, 7, 35, 0.18);
  touch-action: pan-y;
}
@media (min-width: 760px) {
  .profile-sheet {
    left: 50%; right: auto;
    width: 460px;
    transform: translate(-50%, 100%);
    border-radius: 28px;
    bottom: 24px;
    max-height: calc(100vh - 48px);
  }
  .profile-sheet.is-open { transform: translate(-50%, 0); }
}
.profile-sheet.is-open { transform: translateY(0); }

/* Sheet "Mes photos" : reuse styles .profile-sheet.
   Force top = 40px + safe-area + max-height bornee a la zone restante.
   100dvh (dynamic viewport) au lieu de 100vh : evite que le sheet monte
   trop haut sur iOS quand la barre Safari se masque au scroll. */
.photos-sheet {
  top: calc(40px + env(safe-area-inset-top, 0)) !important;
  max-height: calc(100dvh - 40px - env(safe-area-inset-top, 0)) !important;
}
@supports not (height: 100dvh) {
  .photos-sheet {
    max-height: calc(100vh - 40px - env(safe-area-inset-top, 0)) !important;
  }
}
@media (min-width: 760px) {
  .photos-sheet { width: 560px; top: auto !important; max-height: calc(100vh - 48px) !important; }
}
.photos-sheet-meta { display: none; }
.photos-selfie-banner { font-size: 14px; line-height: 1.45; }
.photos-selfie-banner strong { color: var(--violet-700, #5313b7); display: block; margin-bottom: 4px; }
.photos-selfie-banner small { color: #6c5b8c; display: block; font-size: 12px; }
.photos-sheet-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 12px;
}
@media (min-width: 760px) {
  .photos-sheet-grid { grid-template-columns: repeat(4, 1fr); }
}
.photos-sheet-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #E8DEFF;
  border-radius: 10px;
  overflow: hidden;
  border: none;
  padding: 0;
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}
.photos-sheet-tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.photos-sheet-status {
  text-align: center;
  color: #6c5b8c;
  font-size: 13px;
}
.photos-sheet-status[hidden] { display: none; }

/* Segmented Tous / Favoris (mirror toggle event/index.html). */
/* Segmented Moi / Mes favoris / Tous : style identique au menu accueil
   mobile (App.js pills A venir / Passes / Favoris) -> indicateur slide
   violet primary qui glisse au tab actif (transition CSS sur transform). */
.photos-sheet-seg {
  position: relative;
  display: flex;
  width: 100%;
  background: #F4EFFF;
  border-radius: 16px;
  padding: 4px;
  margin: 0 0 14px;
  box-sizing: border-box;
}
.photos-sheet-seg-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 8px) / 3);
  background: var(--violet-600, #7B2FFF);
  border-radius: 12px;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}
.photos-sheet-seg[data-active="favs"] .photos-sheet-seg-indicator { transform: translateX(100%); }
.photos-sheet-seg[data-active="all"] .photos-sheet-seg-indicator { transform: translateX(200%); }
.photos-sheet-seg-btn {
  flex: 1;
  position: relative;
  z-index: 2;
  padding: 8px 10px;
  font-family: 'Montserrat', var(--font-body);
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  border: none;
  color: var(--violet-600, #5313b7);
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s ease;
}
.photos-sheet-seg-btn.is-active {
  color: #fff;
  font-weight: 700;
}
/* Divider 1px entre deux pills non actives consecutives (parite home pills
   App.js segmented 1483/1487 + .events-tab). Indicator est le 1er enfant,
   donc on cible bien la sequence btn -> btn cote DOM. */
.photos-sheet-seg-btn:not(.is-active):has(+ .photos-sheet-seg-btn:not(.is-active)) {
  position: relative;
}
.photos-sheet-seg-btn:not(.is-active):has(+ .photos-sheet-seg-btn:not(.is-active))::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 1px;
  height: 16px;
  background: rgba(123, 47, 255, 0.3);
  pointer-events: none;
  z-index: 2;
}

/* Etoile fav overlay sur tile : top-right, fill blanc avec drop-shadow,
   mirror .thumb-fav-star event/index.html. */
.photos-sheet-tile .photos-tile-fav {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 16px;
  height: 16px;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}
.photos-sheet-tile .photos-tile-fav path { fill: #fff; stroke: none; }

/* ============================================================
   CART SHEET — bottom-sheet "Mon panier" ouvert depuis le drawer.
   Reuse .profile-sheet (slide-up + centered desktop), structure interne :
   greeting violet light AVEstiana + meta + cards par event + footer sticky
   total/checkout. Mirror visuel du /panier/ (charte violet primary #7B2FFF).
   ============================================================ */
.cart-sheet {
  top: calc(40px + env(safe-area-inset-top, 0)) !important;
  max-height: calc(100dvh - 40px - env(safe-area-inset-top, 0)) !important;
  padding: 22px 22px 0 !important;
  display: flex;
  flex-direction: column;
}
@supports not (height: 100dvh) {
  .cart-sheet {
    max-height: calc(100vh - 40px - env(safe-area-inset-top, 0)) !important;
  }
}
@media (min-width: 760px) {
  .cart-sheet { width: 560px; top: auto !important; max-height: calc(100vh - 48px) !important; }
}
.cart-sheet-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 16px;
}
.cart-sheet-meta {
  color: #6c5b8c;
  font-family: 'Montserrat', var(--font-body);
  font-size: 13px;
  margin: -8px 0 16px;
}

/* Empty state : card centree, icone violet light + titre + sous-texte. */
.cart-sheet-empty {
  background: #faf9ff;
  border-radius: 16px;
  padding: 36px 20px;
  text-align: center;
}
.cart-sheet-empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 999px;
  background: #F2EDFD;
  color: var(--violet-600, #7B2FFF);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-sheet-empty h3 {
  font-family: 'Montserrat', var(--font-body);
  font-size: 16px;
  font-weight: 800;
  color: #1A1426;
  margin: 0 0 8px;
}
.cart-sheet-empty p {
  color: #6c5b8c;
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

/* Card par event : fond #faf9ff radius 16 padding 14, header titre + meta
   + lien "Voir →" en violet primary. */
.cart-sheet-event {
  background: #faf9ff;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
}
.cart-sheet-event-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.cart-sheet-event-titles { min-width: 0; flex: 1; }
.cart-sheet-event-name {
  font-family: 'Montserrat', var(--font-body);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.2px;
  color: #1A1426;
  margin: 0 0 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cart-sheet-event-meta {
  color: #6c5b8c;
  font-family: 'Montserrat', var(--font-body);
  font-size: 12px;
}
.cart-sheet-event-link {
  color: var(--violet-600, #7B2FFF);
  text-decoration: none;
  font-family: 'Montserrat', var(--font-body);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}
.cart-sheet-event-link:hover { text-decoration: underline; }

.cart-sheet-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
@media (min-width: 760px) {
  .cart-sheet-grid { grid-template-columns: repeat(4, 1fr); }
}
.cart-sheet-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  background: #E8DEFF;
}
.cart-sheet-tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.cart-sheet-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}
.cart-sheet-remove:hover { background: rgba(0, 0, 0, 0.8); }
.cart-sheet-remove svg { width: 12px; height: 12px; }

/* Footer sticky en bas du sheet : total a gauche, Commander a droite,
   hint sous (paiement bientot). Border-top + bg #fff + safe-area. */
.cart-sheet-foot {
  border-top: 1px solid #EFEAFB;
  padding: 14px 0 calc(18px + env(safe-area-inset-bottom, 0));
  margin: 0 -22px;
  padding-left: 22px;
  padding-right: 22px;
  background: #fff;
}
.cart-sheet-foot[hidden] { display: none; }
.cart-sheet-foot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cart-sheet-total {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.cart-sheet-total-label {
  color: #6c5b8c;
  font-family: 'Montserrat', var(--font-body);
  font-size: 12px;
}
.cart-sheet-total-amount {
  font-family: 'Montserrat', var(--font-body);
  font-size: 22px;
  font-weight: 800;
  color: #1A1426;
  letter-spacing: -0.3px;
}
.cart-sheet-checkout {
  background: var(--violet-600, #7B2FFF);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-family: 'Montserrat', var(--font-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.cart-sheet-checkout:disabled {
  background: #C9BEEF;
  cursor: not-allowed;
}
.cart-sheet-foot-hint {
  text-align: center;
  color: #6c5b8c;
  font-family: 'Montserrat', var(--font-body);
  font-size: 11px;
  margin: 8px 0 0;
}

/* Viewer overlay au-dessus du sheet "Mes photos". Mirror event/index.html
   structure : scroll-snap horizontal pagine, etoile fav a droite du CTA
   Telecharger, fond blanc plein-ecran. */
.photos-viewer {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 1200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.photos-viewer.open { opacity: 1; pointer-events: auto; }
/* Stack flex column : titre > date > stage photo (flex:1) > actionbar,
   gap 10px uniforme. Responsive selon le ratio natif de chaque photo. */
.photos-viewer .pv-stack {
  position: absolute;
  inset: 0;
  padding-top: calc(env(safe-area-inset-top, 0) + 20px);
  padding-bottom: calc(env(safe-area-inset-bottom, 0) + 20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.photos-viewer .pv-center { display: contents; }
.photos-viewer .pv-header-title {
  position: absolute;
  left: 0; right: 0;
  text-align: center;
  color: var(--violet-600, #5313b7);
  font-family: 'AV Estiana', 'Montserrat', var(--font-body);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1.1;
  padding: 0 20px;
  box-sizing: border-box;
  pointer-events: none;
  transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}
.photos-viewer .pv-header-date {
  position: absolute;
  left: 0; right: 0;
  text-align: center;
  color: #000;
  font-family: 'Montserrat', var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2px;
  line-height: 1;
  pointer-events: none;
  transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}
/* Counter caché sur mobile (mirror app -- pas de compteur visible dans le
   viewer), petit indicateur uniquement desktop top-left. */
.photos-viewer .pv-counter { display: none; }
@media (min-width: 760px) {
  .photos-viewer .pv-counter {
    display: inline-block;
    position: absolute;
    top: calc(env(safe-area-inset-top, 0) + 16px);
    left: 16px;
    color: #6c5b8c;
    font-size: 12px;
    pointer-events: none;
  }
}
.photos-viewer .pv-close {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0) + 4px);
  right: 12px;
  width: 40px; height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 20;
  padding: 0;
}
.photos-viewer .pv-close svg { width: 26px; height: 26px; display: block; }
.photos-viewer .pv-stage {
  width: 100%;
  height: auto;
  position: relative;
  overflow: hidden;
}
.photos-viewer .pv-track {
  display: flex;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.photos-viewer .pv-track::-webkit-scrollbar { display: none; }
.photos-viewer .pv-slide {
  flex: 0 0 100%;
  width: 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  box-sizing: border-box;
}
.photos-viewer .pv-photo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
}
.photos-viewer .pv-img {
  max-width: 100%;
  max-height: calc(100dvh - 156px - env(safe-area-inset-top, 0) - env(safe-area-inset-bottom, 0));
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 18px;
  background: #f5f5f5;
  user-select: none;
  -webkit-user-drag: none;
}
@supports not (height: 100dvh) {
  .photos-viewer .pv-img {
    max-height: calc(100vh - 156px - env(safe-area-inset-top, 0) - env(safe-area-inset-bottom, 0));
  }
}
.photos-viewer .pv-actionbar {
  position: absolute;
  left: 0; right: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 10px;
  box-sizing: border-box;
  transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}
/* Loader "Chargement…" visible tant que la photo de la slide courante
   n est pas decodee. */
.photos-viewer .pv-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c5b8c;
  font-family: 'Montserrat', var(--font-body);
  font-size: 14px;
  font-weight: 500;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.photos-viewer.is-loading .pv-loader { opacity: 1; }
.photos-viewer.is-loading .pv-header-title,
.photos-viewer.is-loading .pv-header-date,
.photos-viewer.is-loading .pv-actionbar { opacity: 0; pointer-events: none; }
.photos-viewer .pv-actionbar > * { pointer-events: auto; }
.photos-viewer .pv-cta {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  background: var(--violet-600, #7B2FFF);
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  font-family: 'Montserrat', var(--font-body);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(123, 47, 255, 0.35);
  white-space: nowrap;
}
.photos-viewer .pv-cta svg { width: 18px; height: 18px; display: block; }
.photos-viewer .pv-right {
  display: flex;
  justify-content: flex-start;
  padding-left: 12px;
}
.photos-viewer .pv-fav {
  width: 40px; height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
}
.photos-viewer .pv-fav svg { width: 22px; height: 22px; display: block; }
.photos-viewer .pv-fav svg path { fill: none; stroke: #c9beed; stroke-width: 1.6; stroke-linejoin: round; }
.photos-viewer .pv-fav.is-active svg path { fill: var(--violet-600, #5313b7); stroke: var(--violet-600, #5313b7); }

/* Handle drag (mirror s.modalHandle : 40x4 #D0CCE3 alignSelf center
   marginBottom 18). Click sur la zone du handle ferme le sheet. */
/* Bouton retour ← retire 2026-06-09 : le backdrop click et ESC suffisent
   a fermer le modal. */

.profile-sheet-scroll { display: block; }

/* Greeting AVEstiana 26 color #c9beed marginBottom 20 marginTop 4 (mirror
   app : Text style[s.welcome, color #c9beed marginBottom 20 fontSize 26]). */
.profile-sheet-greeting {
  font-family: 'AV Estiana', 'Inter', serif;
  font-size: 26px;
  font-weight: 700;
  color: #c9beed;
  margin: 4px 0 20px;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

/* Cards #faf9ff radius 16 padding 16 marginBottom 12 (mirror
   profileCardStyles.card App.js:9714-9716). */
.profile-card {
  background: #faf9ff;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
}

/* Selfie row : thumb 56x56 round + label "Selfie" + state à droite.
   Gap 14 (mirror app). */
.profile-card-selfie {
  display: flex;
  align-items: center;
  gap: 14px;
}
.profile-selfie-thumb {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--violet-100, #E8DEFF);
  color: var(--violet-600, #7B2FFF);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  /* Bouton clickable : tap -> ouvre la modal selfie web (retake). */
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}
.profile-selfie-thumb:hover {
  transform: scale(1.04);
  box-shadow: 0 2px 8px rgba(123, 47, 255, 0.25);
}
.profile-selfie-thumb:active { transform: scale(0.97); }
.profile-selfie-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.profile-selfie-thumb svg { display: block; }
.profile-selfie-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.profile-selfie-label {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-900, #0A0A0A);
}
.profile-selfie-state {
  font-family: 'Montserrat', var(--font-body, 'Inter', sans-serif);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-600, #6c5b8c);
}
.profile-selfie-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.profile-selfie-link {
  background: transparent;
  border: none;
  padding: 2px 0;
  color: var(--violet-600, #7B2FFF);
  font-family: 'Montserrat', var(--font-body, 'Inter', sans-serif);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.profile-selfie-link:hover {
  color: var(--violet-700, #5B1FBF);
  text-decoration: underline;
}
.profile-selfie-link[hidden] { display: none; }

/* Infos rows : flex space-between, label gauche + valeur droite, divider
   hairline #f0eaff (mirror InfoRow App.js:9525-9536). */
.profile-card-infos { padding: 6px 16px; }
.profile-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  gap: 12px;
}
.profile-info-label {
  color: var(--ink-600, #6c5b8c);
  font-size: 14px;
  flex-shrink: 0;
}
.profile-info-val {
  color: var(--ink-900, #0A0A0A);
  font-size: 14px;
  font-weight: 500;
  text-align: right;
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Note d édition : mirror profil/index.html .profil-link-note. */
.profile-edit-note {
  display: block;
  padding: 12px 14px;
  margin: 0 0 14px;
  border-radius: 12px;
  background: var(--violet-050, #f5f3ff);
  color: var(--ink-600, #6c5b8c);
  font-size: 13px;
  line-height: 1.4;
}
.profile-edit-note strong { color: var(--violet-700, #5a1fcc); font-weight: 600; }

/* Liens d action : centrés. Logout = rouge error 14/600, supprimer face =
   violet underline 13/600, supprimer compte = textSoft underline 12.
   Mirror App.js:9496-9516. */
.profile-link {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  text-align: center;
  cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.profile-link-logout {
  color: #DC2626;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 0;
  margin-top: 8px;
}
.profile-link-logout:hover { color: #B91C1C; }
.profile-link-face {
  color: #7B2FFF;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 0;
  margin-top: 6px;
  text-decoration: underline;
}
.profile-link-account {
  color: rgba(123, 47, 255, 0.45);
  font-size: 12px;
  padding: 4px 0;
  margin-top: 2px;
  text-decoration: underline;
}

/* Modal profil : override le auth-nav-panel pour qu il rende en BLOCK statique
   à l interieur du sheet (au lieu du dropdown absolu). Avatar caché. */
#profile-modal .auth-nav-panel,
#profile-modal .auth-nav-panel[hidden] {
  display: block !important;
  position: static;
  width: 100%;
  max-width: 100%;
  max-height: none;
  overflow-y: visible;
  box-shadow: none;
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 0;
  animation: none;
  background: transparent;
}
#profile-modal .auth-nav-avatar { display: none !important; }
#profile-modal .auth-nav-greeting { display: none !important; }
/* Anciennes classes auth-nav-card du panel dropdown : on les neutralise
   dans le sheet (on a refait .profile-card par dessus). */
#profile-modal .auth-nav-card { all: unset; display: block; }
/* Avatar : juste l icone SVG light purple, sans conteneur rond. */
.home-nav .auth-nav-avatar {
  position: relative;
  width: auto;
  height: auto;
  background: transparent;
  color: #c9beed;
  border: none;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.15s ease;
  /* Centre l icone SVG ou l avatar-img selfie verticalement dans le
     header (sans flex le button caleait sur la baseline du contenu). */
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.home-nav .auth-nav-avatar:hover { color: #b8a8e6; background: transparent; }
.home-nav .auth-nav-avatar svg { width: 24px; height: 22px; display: block; }
/* Logged-in : avatar plus grand pour matcher la presence visuelle du logo
   (32px) cote logout. Couleur reste light purple, accord avec le "Hello prenom"
   inheritant la meme teinte sur .nav-welcome. */
.will-runner-loggedin .home-nav .auth-nav-avatar svg { width: 34px; height: 32px; }
.will-runner-loggedin .home-nav .auth-nav-avatar .selfie-dot {
  width: 12px;
  height: 12px;
}
/* Pastille verte selfie : visible si .will-has-selfie sur <html>. */
.home-nav .auth-nav-avatar .selfie-dot {
  display: none;
  position: absolute;
  top: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10B981;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.05);
}
.will-has-selfie .home-nav .auth-nav-avatar .selfie-dot { display: block; }

/* Avatar selfie : remplace l icone SVG par la vignette circulaire du
   selfie du runner connecte. Inseree par will-auth-nav.js#applyAvatarSelfie
   apres GET /runner/selfie. La pastille verte selfie-dot devient redondante
   et est cachee. */
.home-nav .auth-nav-avatar .auth-nav-avatar-img {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #c9beed;
  background: #1A0A3E;
}
.will-runner-loggedin .home-nav .auth-nav-avatar .auth-nav-avatar-img {
  width: 34px;
  height: 34px;
}
.home-nav .auth-nav-avatar:has(.auth-nav-avatar-img) .selfie-dot { display: none !important; }

/* Welcome : "Bienvenue sur Will" (non logge) OU "Hello <prenom>" (logge),
   tout en light purple, police AV Estiana (charte mobile). */
.home-nav .nav-welcome {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #c9beed;
  text-decoration: none;
  font-family: 'AV Estiana', 'Inter', serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.home-nav .nav-welcome:hover { text-decoration: none; color: #c9beed; }
/* Logged-out : .nav-welcome est vide (le logo est dans .nav-logo-center).
   Hide pour eviter un link invisible parasite (a11y noise). */
.home-nav .nav-welcome { display: none; }
.will-runner-loggedin .home-nav .nav-welcome,
.will-in-space .home-nav .nav-welcome { display: inline-flex; }
/* Mutual exclusion welcome :
   - Defaut : "Bienvenue sur <logo Will>"
   - .will-runner-loggedin : "Hello <prenom>"
   - .will-in-space : "Espace organisateur/photographe" (prend la priorite) */
.home-nav .nav-welcome-hello,
.home-nav .nav-welcome-space { display: none; }
.will-runner-loggedin .home-nav .nav-welcome-hello { display: inline; }
.will-runner-loggedin .home-nav .nav-welcome-text { display: none; }
/* Logo reste visible meme logge (logique branding standard).
   Le link .nav-welcome contient alors [Logo] [Hello prenom] cote a cote. */
.will-in-space .home-nav .nav-welcome-space { display: inline; }
.will-in-space .home-nav .nav-welcome-hello,
.will-in-space .home-nav .nav-welcome-text,
.will-in-space .home-nav .nav-welcome-logo { display: none; }
/* "Espace photographe / organisateur" : titre de la page, taille
   bien marquee pour signaler le contexte de l espace. */
.will-in-space .home-nav .nav-welcome-space {
  font-size: 20px;
  letter-spacing: -0.01em;
}

/* ── Right : label Espaces + pills + bouton Se connecter ── */
.home-nav .nav-right {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
/* Label "Espaces" a l interieur du conteneur, italique et meme ton que
   le welcome (#c9beed light purple). */
.home-nav .nav-right-label {
  display: inline-flex;
  align-items: center;
  color: #c9beed;
  font-style: italic;
  font-size: 13px;
  font-weight: 600;
  padding: 0 8px 0 12px;
  white-space: nowrap;
}
/* Pills group : conteneur transparent, label "Espaces" + sous-wrapper
   .nav-pills-links qui contient les pills (avec liseré sur la home). */
.home-nav .nav-pills-group {
  display: inline-flex;
  align-items: center;
  background: transparent;
  padding: 4px;
  gap: 6px;
}
/* Combo pill Orga + Photographe : un seul container rose avec 2 actions
   separees par un divider blanc translucide. */
.home-nav .nav-pills-links {
  display: inline-flex;
  align-items: stretch;
  height: 32px;
  background: var(--orga-600);
  border-radius: 999px;
  overflow: hidden;
}
.home-nav .nav-pill-orga {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  color: #FFF5FF;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.home-nav .nav-pill-orga + .nav-pill-orga {
  border-left: 1px solid rgba(255, 255, 255, 0.35);
}
/* Icone SVG dans la pill : cachee par defaut, montree sous 540px (cf media). */
.home-nav .nav-pill-icon {
  display: none;
  flex-shrink: 0;
}
.home-nav .nav-pill-orga:hover {
  background: var(--orga-800);
  color: #fff;
  text-decoration: none;
}
/* Etat actif : la page courante est l espace correspondant. Pas de
   box-shadow ici (le pill est dans un container, le halo deborderait). */
.home-nav .nav-pill-orga.is-active {
  background: var(--orga-800);
  color: #fff;
}
.home-nav .nav-pill-orga.is-active:hover {
  background: var(--orga-800);
}

/* ── Panier dans la nav (desktop) ───────────────────────────────────
   Icon-only pill ronde, visible quand cart agrege > 0 via JS qui
   toggle l attribut hidden du badge.  */
.home-nav .nav-pill-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  text-decoration: none;
  position: relative;
  flex-shrink: 0;
  transition: background 0.15s ease;
}
.home-nav .nav-pill-cart:hover {
  background: rgba(255, 255, 255, 0.28);
  text-decoration: none;
  color: #fff;
}
.home-nav .nav-pill-cart .nav-pill-label { display: none; }
.home-nav .nav-pill-cart .nav-pill-icon { display: block; }
.home-nav .nav-cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #D67CF8;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  border: 2px solid var(--violet-900, #2A0A5A);
}
.home-nav .nav-cart-badge[hidden] { display: none; }
/* En mobile, le pill panier est dans le burger drawer (cf .burger-drawer-link-cart) */
@media (max-width: 540px) {
  .home-nav .nav-pill-cart { display: none; }
}
/* Burger drawer "Mon panier" : meme charte que les autres liens du drawer
   (.burger-drawer-link) -> bouton transparent, texte ink-deep, padding 8px,
   radius 10, hover violet light. Icone Panier reduite (18px) + count badge
   violet primary compact a droite. Hidden tant que le panier est vide via
   [data-cart-row][hidden]. */
.burger-drawer-cart-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 10px;
  margin-bottom: 6px;
  width: 100%;
  appearance: none;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(123, 47, 255, 0.12);
  border-radius: 10px 10px 0 0;
  text-decoration: none;
  color: #1a0a3e;
  font-family: 'Montserrat', var(--font-body);
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, color 0.15s ease;
}
.burger-drawer-cart-row[hidden] { display: none !important; }
.burger-drawer-cart-row:hover {
  background: rgba(123, 47, 255, 0.08);
  color: var(--violet-700);
}
.burger-drawer-cart-row:focus-visible {
  outline: 2px solid var(--violet-300);
  outline-offset: 2px;
}
.burger-drawer-cart-label {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  color: inherit;
}
.burger-drawer-cart-count {
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--violet-600, #7B2FFF);
  color: #fff;
  font-family: 'Montserrat', var(--font-body);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  box-sizing: border-box;
  flex-shrink: 0;
}
.burger-drawer-cart-icon {
  width: 20px;
  height: 20px;
  color: var(--violet-600, #7B2FFF);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.burger-drawer-cart-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* Slot login droite : visible seulement si PAS connecte runner ET
   PAS dans un espace orga/photo (pas besoin de "Se connecter" runner
   quand on est deja sur un dashboard pro). */
.home-nav .auth-nav-slot-right { display: inline-flex; }
.will-runner-loggedin .home-nav .auth-nav-slot-right,
.will-in-space .home-nav .auth-nav-slot-right { display: none; }
/* Combo pill "Se connecter | S inscrire" : container violet avec 2 boutons
   internes separes par un divider, chaque bouton ouvre le runner modal sur
   le tab correspondant via data-runner-open. */
.home-nav .auth-nav-login-pill {
  display: inline-flex;
  align-items: stretch;
  height: 32px;
  background: var(--violet-600);
  border-radius: 999px;
  overflow: hidden;
  transition: background 0.15s ease;
}
.home-nav .auth-nav-login-pill button {
  appearance: none;
  border: none;
  background: transparent;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 0 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
}
.home-nav .auth-nav-login-pill button + button {
  border-left: 1px solid rgba(255, 255, 255, 0.35);
}
.home-nav .auth-nav-login-pill button:hover {
  background: var(--violet-700);
}

/* Reset font-family des boutons nav-pill-orga (heritent inherit du form
   parent qui peut avoir un autre stack). */
.home-nav .nav-pill-orga { font-family: inherit; }

/* Bouton "Deconnexion" visible uniquement sur les espaces orga/photo.
   Texte + contour rouge clair pour ressortir sur la nav violet fonce
   et signaler l action destructive. */
.home-nav .space-logout-btn { display: none; }
.will-in-space .home-nav .space-logout-btn {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 107, 107, 0.55);
  background: transparent;
  color: #ff6b6b;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.will-in-space .home-nav .space-logout-btn:hover {
  background: rgba(255, 107, 107, 0.12);
  border-color: #ff6b6b;
}

@media (max-width: 880px) {
  .home-nav .nav-welcome-text { display: none; }
  .home-nav .nav-right-label { display: none; }
  .home-nav .nav-pill-orga,
  .home-nav .auth-nav-login-pill button { padding: 0 12px; font-size: 12px; }
}
@media (max-width: 760px) {
  /* Mobile + petites tablettes portrait : le burger drawer (droite) absorbe
     tous les liens (Espaces, Mes photos, compte, deconnexion). Header epure :
     seul le bouton burger reste a droite. En NON connecte, le logo Will est
     repositionne a gauche. En connecte, le logo est cache aussi (header =
     burger seul). "Hello prenom" n est PAS affiche (acces via Profil du
     drawer). Breakpoint a 760px (au lieu de 540) pour couvrir iPhone landscape
     + ne pas laisser apparaitre "Hello" en gris pale sur la galerie event. */
  /* Specificite doublee (nav.home-nav) pour override le display: none
     declare plus loin dans le bloc BURGER DRAWER (cascade: meme specificite,
     ordre = la derniere gagne sinon). */
  nav.home-nav .burger-toggle { display: inline-flex; }
  .home-nav .nav-pills-group,
  .home-nav .auth-nav-slot-right,
  .home-nav .space-logout-btn,
  .home-nav .will-mes-photos-pill { display: none; }
  /* Slot avatar gauche : cache en mobile (loggué ET non loggué). Le header
     mobile passe a la structure [logo] (gap auto) [Hello\nPrenom] [burger]
     -- l avatar n a plus de place et le "Hello" devient le marqueur d auth. */
  .home-nav .auth-nav-slot-left,
  .will-runner-loggedin .home-nav .auth-nav-slot-left { display: none !important; }
  /* "Hello prenom" inline gauche cache aussi (le nav-mobile-hello le
     remplace cote droit, lisible sur fond clair). */
  .home-nav .nav-welcome-hello,
  .will-runner-loggedin .home-nav .nav-welcome-hello { display: none; }
  /* Logo a GAUCHE en mobile : position static + transform reset pour
     casser le centrage absolute. Reste en flex-flow normal de .container
     (premier element non-empty visible). */
  .home-nav .nav-logo-center {
    position: static;
    transform: none;
    left: auto;
    top: auto;
  }
  /* nav-mobile-hello : 2 lignes ("Hello" / "{prenom}") a gauche du
     burger, visible uniquement si logged-in. */
  .will-runner-loggedin .home-nav .nav-mobile-hello { display: inline-flex; }
  /* Compression .nav-welcome -- utile uniquement pour .nav-welcome-space
     (cas will-in-space). Le hello/text/logo sont caches sinon. */
  .home-nav .nav-welcome {
    max-width: calc(100vw - 80px);
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /* nav-left : autorise compression si .nav-welcome-space est long (in-space). */
  .home-nav .nav-left { flex-shrink: 1; min-width: 0; }
}

/* ============================================================
   BURGER DRAWER (mobile menu, glassmorphism)
   Bouton burger : cache desktop (display: none par defaut), visible
   uniquement sous 540px via la media query ci-dessus.
   Drawer : ouvert via .is-open, slide-in 280ms depuis la droite,
   backdrop blur (givre iOS-like) sur le reste de la page.
   ============================================================ */
/* "Hello\n{prenom}" mobile (visible uniquement <= 760px + logged-in via
   les regles de la media query). 2 lignes empilees, line-height tight,
   typo sober alignee a droite, jouxte le burger. */
.home-nav .nav-mobile-hello {
  display: none;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  margin-left: auto;
  margin-right: 6px;
  font-family: 'AV Estiana', 'Montserrat', sans-serif;
  font-size: 15px;
  line-height: 0.9;
  color: #c9beed;
  text-align: right;
  white-space: nowrap;
}
.home-nav .nav-mobile-hello-name { font-size: 17px; }

/* Pastille selfie sur le burger : indique l etat du selfie sans avoir a
   ouvrir le drawer. Visible uniquement mobile + logged-in. Rouge par
   defaut (selfie manquant -> CTA visuel), vert si .will-has-selfie. */
.home-nav .burger-toggle .burger-selfie-dot {
  display: none;
  position: absolute;
  top: 4px;
  right: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.05);
  pointer-events: none;
}
.will-runner-loggedin .home-nav .burger-toggle .burger-selfie-dot { display: block; }
.will-has-selfie .home-nav .burger-toggle .burger-selfie-dot { background: #10B981; }

.home-nav .burger-toggle {
  display: none;
  position: relative;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--violet-700);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.18s ease;
}
.home-nav .burger-toggle:hover { background: var(--violet-100); }
.home-nav .burger-toggle:focus-visible {
  outline: 2px solid var(--violet-300);
  outline-offset: 2px;
}
.home-nav .burger-toggle svg { display: block; }

/* Montserrat (utilise par le drawer mobile pour les liens du menu).
   Source copiee depuis l app mobile WillApp/assets/fonts/. */
@font-face {
  font-family: 'Montserrat';
  src: url('/fonts/Montserrat-VF.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

.burger-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 949;
  background: rgba(15, 7, 35, 0.45);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
.burger-drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.burger-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(340px, 88vw);
  z-index: 950;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-left: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: -8px 0 32px rgba(15, 7, 35, 0.22);
  padding: 22px 20px 28px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.burger-drawer.is-open { transform: translateX(0); }

.burger-drawer-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #1a0a3e;
  cursor: pointer;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.burger-drawer-close:hover { background: rgba(0, 0, 0, 0.06); }
.burger-drawer-close:focus-visible {
  outline: 2px solid var(--violet-300);
  outline-offset: 2px;
}

/* Logo Will en haut du drawer (remplace le greeting "Hello prenom"). */
.burger-drawer-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 4px 0 8px;
  color: var(--violet-700);
}
.burger-drawer-header svg.burger-drawer-logo { display: block; height: 38px; width: auto; }
/* Greeting "Hello {prenom}" : visible UNIQUEMENT si loggué, en remplacement
   du logo Will dans le header du drawer. AVEstiana, taille proche du logo
   (38 px ~ 26 px de cap), color violet-700 pour ressortir sur le drawer glass. */
.burger-drawer-greeting {
  display: none;
  margin: 0;
  font-family: 'AV Estiana', 'Inter', serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  color: var(--violet-700);
  letter-spacing: -0.01em;
}
.will-runner-loggedin .burger-drawer-header svg.burger-drawer-logo { display: none; }
.will-runner-loggedin .burger-drawer-greeting { display: block; }

.burger-drawer-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.burger-drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0;
}

.burger-drawer-link {
  display: block;
  appearance: none;
  border: none;
  background: transparent;
  color: #1a0a3e;
  text-align: left;
  padding: 8px 8px;
  font-family: 'Montserrat', var(--font-body);
  font-size: 14px;
  font-weight: 500;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.burger-drawer-link:hover {
  background: rgba(123, 47, 255, 0.08);
  text-decoration: none;
  color: var(--violet-700);
}
.burger-drawer-link:focus-visible {
  outline: 2px solid var(--violet-300);
  outline-offset: 2px;
}
.burger-drawer-link-muted { color: #6c5b8c; font-size: 14px; font-weight: 600; }
/* Liens Espaces orga / photo en rose charte (#D67CF8 brand). */
.burger-drawer-link-rose { color: #D67CF8; }
.burger-drawer-link-rose:hover { color: #B654DA; background: rgba(214, 124, 248, 0.08); }
.burger-drawer-link-danger { color: #6c5b8c; font-size: 13px; font-weight: 400; padding: 8px; }
.burger-drawer-link-danger:hover { color: #c43; background: rgba(196, 51, 51, 0.06); }

/* 1ere zone du drawer (logged-in) : 2 actions empilees a GAUCHE (Mon compte
   + Mes photos) alignees pixel-pres avec les liens en dessous, selfie XL a
   DROITE + pastille selfie en haut-droite du thumb. */
.burger-drawer-profile-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 8px;
  border-top: 1px solid rgba(123, 47, 255, 0.12);
  border-bottom: 1px solid rgba(123, 47, 255, 0.12);
  margin: 4px 0;
}
.burger-drawer-profile-thumb {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #F4EFFF;
  color: var(--violet-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid #E5DBFF;
  /* Pas d overflow:hidden : laisse la pastille deborder en haut-droite. */
}
.burger-drawer-profile-thumb svg { display: block; }
.burger-drawer-profile-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}
.burger-drawer-profile-actions {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
}
.burger-drawer-profile-action {
  appearance: none;
  background: transparent;
  border: none;
  padding: 4px 0;
  text-align: left;
  font-family: 'Montserrat', var(--font-body);
  font-weight: 600;
  font-size: 15px;
  color: #1a0a3e;
  line-height: 1.15;
  cursor: pointer;
  text-decoration: none;
  border-radius: 6px;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s ease, background 0.15s ease;
}
.burger-drawer-profile-action:hover {
  color: var(--violet-700);
  background: rgba(123, 47, 255, 0.06);
  text-decoration: none;
}
.burger-drawer-profile-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.05);
  pointer-events: none;
}
.will-has-selfie .burger-drawer-profile-dot { background: #10B981; }

.burger-drawer-actions { padding-top: 4px; gap: 4px; }
.burger-drawer-auth { gap: 10px; }

.burger-cta {
  appearance: none;
  border: none;
  background: var(--violet-600);
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  font-family: 'Montserrat', var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}
.burger-cta:hover { background: var(--violet-700); }
.burger-cta-secondary {
  appearance: none;
  border: 1px solid var(--violet-300);
  background: transparent;
  color: var(--violet-700);
  padding: 12px 16px;
  border-radius: 12px;
  font-family: 'Montserrat', var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}
.burger-cta-secondary:hover { background: var(--violet-050); }

/* Toggle connecte / non-connecte (pilote par .will-runner-loggedin sur html). */
.burger-drawer-loggedin-only { display: none; }
.will-runner-loggedin .burger-drawer-loggedin-only { display: flex; }
.will-runner-loggedin a.burger-drawer-loggedin-only,
.will-runner-loggedin button.burger-drawer-loggedin-only { display: block; }
.burger-drawer-loggedout-only { display: flex; }
.will-runner-loggedin .burger-drawer-loggedout-only { display: none; }

/* ============================================================
   MODAL ESPACES — overlay backdrop-blur + carte centree.
   ============================================================ */
.spaces-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(15, 7, 35, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.spaces-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}
.spaces-modal {
  position: fixed;
  z-index: 1000;
  top: 50%;
  left: 50%;
  width: calc(100vw - 32px);
  max-width: 460px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(15, 7, 35, 0.28);
  padding: 28px 26px 26px;
  opacity: 0;
  transform: translate(-50%, -45%) scale(0.96);
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.spaces-modal.is-open {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.spaces-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--ink-600);
  padding: 6px;
  border-radius: 50%;
  transition: background 0.15s ease, color 0.15s ease;
}
.spaces-modal-close:hover {
  background: var(--violet-050);
  color: var(--ink-900);
}
.spaces-modal-title {
  font-family: 'AV Estiana', 'Inter', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--orga-800);
  margin: 0 0 14px;
  text-align: center;
}
/* Runner modal : titre en violet (le Spaces modal reste en rose orga). */
#runner-modal-title { color: var(--violet-600); }
.spaces-tabs {
  display: flex;
  background: var(--violet-050);
  border-radius: 999px;
  padding: 4px;
  margin: 0 0 18px;
}
.spaces-tab {
  flex: 1;
  appearance: none;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-600);
  padding: 9px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.spaces-tab.is-active {
  background: #fff;
  color: var(--orga-800);
  box-shadow: 0 2px 6px rgba(217, 107, 232, 0.18);
}
.spaces-form { display: none; }
.spaces-form.is-active { display: block; }
.spaces-form-sub {
  color: var(--ink-600);
  font-size: 13px;
  margin: 0 0 14px;
  text-align: center;
}
.spaces-label {
  display: block;
  margin-bottom: 12px;
}
.spaces-label > span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-600);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 5px;
}
.spaces-label .spaces-optional {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-400);
}
.spaces-label input {
  width: 100%;
  height: 42px;
  box-sizing: border-box;
  padding: 0 14px;
  background: #fff;
  border: 1.5px solid var(--ink-200);
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink-900);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.spaces-label input:focus {
  border-color: var(--violet-600);
  box-shadow: 0 0 0 3px rgba(123, 47, 255, 0.12);
}
.spaces-form-error {
  background: rgba(239, 68, 68, 0.08);
  color: #B91C1C;
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 12px;
}
.spaces-submit {
  display: block;
  width: 100%;
  appearance: none;
  border: none;
  background: var(--orga-600);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 13px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.spaces-submit:hover { background: var(--orga-800); }
.spaces-submit:disabled { background: #f0c8f5; cursor: wait; }
/* Runner modal : bouton submit en violet primary (aligne sur le titre). */
#runner-modal .spaces-submit { background: var(--violet-600); }
#runner-modal .spaces-submit:hover { background: var(--violet-700); }
#runner-modal .spaces-submit:disabled { background: var(--violet-300); }
.spaces-form-foot {
  text-align: center;
  font-size: 13px;
  color: var(--ink-600);
  margin: 14px 0 0;
}
.spaces-form-foot a {
  color: var(--violet-600);
  font-weight: 700;
}

/* ── Photo : etape 1 selection event + etape 2 PIN ── */
.spaces-photo-step { display: none; }
.spaces-photo-step.is-active { display: block; }

/* Search bar dans la modal Photo */
.spaces-photo-search {
  position: relative;
  margin-bottom: 12px;
}
.spaces-photo-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-400);
  pointer-events: none;
}
.spaces-photo-search input {
  width: 100%;
  height: 40px;
  box-sizing: border-box;
  padding: 0 14px 0 36px;
  background: var(--violet-050);
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink-900);
  outline: none;
}
.spaces-photo-search input:focus {
  box-shadow: 0 0 0 3px rgba(123, 47, 255, 0.12);
}

/* Liste events scrollable */
.spaces-event-list {
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 4px;
}
.spaces-event-loading,
.spaces-event-empty,
.spaces-event-error {
  text-align: center;
  color: var(--ink-600);
  font-size: 13px;
  padding: 20px 0;
}
.spaces-event-error p {
  margin: 0 0 10px;
  padding: 0 8px;
}
.spaces-event-retry {
  display: inline-flex;
  align-items: center;
  background: transparent;
  border: 1px solid var(--ink-300);
  color: var(--ink-700);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  padding: 6px 16px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.spaces-event-retry:hover {
  border-color: var(--violet-500);
  background: var(--violet-050);
}
/* Section "saisis ton code event" — B3, separateur fin du contenu liste. */
.spaces-event-fallback {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--ink-200);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.spaces-event-fallback-label span {
  font-size: 12px;
  color: var(--ink-600);
  font-weight: 600;
}
.spaces-event-fallback-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--ink-300);
  border-radius: 10px;
  font-family: inherit;
  font-size: 16px;
  background: #fff;
  color: var(--ink-900);
  box-sizing: border-box;
}
.spaces-event-fallback-input:focus {
  outline: none;
  border-color: var(--violet-500);
  box-shadow: 0 0 0 3px rgba(123, 47, 255, 0.12);
}
.spaces-event-fallback-error {
  color: var(--error);
  font-size: 12px;
}
.spaces-event-fallback-submit {
  align-self: flex-end;
  background: var(--violet-600);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 8px 18px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}
.spaces-event-fallback-submit:hover {
  background: var(--violet-700);
}
.spaces-event-card {
  display: block;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.spaces-event-card:hover {
  border-color: var(--violet-300);
  background: var(--violet-050);
  transform: translateY(-1px);
}
.spaces-event-card-name {
  color: var(--ink-900);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}
.spaces-event-card-meta {
  color: var(--ink-600);
  font-size: 12px;
}

/* Etape PIN : header event + back + 4 dots */
.spaces-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--violet-600);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 4px;
  margin-bottom: 8px;
}
.spaces-back:hover { color: var(--violet-700); }
.spaces-event-selected {
  background: var(--violet-050);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.spaces-event-selected .spaces-event-name {
  color: var(--ink-900);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 2px;
}
.spaces-event-selected .spaces-event-meta {
  color: var(--ink-600);
  font-size: 12px;
}

.spaces-pin-dots {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 14px 0 18px;
}
.spaces-pin-dots.shake {
  animation: spacesPinShake 0.35s ease;
}
@keyframes spacesPinShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}
.spaces-pin-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--violet-300);
  background: transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.spaces-pin-dot.is-filled {
  background: var(--violet-600);
  border-color: var(--violet-600);
  transform: scale(1.1);
}
/* Pavé numérique PIN : grille 3 colonnes, 4 lignes. */
.spaces-pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 280px;
  margin: 0 auto 6px;
}
.spaces-pin-key {
  appearance: none;
  border: none;
  background: var(--violet-050);
  color: var(--ink-900);
  font-family: inherit;
  font-size: 22px;
  font-weight: 600;
  height: 56px;
  border-radius: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s ease, transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}
.spaces-pin-key:hover { background: var(--violet-100); }
.spaces-pin-key:active { background: var(--violet-300); color: #fff; transform: scale(0.96); }
.spaces-pin-key-spacer {
  background: transparent;
  pointer-events: none;
  cursor: default;
}
.spaces-pin-key-spacer:hover,
.spaces-pin-key-spacer:active { background: transparent; transform: none; }
.spaces-pin-key-del { color: var(--ink-600); }
.spaces-pin-key-del svg { display: block; }

/* ============================================================
   RUNNER MODAL — tabs Connexion / Inscription, palette violet.
   Le pattern visuel suit celui du modal Espaces (orga/photo) mais
   en violet primary (la modal runner est cote coureur).
   ============================================================ */
#runner-modal .spaces-tab.is-active {
  color: var(--violet-600);
  box-shadow: 0 2px 6px rgba(123, 47, 255, 0.18);
}

/* Tab Inscription : grille prenom/nom + checkbox CGU + bloc ville. */
.spaces-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.spaces-field-row .spaces-label { margin-bottom: 12px; }

.spaces-field-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 14px;
  font-size: 12px;
  color: var(--ink-600);
  line-height: 1.4;
}
.spaces-field-checkbox input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: var(--violet-600);
  cursor: pointer;
}
.spaces-field-checkbox label { cursor: pointer; }
.spaces-field-checkbox a {
  color: var(--violet-600);
  font-weight: 600;
}

/* Bloc ville (suggestions / selected / fallback) sous l input code postal. */
.spaces-city-block {
  margin: -4px 0 12px;
}
.spaces-city-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.spaces-city-suggestions button {
  appearance: none;
  background: var(--violet-050);
  color: var(--violet-700);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.spaces-city-suggestions button:hover {
  background: var(--violet-100);
  border-color: var(--violet-300);
}
.spaces-city-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--violet-050);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--ink-900);
}
.spaces-city-selected button {
  background: transparent;
  border: none;
  color: var(--violet-600);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
}
.spaces-city-selected button:hover { color: var(--violet-700); }
.spaces-city-fallback {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}
.spaces-city-fallback p {
  margin: 0;
  font-size: 12px;
  color: var(--ink-600);
}
.spaces-city-fallback input {
  width: 100%;
  height: 38px;
  box-sizing: border-box;
  padding: 0 12px;
  background: #fff;
  border: 1.5px solid var(--ink-200);
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink-900);
  outline: none;
}
.spaces-city-fallback input:focus {
  border-color: var(--violet-600);
  box-shadow: 0 0 0 3px rgba(123, 47, 255, 0.12);
}
.spaces-city-fallback button {
  align-self: flex-end;
  background: var(--violet-600);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.spaces-city-fallback button:hover { background: var(--violet-700); }
