:root {
  /* Design system tokens */
  --font-family-sans: 'Inter', sans-serif;
  --font-family-heading: 'Outfit', sans-serif;

  --color-bg-lobby: #f8fafc;
  --color-text-dark: #0f172a;
  
  /* Coordonnées Pédagogiques */
  --color-axis-x: #dc2626; /* Rouge 600 plus lisible par défaut */
  --color-axis-y: #166534; /* Vert 800 plus lisible par défaut */
  
  /* Thème Base (Défense - Bleu apaisant) */
  --color-def-bg: #f0f7ff;
  --color-def-panel: #ffffff;
  --color-def-grid-bg: #e0f2fe;
  --color-def-grid-lines: #cbd5e1; /* Gris ardoise clair plus visible pour les lignes */
  --color-def-accent: #2563eb;
  --color-def-accent-hover: #1d4ed8;

  /* Thème Radar (Attaque - Sombre/Militaire) */
  --color-atk-bg: #0b0f19;
  --color-atk-panel: #111827;
  --color-atk-grid-bg: #030712;
  --color-atk-grid-lines: #374151; /* Gris plus clair pour la visibilité des lignes */
  --color-atk-accent: #dc2626;
  --color-atk-accent-hover: #b91c1c;

  /* Éléments de jeu */
  --color-ship-fill: rgba(37, 99, 235, 0.25);
  --color-ship-stroke: #1d4ed8;
  --color-hit: #ef4444;
  --color-miss: #94a3b8;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Reset de base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family-sans);
  background-color: var(--color-bg-lobby);
  color: var(--color-text-dark);
  line-height: 1.5;
  height: 100vh;
  height: 100dvh;
  overflow: auto;
}

body.theme-defense-active,
body.theme-attack-active {
  overflow: hidden !important;
}

/* Watermark */
.watermark {
  position: absolute;
  bottom: 15px;
  right: 20px;
  font-family: var(--font-family-heading);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  opacity: 0.25;
  pointer-events: none;
  z-index: 100;
  transition: opacity 0.3s ease;
}

/* Thème par écran */
#lobby-screen {
  background: radial-gradient(circle at top right, #e2e8f0 0%, #f1f5f9 100%);
  color: #0f172a;
}
#lobby-screen .watermark {
  color: #64748b;
}

#game-screen {
  display: flex;
  flex-direction: column;
  height: 100vh;
}



/* ==================== LOBBY (ACCUEIL) ==================== */
#lobby-screen.screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  min-height: 100vh;
}

.lobby-logo {
  max-width: 130px;
  height: auto;
  border-radius: 50%;
  border: 3px solid #1e3a8a;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.25);
  margin-bottom: 15px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.hero-section {
  text-align: center;
  margin-bottom: 25px;
}
.hero-section h1 {
  font-family: var(--font-family-heading);
  font-size: 2.8rem;
  font-weight: 800;
  color: #1e3a8a;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.hero-section .subtitle {
  font-size: 1.1rem;
  color: #475569;
  font-weight: 500;
}

.lobby-card {
  background: white;
  border-radius: 16px;
  padding: 30px;
  width: 100%;
  max-width: 650px;
  box-shadow: var(--shadow-lg);
  border: 1px solid #e2e8f0;
}

.lobby-card h3 {
  font-family: var(--font-family-heading);
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: #1e293b;
}

.input-group {
  display: flex;
  gap: 10px;
}
.input-group input {
  flex: 1;
  padding: 14px 18px;
  font-size: 1.1rem;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.input-group input:focus {
  border-color: var(--color-def-accent);
}

.welcome-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f1f5f9;
  padding: 12px 18px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 1rem;
}

.lobby-actions {
  display: flex;
  justify-content: center;
  margin-bottom: 25px;
}

.lists-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.list-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 15px;
  height: 200px;
  overflow-y: auto;
}
.list-box h4 {
  font-family: var(--font-family-heading);
  font-size: 1rem;
  color: #475569;
  margin-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 5px;
}
.list-box ul {
  list-style: none;
}
.list-box li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: white;
  border-radius: 6px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  font-size: 0.95rem;
  font-weight: 500;
}
.list-box li.empty-list {
  background: transparent;
  box-shadow: none;
  color: #94a3b8;
  font-style: italic;
  justify-content: center;
  padding-top: 30px;
}

