/* Feuille de style unique. Mobile d'abord : tout est dimensionne pour un iPhone tenu
   a une main, et l'ecran large n'est qu'un cas particulier traite a la fin.

   Les couleurs passent toutes par des variables. Le theme sombre n'est pas une
   surcouche : c'est le meme jeu de variables avec d'autres valeurs, ce qui evite
   les oublis de contraste. */

:root {
  --piste-claude: #2563EB;
  --piste-valide: #1E8E3E;
  --h-entete: 56px;
  --h-onglets: 48px;
  --fond: #f6f6f8;
  --carte: #ffffff;
  --texte: #1a1a1f;
  --discret: #6a6a76;
  --bord: #e2e2ea;
  --accent: #4d6b00;
  --accent-texte: #ffffff;
  --fluo: #d6ff3d;
  --danger: #b3261e;
  --rayon: 14px;
  --ombre: 0 1px 3px rgba(0, 0, 0, .08);
  /* Marges de securite du materiel : encoche en haut, barre de geste en bas. */
  --haut: env(safe-area-inset-top, 0px);
  --bas: env(safe-area-inset-bottom, 0px);
}

[data-theme="sombre"] {
  --accent: #d6ff3d;
  --fond: #0d0d10;
  --carte: #17171c;
  --texte: #f2f2f6;
  --discret: #9b9baa;
  --bord: #2c2c35;
  --accent-texte: #0d0d10;
  --piste-claude: #6ea0ff;
  --piste-valide: #34c262;
  --danger: #f2b8b5;
  --ombre: none;
}

* { box-sizing: border-box; }

/* Le navigateur applique bien `display: none` a [hidden], mais avec la specificite
   d'un attribut : la moindre classe qui declare un display l'emporte et l'element
   cense etre cache reste affiche. Le bandeau de mise a jour ci-dessous en a fait les
   frais, et tout bloc replie derriere `hidden` aurait suivi. La regle globale ferme
   le piege une fois pour toutes, au lieu de le rouvrir a chaque nouveau conteneur. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  /* Empeche Safari de grossir le texte en paysage. */
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(64px + var(--bas));
}

/* --- Entete ------------------------------------------------------------- */

.entete {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(10px + var(--haut)) 16px 10px;
  background: color-mix(in srgb, var(--fond) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bord);
}

/* L'icone des pistes, a gauche du titre. Elle reste discrete tant qu'on n'est pas
   dessus : c'est un acces permanent, pas une destination du quotidien.

   Les 44 px sont repetes ici parce que la regle plus bas vise `button.icone` : un lien
   portant la meme classe n'en herite pas et retombe a la taille de l'emoji, soit
   22 px. Le defaut ne se voit pas a l'oeil, il se mesure. */
.entete-pistes {
  display: grid;
  place-items: center;
  flex: none;
  min-width: 44px;
  min-height: 44px;
  margin-left: -11px;
  font-size: 20px;
  text-decoration: none;
  opacity: .55;
  -webkit-tap-highlight-color: transparent;
}
.entete-pistes.actif { opacity: 1; }

.entete h1 {
  flex: 1;
  margin: 0;
  font-size: 20px;
  font-weight: 650;
  /* Un titre qui passe a la ligne fait sauter la mise en page a chaque changement
     d'ecran. On le tronque plutot que de laisser l'entete respirer. */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Vue ---------------------------------------------------------------- */

.vue { padding: 16px; display: grid; gap: 12px; }

.carte {
  background: var(--carte);
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  padding: 14px 16px;
}

.carte h2 { margin: 0 0 8px; font-size: 16px; font-weight: 650; }
.discret { color: var(--discret); font-size: 14px; }
.vide { text-align: center; color: var(--discret); padding: 32px 16px; }

.ligne { display: flex; align-items: center; gap: 12px; }
.ligne .titre { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* --- Controles ---------------------------------------------------------- */

/* 44px : c'est la taille minimale d'une cible tactile confortable sur iPhone.
   En dessous, on rate le bouton une fois sur cinq en marchant. */
button, .bouton {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--bord);
  border-radius: 10px;
  background: var(--carte);
  color: var(--texte);
  font: inherit;
  font-weight: 550;
  cursor: pointer;
  /* Supprime le surlignage bleu au tap, qui fait "page web" et pas "application". */
  -webkit-tap-highlight-color: transparent;
}

button.principal { background: var(--accent); color: var(--accent-texte); border-color: transparent; }
button.discret { background: none; border-color: transparent; color: var(--discret); }
button.danger { color: var(--danger); }
button:active { opacity: .7; }

button.icone {
  min-width: 44px;
  padding: 0;
  border-color: transparent;
  background: none;
  font-size: 20px;
}
button.icone.tourne { animation: tourner .8s linear infinite; }
@keyframes tourner { to { transform: rotate(360deg); } }

input, textarea, select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--bord);
  border-radius: 10px;
  background: var(--fond);
  color: var(--texte);
  font-family: inherit;
  /* 16px exactement, et jamais moins : en dessous, Safari zoome automatiquement a la
     mise au point et l'utilisateur se retrouve avec une page decalee.
     A ecrire en proprietes separees : `font: 16px/1.4 inherit` est invalide (le
     raccourci n'accepte pas `inherit` comme famille) et le navigateur retombe alors
     sur sa taille par defaut, autour de 13px. */
  font-size: 16px;
  line-height: 1.4;
}
textarea { min-height: 96px; resize: vertical; }

