/* ================================================================
   css/app.css — Styles de l'application tirageausort.eu
   Chargé dans le <head> par index.php (polices : fonts/fonts.css)
   ================================================================ */
:root {
  --bg: #fff4ee;
  --surface: #fffaf8;
  --surface2: #fff0e8;
  --text: #3d3532;
  --text-muted: #9b8a84;
  --border: #ede0d8;
  --shadow: 0 4px 20px rgba(61, 53, 50, 0.08);
  --shadow-lg: 0 8px 40px rgba(61, 53, 50, 0.14);
  --radius: 18px;
  --radius-sm: 10px;
  --radius-xs: 7px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
  --accent: #ff7b5c;
  --accent-light: #ffe8e2;
  --accent-text: #fff;
}
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
/* ═══ Anti double-tap zoom iOS/Android ═══ */
html {
  touch-action: manipulation;
}
*,
*::before,
*::after {
  touch-action: manipulation !important;
}
/* ════════════════════════════════════════ */

/* iOS: empêche le zoom auto sur focus d'un champ < 16px */
input,
select,
textarea {
  font-size: 16px;
}
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
}
button {
  cursor: pointer;
  font-family: var(--font-body);
  border: none;
  background: none;
}
input {
  font-family: var(--font-body);
}
input:focus,
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
input:focus {
  outline: none;
}

/* HEADER */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  height: 56px;
  background: rgba(255, 244, 238, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.logo-text {
  letter-spacing: -0.01em;
}
.logo-accent {
  color: var(--accent);
  transition: color 0.3s;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 16px;
  flex-shrink: 0;
  transition: background 0.3s;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.account-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s;
  cursor: pointer;
  white-space: nowrap;
}
.account-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.lang-wrapper {
  position: relative;
}
#lang-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  min-width: 180px;
  z-index: 200;
  padding: 6px 0;
  overflow: hidden;
}
.lang-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s;
}
.lang-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: all 0.2s;
  z-index: 200;
  min-width: 140px;
}
.lang-dropdown.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}
.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  transition: background 0.15s;
  cursor: pointer;
}
.lang-option:hover {
  background: var(--surface2);
}
.lang-option.active {
  color: var(--accent);
  font-weight: 700;
}

/* MODE BAR */
.mode-bar {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  z-index: 90;
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  padding-left: max(12px, env(safe-area-inset-left));
  padding-right: max(12px, env(safe-area-inset-right));
  overflow-x: auto;
  overflow-y: visible;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.mode-bar::-webkit-scrollbar {
  display: none;
}
.mode-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}
.mode-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
.mode-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}
.mode-btn[data-mode="livechat"].active,
.mode-btn[data-mode="livechat_twitch"].active {
  background: #64748b !important;
  border-color: #64748b !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(100, 116, 139, 0.3);
}
.mode-btn.locked {
  cursor: pointer;
}
.mode-btn[data-mode="santa"].active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

/* MAIN */
main {
  padding-top: 120px;
  padding-bottom: 80px;
  min-height: 100dvh;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
.mode-panel {
  display: none;
  padding: 16px;
  max-width: 560px;
  margin: 0 auto;
  animation: fadeSlideIn 0.3s ease;
}
#mode-home.mode-panel {
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
.mode-panel.active {
  display: block;
}
/* Panneau déjà actif dans le HTML servi : affichage immédiat, sans fondu
   (le fondu ne sert qu'aux changements d'outil ; classe retirée par app.js) */
.mode-panel.initial {
  animation: none;
}
@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* SHARED COMPONENTS */
.section-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
  text-align: center;
}
.section-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
  text-align: center;
}

/* INPUT ROW — fixed layout */
.input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  width: 100%;
}
.name-input {
  flex: 1;
  min-width: 0;
  padding: 13px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  width: 100%;
}
.name-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-light);
}
.name-input::placeholder {
  color: var(--text-muted);
}
.add-btn {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 1.4rem;
  font-weight: 300;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
}
.add-btn:hover {
  transform: scale(1.1);
}
.add-btn:active {
  transform: scale(0.95);
}

/* CHIPS */
.chips-area {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 40px;
  margin-bottom: 10px;
  justify-content: center;
}
.chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px 6px 13px;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 600;
  animation: chipIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: default;
  user-select: none;
}
@keyframes chipIn {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.chip-del {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 11px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: opacity 0.15s;
  flex-shrink: 0;
  padding: 11px;
  margin: -11px;
  box-sizing: content-box;
  position: relative;
  z-index: 1;
  opacity: 0.6;
}
.chip-del:hover {
  background: transparent;
  opacity: 1;
}
.count-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  text-align: center;
}

/* BUTTONS */
.cta-btn {
  width: 100%;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--accent);
  color: white;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  margin-top: 8px;
}
.cta-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.cta-btn:active:not(:disabled) {
  transform: scale(0.98);
}
.cta-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.secondary-btn {
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.18s;
}
.secondary-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}
.reset-mode-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.18s;
  margin-top: 14px;
}
.reset-mode-btn:hover {
  border-color: #e8503a;
  color: #e8503a;
}
.mode-footer {
  margin-top: 10px;
  display: flex;
  justify-content: center;
}