/* ==================== BOUTONS ==================== */
.btn {
  font-family: var(--font-family-sans);
  font-weight: 600;
  font-size: 1rem;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.btn-primary {
  background-color: var(--color-def-accent);
  color: white;
}
.btn-primary:hover {
  background-color: var(--color-def-accent-hover);
}
.btn-success {
  background-color: #10b981;
  color: white;
}
.btn-success:hover:not(:disabled) {
  background-color: #059669;
}
.btn-success:disabled {
  background-color: #a7f3d0;
  cursor: not-allowed;
}
.btn-danger {
  background-color: #ef4444;
  color: white;
}
.btn-danger:hover {
  background-color: #dc2626;
}
.btn-secondary {
  background-color: #e2e8f0;
  color: #475569;
}
.btn-secondary:hover {
  background-color: #cbd5e1;
}
.btn-link {
  background: transparent;
  color: #ef4444;
  padding: 0;
  font-size: 0.9rem;
}
.btn-link:hover {
  text-decoration: underline;
}
.btn-large {
  padding: 14px 28px;
  font-size: 1.1rem;
}
.btn-full {
  width: 100%;
}
.btn-group {
  display: flex;
  gap: 15px;
  width: 100%;
}
.btn-group .btn {
  flex: 1;
}

/* ==================== DECONSTRUCTION ÉCRAN DE JEU ==================== */
.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 25px;
  background-color: white;
  border-bottom: 1px solid #cbd5e1;
  height: 70px;
  flex-shrink: 0;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.player-info {
  display: flex;
  flex-direction: column;
}
.vs-label {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
}
#opponent-name {
  font-family: var(--font-family-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: #1e293b;
}

.turn-badge {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Onglets */
.game-tabs {
  display: flex;
  background-color: #e2e8f0;
  padding: 5px 10px 0;
  border-bottom: 1px solid #cbd5e1;
  flex-shrink: 0;
}
.tab-btn {
  flex: 1;
  padding: 12px 10px;
  border: none;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  font-family: var(--font-family-heading);
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  background: transparent;
  color: #64748b;
  font-weight: 700;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
}

/* Layout de l'écran de jeu */
.game-layout {
  display: flex;
  flex-direction: row;
  flex: 1;
  height: calc(100vh - 70px);
  height: calc(100dvh - 70px);
  overflow: hidden;
  position: relative;
  width: 100%;
}

#grids-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex: 1;
  height: 100%;
  overflow: hidden;
  padding: 15px;
  gap: 15px;
  background: transparent;
}

.grid-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.5s ease;
  width: 100%;
}

.grid-title {
  font-family: var(--font-family-heading);
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 6px;
  text-align: center;
  user-select: none;
}

.grid-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

/* Grille en Focus (2/3 de taille) */
.grid-panel.panel-focus {
  order: 1;
  flex: 2;
  opacity: 1;
  transform: scale(1);
}
.grid-panel.panel-focus .cartesian-grid {
  width: 100%;
  max-width: 480px;
  max-height: 42vh;
}

/* Grille en retrait (1/3 plus petite et translucide) */
.grid-panel.panel-blur {
  order: 2;
  flex: 1;
  opacity: 0.55;
  transform: scale(0.72);
}
.grid-panel.panel-blur .cartesian-grid {
  width: 100%;
  max-width: 240px;
  max-height: 22vh;
  pointer-events: none; /* Désactive l'interaction sur la petite grille */
}

/* Grille pleine taille lors du placement */
.grid-panel.panel-full {
  order: 1;
  flex: 1;
  opacity: 1;
  transform: scale(1);
}
.grid-panel.panel-full .cartesian-grid {
  width: 100%;
  max-width: 540px;
  max-height: 48vh;
}

.controls-sidebar {
  width: 350px;
  border-left: 1px solid #cbd5e1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  overflow-y: auto;
  background-color: white;
  transition: background-color 0.5s ease, border-color 0.5s ease, color 0.5s ease;
}

/* ==================== SPÉCIFICITÉS THÈMES DE JEU ==================== */

/* Thème phase défense (Actif quand c'est le tour adverse) */
body.theme-defense-active {
  --color-axis-x: #dc2626; /* Rouge 600 plus lisible sur fond blanc */
  --color-axis-y: #166534; /* Vert 800 plus lisible sur fond blanc */
}
body.theme-defense-active #game-screen {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 50%, #bfdbfe 100%);
}
body.theme-defense-active .controls-sidebar {
  border-left-color: #cbd5e1;
  background-color: #ffffff;
  color: var(--color-text-dark);
}
body.theme-defense-active #defense-wrapper .grid-title {
  color: var(--color-def-accent);
}
body.theme-defense-active #attack-wrapper .grid-title {
  color: #64748b;
}
body.theme-defense-active .watermark {
  color: #1e3a8a;
}
body.theme-defense-active .game-header {
  background-color: #f8fafc;
  color: #0f172a;
}

/* Thème phase attaque (Actif quand c'est mon tour) */
body.theme-attack-active {
  --color-axis-x: #f87171; /* Rouge clair pour fond noir */
  --color-axis-y: #34d399; /* Vert émeraude clair pour fond noir */
}
body.theme-attack-active #game-screen {
  background-color: var(--color-atk-bg);
}
body.theme-attack-active .controls-sidebar {
  border-left-color: #374151;
  background-color: var(--color-atk-panel);
  color: #f3f4f6;
}
body.theme-attack-active #attack-wrapper .grid-title {
  color: #ef4444;
}
body.theme-attack-active #defense-wrapper .grid-title {
  color: #4b5563;
}
body.theme-attack-active .watermark {
  color: #4b5563;
}
body.theme-attack-active .game-header {
  background-color: #111827;
  color: #f3f4f6;
  border-bottom-color: #374151;
}
body.theme-attack-active #opponent-name {
  color: #ffffff;
}

