/* ===========================
   LOUP-GAROU MJ — STYLES
   Thème: Nuit médiévale sombre
   =========================== */

:root {
  --bg-deep: #0a0810;
  --bg-dark: #110d1a;
  --bg-card: #1a1428;
  --bg-card2: #221b35;
  --accent-gold: #c9a227;
  --accent-gold-light: #f0c84a;
  --accent-red: #c0392b;
  --accent-red-dark: #8b1a1a;
  --accent-blue: #2980b9;
  --accent-purple: #6c3483;
  --accent-green: #1e8449;
  --text-primary: #e8d5b7;
  --text-secondary: #9a8870;
  --text-muted: #5a4d3d;
  --border-gold: rgba(201, 162, 39, 0.4);
  --border-dim: rgba(255,255,255,0.08);
  --shadow-glow: 0 0 30px rgba(201, 162, 39, 0.2);
  --font-title: 'Cinzel Decorative', serif;
  --font-heading: 'Cinzel', serif;
  --font-body: 'IM Fell English', serif;
  --radius: 12px;
  --radius-lg: 20px;
}

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

html, body {
  /* Empêche le zoom au double-tap (iOS Safari) et le pinch-zoom */
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Boutons et zones cliquables : pas de zoom au double-tap */
button, .choose-btn, .toggle-option, .number-picker button,
.vote-player-btn, .select-player-btn, .role-reveal-card,
.day-timer-btn, .day-timer-adjust-btn,
.btn-primary, .btn-secondary, .btn-back, .btn-danger, .btn-wolf,
.mode-btn, .recap-role-select, .player-input-row input {
  touch-action: manipulation;
}

/* ========================
   SCREENS
   ======================== */
.screen { display: none; min-height: 100vh; background: var(--bg-deep); }
.screen.active { display: block; }

/* ========================
   HOME SCREEN — page unique scrollable
   ======================== */
#screen-home {
  display: block;
  background: var(--bg-deep);
  position: relative;
  min-height: 100vh;
}
#screen-home.active {
  display: block;
}

.home-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(201,162,39,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(108,52,131,0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 60%, rgba(192,57,43,0.15) 0%, transparent 50%),
    linear-gradient(180deg, #0a0810 0%, #110d1a 100%);
  z-index: 0;
  pointer-events: none;
}

.home-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 50% 15%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 45%, rgba(255,255,255,0.2) 0%, transparent 100%),
    radial-gradient(1px 1px at 35% 65%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 85% 20%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(2px 2px at 60% 75%, rgba(255,255,255,0.2) 0%, transparent 100%),
    radial-gradient(1px 1px at 10% 55%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 90% 80%, rgba(255,255,255,0.25) 0%, transparent 100%);
}

/* Section héros — plein écran */
.home-hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.moon-glow {
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240,200,74,0.6) 0%, rgba(201,162,39,0.3) 40%, transparent 70%);
  animation: moonPulse 4s ease-in-out infinite;
  z-index: 1;
  pointer-events: none;
}

@keyframes moonPulse {
  0%, 100% { opacity: 0.7; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.1); }
}

.home-content {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

/* ========================
   SCROLL HINT — chevrons animés
   ======================== */
.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 2;
  opacity: 1;
  transition: opacity 0.6s ease;
  cursor: pointer;
}
.scroll-hint.hidden { opacity: 0; pointer-events: none; }

.scroll-hint-label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-gold);
  opacity: 0.8;
}

.scroll-chevrons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.chevron {
  width: 22px;
  height: 22px;
  border-right: 2.5px solid var(--accent-gold);
  border-bottom: 2.5px solid var(--accent-gold);
  transform: rotate(45deg);
  opacity: 0;
  animation: chevronFade 1.8s ease-in-out infinite;
}
.chevron:nth-child(1) { animation-delay: 0s; }
.chevron:nth-child(2) { animation-delay: 0.25s; }
.chevron:nth-child(3) { animation-delay: 0.5s; }

@keyframes chevronFade {
  0%   { opacity: 0;   transform: rotate(45deg) translateY(-6px); }
  40%  { opacity: 0.9; }
  80%  { opacity: 0;   transform: rotate(45deg) translateY(6px); }
  100% { opacity: 0; }
}

/* ========================
   SETUP ANCHOR — section config
   ======================== */
.setup-anchor {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, transparent 0%, var(--bg-dark) 8%, var(--bg-dark) 100%);
  padding-top: 3rem;
  padding-bottom: 4rem;
}

.setup-title-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-gold);
  margin-bottom: 0.5rem;
}
.setup-title-bar h2 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--accent-gold);
  font-weight: 600;
}
.setup-title-icon { font-size: 1.4rem; }

/* Setup screen (ancienne) — plus nécessaire, désactivée */
#screen-setup { display: none !important; }

.game-title {
  font-family: var(--font-title);
  font-size: clamp(3rem, 12vw, 7rem);
  font-weight: 900;
  line-height: 0.9;
  color: var(--accent-gold-light);
  text-shadow: 0 0 40px rgba(201,162,39,0.6), 0 0 80px rgba(201,162,39,0.3), 2px 2px 0 rgba(0,0,0,0.8);
  letter-spacing: 0.05em;
  animation: titleReveal 1.5s ease-out;
}

.game-title span {
  color: var(--text-primary);
  font-size: 0.6em;
  display: block;
  letter-spacing: 0.2em;
}

