.event-layout{ display:flex; gap:14px; align-items:flex-start; }
.event-main{ flex:1; min-width:0; display:flex; flex-direction:column; gap:12px; }

/* ====== SIDE ====== */
.event-side{
  display:flex;
  flex-direction:column;
  gap:8px;
  align-items:stretch;
  margin-top:10px;
}

/* l'icône ne doit jamais capter le clic */
.event-side .side-btn .ico{ pointer-events: none; }

/* séparateur */
.side-sep{
  height:1px;
  background: rgba(15,34,48,.10);
  margin:2px 6px;
  border-radius:999px;
}

/* boutons (desktop = pilule) */
.side-btn{
  --h: clamp(34px, 4.0vh, 42px);
  height: var(--h);
  min-width: var(--h);
  padding: 0 10px;

  border-radius: 999px;
  border:1px solid rgba(15,34,48,.12);

  background: rgba(255,255,255,.92);
  color:#0f2230;
  text-decoration:none;

  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;

  cursor:pointer;
  user-select:none;
  -webkit-tap-highlight-color: transparent;

  box-shadow:
    0 10px 18px rgba(0,0,0,.10),
    0 1px 0 rgba(255,255,255,.55) inset;

  transition: transform .12s ease, box-shadow .16s ease, border-color .16s ease;
}

.side-btn .ico{
  font-size: clamp(16px, 1.9vh, 18px);
  line-height:1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.side-btn .txt{
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .2px;
  white-space: nowrap;
}

.side-btn.is-wide{
  justify-content:flex-start;
  padding-left: 12px;
}

.side-btn:hover{
  border-color: rgba(15,34,48,.22);
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(0,0,0,.14), 0 1px 0 rgba(255,255,255,.55) inset;
}
.side-btn:active{ transform: translateY(0px) scale(.98); }

.side-btn:focus-visible{
  outline:none;
  box-shadow: 0 0 0 3px rgba(18,140,131,.18), 0 0 0 1px rgba(18,140,131,.40), 0 12px 26px rgba(0,0,0,.14);
  border-color: rgba(18,140,131,.40);
}

.side-btn[disabled], .side-btn.is-disabled{
  opacity:.40;
  cursor:not-allowed;
  transform:none !important;
}

/* ====== PNG ICONS (sans cercle blanc : juste l'icône) ====== */
.event-side .side-btn .ico{
  width: 32px;
  height: 32px;
  display:block;

  background-repeat:no-repeat;
  background-position:center;
  background-size:contain;
}

/* Association des fichiers PNG */
#btn-back .ico{     background-image:url("/assets/icons/1_evenements.png"); }
#btn-prev .ico{     background-image:url("/assets/icons/2_precedant.png"); }
#btn-next .ico{     background-image:url("/assets/icons/3_suivant.png"); }
#btn-maps .ico{     background-image:url("/assets/icons/4_map.png"); }
#btn-commerce .ico{ background-image:url("/assets/icons/5_commerce.png"); }
#btn-call .ico{     background-image:url("/assets/icons/6_telephone.png"); }
#btn-gcal .ico{     background-image:url("/assets/icons/7_calendrier_google.png"); }
#btn-ics .ico{      background-image:url("/assets/icons/8_calendrier_apple.png"); }

/* Ajustements individuels (si besoin) */
#btn-back .ico{ background-size: 34px; }
#btn-prev .ico{ background-size: 34px; }
#btn-next .ico{ background-size: 34px; }
#btn-maps .ico{ background-size: 36px; }
#btn-commerce .ico{ background-size: 34px; }
#btn-call .ico{ background-size: 36px; }
#btn-gcal .ico{ background-size: 34px; }
#btn-ics .ico{ background-size: 36px; margin-left:-1px; }

/* ====== FLYER FRAME ====== */
.event-flyer-frame{
  margin-top: 10px;
  width:100% !important;
  padding:0 !important;
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
  display:block !important;

  border-radius: 18px !important;
  overflow:hidden !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: 0 10px 26px rgba(0,0,0,.12) !important;
}

#ev-flyer.event-flyer{
  display:block !important;
  width:100% !important;
  height:auto !important;
  margin:0 !important;
  padding:0 !important;
  object-fit:unset !important;
}