/* Waiting animation pulse */
.waiting-animation {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  color: #4b5563;
  font-weight: 500;
  font-size: 0.95rem;
}
.dot-pulse {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 5px;
  background-color: #2563eb;
  animation: dotPulse 1.5s infinite linear;
}
@keyframes dotPulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

/* ==================== GRILLE CARTÉSIENNE (SVG) ==================== */
.cartesian-grid {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  user-select: none;
  transition: max-width 0.5s ease;
}

/* Stylisation SVG selon le mode */
#defense-grid-svg {
  background-color: #ffffff;
  border: 2px solid #cbd5e1;
}
#attack-grid-svg {
  background-color: var(--color-atk-grid-bg);
  border: 2px solid #374151;
}

/* Lignes et axes */
.grid-line {
  stroke-width: 1.2;
}
#defense-grid-svg .grid-line {
  stroke: var(--color-def-grid-lines);
}
#attack-grid-svg .grid-line {
  stroke: var(--color-atk-grid-lines);
}

.axis-line {
  stroke-width: 3.2;
}
.axis-x {
  stroke: var(--color-axis-x);
}
.axis-y {
  stroke: var(--color-axis-y);
}

.grid-label {
  font-family: var(--font-family-sans);
  font-size: 14px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
}
#defense-grid-svg .grid-label {
  fill: #64748b;
}
#attack-grid-svg .grid-label {
  fill: #9ca3af;
}

/* Labels des axes en couleur */
.grid-label.label-x {
  fill: var(--color-axis-x) !important;
  font-weight: 700;
}
.grid-label.label-y {
  fill: var(--color-axis-y) !important;
  font-weight: 700;
}

.axis-title {
  font-family: var(--font-family-heading);
  font-weight: 800;
  font-size: 18px;
}
.axis-title-x {
  fill: var(--color-axis-x);
}
.axis-title-y {
  fill: var(--color-axis-y);
}

/* Nœuds interactifs */
.grid-node {
  fill: transparent;
  stroke: transparent;
  stroke-width: 15; /* Zone de clic agrandie */
  cursor: pointer;
}

.grid-dot {
  pointer-events: none;
  transition: fill 0.2s ease;
}
#defense-grid-svg .grid-dot {
  fill: #475569;
  opacity: 0.35;
}
#attack-grid-svg .grid-dot {
  fill: #9ca3af;
  opacity: 0.3;
}

/* Hover & Sélections */
.grid-node:hover + .grid-dot {
  fill: #f59e0b;
}

.guide-line {
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
  pointer-events: none;
}
.guide-x {
  stroke: var(--color-axis-x);
}
.guide-y {
  stroke: var(--color-axis-y);
}

/* Bateaux (Images) */
.svg-ship-image {
  mix-blend-mode: multiply;
  pointer-events: none;
  transition: filter 0.3s ease, opacity 0.3s ease;
}
.svg-ship-image.svg-ship-placement {
  filter: sepia(100%) hue-rotate(15deg) saturate(200%) brightness(0.95);
  opacity: 0.85;
}
.svg-ship-image.svg-ship-invalid {
  filter: sepia(100%) hue-rotate(-50deg) saturate(400%) brightness(0.8) !important;
  opacity: 0.8;
}

/* Tirs */
.svg-shot {
  stroke-width: 3;
  pointer-events: none;
}
.svg-shot.hit {
  stroke: var(--color-hit);
}
.svg-shot.miss {
  stroke: var(--color-miss);
}

.svg-explosion {
  fill: var(--color-hit);
  pointer-events: none;
}

.target-marker {
  fill: none;
  stroke: #f59e0b;
  stroke-width: 2;
  pointer-events: none;
}

/* ==================== PANNEAU DE CONTRÔLES SIDELINES ==================== */
.instruction-box {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px;
}
.instruction-box h3 {
  font-family: var(--font-family-heading);
  font-size: 1.2rem;
  color: #1e3a8a;
  margin-bottom: 10px;
}
.instruction-box p {
  font-size: 0.9rem;
  color: #475569;
  margin-bottom: 15px;
}

.instruction-box.theme-dark {
  background-color: #1e293b;
  border-color: #334155;
  color: #f3f4f6;
}
.instruction-box.theme-dark h3 {
  color: #f1f5f9;
}
.instruction-box.theme-dark p {
  color: #9ca3af;
}

.orientation-status {
  font-family: var(--font-family-sans);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #1e3a8a;
  text-align: center;
  background-color: #eff6ff;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #bfdbfe;
  box-shadow: var(--shadow-sm);
}

.ship-illustration-container {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 15px;
  height: 90px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
}

#ship-illustration-img {
  max-width: 90%;
  max-height: 70px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.12));
  transition: transform 0.3s ease;
  pointer-events: none;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
}

#ship-illustration-img.rotated {
  transform: rotate(90deg);
}

/* Palette bateaux */
.ships-palette {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 15px;
}
.ship-select-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px;
  font-size: 0.95rem;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  background-color: white;
  color: #334155;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}
