/* ============================================================
   VARIABLES & RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --sidebar-w:     200px;
  --sidebar-w-col: 64px;

  /* Charte Rosaelia — noir / blanc tranchés par le rouge esport */
  --purple-dark:   #0c0a0d;
  --purple-mid:    #150e10;
  --purple-hover:  #2a1215;
  --accent:        #da2a37;
  --accent-light:  #ea4a53;
  --green:         #4ade80;
  --red:           #da2a37;
  --gold:          #b5555f;
  --bg-main:       #0a0909;
  --border:        #2e2226;
  --text:          #e7dfe0;
  --text-muted:    #8a7778;

  --font-display: 'Cinzel', serif;
  --font-body:    'Oswald', sans-serif;
}

html, body { height: 100%; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  background-image: url("rosaelia_fond.png");
  background-size: cover; 
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text);
  display: flex;
  min-height: 100vh;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w-col);
  background: linear-gradient(180deg, var(--purple-dark) 0%, var(--purple-mid) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.2rem 0;
  border-right: 1px solid var(--border);
  transition: width 0.25s ease;
  overflow: hidden;
  z-index: 100;
}

.sidebar:hover { width: var(--sidebar-w); }

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0 1rem;
  margin-bottom: 1.8rem;
  overflow: hidden;
  text-decoration: none;
  flex-shrink: 0;
}

.sidebar-logo-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar-logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: pixelated;
}

.sidebar-logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.5px;
  color: #fff;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease 0.05s;
}

.sidebar:hover .sidebar-logo-text { opacity: 1; }

/* Nav list */
.nav-list {
  list-style: none;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1.1rem;
  color: #a08e8f;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  position: relative;
}

.nav-item a:hover,
.nav-item.active a {
  background: var(--purple-hover);
  color: #fff;
}

.nav-item.active a::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent-light);
  border-radius: 0 2px 2px 0;
}

.nav-icon  { width: 20px; height: 20px; flex-shrink: 0; opacity: 0.75; }
.nav-label { opacity: 0; transition: opacity 0.2s ease 0.05s; }
.sidebar:hover .nav-label { opacity: 1; }

/* Auth buttons */
.sidebar-auth {
  width: 100%;
  padding: 0 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow: hidden;
}

.btn-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.btn-auth:hover { opacity: 0.85; }
.btn-login    { background: var(--purple-hover); color: #e2cfd0; border: 1px solid var(--border); }
.btn-register { background: var(--accent-light); color: #fff; border: none; }

.btn-auth .btn-label {
  opacity: 0; max-width: 0; overflow: hidden;
  transition: opacity 0.2s ease 0.05s, max-width 0.2s ease 0.05s;
}

.sidebar:hover .btn-auth .btn-label { opacity: 1; max-width: 120px; }

/* ============================================================
   LAYOUT
   ============================================================ */
.page {
  margin-left: var(--sidebar-w-col);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.content {
  flex: 1;
  padding: 2.5rem 3rem;
  max-width: 860px;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  background: linear-gradient(135deg, #1c1112 0%, #120c0d 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem 2.5rem;
  margin-bottom: 1.5rem;
}

.section-title {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 3px;
}

/* Hero */
.hero-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
  line-height: 1.3;
  letter-spacing: 0.3px;
}

.hero-body p {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.hero-body p:last-child { margin-bottom: 0; }
.hero-body p strong { color: #fff; }

/* ============================================================
   SERVER STATUS
   ============================================================ */
.status-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1.4rem;
}

.dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 6px currentColor;
  animation: pulse 2s ease-in-out infinite;
}

.dot.online  { background: var(--green); color: var(--green); }
.dot.offline { background: var(--red);   color: var(--red); animation: none; }
.dot.loading { background: #6b5a8a;      color: #6b5a8a; }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(1.4); }
}

.status-text.online  { color: var(--green); }
.status-text.offline { color: var(--red); }
.status-text.loading { color: #6b5a8a; }

/* ============================================================
   PLAYERS BLOCK
   ============================================================ */
.players-block {
  background: #0d0909;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.3rem 1.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}

.players-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.players-count {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.players-count .sep { color: var(--text-muted); font-weight: 300; margin: 0 0.2em; font-size: 1.4rem; }
.players-count .max { color: var(--gold); }

.pct-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-light);
  line-height: 1;
  text-align: right;
}

/* Progress bar */
.players-bar-wrap {
  height: 4px;
  background: #201517;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 1.4rem;
}

.players-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: 2px;
  transition: width 0.8s ease;
  width: 0%;
}

/* ============================================================
   IP BUTTON
   ============================================================ */
.ip-block { display: flex; flex-direction: column; gap: 0.4rem; }

.ip-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
}

.ip-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: #1a0f3a;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1.3rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gold);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  position: relative;
  user-select: none;
  width: fit-content;
  letter-spacing: 0.3px;
}

.ip-btn:hover  { background: #251560; border-color: var(--accent); }
.ip-btn:active { transform: scale(0.98); }
.ip-btn svg { width: 14px; height: 14px; flex-shrink: 0; fill: var(--text-muted); transition: fill 0.15s; }
.ip-btn:hover svg { fill: var(--gold); }

.copy-toast {
  position: absolute;
  top: -2rem; left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: var(--green);
  color: #071a0d;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s;
}

.copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.motd {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.75rem;
  min-height: 1em;
}

/* ============================================================
   LINK
   ============================================================ */
.link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent-light);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.15s;
}