/* HISTORY */
.history-bar {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.history-items {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
  justify-content: center;
}
.history-chip {
  padding: 3px 9px;
  border-radius: 10px;
  background: var(--surface2);
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* INLINE RESULT */
.inline-result-box {
  margin-top: 16px;
  padding: 20px 16px;
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  text-align: center;
  animation: resultPopIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes resultPopIn {
  from {
    transform: scale(0.7);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.inline-result-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.inline-result-name {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 7vw, 2.6rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}
.inline-result-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 14px;
}

/* MODE 2 — MÉLIMÉLO */
.submode-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 18px;
  background: var(--surface2);
  padding: 4px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.submode-tab {
  flex: 1;
  padding: 9px;
  border-radius: var(--radius-xs);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.submode-tab.active {
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow);
}
.stepper {
  display: flex;
  align-items: center;
  gap: 12px;
}
.stepper-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  display: grid;
  place-items: center;
  transition: all 0.18s;
}
.stepper-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.stepper-value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  min-width: 40px;
  text-align: center;
}
.groups-result {
  margin-top: 14px;
}
.group-card {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
  animation: fadeSlideIn 0.3s ease;
}
.group-card-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  opacity: 0.7;
}
.group-card-names {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.santa-result-box {
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  margin-top: 12px;
  animation: zoomIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.santa-arrow {
  font-size: 1.5rem;
  margin: 4px 0;
}
.santa-receiver {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
}

/* SANTA LOCKED BANNER */
.santa-locked {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 16px;
  text-align: center;
  background: var(--surface);
  margin-top: 8px;
}
.santa-locked-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}
.santa-locked-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
}
.santa-locked-link {
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}

/* MODE 3 — ÉQUIPE */
.teams-result {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.team-col {
  border-radius: var(--radius-sm);
  padding: 12px;
  min-height: 80px;
}
.team-col-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 10px;
  opacity: 0.8;
}
.team-member {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  padding: 5px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  animation: chipIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.team-member:last-child {
  border-bottom: none;
}
.team-setup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}
.team-setup-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.team-setup-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.team-color-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}
/* KEY: inputs must stay within their grid cell on all screen sizes */
.team-name-input {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  padding: 8px 8px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s;
  text-align: center;
}
.team-name-input:focus {
  border-color: var(--accent);
  outline: none;
}
.tcb {
  height: 22px;
  padding: 0 8px;
  border-radius: 20px;
  border: 2.5px solid rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.tcb:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}
.tcb.selected {
  border-color: var(--text) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
}
.tcb.disabled::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 130%;
  height: 2.5px;
  background: rgba(0, 0, 0, 0.55);
  transform: translate(-50%, -50%) rotate(-35deg);
  pointer-events: none;
}
.tcb.disabled {
  cursor: not-allowed;
  opacity: 0.7;
}
.tcb-random {
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--surface2);
  color: var(--text-muted);
  border: 1.5px dashed var(--border);
  padding: 0 8px;
  height: 22px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.18s;
}
.tcb-random:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
.tcb-random.selected {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
}

/* MODE 4 — COIN */
/* COIN THEMES */
.coin-theme-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 6px;
}
.coin-theme-btn {
  padding: 9px 13px;
  border-radius: 20px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.coin-theme-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.coin-theme-btn.active {
  border-color: var(--accent);
  background: var(--accent-light);
  box-shadow: var(--shadow);
}
.coin-theme-label {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 4px;
  margin-top: 0;
  text-align: center;
}
.coin-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
}
.coin-scene {
  perspective: 600px;
  width: 170px;
  height: 170px;
  cursor: pointer;
}
.coin-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.05s;
}
.coin-inner.flipping {
  animation: coinFlip var(--flip-duration, 1.5s) cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes coinFlip {
  0% {
    transform: rotateY(0);
  }
  100% {
    transform: rotateY(var(--flip-turns, 1260deg));
  }
}
.coin-face,
.coin-back {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 6px 30px rgba(0, 0, 0, 0.18),
    inset 0 2px 0 rgba(255, 255, 255, 0.4);
  font-family: var(--font-display);
}
.coin-face {
  background: radial-gradient(circle at 35% 35%, #ffe066, #f5c842, #e8a800);
}
.coin-back {
  background: radial-gradient(circle at 35% 35%, #bae6fd, #38bdf8, #0284c7);
  transform: rotateY(180deg);
}
.coin-emoji-bg {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
}
.coin-symbol {
  font-size: 3.5rem;
  line-height: 1;
}
.coin-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.5);
  margin-top: 4px;
}
.coin-labels {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  max-width: 300px;
  justify-content: center;
}
.coin-label-group {
  width: 120px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  transition: border-color 0.2s;
}
.coin-label-group:focus-within {
  border-color: var(--accent);
}
.coin-label-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  outline: none;
  padding: 0;
}
.coin-label-hint {
  font-size: 1.1rem;
  flex-shrink: 0;
  line-height: 1;
}
.coin-vs {
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.coin-stats {
  display: flex;
  gap: 16px;
  justify-content: center;
}
.coin-stat {
  text-align: center;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 20px;
}
.coin-stat-n {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
}
.coin-stat-l {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}
.coin-tap-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.coin-result-badge {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 30px;
  animation: zoomIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: #fff !important;
}
.coin-result-badge.face {
  background: #fff3cc;
  color: #9b6800;
}
.coin-result-badge.pile {
  background: #e0f2fe;
  color: #0369a1;
}
@keyframes zoomIn {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* MODE 5 — PAILLE */
.straw-cup-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 10px 0 20px;
}
.straw-container {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  padding: 10px 16px 0;
  position: relative;
}
.straw {
  width: 12px;
  border-radius: 6px 6px 0 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.straw-cup {
  width: calc(100% + 32px);
  height: 44px;
  background: linear-gradient(180deg, #deb887 0%, #c8a472 100%);
  border-radius: 0 0 12px 12px;
  margin: 0 -16px;
  position: relative;
}
.straw-cup::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: #b8936a;
}
.straw-names {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0;
  justify-content: center;
}
.straw-name-chip {
  padding: 7px 13px;
  border-radius: 20px;
  border: 2px solid var(--border);
  background: var(--surface);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}
.straw-name-chip.picked {
  opacity: 0.4;
  pointer-events: none;
}
.straw-name-chip:not(.picked):hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.straw-reveal-box {
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
  margin-top: 8px;
  animation: fadeSlideIn 0.3s ease;
}
.straw-reveal-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
}
.straw-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}

/* MODE 6 — ROUE */
.wheel-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.wheel-canvas-wrap {
  position: relative;
  width: min(260px, calc(100vw - 40px));
  height: min(260px, calc(100vw - 40px));
  display: flex;
  flex-direction: column;
  align-items: center;
}
#wheel-canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: var(--shadow-lg);
}
.wheel-pointer {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 24px solid var(--text);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  z-index: 2;
}
.wheel-spin-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: white;
  box-shadow: var(--shadow-lg);
  font-size: 1.5rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.2s;
  z-index: 3;
  border: 3px solid var(--border);
}
.wheel-spin-btn:hover {
  transform: translate(-50%, -50%) scale(1.1);
}
.wheel-empty {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  padding: 8px 20px 0;
  margin-top: 4px;
}