.ship-select-btn.active {
  display: flex;
  border-color: var(--color-def-accent);
  background-color: #eff6ff;
  color: var(--color-def-accent);
}
.ship-select-btn:disabled {
  background-color: #f1f5f9;
  border-color: #e2e8f0;
  color: #cbd5e1;
  cursor: not-allowed;
  text-decoration: line-through;
  display: none !important;
}

.ship-btn-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}
.ship-select-btn.active .ship-btn-title {
  color: #1e40af;
}

.ship-size-badge {
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  background-color: #f1f5f9;
  padding: 2px 10px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  display: inline-block;
  margin-top: 6px;
}
.ship-select-btn.active .ship-size-badge {
  color: #2563eb;
  background-color: #dbeafe;
  border-color: #bfdbfe;
}

.placement-completed-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  background-color: #ecfdf5; /* emerald-50 */
  border: 2px solid #a7f3d0; /* emerald-200 */
  border-radius: 10px;
  color: #065f46; /* emerald-800 */
  font-size: 1.05rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  animation: bounceIn 0.3s ease-out;
  width: 100%;
}

.placement-completed-msg .msg-sub {
  font-size: 0.88rem;
  color: #047857; /* emerald-700 */
  font-weight: 600;
  margin-top: 4px;
  display: block;
}

.placement-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Styles target-display, coordinate-preview, hints → voir section Reconnaissance Vocale plus bas */

/* Bouton Feu */

.btn-fire {
  background-color: var(--color-atk-accent);
  color: white;
  font-size: 1.3rem;
  font-weight: 800;
  padding: 16px;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(220, 38, 38, 0.4);
}
.btn-fire:hover:not(:disabled) {
  background-color: var(--color-atk-accent-hover);
  animation: pulse 1s infinite alternate;
}
.btn-fire:disabled {
  background-color: #4b5563;
  color: #9ca3af;
  box-shadow: none;
  cursor: not-allowed;
}

@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 15px rgba(220, 38, 38, 0.4); }
  100% { transform: scale(1.04); box-shadow: 0 0 25px rgba(220, 38, 38, 0.8); }
}

/* ==================== FENÊTRES MODALES ==================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background-color: white;
  border-radius: 16px;
  width: 90%;
  max-width: 550px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  border: 1px solid #cbd5e1;
}

.modal-header {
  padding: 18px 25px;
  color: white;
}
.modal-header h2 {
  font-family: var(--font-family-heading);
  font-size: 1.35rem;
  font-weight: 800;
  text-align: center;
}

.header-warning {
  background-color: #f59e0b;
}
.header-danger {
  background-color: #ef4444;
}
.header-success {
  background-color: #10b981;
}

.modal-body {
  padding: 25px;
  font-size: 1.05rem;
}
.modal-body p {
  margin-bottom: 12px;
}
.modal-instruction {
  font-weight: 500;
}
.question-text {
  font-weight: 700;
  font-size: 1.15rem;
  margin-top: 15px;
  text-align: center;
  color: #1e293b;
}

.coords-box {
  background-color: #f1f5f9;
  border-radius: 8px;
  padding: 15px;
  font-size: 1.8rem;
  text-align: center;
  font-family: var(--font-family-heading);
  color: #1e3a8a;
  margin: 15px 0;
  border: 2px dashed #cbd5e1;
}
.coords-box strong {
  font-weight: 900;
}

.reminder-hint {
  font-size: 0.85rem;
  background-color: #fef3c7;
  color: #92400e;
  border-left: 4px solid #f59e0b;
  padding: 8px 12px;
  border-radius: 4px;
}

.txt-red { color: var(--color-axis-x); font-weight: 700; }
.txt-green { color: var(--color-axis-y); font-weight: 700; }

.modal-footer {
  padding: 15px 25px 25px;
  display: flex;
  justify-content: center;
}

/* Arbitre design */
.arbitre-avatar {
  font-size: 2.2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 10px;
  font-family: var(--font-family-heading);
}

.educational-help {
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 15px;
  font-size: 0.95rem;
  margin-top: 15px;
}
.educational-help ul {
  padding-left: 20px;
  margin: 8px 0;
}
.educational-help li {
  margin-bottom: 4px;
}
.instruction-urgent {
  color: #b91c1c;
  font-weight: 700;
  text-align: center;
  margin-top: 10px;
}

