:root {
  --green: #0c6b3a;
  --green-dark: #084f2b;
  --yellow: #ffd928;
  --bg: #f4f7f5;
  --text: #112018;
  --muted: #68766e;
  --white: #ffffff;
  --danger: #b42318;
  --shadow: 0 12px 30px rgba(0,0,0,.10);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
.topbar {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: white;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.brand { display: flex; gap: 12px; align-items: center; }
.logo {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--yellow); color: var(--green-dark);
  display: grid; place-items: center;
  font-weight: 900; font-size: 18px;
  border: 3px solid white;
}
.brand h1 { margin: 0; font-size: clamp(18px, 3vw, 30px); }
.brand small { opacity: .85; display: block; }
.status {
  font-size: 13px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.25);
  padding: 8px 11px;
  border-radius: 999px;
  white-space: nowrap;
}
.status.ok::before { content: "● "; color: #8dffab; }
.status.bad::before { content: "● "; color: #ff9a9a; }

.container { width: min(1180px, calc(100% - 24px)); margin: 18px auto 36px; }
.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.card {
  background: white;
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 20px;
}
.last-number-card {
  background: linear-gradient(135deg, var(--yellow), #ffeb75);
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 220px;
}
.kicker {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 800;
  font-size: 13px;
  color: #4a5324;
}
.last-number {
  font-weight: 1000;
  font-size: clamp(86px, 16vw, 170px);
  line-height: .9;
  color: var(--green-dark);
  margin-top: 6px;
}
.last-number.empty { opacity: .35; font-size: clamp(56px, 10vw, 100px); }

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
  height: 100%;
}
.stat {
  border: 1px solid #e5ebe7;
  border-radius: 18px;
  padding: 16px;
  min-height: 96px;
}
.stat b { display: block; font-size: 30px; color: var(--green-dark); }
.stat span { color: var(--muted); font-size: 14px; }
.recent { grid-column: 1 / -1; }
.recent-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 9px; }
.recent-pill {
  background: #eef3ef;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 800;
}
.recent-pill:first-child { background: var(--yellow); }

.number-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0,1fr));
  gap: 8px;
}
.grid-card { padding: 16px; }
.number {
  aspect-ratio: 1/1;
  min-width: 0;
  border-radius: 14px;
  border: 2px solid #dce5df;
  background: white;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: clamp(17px, 2.6vw, 30px);
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.number.called {
  background: var(--yellow);
  border-color: #efc900;
  color: #243014;
}
.number.latest {
  outline: 4px solid var(--green);
  transform: scale(1.04);
}

.winner-banner {
  display: none;
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: white;
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
  text-align: center;
}
.winner-banner.show { display: block; animation: pop .35s ease; }
.winner-banner .party { opacity: .8; font-weight: 800; }
.winner-banner .name { font-size: clamp(28px, 6vw, 54px); font-weight: 1000; margin-top: 4px; }
@keyframes pop {
  from { transform: scale(.96); opacity: .3; }
  to { transform: scale(1); opacity: 1; }
}

.winners-card { margin-top: 16px; }
.winners-card h2 { margin: 0 0 12px; }
.winners-list { display: grid; gap: 9px; }
.winner-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid #e3ebe6;
  border-radius: 14px;
  padding: 12px 14px;
}
.winner-row .part { color: var(--muted); font-weight: 700; }
.winner-row .winner-name { font-weight: 900; color: var(--green-dark); }

