/* ═══════════════════════════════════════════════════════════
   CARNAVAL – Collège des Collines  |  style.css
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@700;900&family=Nunito:wght@400;600;700;800&display=swap');

:root {
  --purple:     #7c3aed;
  --purple-l:   #9d5bf5;
  --gold:       #f59e0b;
  --gold-l:     #fbbf24;
  --pink:       #ec4899;
  --dark:       #0d0a1a;
  --dark2:      #160f2e;
  --dark3:      #1f1640;
  --card:       rgba(255,255,255,.07);
  --card-b:     rgba(255,255,255,.13);
  --text:       #f1f5f9;
  --muted:      #94a3b8;
  --success:    #10b981;
  --danger:     #ef4444;
  --radius:     14px;
  --shadow:     0 8px 32px rgba(0,0,0,.5);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Nunito', sans-serif;
  /* Fond directement sur body — évite tout problème de z-index avec les pseudo-éléments */
  background:
    radial-gradient(ellipse at 15% 15%, rgba(124,58,237,.25) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 80%, rgba(245,158,11,.15) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 50%, rgba(236,72,153,.08) 0%, transparent 70%),
    linear-gradient(160deg, var(--dark) 0%, var(--dark2) 50%, var(--dark3) 100%);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Layout global ── */
.page { /* plus de z-index ici — le fond est sur body */ }

/* ── Header ── */
.site-header {
  background: rgba(13,10,26,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(124,58,237,.3);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 4px 24px rgba(0,0,0,.4);
}

.site-header .logo {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold) 0%, var(--pink) 60%, var(--purple-l) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

.site-header .logo span { font-size: .6em; opacity: .7; }

.header-nav { display: flex; gap: .75rem; align-items: center; }

/* ── Boutons ── */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .55rem 1.2rem;
  border-radius: 50px;
  border: none; cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-size: .9rem; font-weight: 700;
  transition: all .2s;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--purple), var(--purple-l));
  color: #fff;
  box-shadow: 0 4px 15px rgba(124,58,237,.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(124,58,237,.6); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold), #f97316);
  color: #1a0a00;
  box-shadow: 0 4px 15px rgba(245,158,11,.4);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(245,158,11,.6); }

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #b91c1c);
  color: #fff;
}
.btn-danger:hover { transform: translateY(-2px); opacity: .9; }

.btn-ghost {
  background: var(--card);
  border: 1px solid var(--card-b);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(255,255,255,.12); }

.btn-sm { padding: .35rem .8rem; font-size: .8rem; }
.btn-lg { padding: .8rem 2rem; font-size: 1.1rem; }