/* Animations */
.bounce-in {
  animation: bounceIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes bounceIn {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.error-shake {
  animation: shake 0.5s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
  20%, 40%, 60%, 80% { transform: translateX(10px); }
}

/* Classes utilitaires */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

/* Toasts */
.toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(15, 23, 42, 0.9);
  color: white;
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: var(--shadow-lg);
  z-index: 1100;
  transition: opacity 0.3s ease;
}

/* ==================== RECONNAISSANCE VOCALE ==================== */

/* Bulle d'aide masquable */
.help-bubble {
  background: linear-gradient(135deg, #1e3a5f 0%, #0f2540 100%);
  border: 1px solid #3b82f6;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
  position: relative;
}
.help-bubble-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  color: #93c5fd;
  letter-spacing: 0.02em;
}
.btn-hide-help {
  background: transparent;
  border: none;
  color: #6b7280;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}
.btn-hide-help:hover { color: #f3f4f6; background: rgba(255,255,255,0.1); }

.help-bubble-body p {
  font-size: 0.95rem;
  color: #d1d5db;
  margin-bottom: 8px;
}
.help-example {
  background: rgba(0,0,0,0.45);
  border-radius: 6px;
  padding: 10px 12px;
  font-family: var(--font-family-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: #f3f4f6;
  letter-spacing: 0.03em;
  margin-bottom: 8px;
  text-align: center;
}
.help-examples-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.help-examples-list span {
  font-size: 0.88rem;
  color: #9ca3af;
}
.help-examples-list em {
  color: #d1d5db;
  font-style: normal;
}

/* Bouton "Afficher l'aide" (quand bulle masquée) */
.btn-show-help {
  background: transparent;
  border: 1px solid #374151;
  border-radius: 6px;
  color: #9ca3af;
  padding: 5px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  margin-bottom: 10px;
  transition: all 0.2s;
}
.btn-show-help:hover { border-color: #3b82f6; color: #93c5fd; }

/* Badge tentative */
.voice-attempt-badge {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #f59e0b;
  background: rgba(245,158,11,0.12);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: 20px;
  padding: 4px 10px;
  margin-top: 6px;
  letter-spacing: 0.05em;
}

/* Bouton microphone */
.btn-mic {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: white;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 14px;
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(37,99,235,0.35);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-mic:hover {
  background: linear-gradient(135deg, #1e40af, #1d4ed8);
  box-shadow: 0 0 20px rgba(37,99,235,0.55);
  transform: translateY(-1px);
}
.btn-mic.btn-mic-active {
  background: linear-gradient(135deg, #b91c1c, #dc2626);
  box-shadow: 0 0 18px rgba(220,38,38,0.5);
  animation: micPulse 1.2s infinite alternate;
}
@keyframes micPulse {
  0%   { box-shadow: 0 0 12px rgba(220,38,38,0.4); transform: scale(1); }
  100% { box-shadow: 0 0 28px rgba(220,38,38,0.75); transform: scale(1.02); }
}

/* Zone d'écoute active */
#voice-listening-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: rgba(37,99,235,0.08);
  border: 1px dashed #3b82f6;
  border-radius: 10px;
  padding: 14px;
}
.voice-listening-bar {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 28px;
}
.vdot {
  display: block;
  width: 6px;
  background: #3b82f6;
  border-radius: 3px;
  animation: barBounce 0.8s ease infinite alternate;
}
.vdot:nth-child(1) { animation-delay: 0s;    height: 10px; }
.vdot:nth-child(2) { animation-delay: 0.2s;  height: 22px; }
.vdot:nth-child(3) { animation-delay: 0.4s;  height: 16px; }
@keyframes barBounce {
  0%   { transform: scaleY(0.5); opacity: 0.6; }
  100% { transform: scaleY(1.3); opacity: 1; }
}
.voice-interim {
  font-size: 0.88rem;
  color: #93c5fd;
  font-style: italic;
  text-align: center;
  min-height: 1.2em;
}

/* Zone d'erreur */
#voice-error-zone {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.voice-error-msg {
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.35);
  border-radius: 8px;
  color: #fca5a5;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 9px 12px;
  text-align: center;
}

/* Bouton mode manuel (fallback) */
.btn-outline-light {
  background: transparent;
  border: 2px dashed #4b5563;
  color: #9ca3af;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 11px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-family-sans);
}
.btn-outline-light:hover {
  border-color: #60a5fa;
  color: #93c5fd;
}
.btn-outline-light.active-manual {
  border-color: #22c55e;
  color: #86efac;
  background: rgba(34,197,94,0.08);
}

/* Zone confirmation */
#voice-confirmed-zone {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.voice-confirmed-phrase {
  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.4);
  border-radius: 8px;
  color: #86efac;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 9px 12px;
  text-align: center;
  line-height: 1.5;
}

/* Zone cible (coordonnées) */
.target-display {
  background-color: #0f172a;
  border: 2px solid #334155;
  border-radius: 8px;
  padding: 15px;
  margin-top: 10px;
  margin-bottom: 10px;
  text-align: center;
}
.coordinate-preview {
  font-family: var(--font-family-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: #f59e0b;
  margin-bottom: 8px;
}
.coordinate-hints {
  display: none !important;
  flex-direction: column;
  gap: 6px;
  font-size: 1.05rem;
  text-align: left;
}
.hint-x { color: #fca5a5; font-weight: 600; }
.hint-y { color: #6ee7b7; font-weight: 600; }
#hint-x-val { color: var(--color-axis-x); font-weight: 800; }
#hint-y-val { color: var(--color-axis-y); font-weight: 800; }

/* Gaps entre les éléments de la sidebar attaque */
#attack-controls > * + * { margin-top: 8px; }

/* ==================== RESPONSIVE TABLETTES ET MOBILES ==================== */
@media (max-width: 850px) {
  body {
    height: 100vh !important;
    height: 100dvh !important;
  }
  #game-screen {
    height: 100vh !important;
    height: 100dvh !important;
    overflow: hidden !important;
  }
  .game-layout {
    flex-direction: column;
    height: calc(100vh - 70px);
    height: calc(100dvh - 70px);
    overflow: hidden;
  }
  #grids-container {
    flex: 1.3;
    width: 100%;
    padding: 8px;
    gap: 8px;
    height: auto;
  }
  
  .grid-panel.panel-focus .cartesian-grid {
    max-width: 290px;
    max-height: 35vh;
  }
  .grid-panel.panel-blur .cartesian-grid {
    max-width: 170px;
    max-height: 20vh;
  }
  .grid-panel.panel-full .cartesian-grid {
    max-width: 320px;
    max-height: 40vh;
  }
  .grid-title {
    font-size: 1.15rem;
    margin-bottom: 4px;
  }
  .grid-label {
    font-size: 12px;
  }
  .axis-title {
    font-size: 15px;
  }
  
  .controls-sidebar {
    width: 100%;
    flex: 1;
    border-left: none;
    border-top: 1px solid #cbd5e1;
    padding: 15px;
    overflow-y: auto;
    height: auto;
  }
  body.theme-attack-active .controls-sidebar {
    border-top-color: #374151;
  }
  .lists-container {
    grid-template-columns: 1fr;
  }
}

/* Optimisation pour les petits écrans en hauteur (ex: tablettes en paysage ou petits smartphones) */
@media (max-height: 750px) {
  .game-header {
    height: 60px;
    padding: 10px 15px;
  }
  .game-layout {
    height: calc(100vh - 60px);
    height: calc(100dvh - 60px);
  }
  .grid-panel.panel-focus .cartesian-grid {
    max-width: 280px;
    max-height: 42vh;
  }
  .grid-panel.panel-blur .cartesian-grid {
    max-width: 150px;
    max-height: 22vh;
  }
  .grid-panel.panel-full .cartesian-grid {
    max-width: 320px;
    max-height: 48vh;
  }
  .grid-title {
    font-size: 1rem;
    margin-bottom: 2px;
  }
  .grid-label {
    font-size: 11px;
  }
  .axis-title {
    font-size: 13px;
  }
  #grids-container {
    gap: 5px;
  }
}



/* ==================== BOUTONS EN LIGNE (COMPACITÉ) ==================== */
.btn-row {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-bottom: 8px;
}
.btn-row .btn {
  flex: 1;
  font-size: 0.92rem;
  padding: 11px 4px;
  white-space: nowrap;
}

/* ==================== OSCILLOSCOPE RADIO MILITAIRE ==================== */
.military-radio-scope {
  position: relative;
  width: 100%;
  height: 80px;
  background-color: #022c22; /* Vert foncé militaire */
  border: 2px solid #059669; /* Vert fluo */
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 15px rgba(16, 185, 129, 0.4), 0 0 10px rgba(16, 185, 129, 0.2);
  margin-bottom: 10px;
}

.scope-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: 15px 15px;
  background-image: 
    linear-gradient(to right, rgba(16, 185, 129, 0.12) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(16, 185, 129, 0.12) 1px, transparent 1px);
  pointer-events: none;
}

.scope-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 50px;
  width: 90%;
  z-index: 2;
}

.wave-bar {
  display: block;
  width: 5px;
  height: 6px;
  background-color: #10b981; /* Vert fluo */
  border-radius: 2px;
  box-shadow: 0 0 6px #10b981;
  animation: militaryWave 1s ease-in-out infinite alternate;
}

/* Fréquences et délais décalés pour faire réaliste */
.wave-bar.bar-1  { animation-duration: 0.38s; animation-delay: 0.08s; }
.wave-bar.bar-2  { animation-duration: 0.65s; animation-delay: 0.25s; }
.wave-bar.bar-3  { animation-duration: 0.45s; animation-delay: 0.0s; }
.wave-bar.bar-4  { animation-duration: 0.75s; animation-delay: 0.18s; }
.wave-bar.bar-5  { animation-duration: 0.28s; animation-delay: 0.35s; }
.wave-bar.bar-6  { animation-duration: 0.55s; animation-delay: 0.08s; }
.wave-bar.bar-7  { animation-duration: 0.48s; animation-delay: 0.28s; }
.wave-bar.bar-8  { animation-duration: 0.72s; animation-delay: 0.0s; }
.wave-bar.bar-9  { animation-duration: 0.35s; animation-delay: 0.18s; }
.wave-bar.bar-10 { animation-duration: 0.68s; animation-delay: 0.45s; }
.wave-bar.bar-11 { animation-duration: 0.25s; animation-delay: 0.08s; }
.wave-bar.bar-12 { animation-duration: 0.58s; animation-delay: 0.28s; }

@keyframes militaryWave {
  0% {
    height: 5px;
    transform: scaleY(1);
    opacity: 0.4;
  }
  100% {
    height: 48px;
    transform: scaleY(1.2);
    opacity: 1;
  }
}

.scope-overlay {
  position: absolute;
  top: 6px;
  left: 10px;
  font-family: monospace;
  font-size: 0.65rem;
  font-weight: 700;
  color: #10b981;
  letter-spacing: 2px;
  text-shadow: 0 0 4px #10b981;
  animation: textBlink 1.4s step-end infinite;
  z-index: 3;
}

@keyframes textBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.voice-interim {
  font-family: monospace;
  font-size: 0.88rem;
  color: #a7f3d0 !important;
  text-shadow: 0 0 3px rgba(16, 185, 129, 0.5);
  letter-spacing: 1.5px;
  margin-top: 5px;
  margin-bottom: 5px;
}

/* ==================== GRILLE MINIATURE DANS LA MODALE DE DÉFENSE ==================== */
.modal-grid-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 15px 0;
  width: 100%;
}