/* QUICK GROUPS WIDGET */
.quick-groups-widget {
  margin-bottom: 16px;
}
.qg-section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-align: center;
}
.qg-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
  margin-bottom: 4px;
}
.qg-pill {
  padding: 7px 14px;
  border-radius: 20px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  gap: 5px;
}
.qg-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.qg-pill-count {
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--accent-light);
  color: var(--accent);
  padding: 1px 6px;
  border-radius: 10px;
}
.share-bar {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.share-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s;
  border: 1.5px solid;
  text-decoration: none;
}
.share-btn-native {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.share-btn-native:hover {
  opacity: 0.88;
}
.share-btn-copy {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.share-btn-copy:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.share-btn-tw {
  background: #000;
  color: white;
  border-color: #000;
}
.share-btn-tw:hover {
  opacity: 0.8;
}
.share-btn-fb {
  background: #1877f2;
  color: white;
  border-color: #1877f2;
}
.share-btn-fb:hover {
  opacity: 0.88;
}
.share-btn-wa {
  background: #25d366;
  color: white;
  border-color: #25d366;
}
.share-btn-wa:hover {
  opacity: 0.88;
}
.qg-login-reminder {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  cursor: pointer;
  background: var(--surface);
  transition:
    border-color 0.2s,
    background 0.2s;
}
.qg-login-reminder:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}
.qg-login-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}
.qg-login-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.qg-login-link {
  color: var(--accent);
  font-weight: 700;
}
@keyframes flashGreen {
  0% {
    background: var(--accent-light);
  }
  100% {
    background: transparent;
  }
}
.qg-loaded-flash {
  animation: flashGreen 1s ease;
}

/* ACCOUNT SIDE PANEL */
.panel-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(61, 53, 50, 0.35);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.panel-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.side-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 500;
  width: min(380px, 100vw);
  background: var(--bg);
  box-shadow: -8px 0 40px rgba(61, 53, 50, 0.12);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.side-panel.open {
  transform: translateX(0);
}
.side-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 1;
}
.side-panel-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}
.panel-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--border);
  font-size: 1.2rem;
  font-weight: 900;
  color: #111;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  line-height: 1;
}
.panel-close:hover {
  background: #f3f3f3;
  border-color: #aaa;
}
.side-panel-body {
  padding: 20px;
  flex: 1;
}
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.auth-tab {
  flex: 1;
  padding: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
  background: none;
}
.auth-tab.active {
  background: var(--accent);
  color: white;
}
.field-group {
  margin-bottom: 14px;
}
.field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 5px;
}
.field-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 500;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  transition: border-color 0.2s;
}
.field-input:focus {
  border-color: var(--accent);
  outline: none;
}
.pw-wrap {
  position: relative;
}
.pw-wrap .field-input {
  padding-right: 40px;
}
.pw-eye {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-muted);
  padding: 4px;
  line-height: 1;
}
.pw-eye:hover {
  color: var(--text);
}
.pw-forgot-link {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}
.pw-forgot-link:hover {
  opacity: 0.8;
}
.form-errors {
  background: #fff0ee;
  border: 1px solid #ffb3a0;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.84rem;
  color: #c03a1c;
  margin-bottom: 14px;
  display: none;
}
.user-greeting {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}
.user-avatar-big {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  color: white;
  font-weight: 700;
  flex-shrink: 0;
}
.user-greeting-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}
.user-greeting-email {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.groups-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* GROUP PILL IN PANEL */
.group-pill-wrap {
  margin-bottom: 8px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
  animation: chipIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.group-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  cursor: pointer;
  transition: background 0.15s;
}
.group-pill:hover {
  background: var(--surface2);
}
.group-pill-info {
}
.group-pill-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
}
.group-pill-count {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.group-pill-chevron {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: transform 0.2s;
}
.group-pill-chevron.open {
  transform: rotate(90deg);
}

/* GROUP EDIT PANEL — inline */
.group-edit-body {
  border-top: 1px solid var(--border);
  padding: 12px 14px;
  background: var(--bg);
  animation: fadeSlideIn 0.2s ease;
}
.group-edit-members {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  min-height: 28px;
}
.group-edit-member {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px 4px 10px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 14px;
  font-size: 0.8rem;
  font-weight: 600;
}
.group-edit-member-del {
  cursor: pointer;
  font-size: 10px;
  opacity: 0.6;
  padding: 11px;
  margin: -11px;
  box-sizing: content-box;
  position: relative;
  z-index: 1;
}
.group-edit-member-del:hover {
  opacity: 1;
}
.group-edit-add-row {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.group-edit-input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  transition: border-color 0.2s;
}
.group-edit-input:focus {
  border-color: var(--accent);
  outline: none;
}
.group-edit-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.btn-save-group {
  flex: 1;
  padding: 9px;
  background: var(--accent);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 700;
  text-align: center;
  transition: all 0.18s;
}
.btn-save-group:hover {
  opacity: 0.9;
}
.btn-del-group {
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  color: #c03a1c;
  border: 1.5px solid #ffb3a0;
  background: #fff0ee;
  transition: all 0.18s;
}
.btn-del-group:hover {
  background: #ffe0e0;
}
.btn-cancel-del {
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  background: var(--surface);
  transition: all 0.18s;
}
.confirm-delete-row {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
  background: #fff0ee;
  border-top: 1px solid #ffb3a0;
  animation: fadeSlideIn 0.2s ease;
}
.confirm-delete-text {
  font-size: 0.82rem;
  color: #c03a1c;
  flex: 1;
}
/* Confirmations Secret Santa (lancer, supprimer, quitter) : le texte sur toute
   la largeur, centré, puis les deux boutons côte à côte en dessous */
.confirm-delete-row.confirm-stack {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #ffb3a0;
  border-radius: 12px;
}
.confirm-stack .confirm-delete-text {
  flex: none;
  text-align: center;
  line-height: 1.45;
}
.confirm-stack .confirm-delete-text + div {
  width: 100%;
  margin-top: 0 !important;
}

.new-group-toggle {
  width: 100%;
  padding: 11px;
  margin-top: 4px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  text-align: center;
  cursor: pointer;
  transition: all 0.18s;
}
.new-group-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.new-group-form {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-top: 8px;
  display: none;
}
.new-group-form.open {
  display: block;
  animation: fadeSlideIn 0.2s ease;
}
.member-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
  min-height: 30px;
}
.member-tag {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px 4px 10px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 14px;
  font-size: 0.8rem;
  font-weight: 600;
}
.member-tag-del {
  cursor: pointer;
  font-size: 10px;
  opacity: 0.6;
  padding: 11px;
  margin: -11px;
  box-sizing: content-box;
  position: relative;
  z-index: 1;
}
.member-tag-del:hover {
  opacity: 1;
}