/* ====== INFO / DESC ====== */
.event-info-grid{
  display:grid; /* ✅ important : évite comportements desktop bizarres */
  grid-template-columns:1fr 1fr;
  gap:10px 14px;
  padding:12px;
  border:1px solid rgba(15,34,48,.10);
  border-radius:16px;
  background: rgba(255,255,255,.65);
}

.info-row{ display:flex; gap:8px; align-items:flex-start; }
.info-ico{ width:20px; text-align:center; opacity:.85; }
.info-lbl{ font-weight:900; margin-right:6px; }
.info-val{ font-weight:650; color:#223a4a; }

.event-desc-title{ font-weight:900; margin-bottom:8px; }
.event-desc-box{
  overflow:auto;
  padding:12px;
  border-radius:16px;
  background: rgba(255,255,255,.65);
  border:1px solid rgba(15,34,48,.10);
  color:#223a4a;
  line-height:1.35;
  font-weight:650;
}

.sep{ opacity:.6; margin:0 6px; }

/* ====== Lightbox ====== */
/* Lightbox: empêcher le scroll derrière + gestes propres */
.flyer-lightbox[aria-hidden="false"]{
  overscroll-behavior: contain;
  touch-action: none;          /* bloque scroll / pinch sur la couche */
}

/* l'image peut gérer les gestes */
.lb-img{
  touch-action: none;          /* on gère nous-mêmes le swipe */
}

/* quand la lightbox est ouverte, on empêche le body de bouger */
body.lb-open{
  overflow: hidden;
  touch-action: none;
}


.flyer-lightbox{
  position:fixed; inset:0;
  display:none;
  z-index:100000;
  background: rgba(0,0,0,.88);
}
.flyer-lightbox[aria-hidden="false"]{ display:block; }

.lb-inner{
  position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center;
  padding:16px;
  z-index:100000;
}
.lb-close{
  position:absolute; top:14px; right:14px;
  width:44px; height:44px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.35);
  color:#fff;
  cursor:pointer;
  font-size:18px;
  z-index:100001;
}
.lb-img{
  max-width:80vw; max-height:80vh;
  width:auto; height:auto;
  object-fit:contain;
  display:block;
  border-radius:16px;
  box-shadow: 0 14px 40px rgba(0,0,0,.35);
  pointer-events:auto;
}

/* Titre INFOS dans le cadre */
.event-info-title{
  grid-column: 1 / -1;
  text-align: center;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #ffffff;
  opacity: .9;
  margin-bottom: 6px;
}

/* ===== Titre PRÉSENTATION dans le cadre ===== */
.event-desc-title-in{
  text-align: center;
  color: #fff;
  font-weight: 900;
  font-size: 20px;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.event-desc-content{
  font-weight: 400 !important;
  white-space: pre-line !important;
  line-height: 1.5;
  color: #223a4a;
  margin: 0 !important;
  padding: 0 !important;
}

/* =========================================
   PRÉSENTATION (verrouillage final)
   ========================================= */
.event-desc-box{
  padding: 10px 12px 12px;
  text-align: left;
}
.event-desc-title-in{
  display: block;
  text-align: center !important;
  margin: 0 0 8px 0 !important;
  padding: 0 !important;
  color: #fff;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
  white-space: normal !important;
  line-height: 1.1;
}
.event-desc-content{
  font-weight: 400 !important;
  white-space: pre-line !important;
  line-height: 1.5;
  color: #223a4a;
  margin: 0 !important;
  padding: 0 !important;
}

/* ===== Label "AGENDA" au-dessus du bouton Google ===== */
#btn-gcal{ position: relative; }
#btn-gcal::before{
  content: "AGENDA";
  position: absolute;
  left: 50%;
  top: -25px;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.85);
  white-space: nowrap;
  pointer-events: none;
}

.event-side{ padding-top: 14px; }
#btn-gcal, #btn-ics{ transform: translateY(-8px); }
.event-side{ overflow: visible !important; }

/* PRATIQUE label */
#btn-commerce{ position: relative; overflow: visible; }
#btn-commerce::before{
  content: "PRATIQUE";
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.85);
  white-space: nowrap;
  pointer-events: none;
  z-index: 99999;
}

