/* ==========================================================================
   Événements — agenda (en ce moment · à venir · passés) + espace équipe
   Page-scoped styles (prefix .ev- / .evd- / .ef-). Loaded after main.css.
   Tones: the page is brand (« spectre des univers »); every card, chip, the spotlight and the
   detail dialog carry the data-tone of their category (main.css tone palette).
   ========================================================================== */

.ev-page { background: var(--paper); }
/* two extra category tones from the univers spectrum (same contract as main.css: --t >= 6:1 on ink,
   --t-ink >= 4.5:1 on paper/cream, --t-on >= 6:1 on --t) */
[data-tone="ev-coral"] { --t: #FF7A70; --t-2: #FFC3BC; --t-ink: #B0302A; --t-on: #2A0907; }   /* dégustation — rouge Mademoiselle Chang */
[data-tone="ev-green"] { --t: #9ACD7E; --t-2: #CFEABF; --t-ink: #3E6332; --t-on: #0F1F10; }   /* brunch — vert Lily and the Moon */
html.ev-lock { overflow: hidden; scrollbar-gutter: stable; } /* modal open: the page stays put, no sideways shift when the scrollbar goes */
.ev-ico { display: inline-flex; flex-shrink: 0; width: 16px; height: 16px; }
.ev-ico svg { width: 100%; height: 100%; }
.ev-team svg, .ev-adminbar svg, .ev-x svg, .ev-drop__ico svg, .ev-login__lock svg { display: block; }

/* ---------- Hero ---------- */
.ev-hero {
  position: relative; overflow: hidden; background: var(--ink); color: var(--paper);
  padding: calc(var(--header-h) + clamp(20px, 3vw, 40px)) 0 clamp(52px, 7vw, 104px);
}
.ev-hero__bg { position: absolute; inset: 0; pointer-events: none; }
.ev-hero__bg i { position: absolute; border-radius: 50%; opacity: .42; animation: evDrift 22s ease-in-out infinite alternate; }
.ev-hero__bg i:nth-child(1) { width: 62vw; height: 62vw; right: -18vw; top: -30vw; background: radial-gradient(closest-side, #FF6F6F, transparent); }
.ev-hero__bg i:nth-child(2) { width: 48vw; height: 48vw; left: -16vw; bottom: -30vw; background: radial-gradient(closest-side, #45C7B6, transparent); animation-delay: -7s; }
.ev-hero__bg i:nth-child(3) { width: 34vw; height: 34vw; left: 38%; top: 30%; background: radial-gradient(closest-side, #9ACD7E, transparent); opacity: .22; animation-delay: -13s; } /* vert Lily (no orange: client decision) */
@keyframes evDrift { to { transform: translate3d(-4vw, 3vw, 0) scale(1.08); } }
.is-paused .ev-hero__bg i, .is-paused .ev-hero__badge svg { animation-play-state: paused !important; }
.ev-hero .wrap { position: relative; }
.ev-hero__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: clamp(28px, 5vw, 64px); }
.ev-hero__top .phero__crumbs { margin: 0; }
.ev-hero__grid { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; }
.ev-hero__title { font-size: clamp(3.6rem, 13.4vw, 12.6rem); line-height: .86; letter-spacing: -.035em; }
.ev-hero__badge { position: relative; width: 132px; height: 132px; color: var(--paper); margin-bottom: 1vw; }
.ev-hero__badge svg { width: 100%; height: 100%; animation: spin 26s linear infinite; }
.ev-hero__badge b { position: absolute; inset: 0; display: grid; place-items: center; }
.ev-hero__badge b svg { width: 30px; height: 30px; animation: none; color: #FF7EA1; } /* rose AfterWork */
.ev-hero__foot { display: grid; grid-template-columns: 1fr auto; gap: 28px clamp(28px, 5vw, 80px); align-items: end; margin-top: clamp(28px, 4vw, 56px); }
.ev-hero .lead { color: var(--muted-inv); max-width: 34em; }
.ev-jump { display: flex; flex-wrap: wrap; gap: 8px; }
.ev-jump a {
  display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 8px 0 18px; border-radius: 999px;
  font-size: 14px; font-weight: 600; box-shadow: inset 0 0 0 1px var(--line-inv); transition: background .3s, color .3s;
}
.ev-jump a:hover { background: var(--paper); color: var(--ink); }
.ev-jump b { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 999px; background: var(--ink-3); color: var(--paper); font-variant-numeric: tabular-nums; font-size: 13px; }
.ev-jump a:hover b { background: var(--ink); }

/* « Espace équipe » — discreet pill (hero corner + page bottom) */
.ev-team {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 13px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--muted-inv); box-shadow: inset 0 0 0 1px var(--line-inv);
  transition: color .3s, box-shadow .3s, background .3s;
}
.ev-team svg { width: 16px; height: 16px; }
.ev-team:hover { color: var(--paper); box-shadow: inset 0 0 0 1px var(--paper); }
.ev-team--light { color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.ev-team--light:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.is-admin .ev-team { color: #37c26b; }
.is-admin .ev-team--light { color: #18693a; }

/* ---------- Spotlight (next / featured event) ---------- */
.ev-spot { position: relative; background: var(--ink); color: var(--paper); padding: 0 0 clamp(60px, 8vw, 120px); }
.ev-spot { --gold-em: var(--t); --focus: var(--t-2); --focus-halo: var(--ink); }
.ev-spot__card {
  display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(24px, 4vw, 64px); align-items: center;
  padding: clamp(14px, 1.6vw, 22px); border-radius: calc(var(--radius) + 8px); background: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--line-inv);
}
.ev-spot__media { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--ink-3); }
.ev-spot__media > img { width: 100%; height: 100%; object-fit: cover; }
.ev-spot__copy { display: grid; gap: 16px; padding: clamp(4px, 2vw, 28px) clamp(4px, 2vw, 28px) clamp(10px, 2vw, 28px) 0; }
.ev-spot__eyebrow { color: var(--t); }
.ev-spot__rel { display: inline-flex; align-items: center; gap: 10px; width: fit-content; padding: 8px 14px; border-radius: 999px; background: var(--t-fill); background-size: 200% 100%; color: var(--t-on); font-weight: 700; font-size: 14px; }
.ev-spot__rel.is-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: ping 2s var(--ease) infinite; }
.ev-spot__title { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.6rem, 5.4vw, 5.6rem); line-height: .95; letter-spacing: -.02em; }
.ev-spot__title a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .6s var(--ease); }
.ev-spot__title a:hover { background-size: 100% 1px; }
.ev-spot .lead { color: var(--muted-inv); }
.ev-spot .ev-meta { font-size: 15px; color: var(--paper); }
.ev-spot .ev-meta .ev-ico { color: var(--t); }
.ev-spot__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.ev-spot .btn--gold { --b-bg: var(--t-fill); --b-fg: var(--t-on); }
.ev-spot .btn--ghost { color: var(--paper); }

.ev-ticker { position: relative; z-index: 1; }

/* fallback data shown on the live site (API unreachable) */
.ev-offline { padding-top: clamp(28px, 4vw, 44px); }
.ev-offline[hidden] { display: none; }
.ev-offline p { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 14px 18px; border-radius: 14px; background: #FFC2D2; color: #2A0612; font-size: 14px; font-weight: 600; }
.ev-offline .link { font-weight: 700; }

/* ---------- Filters ---------- */
.ev-filters { display: grid; gap: 12px; padding-top: clamp(44px, 6vw, 84px); }
.ev-filters__group { display: flex; align-items: center; gap: 10px 16px; min-width: 0; }
.ev-filters__group[hidden] { display: none; }
.ev-filters__lbl { flex-shrink: 0; min-width: 84px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
/* position: relative — the chips' .sr-only spans (position: absolute) must be contained, and clipped, by this row:
   once it becomes a horizontal scroller (≤ 720px) they would otherwise widen the whole page on phones */
.ev-chips { position: relative; display: flex; gap: 8px; flex-wrap: wrap; min-width: 0; }
.ev-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; white-space: nowrap;
  font-size: 14px; font-weight: 600; background: var(--cream); box-shadow: inset 0 0 0 1px var(--line); transition: background .3s, color .3s, box-shadow .3s;
}
.ev-chip:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.ev-chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--t-fill); box-shadow: 0 0 0 1px color-mix(in srgb, var(--t-ink) 35%, transparent); }
.ev-chip__n { font-variant-numeric: tabular-nums; font-size: 12px; color: var(--muted); }
.ev-chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); box-shadow: none; }
.ev-chip[aria-pressed="true"] .ev-chip__n { color: var(--muted-inv); }
.ev-filters__count { min-height: 1.4em; font-size: 13px; color: var(--muted); }

/* ---------- Sections & lists ---------- */
.ev-sec { padding-block: clamp(44px, 6vw, 88px) 0; }
.ev-sec--past { padding-bottom: clamp(70px, 9vw, 140px); }
.ev-sec__head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 10px 32px; margin-bottom: clamp(22px, 3vw, 40px); padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.ev-sec__note { color: var(--muted); max-width: 30em; }
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: clamp(16px, 2vw, 26px); }
.ev-month { display: flex; align-items: baseline; gap: 12px; margin: clamp(34px, 5vw, 60px) 0 18px; font-family: var(--f-display); font-weight: 400; font-size: clamp(1.9rem, 3vw, 2.8rem); line-height: 1; }
.ev-month:first-child { margin-top: 0; }
.ev-month span { font-family: var(--f-sans); font-size: 13px; font-weight: 600; letter-spacing: .14em; color: var(--muted); }
.ev-more-row { display: flex; justify-content: center; margin-top: clamp(24px, 3vw, 40px); }

/* ---------- Card ---------- */
.ev-card {
  position: relative; display: flex; flex-direction: column; min-width: 0; border-radius: var(--radius); overflow: hidden;
  background: var(--cream); box-shadow: inset 0 0 0 1px var(--line);
  transition: transform .6s var(--ease), box-shadow .6s var(--ease);
  animation: evIn .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms);
}
@keyframes evIn { from { opacity: 0; transform: translateY(22px); } }
.ev-card:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 40%, transparent), 0 30px 60px -36px rgba(0, 0, 0, .4); }
.ev-card[hidden] { display: none; }
.ev-card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ink-3); }
.ev-card__media > img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), filter .6s; }
.ev-card:hover .ev-card__media > img { transform: scale(1.05); }
.ev-card.is-past .ev-card__media > img, .ev-card.is-cancelled .ev-card__media > img { filter: grayscale(.85) contrast(.95); }
.ev-card.is-past:hover .ev-card__media > img { filter: none; }
.ev-card.is-past .ev-ph { filter: saturate(.35); }
.ev-card.is-draft { box-shadow: none; outline: 1.5px dashed color-mix(in srgb, var(--ink) 55%, transparent); outline-offset: -1.5px; }
.ev-card.is-flash { animation: evFlash 2.2s var(--ease); }
@keyframes evFlash { 0%, 40% { box-shadow: 0 0 0 4px var(--t-fill), 0 30px 60px -30px rgba(0, 0, 0, .4); } }

