/**
 * "Circuits & événements" (page-circuits.php). Ports the approved
 * "Événements Allumage" mockup's typography/spacing onto the REAL,
 * already-working interactive France map (real region SVGs, real geo pins
 * from real lat/lng data, real region filtering/pagination — see main.js
 * around "u2r-france-svg"). This file only restyles the existing
 * .u2r-region-item / .u2r-event-card / .u2r-event-form-wrap classes; it
 * never renames or removes them, since main.js depends on those exact
 * selectors. Loaded only on the circuits page (see functions.php).
 */

/* hero */
.ev-top{ position:relative; z-index:1; max-width:1180px; margin:0 auto; padding:60px 96px 0; }
@media (max-width:860px){ .ev-top{ padding:50px 20px 0 84px; } }
@media (max-width:480px){ .ev-top{ padding-left:68px; } }
.ev-eyebrow{ display:flex; align-items:center; gap:10px; font-family:'IBM Plex Mono',monospace; font-size:12px; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); margin:0 0 18px; }
.ev-eyebrow::before{ content:''; width:22px; height:1px; background:var(--yellow); }
.ev-h1{ margin:0 0 20px; font-family:'Big Shoulders Display',sans-serif; font-weight:800; text-transform:uppercase; letter-spacing:-.02em; line-height:.86; font-size:clamp(38px,6vw,84px); }
.ev-lead{ font-family:'Instrument Serif',Georgia,serif; font-style:italic; font-size:clamp(16px,1.4vw,20px); color:rgba(245,243,240,.85); max-width:62ch; line-height:1.55; margin:0 0 40px; }

/* the shared .wrap gets extra room here (map + event grid are wide) plus
   the usual rail clearance on the left */
.wrap.ev-wrap{ max-width:1180px; padding:0 96px 100px; }
@media (max-width:860px){ .wrap.ev-wrap{ padding:0 20px 60px 84px; } }
@media (max-width:480px){ .wrap.ev-wrap{ padding-left:68px; } }

/* section headings + form title: Oswald -> Big Shoulders Display to match
   the rest of the Allumage type system */
.u2r-events-head h3,
.u2r-event-form-wrap h3,
.u2r-cal-nav h3{ font-family:'Big Shoulders Display',sans-serif; font-weight:800; letter-spacing:-.01em; }

/* region list — pill-style rows instead of the plain hover row */
.u2r-region-list-hint{ font-family:'IBM Plex Mono',monospace; letter-spacing:.03em; }
.u2r-region-item{ border-radius:10px; font-family:'Archivo',sans-serif; font-size:13.5px; transition:background .18s ease,color .18s ease; }
.u2r-region-count{ font-family:'IBM Plex Mono',monospace; }

/* legend — moved (page-circuits.php) from nested inside the map card to its
   own full-width row above the whole map+sidebar section, mirroring the
   mockup's .legend-before-.map-section order; the shared main.css rule
   (padding-top:14px) was tuned for its old spot right under the popover. */
.u2r-map-legend{ margin:0 0 24px; padding:0; }

/* map+sidebar ratio — the mockup gives the sidebar a fluid ~40% (1.5fr:1fr);
   the real fixed 260px sidebar made it visibly narrower/more cramped than
   approved and the map proportionally too wide. Scoped above main.css's own
   900px single-column breakpoint so mobile still stacks map/sidebar instead
   of squeezing both into a 1.5:1 split at 375px width. */
@media (min-width:901px){ .u2r-france-map-wrap{ grid-template-columns:1.5fr 1fr; } }

/* map card — the mockup's warm glow + subtle radar grid texture, dropped
   in the real port (which only had the flat generic glass background). */
