/* ===========================================
   style.css — Charte SAFTI Défi CDM 2026
   =========================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* === Garet (polices officielles SAFTI) === */
@font-face { font-family:'Garet'; src:url('../fonts/garet-book.otf') format('opentype'); font-weight:400; font-style:normal; }
@font-face { font-family:'Garet'; src:url('../fonts/garet-regular.otf') format('opentype'); font-weight:500; font-style:normal; }
@font-face { font-family:'Garet'; src:url('../fonts/garet-medium.otf') format('opentype'); font-weight:600; font-style:normal; }
@font-face { font-family:'Garet'; src:url('../fonts/garet-black.otf') format('opentype'); font-weight:900; font-style:normal; }
@font-face { font-family:'Garet'; src:url('../fonts/garet-blackitalic.otf') format('opentype'); font-weight:900; font-style:italic; }
@font-face { font-family:'Garet'; src:url('../fonts/garet-bolditalic.otf') format('opentype'); font-weight:700; font-style:italic; }
@font-face { font-family:'Garet'; src:url('../fonts/garet-regularitalic.otf') format('opentype'); font-weight:500; font-style:italic; }

/* === Variables & Reset === */
:root {
  --orange:      #EC6525;
  --orange-dk:   #B2391A;
  --orange-dark: #B2391A;   /* alias utilisé dans admin */
  --petrol:      #06464B;
  --outremer:    #0C727A;
  --sable:       #D0A880;
  --lin:         #DACABE;
  --cotton:      #F9F5F3;
  --night:       #1D1B1B;
  --grey:        #494343;
  --border:      #DACABE;
  --radius-sm:   10px;
  --radius-md:   14px;
  --radius-lg:   20px;
  --font:        'Inter', sans-serif;
  --font-title:  'Garet', 'Inter', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--cotton);
  color: var(--night);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 480px;
  margin: 0 auto;
}

/* === HEADER === */
.site-header {
  background: var(--petrol);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-logo {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.header-logo svg {
  width: 46px;
  height: 46px;
}

.header-titles {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.header-brand {
  color: #fff;
  font-family: var(--font-title);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: .3px;
}

.header-sub {
  color: var(--orange);
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.header-sub2 {
  color: rgba(255,255,255,0.70);
  font-family: var(--font);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: .2px;
}

/* header-page-tag supprimé (non affiché) */
.header-page-tag { display: none; }

/* === HERO === */
.hero {
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.hero-orange { background: var(--orange); }
.hero-petrol  { background: var(--petrol); }

.hero-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 4px;
}


.hero-title {
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
}

.hero-sub {
  color: rgba(255,255,255,0.82);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .3px;
}

/* === STAT CARDS === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 14px 14px 0;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  text-align: center;
}

.stat-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--orange);
  line-height: 1.1;
}

.stat-label {
  font-size: 8px;
  font-weight: 600;
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-top: 3px;
}

/* === FORM === */
.form-body {
  padding: 16px 14px 100px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-row {
  display: flex;
  gap: 8px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.form-group.w-60  { flex: 0 0 60px; }
.form-group.w-80  { flex: 0 0 80px; }
.form-group.w-full { flex: 1 1 100%; }

.form-label {
  font-size: 9px;
  font-weight: 600;
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.form-input {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 7px;
  height: 34px;
  padding: 0 10px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--night);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}

.form-input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(236,101,37,.12);
}

.form-input.error {
  border-color: #E53E3E;
  box-shadow: 0 0 0 3px rgba(229,62,62,.1);
}

.form-input::placeholder { color: #C4B5A8; }

/* Toggle client */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 9px 12px;
}

.toggle-label-text {
  font-size: 12px;
  font-weight: 500;
  color: var(--night);
}

.toggle-switch {
  position: relative;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-track {
  position: absolute;
  inset: 0;
  background: #DACABE;
  border-radius: 11px;
  cursor: pointer;
  transition: background .2s;
}

.toggle-track::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
}

.toggle-switch input:checked + .toggle-track { background: var(--orange); }
.toggle-switch input:checked + .toggle-track::before { transform: translateX(16px); }

/* RGPD checkbox */
.rgpd-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 10px 12px;
}

.rgpd-row input[type=checkbox] {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  accent-color: var(--orange);
  flex-shrink: 0;
  cursor: pointer;
}

.rgpd-text {
  font-size: 11px;
  color: var(--grey);
  line-height: 1.5;
}

.rgpd-text a { color: var(--orange); text-decoration: none; }

/* Error message */
.error-msg {
  font-size: 10px;
  color: #E53E3E;
  font-weight: 500;
  margin-top: 2px;
}

/* === SUBMIT BUTTON === */
.btn-submit {
  background: var(--orange);
  color: #fff;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 800;
  border: none;
  border-radius: var(--radius-md);
  height: 46px;
  width: 100%;
  cursor: pointer;
  letter-spacing: .2px;
  transition: background .15s, transform .1s;
  margin-top: 4px;
}

.btn-submit:hover  { background: var(--orange-dk); }
.btn-submit:active { transform: scale(.98); }
.btn-submit:disabled { opacity: .6; cursor: not-allowed; }

/* === CONFIRMATION === */
.confirm-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  margin: 20px 14px;
}

.confirm-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.confirm-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--night);
  margin-bottom: 8px;
}

.confirm-sub {
  font-size: 12px;
  color: var(--grey);
  line-height: 1.6;
}

/* === BOTTOM NAV === */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 200;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 2px;
  text-decoration: none;
  color: #B0A8A3;
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .3px;
  gap: 3px;
  transition: color .15s;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font);
}

