/* ==========================================================================
   MODE PAUSE - DESIGN SYSTEM & ANIMATIONS (SNAKE_CASE STRICT)
   ========================================================================== */

/* --- Custom Properties & Theme Setup --- */
:root {
  --color_bg_dark: #0f172a;
  --color_card_bg: #1e293b;
  --color_card_border: rgba(255, 255, 255, 0.1);
  --color_text_main: #f8fafc;
  --color_text_muted: #94a3b8;
  --color_accent_primary: #3b82f6;
  --color_accent_secondary: #60a5fa;
  --color_shadow: rgba(0, 0, 0, 0.4);
  --font_main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font_digital: "Courier New", Courier, monospace;
}

/* Thèmes Dynamiques pour les Decks */
body.theme_work {
  --color_bg_dark: #0f172a;
  --color_card_bg: #1e293b;
  --color_card_border: rgba(59, 130, 246, 0.3);
  --color_accent_primary: #3b82f6;
  --color_accent_secondary: #60a5fa;
}

/* Nouveau thème "Chez soi" : Rose / Violet Cosy */
body.theme_home {
  --color_bg_dark: #1e1b4b;
  --color_card_bg: #311b92;
  --color_card_border: rgba(168, 85, 247, 0.35);
  --color_accent_primary: #a855f7;
  --color_accent_secondary: #e879f9;
}

body.theme_vacation {
  --color_bg_dark: #451a03;
  --color_card_bg: #78350f;
  --color_card_border: rgba(245, 158, 11, 0.3);
  --color_accent_primary: #f59e0b;
  --color_accent_secondary: #fbbf24;
}

/* --- Base & Reset --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  font-family: var(--font_main);
  background-color: var(--color_bg_dark);
  color: var(--color_text_main);
  transition: background-color 0.4s ease;
}

.visually_hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* --- Header Principal --- */
.header_bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color_card_border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand_container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand_icon {
  width: 28px;
  height: 28px;
  color: var(--color_accent_secondary);
}

.brand_title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff, var(--color_accent_secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header_controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.deck_select_input {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--color_text_main);
  border: 1px solid var(--color_card_border);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.deck_select_input:focus {
  border-color: var(--color_accent_secondary);
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.2);
}

.deck_select_input option {
  background-color: #0f172a;
  color: #ffffff;
}

.button_icon {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--color_card_border);
  color: var(--color_text_main);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.button_icon svg {
  width: 20px;
  height: 20px;
}

.button_icon:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

/* --- Zone Principale --- */
.main_container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

.deck_info_section {
  margin-bottom: 24px;
}

.deck_header_box {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--color_card_border);
  padding-bottom: 12px;
}

.deck_title_display {
  font-size: 1.5rem;
  font-weight: 700;
}

.deck_card_count {
  font-size: 0.85rem;
  color: var(--color_text_muted);
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: 12px;
}

/* --- Grille de Cartes à Collectionner (TCG Style) --- */
.card_grid_container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.collectible_card {
  background: var(--color_card_bg);
  border: 1px solid var(--color_card_border);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px var(--color_shadow);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.collectible_card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color_accent_primary), var(--color_accent_secondary));
}

.collectible_card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.5), 0 0 20px var(--color_accent_primary);
}

.card_top_bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.card_deck_label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color_accent_secondary);
  font-weight: 700;
}

.duration_badge {
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 3px 8px;
  border-radius: 20px;
}

.card_title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
}

.card_illustration_zone {
  width: 100%;
  height: 140px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 12px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.card_illustration_svg {
  width: 80px;
  height: 80px;
  color: var(--color_accent_secondary);
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
  transition: transform 0.3s ease;
}

.collectible_card:hover .card_illustration_svg {
  transform: scale(1.1) rotate(-3deg);
}

.card_description {
  font-size: 0.88rem;
  color: var(--color_text_muted);
  line-height: 1.4;
  margin-bottom: 18px;
  flex-grow: 1;
}

.button_start_action {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--color_accent_primary), var(--color_accent_secondary));
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}