/* placeholder visual (event without photo): tone colour, soft light behind the icon, fine film grain */
.ev-ph {
  position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden;
  background:
    radial-gradient(closest-side at 50% 46%, color-mix(in srgb, #fff 30%, transparent), transparent 70%) 50% 46% / 78% 92% no-repeat,
    radial-gradient(120% 100% at 25% 15%, color-mix(in srgb, var(--t) 92%, #fff), color-mix(in srgb, var(--t) 55%, var(--ink)) 78%);
}
.ev-ph[data-tone="brand"] {
  background:
    radial-gradient(closest-side at 50% 46%, color-mix(in srgb, #fff 34%, transparent), transparent 70%) 50% 46% / 78% 92% no-repeat,
    var(--spectrum) 0 0 / 200% 100%;
}
.ev-ph::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .22; mix-blend-mode: soft-light;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") 0 0 / 180px 180px;
}
.ev-ph__ico { position: relative; z-index: 1; display: grid; place-items: center; width: clamp(76px, 24%, 118px); aspect-ratio: 1; border-radius: 50%; background: #fffdf8; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .45); }
.ev-ph__ico img { width: 58%; height: auto; }
.ev-spot .ev-ph__ico { width: clamp(96px, 22%, 150px); }
.ev-ph__word { position: absolute; left: -2%; right: -2%; bottom: -.2em; font-family: var(--f-display); font-style: italic; font-size: clamp(3.6rem, 9vw, 6.2rem); line-height: 1; white-space: nowrap; overflow: hidden; color: color-mix(in srgb, #fff 26%, transparent); text-align: center; }

/* date tile */
.ev-date {
  position: absolute; left: 14px; top: 14px; z-index: 2; display: grid; justify-items: center; gap: 3px;
  min-width: 66px; padding: 9px 10px 10px; border-radius: 16px; background: var(--paper); color: var(--ink); line-height: 1;
  box-shadow: 0 12px 26px -14px rgba(0, 0, 0, .55);
}
.ev-date small { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--t-ink); }
.ev-date b { font-family: var(--f-display); font-weight: 400; font-size: 2.3rem; line-height: .92; font-variant-numeric: tabular-nums; }
.ev-date span { font-size: 12px; font-weight: 600; white-space: nowrap; }
.ev-date--loop small { letter-spacing: .08em; }

/* badges */
.ev-badges { position: absolute; right: 12px; top: 12px; z-index: 2; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: calc(100% - 100px); }
.ev-badge { display: inline-flex; align-items: center; gap: 7px; min-height: 28px; padding: 4px 11px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; line-height: 1.1; background: var(--ink); color: var(--paper); }
.ev-badge--live { background: #37c26b; color: #06240f; }
.ev-badge--live i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; position: relative; }
.ev-badge--live i::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid currentColor; opacity: 0; animation: ping 2s var(--ease) infinite; }
.ev-badge--cancel { background: #A3192A; color: #fff; }
.ev-badge--draft { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.ev-badge--warn { background: #FFC2D2; color: #2A0612; letter-spacing: .04em; text-transform: none; font-size: 12px; }
.is-paused .ev-badge--live i::after, .is-paused .ev-spot__rel.is-live::before { animation-play-state: paused; }

.ev-card__body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 20px 22px 20px; }
.ev-cat { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--t-ink); }
.ev-cat::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--t-fill); box-shadow: 0 0 0 1px color-mix(in srgb, var(--t-ink) 40%, transparent); }
.ev-card__title { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.7rem, 2.1vw, 2.1rem); line-height: 1.02; letter-spacing: -.01em; overflow-wrap: anywhere; }
.ev-card__title a { outline: none; }
.ev-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; } /* the whole card opens the detail */
.ev-card__title a:focus-visible { box-shadow: none; }
.ev-card__title a:focus-visible::after { outline: 2px solid var(--focus); outline-offset: -3px; box-shadow: inset 0 0 0 5px var(--focus-halo); }
.ev-card__sub { color: var(--muted); font-size: .95rem; line-height: 1.45; }
.ev-meta { display: grid; gap: 7px; font-size: 14px; line-height: 1.4; }
.ev-meta li { display: flex; gap: 10px; align-items: flex-start; }
.ev-meta .ev-ico { margin-top: 1px; color: var(--t-ink); }
.ev-card__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.ev-card__more { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.ev-card__more .ev-ico { transition: transform .5s var(--ease); }
.ev-card:hover .ev-card__more .ev-ico { transform: translateX(4px); }
.ev-card__book { position: relative; z-index: 2; height: 40px; padding: 0 16px; font-size: 13.5px; margin-left: auto; } /* « Réserver une table » (Zenchef) may wrap under « Voir le détail »: it stays on the right */
.ev-card__book .ev-ico { width: 15px; height: 15px; }
.ev-card__admin { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px 14px; background: var(--paper-2); border-top: 1px dashed color-mix(in srgb, var(--ink) 30%, transparent); }
.ev-adm { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--cream); box-shadow: inset 0 0 0 1px var(--line); transition: background .3s, color .3s, box-shadow .3s; }
.ev-adm:hover { background: var(--ink); color: var(--paper); box-shadow: none; }
.ev-adm[data-act="del"]:hover { background: #A3192A; }
.ev-adm .ev-ico { width: 15px; height: 15px; }

/* empty / error / skeleton */
.ev-empty { display: flex; gap: clamp(16px, 2.4vw, 28px); align-items: flex-start; padding: clamp(24px, 3.4vw, 44px); border-radius: var(--radius); background: var(--cream); box-shadow: inset 0 0 0 1px var(--line); }
.ev-empty__ico { flex-shrink: 0; width: 56px; height: 56px; padding: 10px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); box-sizing: content-box; }
.ev-empty__t { font-family: var(--f-display); font-size: clamp(1.6rem, 2.4vw, 2.2rem); line-height: 1.05; }
.ev-empty__d { margin-top: 8px; color: var(--muted); max-width: 40em; }
.ev-empty .row { margin-top: 18px; }
.ev-empty--filter { align-items: center; justify-content: space-between; flex-wrap: wrap; }
.ev-empty--filter .ev-empty__t { font-size: clamp(1.3rem, 2vw, 1.7rem); }
.ev-skel { border-radius: var(--radius); overflow: hidden; background: var(--cream); box-shadow: inset 0 0 0 1px var(--line); padding-bottom: 14px; }
.ev-skel::before { content: ""; display: block; aspect-ratio: 16 / 10; margin-bottom: 18px; background: linear-gradient(100deg, var(--paper-2) 30%, var(--cream) 50%, var(--paper-2) 70%) 0 0 / 300% 100%; animation: evShimmer 1.6s linear infinite; }
.ev-skel i { display: block; height: 12px; margin: 12px 22px 0; border-radius: 6px; background: var(--paper-2); }
.ev-skel i:nth-child(1) { width: 30%; } .ev-skel i:nth-child(2) { width: 72%; height: 22px; } .ev-skel i:nth-child(3) { width: 55%; }
@keyframes evShimmer { to { background-position: -300% 0; } }
html:not(.js) .ev-skel { display: none; }
.ev-nojs { padding-block: 40px; }

/* ---------- Bottom CTA ---------- */
.ev-cta { background: var(--paper-2); }
.ev-cta__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 90px); align-items: end; }
.ev-cta__team { display: flex; justify-content: flex-end; margin-top: clamp(40px, 6vw, 80px); }

/* ---------- Dialogs (detail, login, confirm, form) ---------- */
.ev-dlg {
  width: min(940px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
  padding: 0; border: 0; border-radius: 26px; overflow: hidden; background: var(--paper); color: var(--ink);
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, .65);
}
.ev-dlg[open] { display: flex; flex-direction: column; animation: evDlg .5s var(--ease); }
@keyframes evDlg { from { opacity: 0; transform: translateY(26px) scale(.985); } }
.ev-dlg::backdrop { background: rgba(10, 9, 8, .76); }
.ev-dlg[open]::backdrop { animation: evFade .35s ease; }
@keyframes evFade { from { opacity: 0; } }
.ev-dlg--sm { width: min(500px, calc(100vw - 32px)); }
.ev-scroll { position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.ev-x {
  position: absolute; top: 14px; right: 14px; z-index: 6; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--paper); color: var(--ink); box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .45), inset 0 0 0 1px var(--line); transition: background .3s, color .3s;
}
.ev-x:hover { background: var(--ink); color: var(--paper); }
.ev-x svg { width: 20px; height: 20px; }
.ev-x--static { position: static; flex-shrink: 0; box-shadow: inset 0 0 0 1px var(--line); }

