    :root{
      --header-h: 80px;
      --primary: #2563eb; /* bleu */
      --primary-600: #1d4ed8;
      --accent-green: #10b981;
      --accent-orange: #f59e0b;
      --accent-red: #ef4444;
      --text: #0f172a;
      --muted: #64748b;
      --shadow: 0 4px 16px rgba(0,0,0,.15);
      --round: 14px;
    }
    *{ box-sizing: border-box; }
    html, body{ height:100%; margin:0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, "Apple Color Emoji", "Segoe UI Emoji"; color:var(--text); }

    /* ===== HEADER ===== */
    header.site-header{
      position: sticky; top:0; left:0; right:0; height:var(--header-h);
      display:flex; align-items:center; gap:14px; padding:0 16px;
      background: #0b1020; /* très sombre pour contraster */
      color:#fff; z-index:1000; box-shadow: var(--shadow);
    }
    .brand{ display:flex; align-items:center; gap:10px; min-width:0; }
    .brand img{ width:64px; height:64px; object-fit:contain; border-radius:10px; box-shadow:0 2px 8px rgba(0,0,0,.35); background:transparent; }
    .brand .name{ font-family:'Satisfy', cursive; font-size:48px; letter-spacing:.3px; text-shadow:0 2px 8px rgba(0,0,0,.4); white-space:nowrap; }

    .spacer{ flex:1; }

    /* Boutons du header */
    .btn{ height:42px; min-width:42px; padding:0 15px; border:none; border-radius:999px; background:#ffffff1a; color:#fff;
          display:inline-flex; align-items:center; justify-content:center; gap:10px; cursor:pointer; box-shadow:0 2px 10px rgba(0,0,0,.25);
          backdrop-filter:saturate(140%) blur(4px); -webkit-backdrop-filter:saturate(140%) blur(4px); transition:transform .12s ease, background .2s ease, opacity .2s ease; }
    .btn:hover{ transform:translateY(-1px); background:#ffffff24; }
    .btn:active{ transform:translateY(0); }
    .btn-icon{ width:42px; padding:0; }

    /* === Pastilles vert / orange / rouge === */
.chip {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Couleurs normales (état de base) */
.chip.green { background-color: #10b981; }
.chip.orange { background-color: #f59e0b; }
.chip.red { background-color: #ef4444; }

/* Survol : teinte plus claire + halo + zoom */
.chip.green:hover {
  background-color: #22c55e;
  box-shadow: 0 0 10px rgba(34,197,94,0.6);
  transform: scale(1.1);
}
.chip.orange:hover {
  background-color: #fbbf24;
  box-shadow: 0 0 10px rgba(251,191,36,0.6);
  transform: scale(1.1);
}
.chip.red:hover {
  background-color: #f87171;
  box-shadow: 0 0 10px rgba(248,113,113,0.6);
  transform: scale(1.1);
}

/* État actif (quand cliqué) */
.chip.green.active {
  background-color: #059669;
  box-shadow: 0 0 12px rgba(16,185,129,0.9);
  transform: scale(1.15);
}
.chip.orange.active {
  background-color: #d97706;
  box-shadow: 0 0 12px rgba(245,158,11,0.9);
  transform: scale(1.15);
}
.chip.red.active {
  background-color: #dc2626;
  box-shadow: 0 0 12px rgba(239,68,68,0.9);
  transform: scale(1.15);
}

    .icon{ width:22px; height:22px; filter: drop-shadow(0 1px 3px rgba(0,0,0,.45)); }
    .icon-lg{ width:24px; height:24px; }

    /* ===== MAP ===== */
    #map{ width:100%; height:calc(100vh - var(--header-h)); }

    /* Custom controls column (under default zoom) */
    .leaflet-top.leaflet-left .leaflet-control.custom-stack { margin-top: -2px; } /* under the two default zoom buttons */
    .custom-stack{ display:flex; flex-direction:column; gap:0px; }
    .control-btn{ width:30px; height:30px; background:#fff; border:1px solid #e5e7eb; border-radius:0px; display:grid; place-items:center; cursor:pointer; box-shadow:var(--shadow); }
    .control-btn:hover{ background:#f8fafc; }

    /* ===== MODALS (popups) ===== */
    .overlay{ position:fixed; inset:0; background:rgba(15,23,42,.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display:none; align-items:center; justify-content:center; z-index:2000; }
    .overlay.active{ display:flex; }
    .modal {
  width: 340px;
  max-width: 92vw;
  max-height: 80vh;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
  display: flex;
  flex-direction: column;
  overflow: hidden; /* pour couper la scrollbar en haut/bas */
}
    .modal .modal-head {
  flex-shrink: 0;
  height: 40px;
  padding: 16px 18px;
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
  color: #fff;
  font-weight: 700;
  letter-spacing: .2px;
  background: linear-gradient(90deg, #60a5fa, #2563eb 55%, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
    .modal .modal-head .title{ font-size:20px; text-align: center;  }
    .modal .modal-body {
  flex: 1;
  padding: 18px;
  display: grid;
  gap: 14px;
  overflow-y: auto; /* c’est ici que le scroll reste contenu */
  scrollbar-gutter: stable both-edges;
}
    .modal .modal-actions {
  flex-shrink: 0;
  padding: 14px 18px 20px;
  display: flex;
  justify-content: flex-end;
}
    .input, select, textarea{ width:100%; padding:12px 14px; border:1px solid #e5e7eb; border-radius:12px; background:#fff; font: inherit; }
    textarea{ min-height:84px; resize:vertical; }
    .label{ font-size:13px; color:var(--muted); margin-bottom:6px; display:block; }

    .row{ display:grid; gap:12px; }
    .row.cols-2{ grid-template-columns:1fr 1fr; }

    .pill{ display:inline-flex; align-items:center; gap:8px; padding:8px 12px; border-radius:999px; background:#f1f5f9; }
    .switch-group{ display:flex; gap:10px; flex-wrap:wrap; }

    .btn-primary{ background:var(--primary); color:#fff; }
    .btn-primary:hover{ background:var(--primary-600); }
    .btn-ghost{ background:#EEF2FF; color:#1e293b; }
    .btn-success{ background:#10b981; color:#fff; }

    /* Suggestions d'adresse */
    .suggestions{ border:1px solid #e5e7eb; border-radius:12px; overflow:hidden; box-shadow:var(--shadow); position:absolute; background:#fff; width:100%; z-index:3000; display:none; }
    .suggestions.show{ display:block; }
    .suggestions button{ width:100%; text-align:left; padding:10px 12px; border:none; background:#fff; cursor:pointer; }
    .suggestions button:hover{ background:#f8fafc; }

    /* Accueil modal (welcome) */
    .welcome-title {
  font-family: 'Poppins', sans-serif; /* même police que les autres popups */
  font-size: 22px; /* tu peux ajuster si tu veux garder un titre un peu plus grand */
  font-weight: 600;
  text-align: center;
}
    .checkline{ display:flex; gap:10px; align-items:flex-start; }
    .checkline .tick{ width:18px; height:18px; border-radius:999px; background:#10b981; display:grid; place-items:center; color:#fff; font-weight:900; font-size:12px; margin-top:3px; }
    .strong{ font-weight:700; }
    .green{ color:#10b981; }

    @media (max-width: 720px){
      .brand .name{ font-size:24px; }
      .hide-sm{ display:none !important; }
    }
   /* --- Boutons des popups d'inscription / connexion --- */
.modal .btn {
  padding: fit-content;          /* réduit la marge interne */
  width: 60%;
  min-width: auto;
  align-self: center;
}

.modal .btn-ghost {
  display: flex;              /* pour icônes Apple / Google */
  align-items: center;
  justify-content: center;
  gap: 6px;                   /* espace plus petit entre l’icône et le texte */
  padding: 6px 10px;          /* resserre les bords */
}

.modal .btn-primary,
.modal .btn-success {
  padding: 6px 12px;
}

.modal .btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
}
/* === Boutons des popups === */
.modal .btn {
  display: inline-flex;              /* pour gérer icônes + texte */
  align-items: center;
  justify-content: center;
  gap: 6px;                          /* petit espace entre icône et texte */
  padding: 6px 14px;                 /* marge interne adaptée */
  font-size: 15px;
  min-width: auto;
  border-radius: 999px;
}

/* Centrage horizontal de tous les boutons dans les modales */
.modal .modal-body .btn,
.modal .modal-actions .btn {
  display: flex;
  justify-content: center;
  margin: 6px auto;                  /* <-- centrage horizontal */
  width: fit-content;                /* bouton s’ajuste à son contenu */
}

/* Pour les boutons ghost (Apple / Google) */
.modal .btn-ghost {
  background: #EEF2FF;
  color: #1e293b;
  padding: 8px 14px;
  border-radius: 999px;
  transition: background 0.2s;
}
.modal .btn-ghost:hover {
  background: #E0E7FF;
}
/* === Boutons "✕" dans l'en-tête des popups === */
.modal .modal-head .btn-icon {
  background: none !important;     /* pas de fond */
  box-shadow: none !important;     /* pas d'ombre */
  border: none !important;
  color: #fff;                     /* croix blanche (adaptée au bandeau bleu) */
  width: auto;                     /* supprime la forme ronde */
  height: auto;
  padding: 0 6px;                  /* petite marge latérale */
  border-radius: 0;                /* plus de cercle */
  font-size: 14px;                 /* croix plus lisible */
  line-height: 1;
  transition: opacity 0.2s ease;
  cursor: pointer;
}

/* Effet au survol : légère transparence */
.modal .modal-head .btn-icon:hover {
  opacity: 0.7;
}

/* ==== Icônes personnalisées d'événements sur la carte ==== */
.event-marker {
  background: white;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  cursor: pointer;
  border: 4px solid;
  transition: transform 0.2s ease;
  position: relative;
}
.event-marker:hover { transform: scale(1.15); }

.event-marker.green { border-color: #00ffaa; animation: pulse-green 2s infinite; }
.event-marker.orange { border-color: #f59e0b; animation: pulse-orange 2s infinite; }
.event-marker.red { border-color: #ef4444; animation: pulse-red 2s infinite; }

@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 255, 170, 0.7); }
  50% { box-shadow: 0 0 0 10px rgba(16,185,129,0); }
}
@keyframes pulse-orange {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,0.7); }
  50% { box-shadow: 0 0 0 10px rgba(245,158,11,0); }
}
@keyframes pulse-red {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.7); }
  50% { box-shadow: 0 0 0 10px rgba(239,68,68,0); }
}

/* ✅ Popups Leaflet — apparence + scroll interne */
.leaflet-popup-content-wrapper {
  border-radius: 12px;
  padding: 0;
  background: #fff;
  max-width: 280px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
  overflow: hidden;
}

/* ✅ Corps de la popup : flex + hauteur adaptative */
.leaflet-popup-content {
  display: flex;
  flex-direction: column;
  max-height: 500px; /* hauteur totale de la popup, header inclus */
  overflow: hidden;
  margin: 0;
  padding: 0;
  white-space: normal;
  word-wrap: break-word;
  line-height: 1.4em;
}

/* ✅ Contenu scrollable (sous le header) */
.popup-body {
  flex: 1 1 auto;          /* prend tout l’espace restant sous le header */
  overflow-y: auto;        /* scroll interne */
  padding: 12px 14px 10px; /* marge intérieure */
  box-sizing: border-box;
}

/* Header bleu fixé en haut */
.popup-header {
  position: sticky;
  top: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: bold;
  padding: 12px 15px;
  border-radius: 12px 12px 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 10;
}

/* Images dans la popup */
.leaflet-popup-content img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  margin: 4px auto;
}

/* Scrollbar fine et discrète */
.leaflet-popup-content .popup-body::-webkit-scrollbar {
  width: 10px;
}
.leaflet-popup-content .popup-body::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.25);
  border-radius: 4px;
}

/* Agrandir uniquement l’icône dans le bandeau bleu */
.popup-header span:first-child {
  font-size: 24px;      /* taille plus grande pour l’emoji */
  line-height: 1;       /* pour un alignement vertical net */
  margin-right: 6px;    /* espace entre l’icône et le titre */
}
.popup-body {
  padding: 15px;
}

.popup-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: #555;
}

/* ✅ espace + largeur stable pour les icônes */
.popup-row span:first-child {
  display: inline-block;
  min-width: 22px; /* largeur réservée pour l’icône (ajuste si besoin) */
  text-align: center;
  flex-shrink: 0; /* évite que l’icône se compresse */
  margin-right: 0; /* plus besoin du margin-right ici */
}

/* si tu veux garder un léger espacement latéral */
.popup-row span + * {
  margin-left: 2px;
}

/* ✅ Ajout pour recréer l'espace entre l'icône et le texte */
.popup-row span {
  display: inline-block;
  margin-right: 6px;
}

.popup-row strong { color: #333; }
.popup-description {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #eee;
  color: #666;
  font-size: 14px;
  line-height: 1.5;
}
.popup-tag {
  display: inline-block;
  background: #f0f0f0;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 12px;
  margin-top: 8px;
  color: #666;
}

/* Boutons civilité (Madame / Monsieur / Non spécifié) */
.btn-civilite {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}
.btn-civilite:hover {
  background: #e2e8f0;
}
.btn-civilite.active {
  background: #0f172a;
  color: white;
  border-color: #0f172a;
}
.account-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.action-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #1e293b;
  cursor: pointer;
  font-size: 15px;
  transition: color 0.2s ease;
}

.action-link:hover {
  color: #2563eb; /* bleu léger au survol */
}

.action-link .icon {
  font-size: 18px;
  line-height: 1;
}

.action-link.danger {
  color: #dc2626;
}

.action-link.danger:hover {
  color: #ef4444;
}
.account-links {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 16px;
}

.account-links.vertical {
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.account-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #555;
  font-size: 15px;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.account-link svg {
  width: 18px;
  height: 18px;
}

.account-link:hover {
  color: #2563eb;
}

.account-link.danger {
  color: #a11;
}

.account-link.danger:hover {
  color: #e11;
}

/* === Bouton "Partager" dans les popups Leaflet === */
.popup-actions{
  display: flex;
  justify-content: flex-end; /* bouton en bas à droite */
  margin-top: 10px;
}

/* Effet au survol */
.btn-share:hover {
  background: #1e40af;              /* Bleu un peu plus sombre */
  transform: translateY(-2px);      /* Légère élévation */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

/* Effet au clic */
.btn-share:active {
  background: #1d4ed8;              /* Ton légèrement différent */
  transform: translateY(0);         /* Retour à plat */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.btn-share{
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  background: #2563eb !important;
  color: #fff !important;
  border: none !important;
  border-radius: 6px !important;
  padding: 6px 10px !important;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
}

/* === Barre de recherche === */
.search-bar {
  position: absolute;
  top: calc var(--header-h); /* juste sous le header */
  right: 16px;                       /* alignée à droite */
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  padding: 6px 10px;
  border-radius: 5px 20px 20px 5px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  z-index: 1100; /* au-dessus de la carte */
}

#searchInput {
  border: none;
  outline: none;
  font-size: 14px;
  width: 200px;
  height: 24px; 
}

#searchBtn {
  border: none;
  background: #9fbdff;
  color: white;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  transition: background 0.2s ease;
}

#searchBtn:hover {
  background: #1e40af;
}

/* Suggestions d'événements */
#suggestionsEvents {
  position: absolute;
  top: calc(100% + 6px); /* ✅ sous la barre */
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ccc;
  border-top: none;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  max-height: 240px;
  overflow-y: auto;
  display: none;
  z-index: 999; /* sous la barre, mais au-dessus de la carte */
}

#suggestionsEvents.show {
  display: block;
}

#suggestionsEvents button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 6px 10px;
  background: none;
  border: none;
  cursor: pointer;
}

#suggestionsEvents button:hover {
  background-color: #eef;
}

/* Description justifiée et aérée */
.popup-description {
  white-space: normal !important;
  word-wrap: break-word;
  text-align: justify;
  margin-top: 10px;
  line-height: 1.5;
}

/* Nom de l'utilisateur */
.popup-row strong {
  color: #222;
  font-weight: 600;
  word-break: break-word;
}

.popup-description {
  white-space: normal !important;
  word-wrap: break-word;
  text-align: justify;            /* aligne le texte proprement */
  margin-top: 10px;
  line-height: 1.5;
}

/* Force les lignes à rester visibles, sans casser la mise en page flex */
.popup-description,
.popup-tag {
  display: block;
}

/* Rétablit le bon alignement pour les lignes avec icônes */
.popup-row {
  display: flex !important;
  align-items: flex-start;
  gap: 8px;
}

/* Bouton + verrouillé (non connecté) */
#btnAddLocked{
  display: none;                 /* masqué par défaut, montré via JS */
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  background: #ffffff10 !important;
  border: 1px dashed #9ca3af !important; /* bordure vraiment visible */
  filter: grayscale(1) !important;
  position: relative;
}

/* désactive le hover “rebond” du style .btn */
#btnAddLocked:hover{
  transform: none !important;
  background: #ffffff14 !important;
}

/* texte d’aide */
#btnAddLocked::after{
  content: "Connectez-vous pour ajouter un événement";
  position: absolute;
  bottom: -42px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15,23,42,0.96);
  color: #fff;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 1001;
}
#btnAddLocked:hover::after{ opacity: 1; }

/* rend l’icône + plus “fade” quand verrouillé */
#btnAddLocked .icon-lg{ opacity: .7; }

/* === Fix pour l'alignement de l'adresse dans les popups === */
.popup-row span:first-child {
  white-space: nowrap; /* ✅ empêche l'icône 🏠 de se séparer du texte */
}

/* === Popup Partage moderne === */
#overlayShare .modal.small {
  max-width: 250px;
}

#overlayShare .modal-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#overlayShare .modal-body .btn,
#overlayShare .modal-actions .btn {
  width: 80%;
  text-align: center;
  padding: 10px 0;
  font-size: 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

#overlayShare .btn:hover {
  transform: scale(1.02);
}

/* Variantes de boutons */
#overlayShare .btn-primary {
  background: #2563eb;
  color: white;
  border: none;
}