/* MODE THEMES */
body[data-mode="home"] {
  --accent: #ff7b5c;
  --accent-light: #ffe8e2;
  --accent-text: #fff;
}
[data-mode="home"] .logo-accent {
  color: #e84393 !important;
}
[data-mode="classic"] {
  --accent: #ff7b5c;
  --accent-light: #ffe8e2;
  --accent-text: #fff;
}
body[data-mode="equipe"] {
  --accent: #3db876;
  --accent-light: #e0f7ec;
  --accent-text: #fff;
}
body[data-mode="melimelo"] {
  --accent: #9b72f5;
  --accent-light: #eee6ff;
  --accent-text: #fff;
}
body[data-mode="santa"] {
  --accent: #e84393;
  --accent-light: #ffe0f2;
  --accent-text: #fff;
}
body[data-mode="coin"] {
  --accent: #e8a800;
  --accent-light: #fff3cc;
  --accent-text: #3d3532;
}
body[data-mode="paille"] {
  --accent: #2bbfa8;
  --accent-light: #d9f5f1;
  --accent-text: #fff;
}
body[data-mode="roue"] {
  --accent: #3b82f6;
  --accent-light: #dbeafe;
  --accent-text: #fff;
}
body[data-mode="attrib"] {
  --accent: #dc2d14;
  --accent-light: #fdecea;
  --accent-text: #fff;
}
/* ============================================================
       SECRET SANTA COLLABORATIF
    ============================================================ */
.santa-choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.santa-choice-btn {
  padding: 18px 12px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.santa-choice-btn:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.santa-choice-btn .scb-icon {
  font-size: 2rem;
  margin-bottom: 6px;
}
.santa-choice-btn .scb-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}
.santa-choice-btn .scb-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* Code badge */
.santa-code-badge {
  background: var(--accent-light);
  border: 2px dashed var(--accent);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  margin-bottom: 16px;
  cursor: pointer;
  transition: background 0.15s;
}
.santa-code-badge:hover {
  background: var(--accent);
  color: white;
}
.santa-code-badge:hover .scb-code {
  color: white;
}
.santa-code-badge:hover .scb-hint {
  color: rgba(255, 255, 255, 0.75);
}
.scb-code {
  font-family: "Plus Jakarta Sans", monospace;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.scb-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Participant list */
.santa-participants {
  margin: 12px 0;
}
.santa-participant {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  animation: chipIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.santa-participant-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
}
.santa-participant-tag {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
}
.tag-creator {
  background: #fff3cc;
  color: #9b6800;
}
.tag-vous {
  background: var(--accent-light);
  color: var(--accent);
}
.santa-del-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface2);
  font-size: 0.75rem;
  color: var(--text-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.santa-del-btn:hover {
  background: #ffe0e0;
  color: #e8503a;
}

/* Status bar */
.santa-status-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 14px;
}
.santa-status-bar.attente {
  background: #fff3cc;
  color: #9b6800;
}
.santa-status-bar.lance {
  background: #e8f5e9;
  color: #2e7d32;
}