/* detail */
.evd__media { position: relative; aspect-ratio: 16 / 9; max-height: 50vh; width: 100%; overflow: hidden; background: var(--ink-3); }
.evd__media > img { width: 100%; height: 100%; object-fit: cover; }
.evd__media .ev-date { left: 18px; top: 18px; }
.evd__media .ev-badges { right: auto; left: 100px; top: 18px; justify-content: flex-start; }
.evd__body { display: grid; gap: 18px; padding: clamp(22px, 4vw, 44px); }
.evd__title { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.3rem, 5vw, 3.9rem); line-height: .98; letter-spacing: -.015em; overflow-wrap: anywhere; }
.evd__sub { font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--muted); max-width: 40em; }
.evd__notice { padding: 12px 16px; border-radius: 12px; font-weight: 600; background: var(--paper-2); }
.evd__notice--cancel { background: #FBE3E4; color: #7A0F1C; }
.evd__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin: 4px 0 0; border-top: 1px solid var(--line); }
.evd__facts > div { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); }
.evd__facts dt { font-size: 11.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.evd__facts dd { margin: 5px 0 0; font-weight: 500; }
.evd__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.evd__actions .btn .ev-ico { width: 17px; height: 17px; }
.evd__copy { display: grid; gap: 8px; }
.evd__copy input { width: 100%; font: inherit; font-size: 15px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--cream); color: var(--ink); }
.evd__live { font-size: 14px; color: var(--muted); min-height: 1.2em; }
.evd__desc { display: grid; gap: .9em; font-size: 1.05rem; line-height: 1.65; max-width: 64ch; overflow-wrap: anywhere; }
.evd__h { font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.evd__gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(30%, 120px), 1fr)); gap: 10px; }
.evd__thumb { display: block; width: 100%; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--paper-2); }
.evd__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.evd__thumb:hover img { transform: scale(1.06); }
.evd__thumb[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 2px; }
.evd__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.evd__tags li { font-size: 13px; padding: 6px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); }
.evd__admin { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 16px; border-top: 1px dashed color-mix(in srgb, var(--ink) 30%, transparent); }