.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ── Cards ── */
.card {
  background: var(--card);
  border: 1px solid var(--card-b);
  border-radius: var(--radius);
  padding: 1.5rem;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: 50px;
  font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
}
.badge-purple { background: rgba(124,58,237,.25); color: var(--purple-l); border: 1px solid rgba(124,58,237,.4); }
.badge-gold   { background: rgba(245,158,11,.2);  color: var(--gold-l);   border: 1px solid rgba(245,158,11,.4); }
.badge-green  { background: rgba(16,185,129,.2);  color: #34d399;          border: 1px solid rgba(16,185,129,.4); }
.badge-muted  { background: rgba(148,163,184,.15); color: var(--muted);   border: 1px solid rgba(148,163,184,.3); }

/* ── Forms ── */
.form-group { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
.form-label { font-size: .85rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.form-control {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 10px;
  padding: .7rem 1rem;
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
}
.form-control:focus {
  outline: none;
  border-color: var(--purple-l);
  box-shadow: 0 0 0 3px rgba(124,58,237,.25);
}
.form-control::placeholder { color: var(--muted); }

input[type="number"].form-control { text-align: center; font-size: 1.2rem; font-weight: 700; }

/* ── Score buttons ── */
.score-row {
  padding: 1rem 1.2rem;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  margin-bottom: .7rem;
  transition: border-color .2s;
}
.score-row:hover { border-color: rgba(124,58,237,.4); }

.score-name-row {
  display: flex; align-items: center; gap: .75rem;
  margin-bottom: .75rem;
}
.score-name  { font-weight: 700; font-size: 1rem; flex: 1; }
.score-max   { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.score-selected {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.4rem; font-weight: 700;
  color: var(--gold);
  min-width: 2rem; text-align: right;
  text-shadow: 0 0 12px rgba(245,158,11,.4);
}

.score-btns {
  display: flex; flex-wrap: wrap; gap: .4rem;
}
.score-btn {
  width: 42px; height: 42px;
  border-radius: 9px;
  border: 2px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: 1rem; font-weight: 800;
  cursor: pointer;
  transition: all .15s;
  display: flex; align-items: center; justify-content: center;
}
.score-btn:hover {
  border-color: var(--gold-l);
  background: rgba(245,158,11,.15);
  color: var(--gold-l);
  transform: translateY(-2px);
}
.score-btn.active {
  background: linear-gradient(135deg, var(--purple), var(--purple-l));
  border-color: var(--purple-l);
  color: #fff;
  box-shadow: 0 0 14px rgba(124,58,237,.55);
  transform: translateY(-2px);
}

/* ── Total ── */
.total-bar {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, rgba(124,58,237,.2), rgba(245,158,11,.15));
  border: 1px solid rgba(245,158,11,.3);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin-top: 1rem;
}
.total-label { font-size: 1rem; font-weight: 700; color: var(--gold-l); }
.total-value {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.8rem; font-weight: 700;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(245,158,11,.5);
}
.total-max { font-size: .9rem; color: var(--muted); }

/* ── Jury layout ── */
.jury-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: calc(100vh - 70px);
}

.jury-sidebar {
  background: rgba(13,10,26,.7);
  border-right: 1px solid rgba(255,255,255,.1);
  overflow-y: auto;
  max-height: calc(100vh - 70px);
  position: sticky; top: 70px;
}
.sidebar-header {
  padding: 1.2rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  font-size: .8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em; color: var(--muted);
}
.sidebar-level {
  padding: .5rem 1rem .2rem;
  font-size: .75rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--purple-l);
}
.sidebar-class {
  display: flex; align-items: center; justify-content: space-between;
  padding: .6rem 1rem;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all .15s;
  font-size: .95rem; font-weight: 600;
}
.sidebar-class:hover { background: rgba(255,255,255,.06); }
.sidebar-class.active {
  background: rgba(124,58,237,.15);
  border-left-color: var(--purple-l);
  color: var(--purple-l);
}
.sidebar-class.scored .dot { background: var(--success); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.2); flex-shrink: 0; }

.jury-main { padding: 2rem; overflow-y: auto; }

/* ── Scoring panel ── */
.class-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 1.5rem; gap: 1rem;
}
.class-name {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  background: linear-gradient(135deg, var(--gold), var(--pink));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.class-theme {
  color: var(--muted); font-size: 1rem;
  margin-top: .3rem;
}
.class-theme strong { color: var(--gold-l); }

/* ── Classement / Podium ── */
.podium-section {
  max-width: 1000px; margin: 0 auto;
  padding: 3rem 2rem;
}

.podium {
  display: flex; align-items: flex-end; justify-content: center;
  gap: 1rem; margin-bottom: 3rem;
}

.podium-place {
  display: flex; flex-direction: column; align-items: center;
  flex: 1; max-width: 240px;
}

.podium-card {
  width: 100%; border-radius: var(--radius) var(--radius) 0 0;
  padding: 1.5rem 1rem;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  position: relative; overflow: hidden;
}
.podium-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.08) 0%, transparent 100%);
}

.podium-place-1 .podium-card {
  background: linear-gradient(135deg, rgba(251,191,36,.25), rgba(245,158,11,.15));
  border: 2px solid rgba(251,191,36,.5);
  padding-top: 2rem;
}
.podium-place-2 .podium-card {
  background: linear-gradient(135deg, rgba(148,163,184,.2), rgba(100,116,139,.1));
  border: 2px solid rgba(148,163,184,.4);
}
.podium-place-3 .podium-card {
  background: linear-gradient(135deg, rgba(217,119,6,.2), rgba(180,83,9,.1));
  border: 2px solid rgba(217,119,6,.4);
}