.nav-item svg { width: 18px; height: 18px; }

.nav-item.active,
.nav-item:hover {
  color: var(--orange);
}

.nav-item.active svg path,
.nav-item.active svg circle,
.nav-item.active svg rect,
.nav-item.active svg polyline { stroke: var(--orange); }

/* === CLASSEMENT === */
.ranking-body {
  padding: 14px 14px max(100px, calc(70px + env(safe-area-inset-bottom, 0px)));
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Podium */
.podium-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr;
  gap: 6px;
  padding: 14px 14px 0;
}

.podium-card {
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
  border: 2px solid;
  position: relative;
}

.podium-card.rank-1 { background: #FFF8E7; border-color: #F5C842; }
.podium-card.rank-2 { background: #F5F5F5; border-color: #C0C0C0; }
.podium-card.rank-3 { background: #FDF0E8; border-color: #CD7F32; }

.podium-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  margin: 0 auto 6px;
}

.rank-1 .podium-badge { background: #F5C842; color: #7A5500; }
.rank-2 .podium-badge { background: #C0C0C0; color: #4A4A4A; }
.rank-3 .podium-badge { background: #CD7F32; color: #5A3000; }

.podium-avatar {
  width: 36px;
  height: 36px;
  background: var(--orange);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin: 0 auto 6px;
}

.podium-name {
  font-size: 10px;
  font-weight: 700;
  color: var(--night);
  word-break: break-word;
  line-height: 1.2;
}

.podium-score {
  font-size: 14px;
  font-weight: 800;
  color: var(--orange);
  margin-top: 4px;
}

.podium-pts {
  font-size: 8px;
  color: var(--grey);
  font-weight: 500;
}

/* Rank list */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rank-item {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  gap: 10px;
}

.rank-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--grey);
  min-width: 24px;
  text-align: center;
}

.rank-avatar {
  width: 30px;
  height: 30px;
  background: var(--orange);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.rank-name {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
  color: var(--night);
}

.rank-score {
  font-size: 14px;
  font-weight: 800;
  color: var(--orange);
}

.rank-pts {
  font-size: 9px;
  color: var(--grey);
  font-weight: 500;
}

.winner-badge {
  font-size: 9px;
  background: #E8F4EE;
  color: #1A6B35;
  border-radius: 4px;
  padding: 2px 6px;
  font-weight: 600;
}

.last-update {
  text-align: center;
  font-size: 10px;
  color: var(--grey);
  padding: 8px 0 4px;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--grey);
}

.empty-state p { font-size: 13px; margin-top: 8px; }

/* === ADMIN === */
.admin-header {
  background: var(--petrol);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-header-titles { display: flex; flex-direction: column; gap: 2px; }
.admin-title { color: #fff; font-size: 13px; font-weight: 800; }
.admin-sub   { color: rgba(255,255,255,.6); font-size: 9px; font-weight: 500; }

.logout-btn {
  background: rgba(255,255,255,.15);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: background .15s;
}
.logout-btn:hover { background: rgba(255,255,255,.25); }

/* Admin tabs */
.admin-tabs {
  background: #023B3F;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 2px solid rgba(255,255,255,.10);
}
.admin-tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  flex: 1;
  min-width: 80px;
  padding: 12px 8px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,.55);
  font-family: var(--font);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}

.tab-btn.active {
  color: var(--orange);
  border-bottom-color: var(--orange);
}

.tab-pane { display: none; padding: 16px 14px 100px; }
.tab-pane.active { display: block; }

/* Search bar */
.search-bar {
  position: relative;
  margin-bottom: 14px;
}

.search-input {
  width: 100%;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  height: 38px;
  padding: 0 12px 0 38px;
  font-family: var(--font);
  font-size: 13px;
  outline: none;
  transition: border-color .15s;
}

.search-input:focus { border-color: var(--orange); }
.search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: #B0A8A3;
  pointer-events: none;
}

/* Player card */
.player-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: border-color .15s;
  margin-bottom: 6px;
}

.player-card:hover { border-color: var(--orange); }

.player-avatar {
  width: 36px;
  height: 36px;
  background: var(--orange);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.player-info { flex: 1; }
.player-name  { font-size: 13px; font-weight: 700; color: var(--night); }
.player-meta  { font-size: 10px; color: var(--grey); margin-top: 1px; }

.badge-scored    { font-size: 9px; background: #E8F4EE; color:#1A6B35; border-radius:4px; padding:2px 6px; font-weight:600; }
.badge-unscored  { font-size: 9px; background: #FFF3EE; color:var(--orange); border-radius:4px; padding:2px 6px; font-weight:600; }

/* Score entry */
.score-entry { display: none; }
.score-entry.active { display: block; }

.score-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.score-title  { font-size: 14px; font-weight: 700; color: var(--night); }
.score-total  { font-size: 20px; font-weight: 800; color: var(--orange); }
.score-total-label { font-size: 9px; color: var(--grey); text-align: right; }

/* Tir indicators */
.tir-indicators {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
}

.tir-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  transition: all .2s;
}

.tir-dot.done    { background: var(--orange); color: #fff; }
.tir-dot.current { background: transparent; border: 2px dashed var(--orange); color: var(--orange); }
.tir-dot.pending { background: var(--border); color: #888; }

/* Zone buttons */
.zone-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.zone-btn {
  width: 100%;
  height: 52px;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.zone-btn.zone-miss   { background: #F5F5F5; color: #888888; }
.zone-btn.zone-bord   { background: #F1EFE8; color: #494343; }
.zone-btn.zone-anneau { background: #E8F4FA; color: #06464B; }
.zone-btn.zone-haute  { background: #FFF3EE; color: #EC6525; }
.zone-btn.zone-centre { background: #FCEBEB; color: #791F1F; }

.zone-btn:hover { filter: brightness(.96); border-color: currentColor; }
.zone-btn.selected { border-color: currentColor; box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.zone-btn:disabled { opacity: .45; cursor: not-allowed; }

.zone-pts { font-size: 11px; font-weight: 600; opacity: .75; }

.tir-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--grey);
  text-align: center;
  margin-bottom: 10px;
}

/* Validate button */
.btn-validate {
  background: var(--petrol);
  color: #fff;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-md);
  height: 46px;
  width: 100%;
  cursor: pointer;
  transition: background .15s;
  display: none;
}

.btn-validate:hover { background: #085A61; }
.btn-validate.visible { display: block; }

/* Back button */
.btn-back {
  background: transparent;
  color: var(--grey);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  height: 36px;
  padding: 0 16px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: border-color .15s, color .15s;
}

.btn-back:hover { border-color: var(--orange); color: var(--orange); }

/* Inscrits table */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
}

.inscrits-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.inscrits-table th {
  background: var(--petrol);
  color: rgba(255,255,255,.85);
  padding: 9px 10px;
  text-align: left;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.inscrits-table th:hover { color: #fff; }

.inscrits-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--night);
  white-space: nowrap;
}

.inscrits-table tr:last-child td { border-bottom: none; }
.inscrits-table tr:hover td { background: #FBF8F6; }

/* Top 20 */
.top20-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.top20-rank {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
  background: var(--border);
  color: var(--grey);
}

.top20-rank.r1 { background: #F5C842; color: #7A5500; }
.top20-rank.r2 { background: #C0C0C0; color: #4A4A4A; }
.top20-rank.r3 { background: #CD7F32; color: #5A3000; }

.top20-info { flex: 1; }
.top20-name  { font-size: 13px; font-weight: 700; }
.top20-contact { font-size: 10px; color: var(--grey); }

.top20-score { font-size: 16px; font-weight: 800; color: var(--orange); }

/* Action buttons */
.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all .15s;
  text-decoration: none;
}

.btn-action.primary   { background: var(--orange); color: #fff; }
.btn-action.primary:hover { background: var(--orange-dk); }
.btn-action.secondary { background: #fff; color: var(--night); border: 1px solid var(--border); }
.btn-action.secondary:hover { border-color: var(--orange); color: var(--orange); }

.actions-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

/* QR Code */
.qr-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  margin-bottom: 16px;
}

.qr-section img { max-width: 200px; height: auto; margin-bottom: 12px; }
.qr-url { font-size: 12px; color: var(--grey); word-break: break-all; }

/* Login */
.login-page {
  min-height: 100vh;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 380px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(6,70,75,0.13), 0 1px 4px rgba(0,0,0,0.07);
}

/* Bandeau pétrol en haut */
.login-header {
  background: var(--petrol);
  padding: 22px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-logo-safti { flex-shrink: 0; }

.login-header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.login-header-brand {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 15px;
  color: #fff;
  letter-spacing: 0.5px;
}

.login-header-region {
  font-family: var(--font);
  font-size: 11px;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.3px;
}

/* Titre concours */
.login-contest {
  padding: 20px 24px 4px;
  text-align: center;
}

.login-contest-title {
  font-family: var(--font-title);
  font-weight: 900;
  font-style: italic;
  font-size: 28px;
  color: var(--orange);
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.login-contest-sub {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 12px;
  color: var(--petrol);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* Séparateur orange */
.login-divider {
  height: 2px;
  background: var(--orange);
  margin: 16px 24px 0;
  border-radius: 2px;
  opacity: 0.35;
}

/* Label "Espace administrateur" */
.login-admin-label {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 14px 24px 16px;
}

/* Input mot de passe */
.login-input:focus {
  border-color: var(--petrol) !important;
  box-shadow: 0 0 0 3px rgba(6,70,75,0.10);
}

/* Bouton Se connecter */
.login-btn {
  width: 100%;
  padding: 14px;
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: background .2s;
  margin-top: 4px;
}

.login-btn:hover { background: var(--orange-dark); }

/* Toast notifications */
.toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(-80px);
  background: var(--petrol);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  z-index: 9999;
  transition: transform .3s ease;
  white-space: nowrap;
  max-width: 90vw;
}

.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { background: #1A6B35; }
.toast.error   { background: #C0392B; }

/* Spinner */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin .6s linear infinite;
  margin: 0 auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Utilities */
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.text-center { text-align: center; }
.hidden { display: none !important; }

/* === HISTORIQUE === */

/* Badge "En direct" dans le header */
.live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  background: rgba(220, 38, 38, .15);
  border: 1px solid rgba(220, 38, 38, .4);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 700;
  color: #F87171;
  white-space: nowrap;
}

/* Point rouge clignotant */
.live-dot {
  width: 7px;
  height: 7px;
  background: #EF4444;
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse-dot 1.4s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .4; transform: scale(.75); }
}

/* Bannière "Aujourd'hui" en haut de la liste */
.today-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-left: 3px solid #EF4444;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--night);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}

.today-banner:hover {
  border-color: #EF4444;
  box-shadow: 0 2px 8px rgba(239,68,68,.1);
}

.today-banner .live-dot { flex-shrink: 0; }

/* Card journée passée */
.day-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}

.day-card:hover {
  border-color: var(--orange);
  box-shadow: 0 2px 10px rgba(236,101,37,.1);
}

.day-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.day-date {
  font-size: 13px;
  font-weight: 700;
  color: var(--night);
}

.day-card-stats {
  display: flex;
  gap: 12px;
  align-items: center;
}

.day-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 44px;
}

.day-stat-val {
  font-size: 16px;
  font-weight: 800;
  color: var(--orange);
  line-height: 1;
}

.day-stat-lbl {
  font-size: 8px;
  font-weight: 600;
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: .4px;
}

.day-winner {
  font-size: 11px;
  font-weight: 700;
  color: var(--night);
}

/* Badge Gagnant version verte (historique) */
.winner-badge-green {
  font-size: 9px;
  background: #EAF3DE;
  color: #3B6D11;
  border-radius: 4px;
  padding: 2px 6px;
  font-weight: 600;
  white-space: nowrap;
}

/* === INSCRIPTION — Screens & champs ════════════════════════════════════════ */

/* Écrans */
.screen { display: none; }
.screen.active { display: block; }

/* Messages de validation champ */
.field-msg {
  font-size: 11px;
  margin-top: 3px;
  height: 14px;
  transition: color .15s;
}
.field-msg.ok  { color: #27AE60; }
.field-msg.err { color: #C0392B; }
.field-msg.chk { color: #999; }

/* Champ avec erreur / succès */
.form-input.err { border-color: #C0392B; }
.form-input.ok  { border-color: #27AE60; }

/* Erreur RGPD */
.rgpd-err { display: none; font-size: 11px; color: #C0392B; margin-top: 4px; }
.rgpd-err.show { display: block; }

/* Écran de retour (joueur déjà inscrit) */
.return-welcome {
  background: var(--petrol);
  color: #fff;
  padding: 20px 16px;
  text-align: center;
}
.return-welcome h2 { font-size: 20px; margin-bottom: 4px; }
.return-welcome p  { font-size: 13px; opacity: .8; }

.btn-participe {
  display: block;
  width: calc(100% - 32px);
  margin: 16px auto;
  background: var(--orange);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  font-family: var(--font);
  padding: 14px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background .2s;
}
.btn-participe:hover { background: var(--orange-dark); }

/* Tableau historique joueur */
.history-section { padding: 16px; }
.history-section h3 { color: var(--petrol); font-size: 15px; margin-bottom: 12px; }

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.history-table th {
  background: var(--petrol);
  color: #fff;
  padding: 8px 10px;
  font-size: 11px;
  text-transform: uppercase;
  text-align: left;
}
.history-table td {
  padding: 10px;
  border-bottom: 1px solid #F0E8E0;
}
.history-table tr:last-child td { border-bottom: none; }

.badge-rang {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  background: #E8E0D8;
  color: #666;
}
.badge-rang.top { background: #EAF3DE; color: #3B6D11; }

.no-history { text-align: center; color: #999; font-size: 13px; padding: 16px; }

/* Écran "déjà joué" */
.played-card {
  margin: 20px 16px;
  background: var(--petrol);
  color: #fff;
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
}
.played-card .big-emoji { font-size: 48px; margin-bottom: 12px; }
.played-card h2 { font-size: 18px; margin-bottom: 8px; }
.played-card p  { font-size: 14px; opacity: .85; line-height: 1.6; }

/* === RESPONSIVE (grand écran) === */
@media (min-width: 768px) {
  body { max-width: 100%; }

  .site-header { max-width: 100%; padding: 12px 32px; }
  .header-brand { font-size: 19px; }
  .header-sub   { font-size: 14px; }
  .header-sub2  { font-size: 11px; }
  .header-logo  { width: 52px; height: 52px; }
  .header-logo svg { width: 52px; height: 52px; }

  .hero { padding: 32px 40px; }
  .hero-title { font-size: 22px; }
  .hero-sub   { font-size: 13px; }
  .hero-icon  { width: 64px; height: 64px; }

  .stats-grid { max-width: 600px; margin: 0 auto; padding: 20px 20px 0; }
  .stat-value { font-size: 28px; }
  .stat-label { font-size: 11px; }

  .podium-grid { max-width: 700px; margin: 0 auto; padding: 20px 20px 0; }
  .podium-score { font-size: 18px; }
}
podium-name  { font-size: 13px; }

  .ranking-body { max-width: 700px; margin: 0 auto; }

  .last-update { font-size: 12px; }
}