.admin-panel { display: grid; gap: 14px; margin-bottom: 16px; }
.input-row { display: flex; gap: 10px; flex-wrap: wrap; }
.input-row input {
  flex: 1 1 180px;
  font-size: 32px;
  font-weight: 900;
  text-align: center;
  padding: 14px;
  border-radius: 16px;
  border: 2px solid #cfdad3;
}
.input-row input.text-input {
  font-size: 20px;
  text-align: left;
  font-weight: 700;
}
button {
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 800;
  cursor: pointer;
  font-size: 15px;
}
button.primary { background: var(--green); color: white; }
button.secondary { background: #edf2ee; color: var(--green-dark); }
button.danger { background: #ffebe9; color: var(--danger); }
button:disabled { opacity: .5; cursor: not-allowed; }

.message { min-height: 22px; font-weight: 700; }
.message.error { color: var(--danger); }
.message.success { color: var(--green); }

.login-wrap { width: min(520px, calc(100% - 24px)); margin: 42px auto; }
.login-wrap input {
  width: 100%;
  margin: 7px 0;
  padding: 13px 14px;
  border: 1px solid #ccd8d0;
  border-radius: 12px;
  font-size: 16px;
}
.hidden { display: none !important; }
.footer {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 8px 12px 28px;
}

@media (max-width: 760px) {
  .topbar { position: static; align-items: flex-start; }
  .hero { grid-template-columns: 1fr; }
  .last-number-card { min-height: 180px; }
  .number-grid { gap: 5px; }
  .number { border-radius: 9px; font-size: clamp(15px, 4vw, 22px); }
  .container { width: min(100% - 12px, 1180px); margin-top: 8px; }
  .grid-card { padding: 8px; border-radius: 15px; }
  .card { padding: 14px; }
  .brand small { display: none; }
  .logo { width: 44px; height: 44px; }
}


.logo.logo-image {
  background: white;
  overflow: hidden;
  padding: 2px;
}
.logo.logo-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 50%;
}


/* ===== V4 CLUB LOOK ===== */
body {
  background:
    radial-gradient(circle at top left, rgba(255,217,40,.16), transparent 28%),
    radial-gradient(circle at top right, rgba(12,107,58,.16), transparent 25%),
    linear-gradient(180deg, #f6f8f5 0%, #edf4ef 100%);
}

.topbar {
  background:
    linear-gradient(135deg, rgba(8,79,43,.98), rgba(12,107,58,.98)),
    repeating-linear-gradient(
      90deg,
      rgba(255,255,255,.04) 0px,
      rgba(255,255,255,.04) 16px,
      rgba(255,217,40,.06) 16px,
      rgba(255,217,40,.06) 32px
    );
  padding: 18px 20px;
  border-bottom: 4px solid var(--yellow);
}

.brand {
  gap: 16px;
}

.logo {
  width: 82px;
  height: 82px;
  border-radius: 18px;
  background: white;
  border: 4px solid var(--yellow);
  box-shadow: 0 8px 22px rgba(0,0,0,.24);
}

.logo.logo-image {
  padding: 5px;
  border-radius: 18px;
}

.logo.logo-image img {
  border-radius: 12px;
}

.brand h1 {
  font-size: clamp(20px, 3.2vw, 34px);
  letter-spacing: .01em;
}

.brand small {
  font-size: 14px;
  opacity: .95;
}

.status {
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.28);
  font-weight: 800;
}

.card {
  border: 1px solid rgba(12,107,58,.08);
}

.last-number-card {
  background:
    linear-gradient(135deg, #ffe869 0%, #ffd928 45%, #f0c700 100%);
  border: 2px solid rgba(8,79,43,.1);
}

.kicker {
  color: #30511b;
  font-size: 14px;
}

.last-number {
  text-shadow: 0 3px 0 rgba(255,255,255,.35);
}

.winner-banner {
  border: 3px solid var(--yellow);
  background:
    linear-gradient(135deg, rgba(8,79,43,.98), rgba(12,107,58,.96));
}

.winners-card h2 {
  color: var(--green-dark);
}

.winner-row {
  background: linear-gradient(180deg, #ffffff 0%, #f6fbf7 100%);
}

.number {
  border: 2px solid #cfe1d4;
  box-shadow: inset 0 -2px 0 rgba(12,107,58,.03);
}

.number.called {
  background: linear-gradient(180deg, #ffe96c 0%, #ffd928 100%);
  border-color: #ddb900;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.06);
}

.number.latest {
  outline: 5px solid var(--green);
}

button.primary {
  background: linear-gradient(180deg, #0f8247, #0c6b3a);
  box-shadow: 0 6px 14px rgba(12,107,58,.22);
}

button.secondary {
  border: 1px solid #d9e6de;
}

button.danger {
  border: 1px solid #ffd3ce;
}

.footer {
  color: #476153;
  font-weight: 600;
}

@media (max-width: 760px) {
  .logo {
    width: 64px;
    height: 64px;
  }
  .brand h1 {
    font-size: 20px;
  }
}


/* ===== V5 - UNIVERS VISUEL RSC PÂTURAGES ===== */
:root {
  --green: #08733f;
  --green-dark: #04582f;
  --green-deep: #023a20;
  --yellow: #ffd400;
  --yellow-bright: #ffe95a;
  --cream: #fff9d6;
}

html {
  background: var(--green-deep);
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 10%, rgba(255,212,0,.32), transparent 24%),
    radial-gradient(circle at 80% 18%, rgba(255,233,90,.18), transparent 22%),
    linear-gradient(135deg, var(--green-deep) 0%, var(--green) 48%, #0a8148 100%);
  color: #0b2516;
  position: relative;
  overflow-x: hidden;
}

/* giant subtle crest in the background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("logo-rsc-paturages.jpeg") center 58% / min(70vw, 720px) auto no-repeat;
  opacity: .045;
  pointer-events: none;
  z-index: 0;
  filter: saturate(1.25);
}

body > * {
  position: relative;
  z-index: 1;
}

.topbar {
  background: linear-gradient(90deg, var(--green-deep), var(--green-dark), var(--green-deep));
  border-bottom: 6px solid var(--yellow);
  box-shadow: 0 8px 28px rgba(0,0,0,.24);
}

.topbar .logo {
  width: 96px;
  height: 96px;
  border-radius: 20px;
  border: 5px solid var(--yellow);
  box-shadow: 0 8px 26px rgba(0,0,0,.35);
}

.topbar .brand h1 {
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: .035em;
  color: var(--yellow);
  text-shadow: 0 2px 0 rgba(0,0,0,.2);
}

.topbar .brand small {
  color: white;
  font-weight: 700;
}

/* Giant visual identity block */
.club-hero {
  width: min(1240px, calc(100% - 24px));
  margin: 18px auto 8px;
  min-height: 360px;
  border-radius: 34px;
  padding: 26px 34px;
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: 30px;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(255,212,0,.98) 0%, rgba(255,233,90,.98) 55%, rgba(255,212,0,.96) 100%);
  border: 7px solid var(--green-deep);
  box-shadow:
    0 18px 45px rgba(0,0,0,.28),
    inset 0 0 0 5px rgba(255,255,255,.28);
  overflow: hidden;
  position: relative;
}

.club-hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: rgba(8,115,63,.12);
  box-shadow:
    -150px 210px 0 40px rgba(8,115,63,.08),
    -340px -30px 0 20px rgba(8,115,63,.06);
}

.club-hero-logo-wrap {
  display: grid;
  place-items: center;
  position: relative;
  z-index: 2;
}

.club-hero-logo {
  width: min(100%, 360px);
  max-height: 315px;
  object-fit: contain;
  filter: drop-shadow(0 16px 18px rgba(0,0,0,.22));
  transform: scale(1.12);
}

.club-hero-text {
  position: relative;
  z-index: 2;
  text-align: left;
}

.club-hero-kicker {
  display: inline-block;
  background: var(--green-deep);
  color: var(--yellow);
  font-weight: 1000;
  letter-spacing: .16em;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: clamp(12px, 1.6vw, 18px);
  margin-bottom: 14px;
}

.club-hero-title {
  font-size: clamp(52px, 8vw, 108px);
  font-weight: 1000;
  line-height: .88;
  letter-spacing: -.04em;
  color: var(--green-deep);
  text-transform: uppercase;
  text-shadow: 0 4px 0 rgba(255,255,255,.32);
}

.club-hero-subtitle {
  margin-top: 16px;
  font-size: clamp(18px, 2.3vw, 30px);
  font-weight: 900;
  color: var(--green-dark);
}

.container {
  width: min(1240px, calc(100% - 24px));
}

/* All cards now feel part of the club identity */
.card {
  background: rgba(255,249,214,.97);
  border: 4px solid var(--yellow);
  box-shadow: 0 14px 32px rgba(0,0,0,.22);
}

.last-number-card {
  background:
    linear-gradient(145deg, var(--yellow-bright) 0%, var(--yellow) 62%, #efbe00 100%);
  border: 6px solid var(--green-deep);
  min-height: 250px;
}

.last-number {
  color: var(--green-deep);
  font-size: clamp(92px, 17vw, 184px);
}

.kicker {
  color: var(--green-deep);
  font-weight: 1000;
}

.stat {
  background: rgba(255,255,255,.52);
  border: 2px solid rgba(8,115,63,.18);
}

.stat b {
  color: var(--green-deep);
}

.number {
  background: #fffdf0;
  border: 3px solid var(--green-dark);
  color: var(--green-deep);
  font-weight: 1000;
  box-shadow: 0 4px 0 rgba(2,58,32,.12);
}

.number.called {
  background: linear-gradient(180deg, var(--yellow-bright), var(--yellow));
  border-color: var(--green-deep);
  color: var(--green-deep);
  box-shadow: 0 5px 0 rgba(2,58,32,.22);
}

.number.latest {
  outline: 6px solid white;
  box-shadow:
    0 0 0 10px var(--green-deep),
    0 8px 18px rgba(0,0,0,.22);
}

.winner-banner {
  background:
    linear-gradient(135deg, var(--green-deep), var(--green-dark));
  border: 6px solid var(--yellow);
  color: white;
  box-shadow: 0 16px 36px rgba(0,0,0,.25);
}

.winner-banner .name {
  color: var(--yellow);
  text-shadow: 0 2px 0 rgba(0,0,0,.18);
}

.winners-card h2 {
  color: var(--green-deep);
}

.winner-row {
  background: rgba(255,255,255,.64);
  border: 2px solid rgba(8,115,63,.22);
}

.winner-row .winner-name {
  color: var(--green-deep);
}

.admin-panel {
  border-color: var(--yellow);
}

button.primary {
  background: linear-gradient(180deg, #0a8b4e, var(--green-dark));
  border: 2px solid var(--yellow);
  box-shadow: 0 6px 0 var(--green-deep);
}

button.secondary {
  background: var(--cream);
  border: 2px solid var(--green-dark);
  color: var(--green-deep);
}

button.danger {
  border: 2px solid #d73b31;
}

.login-wrap .card {
  background: rgba(255,249,214,.98);
}

.footer {
  color: var(--yellow-bright);
  font-weight: 800;
  text-shadow: 0 2px 0 rgba(0,0,0,.25);
}

@media (max-width: 820px) {
  .club-hero {
    grid-template-columns: 1fr;
    text-align: center;
    min-height: auto;
    padding: 24px 18px 30px;
  }

  .club-hero-text {
    text-align: center;
  }

  .club-hero-logo {
    width: min(76vw, 330px);
    max-height: 280px;
    transform: scale(1.08);
  }

  .club-hero-title {
    font-size: clamp(48px, 15vw, 82px);
  }

  .topbar .logo {
    width: 76px;
    height: 76px;
  }

  .topbar .brand small {
    display: none;
  }
}

@media (max-width: 560px) {
  .club-hero {
    border-width: 5px;
    border-radius: 26px;
  }

  .club-hero-logo {
    width: min(82vw, 300px);
  }

  .club-hero-title {
    font-size: 56px;
  }

  .club-hero-subtitle {
    font-size: 18px;
  }

  .number {
    border-width: 2px;
  }
}


/* ===== V6 - OPTIMISATION PC / ECRAN GEANT ===== */
@media (min-width: 1000px) {
  .topbar {
    padding: 14px 28px;
  }

  .topbar .logo {
    width: 78px;
    height: 78px;
  }

  .brand h1 {
    font-size: 30px;
  }

  .club-hero {
    width: min(1500px, calc(100% - 44px));
    min-height: 250px;
    margin-top: 22px;
    padding: 20px 42px;
    grid-template-columns: 280px 1fr;
    gap: 38px;
  }

  .club-hero-logo {
    width: 250px;
    max-height: 220px;
    transform: scale(1.08);
  }

  .club-hero-title {
    font-size: clamp(64px, 6vw, 100px);
  }

  .club-hero-subtitle {
    font-size: 24px;
  }

  .container {
    width: min(1500px, calc(100% - 44px));
    margin-top: 18px;
  }

  .hero {
    grid-template-columns: .9fr 1.4fr;
    gap: 22px;
  }

  .last-number-card {
    min-height: 240px;
  }

  .last-number {
    font-size: clamp(118px, 12vw, 190px);
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .stat {
    min-height: 105px;
    padding: 18px;
  }

  .stat b {
    font-size: 38px;
  }

  .recent {
    min-height: 105px;
  }

  .grid-card {
    padding: 20px;
  }

  .number-grid {
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 12px;
  }

  .number {
    aspect-ratio: auto;
    height: clamp(58px, 4.6vw, 76px);
    border-radius: 14px;
    font-size: clamp(24px, 2vw, 34px);
  }

  .winners-card {
    margin-top: 22px;
  }

  .winner-row {
    padding: 14px 18px;
    font-size: 18px;
  }

  .footer {
    font-size: 14px;
    padding-bottom: 20px;
  }
}

/* Très grands écrans / vidéoprojecteurs */
@media (min-width: 1500px) {
  .club-hero,
  .container {
    width: min(1680px, calc(100% - 60px));
  }

  .club-hero {
    grid-template-columns: 320px 1fr;
  }

  .club-hero-logo {
    width: 290px;
    max-height: 250px;
  }

  .number {
    height: 82px;
    font-size: 36px;
  }

  .last-number {
    font-size: 210px;
  }
}


/* ===== V7 - MODE ÉCRAN GÉANT / VIDÉOPROJECTEUR ===== */
/* Cette mise en page ne s'applique qu'à la page publique sur PC. */
@media (min-width: 1000px) {
  .public-page {
    min-height: 100vh;
    overflow-x: hidden;
  }

  /* On évite de perdre de la hauteur dans deux gros bandeaux */
  .public-page .topbar {
    min-height: 68px;
    padding: 8px 22px;
    position: static;
  }

  .public-page .topbar .logo {
    width: 54px;
    height: 54px;
    border-width: 3px;
    border-radius: 12px;
  }

  .public-page .topbar .brand h1 {
    font-size: 24px;
  }

  .public-page .topbar .brand small {
    font-size: 12px;
  }

  /* Bandeau club compact mais bien visible */
  .public-page .club-hero {
    width: min(1760px, calc(100% - 28px));
    min-height: 106px;
    height: 106px;
    margin: 10px auto;
    padding: 8px 22px;
    grid-template-columns: 110px 1fr;
    gap: 18px;
    border-width: 4px;
    border-radius: 20px;
  }

  .public-page .club-hero-logo {
    width: 95px;
    max-height: 92px;
    transform: none;
  }

  .public-page .club-hero-kicker {
    font-size: 12px;
    padding: 5px 9px;
    margin-bottom: 4px;
  }

  .public-page .club-hero-title {
    font-size: 46px;
    line-height: .92;
  }

  .public-page .club-hero-subtitle {
    margin-top: 4px;
    font-size: 18px;
  }

  /* Le coeur de l'écran : dernier numéro à gauche, grille géante à droite */
  .public-page .container {
    width: min(1760px, calc(100% - 28px));
    margin: 10px auto 18px;
    display: grid;
    grid-template-columns: minmax(280px, 25vw) 1fr;
    grid-template-areas:
      "winner winner"
      "hero grid"
      "winners winners";
    gap: 14px;
    align-items: stretch;
  }

  .public-page .winner-banner {
    grid-area: winner;
    margin: 0;
    padding: 12px 18px;
    border-radius: 16px;
  }

  .public-page .winner-banner .name {
    font-size: 44px;
  }

  .public-page .hero {
    grid-area: hero;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    min-width: 0;
  }

  .public-page .hero > .card {
    width: 100%;
  }

  .public-page .last-number-card {
    flex: 1 1 auto;
    min-height: 300px;
    padding: 16px;
    border-width: 5px;
  }

  .public-page .last-number {
    font-size: clamp(150px, 15vw, 250px);
    line-height: .82;
  }

  .public-page .kicker {
    font-size: 18px;
    letter-spacing: .08em;
  }

  .public-page .hero > .card:not(.last-number-card) {
    padding: 12px;
  }

  .public-page .stats {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .public-page .stat {
    min-height: 80px;
    padding: 10px;
  }

  .public-page .stat b {
    font-size: 34px;
  }

  .public-page .recent {
    min-height: 86px;
  }

  .public-page .recent-list {
    gap: 6px;
    margin-top: 6px;
  }

  .public-page .recent-pill {
    font-size: 17px;
    padding: 6px 9px;
  }

  .public-page .grid-card {
    grid-area: grid;
    padding: 12px;
    min-width: 0;
    display: flex;
    align-items: stretch;
  }

  .public-page .number-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    grid-template-rows: repeat(9, minmax(54px, 1fr));
    gap: 7px;
  }

  .public-page .number {
    aspect-ratio: auto;
    height: auto;
    min-height: 54px;
    font-size: clamp(28px, 2.25vw, 44px);
    border-radius: 11px;
    border-width: 3px;
  }

  .public-page .number.latest {
    outline-width: 4px;
    box-shadow:
      0 0 0 7px var(--green-deep),
      0 8px 18px rgba(0,0,0,.24);
  }

  .public-page .winners-card {
    grid-area: winners;
    margin: 0;
    padding: 12px 16px;
  }

  .public-page .winners-card h2 {
    font-size: 20px;
    margin-bottom: 8px;
  }

  .public-page .winners-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
  }

  .public-page .winner-row {
    padding: 9px 11px;
    font-size: 15px;
  }

  .public-page .footer {
    padding: 6px 12px 12px;
    font-size: 12px;
  }
}

/* Écrans Full HD et vidéoprojecteurs : priorité maximale à la lisibilité */
@media (min-width: 1400px) and (min-height: 800px) {
  .public-page .container {
    grid-template-columns: minmax(330px, 27vw) 1fr;
  }

  .public-page .number-grid {
    gap: 9px;
  }

  .public-page .number {
    min-height: 62px;
    font-size: clamp(32px, 2.35vw, 48px);
  }

  .public-page .last-number {
    font-size: clamp(180px, 16vw, 280px);
  }
}

/* Si on utilise F11 / plein écran avec peu de hauteur, on compacte encore le haut */
@media (min-width: 1000px) and (max-height: 820px) {
  .public-page .club-hero {
    height: 84px;
    min-height: 84px;
    grid-template-columns: 78px 1fr;
  }

  .public-page .club-hero-logo {
    width: 70px;
    max-height: 70px;
  }

  .public-page .club-hero-title {
    font-size: 38px;
  }

  .public-page .club-hero-subtitle {
    display: none;
  }

  .public-page .number-grid {
    grid-template-rows: repeat(9, minmax(48px, 1fr));
    gap: 6px;
  }

  .public-page .number {
    min-height: 48px;
  }

  .public-page .last-number-card {
    min-height: 250px;
  }
}


/* ===== V8 - ANIMATIONS BINGO ===== */
.bingo-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  place-items: center;
  padding: 24px;
  backdrop-filter: blur(8px);
}

.bingo-overlay.show {
  display: grid;
  animation: bingoFadeIn .22s ease-out;
}

.bingo-overlay.checking {
  background:
    radial-gradient(circle at center, rgba(255,212,0,.22), transparent 42%),
    rgba(2,58,32,.90);
}

.bingo-overlay.valid {
  background:
    radial-gradient(circle at center, rgba(255,233,90,.35), transparent 38%),
    linear-gradient(135deg, rgba(2,58,32,.96), rgba(8,115,63,.96));
}

.bingo-overlay.rejected {
  background:
    radial-gradient(circle at center, rgba(255,255,255,.10), transparent 40%),
    rgba(95,18,18,.93);
}

.bingo-overlay-card {
  width: min(1000px, 92vw);
  min-height: 460px;
  border-radius: 42px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  padding: 42px;
  border: 10px solid var(--yellow);
  box-shadow: 0 28px 70px rgba(0,0,0,.45);
  background:
    linear-gradient(145deg, rgba(255,249,214,.98), rgba(255,230,75,.98));
  animation: bingoPop .34s cubic-bezier(.2,.9,.2,1.15);
}

.bingo-overlay.valid .bingo-overlay-card {
  animation: bingoCelebrate .55s cubic-bezier(.2,.9,.2,1.2);
}

.bingo-overlay.rejected .bingo-overlay-card {
  border-color: #fff;
  background: linear-gradient(145deg, #fff7f5, #ffd7d2);
  animation: bingoShake .45s ease-in-out;
}

.bingo-overlay-icon {
  font-size: clamp(70px, 9vw, 130px);
  line-height: 1;
  margin-bottom: 8px;
}

.bingo-overlay-title {
  font-size: clamp(78px, 12vw, 170px);
  line-height: .88;
  font-weight: 1000;
  letter-spacing: -.05em;
  color: var(--green-deep);
  text-transform: uppercase;
  text-shadow: 0 5px 0 rgba(255,255,255,.38);
}

.bingo-overlay.rejected .bingo-overlay-title {
  color: #8d1717;
  font-size: clamp(60px, 9vw, 125px);
}

.bingo-overlay-text {
  margin-top: 24px;
  font-size: clamp(24px, 3vw, 42px);
  font-weight: 900;
  color: var(--green-dark);
}

.bingo-overlay.rejected .bingo-overlay-text {
  color: #651313;
}

@keyframes bingoFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes bingoPop {
  0% { transform: scale(.72); opacity: 0; }
  70% { transform: scale(1.04); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes bingoCelebrate {
  0% { transform: scale(.6) rotate(-3deg); opacity: 0; }
  55% { transform: scale(1.08) rotate(2deg); opacity: 1; }
  80% { transform: scale(.98) rotate(-1deg); }
  100% { transform: scale(1) rotate(0); }
}

@keyframes bingoShake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-18px); }
  40% { transform: translateX(16px); }
  60% { transform: translateX(-10px); }
  80% { transform: translateX(8px); }
}

/* Admin controls */
.bingo-control-panel {
  border: 5px solid var(--green-deep);
  background: linear-gradient(145deg, #fff9d6, #ffe95a);
}

.bingo-button-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 12px;
}

.bingo-action {
  min-height: 74px;
  font-size: 18px;
  border: 3px solid rgba(0,0,0,.15);
  box-shadow: 0 6px 0 rgba(0,0,0,.15);
}

.bingo-check {
  background: var(--yellow);
  color: var(--green-deep);
}

.bingo-valid {
  background: #0b8a4e;
  color: white;
  border-color: #055c33;
}

.bingo-reject {
  background: #d9362b;
  color: white;
  border-color: #8f1f18;
}

.bingo-resume {
  background: #eef3ef;
  color: var(--green-deep);
  border-color: var(--green-dark);
}

@media (max-width: 780px) {
  .bingo-button-grid {
    grid-template-columns: 1fr 1fr;
  }

  .bingo-overlay-card {
    min-height: 360px;
    padding: 28px 18px;
  }
}


/* ===== V9 - BINGO ? SANS CACHER LA GRILLE ===== */
.bingo-overlay.checking {
  position: fixed;
  inset: 0;
  display: block;
  background: transparent;
  backdrop-filter: none;
  pointer-events: none;
  padding: 0;
}

.bingo-overlay.checking .bingo-overlay-card {
  width: min(860px, calc(100vw - 40px));
  min-height: 0;
  margin: 16px auto 0;
  padding: 14px 24px;
  border-radius: 22px;
  border: 5px solid var(--yellow);
  background: linear-gradient(135deg, rgba(2,58,32,.96), rgba(8,115,63,.96));
  box-shadow: 0 12px 30px rgba(0,0,0,.28);
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "icon title"
    "icon text";
  column-gap: 18px;
  row-gap: 2px;
  align-items: center;
  text-align: left;
  animation: bingoSlideDown .3s ease-out;
}

.bingo-overlay.checking .bingo-overlay-icon {
  grid-area: icon;
  font-size: 54px;
  margin: 0;
}

.bingo-overlay.checking .bingo-overlay-title {
  grid-area: title;
  font-size: clamp(36px, 5vw, 64px);
  color: var(--yellow);
  text-shadow: none;
  line-height: 1;
  letter-spacing: -.02em;
}

.bingo-overlay.checking .bingo-overlay-text {
  grid-area: text;
  margin: 0;
  font-size: clamp(16px, 2vw, 24px);
  color: white;
  font-weight: 800;
}

.bingo-overlay.valid,
.bingo-overlay.rejected {
  position: fixed;
  inset: 0;
}

@keyframes bingoSlideDown {
  from { transform: translateY(-28px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 760px) {
  .bingo-overlay.checking .bingo-overlay-card {
    width: calc(100vw - 16px);
    margin-top: 8px;
    padding: 10px 14px;
    border-width: 4px;
    grid-template-columns: 46px 1fr;
    column-gap: 10px;
  }

  .bingo-overlay.checking .bingo-overlay-icon {
    font-size: 40px;
  }

  .bingo-overlay.checking .bingo-overlay-title {
    font-size: 32px;
  }

  .bingo-overlay.checking .bingo-overlay-text {
    font-size: 14px;
  }
}


/* ===== V10 - ÉCRAN D'ENTRÉE + NEWSLETTER FACULTATIVE ===== */
.entry-gate {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 25% 15%, rgba(255,212,0,.35), transparent 30%),
    linear-gradient(135deg, rgba(2,58,32,.98), rgba(8,115,63,.98));
  overflow-y: auto;
}

.entry-card {
  width: min(640px, 100%);
  background: linear-gradient(145deg, #fff9d6, #ffe95a);
  border: 7px solid var(--green-deep);
  border-radius: 34px;
  box-shadow: 0 28px 70px rgba(0,0,0,.4);
  padding: 26px;
  text-align: center;
}

.entry-logo {
  width: 150px;
  height: 150px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.2));
}

.entry-kicker {
  display: inline-block;
  margin-top: 8px;
  background: var(--green-deep);
  color: var(--yellow);
  padding: 7px 12px;
  border-radius: 999px;
  font-weight: 1000;
  letter-spacing: .12em;
  font-size: 13px;
}

.entry-card h1 {
  margin: 14px 0 8px;
  color: var(--green-deep);
  font-size: clamp(32px, 6vw, 52px);
  line-height: 1;
}

.entry-intro {
  color: #284d34;
  font-weight: 700;
  margin-bottom: 20px;
}

.entry-label {
  display: block;
  text-align: left;
  font-weight: 900;
  color: var(--green-deep);
  margin: 10px 2px 6px;
}

.entry-input {
  width: 100%;
  padding: 14px 15px;
  border-radius: 14px;
  border: 3px solid rgba(2,58,32,.25);
  background: white;
  font-size: 17px;
  outline: none;
  margin-bottom: 10px;
}

.entry-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(8,115,63,.12);
}

.newsletter-check {
  margin: 14px 0 6px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  background: rgba(255,255,255,.5);
  border: 2px solid rgba(2,58,32,.14);
  border-radius: 14px;
  padding: 12px;
  font-weight: 800;
  color: var(--green-deep);
}

.newsletter-check input {
  margin-top: 3px;
  transform: scale(1.25);
}

.newsletter-fields {
  margin-top: 10px;
  background: rgba(255,255,255,.45);
  border-radius: 16px;
  padding: 12px;
}

.newsletter-help,
.consent-note {
  margin: 0 0 10px;
  color: #395c44;
  text-align: left;
  font-size: 13px;
}

.entry-button {
  width: 100%;
  margin-top: 12px;
  min-height: 58px;
  background: linear-gradient(180deg, #0a8b4e, var(--green-dark));
  color: white;
  border: 3px solid var(--yellow);
  box-shadow: 0 7px 0 var(--green-deep);
  font-size: 18px;
}

.entry-message {
  min-height: 24px;
  margin-top: 12px;
  font-weight: 800;
}

.entry-message.error { color: #a41f18; }
.entry-message.success { color: var(--green-dark); }








@media (max-width: 640px) {
  .entry-card {
    padding: 20px 16px;
    border-width: 5px;
    border-radius: 26px;
  }

  .entry-logo {
    width: 118px;
    height: 118px;
  }

}


/* ===== V12 - PAGE CONTACTS SÉPARÉE ===== */
.subscriber-stats {
  display: grid;
  grid-template-columns: minmax(0, 240px);
  gap: 12px;
}

.subscriber-stat {
  background: rgba(255,255,255,.58);
  border: 2px solid rgba(8,115,63,.18);
  border-radius: 16px;
  padding: 14px;
}

.subscriber-stat b {
  display: block;
  font-size: 32px;
  color: var(--green-deep);
}

.subscriber-stat span {
  color: var(--muted);
  font-size: 13px;
}

.subscriber-list {
  display: grid;
  gap: 8px;
  max-height: 70vh;
  overflow-y: auto;
}

.subscriber-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(8,115,63,.16);
  border-radius: 12px;
  padding: 12px 14px;
  text-align: left;
}

.subscriber-row span {
  color: var(--muted);
  word-break: break-word;
  text-align: right;
}

@media (max-width: 640px) {
  .subscriber-row {
    flex-direction: column;
    gap: 6px;
  }

  .subscriber-row span {
    text-align: left;
  }
}


/* ===== V13 - ADMIN PAR ONGLETS ===== */
.admin-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 10px;
  margin-bottom: 16px;
  position: sticky;
  top: 10px;
  z-index: 30;
}

.admin-tab {
  min-height: 58px;
  background: rgba(255,249,214,.94);
  color: var(--green-deep);
  border: 3px solid var(--yellow);
  box-shadow: 0 6px 0 rgba(2,58,32,.28);
  font-size: 17px;
}

.admin-tab.active {
  background: linear-gradient(180deg, #0a8b4e, var(--green-dark));
  color: white;
  border-color: var(--yellow);
  transform: translateY(2px);
  box-shadow: 0 4px 0 rgba(2,58,32,.4);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: adminTabIn .18s ease-out;
}

@keyframes adminTabIn {
  from { opacity: .4; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 760px) {
  .admin-tabs {
    grid-template-columns: 1fr 1fr;
    position: static;
  }

  .admin-tab {
    min-height: 52px;
    font-size: 15px;
  }
}


/* ===== V14 - ETAPE INFOS + PASSER CETTE ETAPE ===== */
.consent-note-box {
  margin: 4px 0 12px;
  background: rgba(255,255,255,.52);
  border: 2px solid rgba(2,58,32,.12);
  border-radius: 14px;
  padding: 10px 12px;
  text-align: left;
}

.entry-skip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 10px;
  min-height: 44px;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--green-dark);
  text-decoration: underline;
  font-size: 14px;
  font-weight: 800;
  opacity: .86;
}

.entry-skip:hover {
  opacity: 1;
  transform: none;
}

.entry-skip:disabled {
  opacity: .5;
}


/* ===== V15 - ROULETTE DE DÉPARTAGE ===== */
.admin-tabs {
  grid-template-columns: repeat(5, minmax(0,1fr));
}

.roulette-admin-panel {
  border: 5px solid var(--yellow);
  background: linear-gradient(145deg, rgba(255,249,214,.98), rgba(255,233,90,.98));
}

.roulette-names-input {
  width: 100%;
  min-height: 190px;
  resize: vertical;
  border: 3px solid var(--green-dark);
  border-radius: 16px;
  padding: 14px;
  font: inherit;
  font-size: 18px;
  line-height: 1.5;
  background: white;
  color: var(--green-deep);
}

.roulette-spin-btn {
  font-size: 18px;
  min-height: 56px;
}

.roulette-admin-winner {
  border: 3px solid var(--yellow);
  background: var(--green-deep);
  color: white;
  border-radius: 16px;
  padding: 16px;
  font-size: 20px;
}

.roulette-admin-winner strong {
  color: var(--yellow);
  margin-left: 8px;
  font-size: 28px;
}

.roulette-overlay {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: none;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at center, rgba(255,212,0,.18), transparent 40%),
    rgba(2,58,32,.96);
  backdrop-filter: blur(7px);
}

.roulette-overlay.show {
  display: grid;
}

.roulette-stage {
  width: min(1100px, 96vw);
  min-height: min(900px, 94vh);
  border: 8px solid var(--yellow);
  border-radius: 34px;
  background:
    radial-gradient(circle at 50% 35%, rgba(255,255,255,.11), transparent 34%),
    linear-gradient(145deg, var(--green-deep), var(--green));
  box-shadow: 0 28px 70px rgba(0,0,0,.46);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
  overflow: hidden;
  position: relative;
}

.roulette-title {
  color: var(--yellow);
  font-weight: 1000;
  font-size: clamp(24px, 3.2vw, 48px);
  text-align: center;
  letter-spacing: .03em;
  text-shadow: 0 3px 0 rgba(0,0,0,.25);
}

.roulette-wheel-wrap {
  width: min(560px, 72vw);
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-items: center;
}

.roulette-wheel {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 12px solid #fff9d6;
  box-shadow:
    0 0 0 8px var(--yellow),
    0 20px 45px rgba(0,0,0,.36),
    inset 0 0 0 5px rgba(255,255,255,.22);
  transform: rotate(0deg);
}

.roulette-wheel::after {
  content: "";
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,.55);
}

.roulette-center {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--green-deep);
  border: 7px solid white;
  display: grid;
  place-items: center;
  font-weight: 1000;
  font-size: 28px;
  z-index: 4;
  box-shadow: 0 8px 20px rgba(0,0,0,.28);
}

