/* ===== ONGLETS DE MODE ===== */
.mode-tabs {
  position: relative;
  z-index: 9;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-5) var(--sp-2);
  background: var(--ocean-2);
  border: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex-wrap: nowrap;
}
.mode-tabs::-webkit-scrollbar { display: none; }

/* Mode Infini : ligne séparée et centrée (mode de jeu distinct) */
.mode-tabs-inf {
  position: relative;
  z-index: 9;
  display: flex;
  justify-content: center;
  padding: 0 var(--sp-5) var(--sp-3);
  background: var(--ocean-2);
}
.mode-tab-inf {
  opacity: 0.78;
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  padding: 7px 24px;
  border-style: dashed;
}
.mode-tab-inf:hover { opacity: 1; }
.mode-tab-inf.active { opacity: 1; }

.mode-tab {
  padding: 9px 26px;
  border-radius: 30px;
  border: 2px solid rgba(200, 148, 10, 0.3);
  background: rgba(255,255,255,0.05);
  color: rgba(232, 192, 48, 0.6);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
  overflow: visible;
}
/* Indicateurs victoire / défaite sur les onglets */
.mode-tab.tab-done::after,
.mode-tab.tab-lost::after {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  font-size: 0.55rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(0,0,0,0.5);
  z-index: 10;
}
.mode-tab.tab-done::after {
  content: '✓';
  background: #22c55e;
  color: #fff;
}
.mode-tab.tab-lost::after {
  content: '✕';
  background: #ef4444;
  color: #fff;
}
.mode-tab:hover {
  border-color: var(--gold);
  color: var(--gold-l);
  background: rgba(200, 148, 10, 0.1);
}
.mode-tab.active {
  background: var(--gold);
  color: #04090f;
  border-color: var(--gold);
  box-shadow: 0 0 18px var(--glow-gold);
  font-weight: 700;
}

/* ===== STREAK BAR ===== */
.streak-bar {
  text-align: center;
  padding: 6px 16px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gold);
}
.streak-bar.hidden { display: none; }

/* ===== BARRE DE SCORE ===== */
.score-bar-section {
  background: linear-gradient(180deg, var(--ocean-2) 0%, var(--ocean-1) 100%);
  padding: var(--sp-2) var(--sp-5) var(--sp-3);
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 6px 24px rgba(2,8,16,0.45);
  position: relative;
  z-index: 8;
}
.score-bar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1020px;
  margin: 0 auto;
}
.score-anchor {
  font-size: 1rem;
  flex-shrink: 0;
  opacity: 0.7;
}

/* Piste */
.score-track {
  flex: 1;
  height: 20px;
  position: relative;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(200,148,10,0.22);
  overflow: visible;
}
/* Vagues animées dans le fond */
.score-track::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  overflow: hidden;
  background: repeating-linear-gradient(
    90deg,
    transparent 0px, transparent 6px,
    rgba(200,148,10,0.09) 6px, rgba(200,148,10,0.09) 12px
  );
  background-size: 24px 100%;
  animation: waveFlow 2.5s linear infinite;
}
@keyframes waveFlow {
  from { background-position: 0 0; }
  to   { background-position: 24px 0; }
}

/* ===== SCORE BREAKDOWN POPOVER ===== */
.score-bar-inner { position: relative; }
.score-breakdown {
  position: fixed;
  background: var(--card-bg, #0d1821);
  border: 1px solid rgba(200,148,10,0.35);
  border-radius: 14px;
  padding: 12px 16px;
  min-width: 230px;
  z-index: 9999;
  box-shadow: 0 8px 28px rgba(0,0,0,0.6);
  animation: sbFadeIn 0.15s ease;
}
.score-breakdown.hidden { display: none; }
@keyframes sbFadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
/* Petite flèche vers le haut */
.score-breakdown::before {
  content: '';
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 7px solid rgba(200,148,10,0.35);
}
.sb-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 4px 0;
  font-size: 0.82rem;
  font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: 0.04em;
  color: var(--text2);
}
.sb-row span:first-child { opacity: 0.75; }
.sb-row span:last-child  { font-weight: 700; color: var(--gold); }
.sb-won  span:last-child { color: #22c55e; }
.sb-lost span:last-child { color: #ef4444; opacity: 0.7; }
.sb-pending span:last-child { color: var(--text3); opacity: 0.5; }
.sb-divider {
  height: 1px;
  background: rgba(200,148,10,0.2);
  margin: 6px 0;
}
.sb-total {
  font-size: 0.88rem;
}
.sb-total span:last-child { color: var(--gold-l); font-size: 1rem; }

/* ===== YESTERDAY BAR — Opening ===== */
.yesterday-op {
  display: block;
  margin-top: 4px;
  color: var(--gold);
  opacity: 0.75;
  font-style: normal;
}
.yesterday-op em {
  font-style: italic;
  opacity: 0.7;
  font-size: 0.9em;
}

/* ===== YESTERDAY BAR — Stats communauté ===== */
.yesterday-community {
  display: block;
  margin-top: 5px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--gold);
  opacity: 0.65;
}
.yesterday-community:empty { display: none; }

/* Remplissage : juste la ligne de vague, pas de fond solide */
.score-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0%;
  min-width: 0;
  background: transparent;
  border-radius: 10px;
  transition: width 1.3s cubic-bezier(0.25, 1, 0.5, 1);
  overflow: visible;
}
.score-fill::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='20'%3E%3Cpath d='M0,10 C15,1 45,19 60,10 C75,1 105,19 120,10 L120,20 L0,20 Z' fill='%23c89408'/%3E%3Cpath d='M0,10 C15,1 45,19 60,10 C75,1 105,19 120,10' stroke='%23ffd84d' stroke-width='2.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 120px 100%;
  filter: drop-shadow(0 0 4px rgba(200,148,10,0.8));
  animation: waveSurface 1.8s linear infinite;
}
@keyframes waveSurface {
  from { background-position: 0 0; }
  to   { background-position: -120px 0; }
}

/* Le Vogue Merry ⛵ */
.score-merry {
  position: absolute;
  right: -22px;
  top: 50%;
  transform: translateY(-58%);
  width: auto;
  height: 38px;
  object-fit: contain;
  animation: merryBob 2.2s ease-in-out infinite;
  filter: drop-shadow(0 3px 5px rgba(0,0,0,0.6));
  pointer-events: none;
  z-index: 10;
}
@keyframes merryBob {
  0%,100% { transform: translateY(-58%) rotate(-4deg); }
  25%      { transform: translateY(-72%) rotate(-1deg); }
  50%      { transform: translateY(-62%) rotate(4deg); }
  75%      { transform: translateY(-74%) rotate(1deg); }
}

/* Texte score */
.score-text {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.05em;
  min-width: 90px;
  text-align: right;
}
.score-max { color: rgba(200,148,10,0.45); font-weight: 500; }

/* Bouton partage */
.share-daily-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  background: linear-gradient(135deg, #f0d060 0%, #c89408 100%);
  color: #061528;
  border: none;
  border-radius: var(--r-pill);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 10px var(--glow-gold);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.share-daily-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(200,148,10,0.55);
}
.share-daily-btn:active { transform: translateY(0); }
.share-daily-btn.hidden { display: none; }