#overlayShare .btn-primary:hover {
  background: #1d4ed8;
}

#overlayShare .btn-ghost {
  background: #f8f9fa;
  border: 1px solid #ddd;
  color: #333;
}

#overlayShare .btn-ghost:hover {
  background: #f1f1f1;
}

/* === Popup Mes Événements === */
#overlayMyEvents .event-item {
  background: #f8f9fa;
  border-radius: 8px;
  margin: 6px 0;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.2s;
}

#overlayMyEvents .event-item:hover {
  background: #eef2ff;
}

#overlayMyEvents .event-bubble {
  display: flex;
  align-items: center;
  gap: 10px;
}

#overlayMyEvents .event-icon {
  font-size: 22px;
}

#overlayMyEvents .event-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
}

#overlayMyEvents .btn-edit,
#overlayMyEvents .btn-delete {
  border: none;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 13px;
  cursor: pointer;
}

#overlayMyEvents .btn-edit { background: #2563eb; color: white; }
#overlayMyEvents .btn-delete { background: #ef4444; color: white; }

/* === Popup Mes Événements : fond transparent et flou ciblé sur Mon compte === */
#overlayMyEvents {
  background: transparent !important;      /* pas de voile global */
  backdrop-filter: none !important;        /* pas de flou global */
  pointer-events: auto;
}