.button_start_action:hover {
  opacity: 0.95;
  box-shadow: 0 6px 18px var(--color_accent_primary);
  transform: scale(1.02);
}

/* --- Scène d'Action Plein Écran (Stage Overlay) --- */
.stage_overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  background-color: #0b0f19;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.stage_overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.stage_header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1050;
  background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
}

.stage_card_title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.button_stage_close {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.button_stage_close svg {
  width: 16px;
  height: 16px;
}

.button_stage_close:hover {
  background: rgba(239, 68, 68, 0.8);
  border-color: #ef4444;
}

.stage_body {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Couches d'effets superposées */
.layer_dark_overlay {
  position: absolute;
  inset: 0;
  z-index: 1010;
  background-color: #000000;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.layer_timer_background {
  position: absolute;
  inset: 0;
  z-index: 1015;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  user-select: none;
}

.layer_animation_stage {
  position: absolute;
  inset: 0;
  z-index: 1030;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* Couche pour afficher le décompte sous l'icône/animation centrale */
.layer_timer_text_hud {
  position: absolute;
  bottom: 110px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1035;
  pointer-events: none;
}

.layer_interactive_hud {
  position: absolute;
  bottom: 40px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1040;
  pointer-events: auto;
}

/* --- Modules Temporels Réarrangés --- */

/* 1. Digital Clock (Chiffres à segment de réveil rétro) */
.digital_clock_display {
  font-family: var(--font_digital);
  font-size: clamp(2.8rem, 8vw, 4.5rem);
  font-weight: 900;
  letter-spacing: 6px;
  color: #ff2222;
  text-shadow: 0 0 15px #ff2222, 0 0 35px #ff0000;
  background: rgba(15, 0, 0, 0.85);
  border: 2px solid rgba(255, 34, 34, 0.4);
  padding: 10px 28px;
  border-radius: 14px;
  box-shadow: 0 0 25px rgba(255, 0, 0, 0.3), inset 0 0 10px rgba(255, 0, 0, 0.3);
}

/* 2. Pie Chart Timer (Cercle en fond géant, texte SOUS l'icône) */
.pie_chart_container {
  width: min(80vw, 80vh);
  height: min(80vw, 80vh);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0.25;
}

.pie_chart_svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.pie_chart_background {
  fill: none;
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 12;
}

.pie_chart_slice {
  fill: none;
  stroke: #3b82f6;
  stroke-width: 12;
  stroke-dasharray: 440;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear;
}

.pie_chart_text_hud {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.9);
  background: rgba(15, 23, 42, 0.7);
  padding: 8px 24px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* 3. Needle Clock (Horloge avec aiguille tournant en sens Anti-Horlogique) */
.needle_clock_container {
  width: min(75vw, 75vh);
  height: min(75vw, 75vh);
  background: rgba(15, 23, 42, 0.15);
  border: 4px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  opacity: 0.3;
}

.needle_clock_svg {
  width: 100%;
  height: 100%;
}

.needle_hand_second {
  stroke: #ef4444;
  stroke-width: 2.5;
  stroke-linecap: round;
  transform-origin: 50px 50px;
}

/* 4. Screen Crack (Fissure nette sans bouton 'retour aux decks') */
.screen_crack_layer {
  position: absolute;
  inset: 0;
  z-index: 1060;
  pointer-events: none;
}

.crack_svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.screen_split_top, .screen_split_bottom {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50%;
  background: #000000;
  transition: transform 0.8s cubic-bezier(0.7, 0, 0.3, 1);
}

.screen_split_top { top: 0; }
.screen_split_bottom { bottom: 0; }

.screen_crack_layer.cracked .screen_split_top {
  transform: translateY(-100%);
}

.screen_crack_layer.cracked .screen_split_bottom {
  transform: translateY(100%);
}

.crack_message_box {
  position: absolute;
  inset: 0;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 1065;
  opacity: 0;
  transition: opacity 0.5s ease 0.8s;
}

.screen_crack_layer.cracked .crack_message_box {
  opacity: 1;
}

.crack_message_text {
  font-size: 2.5rem;
  font-weight: 900;
  color: #ef4444;
  text-transform: uppercase;
  letter-spacing: 3px;
  text-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
}

/* 6. Open Activity Controls */
.open_activity_box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  pointer-events: auto;
}

.button_complete_activity {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border: none;
  padding: 14px 32px;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
  transition: all 0.2s ease;
}

.button_complete_activity:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.7);
}