.roulette-pointer {
  position: absolute;
  z-index: 6;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 28px solid transparent;
  border-right: 28px solid transparent;
  border-top: 0;
  border-bottom: 58px solid white;
  filter: drop-shadow(0 4px 4px rgba(0,0,0,.35));
}

.roulette-names-public {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 900px;
}

.roulette-name-chip {
  background: rgba(255,255,255,.92);
  color: var(--green-deep);
  border: 2px solid var(--yellow);
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 900;
  font-size: 15px;
}

.roulette-winner-box {
  display: none;
  text-align: center;
  background: linear-gradient(145deg, var(--yellow-bright), var(--yellow));
  border: 7px solid white;
  border-radius: 28px;
  padding: 18px 28px;
  box-shadow: 0 18px 45px rgba(0,0,0,.35);
  animation: rouletteWinnerPop .55s cubic-bezier(.2,.9,.2,1.2);
}

.roulette-winner-box.show {
  display: block;
}

.roulette-winner-kicker {
  color: var(--green-deep);
  font-weight: 1000;
  font-size: clamp(18px, 2vw, 28px);
}

.roulette-winner-name {
  color: var(--green-deep);
  font-weight: 1000;
  font-size: clamp(54px, 8vw, 110px);
  line-height: .95;
  margin-top: 6px;
  text-transform: uppercase;
  text-shadow: 0 3px 0 rgba(255,255,255,.5);
}