/* Contraintes panel */
.contrainte-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
}
.contrainte-label {
  flex: 1;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
}
.contrainte-del {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: transparent;
  font-size: 0.72rem;
  color: var(--text-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.15s;
  padding: 8px;
  margin: -8px;
  box-sizing: content-box;
  position: relative;
  z-index: 1;
  opacity: 0.6;
}
.contrainte-del:hover {
  background: #ffe0e0;
  color: #e8503a;
}
.contrainte-add {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}
.contrainte-select {
  flex: 1;
  padding: 9px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-family: var(--font-body);
  background: var(--surface);
  color: var(--text);
  -webkit-appearance: menulist;
  appearance: menulist;
  cursor: pointer;
}
.contrainte-select:focus {
  border-color: var(--accent);
  outline: none;
}
.contrainte-vs {
  font-weight: 700;
  color: var(--text-muted);
  align-self: center;
  flex-shrink: 0;
}

/* Reveal area */
.santa-reveal-box {
  background: var(--accent-light);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  animation: resultPopIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.santa-reveal-receiver {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: 6px;
}

/* Join form */
.join-form {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
}
.join-form-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 14px;
  text-align: center;
}

@media (min-width: 640px) {
  header {
    padding: 0 32px;
    height: 64px;
  }
  .mode-bar {
    top: 64px;
    padding: 12px 32px;
    justify-content: center;
  }
  main {
    padding-top: 132px;
  }
  .mode-panel {
    padding: 24px 16px;
  }
  .section-title {
    font-size: 2rem;
  }
  .wheel-canvas-wrap {
    width: 290px;
    height: 290px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.santa-how {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.santa-how-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.santa-how-step {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 2px 0;
}
.santa-how-dot {
  color: var(--accent);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.santa-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 14px;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  background: #ffe0f2;
  color: #9b1060;
  border: 1.5px solid #c0337a;
  cursor: pointer;
  transition: all 0.18s;
}
.santa-back-btn:hover {
  background: transparent;
  color: #9b1060;
  border-color: #9b1060;
}
.kofi-wrap {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  text-align: center;
}
.kofi-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  border-radius: 24px;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  background: var(--accent-light);
  color: var(--accent);
  border: 1.5px solid var(--accent);
  cursor: pointer;
  transition: all 0.18s;
}
.kofi-btn:hover {
  background: var(--accent);
  color: white;
}
.kofi-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
/* ---- AdSense card ---- */
/* ---- Footer ---- */
.site-footer {
  margin-top: 40px;
  padding: 20px 16px 28px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
}
.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.18s;
}
.site-footer a:hover {
  color: var(--accent);
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  font-size: 0.75rem;
  opacity: 0.7;
  margin-bottom: 6px;
}
.footer-sep {
  opacity: 0.35;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
  font-size: 0.74rem;
  margin-top: 8px;
}
.footer-discord {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  padding: 4px 10px;
  border-radius: 20px;
  background: #5865f222;
  color: #5865f2;
  transition: background 0.18s;
}
.footer-discord:hover {
  background: #5865f244;
  color: #5865f2;
}
.footer-brand {
  font-size: 0.72rem;
  opacity: 0.45;
  margin-top: 10px;
  letter-spacing: 0.04em;
}

/* ---- Bandeau affiliation Amazon ---- */
.amazon-affiliate {
  margin-top: 20px;
  border: 1px solid #ff9900;
  border-radius: var(--radius);
  background: #fffbf2;
  padding: 14px 14px 10px;
  font-size: 0.8rem;
}
.amazon-affiliate-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  color: #888;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.amazon-affiliate-header svg {
  flex-shrink: 0;
}
.amazon-gift-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}
.amazon-gift-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  background: white;
  border: 1px solid #f0e0c0;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  transition:
    border-color 0.18s,
    box-shadow 0.18s;
  font-size: 0.78rem;
  text-align: center;
  line-height: 1.3;
}
.amazon-gift-card:hover {
  border-color: #ff9900;
  box-shadow: 0 2px 8px rgba(255, 153, 0, 0.15);
  color: var(--text);
}
.amazon-gift-card .gift-emoji {
  font-size: 1.6rem;
  margin-bottom: 2px;
}
.amazon-gift-card .gift-label {
  font-weight: 600;
  color: var(--text);
}
.amazon-gift-card .gift-cta {
  font-size: 0.7rem;
  color: #ff9900;
  font-weight: 600;
  margin-top: 2px;
}
.amazon-legal {
  font-size: 0.67rem;
  color: #aaa;
  text-align: center;
  margin-top: 6px;
  line-height: 1.4;
}
/* Couleur mode */
/* Gate mot de passe */
#lc-gate {
  width: 100%;
  box-sizing: border-box;
}
.lc-gate-box {
  width: 100%;
  box-sizing: border-box;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.lc-gate-lock {
  font-size: 2.5rem;
  line-height: 1;
}
.lc-gate-msg {
  font-size: 0.92rem;
  color: var(--text-muted);
  font-weight: 500;
  margin: 0;
  max-width: 280px;
}
.lc-gate-error {
  font-size: 0.8rem;
  color: #e84040;
  min-height: 16px;
  margin: 0;
}
.lc-gate-box .field-input {
  width: 100%;
  box-sizing: border-box;
}
.lc-gate-box .cta-btn {
  width: 100%;
  box-sizing: border-box;
}
@keyframes lc-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20%,
  60% {
    transform: translateX(-6px);
  }
  40%,
  80% {
    transform: translateX(6px);
  }
}

/* Plateformes */
.lc-platform-row {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}
.lc-platform-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.18s;
}
.lc-platform-btn.active {
  border-color: #9146ff;
  background: #f3eeff;
  color: #9146ff;
}
.lc-platform-btn.lc-platform-soon {
  opacity: 0.45;
  cursor: not-allowed;
}
.lc-soon-badge {
  font-size: 0.62rem;
  background: var(--border);
  border-radius: 10px;
  padding: 1px 6px;
  font-weight: 600;
}

/* Status dot live */
.lc-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  display: inline-block;
  flex-shrink: 0;
  transition: all 0.3s;
}
.lc-status-dot.live {
  background: #22c55e;
  box-shadow: 0 0 0 3px #22c55e44;
  animation: lc-pulse 1.5s infinite;
}
@keyframes lc-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 3px #22c55e33;
  }
  50% {
    box-shadow: 0 0 0 6px #22c55e11;
  }
}

/* Compteur */
.lc-counter {
  font-size: 3rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  font-family: var(--font-display);
  letter-spacing: -0.04em;
}

/* Chips participants */
.lc-participants-box {
  max-height: 180px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.lc-participant-chip {
  display: inline-flex;
  align-items: center;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 0.79rem;
  font-weight: 600;
  margin: 3px;
  animation: chipPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Log mini */
.lc-log {
  font-size: 0.72rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: 12px;
  max-height: 80px;
  overflow-y: auto;
  font-family: monospace;
  line-height: 1.6;
}

/* Modale gagnant */
/* lc modal removed — inline result */
.lc-back-btn {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s;
  margin-bottom: 14px;
}
.lc-back-btn:hover {
  border-color: #64748b;
  color: #64748b;
  transform: translateX(-2px);
}

body[data-mode="contact"] {
  --accent: #ff7b5c;
  --accent-light: #ffe8e2;
  --accent-text: #fff;
}
.contact-gate {
  text-align: center;
  padding: 32px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.contact-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  align-items: start;
  margin-top: 8px;
}
@media (max-width: 520px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }
}
.contact-form-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.contact-readonly-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 4px;
}
.contact-readonly-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.contact-readonly-val {
  padding: 9px 12px;
  background: var(--surface2, #f5ede8);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.contact-textarea {
  width: 100%;
  min-height: 140px;
  resize: vertical;
  box-sizing: border-box;
  font-family: inherit;
}
.contact-img-col {
  position: sticky;
  top: 80px;
}
.contact-img-box {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3/4;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  border-radius: var(--radius);
}

.cta-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  min-height: 18px;
  margin-bottom: 6px;
  font-style: italic;
  transition: opacity 0.2s;
}
#admin-bandeau {
  display: none;
  padding: 11px 16px;
  border-radius: 10px;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: #2d2d2d;
  margin: 0 0 14px 0;
}
#admin-bandeau.visible {
  display: block;
}
#admin-bandeau.bg-rouge {
  background: #ffcdd2;
}
#admin-bandeau.bg-orange {
  background: #ffe0b2;
}
#admin-bandeau.bg-jaune {
  background: #fff9c4;
}
#admin-bandeau.bg-bleu {
  background: #bbdefb;
}
#admin-bandeau.bg-vert {
  background: #c8e6c9;
}