/* ✅ flouter uniquement la fenêtre "Mon compte" quand la popup Mes événements est ouverte */
#overlayMyEvents.show + #overlayAccount .modal {
  filter: blur(4px);
  transition: filter 0.3s ease;
}
#overlayMyEvents:not(.show) + #overlayAccount .modal {
  filter: none;
}

/* === 🎨 Styles des pastilles de filtre (vert / orange / rouge) === */
.chip {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.chip.green {
  background-color: #22c55e; /* vert */
}

.chip.orange {
  background-color: #f97316; /* orange */
}

.chip.red {
  background-color: #ef4444; /* rouge */
}

/* 🟢🟠🔴 Quand une pastille est active */
.chip.active {
  transform: scale(1.2);
  border-color: #00000055; /* petit contour gris/noir semi-transparent */
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
}

/* === Bouton "Filtre" dans le header === */
.filter-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

#btnFilter {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff1a;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

#btnFilter:hover {
  background: #ffffff24;
  transform: translateY(-1px);
}

/* === Menu déroulant === */
.filter-menu {
  position: absolute;
  top: 46px; /* juste sous le bouton */
  left: 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
  padding: 6px;
  display: none; /* caché par défaut */
  flex-direction: column;
  gap: 6px;
  z-index: 2000;
}