@keyframes titleReveal {
  from { opacity: 0; transform: translateY(-30px); filter: blur(10px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.subtitle {
  font-family: var(--font-heading);
  font-size: 1rem;
  letter-spacing: 0.3em;
  color: var(--text-secondary);
  margin: 1rem 0 2.5rem;
  text-transform: uppercase;
}

/* ========================
   BUTTONS
   ======================== */
.btn-primary {
  background: linear-gradient(135deg, #b8860b, #c9a227, #f0c84a);
  color: #1a0e00;
  border: none;
  padding: 0.9rem 2.2rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 20px rgba(201,162,39,0.4), inset 0 1px 0 rgba(255,255,255,0.2);
  display: inline-block;
  text-align: center;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(201,162,39,0.6);
  filter: brightness(1.1);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-gold);
  padding: 0.8rem 1.8rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 0.8rem;
}
.btn-secondary:hover {
  background: rgba(201,162,39,0.1);
  color: var(--accent-gold);
  border-color: var(--accent-gold);
}

.btn-back {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: color 0.2s;
}
.btn-back:hover { color: var(--accent-gold); }

.btn-large { padding: 1.1rem 2.8rem; font-size: 1.1rem; width: 100%; margin-top: 1rem; }

.btn-danger {
  background: linear-gradient(135deg, #8b1a1a, #c0392b);
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-danger:hover { filter: brightness(1.2); }

.btn-wolf {
  background: linear-gradient(135deg, #1a0d2e, #3d1a5e);
  color: #c4a2e8;
  border: 1px solid rgba(196,162,232,0.3);
  padding: 0.6rem 1.2rem;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
}

/* ========================
   SCREEN HEADER
   ======================== */
.screen-header {
  background: linear-gradient(180deg, rgba(17,13,26,0.98) 0%, rgba(17,13,26,0.9) 100%);
  border-bottom: 1px solid var(--border-gold);
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.screen-header h2 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--accent-gold);
  font-weight: 600;
}
.screen-header small {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: var(--font-body);
  font-style: italic;
  margin-left: auto;
}

/* ========================
   SETUP SECTION (embedded in home screen)
   ======================== */
.setup-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 1.5rem;
}

.setup-section {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.2rem;
}
.setup-section > label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--accent-gold);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}
.setup-section > label small {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  display: block;
  margin-top: 0.2rem;
}

.number-picker {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.number-picker button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-gold);
  background: var(--bg-card2);
  color: var(--accent-gold);
  font-size: 1.4rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.number-picker button:hover { background: rgba(201,162,39,0.2); }
#player-count {
  font-family: var(--font-title);
  font-size: 2.5rem;
  color: var(--accent-gold-light);
  min-width: 3rem;
  text-align: center;
}

.player-inputs { display: flex; flex-direction: column; gap: 0.5rem; }
.player-input-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.player-input-row .seat-number {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--text-muted);
  min-width: 1.5rem;
  text-align: right;
}
.player-input-row input {
  flex: 1;
  background: var(--bg-deep);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  padding: 0.7rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.2s;
}
.player-input-row input:focus {
  outline: none;
  border-color: var(--accent-gold);
}
.player-input-row input::placeholder { color: var(--text-muted); }

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.5rem;
}
.toggle-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.8rem;
  background: var(--bg-deep);
  border-radius: var(--radius);
  border: 1px solid var(--border-dim);
  cursor: pointer;
  font-size: 0.88rem;
  transition: all 0.2s;
}
.toggle-option:hover { border-color: var(--border-gold); }
.toggle-option input[type="checkbox"] {
  accent-color: var(--accent-gold);
  width: 15px;
  height: 15px;
}

.composition-preview {
  background: var(--bg-card2);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  margin-top: 1rem;
}

/* ========================
   ROLES REVEAL SCREEN
   ======================== */
#roles-reveal-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.5rem;
  justify-content: center;
}

/* Nom du joueur en gros dans la modale */
.reveal-player-banner {
  text-align: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-dim);
}
.reveal-player-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}
.reveal-player-bigname {
  display: block;
  font-family: var(--font-title);
  font-size: 2rem;
  color: var(--accent-gold-light);
  text-shadow: 0 0 20px rgba(201,162,39,0.5);
  letter-spacing: 0.05em;
}

.role-reveal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  width: 130px;
}
.role-reveal-card:hover { border-color: var(--accent-gold); transform: translateY(-2px); }
.role-reveal-card .player-name {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}
.role-reveal-card .role-icon-big { font-size: 2.5rem; margin-bottom: 0.3rem; }
.role-reveal-card .role-name-reveal {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  color: var(--accent-gold);
}

/* Carte déjà vue — grisée */
.role-reveal-card.seen {
  opacity: 0.45;
  filter: grayscale(0.6);
  border-color: transparent;
}
.role-reveal-card.seen:hover {
  opacity: 0.7;
  filter: grayscale(0.3);
  transform: none;
}
.role-reveal-card.seen .role-name-reveal {
  color: var(--text-muted);
}
.seen-check {
  font-size: 1rem;
  margin-top: 0.3rem;
  color: #52be80;
  display: block;
}

.roles-actions {
  padding: 1rem 1.5rem;
  max-width: 400px;
  margin: 0 auto;
}

/* ========================
   MODAL
   ======================== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-glow);
  animation: modalIn 0.3s ease-out;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-tap-to-reveal {
  cursor: pointer;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.reveal-back {
  text-align: center;
}
.reveal-back span { font-size: 4rem; display: block; margin-bottom: 0.5rem; }
.reveal-back p {
  color: var(--text-secondary);
  font-style: italic;
}
.reveal-front { text-align: center; }
.reveal-role-icon { font-size: 4rem; margin-bottom: 0.5rem; }
.reveal-front h2 {
  font-family: var(--font-heading);
  color: var(--accent-gold-light);
  font-size: 1.5rem;
}
.reveal-player-name {
  color: var(--text-secondary);
  font-style: italic;
  margin-top: 0.3rem;
}
.reveal-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.8rem;
  line-height: 1.5;
}

.modal-select-card { max-width: 500px; text-align: left; }
.modal-select-card h3 {
  font-family: var(--font-heading);
  color: var(--accent-gold);
  margin-bottom: 1rem;
  text-align: center;
}
.modal-select-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 1rem;
}
.select-player-btn {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  background: var(--bg-card2);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}
.select-player-btn:hover { border-color: var(--accent-gold); background: rgba(201,162,39,0.1); }
.select-player-btn.selected { border-color: var(--accent-gold); background: rgba(201,162,39,0.2); }
.select-player-btn .player-role-hint {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ========================
   GAME HEADER
   ======================== */