/* ── Santa toggles ── */
.santa-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  background: #fff;
  border: 1.5px solid #ccc;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 0;
}
.santa-toggle-row:hover {
  border-color: var(--accent);
}
.santa-toggle-row.open {
  border-color: #ccc !important;
}
.santa-toggle-row.open {
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border-color: var(--accent);
  margin-bottom: 0;
}
.santa-toggle-label {
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--text);
}
.santa-toggle-sub {
  font-size: 0.73rem;
  color: var(--text-muted);
  margin-top: 1px;
}
.mini-toggle {
  width: 36px;
  height: 20px;
  border-radius: 10px;
  background: #ddd;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}
.mini-toggle.on {
  background: var(--accent);
}
.mini-toggle::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  background: white;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: left 0.18s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.mini-toggle.on::after {
  left: 19px;
}
/* Zone dépliante — fond blanc, bordure gris */
.santa-option-body {
  display: none;
  padding: 14px;
  background: #fff;
  border: 1.5px solid #ccc;
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  margin-bottom: 10px;
}
.santa-option-body.open {
  display: block;
  animation: fadeSlideIn 0.18s ease;
}
/* ── Budget double-slider ── */
.budget-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
}
.budget-price-tag {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent);
  min-width: 38px;
  text-align: center;
  flex-shrink: 0;
}
/* Le slider utilise une approche native visible — un seul range stylé */
.budget-slider-wrap {
  flex: 1;
  position: relative;
  height: 44px;
  display: flex;
  align-items: center;
}
.budget-track {
  position: absolute;
  left: 0;
  right: 0;
  height: 5px;
  background: #e0e0e0;
  border-radius: 3px;
  top: 50%;
  transform: translateY(-50%);
}
.budget-fill {
  position: absolute;
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
}
/* Les deux inputs superposés — VISIBLES avec styling natif */
.budget-slider-wrap input[type="range"] {
  position: absolute;
  left: 0;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  pointer-events: none;
  height: 44px;
  margin: 0;
}
.budget-slider-wrap input[type="range"]::-webkit-slider-runnable-track {
  height: 5px;
  background: transparent;
  border-radius: 3px;
}
.budget-slider-wrap input[type="range"]::-webkit-slider-thumb {
  pointer-events: all;
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  cursor: grab;
  margin-top: -10px;
}
.budget-slider-wrap input[type="range"]:active::-webkit-slider-thumb {
  cursor: grabbing;
  transform: scale(1.1);
}
.budget-slider-wrap input[type="range"]::-moz-range-track {
  height: 5px;
  background: transparent;
  border-radius: 3px;
}
.budget-slider-wrap input[type="range"]::-moz-range-thumb {
  pointer-events: all;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  cursor: grab;
}
/* ── Budget badge dans le tirage ── */
.santa-budget-badge {
  display: block;
  text-align: center;
  padding: 6px 12px;
  background: var(--accent-light);
  border-radius: 20px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--accent);
  margin: 4px auto 8px;
  width: fit-content;
}
.santa-msg-badge {
  display: block;
  text-align: center;
  padding: 6px 12px;
  background: var(--accent-light);
  border-radius: 20px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--accent);
  margin: 4px auto 8px;
  width: fit-content;
  font-style: italic;
}
/* ── Wishlist dans panel compte ── */
.wishlist-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.wishlist-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.wishlist-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px 5px 12px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 14px;
  font-size: 0.82rem;
  font-weight: 700;
}
.wishlist-chip-del {
  cursor: pointer;
  font-size: 0.7rem;
  opacity: 0.6;
  transition: opacity 0.15s;
  padding: 11px;
  margin: -11px;
  box-sizing: content-box;
  position: relative;
  z-index: 1;
}
.wishlist-chip-del:hover {
  opacity: 1;
}
.wishlist-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  min-height: 28px;
}
.wishlist-add-row {
  display: flex;
  gap: 6px;
}

.lang-label {
  display: inline;
}
.lang-label-mobile-only {
  display: none;
}
.lang-label-dropdown {
  display: inline;
}
#lang-code {
  display: inline;
}
@media (max-width: 480px) {
  .lang-label {
    display: none;
  }
  .lang-label-mobile-only {
    display: inline;
  }
  #lang-code {
    display: none;
  }
}

/* ── Page Home ──────────────────────────────────────────────── */
.home-page {
  position: relative;
  overflow-x: hidden;
  margin-top: -28px;
}
.home-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  background-size: 200px;
  pointer-events: none;
  z-index: 0;
}
.home-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
  animation: hblob 18s ease-in-out infinite alternate;
}
.home-blob-1 {
  width: 500px;
  height: 500px;
  background: #ffb5a0;
  top: -150px;
  left: -100px;
}
.home-blob-2 {
  width: 400px;
  height: 400px;
  background: #c5b8ff;
  bottom: -100px;
  right: -80px;
  animation-delay: -6s;
}
.home-blob-3 {
  width: 300px;
  height: 300px;
  background: #ffe4b0;
  top: 40%;
  left: 60%;
  animation-delay: -12s;
}
@keyframes hblob {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(30px, -40px) scale(1.08);
  }
}
.home-wrap {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
/* Hero */
.home-hero {
  text-align: center;
  padding: 72px 0 56px;
}
.home-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(232, 68, 90, 0.1);
  color: #e8445a;
  border: 1px solid rgba(232, 68, 90, 0.2);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 28px;
  letter-spacing: 0.02em;
}
.home-hero .hero-title {
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}
.home-hero .hero-title em {
  font-style: italic;
  color: #e8445a;
  font-weight: 700;
}
.home-hero p {
  font-size: 1.1rem;
  color: #5c4f4a;
  max-width: 900px;
  margin: 0 auto 36px;
  line-height: 1.6;
}
.home-hero-ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.home-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #e8445a;
  color: #fff;
  padding: 16px 32px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(232, 68, 90, 0.35);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.home-btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(232, 68, 90, 0.45);
}
.home-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--text);
  padding: 16px 28px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 500;
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition:
    transform 0.2s,
    border-color 0.2s;
}
.home-btn-ghost:hover {
  transform: translateY(-3px);
  border-color: rgba(61, 53, 50, 0.3);
}
/* Santa spotlight */
.home-santa-wrap {
  max-width: 1100px;
  margin: 0 auto 80px;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}