.filter-menu.show {
  display: flex;
}

.filter-menu button {
  border: none;
  background: none;
  font-size: 22px;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.filter-menu button:hover {
  transform: scale(1.2);
}

/* === Menu Distance (à droite du bouton principal) === */
.distance-menu {
  display: none;
  position: absolute;
  top: 0;
  left: 38px; /* s'ouvre vers la droite */
  background: transparent; /* pas de fond gris global */
  z-index: 9999;
  display: flex;
  flex-direction: row; /* les boutons côte à côte */
  gap: 4px;
}

/* Hérite du style .control-btn (même apparence) */
.distance-menu .control-btn {
  width: 30px;
  height: 30px;
  background: #fff;
  border: 1px solid #e5e7eb;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.distance-menu .control-btn:hover {
  background: #f0f0f0;
}

/* === Section "Amis" dans la popup === */
.friends-btn {
  background: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 15px;
  margin-bottom: 10px;
  width: 100%;
  text-align: center;
  transition: background 0.2s ease;
}

.modal .modal-head .btn-icon {
  font-size: 18px;   /* 🔹 plus grande, comme les autres popups */
  color: #fff;       /* garde la croix blanche */
  background: none;
  border: none;
  box-shadow: none;
  padding: 0 8px;
  cursor: pointer;
  line-height: 1;
  transition: transform 0.1s ease;
}

.friends-btn:hover {
  background: #0069d9;
}

/* Trait séparateur gris */
.friends-separator {
  border: none;
  border-top: 1px solid #ddd;
  margin: 10px 0 15px 0;
}

.friends-input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 15px;
  margin-top: 8px;
}