/* --- Modules Visuels Spécifiques --- */

/* Tasse à Café (Animation de café qui tourne doucement avec vapeur) */
.coffee_cup_container {
  width: 220px;
  height: 220px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.coffee_cup_svg {
  width: 100%;
  height: 100%;
  animation: coffee_swirl_tilt 4s ease-in-out infinite alternate;
}

@keyframes coffee_swirl_tilt {
  0% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg) scale(1.02); }
  100% { transform: rotate(-2deg); }
}

.coffee_liquid_swirl {
  transform-origin: center;
  animation: liquid_spin 8s linear infinite;
}

@keyframes liquid_spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Verre d'Eau (Décroissance en 10 gorgées sans remplissage) */
.water_glass_container {
  width: 140px;
  height: 200px;
  position: relative;
}

.water_glass_svg {
  width: 100%;
  height: 100%;
}

.water_level {
  transition: height 0.8s cubic-bezier(0.4, 0, 0.2, 1), y 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Promenade (Chaussures/Bottes avançant avec empreintes) */
.walking_container {
  width: 280px;
  height: 160px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.walking_shoes_svg {
  width: 100%;
  height: 100%;
  animation: walking_step_pace 1.2s ease-in-out infinite;
}

@keyframes walking_step_pace {
  0% { transform: translateX(-30px) translateY(0); }
  25% { transform: translateX(-15px) translateY(-14px) rotate(-5deg); }
  50% { transform: translateX(0px) translateY(0) rotate(0deg); }
  75% { transform: translateX(15px) translateY(-14px) rotate(5deg); }
  100% { transform: translateX(30px) translateY(0); }
}

/* Gamepad (D-pad +, 4 boutons, rocking & néons séquentiels) */
.gamepad_container {
  width: 260px;
  height: 180px;
  position: relative;
}

.gamepad_svg {
  width: 100%;
  height: 100%;
  animation: gamepad_rocking 2s ease-in-out infinite alternate;
}

@keyframes gamepad_rocking {
  0% { transform: rotate(-5deg) translateY(-4px); }
  100% { transform: rotate(5deg) translateY(4px); }
}

.gamepad_dpad_light {
  animation: dpad_press_glow 1.5s ease-in-out infinite alternate;
}

@keyframes dpad_press_glow {
  0% { fill: #38bdf8; filter: drop-shadow(0 0 8px #38bdf8); }
  50% { fill: #a855f7; filter: drop-shadow(0 0 12px #a855f7); }
  100% { fill: #38bdf8; filter: drop-shadow(0 0 8px #38bdf8); }
}

.gamepad_button_light {
  animation: button_press_glow 1.2s ease-in-out infinite alternate;
}

@keyframes button_press_glow {
  0% { fill: #f43f5e; filter: drop-shadow(0 0 8px #f43f5e); }
  50% { fill: #f59e0b; filter: drop-shadow(0 0 12px #f59e0b); }
  100% { fill: #10b981; filter: drop-shadow(0 0 10px #10b981); }
}

/* Journal Personnel (Plume d'écriture élégante) */
.writing_quill_container {
  width: 240px;
  height: 240px;
  position: relative;
}

.quill_svg {
  width: 100%;
  height: 100%;
  animation: quill_writing_motion 2.5s ease-in-out infinite alternate;
}

@keyframes quill_writing_motion {
  0% { transform: translate(-15px, -10px) rotate(-10deg); }
  30% { transform: translate(10px, 5px) rotate(5deg); }
  60% { transform: translate(-5px, 15px) rotate(-5deg); }
  100% { transform: translate(15px, -5px) rotate(10deg); }
}

/* Tour Eiffel & Flash Photo */
.eiffel_tower_container {
  width: 260px;
  height: 280px;
  position: relative;
}

.eiffel_svg {
  width: 100%;
  height: 100%;
}

.photo_flare_shimmer {
  position: absolute;
  top: 10%;
  left: 20%;
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, rgba(245,158,11,0) 70%);
  border-radius: 50%;
  animation: camera_flare_pass 3s ease-in-out infinite;
}

@keyframes camera_flare_pass {
  0% { transform: scale(0.2) translate(-50px, -50px); opacity: 0; }
  50% { transform: scale(1.5) translate(40px, 30px); opacity: 1; }
  100% { transform: scale(0.2) translate(100px, 80px); opacity: 0; }
}

/* --- Particle Text, Speech Bubbles, Breathing Guide --- */
.particle_text_element {
  position: absolute;
  font-weight: 800;
  user-select: none;
  pointer-events: none;
  animation: float_up_particle 3s ease-out forwards;
}

@keyframes float_up_particle {
  0% { opacity: 0; transform: translateY(20px) scale(0.8); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-120px) scale(1.4); }
}

.speech_bubble_item {
  position: absolute;
  background: #ffffff;
  color: #0f172a;
  padding: 12px 22px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
  animation: pop_speech_bubble 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.speech_bubble_item.left { border-bottom-left-radius: 2px; }
.speech_bubble_item.right { border-bottom-right-radius: 2px; }

@keyframes pop_speech_bubble {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.stretching_container {
  width: 220px;
  height: 260px;
}

.stretching_svg {
  width: 100%;
  height: 100%;
  animation: silhouette_stretch 4s ease-in-out infinite alternate;
}

@keyframes silhouette_stretch {
  0% { transform: scaleY(0.95) translateY(5px); }
  100% { transform: scaleY(1.1) translateY(-10px); }
}

.breathing_guide_box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.breathing_circle {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 218, 220, 0.95) 0%, rgba(69, 123, 157, 0.4) 100%);
  border: 4px solid #a8dadc;
  box-shadow: 0 0 40px rgba(168, 218, 220, 0.8);
  transition: transform 3s ease-in-out;
}

.breathing_circle.inhale { transform: scale(1.4); }
.breathing_circle.exhale { transform: scale(0.7); }

.breathing_instruction {
  font-size: 1.6rem;
  font-weight: 800;
  color: #a8dadc;
  letter-spacing: 1px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

/* Vector Anim Stage */
.vector_anim_stage {
  width: min(85vw, 360px);
  height: min(85vw, 360px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.vector_anim_svg {
  width: 100%;
  height: 100%;
}

.anim_book_pages { animation: book_page_flip 2s ease-in-out infinite alternate; }
@keyframes book_page_flip { 0% { transform: rotateY(0deg); } 100% { transform: rotateY(-30deg); } }

.anim_retro_screen { animation: tv_glitch 0.2s steps(2) infinite; }
@keyframes tv_glitch { 0% { opacity: 0.9; } 50% { opacity: 1; } 100% { opacity: 0.95; } }

.anim_pencil_doodle { animation: pencil_stroke 1.5s ease-in-out infinite alternate; }
@keyframes pencil_stroke { 0% { transform: translate(-10px, -10px) rotate(0deg); } 100% { transform: translate(10px, 10px) rotate(15deg); } }

.anim_rolling_pin { animation: spin_pin 2s linear infinite; }
@keyframes spin_pin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.anim_cleaning_broom { animation: sweep_broom 1.2s ease-in-out infinite alternate; }
@keyframes sweep_broom { 0% { transform: rotate(-15deg); } 100% { transform: rotate(20deg); } }

.anim_compass_map { animation: compass_oscillate 3s ease-in-out infinite alternate; }
@keyframes compass_oscillate { 0% { transform: rotate(-25deg); } 100% { transform: rotate(35deg); } }

.anim_fireworks { animation: firework_burst 1.5s ease-out infinite; }
@keyframes firework_burst { 0% { transform: scale(0.4); opacity: 1; } 100% { transform: scale(1.3); opacity: 0; } }

.anim_cloche_dish { animation: lift_cloche 2s ease-in-out infinite alternate; }
@keyframes lift_cloche { 0% { transform: translateY(0); } 100% { transform: translateY(-25px); } }

.anim_shopping_bags { animation: swing_bags 1.8s ease-in-out infinite alternate; }
@keyframes swing_bags { 0% { transform: rotate(-8deg); } 100% { transform: rotate(8deg); } }

.anim_sun_clouds { animation: rotate_sun 8s linear infinite; }
@keyframes rotate_sun { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* --- Modal d'Importation --- */
.modal_import_deck {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal_import_deck.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.modal_backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
}

.modal_content {
  position: relative;
  width: min(100%, 500px);
  background: #1e293b;
  border: 1px solid var(--color_card_border);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  z-index: 2010;
  overflow: hidden;
}

.modal_header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal_title { font-size: 1.2rem; font-weight: 700; }
.button_close_modal { background: none; border: none; color: var(--color_text_muted); font-size: 1.2rem; cursor: pointer; padding: 4px; }
.modal_body { padding: 24px; }
.modal_description { font-size: 0.9rem; color: var(--color_text_muted); margin-bottom: 20px; line-height: 1.4; }

.import_form_group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.form_label { font-size: 0.85rem; font-weight: 600; color: var(--color_text_main); }
.form_input, .form_textarea { background: rgba(15, 23, 42, 0.6); border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 8px; padding: 10px 14px; color: #ffffff; font-family: inherit; font-size: 0.9rem; outline: none; }
.form_input:focus, .form_textarea:focus { border-color: var(--color_accent_primary); }
.form_textarea { height: 100px; resize: vertical; }

.form_divider { display: flex; align-items: center; justify-content: center; margin: 16px 0; position: relative; }
.form_divider::before { content: ""; position: absolute; left: 0; right: 0; height: 1px; background: rgba(255, 255, 255, 0.1); }
.form_divider span { background: #1e293b; padding: 0 12px; font-size: 0.75rem; font-weight: 700; color: var(--color_text_muted); position: relative; z-index: 1; }

.import_error_message { background: rgba(239, 68, 68, 0.15); border: 1px solid #ef4444; color: #fca5a5; padding: 10px 14px; border-radius: 8px; font-size: 0.85rem; margin-top: 12px; }
.import_error_message.hidden { display: none; }

.modal_footer { display: flex; justify-content: flex-end; gap: 12px; padding: 16px 24px; background: rgba(15, 23, 42, 0.4); border-top: 1px solid rgba(255, 255, 255, 0.1); }
.button_secondary { background: rgba(255, 255, 255, 0.1); color: #ffffff; border: 1px solid rgba(255, 255, 255, 0.15); padding: 10px 18px; border-radius: 8px; font-weight: 600; cursor: pointer; }
.button_primary { background: var(--color_accent_primary); color: #ffffff; border: none; padding: 10px 18px; border-radius: 8px; font-weight: 600; cursor: pointer; }
.button_primary:hover { opacity: 0.9; }

/* Media Queries */
@media (max-width: 600px) {
  .header_bar { padding: 10px 12px; }
  .brand_title { font-size: 1.05rem; }
  .card_grid_container { grid-template-columns: 1fr; }
  .layer_timer_text_hud { bottom: 90px; }
  .layer_interactive_hud { bottom: 24px; }
}