.home-santa-card {
  background: linear-gradient(135deg, #e8445a 0%, #ff6b6b 50%, #ff8e53 100%);
  border-radius: 28px;
  padding: 56px 48px;
  color: #fff;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(232, 68, 90, 0.3);
  opacity: 0;
  animation: hfadeup 0.8s ease 0.4s forwards;
}
.home-santa-card::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 240px;
  height: 240px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}
.home-santa-card::after {
  content: "";
  position: absolute;
  bottom: -80px;
  right: 120px;
  width: 180px;
  height: 180px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
}
.home-santa-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.home-santa-card h2 {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.home-santa-card p {
  font-size: 1.05rem;
  opacity: 0.95;
  line-height: 1.65;
  margin-bottom: 28px;
}
.home-santa-feats {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
}
.home-santa-feat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  opacity: 0.95;
}
.home-santa-feat::before {
  content: "✓";
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.home-btn-santa {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: #e8445a;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  position: relative;
  z-index: 1;
}
.home-btn-santa:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}
.home-santa-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}
.home-santa-orb {
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  animation: hfloat 4s ease-in-out infinite;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}
@keyframes hfloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}
.home-santa-tags {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.home-santa-tag {
  position: absolute;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.3);
  animation: htagf 3.8s ease-in-out infinite;
}
.home-santa-tag:nth-child(1) {
  top: 8%;
  left: 0%;
}
.home-santa-tag:nth-child(2) {
  top: 22%;
  right: 0%;
  animation-duration: 3.2s;
  animation-delay: 0.4s;
}
.home-santa-tag:nth-child(3) {
  bottom: 12%;
  left: 0%;
  animation-duration: 4.2s;
  animation-delay: 0.8s;
}
.home-santa-tag:nth-child(4) {
  bottom: 2%;
  right: 0%;
  animation-duration: 3.6s;
  animation-delay: 1.2s;
}
@keyframes htagf {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}
/* Section modes */
.home-modes-wrap {
  max-width: 1100px;
  margin: 0 auto 80px;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}