/* ================================
   INFOS – affichage en colonne sur desktop
   ================================ */
@media (min-width: 900px){
  .event-info-grid{
    grid-template-columns: 1fr;
  }
  .info-row{ align-items: flex-start; }
  .info-ico{ width: 24px; flex-shrink: 0; }
  .info-val{ display: block; width: 100%; }
}

/* ================================
   MOBILE: sidebar FIXE à droite
   ================================ */
@media (max-width: 720px){
  .event-layout{ flex-direction:column; }
  .event-page{ padding-right: 76px; }

  .event-side{
    position: fixed;
    right: 10px;
    top: 80px;
    z-index: 9999;

    width: 56px;
    margin: 0;
    padding: 0;

    gap: 10px;
    background: transparent;
    box-shadow: none;
    border: 0;

    max-height: calc(100vh - 140px);
    overflow: auto;
    scrollbar-width: none;
  }
  .event-side::-webkit-scrollbar{ display:none; }

  .side-btn{
    width: 56px;
    height: 56px;
    min-width: 56px;
    padding: 0;
    border-radius: 50% !important;
    justify-content:center;
    gap:0;
  }

  .side-btn.is-wide .txt{ display:none; }
  .event-side .side-btn .ico{ width: 32px; height: 32px; }
  .side-sep{ margin: 2px 10px; opacity:.55; }
  .event-info-grid{ grid-template-columns: 1fr; }
}

/* ================================
   MINIATURES sous le flyer
   ================================ */
.event-thumbs{
  display:flex;
  gap:10px;
  align-items:center;
  overflow:auto;
  padding: 8px 4px 2px;
  margin-top: 2px;
  scrollbar-width: none;
}
.event-thumbs::-webkit-scrollbar{ display:none; }

.event-thumb{
  width: 66px;
  height: 52px;
  border-radius: 12px;
  overflow:hidden;
  border: 1px solid rgba(15,34,48,.12);
  background: rgba(255,255,255,.85);
  box-shadow: 0 8px 18px rgba(0,0,0,.10);
  flex: 0 0 auto;
  cursor:pointer;
  transform: translateZ(0);
}
.event-thumb img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}
.event-thumb.is-active{
  outline: 3px solid rgba(18,140,131,.35);
  border-color: rgba(18,140,131,.55);
}

/* ================================
   LIGHTBOX nav + compteur
   ================================ */
.lb-nav{
  position:absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.35);
  color:#fff;
  cursor:pointer;
  font-size: 34px;
  line-height: 0;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:100001;
  user-select:none;
  -webkit-tap-highlight-color: transparent;
}
.lb-prev{ left: 14px; }
.lb-next{ right: 14px; }

.lb-nav[disabled]{ opacity:.25; cursor:not-allowed; }

.lb-counter{
  position:absolute;
  left: 50%;
  top: 16px;
  transform: translateX(-50%);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.35);
  color:#fff;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .08em;
  z-index:100001;
}
@media (max-width: 720px){
  .lb-nav{
    width: 46px;
    height: 46px;
    border-radius: 16px;
    font-size: 30px;
  }
}

/* ================================
   MOBILE: miniatures en grille 3 colonnes
   ================================ */