#modal-defense-grid-svg {
  width: 100%;
  max-width: 250px;
  height: auto;
  aspect-ratio: 1 / 1;
  background-color: #ffffff;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
}

@keyframes svgPulse {
  0% { r: 6px; opacity: 1; }
  100% { r: 18px; opacity: 0; }
}

.pulse-animation {
  animation: svgPulse 1.5s infinite ease-out;
}

@media (max-height: 700px) {
  #modal-defense-grid-svg {
    max-width: 180px;
  }
  .modal-body {
    padding: 12px 20px;
  }
  .coords-box {
    margin: 8px 0;
    padding: 10px;
    font-size: 1.4rem;
  }
}

/* ==================== ANIMATIONS DE JEU JUICY (TOUCHÉ) ==================== */
@keyframes screenShake {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  10% { transform: translate(-3px, 2px) rotate(-0.5deg); }
  20% { transform: translate(3px, -2px) rotate(0.5deg); }
  30% { transform: translate(-2px, -1px) rotate(-0.5deg); }
  40% { transform: translate(2px, 2px) rotate(0.5deg); }
  50% { transform: translate(-1px, 2px) rotate(-0.5deg); }
  60% { transform: translate(1px, -2px) rotate(0.5deg); }
  70% { transform: translate(-2px, 1px) rotate(-0.5deg); }
  80% { transform: translate(2px, -2px) rotate(0.5deg); }
  90% { transform: translate(-2px, 2px) rotate(-0.5deg); }
}