.link:hover { color: #fff; text-decoration: underline; }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  border-top: 1px solid var(--border);
  padding: 1.4rem 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
}

.social-btn {
  width: 38px; height: 38px;
  background: #1c1214;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.social-btn:hover { background: var(--purple-hover); color: #fff; border-color: var(--accent); }

/* ============================================================
   DOWNLOAD PAGE
   ============================================================ */
#page-modpack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;

  background-image: url("modpack_fond.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
}

#page-modpack .dl-header,
#page-modpack .dl-cards {
  width: 100%;
  max-width: 680px;
}

.dl-header {
  text-align: center;
  margin-bottom: 2.5rem;
  padding-top: 0.5rem;
}

.dl-edition {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 1rem;
}

.dl-subtitle {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text);
  max-width: 520px;
  margin: 0 auto;
}

.dl-subtitle strong { color: #fff; }

.dl-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.dl-card {
  background: linear-gradient(145deg, #1c1113 0%, #110b0c 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.8rem 1.8rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
}

.dl-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    135deg,
    transparent,
    transparent 18px,
    rgba(255,255,255,0.012) 18px,
    rgba(255,255,255,0.012) 19px
  );
  pointer-events: none;
}

.dl-card.featured {
  border-color: #a3242f;
  box-shadow: 0 0 0 1px #a3242f44, inset 0 1px 0 #da2a3722;
}

/* Tags */
.dl-tag {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 0.25em 0.7em;
  border-radius: 4px;
  width: fit-content;
}

.dl-tag--purple { background: #2e1416; color: var(--accent-light); border: 1px solid #a3242f66; }
.dl-tag--gold   { background: #2e1416; color: var(--gold);         border: 1px solid #b5555f55; }

/* Card content */
.dl-card-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.dl-card-desc {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text);
  flex: 1;
}

.dl-card-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: monospace;
}

.dl-card-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Buttons */
.dl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.1s;
  margin-top: 0.3rem;
}

.dl-btn:hover  { opacity: 0.88; }
.dl-btn:active { transform: scale(0.97); }