.podium-rank {
  font-family: 'Cinzel Decorative', serif;
  font-size: 2rem; font-weight: 900;
}
.podium-place-1 .podium-rank { color: var(--gold); text-shadow: 0 0 30px rgba(245,158,11,.6); }
.podium-place-2 .podium-rank { color: #cbd5e1; }
.podium-place-3 .podium-rank { color: #d97706; }

.podium-class-name {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.3rem; color: #fff;
}
.podium-theme { font-size: .85rem; color: var(--muted); font-style: italic; }
.podium-score {
  font-size: 1.5rem; font-weight: 800; color: var(--gold-l);
  margin-top: .5rem;
}
.podium-score small { font-size: .7em; color: var(--muted); font-weight: 400; }

.podium-base {
  width: 100%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem; letter-spacing: .1em; color: #fff;
}
.podium-place-1 .podium-base { background: var(--gold); height: 60px; }
.podium-place-2 .podium-base { background: #64748b; height: 45px; }
.podium-place-3 .podium-base { background: #92400e; height: 35px; }

/* ── Ranking table ── */
.ranking-table {
  width: 100%; border-collapse: collapse; margin-top: 2rem;
}
.ranking-table th {
  background: rgba(124,58,237,.2);
  color: var(--purple-l); font-size: .8rem;
  text-transform: uppercase; letter-spacing: .08em;
  padding: .75rem 1rem; text-align: left;
  border-bottom: 2px solid rgba(124,58,237,.3);
}
.ranking-table td {
  padding: .85rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
  font-size: .95rem;
}
.ranking-table tr:hover td { background: rgba(255,255,255,.04); }
.rank-num {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.1rem; font-weight: 700; text-align: center;
  min-width: 40px;
}
.tie-badge { font-size: .7rem; color: var(--pink); }

/* ── Admin ── */
.admin-layout { max-width: 1100px; margin: 0 auto; padding: 2rem; }

.admin-tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 2rem; }
.tab-btn {
  padding: .6rem 1.2rem; border-radius: 8px; border: 1px solid var(--card-b);
  background: var(--card); color: var(--muted);
  cursor: pointer; font-family: 'Nunito', sans-serif; font-size: .9rem; font-weight: 700;
  transition: all .2s;
}
.tab-btn:hover { background: rgba(255,255,255,.1); color: var(--text); }
.tab-btn.active { background: var(--purple); color: #fff; border-color: var(--purple); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.section-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.1rem; font-weight: 700;
  color: var(--gold-l); margin-bottom: 1rem;
  padding-bottom: .5rem; border-bottom: 1px solid rgba(245,158,11,.2);
}

/* ── Login ── */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 2rem;
}
.login-card {
  background: rgba(13,10,26,.9);
  border: 1px solid rgba(124,58,237,.3);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  width: 100%; max-width: 420px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
  backdrop-filter: blur(12px);
}
.login-icon { font-size: 3rem; margin-bottom: 1rem; }
.login-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.4rem;
  background: linear-gradient(135deg, var(--gold), var(--pink));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: .5rem;
}
.login-sub { color: var(--muted); font-size: .9rem; margin-bottom: 2rem; }
.login-error { color: var(--danger); font-size: .85rem; margin-top: .75rem; }

/* ── Notification toast ── */
.toast {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 9999;
  background: rgba(16,185,129,.9); color: #fff;
  padding: .8rem 1.5rem; border-radius: 10px;
  font-weight: 700; font-size: .95rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  transform: translateY(100px); opacity: 0;
  transition: all .35s cubic-bezier(.34,1.56,.64,1);
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { background: rgba(239,68,68,.9); }

/* ── Confirmation modal ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,.7); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--dark2); border: 1px solid rgba(239,68,68,.4);
  border-radius: 20px; padding: 2.5rem; max-width: 460px; width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
  transform: scale(.92); transition: transform .3s;
}
.modal-overlay.open .modal { transform: scale(1); }
.modal-title { font-size: 1.3rem; font-weight: 800; color: var(--danger); margin-bottom: .75rem; }
.modal-body  { color: var(--muted); margin-bottom: 1.5rem; line-height: 1.6; }
.modal-footer { display: flex; gap: .75rem; justify-content: flex-end; }

/* ── Deliberation drag list ── */
.delib-list { display: flex; flex-direction: column; gap: .5rem; }
.delib-item {
  display: flex; align-items: center; gap: 1rem;
  padding: .85rem 1rem;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px; cursor: grab; user-select: none;
}
.delib-item.dragging { opacity: .5; cursor: grabbing; }
.delib-item.drag-over { border-color: var(--purple-l); background: rgba(124,58,237,.15); }
.delib-handle { color: var(--muted); font-size: 1.2rem; }
.delib-rank { font-family: 'Cinzel Decorative', serif; font-size: 1.1rem; color: var(--gold); min-width: 30px; }

/* ── Editable lists (criteria / classes) ── */
.edit-list { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1rem; }
.edit-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .7rem 1rem;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
}
.edit-item input { flex: 1; }
.edit-item input[type="number"] { width: 80px; flex: none; }

/* ── Themes grid ── */
.themes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.theme-card {
  background: var(--card); border: 1px solid var(--card-b); border-radius: 12px; padding: 1rem;
}
.theme-card-label { font-size: .85rem; font-weight: 800; color: var(--gold-l); margin-bottom: .5rem; }

/* ── Progress/Status ── */
.progress-bar { height: 6px; background: rgba(255,255,255,.1); border-radius: 10px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 10px; transition: width .4s; }

/* ── Jury name tag ── */
.jury-tag {
  display: flex; align-items: center; gap: .5rem;
  padding: .4rem 1rem; border-radius: 50px;
  background: rgba(124,58,237,.2); border: 1px solid rgba(124,58,237,.4);
  font-size: .9rem; font-weight: 700; color: var(--purple-l);
  cursor: pointer; transition: background .2s, border-color .2s;
}
.jury-tag:hover { background: rgba(124,58,237,.35); border-color: var(--purple-l); }

/* ── Confetti animation (classement page) ── */
.confetti-piece {
  position: fixed; top: -20px; border-radius: 2px;
  animation: confettiFall linear forwards;
  pointer-events: none; z-index: 999;
}
@keyframes confettiFall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ══════════════════════════════════════════════
   RESPONSIVE MOBILE
══════════════════════════════════════════════ */

/* ── Tablette (≤ 900px) ── */
@media (max-width: 900px) {
  .jury-layout { grid-template-columns: 220px 1fr; }
  .admin-layout { padding: 1.5rem; }
}

/* ── Mobile (≤ 640px) ── */
@media (max-width: 640px) {

  /* ─ Header ─ */
  .site-header { padding: .6rem 1rem; gap: .5rem; }
  .site-header .logo span { display: none; }          /* cache le sous-titre */
  .site-header .logo { font-size: .95rem; }
  .header-nav { gap: .35rem; }
  .header-nav .btn   { padding: .35rem .65rem; font-size: .75rem; }
  .jury-tag { padding: .3rem .65rem; font-size: .78rem; }

  /* ─ Login / sélection jury ─ */
  .login-card { padding: 2rem 1.25rem; border-radius: 16px; }
  .login-title { font-size: 1.15rem; }

  /* ─ Jury layout : vertical ─ */
  .jury-layout {
    display: flex; flex-direction: column;
    grid-template-columns: none;
    min-height: unset;
  }

  /* La sidebar devient une barre horizontale scrollable */
  .jury-sidebar {
    position: sticky; top: 52px; z-index: 50;
    max-height: none; overflow-y: visible;
    border-right: none;
    border-bottom: 2px solid rgba(124,58,237,.25);
    background: rgba(10,8,22,.95);
  }
  .sidebar-header {
    padding: .5rem 1rem;
    display: flex; align-items: center; justify-content: space-between;
    font-size: .72rem;
  }
  #sidebarList {
    display: flex; flex-direction: row; overflow-x: auto;
    gap: .4rem; padding: .5rem .75rem .65rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  #sidebarList::-webkit-scrollbar { display: none; }

  .sidebar-level { display: none; }
  .sidebar-class {
    flex-direction: row; flex-shrink: 0;
    border-left: none;
    border: 2px solid rgba(255,255,255,.12);
    border-radius: 20px;
    padding: .35rem .85rem;
    font-size: .82rem; white-space: nowrap;
    gap: .35rem;
    min-width: unset;
  }
  .sidebar-class.active {
    border-color: var(--purple-l);
    background: rgba(124,58,237,.25);
    color: var(--purple-l);
  }
  .sidebar-class.scored { border-color: rgba(16,185,129,.5); }
  .sidebar-class.scored .dot { background: var(--success); }

  /* ─ Panneau de notation ─ */
  .jury-main { padding: 1rem; }
  .class-header { flex-direction: column; gap: .5rem; margin-bottom: 1rem; }
  .class-name { font-size: 1.6rem; }

  /* Score rows : plus compacts */
  .score-row { padding: .75rem .9rem; margin-bottom: .5rem; }
  .score-name-row { margin-bottom: .6rem; }
  .score-name { font-size: .92rem; }
  .score-selected { font-size: 1.2rem; }

  /* Boutons de score : touch-friendly */
  .score-btns { gap: .3rem; }
  .score-btn { width: 44px; height: 44px; font-size: .95rem; border-radius: 8px; }

  /* Total */
  .total-bar { padding: .75rem 1rem; }
  .total-value { font-size: 1.5rem; }

  /* Boutons d'action */
  .btn-lg { padding: .7rem 1.5rem; font-size: 1rem; }

  /* ─ Classement – Podium compact 3 colonnes ─ */
  .podium { gap: .3rem; margin-bottom: 1.2rem; align-items: flex-end; }
  .podium-place { flex: 1; max-width: none; min-width: 0; flex-direction: column; align-items: center; }
  .podium-card {
    flex-direction: column;
    padding: .45rem .2rem; gap: .12rem;
    text-align: center; justify-content: center;
  }
  .podium-place-1 .podium-card { padding-top: .6rem; }
  .podium-rank { font-size: 1.15rem; }
  .podium-class-name { font-size: .65rem; line-height: 1.2; word-break: break-word; }
  .podium-theme { display: none; }
  .podium-score { font-size: .78rem; margin-top: .1rem; }
  .podium-score small { font-size: .58em; }
  .podium-score > div { display: none; }
  .podium-place-1 .podium-base { height: 42px; font-size: .68rem; }
  .podium-place-2 .podium-base { height: 30px; font-size: .63rem; }
  .podium-place-3 .podium-base { height: 24px; font-size: .58rem; }

  /* Tables : scroll horizontal */
  .ranking-wrap { padding: 0 1rem 2rem; overflow-x: auto; }
  .ranking-table { min-width: 480px; }
  .ranking-table th,
  .ranking-table td { padding: .6rem .55rem; font-size: .82rem; }

  /* ─ Admin ─ */
  .admin-layout { padding: 1rem; }
  .admin-tabs { gap: .35rem; }
  .tab-btn { padding: .5rem .9rem; font-size: .82rem; }
  .secondary-actions { gap: .4rem; }
  .secondary-actions .btn { padding: .4rem .7rem; font-size: .78rem; }

  .classes-grid { grid-template-columns: 1fr; gap: .9rem; }
  .themes-grid  { grid-template-columns: 1fr; }

  /* Critères : empilé */
  .crit-item { grid-template-columns: 1fr auto; gap: .5rem; }
  .crit-max-wrap { flex-wrap: wrap; }

  /* Ordre de passage */
  .order-wrap { gap: .5rem; }
  .order-item { padding: .5rem 1rem; font-size: .9rem; }

  /* Section classement par niveau */
  .level-sections { padding: 0 1rem 2rem; }
  .level-section-body { padding: .75rem 1rem; overflow-x: auto; }
  .mini-podium { gap: .3rem; flex-wrap: nowrap; }
  .mini-place { flex: 1; min-width: 0; padding: .4rem .3rem; }
  .mini-medal { font-size: 1rem; }
  .mini-name  { font-size: .72rem; }
  .mini-score { font-size: .65rem; }
  .mini-theme { display: none; }

  /* Panel délibération */
  .delib-panel { margin: 1rem; }
  .delib-panel-body { padding: 1rem; }
  .delib-login { flex-direction: column; align-items: stretch; }
  .delib-login input { max-width: 100%; }
  .delib-item { padding: .65rem .75rem; gap: .6rem; font-size: .88rem; }

  /* Toast bas de page au-dessus du clavier virtuel */
  .toast { bottom: 1rem; right: 1rem; left: 1rem; text-align: center; }

  /* Modal plein écran sur mobile */
  .modal { padding: 1.75rem 1.25rem; border-radius: 16px; }

  /* Onglets de vue (classement) */
  .view-tabs { gap: .5rem; padding: 0 1rem; }
  .view-tab  { padding: .55rem 1.2rem; font-size: .88rem; }
}

/* ── Utilities ── */
.text-center { text-align: center; }
.text-muted   { color: var(--muted); }
.text-gold    { color: var(--gold-l); }
.text-purple  { color: var(--purple-l); }
.mt-1 { margin-top: .5rem; }  .mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; }
.gap-1 { gap: .5rem; } .gap-2 { gap: 1rem; }
.flex { display: flex; } .flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.hidden { display: none !important; }