.home-section-header {
  text-align: center;
  margin-bottom: 48px;
}
.home-section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.home-section-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.home-modes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.home-mode-card {
  background: #fff;
  border-radius: 20px;
  padding: 32px 28px;
  border: 1.5px solid var(--border);
  cursor: pointer;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition:
    transform 0.25s,
    box-shadow 0.25s,
    border-color 0.25s;
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: hfadeup 0.6s ease forwards;
}
.home-mode-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
  border-color: var(--hmc);
}
.home-mode-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: color-mix(in srgb, var(--hmc) 12%, transparent);
  transition: transform 0.25s;
}
.home-mode-card:hover .home-mode-icon {
  transform: scale(1.1) rotate(-4deg);
}
.home-mode-name {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.home-mode-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}
.home-mode-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--hmc);
  transition: gap 0.2s;
}
.home-mode-card:hover .home-mode-arrow {
  gap: 10px;
}
/* Trust */
.home-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 40px 24px 80px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.home-trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
}
.home-trust-icon {
  width: 36px;
  height: 36px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
@keyframes hfadeup {
  to {
    opacity: 1;
    transform: none;
  }
}
.home-hero > * {
  opacity: 0;
  transform: translateY(20px);
  animation: hfadeup 0.7s ease forwards;
}
.home-hero > *:nth-child(1) {
  animation-delay: 0.1s;
}
.home-hero > *:nth-child(2) {
  animation-delay: 0.2s;
}
.home-hero > *:nth-child(3) {
  animation-delay: 0.3s;
}
.home-hero > *:nth-child(4) {
  animation-delay: 0.4s;
}
.home-modes-grid .home-mode-card:nth-child(1) {
  animation-delay: 0.1s;
}
.home-modes-grid .home-mode-card:nth-child(2) {
  animation-delay: 0.2s;
}
.home-modes-grid .home-mode-card:nth-child(3) {
  animation-delay: 0.3s;
}
.home-modes-grid .home-mode-card:nth-child(4) {
  animation-delay: 0.4s;
}
.home-modes-grid .home-mode-card:nth-child(5) {
  animation-delay: 0.5s;
}
.home-modes-grid .home-mode-card:nth-child(6) {
  animation-delay: 0.6s;
}
@media (max-width: 700px) {
  .home-santa-card {
    grid-template-columns: 1fr;
    padding: 36px 28px;
  }
  .home-santa-visual {
    display: none;
  }
  .home-hero {
    text-align: center;
    padding: 12px 0 32px;
  }
  .home-modes-grid {
    grid-template-columns: 1fr;
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  header {
    height: 48px;
  }
  .mode-bar {
    top: 48px;
  }
  main {
    padding-top: 100px;
  }
  .home-page {
    margin-top: -12px;
  }
}
/* Connexion rapide (Google / Facebook) */
.oauth-sep {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 12px;
  font-size: 0.78rem;
  color: var(--text-muted, #9b8a84);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}
.oauth-sep::before,
.oauth-sep::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border, #ede0d8);
}
.oauth-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid var(--border, #ede0d8);
  transition:
    filter 0.15s,
    transform 0.15s;
}
.oauth-btn:hover {
  filter: brightness(0.97);
  transform: translateY(-1px);
}
.oauth-google {
  background: #fff;
  color: #1f1f1f;
}
.oauth-facebook {
  background: #1877f2;
  border-color: #1877f2;
  color: #fff;
}
/* Chargement Secret Santa (chargeur + cartes fantômes animées) */
.santa-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 10px;
  border-radius: var(--radius-sm, 10px);
  background: #fff3cc;
  color: #9b6800;
  font-size: 0.84rem;
  font-weight: 600;
}
.santa-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2.5px solid currentColor;
  border-right-color: transparent;
  animation: santaSpin 0.7s linear infinite;
  flex-shrink: 0;
}
.santa-spinner.small {
  width: 10px;
  height: 10px;
  border-width: 2px;
  margin-left: 8px;
  vertical-align: -1px;
  opacity: 0.6;
}
.santa-skel {
  height: 54px;
  border-radius: 14px;
  margin-bottom: 8px;
  background: linear-gradient(90deg, #f3e9e3 25%, #fbf5f1 50%, #f3e9e3 75%);
  background-size: 200% 100%;
  animation: santaShimmer 1.2s ease-in-out infinite;
}
.santa-skel + .santa-skel {
  opacity: 0.6;
}
@keyframes santaSpin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes santaShimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .santa-spinner,
  .santa-skel {
    animation: none;
  }
}

/* Chargement Secret Santa : cadeau qui sautille, texte à points animés,
   barre de progression continue (affiché avant même le JavaScript) */
.santa-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 22px 16px 18px;
  margin-bottom: 12px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff7e6 0%, #ffeef0 100%);
  border: 1.5px solid #f8dfcf;
  color: #9b5a00;
  text-align: center;
}
.santa-loader-gift {
  font-size: 2.4rem;
  line-height: 1;
  animation: santaGift 1.4s ease-in-out infinite;
  transform-origin: 50% 100%;
}
.santa-loader-text {
  font-size: 0.92rem;
  font-weight: 700;
}
.santa-dots i {
  font-style: normal;
  animation: santaDot 1.4s infinite;
  opacity: 0;
}
.santa-dots i:nth-child(2) {
  animation-delay: 0.2s;
}
.santa-dots i:nth-child(3) {
  animation-delay: 0.4s;
}
.santa-loader-bar {
  width: min(220px, 70%);
  height: 5px;
  border-radius: 5px;
  background: rgba(232, 68, 90, 0.15);
  overflow: hidden;
}
.santa-loader-bar span {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, #ff7b5c, #e8445a);
  animation: santaBar 1.3s ease-in-out infinite;
}
@keyframes santaGift {
  0%, 100% { transform: translateY(0) rotate(0); }
  25% { transform: translateY(-10px) rotate(-8deg); }
  50% { transform: translateY(0) rotate(0); }
  70% { transform: translateY(-4px) rotate(6deg); }
}
@keyframes santaDot {
  0%, 20% { opacity: 0; }
  40%, 80% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes santaBar {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(260%); }
}
@media (prefers-reduced-motion: reduce) {
  .santa-loader-gift,
  .santa-loader-bar span {
    animation: none;
  }
  .santa-dots i {
    animation: none;
    opacity: 1;
  }
}
/* Lancement d'un tirage : même animation, un peu plus présente */
.santa-loader--launch {
  margin-top: 8px;
  padding: 26px 16px 22px;
}
.santa-loader--launch .santa-loader-gift {
  font-size: 2.8rem;
}
/* Version compacte (liste d'idées cadeaux du panneau « Mon compte ») */
.santa-loader--compact {
  gap: 6px;
  padding: 12px 12px 10px;
  margin: 4px 0 10px;
  border-radius: 14px;
}
.santa-loader--compact .santa-loader-gift {
  font-size: 1.7rem;
}
.santa-loader--compact .santa-loader-text {
  font-size: 0.82rem;
}
.santa-loader--compact .santa-loader-bar {
  height: 4px;
}
/* Pastilles fantômes à la place des mots de la liste */
.wish-skel {
  display: inline-block;
  width: 72px;
  height: 28px;
  border-radius: 20px;
  background: linear-gradient(90deg, #f3e9e3 25%, #fbf5f1 50%, #f3e9e3 75%);
  background-size: 200% 100%;
  animation: santaShimmer 1.2s ease-in-out infinite;
}
.wish-skel:nth-child(2) {
  width: 56px;
  opacity: 0.8;
}
.wish-skel:nth-child(3) {
  width: 88px;
  opacity: 0.6;
}
@media (prefers-reduced-motion: reduce) {
  .wish-skel {
    animation: none;
  }
}
/* Cadre « Comment ça marche » : invisible tant que le script ne l'a pas rempli */
.santa-how:empty {
  display: none;
}
/* Liens de navigation (anciennement des boutons) */
a.mode-btn,
a.home-mode-card {
  text-decoration: none;
}
/* Bloc « À propos » de l'outil (texte SEO visible, rendu par le serveur) */
.seo-about {
  display: none;
  max-width: 760px;
  margin: 48px auto 8px;
  padding: 24px 22px;
  border-top: 1px solid var(--border, #ede0d8);
  color: var(--text-muted, #7a6a64);
  font-size: 0.92rem;
  line-height: 1.7;
}
.seo-about h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text, #3d3532);
  margin-bottom: 10px;
}
.seo-about p {
  margin: 0 0 10px;
}
.seo-faq {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.seo-faq details {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #ede0d8);
  border-radius: 12px;
  padding: 10px 14px;
}
.seo-faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text, #3d3532);
}
.seo-faq details p {
  margin: 8px 0 2px;
}
body[data-mode="home"] .seo-about[data-for="home"],
body[data-mode="classic"] .seo-about[data-for="classic"],
body[data-mode="equipe"] .seo-about[data-for="equipe"],
body[data-mode="melimelo"] .seo-about[data-for="melimelo"],
body[data-mode="santa"] .seo-about[data-for="santa"],
body[data-mode="coin"] .seo-about[data-for="coin"],
body[data-mode="paille"] .seo-about[data-for="paille"],
body[data-mode="roue"] .seo-about[data-for="roue"],
body[data-mode="attrib"] .seo-about[data-for="attrib"] {
  display: block;
}