@media (max-width: 720px){
  .event-thumbs{
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
    overflow: hidden !important;
    padding: 8px 0 2px !important;
    margin-top: 6px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .event-thumb{ width: 100% !important; height: 56px !important; }
  .event-thumb img{ width: 100%; height: 100%; object-fit: cover; }
}

/* ================================
   ✅ DESKTOP: "du/au/de/à" sur UNE seule ligne (sans toucher la récurrence)
   -> on cible UNIQUEMENT la boîte Dates injectée (.event-dates-grid)
   ================================ */
@media (min-width: 900px){
  .event-dates-grid .info-row > div{
    display:inline-flex !important;
    align-items: baseline !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
  }

  .event-dates-grid .info-lbl{ margin-right: 0 !important; }

  .event-dates-grid .info-val{
    display: inline !important;
    width: auto !important;
    white-space: nowrap !important;
  }

  /* ⚠️ La ligne récurrence doit rester comme tu l'aimes */
  .event-dates-grid .info-row .info-val{
    word-break: normal;
  }
  .event-dates-grid .info-row:has(.info-ico:contains("🔁")) .info-row > div{ white-space: normal !important; }
}

/* ================================
   DESKTOP: Jours récurrents -> pas de débordement
   (UNIQUEMENT la ligne 🔁 dans la boite dates)
   ================================ */
@media (min-width: 900px){

  /* on cible précisément la ligne récurrence */
  .event-dates-grid .info-row.is-recurrence > div{
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px !important;

    /* ✅ autorise le retour à la ligne */
    flex-wrap: wrap !important;
    white-space: normal !important;
    min-width: 0 !important;
  }

  /* le texte peut revenir à la ligne */
  .event-dates-grid .info-row.is-recurrence .info-val{
    white-space: normal !important;
    overflow-wrap: anywhere !important; /* casse si besoin */
    word-break: break-word !important;
    min-width: 0 !important;
  }

  /* le label ne casse pas en plein milieu */
  .event-dates-grid .info-row.is-recurrence .info-lbl{
    white-space: nowrap !important;
  }
}

/* ================================
   DESKTOP: bloc INFOS sur UNE ligne
   (mobile inchangé)
   ================================ */
@media (min-width: 900px){

  .event-info-grid:not(.event-dates-grid) .info-desktop-inline > div{
    display: inline-flex !important;
    align-items: baseline !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
  }

  .event-info-grid:not(.event-dates-grid) .info-desktop-inline .info-val{
    display: inline !important;
    width: auto !important;
    white-space: nowrap !important;
  }

  .event-info-grid:not(.event-dates-grid) .info-desktop-inline .info-lbl{
    margin-right: 0 !important;
  }
}
/* ================================
   DESKTOP: INFOS
   - Prix/Contact sur une ligne
   - Lieu peut WRAP (sinon ça dépasse)
   - Mobile inchangé
   ================================ */
@media (min-width: 900px){

  /* par défaut: inline (une ligne) */
  .event-info-grid:not(.event-dates-grid) .info-desktop-inline > div{
    display: inline-flex !important;
    align-items: baseline !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    min-width: 0 !important;
  }

  .event-info-grid:not(.event-dates-grid) .info-desktop-inline .info-val{
    display: inline !important;
    width: auto !important;
    white-space: nowrap !important;
    min-width: 0 !important;
  }

  .event-info-grid:not(.event-dates-grid) .info-desktop-inline .info-lbl{
    margin-right: 0 !important;
    white-space: nowrap !important;
  }

  /* ✅ EXCEPTION LIEU: autorise le retour à la ligne */
  .event-info-grid:not(.event-dates-grid) .info-desktop-inline.is-lieu > div{
    display: flex !important;
    flex-wrap: wrap !important;
    white-space: normal !important;
    min-width: 0 !important;
  }

  .event-info-grid:not(.event-dates-grid) .info-desktop-inline.is-lieu .info-val{
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    min-width: 0 !important;
  }
}

/* ================================
   INFOS: "question" à gauche / "réponse" à droite
   + jamais de débordement
   ================================ */
.info-row.info-kv{
  align-items: flex-start;
}

.info-row.info-kv .kv{
  display: grid;
  grid-template-columns: 130px 1fr; /* largeur question */
  gap: 8px;
  min-width: 0;
  width: 100%;
}

/* labels alignés */
.info-row.info-kv .info-lbl{
  margin: 0 !important;
  white-space: nowrap;
}

/* valeurs : wrap propre, pas de débordement */
.info-row.info-kv .info-val{
  min-width: 0;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

/* Mobile: on réduit un peu la colonne "question" */
@media (max-width: 720px){
  .info-row.info-kv .kv{
    grid-template-columns: 110px 1fr;
  }
}

/* =========================
   Téléphone cliquable stylé
   ========================= */

.tel-link{
  color:#128c83;
  font-weight:800;
  text-decoration:none;
  pointer-events:auto;
  cursor:pointer;
  -webkit-tap-highlight-color: transparent;
}

.info-row, .kv, .info-val{
  pointer-events:auto;
}


.tel-link:hover{
  text-decoration:underline;
}

.tel-link{ pointer-events:auto; position:relative; z-index:5; }
.info-kv, .info-val{ overflow: visible; }


