/* =========================
   EV.css — Création d'événement
   Prefixe : EV-
   Dépend de GN.css (variables & composants)
   ========================= */

/* Contexte page */

.EV-page .GN-content {
  grid-column: 2;
  max-width: 860px;
}


/* Carte / formulaire */

.EV-form .GN-block-head {
  text-align: center;
  margin-bottom: 16px;
}
.EV-form .EV-subtitle {
  margin-top: 4px;
  font-size: .98em;
  color: var(--muted,#64748b);
}

/* Champs */
.EV-form .GN-form-field + .GN-form-field { margin-top: 10px; }
.EV-form .GN-form-grid { gap: 12px; }

/* Catégories (chips) */
.EV-catGrid{
  display: flex; flex-wrap: wrap; gap: 8px;
}
.EV-catBtn{
  display:inline-flex; align-items:center; gap:.4rem;
  padding:8px 12px; border-radius:999px;
  border:1px solid var(--bd,rgba(16,24,40,.10));
  background:var(--card-bg,#fff); color:var(--text,#1f2a44);
  cursor:pointer; user-select:none; font-weight:600;
}
.EV-catBtn:hover{ background:var(--surface-2,#f3f6fb); border-color:var(--bd,#cfd7e3); }
.EV-catBtn.is-selected{
  background: var(--brand,#20466e);
  color:#fff; border-color: transparent;
}

/* Sous-catégories */
.EV-subcatWrap{
  margin-top: 12px;
  padding: 10px;
  border:1px solid var(--bd,rgba(16,24,40,.10));
  border-radius: 12px;
  background:var(--card-bg,#fff);
}
.EV-subcatRow{ display:grid; grid-template-columns: 1fr; gap:8px; }
.EV-subcatLabel{ font-weight:600; font-size:.95em; }
.EV-subcatInput{ width:100%; }

/* Hints */
.EV-hint{ font-size:.9em; color:var(--muted,#64748b); margin-top:6px; }

/* Autocomplétion ville */
#EV-suggest-ville{
  display:none; position:absolute; top:calc(100% + 6px); left:0; right:0;
  max-height:260px; overflow:auto; z-index:4000;
  background:var(--card-bg,#fff); border:1px solid var(--bd,#d7e0ea); border-radius:12px;
  box-shadow:0 14px 30px rgba(16,24,40,.14);
}
#EV-suggest-ville .EV-suggestItem{
  padding:10px 12px; cursor:pointer; border-bottom:1px solid var(--bd,#eff3f8);
}
#EV-suggest-ville .EV-suggestItem:last-child{ border-bottom:none; }
#EV-suggest-ville .EV-suggestItem:hover{ background:var(--surface-2,#f3f7ff); }

/* Ligne actions */
.EV-actions{
  margin-top: 18px;
  display:flex; justify-content:center;
}

/* Petites retouches */
.EV-checkbox{ display:inline-flex; align-items:center; gap:8px; }
.EV-checkbox input[type="checkbox"]{ transform: translateY(1px); }

/* Anti-gap sous header uniquement pour cette page */
.EV-page .HD-spacer,
.EV-page .header-spacer,
.EV-page .header-placeholder{ display:none !important; height:0 !important; }
.EV-page main{ margin-top:0 !important; }
.EV-page .GN-layout{ margin-top:0 !important; }
.EV-page .GN-root main{ padding-top:8px; }

@media (min-width:768px){
  .EV-subcatRow{ grid-template-columns: 200px 1fr; align-items: start; }
}
/* =========================
   EV.css — Vue événement
   Prefixe : EV-
   ========================= */

/* Layout général */
.EV-page{ background:var(--bg,#f6f8fb); color:var(--text,#1f2a44); }
.EV-layout{ display:grid; grid-template-columns:minmax(0,1fr); gap:16px; max-width:1100px; margin:24px auto; padding:0 16px; }
.EV-side{ display:none; }
.EV-content{ min-width:0; }

/* Titre */
.EV-title{ margin:0 0 12px 0; font-size:1.5rem; font-weight:800; }

/* Catégories / badges */
.EV-cats{ display:flex; flex-wrap:wrap; gap:6px; margin-bottom:12px; }
.EV-badge{
  display:inline-block;
  background:var(--card-bg,#fff); border:1px solid var(--bd,rgba(16,24,40,.10));
  border-radius:999px; padding:6px 10px;
  font-size:.9rem; font-weight:600; color:var(--text,#1f2a44);
}

/* Photo */
.EV-photo img{
  max-width:100%; border-radius:12px;
  display:block; margin:12px 0;
}

/* Créateur */
.EV-createur{ display:flex; align-items:center; gap:8px; margin:12px 0; font-size:.95rem; }

/* Description */
.EV-description{ margin:16px 0; }
.EV-description h3{ margin:0 0 6px; font-size:1.1rem; }

/* Groupes */
.EV-groupes{ display:grid; gap:12px; margin:20px 0; }
.EV-groupe{ background:var(--card-bg,#fff); border:1px solid var(--bd,rgba(16,24,40,.10)); border-radius:12px; padding:12px; }
.EV-groupe h4{ margin:0 0 6px; font-size:1rem; font-weight:700; }
.EV-taille{ font-size:.9rem; color:var(--muted,#667085); }

/* Inscrits listés dans un groupe */
.EV-groupe-inscrits{
  display:flex; flex-wrap:wrap; gap:8px;
  margin-top:8px;
}
.EV-groupe-empty{
  color:var(--muted,#667085);
  font-size:.95rem;
  margin-top:6px;
}

/* Met en avant le groupe du visiteur */
.EV-groupe--mine{
  border-color:#2f6fed;
  box-shadow:0 0 0 3px rgba(47,111,237,.15);
}

/* Groupe owned par l'utilisateur courant */
.EV-groupe--owned{
  border-color:#27ae60;
  box-shadow:0 0 0 3px rgba(39,174,96,.12);
}

/* Badges join mode */
.EV-badge--open{
  background:#e8f5e9; color:#2e7d32; border-color:#a5d6a7;
  font-size:.82rem; padding:3px 8px;
}
.EV-badge--approval{
  background:#fff3e0; color:#e65100; border-color:#ffcc80;
  font-size:.82rem; padding:3px 8px;
}
.EV-badge--pending{
  background:#f3e5f5; color:#7b1fa2; border-color:#ce93d8;
  font-size:.82rem; padding:3px 8px;
}
.EV-badge--mine{
  background:#e3f2fd; color:#1565c0; border-color:#90caf9;
}

/* Owner label */
.EV-groupe-owner{
  font-size:.88rem; color:var(--muted,#667085); font-style:italic;
}

/* === Panneau de choix inscription === */
.EV-choice-panel{
  margin:12px 0; padding:16px;
  background:var(--surface-2,#f8fafd); border-radius:14px; border:1px solid var(--bd,#e3e8f0);
}
.EV-choice-panel__title{
  font-weight:600; font-size:1rem; margin-bottom:12px; text-align:center;
}
.EV-choice-panel__options{
  display:grid; grid-template-columns:1fr 1fr; gap:12px;
}
@media(max-width:500px){
  .EV-choice-panel__options{ grid-template-columns:1fr; }
}
.EV-choice-opt{ margin:0; }
.EV-choice-btn{
  display:flex; flex-direction:column; align-items:center;
  width:100%; padding:16px 12px;
  border-radius:12px; border:2px solid var(--bd,#e3e8f0); background:var(--card-bg,#fff);
  text-decoration:none; color:inherit; cursor:pointer;
  transition:border-color .15s, box-shadow .15s; text-align:center;
  font-family:inherit; font-size:inherit;
}
.EV-choice-btn:hover{
  border-color:var(--brand,#2f6fed); box-shadow:0 0 0 3px rgba(47,111,237,.12);
}
.EV-choice-btn--disabled{
  opacity:.65; cursor:default; border-style:dashed;
}
.EV-choice-btn--disabled:hover{
  border-color:var(--bd,#e3e8f0); box-shadow:none;
}
.EV-choice-btn__icon{ font-size:2rem; margin-bottom:6px; }
.EV-choice-btn__label{ font-weight:600; font-size:.95rem; }
.EV-choice-btn__hint{ font-size:.85rem; color:var(--muted,#667085); margin-top:2px; }
.EV-choice-btn__create-link{
  margin-top:8px; color:var(--brand,#2f6fed); font-size:.85rem; font-weight:500; text-decoration:underline;
}

/* === Cover photo sur groupe === */
.EV-groupe-cover{
  position:relative;
  margin:-12px -12px 0; border-radius:12px 12px 0 0; overflow:visible;
}
.EV-groupe-cover > img{
  display:block; width:100%; height:160px; object-fit:cover;
  border-radius:12px 12px 0 0;
}
.EV-groupe-cover__owner{
  position:absolute; bottom:-16px; left:10px;
  background:rgba(255,255,255,.92); border-radius:20px;
  padding:2px 4px; box-shadow:0 2px 8px rgba(0,0,0,.15);
}
.EV-groupe-cover__owner .CU.chip{
  font-size:.82rem; gap:6px; padding:3px 8px 3px 3px;
}
.EV-groupe-cover__owner .CU.chip img{
  width:28px; height:28px; border-radius:50%; object-fit:cover;
}
.EV-groupe-body{
  padding:20px 0 0;
}

/* === Cartes objet pour sélection === */
.EV-objets-choice{
  display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:12px; margin-top:12px;
}
.EV-objet-card{
  background:var(--card-bg,#fff); border:1px solid var(--bd,#e3e8f0); border-radius:14px;
  overflow:hidden; transition:box-shadow .15s;
}
.EV-objet-card:hover{ box-shadow:0 6px 12px rgba(0,0,0,.08); }
.EV-objet-card__cover{
  display:block; width:100%; height:120px; object-fit:cover;
}
.EV-objet-card__body{ padding:8px 12px; }
.EV-objet-card__meta{ display:block; font-size:.85rem; color:var(--muted,#667085); }
.EV-objet-card__opts{ padding:0 12px; }

/* === Message "pas d'objet" === */
.EV-no-objets{
  padding:16px; background:#fff8e1; border-radius:10px; /* badge état ambre — laissé */
  border:1px solid #ffe082; text-align:center;
}

/* Footer */
.EV-footer{ border-top:1px solid var(--bd,rgba(16,24,40,.10)); background:var(--card-bg,#fff); margin-top:24px; }
.EV-footer-inner{ max-width:1100px; margin:0 auto; padding:12px 16px; display:flex; justify-content:space-between; align-items:center; }
.EV-footer-nav{ display:flex; gap:12px; }
.EV-footer-nav a{ color:var(--brand,#20466e); text-decoration:none; }
.EV-footer-nav a:hover{ text-decoration:underline; }

/* Responsive colonnes */
@media(min-width:1024px){
  .EV-layout{ grid-template-columns:260px minmax(0,1fr) 260px; }
  .EV-side{ display:block; }
}
/* Vue évènement — cadrage photo + hauteur max */
.EV-photo{
  max-height: 420px;         /* mobile/tablette */
  overflow: hidden;
  border-radius: 12px;
}
.EV-photo img{
  width: 100%;
  height: 100%;
  object-fit: cover;          /* recadre sans déformer */
  display: block;
  border-radius: 12px;
}
@media (min-width:1024px){
  .EV-photo{ max-height: 520px; }   /* desktop */
}
.EV-photo {
  max-height: 480px;      /* limite en desktop */
  overflow: hidden;
  border-radius: 12px;
}
.EV-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;      /* recadre sans déformer */
  display: block;
}
/* --- Correctif EV-photo : annule le forcing en desktop --- */
.EV-photo img {
  width: auto !important;   /* stoppe le 100% */
  height: auto !important;  /* garde le ratio naturel */
  max-width: 100%;          /* ne déborde pas horizontalement */
  max-height: 90vh;         /* plafonne pour éviter l'écran entier */
  display: block;
  margin: 0 auto;           /* centre l’image si plus petite que le content */
  object-fit: contain;      /* au cas où */
}
/* --- Centrage des contenus événementiels pour rester dans l’axe de la photo --- */
.EV-title,
.EV-cats,
.EV-actions,
.EV-description,
.EV-createur,
.EV-groupes,
.EV-footer {
  text-align: center;
}

/* Les badges et boutons alignés proprement */
.EV-cats .EV-badge {
  display: inline-block;
  margin: 2px 4px;
}
.EV-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}
/* == Axe centré pour la page évènement, sans recadrer l'image == */

/* 1) Photo : déjà corrigée précédemment pour ne plus forcer 100% */
/* (on garde width:auto; height:auto; max-width:100%; max-height:90vh etc.) */

/* 2) Définir une largeur de contenu commune à tous les blocs */
:root { --ev-maxw: 900px; }              /* ajuste si tu veux plus/moins large */

/* 3) Centrer TOUT le contenu événementiel sous la photo, même les <p> "Date/Lieu" */
.GN-content .EV-title,
.GN-content .EV-cats,
.GN-content .EV-actions,
.GN-content .EV-description,
.GN-content .EV-createur,
.GN-content .EV-groupes,
.GN-content p:has(> strong) {            /* cible "Date :" et "Lieu :" sans changer le PHP */
  max-width: min(var(--ev-maxw), 100%);
  margin-inline: auto;                   /* centre le bloc */
  text-align: center;                    /* centre le texte */
}

/* 4) Catégories (badges) centrées et jolies en ligne */
.EV-cats { text-align: center; margin: 6px auto 8px; }
.EV-cats .EV-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  margin: 2px 6px;
  white-space: nowrap;
}

/* 5) Boutons d’action centrés proprement */
.EV-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px auto;
  max-width: min(var(--ev-maxw), 100%);
}

/* 6) Description / créateur : petits espacements cohérents */
.EV-description { margin: 14px auto 8px; line-height: 1.55; }
.EV-description h3 { margin: 0 0 6px; }
.EV-createur { margin: 8px auto; opacity: .85; }

/* 7) Groupes : on centre le bloc global; (le texte interne peut rester naturel) */
.EV-groupes { margin: 16px auto; }
.EV-groupes h3 { text-align: center; margin-bottom: 8px; }
.EV-groupes .EV-groupe {
  max-width: min(var(--ev-maxw), 100%);
  margin: 10px auto;
  text-align: center; /* si tu préfères gauche ici, remplace par left */
}

/* 8) Les deux <p> méta (Date/Lieu) centrés via :has(> strong) ci-dessus.
      Si jamais tu veux un style dédié : */
.GN-content p:has(> strong) {
  margin: 6px auto;
  font-weight: 500;
}
/* --- "Créé par ..." centré et dans l'axe commun --- */
.GN-content .EV-createur{
  max-width: min(var(--ev-maxw, 900px), 100%);
  margin: 8px auto 12px;
  display: flex;
  justify-content: center;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  text-align: center;
}
.GN-content .EV-createur span{ opacity: .75; }
.GN-content .EV-createur a{ font-weight: 600; text-decoration: none; }
/* ===== Flash messages (vue évènement) ===== */
.EV-flash{
  margin:12px auto;
  max-width:min(var(--ev-maxw, 900px), 100%);
  padding:10px 12px;
  border-radius:10px;
  font-weight:700;
  display:flex;
  align-items:center;
  gap:8px;
}
.EV-flash--ok{
  background:#ecfdf3;
  border:1px solid #12b76a;
  color:#027a48;
}
.EV-flash--error{
  background:#fff4f3;
  border:1px solid #ffd7d3;
  color:#b42318;
}
.EV-flashIcon{ line-height:1; }
/* ===== EV — Boutons d'action plus sexy ===== */
.EV-actions .GN-btn{
  min-width: 220px;
  padding: 14px 18px;
  border-radius: 999px;            /* pilule */
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: .2px;
  transition:
    transform .06s ease,
    box-shadow .2s ease,
    background .2s ease,
    border-color .2s ease,
    color .2s ease,
    filter .2s ease;
}

/* Focus propre (accessible) */
.EV-actions .GN-btn:focus-visible{
  outline: none;
  box-shadow:
    0 0 0 3px rgba(47,111,237,.25),
    0 10px 24px rgba(47,111,237,.20);
}

/* Press effect */
.EV-actions .GN-btn:active{ transform: translateY(1px); }

/* --- Je participe (primaire) --- */
.EV-actions .GN-btn--inscription{
  background: linear-gradient(135deg, var(--ok, #2f6fed) 0%, #4c83ff 100%);
  color:#fff;
  border-color: transparent;
  box-shadow: 0 8px 22px rgba(47,111,237,.25);
}
.EV-actions .GN-btn--inscription:hover{
  filter: brightness(.96);
  box-shadow: 0 12px 28px rgba(47,111,237,.32);
}
.EV-actions .GN-btn--inscription::before{
  content: "✚";
  margin-right: .5rem;
  font-weight: 900;
  transform: translateY(-.5px);
}

/* --- Me désinscrire (ghost danger soft) --- */
.EV-actions .GN-btn--ghost{
  background:var(--card-bg,#fff);
  color:#b42318;
  border-color:#f3b0a9;
  box-shadow: 0 1px 0 rgba(16,24,40,.05);
}
.EV-actions .GN-btn--ghost:hover{
  background:#fee4e2;
  border-color:#b42318;
}
.EV-actions .GN-btn--ghost::before{
  content: "–";
  margin-right:.5rem;
  font-weight:900;
}

/* --- Modifier mon événement (secondary) --- */
.EV-actions .GN-btn--secondary::before{
  content:"✎";
  margin-right:.5rem;
}

/* --- Me connecter (primary générique) --- */
.EV-actions .GN-btn--primary::before{
  content:"🔑";
  margin-right:.5rem;
}

/* Responsive : plus compacts sur petits écrans */
@media (max-width: 420px){
  .EV-actions .GN-btn{ min-width: 100%; }
}

/* Respecte les préférences d’animation */
@media (prefers-reduced-motion: reduce){
  .EV-actions .GN-btn{ transition:none; }
}

/* ===== EV — Boutons d'action ===== */
.EV-actions .GN-btn{
  min-width:220px;
  padding:14px 18px;
  border-radius:999px;
  font-size:1.02rem;
  font-weight:800;
  letter-spacing:.2px;
  transition:transform .06s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease, filter .2s ease;
}
.EV-actions .GN-btn:focus-visible{
  outline:none;
  box-shadow:0 0 0 3px rgba(47,111,237,.25), 0 10px 24px rgba(47,111,237,.20);
}
.EV-actions .GN-btn:active{ transform: translateY(1px); }

/* Je participe */
.EV-actions .GN-btn--inscription{
  background:linear-gradient(135deg, var(--ok,#2f6fed) 0%, #4c83ff 100%);
  color:#fff; border-color:transparent;
  box-shadow:0 8px 22px rgba(47,111,237,.25);
}
.EV-actions .GN-btn--inscription:hover{
  filter:brightness(.96);
  box-shadow:0 12px 28px rgba(47,111,237,.32);
}
.EV-actions .GN-btn--inscription::before{
  content:"✚"; margin-right:.5rem; font-weight:900;
}

/* Me désinscrire */
.EV-actions .GN-btn--ghost{
  background:var(--card-bg,#fff); color:#b42318; border-color:#f3b0a9;
  box-shadow:0 1px 0 rgba(16,24,40,.05);
}
.EV-actions .GN-btn--ghost:hover{ background:#fee4e2; border-color:#b42318; }
.EV-actions .GN-btn--ghost::before{ content:"–"; margin-right:.5rem; font-weight:900; }

/* Modifier */
.EV-actions .GN-btn--secondary::before{ content:"✎"; margin-right:.5rem; }

/* Me connecter */
.EV-actions .GN-btn--primary::before{ content:"🔑"; margin-right:.5rem; }

@media (max-width:420px){ .EV-actions .GN-btn{ min-width:100%; } }
@media (prefers-reduced-motion:reduce){ .EV-actions .GN-btn{ transition:none; } }

/* ===== Groupes : grille fluide, centré, jusqu'à 3 par ligne ===== */
.EV-groupes {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center; /* centre 1–2 groupes */
  margin-top: 12px;
}

/* La carte groupe prend une largeur fluide qui permet 3 par ligne sur tablette/PC */
.EV-groupes .EV-groupe {
  flex: 1 1 300px;     /* base 300px */
  max-width: 360px;    /* évite des cartes trop larges */
  min-width: 260px;    /* évite trop petit */
}

/* Sur mobile étroit, on tombe naturellement à 1 par ligne.
   Sur écrans >= 768px, la combinaison de min/max et du container centré donne 2–3 par ligne selon largeur. */

/* (Optionnel) un peu de respi en grand écran */
@media (min-width: 1200px) {
  .EV-groupes { gap: 20px; }
  .EV-groupes .EV-groupe { max-width: 380px; }
}
.EV-groupes-title {
  text-align: center;
  margin-bottom: 16px; /* espace avec la grille */
}
/* === Grille des inscrits (sans groupes) === */
.EV-section--inscrits .EV-inscrits-list{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); /* mobile: 2 */
  gap: 12px 16px;
  justify-items: center;   /* centre chaque item */
  align-items: center;
  margin: 12px auto 0;
  max-width: 1000px;       /* limite pour un centrage visuel propre */
}

/* 4 colonnes dès tablette/desktop */
@media (min-width: 768px){
  .EV-section--inscrits .EV-inscrits-list{
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* S'assure que la puce ne s'étire pas en pleine largeur */
.EV-section--inscrits .EV-inscrits-list .CU-chip{
  width: max-content;      /* laisse la puce à sa largeur utile */
  justify-self: center;    /* la centre dans sa cellule */
}
/* ===== Bloc "Inscrits" : cadre + marges + titre centré ===== */
.EV-section--inscrits{
  border: 1px solid var(--bd, rgba(16,24,40,.10));
  background: var(--card-bg, #fff);
  border-radius: var(--radius, 12px);
  padding: 16px;
  margin: 20px 0 28px; /* espace sous le bloc avant la suite */
}

.EV-section--inscrits .EV-section-title{
  text-align: center;
  font-weight: 700;
  letter-spacing: .2px;
  margin: 0 0 12px;
}

/* Badge du compteur "(2)" */
.EV-section--inscrits .EV-count{
  display: inline-block;
  font-weight: 600;
  opacity: .8;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(47,111,237,.08); /* léger fond bleu */
  border: 1px solid rgba(47,111,237,.22);
}

/* ===== Grille des inscrits : centrage parfait avec flex ===== */
.EV-section--inscrits .EV-inscrits-list{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;   /* centre la ligne même si < 4 éléments */
  gap: 12px 16px;
  margin: 8px auto 0;
  max-width: 1000px;         /* confort visuel */
}

/* Items : 2 colonnes en mobile */
.EV-section--inscrits .EV-inscrits-list .CU-chip{
  flex: 0 1 calc(50% - 16px);  /* 2 par ligne */
  justify-content: center;      /* contenu centré dans la puce */
}

/* 4 colonnes dès tablette/desktop */
@media (min-width: 768px){
  .EV-section--inscrits .EV-inscrits-list .CU-chip{
    flex: 0 1 calc(25% - 16px); /* 4 par ligne */
  }
}

/* Empêche les puces de s’étirer inutilement */
.EV-section--inscrits .EV-inscrits-list .CU-chip{
  width: auto;
  text-align: center;
}
/* ===== Créateur : aligné, sur 1 ligne, cohérent avec les cartouches ===== */
.EV-createur{
  display: flex;
  align-items: center;
  justify-content: center;   /* 1) centré */
  gap: 12px;                  /* espace entre "Créé par" et le cartouche */
  margin: 20px 0 24px;        /* respiration autour */
  flex-wrap: wrap;            /* autorise le retour ligne en tout petit écran */
}
@media (min-width: 480px){
  .EV-createur{ flex-wrap: nowrap; }  /* 2) reste sur une ligne dès ≥480px */
}

/* Libellé "Créé par" */
.EV-createur-label{
  font-weight: 600;
  font-size: 0.95rem;
  opacity: .85;
}

/* 3) Cartouche du créateur = même rendu que les inscrits */
.EV-createur .CU.chip{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--bd, rgba(16,24,40,.20));
  background: var(--card-bg, #fff);
  border-radius: var(--radius, 12px);
  box-shadow: 0 2px 8px rgba(16,24,40,.06);
  text-decoration: none;
  color: inherit;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.EV-createur .CU.chip:hover{
  border-color: rgba(47,111,237,.35);
  box-shadow:
    0 0 0 2px rgba(47,111,237,.28),  /* liseré plus épais au survol */
    0 8px 24px rgba(16,24,40,.12);
}/* Centrer les éléments juste sous le titre de l'événement */
.EV-title { text-align:center; }

/* Compteurs/flash */
.EV-badge,
.EV-flash {
  display: inline-block;
  margin: 8px auto 0;
  text-align: center;
}
.GN-content > .EV-badge,
.GN-content > .EV-flash {
  display:block;           /* s'assure que auto center fonctionne */
  width: max-content;      /* se dimensionne au contenu */
}

/* Liste de catégories en badges, centrée et sur plusieurs lignes si besoin */
.EV-cats {
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:8px;
  margin: 10px auto 0;
  max-width: 900px; /* évite de s'étirer trop large */
  text-align:center;
}

/* Photo centrée (au cas où) */
.EV-photo { display:flex; justify-content:center; }
.EV-photo img { max-width:100%; height:auto; border-radius:12px; }

/* Bloc actions (boutons) centré */
.EV-actions {
  display:flex;
  justify-content:center;
  gap:12px;
  margin: 16px auto;
}

/* Recherche activité */
#ev-activity-search { width: 100%; }
#ev-activity-dl option { /* rien ici, c’est juste pour rappel */ }


.EV-subcatWrap.is-autofilled { outline: 2px dashed var(--ok); outline-offset: 6px; }

.EV-banner {
  background-color: #FFA500; /* Jaune clair */
  padding: 10px;
  text-align: center;
  font-weight: bold;
  color: #333;
  border-radius: 5px;
  margin-bottom: 20px;
}
.EV-subcatWrap.is-autofilled { animation: flashFill 1.2s ease-out; }
@keyframes flashFill { 0%{background:rgba(255,230,150,.6)} 100%{background:transparent} }

/* Suggestions “Recherche rapide d’activité” */
#ev-activity-menu {
  position: static;
  z-index: 10;
  background: var(--card-bg,#fff);
  border: 1px solid var(--bd,rgba(0,0,0,.12));
  border-radius: 8px;
  margin-top: 4px;
  box-shadow: 0 6px 24px rgba(0,0,0,.10);
  display: none;
  max-height: 260px;
  overflow: auto;
  width: 100%;
}

#ev-activity-menu .ev-opt {
  padding: 10px 12px;
  cursor: pointer;
  line-height: 1.3;
}

#ev-activity-menu .ev-opt[aria-selected="true"],
#ev-activity-menu .ev-opt:hover {
  background: var(--surface-2,#f5f7fb);
}

.GN-form-field:has(#ev-activity-search) { position: relative; }


/* Pour éviter la page étriquée : */
.EV-form {
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 20px 24px 20px;
  background: var(--card-bg,#fff);
  border-radius: 22px;
  box-shadow: 0 4px 18px -8px #0001;
}
@media (max-width:700px) {
  .EV-form {
    max-width: 99vw;
    padding: 12vw 2vw;
    border-radius: 0;
  }
}
.ev-opt[aria-selected="true"] {
  background: #e3ebf6 !important;
  color: var(--text,#1f2a44);
}
/* Rétrécir les deux boutons (non connecté) sur mobile */
@media (max-width: 520px) {
  .EV-authActions {
    justify-content: center;
  }

  /* Cible explicitement les deux variantes */
  .EV-authActions a.GN-btn.GN-btn--primary,
  .EV-authActions a.GN-btn.GN-btn--secondary {
    width: auto !important;   /* annule 100% */
    max-width: 85vw;          /* évite trop large */
    min-width: 170px;         /* lisible */
    margin: 0 auto;           /* bien centré */
    padding: 12px 18px;
    text-align: center;
  }
}
.EV-subcatAll{
  margin-top:6px;
  border:1px solid var(--GN-border,#d6d9de);
  border-radius:10px;
  background:var(--card-bg,#fff);
  max-height:220px;
  overflow:auto;
  padding:6px;
}
.EV-subopt{ padding:8px 10px; cursor:pointer; border-radius:8px; }
.EV-subopt:hover{ background:var(--surface-2,#eef3fb); }

/* Menu commun pour les listes d'options (recherche rapide + sous-catégories) */
.ev-menu {
  display: block;              /* sera masqué par [hidden] */
  position: absolute;
  z-index: 20;
  left: 0; right: 0;
  background: var(--card-bg,#fff);
  border: 1px solid var(--GN-border, #d6d9de);
  border-radius: 10px;
  max-height: 260px;
  overflow: auto;
  width: 100%;
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
  margin-top: 4px;             /* colle juste sous l'input */
}
.ev-menu[hidden] { display: none !important; }
.ev-opt { padding: 8px 10px; cursor: pointer; }
.ev-opt[aria-selected="true"] { background: #e3ebf6; }

.EV-classiques-row{display:flex;gap:8px;flex-wrap:wrap}
.GN-btn--chip{border-radius:999px;padding:6px 12px}

/* Aligne le bouton "Continuer" à droite quand il n'est pas full-width */
.EV-page .EV-nav { 
  justify-content: flex-start; /* on packe à gauche par défaut */
}

/* Le bouton primaire se pousse tout seul à droite */
.EV-page .EV-nav .GN-btn--primary[data-next],
.EV-page .EV-nav .GN-btn--primary[type="submit"] {
  margin-left: auto;
}

/* Déjà en mobile on force full-width, donc rien à changer.
   (garde tes règles mobiles existantes qui mettent width:100%) */
/* ===== Progress bar wizard ===== */
.EV-progressWrap{margin:10px 0 18px}
.EV-progressTrack{
  position:relative; height:8px; border-radius:999px;
  background:var(--surface-2,#e8edf3); overflow:hidden;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.04);
}
.EV-progressFill{
  position:absolute; inset:0 auto 0 0; width:0%;
  background:linear-gradient(90deg, var(--GN-brand,#20466e), #6ea6da);
  border-radius:999px; transition:width .28s ease;
}
.EV-progressDots{
  display:flex; justify-content:space-between; gap:6px; margin-top:8px;
}
.EV-progressDot{
  width:24px; height:24px; border-radius:999px;
  background:var(--surface-2,#e5e7eb); border:2px solid var(--bd,#cbd5e1);
  color:var(--muted,#64748b); font:600 12px/20px system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  display:flex; align-items:center; justify-content:center; user-select:none;
  transition:transform .12s ease, background .12s ease, border-color .12s ease, color .12s ease;
}
.EV-progressDot.is-done{ background:#d1e3f7; border-color:#9cc0e6; color:#1e3a5f }
.EV-progressDot.is-active{ background:var(--GN-brand,#20466e); border-color:var(--GN-brand,#20466e); color:#fff }
.EV-progressMeta{ margin-top:6px; font-size:.9rem; color:var(--muted,#475569); text-align:right }

/* clic autorisé si tu veux permettre les sauts d’étapes */
.EV-progressDot{ cursor:pointer }
/* === Wizard progress (map pour les classes générées par le JS) === */
#EV-progress { margin: 10px 0 18px; }

#EV-progress .EV-progress__track {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2,#e8edf3);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.04);
}

#EV-progress .EV-progress__fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0%;                 /* sera mis à jour en JS */
  background: linear-gradient(90deg, var(--GN-brand,#20466e), #6ea6da);
  border-radius: 999px;
  transition: width .28s ease;
}

#EV-progress .EV-progress__label {
  display: block;
  margin-top: 6px;
  font-size: .9rem;
  color: var(--muted,#475569);
  text-align: right;
}
/* Modèle — habillage minimal en s'appuyant sur GN.css */
.EV-page .GN-content{ max-width:760px; margin-inline:auto; }
.EV-page h1{ margin:16px 0 12px; font-size:1.35rem; line-height:1.25; }
.EV-page .EV-form{ gap:var(--gap); }

/* 2 colonnes dès tablette, bouton sur toute la rangée */
@media (min-width:768px){
  .EV-page .EV-form{ grid-template-columns:1fr 1fr; }
  .EV-page .EV-form .GN-form-actions{ grid-column:1 / -1; display:flex; justify-content:flex-end; }
}
.EV-items input[name="quantite"] {
  max-width: 80px;   /* largeur adaptée aux chiffres */
  text-align: center; /* centrage pour plus de lisibilité */
}
.EV-items input {
  height: 40px;           /* même hauteur que les autres */
  border-radius: 6px;     /* cohérence visuelle */
  padding: 0 8px;
}
/* B) Assure le bon plan de pile et la cliquabilité du menu global EV */
#ev-activity-menu {
  z-index: 9999;        /* au-dessus des overlays éventuels */
  pointer-events: auto; /* cliquable même si ancêtres restrictifs */
}

/* Si le wrapper du champ global n'a pas déjà position: relative */
.CATP-quickWrap { position: relative; }

/* Par sécurité, on force la cliquabilité du champ et du menu */
#ev-activity-search { pointer-events: auto; }
/* Jauge de progression en haut de page */
#EV-progress-img{
  display:block;
  /* taille responsive : mini 220px, ~60% de la largeur de l’écran, maxi 520px */
  width: clamp(220px, 60vw, 520px);
  height:auto;          /* conserve les proportions */
  margin: 12px auto 16px; /* centre l’image */
  max-width: 100%;      /* sécurité si le conteneur est petit */
}


/* Fix boutons "Se connecter / S’inscrire" – mobile uniquement */
@media (max-width:520px){
  .EV-actions .EV-authActions { 
    justify-content: center; 
  }
  .EV-actions .EV-authActions .GN-btn{
    flex: 0 0 auto !important;   /* stop l’étirement par le flex */
    width: auto !important;       /* pas 100% */
    max-width: 80vw;              /* compact mais lisible */
    min-width: 160px;
    align-self: center !important;
    padding: 12px 16px;
    text-align: center;
  }
}
 /* Conteneur pour les boutons de partage */
.share-buttons {
    display: flex;
    justify-content: center; /* Centrage horizontal */
    align-items: center;     /* Centrage vertical */
    gap: 15px;               /* Espacement entre les boutons */
    margin: 20px 0;          /* Espacement autour des boutons */
}

/* Style de base pour les boutons de partage */
.share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s, color 0.3s;
    border: none;
    text-decoration: none;
}

/* Bouton Facebook */
.share-button.facebook {
    background-color: #4267B2; /* Bleu Facebook */
    color: white;
}

.share-button.facebook:hover {
    background-color: #365899; /* Bleu Facebook foncé au survol */
}

/* Bouton WhatsApp */
.share-button.whatsapp {
    background-color: #54946c; /* Vert WhatsApp */
    color: white;
}

.share-button.whatsapp:hover {
    background-color: #128C7E; /* Vert foncé WhatsApp au survol */
}

/* Bouton Copier le lien */
.share-button.copy {
    background-color: transparent;
    color: #5a9c5e; /* Vert doux */
    border: 2px solid #5a9c5e;
}

.share-button.copy:hover {
    background-color: #5a9c5e; /* Vert au survol */
    color: white;
}

/* ================== [AJOUT POLL] Styles légers sondage ================== */
.EV-poll{border:1px solid var(--bd,rgba(16,24,40,.12));border-radius:14px;padding:14px;margin:18px 0;background:var(--card-bg,#fff);}
.EV-poll h3{margin:0 0 8px 0;font-size:1.05rem}
.EV-poll .EV-hint{color:var(--muted,#667085);font-size:.92rem}
.EV-poll-options{display:flex;flex-direction:column;gap:8px;margin-top:10px}
.EV-poll-actions{display:flex;gap:8px;align-items:center;margin-top:10px;flex-wrap:wrap}
.EV-poll-results{margin-top:10px}
.EV-pbar{height:10px;border-radius:6px;background:var(--surface-2,#F2F4F7);overflow:hidden}
.EV-pbar > span{display:block;height:100%;}
/* ================== [FIN AJOUT POLL] ================== */

.EV-top-infos {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.EV-top-infos span {
  display: flex;
  flex-direction: column;
  align-items: center; /* ou supprime cette ligne si tu n’en as pas besoin */
}
/* Aperçu photos organisateur — grille, pas de scroll horizontal */
.EV-photosPreview{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  padding:8px;
  border-radius:12px;
  background:var(--card-bg,#fff);
  overflow:hidden; /* évite toute barre de scroll */
}
@media (max-width:720px){
  .EV-photosPreview{ grid-template-columns:repeat(2,1fr); }
}
@media (max-width:420px){
  .EV-photosPreview{ grid-template-columns:1fr; }
}

.EV-shot--preview{ position:relative; }
.EV-shot--preview img{
  display:block;
  width:100%;
  height:180px;           /* même hauteur qu’avant, rendu homogène */
  object-fit:cover;
  border-radius:12px;
}

/* Légende sous les vignettes (inchangé) */
.EV-shotCap{
  font-size:.85rem;
  color:var(--muted,#475467);
  margin-top:6px;
  padding:0 4px;
}

/* Petit spacing sous les boutons */
.EV-photoActions{ margin-top:10px; }

/* Lightbox album participants */
.EV-modal{
  position:fixed; inset:0; z-index:1000;
  display:none; align-items:center; justify-content:center;
  background:rgba(0,0,0,.85);
}
.EV-modal--open{ display:flex; }
.EV-modal--hidden{ display:none; }

.EV-modal-body{ max-width:min(92vw,1200px); max-height:88vh; }
#EV-modalImg{ display:block; max-width:100%; max-height:88vh; }

.EV-modal-close{
  position:absolute; top:16px; right:16px;
  font-size:32px; line-height:1;
  background:transparent; border:0; color:#fff; cursor:pointer;
}

.EV-nav{
  position:absolute; top:50%; transform:translateY(-50%);
  width:52px; height:72px; border:0; cursor:pointer;
  color:#fff; font-size:30px; border-radius:10px;
  background:rgba(255,255,255,.15);
}
.EV-nav--prev{ left:16px; }
.EV-nav--next{ right:16px; }
@media (hover:hover){ .EV-nav:hover{ background:rgba(255,255,255,.25);} }

.EV-counter{
  position:absolute; bottom:12px; left:50%; transform:translateX(-50%);
  color:#fff; font-size:14px; background:rgba(0,0,0,.35);
  padding:4px 8px; border-radius:8px;
}


/* Album agrégé */
.EV-album{margin:22px 0}
.EV-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px}
.EV-thumb{position:relative;display:block;border-radius:10px;overflow:hidden;background:var(--card-bg,#fff);border:1px solid var(--bd,rgba(16,24,40,.08))}
.EV-thumb img{width:100%;height:140px;object-fit:cover;display:block}
.EV-badgeSrc{position:absolute;left:8px;bottom:8px;background:rgba(0,0,0,.55);color:#fff;font-size:.75rem;padding:3px 6px;border-radius:6px}

    .partage-bloc {
      display: flex; gap: 10px; align-items: center; margin: 14px 0 20px 0;
    }
    .GN-btn--facebook { background: #4267B2; color: #fff; }
    .GN-btn--whatsapp { background: #25D366; color: #fff; }

/* ================== [EV: OFFRE SPECIALE] ================== */
.EV-offre{
  border:1px solid var(--bd,rgba(16,24,40,.12));
  background:var(--card-bg,#fff);
  border-radius:14px;
  padding:16px;
  margin:18px 0;
}
.EV-offre h3{
  margin:0 0 8px 0;
  font-size:1.05rem;
}
.EV-offre .EV-offreBadge{
  display:inline-block;
  font-size:.82rem;
  line-height:1;
  background:var(--surface-2,#F2F4F7);
  color:var(--text,#344054);
  padding:6px 8px;
  border-radius:999px;
  margin-bottom:10px;
}
.EV-offre .EV-offrePro-by{ font-size:.8rem; color:var(--muted,#667085); margin:2px 0 6px; }
.EV-offre .EV-offrePro-card{
  display:block; text-decoration:none; color:inherit;
  border:1px solid var(--bd,rgba(16,24,40,.12));
  border-radius:12px; overflow:hidden;
  background:var(--surface-2,#f7f9fc);
  margin:0 0 12px 0;
  transition:box-shadow .12s ease, transform .12s ease;
}
.EV-offre .EV-offrePro-card:hover{ box-shadow:0 6px 16px rgba(16,24,40,.12); transform:translateY(-1px); }
.EV-offre .EV-offrePro-cover{ display:block; aspect-ratio:16 / 6; background:var(--surface-2,#eef2f7); }
.EV-offre .EV-offrePro-cover img{ width:100%; height:100%; object-fit:cover; display:block; }
.EV-offre .EV-offrePro-row{ display:flex; align-items:center; gap:10px; padding:10px 12px; }
.EV-offre .EV-offrePro-logo{
  width:48px; height:48px; flex:0 0 auto;
  border-radius:10px; object-fit:cover;
  background:var(--card-bg,#fff); border:1px solid var(--bd,rgba(16,24,40,.10));
}
.EV-offre .EV-offrePro-logo--ph{
  display:flex; align-items:center; justify-content:center;
  color:var(--muted,#98a2b3); background:var(--surface-2,#eef2f7);
}
.EV-offre .EV-offrePro-logo--ph svg{ width:26px; height:26px; }
.EV-offre .EV-offrePro-info{ display:flex; flex-direction:column; gap:2px; min-width:0; flex:1 1 auto; }
.EV-offre .EV-offrePro-name{ font-weight:700; font-size:1rem; color:var(--text,#1c2a33); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.EV-offre .EV-offrePro-cat{ font-size:.82rem; color:var(--brand,#2f6fed); font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.EV-offre .EV-offrePro-loc{ font-size:.8rem; color:var(--muted,#667085); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.EV-offre .EV-offrePro-go{ flex:0 0 auto; color:var(--muted,#98a2b3); font-size:1.4rem; line-height:1; }
/* 1) Footer = bande statique, pas d’overlay */
.GN-footer {
  position: static;           /* pas fixé, donc sous le contenu */
  background: #0d3b66;        /* remis en bleu "dur" pour éviter une var vide */
  color: #fff;
  z-index: auto;
}
.GN-footer a { color:#fff; }

/* 2) Si le footer avait été fixé quelque part, on neutralise */
.GN-footer--fixed { position: static !important; }

/* 3) S’il existe un panneau calendrier mobile, qu’il disparaisse vraiment */
.calpanel[hidden] { display: none !important; }

/* 4) On s'assure que la discussion passe devant d’éventuels éléments bas de page */
.FX-wrapper { position: relative; z-index: 1; }

/* ===== EV — Mobile : supprimer le "trou" sous le header ===== */
@media (max-width: 768px){
  /* 1) Plus AUCUNE hauteur imposée à la photo en mobile */
  .EV-photo{
    max-height: none !important;
    height: auto !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    overflow: visible !important;
  }
  .EV-photo img{
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important; /* pas de recadrage agressif */
  }

  /* 2) Premier bloc : pas de marge haute qui s’effondre */
  .EV-layout{ margin-top: 0 !important; padding-top: 6px !important; }
  .EV-layout > *:first-child{ margin-top: 0 !important; }

  /* 3) Le titre ne repousse pas vers le bas */
  .EV-title, .EV-page h1{ margin-top: 0 !important; line-height: 1.25; }

  /* 4) Si la photo est vide, on la masque (mobile seulement) */
  /* Exception: .EV-photo--race n'a pas d'<img> par design (tuile SVG circuit) */
  .EV-photo:not(.EV-photo--race):has(img[src=""]),
  .EV-photo:not(.EV-photo--race):has(img:not([src])),
  .EV-photo:not(.EV-photo--race):not(:has(img)){
    display: none !important;
  }
}
/* ============ GroupMaker — EV (style boutons d'action objets/événements) ============ */

.EV-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  background-color: var(--obj-accent, #1f6feb);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.EV-btn:hover {
  background-color: #2c7af0;
  transform: translateY(-1px);
}

.EV-btn:active {
  transform: translateY(0);
}

.EV-btn:focus-visible {
  outline: 2px solid var(--obj-accent, #1f6feb);
  outline-offset: 2px;
}

/* Variante claire */
.EV-btn--light {
  background-color: #fff;
  border-color: var(--obj-border, #d0d7de);
  color: #111;
}

.EV-btn--light:hover {
  background-color: var(--obj-bg-soft, #f5f7fa);
}

/* Variante danger */
.EV-btn--danger {
  background-color: #b91c1c;
  color: #fff;
  border: 1px solid #b91c1c;
}

.EV-btn--danger:hover {
  background-color: #d42222;
}

/* Version icônes seules (⬆️ ⬇️) */
.EV-btn[title] {
  padding: 8px 10px;
  font-size: 16px;
  min-width: 40px;
  text-align: center;
}

/* Thème sombre */
@media (prefers-color-scheme: dark) {
  .EV-btn--light {
    background-color: #111;
    border-color: #333;
    color: #f5f5f5;
  }

  .EV-btn--light:hover {
    background-color: #1a1a1a;
  }
}
/* ===========================================
   Hint pour sélection de groupe (événements)
   =========================================== */

.EV-group-hint {
  display: none;
  margin: 10px 0 15px 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: #e0f2fe;     /* bleu clair */
  color: #0f172a;          /* bleu foncé lisible */
  font-size: 0.95rem;
  line-height: 1.35;
  display: flex;
  align-items: center;
  gap: 10px;
}

.EV-group-hint.is-visible {
  display: flex;
}

.EV-group-hint-text {
  flex: 1;
}

.EV-group-hint-close {
  border: none;
  background: transparent;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  color: #0f172a;
}

/* ===========================================
   (Optionnel) Highlight temporaire de groupe
   =========================================== */

.EV-groupe--highlight {
  animation: evGroupFlash 1.4s ease-out;
}

@keyframes evGroupFlash {
  0%   { background-color: #dbeafe; }
  100% { background-color: transparent; }
}

.EV-datetime-lieu {
    font-size: 1rem;
    margin: 0 0 10px 0;
    line-height: 1.4;
    font-weight: 500;
    word-wrap: break-word;
}

.EV-datetime-lieu .EV-lieu {
    white-space: normal; /* Autorise retour ligne */
}
.EV-route { display: inline; }
.EV-route-arrow {
    display: inline-block; margin: 0 4px;
    font-weight: 700; color: var(--brand, #20466e);
}
.EV-route-point { white-space: nowrap; }

/* Bloc parcours carte */
.EV-map-route {
    margin: 12px 0; padding: 12px 14px;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #bae6fd; border-radius: 12px;
}
.EV-map-route-info { font-size: 14px; color: #1e3a5f; margin-bottom: 8px; }
.EV-map-route-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.EV-map-route-btn {
    display: inline-block; padding: 8px 16px;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: #fff; font-size: 13px; font-weight: 600;
    border-radius: 8px; text-decoration: none;
}
.EV-map-route-btn:active { opacity: .8; }
.EV-map-route-btn--live { background: linear-gradient(135deg, #ef4444, #dc2626); }

/* Bouton tracer parcours (création événement) */
.CrEv-map-route-btn {
    display: inline-block; padding: 10px 18px;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: #fff; font-size: 13px; font-weight: 700;
    border-radius: 10px; text-decoration: none;
}
.CrEv-route-preview {
    margin-top: 8px; padding: 8px 12px;
    background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 8px;
    font-size: 12px; color: #0c4a6e;
}
/* Cacher le bouton d'inscription pleine page en mobile
   (on garde uniquement la bottom bar pour ça) */
@media (max-width: 768px) {
  /* Si le navigateur supporte :has(), on masque tout le formulaire */
  .EV-actions form:has([data-gm-role="event-join-toggle"]) {
    display: none;
  }

  /* Fallback au cas où :has() n'est pas disponible */
  .EV-actions [data-gm-role="event-join-toggle"] {
    display: none;
  }
}
@media (max-width: 768px) {
  .EV-share--desktopOnly {
    display: none;
  }
}
/* Bouton modifier événement : uniquement desktop */
@media (max-width: 768px) {
  .EV-edit--desktopOnly {
    display: none !important;
  }
}
.Ev-amenitiesRow {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

.Ev-amenity {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.78rem;
  text-align: center;
  min-width: 60px;
}

.Ev-amenityIcon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  margin-bottom: 3px;
}

/* ============================================================
   EV-race-actions : CTAs course ouverte sur la page event
   (visible uniquement quand l'event a un circuit_id non NULL).
   Style night-sea, reprend le ton des tuiles racing du hub.
   ============================================================ */
.EV-race-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 16px;
}
.EV-race-form { margin: 0; padding: 0; }
.EV-race-form .EV-race-btn { width: 100%; }

.EV-race-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: #e0eaf5;
  background: linear-gradient(135deg, #0c2540 0%, #143659 60%, #1a4575 100%);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  transition: transform .12s, box-shadow .15s, filter .15s;
}
.EV-race-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 8px 22px rgba(0,0,0,0.35);
}
.EV-race-btn-ic {
  flex: 0 0 auto;
  font-size: 1.6rem;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}
.EV-race-btn-info {
  display: flex; flex-direction: column; min-width: 0; line-height: 1.25;
}
.EV-race-btn-title {
  font-weight: 800;
  color: #fff;
  font-size: 0.95rem;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.EV-race-btn-sub {
  font-size: 0.78rem;
  color: #b5c7dd;
}

/* Variante "Rejoindre" : accent doré */
.EV-race-btn--join {
  background: linear-gradient(135deg, #4a3a1a 0%, #8a6a2a 60%, #a87e30 100%);
  border-color: rgba(251,191,36,0.45);
}
.EV-race-btn--join .EV-race-btn-title { color: #fde68a; }
.EV-race-btn--join .EV-race-btn-sub   { color: #fcd34d; opacity: 0.85; }

/* Variante "Voir parcours" : accent cyan */
.EV-race-btn--map {
  background: linear-gradient(135deg, #0c2540 0%, #143659 60%, #1a4575 100%);
}
.EV-race-btn--map .EV-race-btn-title { color: #c5f0fb; }
.EV-race-btn--map .EV-race-btn-sub   { color: #99d9ec; }

/* État "déjà inscrit" : pas un bouton, juste un message */
.EV-race-joined {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(45,212,191,0.18);
  border: 1px solid rgba(45,212,191,0.45);
  color: #99f6e4;
  font-weight: 700;
  font-size: 0.9rem;
}
.EV-race-joined .EV-race-btn-ic { font-size: 1.2rem; }

/* ============================================================
   Hero événement — variante "course ouverte" (.EV-photo--race)
   Remplace la photo cover quand l'event est lié à un circuit
   racing. Reprend la palette night-sea + or des tuiles racing
   (cohérence visuelle avec CE-race et FBX--race du flux).
   ============================================================ */
.EV-photo--race {
  background: linear-gradient(135deg, #0c2540 0%, #143659 60%, #1a4575 100%);
  border-radius: 14px;
  padding: 28px 16px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 32px rgba(0,0,0,0.35);
  min-height: 240px;
}
.EV-photo--race::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center top, rgba(251,191,36,0.18) 0%, transparent 60%);
  pointer-events: none;
}
.EV-photo--race .EV-race-shape {
  position: relative; z-index: 1;
  width: 110px; height: 110px;
  color: #fbbf24;
  filter: drop-shadow(0 0 10px rgba(251,191,36,0.45));
}
.EV-photo--race .EV-race-shape svg { width: 100%; height: 100%; }
.EV-photo--race .EV-race-title {
  position: relative; z-index: 1;
  font-weight: 800;
  font-size: 1.35rem;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
  line-height: 1.2;
}
.EV-photo--race .EV-race-sub {
  position: relative; z-index: 1;
  font-size: 0.95rem;
  color: #b5c7dd;
  line-height: 1.3;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.EV-photo--race .EV-race-badge {
  position: relative; z-index: 1;
  display: inline-block;
  margin-top: 4px;
  padding: 5px 14px;
  background: rgba(251,191,36,0.2);
  border: 1px solid rgba(251,191,36,0.6);
  border-radius: 999px;
  color: #fde68a;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
@media (max-width: 520px) {
  .EV-photo--race { padding: 22px 12px 18px; min-height: 200px; }
  .EV-photo--race .EV-race-shape { width: 88px; height: 88px; }
  .EV-photo--race .EV-race-title { font-size: 1.15rem; }
  .EV-photo--race .EV-race-sub   { font-size: 0.85rem; }
  .EV-photo--race .EV-race-badge { font-size: 0.78rem; padding: 4px 11px; }
}

/* Plage horaire dans l'en-tête date/lieu */
.EV-time-arrow { opacity: .6; margin: 0 2px; }

/* ── Modale « Inviter » (créateur) ── */
.EV-inviteModal {
  position: fixed; inset: 0; z-index: 2147483000;
  background: rgba(8,18,32,.5);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.EV-inviteModal[hidden] { display: none; }
.EV-invite-panel {
  background: #fff; color: #1f3a5c;
  width: min(460px, 100%); max-height: 85vh; overflow: auto;
  border-radius: 14px; box-shadow: 0 18px 60px rgba(0,0,0,.3);
  padding: 16px;
}
.EV-invite-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.EV-invite-head strong { font-size: 1.05rem; }
.EV-invite-close { background: none; border: 0; font-size: 1.6rem; line-height: 1; cursor: pointer; color: #64748b; }
.EV-invite-search,
.EV-invite-emails {
  width: 100%; box-sizing: border-box; padding: 10px 12px;
  border: 1px solid #d6dbe7; border-radius: 10px; font-size: .95rem; outline: none;
}
.EV-invite-results { margin: 10px 0; display: flex; flex-direction: column; gap: 2px; max-height: 40vh; overflow: auto; }
.EV-invite-item {
  display: flex; align-items: center; gap: 10px; padding: 7px 6px;
  border-radius: 8px; cursor: pointer;
}
.EV-invite-item:hover { background: #f2f8ff; }
.EV-invite-av { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: #e6eef7; flex: 0 0 auto; }
.EV-invite-name { font-size: .92rem; }
.EV-invite-pseudo { color: #7a8699; }
.EV-invite-empty { color: #7a8699; font-size: .9rem; padding: 8px 6px; }
.EV-invite-emails-label { display: block; margin: 8px 0 4px; font-size: .82rem; color: #64748b; }
.EV-invite-actions { display: flex; flex-direction: column; align-items: stretch; gap: 8px; margin-top: 14px; }
.EV-invite-count { font-size: .85rem; color: #37587e; text-align: center; min-height: 1em; }
#EV-invite-send { width: 100%; white-space: nowrap; }

@media (prefers-color-scheme: dark) {
  .EV-invite-panel { background: #16243a; color: #cfe0f5; }
  .EV-invite-search, .EV-invite-emails { background: #0f1c2e; border-color: #274666; color: #cfe0f5; }
  .EV-invite-item:hover { background: #1d3350; }
  .EV-invite-pseudo, .EV-invite-emails-label { color: #90a6c4; }
}

/* ── Météo prévue au-dessus de la description (chargée en AJAX) ── */
.EV-weather {
  margin: 4px 0 14px;
  padding: 10px 12px;
  background: #f2f8ff;
  border: 1px solid #d7e7fb;
  border-radius: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  font-size: .9rem;
  line-height: 1.35;
  color: #1f3a5c;
}
.EV-weather-label {
  font-weight: 700;
  color: #274b73;
  margin-right: 4px;
}
.EV-weather-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}
.EV-weather-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.EV-weather-h     { font-weight: 700; color: #37587e; }
.EV-weather-emoji { font-size: 1.1rem; }
.EV-weather-temp  { font-weight: 700; }
.EV-weather-wind,
.EV-weather-rain,
.EV-weather-wave  { color: #4a6a8c; opacity: .9; }
.EV-weather-hint  { color: #5b7089; font-style: italic; }

@media (prefers-color-scheme: dark) {
  .EV-weather { background: #16243a; border-color: #274666; color: #cfe0f5; }
  .EV-weather-label { color: #9fc2ea; }
  .EV-weather-h { color: #b7d0ee; }
}