/* === Mini popup "Ajouter un ami" === */
.mini-popup {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4000;
}

.mini-popup.hidden {
  display: none;
}

.mini-popup-content {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  width: 280px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  text-align: center;
  animation: popupFade 0.2s ease;
}

.mini-popup-content h3 {
  margin-top: 0;
  margin-bottom: 12px;
  color: #007bff;
}

.mini-popup-content input {
  width: 100%;
  padding: 8px;
  margin-bottom: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 15px;
}

.mini-popup-buttons {
  display: flex;
  justify-content: space-between;
}

.mini-popup-buttons .btn {
  flex: 1;
  margin: 0 4px;
}

@keyframes popupFade {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* Liste des amis */
.friends-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.friend-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 6px 10px;
  margin-bottom: 6px;
  font-size: 15px;
}

/* Bouton supprimer */
.remove-friend {
  background: none;
  border: none;
  color: #999;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease;
}

.remove-friend:hover {
  color: #d00;
}

/* === Onglets multi-événements === */
.multi-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: auto;
}
.multi-tabs .tab-btn:hover {
  opacity: 0.8;
}

/* === icônes "autres" === */
.icon-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 8px;
  margin-top: 8px;
  padding: 8px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.icon-btn {
  font-size: 22px;
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.2s;
  border-radius: 8px;
}