.game-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  background: rgba(10,8,16,0.95);
  border-bottom: 1px solid var(--border-gold);
  backdrop-filter: blur(10px);
}

.phase-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}
#phase-icon { font-size: 1.4rem; }
#phase-text {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--accent-gold);
  font-weight: 600;
}

.btn-players-toggle, .btn-history {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  color: var(--text-secondary);
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  transition: all 0.2s;
}
.btn-players-toggle:hover, .btn-history:hover {
  border-color: var(--border-gold);
  color: var(--accent-gold);
}

/* ========================
   PLAYER PANEL
   ======================== */
.player-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  max-width: 90vw;
  background: var(--bg-dark);
  border-left: 1px solid var(--border-gold);
  z-index: 300;
  overflow-y: auto;
  transition: transform 0.3s ease;
  padding-bottom: 2rem;
}
.player-panel.closed { transform: translateX(100%); }
.player-panel.open { transform: translateX(0); }

.player-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border-dim);
  position: sticky;
  top: 0;
  background: var(--bg-dark);
}
.player-panel-header h3 {
  font-family: var(--font-heading);
  color: var(--accent-gold);
  font-size: 1rem;
}
.player-panel-header button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
}

.player-list-panel { padding: 0.8rem; }
.player-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.8rem;
  border-radius: var(--radius);
  margin-bottom: 0.4rem;
  border: 1px solid var(--border-dim);
  background: var(--bg-card);
  transition: all 0.2s;
  position: relative;
}
.player-item.dead {
  opacity: 0.4;
  filter: grayscale(1);
}
.player-item.dead::after {
  content: '💀';
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
}
.player-item .player-seat {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 1.5rem;
}
.player-item .player-emoji { font-size: 1.4rem; }
.player-item .player-info { flex: 1; }
.player-item .player-info .pname {
  font-family: var(--font-heading);
  font-size: 0.9rem;
}
.player-item .player-info .prole {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}
.player-item .status-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
}
.badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 0.03em;
}
.badge-protected { background: rgba(30,132,73,0.3); color: #52be80; border: 1px solid rgba(30,132,73,0.4); }
.badge-charmed { background: rgba(108,52,131,0.3); color: #c39bd3; border: 1px solid rgba(108,52,131,0.4); }
.badge-infected { background: rgba(192,57,43,0.3); color: #f1948a; border: 1px solid rgba(192,57,43,0.4); }
.badge-sheep { background: rgba(135,135,135,0.3); color: #e0e0e0; border: 1px solid rgba(135,135,135,0.4); }
.badge-crow { background: rgba(100,100,100,0.3); color: #bbb; border: 1px solid rgba(100,100,100,0.4); }

/* ========================
   GAME MAIN
   ======================== */
.game-main {
  padding: 70px 1rem 2rem;
  max-width: 650px;
  margin: 0 auto;
}

/* ========================
   ACTION CARD
   ======================== */
.action-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-glow);
  animation: cardIn 0.4s ease-out;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.action-role-icon {
  font-size: 3.5rem;
  text-align: center;
  margin-bottom: 0.5rem;
  display: block;
  filter: drop-shadow(0 0 15px rgba(201,162,39,0.4));
}

.action-card h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--accent-gold-light);
  text-align: center;
  margin-bottom: 1rem;
}

.action-narration {
  background: rgba(0,0,0,0.3);
  border-left: 3px solid var(--accent-gold);
  padding: 1rem 1.2rem;
  margin-bottom: 1.2rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  line-height: 1.7;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.action-choices {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.choice-group {
  background: var(--bg-card2);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  padding: 1rem;
}
.choice-group label {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--accent-gold);
  display: block;
  margin-bottom: 0.7rem;
}
.choice-group-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.choose-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: var(--bg-deep);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}
.choose-btn:hover { border-color: var(--accent-gold); color: var(--accent-gold); }
.choose-btn.active { border-color: var(--accent-gold); background: rgba(201,162,39,0.2); color: var(--accent-gold-light); }

.selected-display {
  margin-top: 0.6rem;
  padding: 0.5rem 0.8rem;
  background: rgba(201,162,39,0.1);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--accent-gold);
  font-family: var(--font-heading);
}

.action-result {
  background: rgba(30,132,73,0.15);
  border: 1px solid rgba(30,132,73,0.3);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ========================
   MORNING REPORT
   ======================== */
.morning-report {
  background: var(--bg-card);
  border: 2px solid var(--accent-gold);
  border-radius: var(--radius-lg);
  padding: 2rem;
  animation: cardIn 0.4s ease-out;
}
.morning-report h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: #f0c84a;
  text-align: center;
  margin-bottom: 1.5rem;
}
#morning-events { margin-bottom: 1.5rem; }
.morning-event {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.8rem;
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
}
.morning-event.death { background: rgba(192,57,43,0.2); border: 1px solid rgba(192,57,43,0.3); }
.morning-event.saved { background: rgba(30,132,73,0.2); border: 1px solid rgba(30,132,73,0.3); }
.morning-event.info { background: rgba(41,128,185,0.2); border: 1px solid rgba(41,128,185,0.3); }
.morning-event.warning { background: rgba(230,126,34,0.2); border: 1px solid rgba(230,126,34,0.3); }
.morning-event .event-icon { font-size: 1.3rem; flex-shrink: 0; }

/* ========================
   DAY PHASE
   ======================== */
.day-phase {
  background: var(--bg-card);
  border: 1px solid rgba(240,200,74,0.3);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  animation: cardIn 0.4s ease-out;
}
.day-phase h2 {
  font-family: var(--font-heading);
  color: #f0c84a;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}
.day-instructions {
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 1rem;
}

.day-reminders {
  margin-bottom: 1.2rem;
}
.day-reminder {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.8rem;
  background: rgba(41,128,185,0.15);
  border: 1px solid rgba(41,128,185,0.3);
  border-radius: var(--radius);
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
}

.vote-section h3 {
  font-family: var(--font-heading);
  color: var(--accent-gold);
  font-size: 1rem;
  margin-bottom: 0.8rem;
}
.vote-players {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.vote-player-btn {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 1rem;
  background: var(--bg-card2);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  color: var(--text-primary);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all 0.2s;
  text-align: left;
}
.vote-player-btn:hover { border-color: var(--accent-red); }
.vote-player-btn.selected { border-color: var(--accent-red); background: rgba(192,57,43,0.2); }
.vote-player-btn .vote-extra-voice {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ========================
   CIRCLE VIEW
   ======================== */
.circle-view {
  position: relative;
  width: 260px;
  height: 270px;
  margin: 1rem auto;
}
/* Wrapper : centré sur le point du cercle */
.circle-player-wrapper {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transform: translate(-50%, -50%);
  cursor: default;
}
.circle-player-wrapper.dead { opacity: 0.3; filter: grayscale(1); }

.circle-player-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  border: 2px solid var(--border-gold);
  background: var(--bg-card);
  flex-shrink: 0;
}

.circle-player-dot-label {
  font-size: 0.58rem;
  font-family: var(--font-heading);
  color: var(--text-secondary);
  text-align: center;
  white-space: nowrap;
  background: rgba(10,8,16,0.85);
  padding: 1px 4px;
  border-radius: 3px;
  pointer-events: none;
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========================
   HISTORY
   ======================== */
.history-content { padding: 1rem; max-width: 700px; margin: 0 auto; }
.history-night-block {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  padding: 1.2rem;
  margin-bottom: 1rem;
}
.history-night-block h3 {
  font-family: var(--font-heading);
  color: var(--accent-gold);
  margin-bottom: 0.8rem;
  font-size: 1rem;
}
.history-event { font-size: 0.85rem; padding: 0.3rem 0; color: var(--text-secondary); border-bottom: 1px solid var(--border-dim); }

/* ========================
   END SCREEN
   ======================== */
.end-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  text-align: center;
  background: radial-gradient(ellipse at center, rgba(201,162,39,0.1) 0%, transparent 70%);
}
.end-icon { font-size: 5rem; margin-bottom: 1rem; }
.end-content h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--accent-gold-light);
  margin-bottom: 1rem;
}
.end-content p { color: var(--text-secondary); font-size: 1.1rem; margin-bottom: 1.5rem; }
.end-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}
.end-role-tag {
  padding: 0.4rem 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  font-size: 0.85rem;
}