/* login + confirm */
.ev-login, .ev-confirm { display: grid; gap: 16px; padding: clamp(26px, 4vw, 40px); }
.ev-login__lock { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--paper); }
.ev-login__lock svg { width: 22px; height: 22px; }
.ev-login__intro { color: var(--muted); }
.ev-login__submit { justify-content: center; width: 100%; margin-top: 4px; }
.ev-login .form-note { text-align: center; }
.ev-pass { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); transition: border-color .3s, box-shadow .3s; }
.ev-pass:focus-within { border-color: currentColor; box-shadow: 0 1px 0 currentColor; }
.field .ev-pass input { border: 0; box-shadow: none !important; }
.ev-pass__toggle { flex-shrink: 0; min-height: 40px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); }
.ev-pass__toggle:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.ev-confirm { padding-top: clamp(30px, 4vw, 44px); }
.ev-confirm__row { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.ev-btn--danger { --b-bg: #A3192A; --b-fg: #fff; --b-hover: var(--ink); --b-hover-fg: var(--paper); }
.ev-form__kicker { font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.ev-form__title { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.9rem, 3.4vw, 2.7rem); line-height: 1; margin-top: 4px; }
.ev-alert { padding: 12px 16px; border-radius: 12px; font-size: 14px; font-weight: 500; background: #FBE3E4; color: #7A0F1C; }
.ev-alert--info { background: var(--paper-2); color: var(--ink); }
.ev-alert ul { margin-top: 6px; display: grid; gap: 2px; }
/* Live regions stay in the accessibility tree (never [hidden]) so a message written into them is announced;
   while empty they are taken out of the flow — no box, no grid gap, no margin. */
.ev-alert:empty, .ev-status:empty, .ev-first:empty, .ev-form__live:empty { position: absolute; padding: 0; margin: 0; border: 0; background: none; box-shadow: none; }
.ev-alert button { text-align: left; text-decoration: underline; text-underline-offset: 3px; font-weight: 600; min-height: 32px; }

/* form */
.ev-form { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.ev-form__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px clamp(20px, 3vw, 32px); border-bottom: 1px solid var(--line); }
.ev-form__scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px clamp(20px, 3vw, 32px) 24px; }
.ev-form__scroll > .ev-alert { margin-top: 18px; }
.ev-form__foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px clamp(20px, 3vw, 32px); border-top: 1px solid var(--line); background: var(--paper); }
.ev-form__note { margin-right: auto; font-size: 13px; color: var(--muted); }
.ev-form__live { margin-top: 6px; font-size: 13.5px; font-weight: 600; color: #18693a; }
.ev-first { font-weight: 600; color: var(--ink); }
.ev-form[aria-busy="true"] .ev-form__foot { opacity: .7; }
.ev-fs { min-width: 0; margin: 0; padding: 24px 0; border: 0; border-bottom: 1px solid var(--line); }
.ev-fs:last-child { border-bottom: 0; }
.ev-fs > legend { float: left; width: 100%; padding: 0; margin-bottom: 18px; font-family: var(--f-display); font-size: clamp(1.45rem, 2.2vw, 1.8rem); line-height: 1.1; }
.ev-fs > legend + * { clear: both; }
.ev-grid--form, .ev-form .ev-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 22px; }
.ev-form .full { grid-column: 1 / -1; }
.ev-form .field label small, .ev-sub legend small, .ev-label small { font-weight: 500; letter-spacing: .04em; text-transform: none; }
.ev-sub { min-width: 0; margin: 0; padding: 0; border: 0; display: grid; gap: 10px; }
.ev-sub > legend, .ev-label { float: left; width: 100%; padding: 0; margin-bottom: 10px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.ev-sub > legend + * { clear: both; }
.ev-label { float: none; margin-bottom: 0; }
.ev-form .segmented label { min-height: 44px; height: auto; padding: 8px 16px; background: var(--cream); }
.ev-form .segmented input:checked + label { background: var(--ink); color: var(--paper); }
.ev-days label { min-width: 54px; justify-content: center; }
.ev-form .field select {
  appearance: none; -webkit-appearance: none; padding-right: 28px; cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312100d' stroke-width='1.8'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 2px center / 16px;
}
.ev-form .field input[type="date"], .ev-form .field input[type="time"] { min-height: 46px; }
.ev-form .field [aria-invalid="true"], .ev-form .segmented:has([aria-invalid="true"]) label { border-color: #A3192A; }
.ev-form .field [aria-invalid="true"] { box-shadow: 0 1px 0 #A3192A; }
.ev-hint { font-size: 13px; color: var(--muted); line-height: 1.45; }
.ev-count { text-align: right; font-variant-numeric: tabular-nums; }
.ev-err { font-size: 13px; font-weight: 600; color: #A3192A; line-height: 1.4; }
.ev-err:not([hidden])::before { content: "! "; font-weight: 800; }
.ev-errs { display: grid; gap: 4px; margin-top: -8px; }
.ev-errs:not(:has(.ev-err:not([hidden]))) { display: none; }
.ev-check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; padding: 4px 0; }
.ev-check > span { display: grid; gap: 2px; }
.ev-check b { font-weight: 600; }
.ev-check small { font-size: 13px; color: var(--muted); }
.ev-check input { flex-shrink: 0; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--ink); cursor: pointer; }
.ev-check--switch input {
  appearance: none; -webkit-appearance: none; width: 46px; height: 26px; border-radius: 999px; position: relative;
  background: color-mix(in srgb, var(--ink) 22%, transparent); transition: background .3s, box-shadow .3s;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ink) 62%, transparent); /* boundary >= 3:1 on paper (WCAG 1.4.11) */
}
.ev-check--switch input::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .3s var(--ease); }
.ev-check--switch input:checked { background: var(--ink); box-shadow: none; }
.ev-check--switch input:checked::after { transform: translateX(20px); }
.ev-weekly { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 22px; padding: 18px; border-radius: 16px; background: var(--cream); box-shadow: inset 0 0 0 1px var(--line); }
.ev-weekly[hidden] { display: none; }
.ev-weekly > .ev-sub, .ev-weekly > .ev-hint { grid-column: 1 / -1; }