.roulette-overlay.winner .roulette-stage::before,
.roulette-overlay.winner .roulette-stage::after {
  content: "🎉  ⭐  🎊  ⭐  🎉  ⭐  🎊";
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  font-size: clamp(28px, 5vw, 58px);
  animation: rouletteConfetti 1.1s ease-in-out infinite alternate;
}

.roulette-overlay.winner .roulette-stage::before { top: 12px; }
.roulette-overlay.winner .roulette-stage::after { bottom: 12px; }

@keyframes rouletteWinnerPop {
  0% { transform: scale(.55); opacity: 0; }
  65% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes rouletteConfetti {
  from { transform: translateY(-5px) scale(.96); }
  to { transform: translateY(6px) scale(1.05); }
}

@media (max-width: 900px) {
  .admin-tabs {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }

  .roulette-stage {
    min-height: 92vh;
    padding: 18px 12px;
  }

  .roulette-wheel-wrap {
    width: min(480px, 82vw);
  }

  .roulette-center {
    width: 72px;
    height: 72px;
    font-size: 22px;
  }
}


/* ===== V16 - ROULETTE AMÉLIORÉE ===== */
.roulette-wheel-wrap {
  overflow: visible;
}

.roulette-wheel {
  overflow: hidden;
}

.roulette-wheel-labels {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.roulette-wheel-label {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 38%;
  transform-origin: center center;
  text-align: center;
  font-weight: 1000;
  font-size: clamp(12px, 1.55vw, 22px);
  line-height: 1.05;
  color: #10311f;
  text-shadow:
    0 1px 0 rgba(255,255,255,.85),
    0 0 10px rgba(255,255,255,.45);
  padding: 2px 4px;
  word-break: break-word;
}

.roulette-wheel::before {
  content: "";
  position: absolute;
  inset: 5.5%;
  border-radius: 50%;
  border: 5px solid rgba(255,255,255,.55);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.28);
}

.roulette-name-chip {
  background: rgba(255,255,255,.95);
  color: var(--green-deep);
  border: 2px solid var(--yellow);
  box-shadow: 0 4px 12px rgba(0,0,0,.14);
}

@media (max-width: 900px) {
  .roulette-wheel-label {
    width: 40%;
    font-size: clamp(10px, 2.5vw, 16px);
  }
}


/* ===== V17 - NOMS À L'INTÉRIEUR DES PARTS ===== */
.roulette-wheel-wrap {
  --roulette-label-radius: clamp(120px, 20vw, 190px);
}

.roulette-wheel-labels {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  border-radius: 50%;
  transform: rotate(0deg);
  transform-origin: 50% 50%;
}

.roulette-wheel-label {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 30%;
  min-width: 84px;
  max-width: 180px;
  transform:
    translate(-50%, -50%)
    rotate(var(--slice-angle))
    translateY(calc(-1 * var(--roulette-label-radius)))
    rotate(calc(-1 * var(--slice-angle)));
  transform-origin: center;
  text-align: center;
  font-weight: 1000;
  font-size: clamp(13px, 1.7vw, 23px);
  line-height: 1;
  color: #082d1a;
  background: rgba(255,255,255,.90);
  border: 2px solid rgba(2,58,32,.28);
  border-radius: 999px;
  padding: 7px 9px;
  box-shadow: 0 3px 10px rgba(0,0,0,.20);
  text-shadow: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roulette-names-public {
  display: none !important;
}

.roulette-wheel {
  border: 12px solid #fff9d6;
  box-shadow:
    0 0 0 8px var(--yellow),
    0 20px 45px rgba(0,0,0,.36),
    inset 0 0 0 5px rgba(255,255,255,.22);
}

@media (max-width: 900px) {
  .roulette-wheel-wrap {
    --roulette-label-radius: clamp(105px, 29vw, 160px);
  }

  .roulette-wheel-label {
    width: 32%;
    min-width: 70px;
    font-size: clamp(10px, 3vw, 16px);
    padding: 5px 7px;
  }
}


/* ===== V18 - MUSIQUES BINGO ===== */
.enable-sound-btn {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 12500;
  min-height: 48px;
  padding: 10px 16px;
  border: 3px solid var(--yellow);
  border-radius: 999px;
  background: var(--green-deep);
  color: white;
  font-weight: 900;
  box-shadow: 0 8px 22px rgba(0,0,0,.28);
}

.enable-sound-btn.enabled {
  background: #0a8b4e;
}

.enable-sound-btn.enabled.compact {
  font-size: 0;
  width: 52px;
  height: 52px;
  padding: 0;
}

.enable-sound-btn.enabled.compact::after {
  content: "🔊";
  font-size: 22px;
}

@media (max-width: 640px) {
  .enable-sound-btn {
    right: 8px;
    bottom: 8px;
    min-height: 42px;
    padding: 8px 12px;
    font-size: 13px;
  }
}


/* ===== V19 - DÉBLOCAGE AUDIO PC ===== */
.sound-help {
  position: fixed;
  right: 16px;
  bottom: 76px;
  z-index: 12499;
  width: min(320px, calc(100vw - 32px));
  background: rgba(2,58,32,.95);
  color: white;
  border: 2px solid var(--yellow);
  border-radius: 14px;
  padding: 9px 11px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 7px 20px rgba(0,0,0,.22);
}

.enable-sound-btn.enabled + .sound-help {
  display: none;
}

@media (max-width: 640px) {
  .sound-help {
    right: 8px;
    bottom: 60px;
    width: min(290px, calc(100vw - 16px));
  }
}


/* ===== V20 - FEEDBACK ANONYME ===== */
.admin-tabs{grid-template-columns:repeat(6,minmax(0,1fr));}
.feedback-open-btn{position:fixed;left:16px;bottom:16px;z-index:12400;min-height:48px;padding:10px 16px;border:3px solid var(--yellow);border-radius:999px;background:var(--green-deep);color:white;font-weight:900;box-shadow:0 8px 22px rgba(0,0,0,.28);}
.feedback-open-btn.feedback-sent{background:#0a8b4e;}
.feedback-modal{position:fixed;inset:0;z-index:14000;display:grid;place-items:center;padding:18px;}
.feedback-backdrop{position:absolute;inset:0;background:rgba(2,58,32,.76);backdrop-filter:blur(6px);}
.feedback-card{position:relative;z-index:2;width:min(620px,96vw);max-height:92vh;overflow-y:auto;background:linear-gradient(145deg,#fff9d6,#ffe95a);border:7px solid var(--green-deep);border-radius:30px;box-shadow:0 28px 70px rgba(0,0,0,.42);padding:26px;}
.feedback-close-btn{position:absolute;right:14px;top:10px;width:42px;height:42px;border-radius:50%;background:var(--green-deep);color:white;font-size:26px;line-height:1;}
.feedback-kicker{display:inline-block;background:var(--green-deep);color:var(--yellow);border-radius:999px;padding:7px 11px;font-weight:1000;letter-spacing:.11em;font-size:12px;}
.feedback-card h2{margin:14px 48px 8px 0;color:var(--green-deep);font-size:clamp(28px,5vw,42px);line-height:1;}
.feedback-intro{color:#355d43;font-weight:700;line-height:1.4;}
.feedback-rating-label,.feedback-label{display:block;margin-top:18px;margin-bottom:7px;color:var(--green-deep);font-weight:1000;}
.feedback-stars{display:flex;gap:7px;}
.feedback-stars button{background:transparent;color:rgba(2,58,32,.24);border:0;box-shadow:none;padding:0;font-size:clamp(38px,8vw,56px);line-height:1;}
.feedback-stars button.selected{color:#e5ac00;text-shadow:0 2px 0 white;}
.feedback-textarea{width:100%;resize:vertical;border:3px solid rgba(2,58,32,.28);border-radius:15px;padding:13px;font:inherit;font-size:16px;background:white;color:var(--green-deep);}
.feedback-send-btn{width:100%;min-height:54px;margin-top:14px;background:linear-gradient(180deg,#0a8b4e,var(--green-dark));color:white;border:3px solid var(--yellow);box-shadow:0 6px 0 var(--green-deep);font-size:17px;}
.feedback-status{min-height:23px;margin-top:10px;font-weight:800}.feedback-status.error{color:#a41f18}.feedback-status.success{color:var(--green-dark)}body.modal-open{overflow:hidden;}
.feedback-admin-stats{display:grid;grid-template-columns:repeat(2,minmax(0,220px));gap:12px}.feedback-admin-stat{background:rgba(255,255,255,.64);border:2px solid rgba(8,115,63,.18);border-radius:16px;padding:14px}.feedback-admin-stat b{display:block;color:var(--green-deep);font-size:32px}.feedback-admin-stat span{color:var(--muted);font-size:13px}.feedback-admin-list{display:grid;gap:10px;max-height:68vh;overflow-y:auto}.feedback-admin-row{background:rgba(255,255,255,.76);border:2px solid rgba(8,115,63,.16);border-radius:14px;padding:13px 14px}.feedback-admin-row-top{display:flex;align-items:center;justify-content:space-between;gap:12px}.feedback-admin-stars{color:#dca800;font-size:22px;letter-spacing:1px}.feedback-admin-date{color:var(--muted);font-size:12px}.feedback-admin-message-text{margin-top:8px;white-space:pre-wrap;line-height:1.45;color:var(--green-deep)}
@media(max-width:900px){.admin-tabs{grid-template-columns:repeat(2,minmax(0,1fr));}}@media(max-width:640px){.feedback-open-btn{left:8px;bottom:8px;min-height:42px;padding:8px 12px;font-size:13px}.feedback-card{padding:20px 16px;border-width:5px}.feedback-admin-row-top{align-items:flex-start;flex-direction:column;gap:4px}}


/* ===== V21 - MODE PC / ÉCRAN GÉANT ===== */
.projection-controls {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 13000;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px;
  border: 2px solid rgba(255,212,0,.9);
  border-radius: 16px;
  background: rgba(2,58,32,.93);
  box-shadow: 0 8px 25px rgba(0,0,0,.24);
  backdrop-filter: blur(8px);
}

.projection-controls button {
  min-height: 38px;
  padding: 7px 11px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.10);
  color: white;
  font-weight: 900;
  box-shadow: none;
}

.projection-controls button.active {
  background: var(--yellow);
  color: var(--green-deep);
}

.controls-hide-btn {
  width: 34px;
  padding: 0 !important;
  font-size: 20px;
}

.show-projection-controls {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 13000;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--yellow);
  background: var(--green-deep);
  color: white;
  box-shadow: 0 7px 20px rgba(0,0,0,.3);
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 86px;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.09);
  color: white;
  font-weight: 1000;
  font-size: 12px;
}

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffbd2e;
  box-shadow: 0 0 0 4px rgba(255,189,46,.16);
}

.live-pill.ok .live-dot {
  background: #42e38c;
  box-shadow: 0 0 0 4px rgba(66,227,140,.15);
  animation: livePulse 1.5s ease-in-out infinite;
}

.live-pill.bad .live-dot {
  background: #ff5e55;
  box-shadow: 0 0 0 4px rgba(255,94,85,.15);
}

@keyframes livePulse {
  50% { transform: scale(1.3); }
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 5px;
  color: white;
  font-weight: 900;
  font-size: 12px;
}

.volume-control input {
  width: 86px;
  accent-color: var(--yellow);
}

/* Projection: pensée pour TV / vidéoprojecteur 16:9 */
body.projector-mode {
  min-height: 100vh;
  overflow: hidden;
  background: #043a22;
}

body.projector-mode .entry-gate,
body.projector-mode .club-hero,
body.projector-mode .winners-card,
body.projector-mode .footer,
body.projector-mode .feedback-open-btn,
body.projector-mode .sound-help {
  display: none !important;
}

body.projector-mode .topbar {
  height: 7vh;
  min-height: 56px;
  padding: 6px 18px;
  border-bottom: 3px solid var(--yellow);
}

body.projector-mode .topbar .brand .logo {
  width: 45px;
  height: 45px;
}

body.projector-mode .topbar h1 {
  font-size: clamp(18px, 2vw, 28px);
}

body.projector-mode .topbar small,
body.projector-mode #connectionStatus {
  display: none;
}

body.projector-mode .container {
  width: 100%;
  max-width: none;
  height: calc(93vh - 4px);
  margin: 0;
  padding: 10px 12px 12px;
  display: grid;
  grid-template-columns: minmax(245px, 24vw) 1fr;
  grid-template-rows: 1fr;
  grid-template-areas: "hero grid";
  gap: 12px;
}

body.projector-mode .winner-banner {
  position: fixed;
  z-index: 10020;
  left: 50%;
  top: 9vh;
  transform: translateX(-50%);
  width: min(900px, 88vw);
}

body.projector-mode .hero {
  grid-area: hero;
  display: block;
  min-width: 0;
  margin: 0;
}

body.projector-mode .hero > .card:nth-child(2) {
  display: none;
}

body.projector-mode .last-number-card {
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 14px;
  border: 5px solid var(--yellow);
  display: flex;
  align-items: center;
  justify-content: center;
}

body.projector-mode .last-number-card .kicker {
  font-size: clamp(18px, 1.7vw, 30px);
  text-align: center;
}

body.projector-mode .last-number {
  font-size: clamp(150px, 19vw, 330px);
  line-height: .9;
  text-align: center;
  margin-top: 2vh;
}

body.projector-mode .grid-card {
  grid-area: grid;
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: 8px;
  margin: 0;
  border-width: 4px;
  display: flex;
}

body.projector-mode .number-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(9, 1fr);
  gap: clamp(3px, .35vw, 8px);
  min-height: 0;
}

body.projector-mode .number {
  min-width: 0;
  min-height: 0;
  border-radius: clamp(6px, .7vw, 13px);
  font-size: clamp(22px, 3.2vw, 58px);
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-width: 2px;
}

body.projector-mode .number.called {
  transform: none;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.35);
}

body.projector-mode .number.latest {
  outline: 5px solid white;
  outline-offset: -5px;
  animation: projectorLatest 1.1s ease-in-out 3;
}

@keyframes projectorLatest {
  50% { transform: scale(.90); filter: brightness(1.18); }
}

body.projector-mode .enable-sound-btn {
  right: 12px;
  bottom: 12px;
}

body.projector-mode .projection-controls {
  opacity: .22;
  transition: opacity .2s ease;
}

body.projector-mode .projection-controls:hover {
  opacity: 1;
}

/* Admin : historique + écran géant */
.called-history-card h2 {
  margin-top: 0;
}

.called-history {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.called-history-empty {
  color: var(--muted);
}

.called-history-item {
  width: 52px;
  min-height: 54px;
  border: 2px solid rgba(8,115,63,.20);
  border-radius: 11px;
  background: white;
  display: grid;
  place-items: center;
  padding: 3px;
}

.called-history-item small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1;
}

.called-history-item b {
  color: var(--green-deep);
  font-size: 22px;
  line-height: 1;
}

.called-history-item.latest {
  border-color: var(--yellow);
  background: #fff8c8;
  box-shadow: 0 0 0 2px rgba(255,212,0,.18);
}

.screen-control-panel {
  border: 5px solid var(--yellow);
}

.screen-launch-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
}

.screen-big-btn {
  min-height: 78px;
  font-size: 17px;
}

.screen-shortcuts {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(8,115,63,.08);
  color: var(--green-deep);
}

.screen-shortcuts kbd {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  margin-right: 5px;
  padding: 0 7px;
  border: 1px solid rgba(0,0,0,.18);
  border-bottom-width: 3px;
  border-radius: 6px;
  background: white;
  font-weight: 1000;
}

.admin-tabs {
  grid-template-columns: repeat(7, minmax(0,1fr));
}

@media (max-width: 900px) {
  .projection-controls {
    max-width: calc(100vw - 20px);
    flex-wrap: wrap;
  }

  .volume-control {
    display: none;
  }

  .screen-launch-grid {
    grid-template-columns: 1fr;
  }

  .admin-tabs {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}

/* ===== V22 - OPTION REVIEW ADMIN ===== */
.review-toggle-card {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 2px solid rgba(8,115,63,.18);
  border-radius: 16px;
  background: rgba(255,255,255,.70);
}
.review-toggle-card strong { display:block; color:var(--green-deep); font-size:16px; }
.review-toggle-card span { display:block; margin-top:4px; color:#68766e; font-size:13px; }
.switch { position:relative; display:inline-block; width:58px; height:32px; flex:0 0 auto; }
.switch input { opacity:0; width:0; height:0; }
.slider { position:absolute; inset:0; cursor:pointer; background:#b8c2bc; border-radius:999px; transition:.2s; }
.slider::before { content:""; position:absolute; width:24px; height:24px; left:4px; top:4px; background:white; border-radius:50%; transition:.2s; box-shadow:0 2px 6px rgba(0,0,0,.22); }
.switch input:checked + .slider { background:var(--green); }
.switch input:checked + .slider::before { transform:translateX(26px); }
.feedback-open-btn.review-disabled { display:none !important; }

/* ===== V23 - MODE FEEDBACK EN GRAND ===== */
.feedback-mode-card {
  border-color: var(--yellow);
  background: linear-gradient(145deg, rgba(255,249,214,.95), rgba(255,233,90,.72));
}

.forced-feedback-active .feedback-modal {
  padding: 0;
}

.forced-feedback-active .feedback-backdrop {
  background:
    radial-gradient(circle at 50% 25%, rgba(255,212,0,.17), transparent 34%),
    rgba(2,58,32,.97);
  backdrop-filter: blur(9px);
}

.forced-feedback-active .feedback-card {
  width: min(760px, 94vw);
  max-height: 94vh;
  border-width: 8px;
  padding: clamp(22px, 4vw, 38px);
  box-shadow: 0 32px 90px rgba(0,0,0,.48);
}

.forced-feedback-active .feedback-card h2 {
  font-size: clamp(34px, 7vw, 60px);
  text-align: center;
  margin-right: 0;
}

.forced-feedback-active .feedback-intro {
  text-align: center;
  font-size: clamp(16px, 3.5vw, 22px);
}

.forced-feedback-active .feedback-kicker {
  display: block;
  width: max-content;
  margin: 0 auto;
}

.forced-feedback-active .feedback-stars {
  justify-content: center;
}

.forced-feedback-active .feedback-stars button {
  font-size: clamp(52px, 12vw, 84px);
}

.forced-feedback-active .feedback-rating-label,
.forced-feedback-active .feedback-label {
  text-align: center;
  font-size: 18px;
}

.forced-feedback-active .feedback-textarea {
  min-height: 150px;
  font-size: 18px;
}

.forced-feedback-active .feedback-send-btn {
  min-height: 64px;
  font-size: 20px;
}

.forced-feedback-active .feedback-close-btn {
  display: none;
}

.feedback-thanks-full {
  min-height: 68vh;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  color: var(--green-deep);
}

.feedback-thanks-icon {
  font-size: clamp(70px, 18vw, 130px);
}

.feedback-thanks-full h2 {
  margin: 12px 0 6px;
}

.feedback-thanks-full p {
  font-size: 20px;
  font-weight: 800;
}


/* ===== V24 - MODE FEEDBACK CORRIGÉ ===== */
.feedback-mode-card {
  border: 3px solid var(--yellow);
  background: linear-gradient(145deg, #fff9d6, #ffe95a);
}

body.forced-feedback-active .feedback-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 50000 !important;
  display: grid !important;
  place-items: center !important;
  background: rgba(2,58,32,.97);
}

body.forced-feedback-active .feedback-close-btn {
  display: none !important;
}

@media (max-width: 900px) {
  body.forced-feedback-active .feedback-modal {
    width: 100vw !important;
    height: 100dvh !important;
    padding: 0 !important;
  }

  body.forced-feedback-active .feedback-card {
    width: 100vw !important;
    min-height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    padding: 28px 20px !important;
    overflow-y: auto !important;
  }

  body.forced-feedback-active .feedback-card h2 {
    font-size: clamp(34px, 8vw, 54px) !important;
    text-align: center;
  }

  body.forced-feedback-active .feedback-intro,
  body.forced-feedback-active .feedback-rating-label,
  body.forced-feedback-active .feedback-label {
    text-align: center;
  }

  body.forced-feedback-active .feedback-stars {
    justify-content: center;
  }

  body.forced-feedback-active .feedback-stars button {
    font-size: clamp(54px, 13vw, 82px) !important;
  }

  body.forced-feedback-active .feedback-textarea {
    min-height: 150px;
    font-size: 18px;
  }

  body.forced-feedback-active .feedback-send-btn {
    min-height: 62px;
    font-size: 19px;
  }
}