/* ========================
   COMPOSITION PREVIEW
   ======================== */
.comp-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.comp-tag {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.7rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-family: var(--font-heading);
}
.comp-tag.wolf { background: rgba(192,57,43,0.25); border: 1px solid rgba(192,57,43,0.4); color: #f1948a; }
.comp-tag.village { background: rgba(30,132,73,0.2); border: 1px solid rgba(30,132,73,0.35); color: #82e0aa; }
.comp-tag.neutral { background: rgba(108,52,131,0.2); border: 1px solid rgba(108,52,131,0.35); color: #c39bd3; }

.comp-summary {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
}

/* ========================
   TOOLTIPS & MISC
   ======================== */
.info-box {
  background: rgba(41,128,185,0.15);
  border: 1px solid rgba(41,128,185,0.3);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  font-size: 0.85rem;
  color: #7fb3d3;
  margin: 0.5rem 0;
  line-height: 1.5;
}

.warn-box {
  background: rgba(230,126,34,0.15);
  border: 1px solid rgba(230,126,34,0.3);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  font-size: 0.85rem;
  color: #f0a76b;
  margin: 0.5rem 0;
  line-height: 1.5;
}

/* Bear growl animation */
@keyframes bearGrowl {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.1) rotate(-3deg); }
  75% { transform: scale(1.1) rotate(3deg); }
}
.bear-growl { animation: bearGrowl 0.6s ease-in-out; }

/* Night / Day atmosphere */
.night-mode { background: linear-gradient(180deg, #0a0810 0%, #0d0b18 100%); }
.day-mode { background: linear-gradient(180deg, #1a1005 0%, #0d0b18 100%); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--border-gold); border-radius: 3px; }

/* Responsive */
@media (max-width: 480px) {
  .game-title { font-size: 3.5rem; }
  .options-grid { grid-template-columns: 1fr 1fr; }
  .player-panel { width: 100%; }
}

/* ========================
   RECAP MJ SCREEN
   ======================== */
#screen-recap {
  background: linear-gradient(180deg, #0d0a18 0%, #0a0810 100%);
}
.recap-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 1.5rem;
}
.recap-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.recap-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}
.recap-row:hover { border-color: var(--border-gold); }
.recap-seat {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  color: var(--text-muted);
  min-width: 1.8rem;
  text-align: right;
}
.recap-player-name {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  min-width: 100px;
  color: var(--text-primary);
}
.recap-role-icon { font-size: 1.4rem; }
.recap-role-select {
  flex: 1;
  background: var(--bg-deep);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  padding: 0.5rem 0.8rem;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s;
}
.recap-role-select:focus { outline: none; border-color: var(--accent-gold); }
.recap-team-badge {
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  border-radius: 20px;
  font-family: var(--font-heading);
  white-space: nowrap;
}
.recap-team-wolves { background: rgba(192,57,43,0.25); color: #f1948a; border: 1px solid rgba(192,57,43,0.4); }
.recap-team-village { background: rgba(30,132,73,0.2); color: #82e0aa; border: 1px solid rgba(30,132,73,0.35); }
.recap-team-neutral { background: rgba(212,172,13,0.2); color: #f4d03f; border: 1px solid rgba(212,172,13,0.35); }
.recap-team-lone_wolf { background: rgba(220,220,220,0.15); color: #e0e0e0; border: 1px solid rgba(220,220,220,0.3); }
.recap-warning {
  background: rgba(192,57,43,0.15);
  border: 1px solid rgba(192,57,43,0.3);
  border-radius: var(--radius);
  padding: 0.7rem 1rem;
  font-size: 0.85rem;
  color: #f1948a;
  margin-bottom: 1rem;
  display: none;
}
.recap-actions {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

/* ========================
   MORNING "DIRE À VOIX HAUTE"
   ======================== */
.morning-say-aloud {
  background: rgba(30, 132, 73, 0.15);
  border: 2px solid rgba(30, 132, 73, 0.5);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
}
.morning-say-aloud .aloud-label {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  color: #52be80;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  margin-top: 0.15rem;
  background: rgba(30,132,73,0.3);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  flex-shrink: 0;
}
.morning-say-aloud .aloud-text {
  color: #a9dfbf;
  font-size: 0.95rem;
  line-height: 1.5;
  font-style: italic;
}
.morning-section-title {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 1rem 0 0.4rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border-dim);
}

/* Setup mode buttons */
.setup-mode-btns {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 1rem;
}
.mode-btn {
  flex: 1;
  padding: 0.8rem;
  border-radius: var(--radius);
  border: 2px solid var(--border-dim);
  background: var(--bg-deep);
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.mode-btn.active {
  border-color: var(--accent-gold);
  background: rgba(201,162,39,0.1);
  color: var(--accent-gold-light);
}

/* ========================
   OPTIONS PAR ÉQUIPE
   ======================== */
.options-team-block {
  margin-bottom: 1rem;
}
.options-team-title {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
}
.wolf-title    {
  color: #f1948a;
  background: rgba(192,57,43,0.15);
  border-left: 3px solid rgba(192,57,43,0.5);
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}
.team-title-suggestion {
  font-size: 0.7rem;
  color: #f1c0bd;
  background: rgba(192,57,43,0.3);
  padding: 0.18rem 0.55rem;
  border-radius: 12px;
  letter-spacing: 0.06em;
  font-family: var(--font-heading);
}
.team-title-suggestion strong {
  color: #fff7b8;
  font-size: 0.85rem;
  margin-left: 2px;
}
.village-title { color: #82e0aa; background: rgba(30,132,73,0.12); border-left: 3px solid rgba(30,132,73,0.4); padding-left: 0.5rem; display: block; }
.neutral-title { color: #f4d03f; background: rgba(212,172,13,0.12); border-left: 3px solid rgba(212,172,13,0.4); padding-left: 0.5rem; display: block; }

.opt-required {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-style: italic;
  margin-left: 0.2rem;
}

/* Checkbox désactivé */
.toggle-option input[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}
.toggle-option:has(input[disabled]) {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ========================
   COMPOSITION PREVIEW RICHE
   ======================== */
.composition-preview {
  background: var(--bg-card2);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-top: 1rem;
}
.comp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}
.comp-counts {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.comp-count {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
}
.wolf-count    { background: rgba(192,57,43,0.2); color: #f1948a; }
.village-count { background: rgba(30,132,73,0.2);  color: #82e0aa; }
.neutral-count { background: rgba(212,172,13,0.2); color: #f4d03f; }
.total-count   { background: rgba(255,255,255,0.06); color: var(--text-muted); }

.comp-balance {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius);
}
.balance-ok   { background: rgba(30,132,73,0.2);  color: #82e0aa; border: 1px solid rgba(30,132,73,0.35); }
.balance-warn { background: rgba(230,126,34,0.2); color: #f0a76b; border: 1px solid rgba(230,126,34,0.35); }
.balance-bad  { background: rgba(192,57,43,0.25); color: #f1948a; border: 1px solid rgba(192,57,43,0.45); animation: pulse-warn 1.5s ease-in-out infinite; }

@keyframes pulse-warn {
  0%,100% { box-shadow: 0 0 0 0 rgba(192,57,43,0); }
  50%      { box-shadow: 0 0 8px 2px rgba(192,57,43,0.4); }
}

/* Barre de proportion */
.comp-bar {
  display: flex;
  height: 22px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 0.8rem;
  gap: 2px;
}
.comp-bar-wolf {
  background: linear-gradient(90deg, #8b1a1a, #c0392b);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; color: white; font-family: var(--font-heading);
  transition: width 0.4s ease;
  min-width: 0;
}
.comp-bar-village {
  background: linear-gradient(90deg, #1a5e34, #1e8449);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; color: white; font-family: var(--font-heading);
  transition: width 0.4s ease;
  min-width: 0;
}
.comp-bar-neutral {
  background: linear-gradient(90deg, #7d6608, #d4ac0d);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; color: white; font-family: var(--font-heading);
  transition: width 0.4s ease;
  min-width: 0;
}

.comp-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* ── Wolf count picker ── */
.wolf-count-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 4px 0;
  flex-wrap: wrap;
}
.wolf-count-label {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  color: #e8d5b0;
}
.wolf-count-hint {
  font-size: 0.75rem;
  color: #c0392b;
  font-style: italic;
}
.wolf-count-note {
  font-size: 0.75rem;
  color: #a09070;
  margin: 0 0 10px 0;
  font-style: italic;
  line-height: 1.4;
}
.number-picker-sm {
  gap: 6px;
}
.number-picker-sm button {
  width: 28px;
  height: 28px;
  font-size: 1rem;
  padding: 0;
}
.number-picker-sm span {
  min-width: 24px;
  font-size: 1.1rem;
}
.voyante-exclusivity-warning {
  font-size: 0.8rem;
  color: #e74c3c;
  font-style: italic;
  margin: 4px 0 0 0;
  padding: 6px 10px;
  background: rgba(231,76,60,0.1);
  border-left: 3px solid #e74c3c;
  border-radius: 4px;
}

/* ========================
   DAY TIMER (setup + en jeu)
   ======================== */
.day-timer-row {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}
.day-timer-row .number-picker-sm button {
  width: auto;
  padding: 0 0.6rem;
  font-size: 0.8rem;
  font-family: var(--font-heading);
}
.day-timer-row .number-picker-sm span {
  min-width: 60px;
  font-size: 1.3rem;
  font-family: var(--font-title);
  color: var(--accent-gold-light);
}
.day-timer-toggle {
  margin: 0 !important;
}

.day-timer-block {
  background: var(--bg-card2);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
}
.day-timer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.day-timer-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--accent-gold);
  letter-spacing: 0.05em;
}
.day-timer-adjust {
  display: flex;
  gap: 0.4rem;
}
.day-timer-adjust-btn {
  background: var(--bg-deep);
  border: 1px solid var(--border-dim);
  color: var(--text-secondary);
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}
.day-timer-adjust-btn:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}
.day-timer-value {
  font-family: var(--font-title);
  font-size: 3rem;
  text-align: center;
  color: var(--accent-gold-light);
  text-shadow: 0 0 25px rgba(201,162,39,0.5);
  margin: 0.3rem 0 0.7rem;
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
}
.day-timer-value.warning {
  color: #f0a76b;
  text-shadow: 0 0 25px rgba(230,126,34,0.6);
}
.day-timer-value.urgent {
  color: #f1948a;
  text-shadow: 0 0 30px rgba(192,57,43,0.7);
  animation: pulse-warn 1s ease-in-out infinite;
}
.day-timer-value.expired {
  color: #c0392b;
  animation: pulse-warn 0.6s ease-in-out infinite;
}
.day-timer-controls {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.day-timer-btn {
  flex: 1;
  min-width: 110px;
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
  margin-top: 0;
}

/* ========================
   ICONE NOTE DE MUSIQUE (charmé) dans la liste
   ======================== */
.player-charmed-note {
  display: inline-block;
  margin-left: 0.4rem;
  font-size: 1rem;
  color: #c39bd3;
  filter: drop-shadow(0 0 4px rgba(195,155,211,0.7));
  animation: charmGlow 2.4s ease-in-out infinite;
  vertical-align: middle;
}
.label-charm-note {
  display: inline-block;
  margin-left: 2px;
  font-size: 0.7rem;
  color: #c39bd3;
  filter: drop-shadow(0 0 3px rgba(195,155,211,0.7));
  animation: charmGlow 2.4s ease-in-out infinite;
  vertical-align: middle;
}
@keyframes charmGlow {
  0%, 100% { opacity: 0.7; transform: rotate(-6deg); }
  50% { opacity: 1; transform: rotate(6deg); }
}

/* ========================
   PRÉSETS DE COMPOSITION
   ======================== */
.composition-preset-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--accent-gold-light);
  margin-bottom: 0.7rem;
  letter-spacing: 0.05em;
  text-align: center;
  padding: 0.5rem;
  background: linear-gradient(135deg, rgba(201,162,39,0.1), rgba(201,162,39,0.05));
  border-top: 1px solid var(--border-gold);
  border-bottom: 1px solid var(--border-gold);
}
.composition-preset-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}
.preset-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.8rem 0.4rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--border-dim);
  background: var(--bg-card2);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-heading);
  -webkit-tap-highlight-color: transparent;
}
.preset-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.preset-btn:active { transform: translateY(0); }
.preset-icon { font-size: 1.6rem; }
.preset-label {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.2;
}
.preset-balanced {
  border-color: rgba(201,162,39,0.4);
}
.preset-balanced:hover {
  border-color: var(--accent-gold);
  background: rgba(201,162,39,0.12);
}
.preset-balanced.active {
  border-color: var(--accent-gold);
  background: rgba(201,162,39,0.2);
  box-shadow: 0 0 14px rgba(201,162,39,0.4);
}
.preset-village {
  border-color: rgba(30,132,73,0.4);
}
.preset-village:hover {
  border-color: #1e8449;
  background: rgba(30,132,73,0.15);
}
.preset-village.active {
  border-color: #82e0aa;
  background: rgba(30,132,73,0.25);
  box-shadow: 0 0 14px rgba(30,132,73,0.5);
}
.preset-wolves {
  border-color: rgba(192,57,43,0.4);
}
.preset-wolves:hover {
  border-color: var(--accent-red);
  background: rgba(192,57,43,0.15);
}
.preset-wolves.active {
  border-color: #f1948a;
  background: rgba(192,57,43,0.25);
  box-shadow: 0 0 14px rgba(192,57,43,0.5);
}
.composition-preset-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  line-height: 1.4;
}

/* ========================
   COMPTEUR DE VOIX (+/-)
   ======================== */
.vote-counter-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0.6rem;
  line-height: 1.4;
  padding: 0.4rem 0.6rem;
  background: rgba(41,128,185,0.08);
  border-left: 3px solid rgba(41,128,185,0.4);
  border-radius: 0 6px 6px 0;
}
.vote-counter-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.8rem;
}
.vote-counter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.5rem 0.7rem;
  background: var(--bg-card2);
  border: 1.5px solid var(--border-dim);
  border-radius: var(--radius);
  transition: all 0.18s;
}
.vote-counter-row.leading {
  border-color: var(--accent-red);
  background: rgba(192,57,43,0.18);
  box-shadow: 0 0 12px rgba(192,57,43,0.25);
}
.vote-counter-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}
.vote-counter-emoji { font-size: 1.2rem; }
.vote-counter-name {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--text-primary);
}
.vote-bonus-badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: var(--font-heading);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.vote-bonus-badge.mayor { background: rgba(201,162,39,0.25); color: var(--accent-gold-light); border: 1px solid rgba(201,162,39,0.5); }
.vote-bonus-badge.crow  { background: rgba(100,100,100,0.3); color: #ccc; border: 1px solid rgba(100,100,100,0.5); }

.vote-counter-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}
.vote-count-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--border-gold);
  background: var(--bg-deep);
  color: var(--accent-gold);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  -webkit-user-select: none;
  user-select: none;
}
.vote-count-btn:hover { background: rgba(201,162,39,0.18); }
.vote-count-btn:active { transform: scale(0.92); }
.vote-count-btn.minus { color: #f1948a; border-color: rgba(192,57,43,0.5); }
.vote-count-btn.minus:hover { background: rgba(192,57,43,0.18); }
.vote-count-btn.plus { color: #82e0aa; border-color: rgba(30,132,73,0.5); }
.vote-count-btn.plus:hover { background: rgba(30,132,73,0.18); }
.vote-count-value {
  font-family: var(--font-title);
  font-size: 1.6rem;
  color: var(--accent-gold-light);
  min-width: 2rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 10px rgba(201,162,39,0.3);
}
.vote-counter-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}
.vote-counter-actions .btn-primary,
.vote-counter-actions .btn-secondary {
  margin-top: 0;
  flex: 1;
  min-width: 140px;
}

/* ========================
   KRAKEN — bloc d'action
   ======================== */
.kraken-block {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.kraken-section {
  background: var(--bg-card2);
  border: 1px solid rgba(22,160,133,0.3);
  border-radius: var(--radius);
  padding: 1rem;
}
.kraken-section-label {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: #76d7c4;
  display: block;
  margin-bottom: 0.7rem;
  letter-spacing: 0.05em;
}
.kraken-dice-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-bottom: 0.7rem;
}
.kraken-shake-btn {
  background: rgba(22,160,133,0.2);
  border-color: rgba(22,160,133,0.5);
  color: #76d7c4;
  font-weight: 600;
}
.kraken-shake-btn:hover {
  background: rgba(22,160,133,0.35);
  color: #a3e4d7;
}
.kraken-or {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.kraken-manual-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.kraken-dice-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.kraken-face-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0.6rem 0.3rem;
  background: var(--bg-deep);
  border: 1.5px solid var(--border-dim);
  border-radius: var(--radius);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-heading);
}
.kraken-face-btn:hover {
  border-color: rgba(22,160,133,0.6);
  background: rgba(22,160,133,0.1);
  transform: translateY(-1px);
}
.kraken-face-btn.active {
  border-color: #76d7c4;
  background: rgba(22,160,133,0.25);
  box-shadow: 0 0 12px rgba(118,215,196,0.4);
}
.kraken-face-num {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-gold-light);
}
.kraken-face-icon {
  font-size: 0.95rem;
}
.kraken-shake-status {
  margin-top: 0.6rem;
  padding: 0.8rem 0.9rem;
  background: rgba(22,160,133,0.15);
  border: 1px solid rgba(22,160,133,0.4);
  border-radius: var(--radius);
  color: #76d7c4;
  font-size: 0.9rem;
  text-align: center;
  font-family: var(--font-heading);
}

/* ====== DÉ 3D animé ====== */
.dice-stage {
  perspective: 600px;
  width: 100px;
  height: 100px;
  margin: 0.4rem auto 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dice3d {
  position: relative;
  width: 80px;
  height: 80px;
  transform-style: preserve-3d;
  transform: rotateX(0deg) rotateY(0deg);
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.6));
}
.dice-face {
  position: absolute;
  inset: 0;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  line-height: 1;
  color: #1a0e00;
  background: linear-gradient(135deg, #f6e4a8, #e8c873 60%, #c9a227);
  border: 2px solid #8a6d1f;
  border-radius: 12px;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.4),
    inset 0 -10px 18px rgba(0,0,0,0.18);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
/* Positions des 6 faces dans l'espace 3D (cube de 80px → translateZ 40px) */
.dice-face-1 { transform: rotateY(   0deg) translateZ(40px); }
.dice-face-2 { transform: rotateY( 180deg) translateZ(40px); }
.dice-face-3 { transform: rotateY(  90deg) translateZ(40px); }
.dice-face-4 { transform: rotateY( -90deg) translateZ(40px); }
.dice-face-5 { transform: rotateX(  90deg) translateZ(40px); }
.dice-face-6 { transform: rotateX( -90deg) translateZ(40px); }

.dice3d.settled {
  animation: dicePop 0.45s ease-out;
}
@keyframes dicePop {
  0%   { filter: drop-shadow(0 8px 16px rgba(0,0,0,0.6)); }
  50%  { filter: drop-shadow(0 0 22px #f0c84a) drop-shadow(0 8px 16px rgba(0,0,0,0.6)); }
  100% { filter: drop-shadow(0 8px 16px rgba(0,0,0,0.6)); }
}

.dice-label {
  margin-top: 0.4rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--accent-gold-light);
  text-align: center;
  letter-spacing: 0.04em;
}
.dice-label strong {
  font-family: var(--font-title);
  font-size: 1.6rem;
  color: var(--accent-gold-light);
  text-shadow: 0 0 12px rgba(201,162,39,0.5);
}

.kraken-effect-block, .kraken-target-block, .kraken-info-block {
  background: var(--bg-card2);
  border: 1px solid rgba(22,160,133,0.3);
  border-radius: var(--radius);
  padding: 1rem;
  animation: cardIn 0.3s ease-out;
}
.kraken-effect-card {
  background: linear-gradient(135deg, rgba(22,160,133,0.18), rgba(26,82,118,0.18));
  border-left: 4px solid #16a085;
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
}
.kraken-effect-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}
.kraken-effect-num {
  background: rgba(22,160,133,0.4);
  color: var(--accent-gold-light);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
}
.kraken-effect-icon { font-size: 1.4rem; }
.kraken-effect-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: #a3e4d7;
  font-weight: 600;
}
.kraken-effect-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  font-style: italic;
}
.kraken-info-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0.5rem;
}