.u2r-france-svg-col{ border-radius:22px; background-color:transparent;
  background-image:radial-gradient(circle at 30% 20%, rgba(255,237,0,.07), transparent 55%), linear-gradient(155deg,#141311,#0b0b0c); }
.u2r-france-svg-col::before{ content:''; position:absolute; inset:0; z-index:0; pointer-events:none;
  background-image:linear-gradient(rgba(255,237,0,.05) 1px,transparent 1px), linear-gradient(90deg, rgba(255,237,0,.05) 1px,transparent 1px);
  background-size:32px 32px;
  -webkit-mask-image:radial-gradient(circle at 50% 48%,#000 55%,transparent 78%); mask-image:radial-gradient(circle at 50% 48%,#000 55%,transparent 78%); }
.u2r-france-svg{ position:relative; z-index:1; }
.ev-map-caption{ position:absolute; z-index:2; bottom:16px; left:24px; font-family:'IBM Plex Mono',monospace; font-size:11px; color:var(--muted); pointer-events:none; }
@media (max-width:640px){ .ev-map-caption{ display:none; } }

/* region shapes — this is the big one: the real map filled every region
   with neutral glass-white and a background-colored stroke, so at rest the
   whole map read as flat grey with zero yellow anywhere. The mockup washes
   every region in a faint yellow + thin yellow outline so the map itself
   reads as a glowing amber wireframe even before you hover anything. */
.u2r-region path{ fill:rgba(255,237,0,.05); stroke:rgba(255,237,0,.32); stroke-width:1; }
.u2r-region:hover path{ fill:rgba(255,237,0,.16); stroke:rgba(255,237,0,.65); }
.u2r-region.is-selected path{ fill:var(--yellow); stroke:var(--yellow); }

/* region-selected badge — was using the old Oswald/uppercase/yellow-text
   treatment and a neutral border; match the mockup's Archivo/ink-text pill
   with a yellow-tinted border and blur. */
.u2r-region-badge{ top:16px; left:16px; padding:9px 10px 9px 16px; background:rgba(11,11,12,.92); backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px); border-color:rgba(255,237,0,.35); }
.u2r-region-badge span{ font-family:'Archivo',sans-serif; font-weight:700; text-transform:none; letter-spacing:normal; color:var(--ink); }

/* region list — was a bare, unstyled list; give it the same glass panel
   the mockup's .regions sidebar has. */
.u2r-region-list{ background:var(--glass-bg); border:1px solid var(--glass-border); border-radius:22px; padding:22px; max-height:400px; gap:0; }

/* rows — the mockup separates rows with a hairline (no gap/chip look), and
   its active row is a barely-there yellow wash with a small dot marker,
   not a solid opaque yellow block. */
.u2r-region-item{ border-radius:0; padding:11px 4px; border:none; border-bottom:1px solid var(--line); }
.u2r-region-item:last-child{ border-bottom:none; }
.u2r-region-item:hover{ background:none; color:var(--yellow); }
.u2r-region-item.is-active{ background:rgba(255,237,0,.09); color:var(--ink); font-weight:400; border-radius:10px; padding:11px 10px; margin:0 -10px; width:calc(100% + 20px); border-bottom-color:transparent; display:flex; align-items:center; }
.u2r-region-item.is-active::before{ content:''; width:6px; height:6px; border-radius:50%; background:var(--yellow); margin-right:8px; flex:none; }
.u2r-region-item.is-active .u2r-region-count{ background:none; color:var(--yellow); }

/* type filter chips (Roulage, Compétition…) — combine with the region
   filter/map (AND logic), see main.js applyTypeFilter(). */
.u2r-type-filters{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:24px; }
.u2r-type-chip{ font-family:'Archivo',sans-serif; padding:8px 15px; border-radius:999px; border:1px solid var(--glass-border); background:rgba(255,255,255,.03);
  font-size:12.5px; font-weight:500; text-decoration:none; color:var(--ink); cursor:pointer; transition:all .18s ease; }
.u2r-type-chip:hover{ border-color:rgba(255,237,0,.5); }
.u2r-type-chip.is-active{ background:var(--yellow); color:var(--bg); border-color:var(--yellow); font-weight:700; }

/* event cards — rounded glass card with a top thumbnail, matching the
   approved mockup's .event-card / .event-thumb, instead of the older
   left-striped list-row look. minmax(0,1fr) avoids the classic grid trap
   where a track holds a child to its content's intrinsic min width instead
   of actually splitting evenly (bit atelier's .at-row2/.at-stats already). */
.u2r-events-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); }
@media (max-width:900px){ .u2r-events-grid{ grid-template-columns:minmax(0,1fr); } }
.u2r-event-card{ flex-direction:column; border-left:none; border-radius:18px; background:var(--glass-bg); border:1px solid var(--glass-border); min-height:0; transition:transform .2s ease,border-color .2s ease; }
.u2r-event-card:hover{ transform:translateY(-4px); border-color:rgba(255,237,0,.4); }
.u2r-event-card--other{ border-color:var(--glass-border); }
.u2r-event-affiche{ width:auto; height:104px; margin:0; border-radius:0; background-color:#0d0d0c; background-size:cover; }
.u2r-event-body{ padding:18px 20px 20px; gap:6px; justify-content:flex-start; }
.u2r-event-date{ font-family:'IBM Plex Mono',monospace; color:var(--muted); font-weight:400; }
.u2r-event-title{ font-family:'Big Shoulders Display',sans-serif; font-weight:700; font-size:19px; text-transform:none; margin-top:2px; }
.u2r-event-cta{ margin-top:10px; display:inline-flex; align-items:center; gap:8px; padding:10px 16px; border-radius:11px; background:var(--yellow); color:var(--yellow-ink); font-weight:700; font-size:12.5px; align-self:flex-start; transition:transform .2s ease,background .2s ease; }
.u2r-event-cta:hover{ background:#fff566; transform:translateY(-2px); }
.u2r-event-cta-icon{ background:none; width:auto; height:auto; }
.u2r-event-cta-icon svg{ width:13px; height:13px; stroke:var(--yellow-ink); }
@media (max-width:900px){ .u2r-event-affiche{ height:130px; } }

/* propose-event form — same glass-card / pill-field language as atelier */
.u2r-event-form-wrap{ background:var(--glass-bg); backdrop-filter:blur(14px); border:1px solid var(--glass-border); border-radius:22px; }
.u2r-field span{ font-family:'IBM Plex Mono',monospace; font-size:10.5px; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); }
.u2r-field input, .u2r-field textarea, .u2r-field select{ border-radius:10px; }

/* pin sizes — the mockup makes event pins twice the diameter of circuit
   pins so events (the actionable content under the map) pop out; the real
   map rendered every pin at the same size regardless of type. */
.u2r-geo-pin--circuit-moto .u2r-geo-pin-dot,
.u2r-geo-pin--circuit-voiture .u2r-geo-pin-dot,
.u2r-geo-pin--circuit-les-deux .u2r-geo-pin-dot,
.u2r-geo-pin--circuit-karting .u2r-geo-pin-dot,
.u2r-geo-pin--circuit-unset .u2r-geo-pin-dot{ r:1.7; }
.u2r-geo-pin--circuit-moto .u2r-geo-pin-halo,
.u2r-geo-pin--circuit-voiture .u2r-geo-pin-halo,
.u2r-geo-pin--circuit-les-deux .u2r-geo-pin-halo,
.u2r-geo-pin--circuit-karting .u2r-geo-pin-halo,
.u2r-geo-pin--circuit-unset .u2r-geo-pin-halo{ r:3.5; }

/* ambient pulse ring — mockup only pulses EVENT pins (circuits stay still);
   the first fix pass here pulsed every pin, turning the whole map into a
   constant flicker instead of using the pulse as an "upcoming event" cue. */
@media (prefers-reduced-motion: no-preference){
  .u2r-geo-pin-halo{ animation:none; }
  .u2r-geo-pin--event .u2r-geo-pin-halo,
  .u2r-geo-pin--event-other .u2r-geo-pin-halo{ animation:u2rEvPinPulse 2.4s ease-out infinite; transform-origin:center; transform-box:fill-box; }
  @keyframes u2rEvPinPulse{ 0%{ opacity:.55; transform:scale(1); } 70%{ opacity:0; transform:scale(2.1); } 100%{ opacity:0; transform:scale(2.1); } }
}

/* "Proposer un événement" banner — the eye-catching callout above the grid
   in the mockup; the real page only had the plain form at the bottom. */
.ev-propose-banner{ position:relative; display:flex; align-items:center; justify-content:space-between; gap:28px; flex-wrap:wrap;
  padding:clamp(26px,3.4vw,40px); margin-bottom:40px; border-radius:24px; overflow:hidden;
  background:linear-gradient(120deg,#171509 0%,#0b0b0c 55%); border:1px solid rgba(255,237,0,.25); }
.ev-propose-banner::before{ content:''; position:absolute; inset:-40%; z-index:0; pointer-events:none;
  background:radial-gradient(circle at 82% 30%, rgba(255,237,0,.22), transparent 60%);
  animation:u2rEvProposeGlow 5s ease-in-out infinite; }
@keyframes u2rEvProposeGlow{ 0%,100%{ opacity:.7; transform:scale(1); } 50%{ opacity:1; transform:scale(1.08); } }
@media (prefers-reduced-motion: reduce){ .ev-propose-banner::before{ animation:none; } }
.ev-propose-banner-text{ position:relative; z-index:1; display:flex; align-items:flex-start; gap:18px; max-width:640px; }
.ev-propose-icon{ flex:none; width:52px; height:52px; border-radius:14px; background:rgba(255,237,0,.14); border:1px solid rgba(255,237,0,.3);
  display:flex; align-items:center; justify-content:center; color:var(--yellow); }
.ev-propose-icon svg{ width:26px; height:26px; }
.ev-propose-banner-text h3{ margin:0 0 6px; font-family:'Big Shoulders Display',sans-serif; font-weight:800; text-transform:uppercase; font-size:clamp(20px,2.4vw,27px); letter-spacing:-.01em; }
.ev-propose-banner-text p{ margin:0; font-size:13.5px; color:var(--muted); line-height:1.55; }
.ev-propose-btn{ position:relative; z-index:1; flex:none; display:inline-flex; align-items:center; gap:10px; padding:16px 28px; border-radius:14px;
  background:var(--yellow); color:var(--bg); font-family:'Archivo',sans-serif; font-weight:700; font-size:14.5px; text-decoration:none;
  transition:transform .25s cubic-bezier(.34,1.56,.64,1),box-shadow .3s ease,background .2s ease; }
.ev-propose-btn:hover{ background:#fff566; transform:translateY(-3px) scale(1.03); box-shadow:0 10px 30px rgba(255,237,0,.35); }
.ev-propose-btn svg{ width:17px; height:17px; transition:transform .25s ease; }
.ev-propose-btn:hover svg{ transform:translateX(3px); }
@media (max-width:640px){ .ev-propose-banner{ flex-direction:column; align-items:stretch; } .ev-propose-btn{ justify-content:center; } }