.dl-btn--purple { background: var(--accent); color: #fff; }
.dl-btn--gold   { background: var(--gold);   color: #fff; }

@media (max-width: 640px) {
  .dl-cards { grid-template-columns: 1fr; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
  .content { padding: 1.5rem 1.2rem; }
  .players-block { flex-direction: column; align-items: flex-start; gap: 0.8rem; }
  footer { padding: 1.2rem; }
}

/* ============================================================
   MODPACK PAGE ONLY
   ============================================================ */

#modpack {
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#modpack .dl-header,
#modpack .dl-cards {
  width: 100%;
  max-width: 680px;
}

#modpack .dl-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

/* ============================================================
   EVENTS PAGE
   ============================================================ */

/* Barre admin */
.ev-admin-bar {
  display: none;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  background: linear-gradient(90deg, #1a0d10 0%, #120a0b 100%);
  border: 1px solid #a3242f55;
  border-radius: 10px;
  padding: 0.75rem 1.2rem;
  margin-bottom: 1.4rem;
}

.ev-admin-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-right: auto;
}

/* Notice de configuration */
.ev-setup-notice {
  display: none;
  align-items: flex-start;
  gap: 0.75rem;
  background: #1c1206;
  border: 1px solid #6b4a0855;
  border-radius: 10px;
  padding: 0.9rem 1.2rem;
  margin-bottom: 1.4rem;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #c89a4e;
}

.ev-setup-notice svg { flex-shrink: 0; margin-top: 2px; }
.ev-setup-notice code {
  background: #2a1e08;
  border-radius: 3px;
  padding: 0.1em 0.4em;
  font-size: 0.8em;
  color: #e8b86d;
}

/* En-tête de page */
.ev-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.4rem;
}

.ev-admin-lock {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  background: #1c1214;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.ev-admin-lock:hover { background: var(--purple-hover); color: var(--accent-light); border-color: var(--accent); }

/* Grille des événements */
.ev-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Carte d'événement */
.ev-card {
  display: flex;
  gap: 1.4rem;
  background: linear-gradient(135deg, #1c1112 0%, #120c0d 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.6rem 1.8rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ev-card:hover { border-color: #3a1f22; box-shadow: 0 4px 20px rgba(218,42,55,0.08); }
.ev-card--past { opacity: 0.55; }
.ev-card--past:hover { opacity: 0.75; }

/* Boîte de date */
.ev-date-box {
  flex-shrink: 0;
  width: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #0d0709;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem 0.4rem;
  gap: 0;
  text-align: center;
}

.ev-date-num  { font-size: 1.6rem; font-weight: 700; color: #fff; line-height: 1; }
.ev-date-mon  { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--accent-light); margin-top: 2px; }
.ev-date-yr   { font-size: 0.62rem; color: var(--text-muted); margin-top: 1px; }

/* Corps de la carte */
.ev-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.55rem; }

.ev-card-meta {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.ev-card-time {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Badges */
.ev-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 0.2em 0.6em;
  border-radius: 4px;
}

.ev-badge--soon { background: #0e2a14; color: var(--green); border: 1px solid #4ade8033; }
.ev-badge--past { background: #1c1112; color: var(--text-muted); border: 1px solid var(--border); }

/* Contenu */
.ev-card-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.ev-card-desc {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
}

/* Pied de carte */
.ev-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.3rem;
}

.ev-reg-count {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.ev-btn-link {
  background: none;
  border: none;
  color: var(--accent-light);
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0;
  font-family: var(--font-body);
  text-decoration: underline;
  transition: color 0.15s;
}
.ev-btn-link:hover { color: #fff; }

.ev-card-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

/* Boutons */
.ev-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 7px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, transform 0.1s;
  white-space: nowrap;
}

.ev-btn:hover  { opacity: 0.85; }
.ev-btn:active { transform: scale(0.97); }

.ev-btn--accent  { background: var(--accent);       color: #fff; }
.ev-btn--ghost   { background: #1c1214; color: var(--text); border: 1px solid var(--border); }
.ev-btn--ghost:hover { border-color: var(--accent); color: #fff; }
.ev-btn--danger  { background: #2a0d0f; color: #e87a82; border: 1px solid #a3242f44; }
.ev-btn--danger:hover { border-color: var(--accent); opacity: 1; }
.ev-btn--sm      { padding: 0.35rem 0.7rem; font-size: 0.78rem; }

/* État vide */
.ev-empty {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  padding: 4rem 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.ev-empty-sub { font-size: 0.8rem; color: #3a2e2f; }

/* Chargement */
.ev-loading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 2rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.ev-spinner {
  width: 18px; height: 18px;
  border: 2px solid #2e2226;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Modales ─────────────────────────────────────────── */
.ev-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.ev-modal-overlay.open { display: flex; }

.ev-modal {
  background: linear-gradient(160deg, #1c1112 0%, #100b0c 100%);
  border: 1px solid #3a2226;
  border-radius: 14px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
  overflow: hidden;
  animation: modalIn 0.2s ease;
}

.ev-modal--wide { max-width: 560px; }

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(-10px); }
  to   { opacity: 1; transform: none; }
}

.ev-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.3rem 1.6rem 1rem;
  border-bottom: 1px solid var(--border);
}

.ev-modal-header h2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.ev-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.ev-modal-close:hover { color: #fff; background: var(--purple-hover); }

.ev-modal-body {
  padding: 1.4rem 1.6rem;
  display: flex;
  flex-direction: column;
}

.ev-modal-footer {
  padding: 1rem 1.6rem 1.4rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  border-top: 1px solid var(--border);
}

/* Éléments de formulaire */
.ev-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.ev-required { color: var(--accent-light); }

.ev-input, .ev-textarea {
  background: #0d0709;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text);
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.ev-input:focus, .ev-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(218,42,55,0.12);
}

.ev-textarea { resize: vertical; min-height: 100px; }

.ev-input[type="date"]::-webkit-calendar-picker-indicator,
.ev-input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(0.5);
  cursor: pointer;
}

.ev-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-top: 1rem;
}

.ev-field { display: flex; flex-direction: column; }

.ev-error {
  font-size: 0.8rem;
  color: #e87a82;
  margin-top: 0.6rem;
  min-height: 1em;
}

.ev-register-event-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
}

/* Liste des participants */
.ev-participants-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 320px;
  overflow-y: auto;
}

.ev-participant-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: #0d0709;
  border-radius: 7px;
  font-size: 0.88rem;
  color: var(--text);
}

.ev-participant-num {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  background: #1c1214;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Toast */
.ev-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(1rem);
  background: var(--green);
  color: #071a0d;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.55rem 1.2rem;
  border-radius: 8px;
  z-index: 400;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap;
}

.ev-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Responsive events ───────────────────────────────── */
@media (max-width: 640px) {
  .ev-card { flex-direction: column; gap: 1rem; }
  .ev-date-box { flex-direction: row; width: auto; padding: 0.5rem 1rem; gap: 0.5rem; border-radius: 8px; }
  .ev-date-num { font-size: 1.2rem; }
  .ev-row { grid-template-columns: 1fr; }
  .ev-card-footer { flex-direction: column; align-items: flex-start; }
}

/* ── Éditeur de champs d'inscription ─────────────────── */
.ev-fields-section {
  margin-top: 1.2rem;
  border-top: 1px solid var(--border);
  padding-top: 1.2rem;
}

.ev-fields-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.ev-fields-editor {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ev-field-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #0d0709;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
}

.ev-field-label-input {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 0.3rem 0.4rem;
  font-size: 0.88rem;
  box-shadow: none;
}

.ev-field-label-input:focus {
  border-bottom-color: var(--accent);
  box-shadow: none;
}

.ev-field-req-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.ev-field-req-cb {
  accent-color: var(--accent);
  width: 14px; height: 14px;
  cursor: pointer;
}

.ev-field-remove-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}

.ev-field-remove-btn:hover:not(:disabled) { color: #e87a82; background: #2a0d0f; }
.ev-field-remove-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.ev-fields-empty {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  padding: 0.5rem 0;
}

/* Champ d'inscription (formulaire visiteur) */
.ev-reg-field { margin-bottom: 1rem; }
.ev-reg-field:last-child { margin-bottom: 0; }

.ev-optional {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

/* Tableau des participants */
.ev-participants-count {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.ev-ptable-wrap {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  max-height: 360px;
  overflow-y: auto;
}

.ev-ptable {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.ev-ptable thead {
  position: sticky;
  top: 0;
  background: #150e10;
  z-index: 1;
}

.ev-ptable th {
  padding: 0.6rem 0.9rem;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.ev-ptable td {
  padding: 0.55rem 0.9rem;
  color: var(--text);
  border-bottom: 1px solid #1c1214;
}

.ev-ptable tbody tr:last-child td { border-bottom: none; }
.ev-ptable tbody tr:hover td { background: #140c0e; }
.ev-ptable-num { color: var(--text-muted); font-size: 0.75rem; width: 36px; }

.ev-no-participants {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-style: italic;
}