/* Variations colorées par face */
.kraken-effect-3 { border-left-color: var(--accent-red); background: linear-gradient(135deg, rgba(192,57,43,0.18), rgba(26,82,118,0.18)); }
.kraken-effect-4 { border-left-color: #2980b9; }
.kraken-effect-5 { border-left-color: #d4ac0d; }
.kraken-effect-6 { border-left-color: #6c3483; }

/* Carte d'instruction MJ "toucher la main" */
.kraken-hand-touch {
  margin-top: 0.7rem;
  padding: 0.8rem 1rem;
  background: rgba(108,52,131,0.18);
  border: 1.5px solid rgba(108,52,131,0.5);
  border-left-width: 4px;
  border-radius: var(--radius);
  animation: handTouchPulse 2.4s ease-in-out infinite;
}
@keyframes handTouchPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(108,52,131,0); }
  50%      { box-shadow: 0 0 14px 2px rgba(108,52,131,0.35); }
}
.kraken-hand-touch-title {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: #c39bd3;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}
.kraken-hand-touch-body {
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.55;
}
.kraken-hand-touch-body em {
  display: inline-block;
  margin-top: 0.3rem;
  padding: 0.4rem 0.7rem;
  background: rgba(0,0,0,0.3);
  border-left: 3px solid #c39bd3;
  border-radius: 0 6px 6px 0;
  font-style: italic;
  color: #e8d5b7;
}
.kraken-hand-touch-public {
  background: rgba(192,57,43,0.18);
  border-color: rgba(192,57,43,0.5);
  animation: none;
}
.kraken-hand-touch-public .kraken-hand-touch-title {
  color: #f1948a;
}

/* ========================
   CONDITION CHAPERON ROUGE (setup)
   ======================== */
.chaperon-condition-block {
  margin-top: 0.6rem;
  padding: 0.8rem 1rem;
  background: rgba(192,57,43,0.08);
  border: 1px solid rgba(192,57,43,0.25);
  border-radius: var(--radius);
}
.chaperon-condition-title {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: #f1948a;
  margin-bottom: 0.6rem;
  letter-spacing: 0.04em;
}
.chaperon-condition-options {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.6rem;
}
.chaperon-condition-options input[type="radio"] {
  accent-color: var(--accent-red);
}
.chaperon-condition-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.4;
}

/* ========================
   RITUELS DU MATIN
   ======================== */
.morning-rituals {
  background: var(--bg-card);
  border: 2px solid var(--accent-gold);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.5rem;
  animation: cardIn 0.4s ease-out;
}
.morning-rituals h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--accent-gold-light);
  text-align: center;
  margin-bottom: 1rem;
}
.ritual-content {
  margin-bottom: 1.2rem;
}
.ritual-question {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--text-primary);
  text-align: center;
  margin: 0.5rem 0 1rem;
  padding: 0.8rem 1rem;
  background: rgba(0,0,0,0.25);
  border-left: 3px solid var(--accent-gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  line-height: 1.5;
}
.ritual-yesno {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  margin: 1rem 0;
  flex-wrap: wrap;
}
.ritual-yesno .choose-btn {
  padding: 0.7rem 1.4rem;
  font-size: 0.95rem;
}
.ritual-result {
  margin-top: 0.8rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: center;
}
.ritual-result.danger { background: rgba(192,57,43,0.2); border: 1px solid rgba(192,57,43,0.4); color: #f1948a; }
.ritual-result.ok     { background: rgba(30,132,73,0.2); border: 1px solid rgba(30,132,73,0.4); color: #82e0aa; }
.ritual-result.info   { background: rgba(41,128,185,0.2); border: 1px solid rgba(41,128,185,0.4); color: #7fb3d3; }

.ritual-player-grid {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0.8rem 0;
}
.ritual-actions {
  display: flex;
  justify-content: center;
}

.mayor-badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  background: rgba(201,162,39,0.25);
  color: var(--accent-gold-light);
  border: 1px solid rgba(201,162,39,0.5);
  border-radius: 4px;
  margin-left: 0.4rem;
  font-family: var(--font-heading);
  letter-spacing: 0.05em;
}

/* ========================
   MODE ÉDITION DES SIÈGES
   ======================== */
.seat-edit-bar {
  padding: 0.5rem 0.2rem 0.8rem;
  display: flex;
  justify-content: center;
}
.seat-edit-toggle {
  background: var(--bg-card2);
  border: 1px solid var(--border-dim);
  color: var(--text-secondary);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.04em;
}
.seat-edit-toggle:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}
.seat-edit-toggle.active {
  border-color: var(--accent-gold);
  background: rgba(201,162,39,0.15);
  color: var(--accent-gold-light);
}

.player-item.editing {
  border-color: var(--border-gold);
  background: var(--bg-card2);
}
.seat-edit-arrows {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-left: auto;
  flex-shrink: 0;
}
.seat-arrow {
  width: 28px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid var(--border-gold);
  background: var(--bg-deep);
  color: var(--accent-gold);
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.15s;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.seat-arrow:hover {
  background: rgba(201,162,39,0.2);
}
.seat-arrow:active {
  transform: scale(0.92);
}

/* Indicateur "charmé" dans le cercle */
.circle-player-charm {
  position: absolute;
  right: -10px;
  top: -4px;
  font-size: 0.85rem;
  color: #c39bd3;
  filter: drop-shadow(0 0 4px rgba(195,155,211,0.7));
  animation: charmGlow 2.4s ease-in-out infinite;
  pointer-events: none;
}