.hit-shake {
  animation: screenShake 0.5s cubic-bezier(.36,.07,.19,.97) both;
  backface-visibility: hidden;
  perspective: 1000px;
}

/* ==================== ALERTE DE COMPATIBILITÉ NAVIGATEUR ==================== */
.browser-warning-card {
  background: #fff7ed;
  border: 1px solid #ffedd5;
  border-left: 4px solid #f97316;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.browser-warning-card.status-success {
  background: #f0fdf4;
  border-color: #dcfce7;
  border-left-color: #22c55e;
}

.browser-warning-card.status-danger {
  background: #fef2f2;
  border-color: #fee2e2;
  border-left-color: #ef4444;
}

.warning-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.warning-card-icon {
  font-size: 1.4rem;
}

.warning-card-title {
  font-family: var(--font-family-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: #c2410c;
  margin: 0;
}

.browser-warning-card.status-success .warning-card-title {
  color: #15803d;
}

.browser-warning-card.status-danger .warning-card-title {
  color: #b91c1c;
}

.warning-card-body {
  font-size: 0.95rem;
  line-height: 1.4;
  color: #7c2d12;
}

.browser-warning-card.status-success .warning-card-body {
  color: #166534;
}

.browser-warning-card.status-danger .warning-card-body {
  color: #991b1b;
}

.warning-card-actions {
  display: flex;
  gap: 10px;
  margin-top: 5px;
}

.btn-warning-primary {
  background-color: #f97316;
  color: white;
  padding: 8px 16px;
  font-size: 0.9rem;
  border-radius: 6px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-warning-primary:hover {
  background-color: #ea580c;
}

.browser-warning-card.status-success .btn-warning-primary {
  background-color: #22c55e;
}
.browser-warning-card.status-success .btn-warning-primary:hover {
  background-color: #16a34a;
}

.browser-warning-card.status-danger .btn-warning-primary {
  background-color: #ef4444;
}
.browser-warning-card.status-danger .btn-warning-primary:hover {
  background-color: #dc2626;
}

.btn-warning-secondary {
  background-color: transparent;
  color: #7c2d12;
  border: 1px solid #fdba74;
  padding: 8px 16px;
  font-size: 0.9rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-warning-secondary:hover {
  background-color: rgba(253, 186, 116, 0.15);
}

.browser-warning-card.status-success .btn-warning-secondary {
  color: #166534;
  border-color: #86efac;
}
.browser-warning-card.status-success .btn-warning-secondary:hover {
  background-color: rgba(134, 239, 172, 0.15);
}

.browser-warning-card.status-danger .btn-warning-secondary {
  color: #991b1b;
  border-color: #fca5a5;
}
.browser-warning-card.status-danger .btn-warning-secondary:hover {
  background-color: rgba(252, 165, 165, 0.15);
}

/* Badge de statut micro dans le lobby */
.mic-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 9999px;
  margin-left: 8px;
  vertical-align: middle;
}

.mic-status-badge.status-ok {
  background-color: #dcfce7;
  color: #166534;
}

.mic-status-badge.status-disabled {
  background-color: #fee2e2;
  color: #991b1b;
}

.btn-restore-mic {
  background: none;
  border: none;
  color: #2563eb;
  text-decoration: underline;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0;
  font-weight: 600;
  margin-left: 5px;
}

.btn-restore-mic:hover {
  color: #1d4ed8;
}

/* Message d'instruction manuel */
.manual-instruction-msg {
  background: #eff6ff;
  border: 1px dashed #bfdbfe;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 15px;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #1e40af;
}

/* Alignement Radar et Aide */
.attack-controls-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  width: 100%;
}
.attack-controls-header h3 {
  margin-bottom: 0 !important;
}
.attack-controls-header .btn-show-help {
  margin-bottom: 0 !important;
}

/* Navires coulés sur la grille d'attaque (translucides et rouges) */
.sunk-ship {
  opacity: 0.35 !important;
}
.sunk-ship path {
  fill: #fca5a5 !important;
  stroke: #ef4444 !important;
}
.sunk-ship rect {
  fill: rgba(239, 68, 68, 0.15) !important;
  stroke: #ef4444 !important;
}
.sunk-ship circle {
  fill: #fca5a5 !important;
  stroke: #ef4444 !important;
}
.sunk-ship line {
  stroke: #ef4444 !important;
}
.sunk-ship text {
  fill: #ef4444 !important;
}

/* Affichage du score dans l'en-tête */
.game-score-header {
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  margin-top: 2px;
  transition: color 0.3s ease;
}

body.theme-attack-active .game-score-header {
  color: #9ca3af;
}

/* ==================== AJUSTEMENT ERGONOMIQUE DES MODALES ==================== */
.modal-content {
  max-height: 90vh !important;
  display: flex !important;
  flex-direction: column !important;
}

.modal-body {
  overflow-y: auto !important;
  flex: 1 !important;
  padding: 20px !important;
}

/* ==================== BANNIÈRE SUGGESTION PAYSAGE ==================== */
.landscape-suggestion-banner {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #1e3a8a;
  color: white;
  padding: 12px 20px;
  border-radius: 30px;
  font-family: var(--font-family-heading);
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: var(--shadow-lg), 0 0 15px rgba(30, 58, 138, 0.4);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10000;
  border: 1px solid #3b82f6;
  animation: bounceIn 0.3s ease-out;
  max-width: 90vw;
  text-align: center;
}

.landscape-suggestion-banner button {
  background: transparent;
  border: none;
  color: #93c5fd;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 4px;
}

/* On n'affiche la suggestion paysage que si le téléphone est en mode portrait */
@media (orientation: landscape) {
  .landscape-suggestion-banner {
    display: none !important;
  }
}

/* ==================== TUTORIEL INTERACTIF ==================== */
.tutorial-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.tutorial-card {
  background-color: white;
  border-radius: 16px;
  width: 95%;
  max-width: 500px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  border: 2px solid #cbd5e1;
  overflow: hidden;
  max-height: 90vh;
}

.tutorial-header {
  background-color: #1e3a8a;
  color: white;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tutorial-header h2 {
  font-family: var(--font-family-heading);
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0;
}

.tutorial-step-badge {
  background-color: #3b82f6;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 700;
}

.tutorial-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.tutorial-text {
  font-size: 1rem;
  line-height: 1.5;
  color: #334155;
  margin-bottom: 15px;
}

.tutorial-text strong {
  color: #1e3a8a;
}

.tutorial-illustration {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  height: 180px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
  overflow: hidden;
}

.tutorial-illustration svg {
  width: 100%;
  height: 100%;
  max-height: 180px;
}

.tutorial-footer {
  padding: 15px 20px;
  background-color: #f1f5f9;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==================== ANIMATIONS ET EFFETS DE TIR ==================== */
.fire-projectile {
  fill: #ffedd5;
  stroke: #f97316;
  stroke-width: 2;
  filter: drop-shadow(0 0 8px #f97316);
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.grid-flash {
  animation: flashEffect 0.5s ease-out;
}

@keyframes flashEffect {
  0% { filter: brightness(1.8) contrast(1.2); background-color: rgba(255, 255, 255, 0.8); }
  100% { filter: none; background-color: transparent; }
}

.grid-shake {
  animation: shakeEffect 0.5s ease-in-out;
}

@keyframes shakeEffect {
  0%, 100% { transform: translate(0, 0); }
  10%, 30%, 50%, 70%, 90% { transform: translate(-4px, 2px); }
  20%, 40%, 60%, 80% { transform: translate(4px, -2px); }
}

/* Surbrillance du point dicté oralement */
.spoken-aim-pulse {
  fill: none;
  stroke: #3b82f6;
  stroke-width: 2.5;
  stroke-dasharray: 4 2;
  animation: spokenAimRotate 3s linear infinite, spokenAimPulse 1s ease-in-out infinite alternate;
}

@keyframes spokenAimRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes spokenAimPulse {
  from { r: 12; opacity: 0.6; stroke-width: 2.5; }
  to { r: 18; opacity: 1; stroke-width: 4; }
}