.icon-btn:hover {
  transform: scale(1.2);
  background: #eef;
}

/* === Bouton filtre Agenda === */
#agendaBtn {
  position: absolute;
  top: 80px;
  right: 230px;
  z-index: 1200;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 36px;
  line-height: 1;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.3));
  transition: transform 0.2s ease, filter 0.2s ease;
}

/* Effet au survol */
#agendaBtn:hover {
  transform: translateY(-2px);
  filter: drop-shadow(0 4px 4px rgba(0,0,0,0.4));
  opacity: 0.8; /* effet d’éclaircissement subtil */
}

/* === Mini calendrier === */
.calendar {
  position: absolute;
  top: 130px;
  right: 225px;
  width: 260px;
  max-height: 300px; /* hauteur visible fixe */
  overflow-y: auto;  /* ✅ scroll vertical */
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  padding: 10px;
  font-family: system-ui, sans-serif;
  z-index: 1500;
}

.calendar-month {
  margin-bottom: 12px;
}

.calendar-header {
  text-align: center;
  font-weight: 600;
  margin-bottom: 8px;
  text-transform: capitalize;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}

.calendar-day {
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.calendar-day:hover {
  background: #e5e7eb;
}

.calendar-day.today {
  background: #2563eb;
  color: white;
  font-weight: bold;
}

.day-name {
  font-weight: 600;
  color: #555;
}

.hidden {
  display: none !important;
}

#wrapPeriod label.pill {
  background: #f1f5f9;
  cursor: pointer;
  user-select: none;
}
#wrapPeriod input[type="checkbox"] {
  transform: scale(1.2);
}