.ev-photo { display: grid; gap: 12px; }
.ev-drop {
  position: relative; display: grid; justify-items: center; align-content: center; gap: 6px; min-height: 150px; padding: 20px;
  border-radius: 16px; border: 1.5px dashed color-mix(in srgb, var(--ink) 35%, transparent); background: var(--cream); text-align: center; cursor: pointer;
  transition: background .3s, border-color .3s;
}
.ev-drop--sm { min-height: 104px; }
.ev-drop:hover, .ev-drop.is-over { background: var(--paper-2); border-color: var(--ink); }
.ev-drop:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 2px var(--focus-halo); }
.ev-drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.ev-drop__ico { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--paper); }
.ev-drop__ico svg { width: 20px; height: 20px; }
.ev-drop__t { font-size: 15px; }
.ev-drop small { font-size: 12.5px; color: var(--muted); }
.ev-photo__preview { position: relative; aspect-ratio: 16 / 9; max-height: 320px; border-radius: 16px; overflow: hidden; background: var(--ink-3); }
.ev-photo__preview[hidden] { display: none; }
.ev-photo__preview img { width: 100%; height: 100%; object-fit: cover; }
.ev-photo__preview .ev-mini { position: absolute; right: 12px; bottom: 12px; }
.ev-mini { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; min-width: 36px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--paper); color: var(--ink); box-shadow: 0 4px 12px -6px rgba(0, 0, 0, .4), inset 0 0 0 1px var(--line); }
.ev-mini:hover { background: var(--ink); color: var(--paper); }
.ev-mini--danger:hover { background: #A3192A; }
.ev-mini:disabled { opacity: .35; pointer-events: none; }
.ev-mini svg { width: 16px; height: 16px; }
.ev-progress { height: 6px; border-radius: 6px; background: color-mix(in srgb, var(--ink) 12%, transparent); overflow: hidden; }
.ev-progress[hidden] { display: none; }
.ev-progress i { display: block; height: 100%; width: var(--p, 0%); background: var(--ink); border-radius: inherit; transition: width .2s; }
.ev-status { font-size: 13px; color: var(--muted); min-height: 1.2em; }
.ev-gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.ev-gal:empty { display: none; }
.ev-gal__item { display: grid; gap: 8px; align-content: start; padding: 8px; border-radius: 14px; background: var(--cream); box-shadow: inset 0 0 0 1px var(--line); }
.ev-gal__item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 9px; background: var(--paper-2); }
.ev-gal__item input { width: 100%; font: inherit; font-size: 16px; padding: 7px 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); color: inherit; }
.ev-gal__tools { display: flex; gap: 6px; justify-content: space-between; }
.ev-gal__item--pending { place-items: center; min-height: 150px; text-align: center; font-size: 12.5px; color: var(--muted); }
.ev-gal__item--pending .ev-progress { width: 100%; }
.ev-tagprev { display: flex; flex-wrap: wrap; gap: 6px; }
.ev-tagprev span { font-size: 12.5px; padding: 4px 10px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); }
.ev-tagprev span.is-internal { background: #FFC2D2; color: #2A0612; box-shadow: none; }
.ev-tagprev span.is-bad { background: #FBE3E4; color: #7A0F1C; box-shadow: none; }

/* ---------- Team list (« Tous les événements ») ---------- */
.ev-dlg--manage { width: min(820px, calc(100vw - 32px)); }
.ev-manage { padding: clamp(24px, 4vw, 44px); padding-top: clamp(28px, 4vw, 44px); }
.ev-manage__intro { margin: 8px 0 6px; color: var(--muted); font-size: 15px; max-width: 46em; }
.ev-manage__h { display: flex; align-items: baseline; gap: 10px; margin: 28px 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.ev-manage__h span { color: var(--muted); letter-spacing: 0; }
.ev-manage__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ev-manage__row {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 14px 16px 14px 20px; border-radius: 16px; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line);
}
.ev-manage__row::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; background: var(--t, var(--ink)); }
.ev-manage__row.is-draft { background: transparent; box-shadow: none; outline: 1.5px dashed color-mix(in srgb, var(--ink) 30%, transparent); outline-offset: -1.5px; }
.ev-manage__info { flex: 1 1 260px; min-width: 0; }
.ev-manage__when { font-size: 13px; color: var(--muted); }
.ev-manage__title { font-family: var(--f-display); font-size: 1.45rem; line-height: 1.1; overflow-wrap: anywhere; }
.ev-manage__meta { margin-top: 4px; font-size: 13px; color: var(--muted); }
.ev-manage__status { display: inline-block; margin-right: 4px; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: #37c26b; color: #06240f; }
.ev-manage__status.is-draft { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.ev-manage__status.is-cancelled { background: #A3192A; color: #fff; }
.ev-manage__acts { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Admin bar + toast ---------- */
.ev-adminbar {
  position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 95; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; width: min(calc(100% - 24px), 820px); padding: 8px 8px 8px 18px;
  border-radius: 999px; background: var(--ink); color: var(--paper);
  box-shadow: 0 22px 50px -18px rgba(0, 0, 0, .6), inset 0 0 0 1px var(--line-inv);
  animation: evBar .6s var(--ease) both;
}
.ev-adminbar[hidden] { display: none; }
@keyframes evBar { from { opacity: 0; transform: translate(-50%, 30px); } }
.ev-adminbar::before { content: ""; position: absolute; left: 22px; right: 22px; top: 0; height: 1px; background: var(--spectrum); background-size: 200% 100%; opacity: .9; }
.ev-adminbar__who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; font-size: 14px; white-space: nowrap; overflow: hidden; }
.ev-adminbar__who > svg { flex-shrink: 0; width: 18px; height: 18px; color: #37c26b; }
.ev-adminbar__who > span { overflow: hidden; text-overflow: ellipsis; }
.ev-adminbar__who small { font-size: 12.5px; color: var(--muted-inv); }
.ev-adminbar .btn { flex-shrink: 0; gap: 8px; }
.ev-adminbar .btn svg { width: 17px; height: 17px; }
.ev-adminbar .btn--ghost { color: var(--paper); --b-hover: var(--paper); --b-hover-fg: var(--ink); }
.ev-adminbar { --focus: var(--t-2); --focus-halo: var(--ink); }
.menu-open .ev-adminbar { display: none; }
.ev-sm-only { display: none; } /* « Ajouter » below 640px, « Nouvel événement » above: each is the button's whole name */
.ev-page.is-admin .footer { padding-bottom: 84px; }
.ev-toast {
  position: fixed; left: 50%; bottom: 92px; z-index: 96; max-width: calc(100% - 32px); padding: 13px 20px; border-radius: 14px;
  background: var(--ink); color: var(--paper); font-size: 14px; font-weight: 500; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .55);
  opacity: 0; transform: translate(-50%, 16px); pointer-events: none; transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.ev-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.ev-toast:empty { visibility: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .ev-spot__card { grid-template-columns: 1fr; }
  .ev-spot__copy { padding: 4px 8px 12px; }
  .ev-hero__foot { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .ev-cta__grid { grid-template-columns: 1fr; }
  .ev-hero__badge { display: none; }
  .ev-hero__grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .ev-filters__group { flex-direction: column; align-items: flex-start; }
  .ev-filters__lbl { min-width: 0; }
  .ev-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: calc(100% + 2 * var(--gutter)); margin-inline: calc(-1 * var(--gutter)); padding: 2px var(--gutter) 6px; }
  .ev-chips::-webkit-scrollbar { display: none; }
  .ev-chip { flex-shrink: 0; }
}
@media (max-width: 640px) {
  .ev-dlg, .ev-dlg--sm { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; inset: 0; border-radius: 0; }
  .ev-dlg[open] { animation-name: evSheet; }
  @keyframes evSheet { from { transform: translateY(40px); opacity: 0; } }
  .ev-dlg--confirm { height: auto; max-height: 90%; margin: auto 0 0; border-radius: 22px 22px 0 0; }
  .ev-form .ev-grid, .ev-weekly { grid-template-columns: 1fr; }
  .ev-form__foot .btn { flex: 1; justify-content: center; }
  .ev-form__note { display: none; }
  .evd__actions .btn { width: 100%; justify-content: center; }
  .evd__media { aspect-ratio: 4 / 3; }
  .ev-hero__top { flex-wrap: wrap; }
  .ev-empty { flex-direction: column; }
  .ev-adminbar { padding-left: 14px; border-radius: 22px; }
  .ev-adminbar__who small { display: none; }
  .ev-adminbar__out span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ev-adminbar__out { padding: 0 12px; }
  .ev-lg-only { display: none; }
  .ev-sm-only { display: inline; }
}
@media (max-width: 400px) {
  .ev-date { min-width: 58px; padding: 8px 8px 9px; }
  .ev-date b { font-size: 2rem; }
}