label { display: grid; gap: 6px; font-size: 14px; color: var(--discret); }

.champs { display: grid; gap: 12px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* --- Onglets ------------------------------------------------------------ */

.onglets {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 10;
  display: flex;
  padding-bottom: var(--bas);
  background: color-mix(in srgb, var(--carte) 92%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--bord);
}

.onglets a {
  flex: 1;
  padding: 12px 4px;
  text-align: center;
  text-decoration: none;
  color: var(--discret);
  font-size: 13px;
  font-weight: 550;
  -webkit-tap-highlight-color: transparent;
}
.onglets a.actif { color: var(--accent); }

/* --- Bandeaux ----------------------------------------------------------- */

.maj {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(8px + var(--haut)) 16px 8px;
  background: var(--accent);
  color: var(--accent-texte);
  font-size: 14px;
}
.maj span { flex: 1; }
.maj button { min-height: 36px; background: rgba(255, 255, 255, .18); border-color: transparent; color: inherit; }
/* Quand le bandeau est la, c'est lui qui absorbe l'encoche, plus l'entete. */
.maj:not([hidden]) ~ .entete { padding-top: 10px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(84px + var(--bas));
  transform: translate(-50%, 12px);
  z-index: 20;
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  border-radius: 999px;
  background: #1a1a1f;
  color: #fff;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

/* --- Pistes d'amelioration ------------------------------------------------ */

.bouton-mini { min-height: 32px; padding: 0 10px; border-radius: 8px; font-size: 13px; flex: none; }

/* Un champ qui se lit comme du texte tant qu'on n'y touche pas. */
.champ-discret { min-height: 0; padding: 2px 0; border: none; background: none; overflow: hidden; resize: none; }
.champ-discret:focus { outline: none; border-bottom: 1px solid var(--accent); }

.ligne-piste { padding: 10px 0; border-top: 1px solid var(--bord); }
.ligne-piste:first-of-type { border-top: none; }
/* La piste que vise le prochain Ctrl+V. Sans marque visible, la regle « la capture va
   la ou vous ecrivez » resterait une convention invisible, et une capture collee au
   mauvais endroit ne se remarquerait qu'apres coup. */
.piste-visee {
  margin-inline: -8px;
  padding-inline: 8px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.piste-haut { display: flex; align-items: flex-start; gap: 8px; }
.ligne-piste input[type="checkbox"] { width: 22px; height: 22px; min-height: 22px; flex: none; margin: 6px 0 0; accent-color: var(--accent); }
.piste-texte { flex: 1; font-size: 16px; }
.piste-faite .piste-texte { text-decoration: line-through; color: var(--discret); }
.piste-trombone { display: grid; place-items: center; cursor: pointer; }
.piste-limite { flex: none; font-size: 11px; color: var(--discret); align-self: center; }

/* Les captures jointes : assez grandes pour etre lisibles d'un coup d'oeil, assez
   petites pour que trois d'entre elles ne noient pas la liste. */
.piste-vignettes { display: flex; gap: 8px; margin: 8px 0 0 30px; flex-wrap: wrap; }
.piste-vignette { position: relative; }
.piste-vignette img {
  width: 84px;
  height: 128px;
  object-fit: cover;
  object-position: top;
  border-radius: 8px;
  border: 1px solid var(--bord);
  background: var(--fond);
}
.piste-vignette-retirer {
  position: absolute;
  top: -6px; right: -6px;
  width: 30px; height: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 50%;
  background: var(--carte);
  font-size: 14px;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}

/* --- Ecran large -------------------------------------------------------- */

@media (min-width: 760px) {
  .entete, .vue, .onglets { max-width: 720px; margin-inline: auto; }
  .onglets { position: static; border-top: none; border-radius: 0; }
  body { padding-bottom: 24px; }
}

/* Respecte le reglage systeme d'animations reduites : sur une app qu'on ouvre
   vingt fois par jour, les animations decoratives finissent par lasser. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ======================================================================== */
/* Techno Turismo (04/11/2026)                                               */
/* ======================================================================== */

.entete { gap: 4px; padding: calc(6px + var(--haut)) 8px 6px; z-index: 1100; }
.entete h1 { font-size: 19px; font-weight: 800; letter-spacing: .2px; }
.tt {
  flex: none; padding: 0 5px; border-radius: 4px;
  background: var(--fluo); color: #0d0d10;
  font-weight: 900; font-size: 16px; letter-spacing: -1px; line-height: 24px;
}
/* Les icônes-liens de l'en-tête : 44 px posés explicitement, un lien n'hérite pas de
   la règle `button.icone`. */
.entete-lien {
  position: relative; display: grid; place-items: center; flex: none;
  min-width: 44px; min-height: 44px; padding: 0;
  border: none; background: none; font-size: 20px; text-decoration: none;
  opacity: .6; -webkit-tap-highlight-color: transparent;
}
.entete-lien.actif { opacity: 1; }
.entete-pistes { margin-left: 0; opacity: .85; }
.entete-compte {
  position: absolute; top: 3px; right: 0;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--fluo); color: #0d0d10;
  font: 800 11px/18px -apple-system, system-ui, sans-serif; text-align: center;
}

/* --- Agenda --------------------------------------------------------------- */

.filtres { display: grid; gap: 10px; position: sticky; top: calc(var(--h-entete) + var(--haut)); z-index: 5;
  margin: -16px -16px 0; padding: 12px 16px; background: color-mix(in srgb, var(--fond) 92%, transparent); backdrop-filter: blur(10px); }
.puces-secteurs, .carte-secteurs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.filtre {
  flex: none; min-height: 36px; padding: 0 14px; border-radius: 999px;
  font-size: 14px; font-weight: 650; color: var(--discret); background: transparent;
}
.filtre[aria-pressed="true"] { background: var(--texte); color: var(--fond); border-color: var(--texte); }
.recherche { position: relative; }
.recherche input { padding-right: 44px; }
.recherche .effacer { position: absolute; right: 0; top: 0; min-width: 44px; padding: 0; }

.agenda-liste { display: grid; gap: 18px; }
.jour { display: grid; gap: 8px; }
.jour-titre { margin: 0; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; color: var(--accent); }

.soiree {
  display: grid; grid-template-columns: 52px 1fr; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--bord); border-radius: var(--rayon);
  background: var(--carte); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.soiree:active { opacity: .8; }
.soiree.annulee { opacity: .55; }
.soiree-heure { font: 700 15px/1.3 ui-monospace, "SF Mono", Menlo, monospace; color: var(--accent); padding-top: 2px; }
.soiree h3 { margin: 0; font-size: 17px; font-weight: 750; line-height: 1.25; overflow-wrap: anywhere; }
.soiree-lieu { margin: 2px 0 0; font-size: 14px; color: var(--discret); }
.soiree-prix { margin: 6px 0 0; font-size: 13px; color: var(--discret); }
.annule { color: var(--danger); font-weight: 700; }

.puces { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.puce-artiste {
  min-height: 30px; padding: 0 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  background: color-mix(in srgb, var(--accent) 12%, var(--carte));
  border-color: color-mix(in srgb, var(--accent) 35%, var(--bord));
}

/* --- Carte ---------------------------------------------------------------- */

.carte-hote {
  position: fixed; left: 0; right: 0;
  top: calc(var(--h-entete) + var(--haut));
  bottom: calc(var(--h-onglets) + var(--bas));
  z-index: 1;
}
.carte-conteneur { position: absolute; inset: 0; background: #111; }
.carte-secteurs { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 500; }
.carte-secteurs .filtre { background: var(--carte); box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.carte-secteurs .filtre[aria-pressed="true"] { background: var(--texte); }
[data-theme="sombre"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.85) contrast(.9) saturate(.35); }
.leaflet-container { font: inherit; }
.repere {
  width: 100%; height: 100%; border-radius: 50%;
  background: #8a8a96; border: 2px solid #0d0d10;
  display: grid; place-items: center;
}
.repere.allume { background: var(--fluo); color: #0d0d10; font: 800 12px/1 -apple-system, system-ui, sans-serif; box-shadow: 0 0 0 3px rgba(214, 255, 61, .25); }

/* --- Fiche (feuille du bas) ---------------------------------------------- */

.voile { position: fixed; inset: 0; z-index: 1200; background: rgba(0, 0, 0, .45); cursor: pointer; }
.feuille {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1201;
  max-height: 82dvh; display: flex; flex-direction: column;
  background: var(--carte); border-radius: 18px 18px 0 0;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, .35);
}
.feuille-tete { display: flex; align-items: center; gap: 8px; padding: 12px 8px 4px 16px; }
.feuille-tete h2 { flex: 1; margin: 0; font-size: 20px; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.feuille-defile { overflow-y: auto; padding: 0 16px calc(20px + var(--bas)); }
#feuille-corps { display: grid; gap: 12px; }
#feuille-corps p { margin: 0; }
.fiche-quand { font-weight: 700; color: var(--accent); }
.fiche-lieu { justify-self: start; font-weight: 650; }
.fiche-description { white-space: pre-line; font-size: 14px; color: var(--discret); }
.bloc h3 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--discret); }
.bloc .puces { margin-top: 0; }
.acces { font-size: 14px; padding: 10px 12px; border-radius: 10px; background: var(--fond); margin-bottom: 8px !important; }
a.bouton { display: inline-flex; align-items: center; text-decoration: none; }
.ligne-mini { display: grid; justify-items: start; gap: 0; width: 100%; min-height: 0; padding: 8px 12px; margin-bottom: 6px; text-align: left; }
.ligne-mini span { font-size: 14px; }

/* --- Pistes : panneau, trois états, réponse, pointer (repris de Carte Berlin) -- */

.panneau-pistes {
  position: fixed; left: 0; right: 0; bottom: 0;
  top: calc(var(--h-entete) + var(--haut));
  z-index: 1050; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: var(--fond);
}
.panneau-pistes-tete {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 4px 16px; background: var(--fond); border-bottom: 1px solid var(--bord);
}
.panneau-pistes-tete h2 { margin: 0; font-size: 20px; }
.panneau-pistes-corps { display: grid; gap: 12px; max-width: 760px; margin-inline: auto; padding: 16px 16px calc(24px + var(--bas)); }

.etat-piste {
  display: grid; place-items: center; flex: none;
  width: 30px; height: 30px; min-height: 30px; margin-top: 2px; padding: 0;
  border: 2px solid var(--bord); border-radius: 6px; background: var(--carte);
  font-size: 16px; font-weight: 800; line-height: 1;
}
.etat-piste.claude { border-color: var(--piste-claude); color: var(--piste-claude); }
.etat-piste.valide { border-color: var(--piste-valide); background: var(--piste-valide); color: #fff; }
.piste-com {
  margin: 6px 0 0 38px; padding: 8px 10px;
  border-left: 3px solid var(--piste-claude); border-radius: 0 8px 8px 0;
  background: color-mix(in srgb, var(--piste-claude) 8%, transparent);
  font-size: 14px; line-height: 1.4;
}
.piste-com strong { color: var(--piste-claude); }
details.carte > summary { cursor: pointer; font-weight: 600; }
.piste-reponse {
  margin: 6px 0 0 38px; padding: 8px 10px;
  border-left: 3px solid var(--texte); border-radius: 0 8px 8px 0;
  background: color-mix(in srgb, var(--texte) 6%, transparent); font-size: 14px;
}
.piste-zone-reponse { margin: 6px 0 0 38px; display: grid; gap: 6px; }
.piste-ouvrir-reponse { justify-self: start; }
.piste-repondre { display: grid; gap: 6px; }
.piste-reponse-champ { min-height: 70px; }

.pointage-barre {
  position: fixed; left: 8px; right: 8px;
  bottom: calc(var(--h-onglets) + 8px + var(--bas));
  z-index: 3000; display: flex; align-items: center; gap: 4px;
  padding: 4px 4px 4px 10px; border-radius: 12px;
  background: #C2410C; color: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
  font-weight: 600; font-size: 14px;
}
.pointage-barre.en-haut { bottom: auto; top: calc(var(--h-entete) + 4px + var(--haut)); }
.pointage-texte { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pointage-barre button { flex: none; min-height: 38px; padding: 0 10px; border: none; border-radius: 8px; background: rgba(255, 255, 255, .2); color: #fff; font-weight: 700; }
.pointage-barre .pointage-bord, .pointage-barre .pointage-annuler { min-width: 38px; padding: 0; font-size: 16px; }
.pointage-barre .pointage-terminer { background: #fff; color: #C2410C; }
body.pointage .vue, body.pointage .carte-hote { outline: 3px solid #C2410C; outline-offset: -3px; }
body.pointage-pause .vue, body.pointage-pause .carte-hote { outline-style: dashed; }
.pointage-epingle {
  position: fixed; z-index: 3001; width: 26px; height: 26px; margin: -13px 0 0 -13px;
  border-radius: 50%; border: 2px solid #fff; background: #C2410C; color: #fff;
  font: 700 13px/22px -apple-system, system-ui, sans-serif; font-style: normal; text-align: center;
  pointer-events: none; box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
}
.piste-reperes { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0 38px; }
.champs .piste-reperes { margin-left: 0; }
.piste-repere {
  display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 2px 10px;
  border: 1px solid #C2410C; border-radius: 999px;
  background: color-mix(in srgb, #C2410C 10%, var(--carte)); color: #ff9a6a;
  font-size: 13px; font-weight: 600; text-align: left;
}
.piste-repere-retirer { min-height: 0; padding: 0 2px; border: none; background: none; color: inherit; }

@media (min-width: 760px) {
  .entete, .vue { max-width: 760px; }
  .onglets { position: fixed; max-width: none; }
  body { padding-bottom: calc(64px + var(--bas)); }
  .feuille { left: 50%; right: auto; width: 560px; transform: translateX(-50%); }
}

/* ======================================================================== */
/* amea du 04/11/2026 : carte claire, gouttes, filtres, trois onglets        */
/* ======================================================================== */

.logo { flex: none; width: 30px; height: 30px; border-radius: 7px; background: #0c0d10; padding: 2px; }

/* Une vue utilisateur ne montre rien de ce qui n'est qu'à l'équipe. */
body.vue-utilisateur .entete-pistes, body.vue-utilisateur .equipe { display: none !important; }

/* --- Barre des filtres : nuits + bouton des filtres avancés --------------- */
.barre-filtres { display: flex; gap: 6px; align-items: center; min-width: 0; }
.nuits { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.nuits::-webkit-scrollbar { display: none; }
.bouton-filtres { flex: none; }
.bouton-filtres.actif { background: var(--fluo); color: #0d0d10; border-color: var(--fluo); }
.puce-famille { border-color: var(--famille); }
.puce-famille[aria-pressed="true"] { background: var(--famille); color: #0d0d10; border-color: var(--famille); }

/* --- Carte ---------------------------------------------------------------- */
.carte-barre { position: absolute; top: 8px; left: 8px; right: 8px; z-index: 500; }
.carte-barre .filtre { background: var(--carte); box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.carte-barre .filtre[aria-pressed="true"] { background: var(--texte); color: var(--fond); }
.carte-barre .bouton-filtres.actif { background: var(--fluo); color: #0d0d10; }
.carte-localiser {
  position: absolute; right: 10px; bottom: 96px; z-index: 500;
  width: 44px; min-height: 44px; padding: 0; border-radius: 10px;
  background: #fff; color: #111; border: 2px solid rgba(0, 0, 0, .2); font-size: 22px;
}
.carte-compteur {
  position: absolute; left: 10px; bottom: 10px; z-index: 500;
  padding: 4px 10px; border-radius: 999px; background: rgba(13, 13, 16, .82); color: #fff;
  font-size: 12px; font-weight: 600; pointer-events: none;
}
/* Fond clair et lisible, quel que soit le thème de l'app (piste du 04/11/2026). */
[data-theme="sombre"] .leaflet-tile-pane { filter: none; }

/* La goutte : pointe vers le bas, jaune cernée de noir pour la techno. */
.goutte {
  width: 100%; height: 100%;
  border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--fond); border: 2px solid #111;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .35);
  display: grid; place-items: center; cursor: pointer;
}
.goutte.avec-lisere { box-shadow: 0 0 0 3px var(--lisere), 0 2px 6px rgba(0, 0, 0, .35); }
.goutte span { transform: rotate(45deg); font: 800 13px/1 -apple-system, system-ui, sans-serif; color: #111; }
.goutte.favori::after {
  content: '★'; position: absolute; transform: rotate(45deg) translate(9px, -16px);
  color: #111; font-size: 12px; text-shadow: 0 0 2px #fff, 0 0 2px #fff;
}
.repere-point {
  width: 100%; height: 100%; border-radius: 50%;
  background: var(--fond); border: 2px solid #111; box-shadow: 0 0 0 2px var(--lisere);
}
.repere-vide { width: 100%; height: 100%; border-radius: 50%; background: #9a9aa5; border: 2px solid #fff; opacity: .8; }
.repere-vide.favori { background: #111; }
.station {
  width: 14px; height: 14px; display: grid; place-items: center;
  color: #fff; font: 800 9px/1 -apple-system, system-ui, sans-serif; border: 1px solid #fff;
}
.station.carre { border-radius: 2px; }
.station.rond { border-radius: 50%; }
.bulle-station.leaflet-tooltip { font-size: 12px; padding: 2px 6px; }

/* --- Soirées -------------------------------------------------------------- */
.genres { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.genre {
  padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700;
  border: 1.5px solid var(--famille); color: var(--texte);
  background: color-mix(in srgb, var(--famille) 18%, transparent);
}
.soiree-heure.inconnue { color: var(--discret); }
.intention { margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: var(--fluo); color: #0d0d10; font-weight: 700; font-size: 12px; }
.etoile { color: var(--accent); }
.note { color: var(--accent); }

.intentions { display: flex; gap: 6px; flex-wrap: wrap; }
.intentions button { flex: 1; min-width: 96px; }
.intentions button.choisi { background: var(--fluo); color: #0d0d10; border-color: var(--fluo); }
.etoiles { display: flex; gap: 4px; margin-bottom: 8px; }
.etoiles button { min-width: 44px; padding: 0; font-size: 24px; color: var(--bord); background: none; border: none; }
.etoiles button.pleine { color: #F5D800; }

.station { flex: none; }
p.station { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 14px; margin: 0 0 8px !important; width: auto; height: auto; color: var(--texte); border: none; font-weight: 500; }
.ligne { padding: 1px 6px; border-radius: 4px; color: #fff; font-weight: 800; font-size: 12px; }
.spotify { margin-top: 8px !important; }
.spotify a { color: var(--accent); }
.favori.actif { background: var(--fluo); color: #0d0d10; border-color: var(--fluo); }
.semaine-suivante {
  width: 100%; margin-top: 4px; border-style: dashed; font-weight: 700; color: var(--accent);
}
.equipe { font-size: 12px; color: var(--discret); border-top: 1px dashed var(--bord); padding-top: 8px; }
.equipe a { color: var(--discret); }
.a-venir { text-align: center; }

/* --- Mon programme : volets, boucles, calendrier (04/11/2026) --------------- */
.volets { display: flex; gap: 6px; }
.volets .filtre { flex: 1; }
.boucle { display: grid; gap: 10px; }
.boucle-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; width: 100%;
  min-height: 44px; padding: 0; border: none; background: none; text-align: left; }
.boucle-nom { font-weight: 800; font-size: 17px; }
.boucle-resume { margin: 0; font-size: 14px; color: var(--discret); }
.sous-titre { margin: 6px 0 0; font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--discret); }
.plans { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.plan-ligne { display: flex; align-items: center; gap: 6px; }
.plan-lettre { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 6px;
  background: #F5D800; color: #111; font-weight: 900; border: 2px solid #111; }
.plan-nom { flex: 1; min-width: 0; min-height: 40px; padding: 0 8px; text-align: left; border: none; background: none;
  font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trajet { margin: 0 0 2px 38px; font-size: 12px; color: var(--discret); }
.grille-pose { display: grid; gap: 4px; }
.grille-ligne { display: grid; grid-template-columns: 64px repeat(3, 1fr); gap: 4px; align-items: center; }
.grille-tete { font-size: 12px; color: var(--discret); text-align: center; }
.grille-jour { font-size: 13px; font-weight: 700; }
.case-pose { min-height: 36px; padding: 0; font-size: 16px; }
.case-pose[aria-pressed="true"] { background: var(--fluo); color: #111; border-color: var(--fluo); }
.sejour { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.jour-cal { display: grid; gap: 8px; }
.creneau { display: grid; grid-template-columns: 70px 1fr; gap: 8px; align-items: start; padding-top: 6px; border-top: 1px solid var(--bord); }
.creneau-nom { font-size: 13px; color: var(--discret); font-weight: 700; padding-top: 4px; }
.creneau-boucles { display: grid; gap: 6px; }
.posee { border: 1px solid var(--bord); border-radius: 10px; padding: 6px 8px; }
.posee-tete { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.posee-nom { min-height: 32px; padding: 0; border: none; background: none; font-weight: 800; text-align: left; }
.posee-plans { margin: 2px 0 0; padding-left: 0; list-style: none; font-size: 14px; display: grid; gap: 2px; }
.posee-plans li.avec-soiree { border-left: 4px solid #F5D800; padding-left: 6px; }
.soiree-du-plan { min-height: 0; padding: 0; border: none; background: none; color: var(--accent); font-size: 14px; text-align: left; }

/* --- Une boucle tracée sur la carte --------------------------------------- */
.etiquette-plan {
  display: inline-block; white-space: nowrap; transform: translate(-14px, -14px);
  padding: 2px 8px 2px 2px; border-radius: 999px; background: #111; color: #fff;
  font: 700 12px/20px -apple-system, system-ui, sans-serif; box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
}
.etiquette-plan b { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 4px;
  border-radius: 50%; background: #F5D800; color: #111; }
.carte-boucle {
  position: absolute; left: 8px; right: 8px; top: 56px; z-index: 500;
  display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 12px;
  border-radius: 12px; background: #111; color: #fff; font-weight: 700; font-size: 14px;
}
.carte-boucle span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.carte-boucle button { min-height: 36px; background: rgba(255, 255, 255, .15); color: #fff; border: none; }
body.boucle-montree .goutte, body.boucle-montree .repere-point, body.boucle-montree .repere-vide { opacity: .35; }

/* --- Billets et fiche de lieu enrichie (04/11/2026) ------------------------ */
.billets-liste { display: grid; gap: 6px; margin-bottom: 8px; }
.billets-liste:empty { display: none; }
.billet { display: flex; align-items: center; gap: 8px; }
.billet-ouvrir { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 4px; text-align: left; }
.billet-ouvrir img { width: 52px; height: 52px; object-fit: cover; border-radius: 6px; background: #fff; }
.billet-pdf { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 6px; background: #F5D800; color: #111; font-weight: 800; }
.billet-nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.billet-plein {
  position: fixed; inset: 0; z-index: 3000;
  display: grid; place-items: center; align-content: center; gap: 12px;
  padding: calc(16px + var(--haut)) 16px calc(16px + var(--bas)); background: #fff; color: #555;
}
.billet-plein img { max-width: 100%; max-height: 82vh; object-fit: contain; }
.photo-lieu { margin: 0; }
.photo-lieu img { display: block; width: 100%; max-height: 220px; object-fit: cover; border-radius: 12px; background: var(--fond); }
.photo-lieu figcaption { margin-top: 4px; font-size: 11px; color: var(--discret); }
.photo-lieu figcaption a { color: var(--discret); }
.horaires { margin: 0; padding-left: 18px; font-size: 14px; }
.ouvert { color: var(--piste-valide); text-transform: none; letter-spacing: 0; }
.ferme { color: var(--danger); text-transform: none; letter-spacing: 0; }
.prix-lieu { font-size: 14px; font-weight: 600; }
