/* ==========================================
   DESIGN SYSTEM & VARIABLES
   ========================================== */

:root {
  /* Palette Musilac 2026 Officielle (Thème chaud coucher de soleil / concert) */
  --color-bg: hsl(260, 35%, 6%);
  --color-chassis: hsl(260, 35%, 10%);
  --color-card: hsla(260, 35%, 15%, 0.65);
  
  /* Musilac 2026 Communication Colors */
  --color-musilac-red: hsl(355, 95%, 48%);
  --color-musilac-pink: hsl(328, 92%, 49%);
  --color-musilac-purple: hsl(275, 75%, 38%);
  --color-musilac-cyan: hsl(190, 100%, 45%);
  --color-accent-lime: hsl(74, 100%, 50%);
  
  /* CA des Savoie Classical Colors (Boutons partenariat) */
  --color-ca-green: #006a4d; /* Vert CA officiel */
  --color-ca-mint: #008e92; /* Bleu/Vert CA officiel */
  --color-ca-red: #e32021; /* Rouge CA officiel */
  
  --color-text: hsl(0, 0%, 98%);
  --color-text-muted: hsl(240, 5%, 72%);
  --color-border: hsla(240, 5%, 80%, 0.12);
  
  /* Fontes */
  --font-title: 'Outfit', -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;
  
  /* Espace et angles */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-chassis: 36px;
  
  --shadow-neon: 0 0 20px hsla(328, 92%, 49%, 0.25), 0 0 40px hsla(275, 75%, 50%, 0.25);
  --shadow-box: 0 10px 30px rgba(0, 0, 0, 0.6);
}

/* Reset de base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================
   BACKGROUND ANIMÉ DE CONCERT (DESKTOP)
   ========================================== */

.ambient-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  background-image: url('../assets/bg.jpg');
  background-size: cover;
  background-position: center;
  filter: blur(180px) scale(1.35); /* Extremely large blur to fully dissolve details */
}

.ambient-background::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(20, 0, 45, 0.95), rgba(50, 0, 25, 0.92), rgba(55, 5, 5, 0.88)); /* Extra dark violet/pink/red overlay */
  opacity: 0.97; /* Stronger opacity for darker look */
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.glow-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.25;
  animation: floatGlow 20s infinite alternate ease-in-out;
}

.glow-purple {
  top: -10%;
  left: -10%;
  width: 60vw;
  height: 60vw;
  background-color: var(--color-musilac-purple);
}

.glow-green {
  bottom: -15%;
  right: -15%;
  width: 65vw;
  height: 65vw;
  background-color: var(--color-ca-green);
  animation-delay: -5s;
}

.glow-cyan {
  top: 30%;
  left: 40%;
  width: 50vw;
  height: 50vw;
  background-color: var(--color-musilac-pink);
  animation-delay: -10s;
}

@keyframes floatGlow {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(100px, 50px) scale(1.1); }
}

/* ==========================================
   CHÂSSIS MOBILE COMPATIBLE DESKTOP/MOBILE
   ========================================== */

.app-chassis {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(to bottom, rgba(30, 10, 45, 0.88), rgba(15, 5, 25, 0.94)), url('../assets/bg-blurred.jpg');
  background-size: cover;
  background-position: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-box);
  overflow: hidden;
  transition: background-image 0.5s ease, backdrop-filter 0.5s ease;
}

.app-chassis[data-current-screen="welcome"] {
  background-image: linear-gradient(135deg, rgba(30, 5, 45, 0.72), rgba(190, 8, 18, 0.75)), url('../assets/bg-blurred.jpg');
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Barre d'état virtuelle (Simulation téléphone cachée sur mobile natif) */
.mobile-status-bar {
  display: none;
  justify-content: space-between;
  align-items: center;
  padding: 8px 24px;
  background-color: rgba(0, 0, 0, 0.2);
  font-family: var(--font-title);
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: 600;
  z-index: 20;
}

.status-icons {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Version Desktop : On confine l'appli dans un cadre 9/16 centré */
@media (min-width: 480px) {
  body {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
  }
  
  .app-chassis {
    width: 412px;
    height: 892px; /* Ratio iPhone 15 Pro */
    border-radius: var(--radius-chassis);
    border: 12px solid #1c1c1e; /* Cadre de téléphone */
    position: relative;
  }
  
  .mobile-status-bar {
    display: flex; /* Visible uniquement sur desktop */
  }

  /* Ajout d'une petite encoche de haut-parleur/caméra virtuelle */
  .app-chassis::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 30px;
    background-color: #1c1c1e;
    border-radius: 20px;
    z-index: 100;
    pointer-events: none;
  }
}

/* ==========================================
   EN-TÊTE FIXE ET STRUCTURE DE PAGES
   ========================================== */

.app-header {
  display: flex;
  justify-content: center; /* Centrer le logo CA des Savoie */
  align-items: center;
  padding: 8px 20px; /* Hauteur réduite */
  border-bottom: none;
  background-color: transparent; /* Fond violet enlevé */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  z-index: 15;
  position: relative;
}

.back-nav-btnheader {
  display: none !important;
}

.app-chassis[data-current-screen="form"] .back-nav-btnheader {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.app-chassis[data-current-screen="form"] .back-nav-btnheader:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.logo-svg {
  height: 28px;
  width: auto;
  display: block;
}

.logo-ca .logo-svg {
  height: 38px; /* Hauteur réduite pour un header plus compact */
}

/* Musilac logo on the welcome page */
.welcome-brand-logo {
  display: flex;
  justify-content: center;
  margin: 16px 0;
}

.welcome-musilac-logo {
  height: 24px; /* Taille compacte et élégante */
  width: auto;
  filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.2));
}

.screen {
  flex: 1;
  display: none;
  opacity: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px;
  flex-direction: column;
}

.screen.active {
  display: flex;
  opacity: 1;
}

.screen-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* ==========================================
   STYLES DU BOUTON & COMPOSANTS
   ========================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 24px;
  border-radius: var(--radius-md);
  border: none;
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-ca-red), var(--color-musilac-red));
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(227, 32, 33, 0.35);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(227, 32, 33, 0.55);
}

.btn-primary:disabled {
  background: #3a3a3c;
  color: #8e8e93;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  background: linear-gradient(135deg, var(--color-musilac-pink), var(--color-musilac-purple));
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(227, 32, 33, 0.35);
}

.btn-secondary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(227, 32, 33, 0.5);
}

.btn-text {
  background: transparent;
  color: var(--color-text-muted);
  font-size: 14px;
  text-transform: none;
  text-decoration: underline;
  padding: 10px;
}

.btn-text:hover {
  color: var(--color-text);
}

/* Animations de boutons */
.btn-pulse {
  animation: pulseButton 2s infinite;
}

@keyframes pulseButton {
  0% { box-shadow: 0 0 0 0 hsla(145, 100%, 50%, 0.4); }
  70% { box-shadow: 0 0 0 12px hsla(145, 100%, 50%, 0); }
  100% { box-shadow: 0 0 0 0 hsla(145, 100%, 50%, 0); }
}

/* Badges */
.badge {
  display: inline-block;
  align-self: center;
  background-color: hsla(74, 100%, 50%, 0.15);
  color: var(--color-accent-lime);
  border: 1px solid var(--color-accent-lime);
  padding: 6px 12px;
  border-radius: 50px;
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  margin-bottom: 15px;
  text-transform: uppercase;
}

/* ==========================================
   ÉCRAN 1 : WELCOME
   ========================================== */

.welcome-layout {
  justify-content: space-around;
  text-align: center;
}

.welcome-visual {
  position: relative;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-box-svg {
  width: 180px;
  height: 180px;
  animation: hoverBox 4s infinite alternate ease-in-out;
}

/* 3D welcome box styles */
.welcome-box-container {
  height: 220px !important;
  width: 100% !important;
  animation: hoverBox3D 4s infinite alternate ease-in-out;
  cursor: default !important;
  pointer-events: none;
}

@keyframes hoverBox3D {
  0% { transform: translateY(0); }
  100% { transform: translateY(-12px); }
}

.welcome-box-wrapper {
  transform-style: preserve-3d;
  animation: oscillateBox 6s infinite alternate ease-in-out !important;
}

.welcome-box-wrapper:hover {
  transform: none !important;
}

@keyframes oscillateBox {
  0% { transform: rotateX(-15deg) rotateY(15deg) scale(1.1); }
  100% { transform: rotateX(-15deg) rotateY(55deg) scale(1.1); }
}

.visual-glow {
  position: absolute;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, var(--color-ca-mint) 0%, transparent 70%);
  opacity: 0.2;
  filter: blur(20px);
  animation: pulseGlow 3s infinite alternate ease-in-out;
}

@keyframes hoverBox {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-15px) rotate(3deg); }
}

@keyframes pulseGlow {
  0% { transform: scale(1); opacity: 0.15; }
  100% { transform: scale(1.3); opacity: 0.3; }
}

.welcome-text h1 {
  font-family: var(--font-title);
  font-size: 32px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 12px;
  background: linear-gradient(to right, #fff 30%, var(--color-ca-mint), var(--color-musilac-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.welcome-text p {
  font-size: 15px;
  color: var(--color-text-muted);
  line-height: 1.5;
  max-width: 320px;
  margin: 0 auto;
  text-align: justify;
}

.welcome-text strong {
  color: #ffffff;
}

.welcome-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  width: 100%;
}

.info-footer {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
}

.powered-by-avatarz {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-family: var(--font-body);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 5px;
}

.powered-by-avatarz img {
  height: 10px;
  opacity: 0.55;
  width: auto;
  display: inline-block;
  vertical-align: middle;
}

/* ==========================================
   ÉCRAN 2 : FORMULAIRE D'INSCRIPTION
   ========================================== */

.back-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 12px;
  margin-top: 4px;
  margin-bottom: 2px;
  border-radius: 8px;
  transition: all 0.2s ease;
  align-self: flex-start;
}

.back-nav-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.form-layout {
  justify-content: flex-start;
  gap: 12px;
}

.section-title h2 {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 4px;
}

.section-title p {
  font-size: 13.5px;
  color: var(--color-text-muted);
  line-height: 1.4;
  margin-bottom: 12px;
}

#registration-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.form-row-name {
  display: flex;
  gap: 12px;
  width: 100%;
}

.flex-1 {
  flex: 1;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-family: var(--font-title);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input {
  width: 100%;
  box-sizing: border-box;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 14.5px;
  color: #ffffff;
  transition: all 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--color-ca-mint);
  background-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 10px hsla(145, 100%, 50%, 0.1);
}

/* Utilisation de :user-valid de la guidance modern web */
.form-group input:user-valid {
  border-color: var(--color-ca-green);
}

.form-group input:invalid:not(:placeholder-shown) {
  border-color: var(--color-ca-red);
}

.field-hint {
  font-size: 11px;
  color: var(--color-text-muted);
  opacity: 0.7;
}

/* Checkboxes personnalisées */
.form-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 4px 0;
}

.checkbox-container {
  display: flex;
  align-items: flex-start;
  position: relative;
  padding-left: 26px;
  cursor: pointer;
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.35;
  user-select: none;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 1px;
  left: 0;
  height: 17px;
  width: 17px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  transition: all 0.2s ease;
}

.checkbox-container:hover input ~ .checkmark {
  background-color: rgba(255, 255, 255, 0.1);
}

.checkbox-container input:checked ~ .checkmark {
  background-color: var(--color-accent-lime);
  border-color: var(--color-accent-lime);
}

.checkmark::after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-container input:checked ~ .checkmark::after {
  display: block;
}

.checkbox-container .checkmark::after {
  left: 6px;
  top: 2px;
  width: 4px;
  height: 9px;
  border: solid #000000;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ==========================================
   QUIZ DE TRANSITION & SECONDE CHANCE
   ========================================== */

.quiz-layout {
  justify-content: flex-start;
  gap: 25px;
}

.quiz-header {
  text-align: center;
}

.quiz-indicator {
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--color-musilac-cyan);
  letter-spacing: 2px;
  display: block;
  margin-bottom: 8px;
}

.quiz-question {
  font-size: 18px;
  line-height: 1.4;
  font-weight: 600;
  color: #ffffff;
  margin-top: 10px;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.quiz-opt {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
  padding: 16px;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s ease;
}

.quiz-opt:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
}

.opt-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 13px;
  color: var(--color-text-muted);
}

/* Styles correct / incorrect */
.quiz-opt.correct {
  background-color: rgba(0, 154, 114, 0.2);
  border-color: var(--color-ca-green);
  box-shadow: 0 0 15px rgba(0, 154, 114, 0.3);
}
.quiz-opt.correct .opt-letter {
  background-color: var(--color-ca-green);
  color: white;
}

.quiz-opt.incorrect {
  background-color: rgba(226, 32, 38, 0.15);
  border-color: var(--color-ca-red);
  opacity: 0.6;
}
.quiz-opt.incorrect .opt-letter {
  background-color: var(--color-ca-red);
  color: white;
}

/* Feedback box */
.quiz-feedback {
  display: flex;
  gap: 15px;
  padding: 16px;
  background-color: rgba(0, 210, 255, 0.08);
  border: 1px dashed var(--color-musilac-cyan);
  border-radius: var(--radius-md);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease;
  pointer-events: none;
}

.quiz-feedback.visible {
  opacity: 1;
  transform: translateY(0);
}

.feedback-icon {
  font-size: 24px;
}

.feedback-text h3 {
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--color-musilac-cyan);
}

.feedback-text p {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* ==========================================
   CONCEPTION DE LA LOOTBOX EN CSS 3D
   ========================================== */

.lootbox-layout {
  justify-content: space-between;
  align-items: center;
  text-align: center;
}

.lootbox-title h2 {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 6px;
}

.lootbox-title p {
  font-size: 14px;
  color: var(--color-text-muted);
}

.box-3d-container {
  height: 320px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px; /* Force l'effet 3D */
  cursor: pointer;
  position: relative;
}

.box-wrapper {
  position: relative;
  width: 130px;
  height: 100px;
  transform-style: preserve-3d;
  transform: rotateX(-20deg) rotateY(40deg) scale(1.3); /* 30% larger box size */
  transition: transform 0.5s ease;
}

.box-wrapper:hover {
  transform: rotateX(-20deg) rotateY(55deg) scale(1.4);
}

/* Canvas confetti restreint à l'écran de l'app */
#confetti-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
}

/* 3D Faces styling */
.face {
  position: absolute;
  box-shadow: inset 0 0 15px rgba(0, 240, 255, 0.2);
  border: 1px solid rgba(0, 240, 255, 0.3);
}

/* Couvercle */
.box-lid {
  position: absolute;
  top: -15px;
  left: 0;
  width: 130px;
  height: 25px;
  transform-style: preserve-3d;
  transform-origin: 50% 100% -65px; /* Pivot sur l'arête arrière */
  transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 3;
}

.lid-top {
  width: 130px;
  height: 130px;
  background: radial-gradient(circle, #1c2742, #0c101b);
  transform: rotateX(90deg) translateZ(65px);
  border: 2px solid var(--color-accent-lime);
  box-shadow: inset 0 0 25px rgba(0, 240, 255, 0.3), 0 0 15px rgba(198, 255, 0, 0.15);
}

.lid-front {
  width: 130px;
  height: 25px;
  background: linear-gradient(#1c2742, #0e1424);
  transform: rotateY(0deg) translateZ(65px);
  border-bottom: 2px solid var(--color-accent-lime);
}

.lid-back {
  width: 130px;
  height: 25px;
  background: #0c101b;
  transform: rotateY(180deg) translateZ(65px);
}

.lid-left {
  width: 130px;
  height: 25px;
  background: #0e1424;
  transform: rotateY(-90deg) translateZ(65px);
}

.lid-right {
  width: 130px;
  height: 25px;
  background: #0e1424;
  transform: rotateY(90deg) translateZ(65px);
}

/* Corps du coffre */
.box-body {
  position: absolute;
  top: 10px;
  left: 0;
  width: 130px;
  height: 75px;
  transform-style: preserve-3d;
  z-index: 1;
}

.body-front {
  width: 130px;
  height: 75px;
  background: linear-gradient(#0e1424, #080c16);
  transform: rotateY(0deg) translateZ(65px);
  border: 2px solid var(--color-musilac-cyan);
  box-shadow: inset 0 0 20px rgba(0, 240, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Logos gravés sur la face avant du coffre */
.box-logos-front {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 0 10px;
}

.box-logo-cads {
  height: 22px;
  filter: drop-shadow(0 0 5px rgba(0, 240, 255, 0.6));
  opacity: 0.9;
  transition: filter 0.3s ease;
}

.box-logo-divider {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.2);
}

.box-logo-musilac {
  height: 8px;
  filter: drop-shadow(0 0 5px rgba(198, 255, 0, 0.6));
  opacity: 0.9;
  transition: filter 0.3s ease;
}

.box-question-mark {
  font-family: var(--font-title);
  font-size: 54px;
  font-weight: 800;
  color: var(--color-accent-lime);
  text-shadow: 0 0 15px rgba(198, 255, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  transform: rotateZ(-40deg); /* Counteract box Y-rotation angle to look straight */
  user-select: none;
}

.box-text-side {
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 800;
  color: var(--color-accent-lime);
  text-shadow: 0 0 8px rgba(198, 255, 0, 0.6);
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  user-select: none;
}

.body-back {
  width: 130px;
  height: 75px;
  background: #080c16;
  transform: rotateY(180deg) translateZ(65px);
}

.body-left {
  width: 130px;
  height: 75px;
  background: #0e1424;
  transform: rotateY(-90deg) translateZ(65px);
}

.body-right {
  width: 130px;
  height: 75px;
  background: #0e1424;
  transform: rotateY(90deg) translateZ(65px);
}

.body-bottom {
  width: 130px;
  height: 130px;
  background: #05070d;
  transform: rotateX(-90deg) translateZ(37.5px);
}

/* Halo lumineux arrière */
.box-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, var(--color-ca-mint) 0%, transparent 70%);
  transform: translate(-50%, -50%) translateZ(-80px);
  opacity: 0.3;
  filter: blur(15px);
  transition: all 0.8s ease;
  pointer-events: none;
}

/* Contenu du coffre qui jaillit */
.box-contents {
  position: absolute;
  top: -10px;
  left: 25px;
  width: 80px;
  height: 80px;
  transform: translateZ(0) translateY(40px) scale(0.1);
  transform-style: preserve-3d;
  opacity: 0;
  z-index: 2;
  color: var(--color-accent-lime);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.goodie-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 15px var(--color-accent-lime));
}

/* ÉTAT ANIMÉ DE LA BOÎTE */

/* Vibration lors du clic (Shake) */
.box-wrapper.shake {
  animation: boxShake 0.15s infinite alternate;
}

@keyframes boxShake {
  0% { transform: rotateX(-20deg) rotateY(40deg) scale(1.3) translate(2px, 1px) rotate(1deg); }
  100% { transform: rotateX(-20deg) rotateY(40deg) scale(1.3) translate(-2px, -1px) rotate(-1deg); }
}

/* Ouverture */
.box-wrapper.open .box-lid {
  transform: translateY(-60px) rotateX(-95deg); /* Lift lid vertically and stand it open */
}

.box-wrapper.open .box-glow {
  opacity: 0.8;
  transform: translate(-50%, -50%) translateZ(-80px) scale(1.6);
  background: radial-gradient(circle, var(--color-accent-lime) 0%, transparent 70%);
}

.box-wrapper.open .box-contents {
  opacity: 1;
  transform: translateZ(0) translateY(-65px) scale(1.2) rotateY(-40deg);
}

.lootbox-instruction {
  margin-bottom: 20px;
}

.touch-hint {
  display: inline-block;
  font-family: var(--font-title);
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #ff4d4d, #d61b1b); /* Premium red button background */
  padding: 16px 38px;
  border-radius: 30px;
  border: none;
  box-shadow: 0 0 18px rgba(214, 27, 27, 0.4);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: pulseButtonRed 2s infinite;
  cursor: pointer;
  user-select: none;
}

.touch-hint:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 0 25px rgba(214, 27, 27, 0.7);
  background: linear-gradient(135deg, #ff6666, #eb2424);
}

@keyframes pulseButtonRed {
  0%, 100% { box-shadow: 0 0 12px rgba(214, 27, 27, 0.4); }
  50% { box-shadow: 0 0 24px rgba(214, 27, 27, 0.75); }
}

@keyframes pulseText {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; color: var(--color-ca-mint); }
}

@keyframes pulseButton {
  0% { box-shadow: 0 0 0 0 rgba(0, 106, 77, 0.5); }
  70% { box-shadow: 0 0 0 12px rgba(0, 106, 77, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 106, 77, 0); }
}

/* ==========================================
   ÉCRANS DE SECONDE CHANCE ET FORM
   ========================================== */

.second-chance-layout {
  justify-content: flex-start;
  gap: 20px;
}

.second-chance-form-box {
  background-color: var(--color-card);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

/* ==========================================
   TICKET DE RETRAIT FINAL
   ========================================== */

.ticket-layout {
  justify-content: flex-start;
  gap: 15px;
}

.ticket-header {
  text-align: center;
}

.ticket-header h2 {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 800;
}

.ticket-header p {
  font-size: 13px;
  color: var(--color-text-muted);
}

/* Design de la carte ticket VIP */
.ticket-card {
  position: relative;
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  box-shadow: var(--shadow-box);
  overflow: hidden;
}

.ticket-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ticket-badge {
  font-family: var(--font-title);
  font-size: 10px;
  font-weight: 800;
  color: var(--color-ca-mint);
  border: 1px solid var(--color-ca-mint);
  padding: 4px 8px;
  border-radius: 4px;
}

.ticket-logos {
  font-family: var(--font-title);
  font-size: 10px;
  font-weight: 700;
  color: var(--color-text-muted);
  display: flex;
  gap: 4px;
}

.ticket-musilac-text {
  color: var(--color-musilac-cyan);
}

.ticket-user-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ticket-user-info .label, .ticket-prizes-section .label {
  display: block;
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-muted);
  margin-bottom: 2px;
  text-transform: uppercase;
}

.ticket-user-info .value {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

/* Ligne pointillée découpe ticket */
.ticket-divider {
  position: relative;
  margin: 10px -20px;
}

.ticket-divider .circle {
  position: absolute;
  top: -8px;
  width: 16px;
  height: 16px;
  background-color: var(--color-chassis);
  border-radius: 50%;
  border: 1px solid var(--color-border);
  z-index: 2;
}

.ticket-divider .circle-left {
  left: -8px;
  clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
}

.ticket-divider .circle-right {
  right: -8px;
  clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
}

.ticket-divider .dashed-line {
  border-top: 2px dashed var(--color-border);
  width: 100%;
}

/* Liste des goodies */
.ticket-prizes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
}

.ticket-prize-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  background-color: rgba(255, 255, 255, 0.03);
  padding: 15px 10px;
  border-radius: var(--radius-md);
  border-left: none;
  border-top: 3px solid var(--color-accent-lime);
  height: 100%;
  justify-content: center;
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.02);
}

.ticket-prize-icon {
  width: 96px; /* Plus gros ! */
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ticket-prize-icon svg,
.ticket-prize-icon img {
  width: 100%;
  height: 100%;
  max-width: 96px;
  max-height: 96px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.ticket-prize-name {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.25;
  color: #ffffff;
}

.ticket-prize-sub {
  display: block;
  font-size: 10px;
  color: var(--color-text-muted);
}

/* Zone du QR Code et colonnes */
.ticket-columns-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 15px;
  align-items: stretch;
  margin-top: 5px;
}

.ticket-prizes-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ticket-qrcode-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  text-align: center;
}

.qrcode-container {
  background-color: white;
  padding: 6px;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  display: inline-block;
}

/* Rendre le code QR svelte */
.qrcode-container canvas, .qrcode-container img {
  display: block;
}

.ticket-code-text {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ticket-anti-fraud-code {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 3px;
  color: #10b981; /* Green/emerald color */
  margin: 6px 0;
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
  text-align: center;
}

.ticket-countdown-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin: 8px 0;
  padding: 6px 14px;
  background-color: rgba(226, 32, 38, 0.08);
  border: 1px dashed rgba(226, 32, 38, 0.3);
  border-radius: var(--radius-sm);
  width: 100%;
}

.countdown-label {
  font-family: var(--font-title);
  font-size: 10px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.countdown-timer {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 800;
  color: var(--color-ca-red);
  letter-spacing: 1.5px;
  animation: flashTimer 1s infinite alternate;
}

@keyframes flashTimer {
  0% { opacity: 0.8; }
  100% { opacity: 1; text-shadow: 0 0 8px rgba(226, 32, 38, 0.3); }
}

.ticket-date-label {
  font-size: 10px;
  color: var(--color-text-muted);
}

/* Instructions */
.ticket-instructions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 10px 0;
}

.instruction-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.instruction-item .num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background-color: var(--color-ca-green);
  color: white;
  border-radius: 50%;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 12px;
  flex-shrink: 0;
}

.instruction-item p {
  font-size: 13px;
  line-height: 1.4;
  color: var(--color-text-muted);
}

.btn-staff-link {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-size: 11px;
  text-decoration: underline;
  cursor: pointer;
  display: block;
  margin: 0 auto;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.btn-staff-link:hover {
  opacity: 1;
}

.btn-claim-direct {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: white !important;
  border: none !important;
  padding: 12px 24px !important;
  border-radius: 30px !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  cursor: pointer !important;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4) !important;
  transition: all 0.3s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  margin: 15px auto !important;
  width: 90% !important;
  max-width: 320px !important;
  text-decoration: none !important;
}

.btn-claim-direct:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6) !important;
}

.btn-claim-direct:active {
  transform: translateY(1px) !important;
}

/* ==========================================
   ÉCRAN TICKET VALIDÉ (CONSOMMÉ)
   ========================================== */

.consumed-layout {
  justify-content: space-around;
  align-items: center;
}

.success-banner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.success-icon-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--color-ca-green);
  color: white;
  box-shadow: 0 0 20px hsla(164, 98%, 34%, 0.4);
}

.success-banner h2 {
  font-family: var(--font-title);
  font-size: 26px;
  font-weight: 800;
}

.success-banner p {
  font-size: 14px;
  color: var(--color-text-muted);
}

/* Style de ticket consommé (grisé + tamponné) */
.ticket-card.consumed {
  border-color: rgba(255, 255, 255, 0.05);
  opacity: 0.7;
}

.ticket-card.consumed .ticket-prize-item {
  border-left-color: var(--color-text-muted);
  opacity: 0.6;
}

/* Tampon diagonal LOT REMIS */
.consumed-stamp {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
  border: 4px double var(--color-ca-red);
  color: var(--color-ca-red);
  font-family: var(--font-title);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 3px;
  padding: 10px 20px;
  border-radius: 10px;
  background-color: var(--color-chassis);
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  z-index: 5;
  pointer-events: none;
  opacity: 0.9;
  text-transform: uppercase;
}

.consumed-footer {
  font-size: 11px;
  color: var(--color-text-muted);
  opacity: 0.5;
  text-align: center;
}

/* ==========================================
   FARDS D'ACTION (MODALS) - DIALOGS
   ========================================== */

/* Dialog Backdrop styling */
dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
}

.modal-win {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  background-color: rgba(14, 20, 36, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  width: 90%;
  max-width: 360px;
  margin: auto;
  overflow: visible;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 240, 255, 0.1);
}

.modal-content {
  position: relative;
  padding: 24px 20px 30px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.modal-header-logo {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 5px;
}

.modal-ca-logo {
  height: 25px;
  opacity: 0.95;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.2));
}

.modal-glow {
  position: absolute;
  top: -40px;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, var(--color-musilac-purple) 0%, transparent 70%);
  opacity: 0.4;
  filter: blur(20px);
  z-index: -1;
  pointer-events: none;
}

.modal-badge {
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 800;
  color: var(--color-accent-lime);
  letter-spacing: 2px;
}

.modal-win h2 {
  font-family: var(--font-title);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  color: #ffffff;
  background: linear-gradient(135deg, #ffffff 40%, var(--color-accent-lime) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-top: 5px;
}

.win2-intro {
  color: #ffffff !important;
  font-size: 0.9rem;
  line-height: 1.4;
  margin-top: -5px;
  margin-bottom: 5px;
  opacity: 0.9;
}

.modal-confetti {
  font-size: 36px;
  animation: spinConfetti 3s infinite linear;
}

@keyframes spinConfetti {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.2); }
  100% { transform: rotate(360deg) scale(1); }
}

/* Hologram Goodie Card Inside Modal */
.goodie-card-hologram {
  position: relative;
  width: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.08));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.05);
  margin-top: 25px;
}

/* Effet brillant holographique */
.goodie-card-hologram::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 40%, rgba(0, 255, 135, 0.1) 50%, transparent 60%);
  transform: rotate(30deg);
  animation: hologramShine 4s infinite linear;
  pointer-events: none;
}

.goodie-card-hologram.alt-color::before {
  background: linear-gradient(45deg, transparent 40%, rgba(0, 210, 255, 0.15) 50%, transparent 60%);
}

@keyframes hologramShine {
  0% { transform: translate(-30%, -30%) rotate(30deg); }
  100% { transform: translate(30%, 30%) rotate(30deg); }
}

.hologram-icon {
  width: 105px;
  height: 105px;
  color: var(--color-accent-lime);
}

.hologram-icon svg,
.hologram-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hologram-name {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.hologram-desc {
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 10px;
}

/* Hôtesse validation PIN box */
.dialog-hostess {
  border: none;
  border-radius: var(--radius-lg);
  background-color: var(--color-chassis);
  width: 85%;
  max-width: 320px;
  margin: auto;
  box-shadow: 0 15px 40px rgba(0,0,0,0.7);
}

.hostess-pin-box {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.hostess-pin-box h2 {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 800;
}

.hostess-pin-box p {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.hostess-pin-box input {
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 20px;
  letter-spacing: 6px;
  text-align: center;
  color: white;
  font-family: var(--font-title);
  font-weight: 800;
  width: 100%;
}

.error-msg {
  color: var(--color-ca-red);
  font-size: 11px;
  margin-top: 4px;
  display: block;
}

.dialog-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 5px;
}


/* ==========================================
   GLISSEMENTS VIEW TRANSITIONS (SPA)
   ========================================== */

::view-transition-group(root) {
  animation: 0.35s cubic-bezier(0.4, 0.0, 0.2, 1) both;
}

@keyframes slide-to-left {
  to { transform: translateX(-100%); }
}

@keyframes slide-from-right {
  from { transform: translateX(100%); }
}

@keyframes slide-to-right {
  to { transform: translateX(100%); }
}

@keyframes slide-from-left {
  from { transform: translateX(-100%); }
}

/* Transition en avant (Forward) */
html:active-view-transition-type(forward)::view-transition-old(root) {
  animation-name: slide-to-left;
}

html:active-view-transition-type(forward)::view-transition-new(root) {
  animation-name: slide-from-right;
}

/* Transition en arrière (Backward) */
html:active-view-transition-type(backward)::view-transition-old(root) {
  animation-name: slide-to-right;
}

html:active-view-transition-type(backward)::view-transition-new(root) {
  animation-name: slide-from-left;
}

/* Accessibilité : désactiver les animations si réduction de mouvement */
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(root) {
    animation: none !important;
  }
}

/* ==========================================
   STYLES CGU MODAL & RGPD
   ========================================== */

.cgu-link-wrapper {
  text-align: left;
  margin-top: -6px;
  margin-bottom: 6px;
  padding-left: 28px;
}

.cgu-modal-link {
  background: none;
  border: none;
  color: var(--color-ca-mint); /* Bleu-vert à la CA */
  text-decoration: underline;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease;
}

.cgu-modal-link:hover {
  color: var(--color-text);
}

.dialog-cgu {
  border: none;
  border-radius: var(--radius-lg);
  background-color: var(--color-chassis);
  width: 90%;
  max-width: 380px;
  margin: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.cgu-box {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cgu-box h2 {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
}

.cgu-subtitle {
  font-size: 12px;
  color: var(--color-ca-mint); /* Bleu-vert à la CA */
  font-weight: 600;
  margin-top: -6px;
  display: block;
}

.cgu-scroll-content {
  max-height: 280px;
  overflow-y: auto;
  padding-right: 8px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--color-text-muted);
  text-align: left;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding-top: 10px;
  margin-bottom: 8px;
}

/* Custom Scrollbar for CGU */
.cgu-scroll-content::-webkit-scrollbar {
  width: 5px;
}

.cgu-scroll-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

.cgu-scroll-content::-webkit-scrollbar-thumb {
  background: var(--color-ca-mint);
  border-radius: 10px;
}

.cgu-scroll-content h3 {
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  margin-top: 14px;
  margin-bottom: 4px;
}

.cgu-scroll-content p {
  margin-bottom: 10px;
}

.cgu-scroll-content ul {
  margin-bottom: 10px;
  padding-left: 16px;
}

.cgu-scroll-content li {
  margin-bottom: 4px;
}

/* Modal Tabs (Segmented Control Premium) */
.modal-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 16px;
  box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.05);
}

.modal-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 20px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  text-align: center;
  outline: none;
}

.modal-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.modal-tab-btn.active {
  color: #0f0519; /* Highly visible dark text on lime/cyan gradient */
  background: linear-gradient(135deg, var(--color-accent-lime), var(--color-musilac-cyan));
  box-shadow: 0 4px 12px rgba(198, 255, 0, 0.25);
  font-weight: bold;
}

.modal-tab-content {
  display: none;
}

.modal-tab-content.active-content {
  display: block;
}

/* ==========================================
   VIDEO PLAYER & LOADER STYLES
   ========================================== */

.lootbox-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-bg);
  z-index: 50;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.lootbox-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.video-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  color: var(--color-text-muted);
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 600;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-left-color: var(--color-ca-mint);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Checkbox discrete */
.checkbox-container.discrete-checkbox {
  opacity: 0.85;
  font-size: 11.5px;
  margin-top: 2px;
  border-top: 1px dashed rgba(255, 255, 255, 0.05);
  padding-top: 8px;
}

.checkbox-container.discrete-checkbox .checkmark {
  width: 16px;
  height: 16px;
  top: 1px;
}

.checkbox-container.discrete-checkbox input:checked ~ .checkmark {
  background-color: var(--color-accent-lime);
  border-color: var(--color-accent-lime);
}

.checkbox-container.discrete-checkbox input:checked ~ .checkmark::after {
  left: 5px;
  top: 1px;
  width: 3px;
  height: 8px;
  border-color: #000000;
}

/* Banner de promotion Poster Interactif */
.poster-promo-banner {
  background: hsla(190, 100%, 45%, 0.08);
  border: 1px solid rgba(0, 210, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 15px 0;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 210, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.promo-badge {
  display: inline-block;
  background-color: rgba(0, 210, 255, 0.15);
  color: var(--color-musilac-cyan);
  border: 1px solid var(--color-musilac-cyan);
  padding: 4px 8px;
  border-radius: 50px;
  font-family: var(--font-title);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.poster-promo-banner h3 {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.poster-promo-banner p {
  font-size: 11px;
  color: var(--color-text-muted);
  line-height: 1.4;
  margin-bottom: 12px;
}

.promo-btn {
  padding: 10px 16px !important;
  font-size: 11px !important;
  border-radius: var(--radius-sm) !important;
  width: auto !important;
  min-height: auto !important;
  height: auto !important;
}

/* ==========================================
   PASSWORD GATE OVERLAY
   ========================================== */
.password-gate-overlay {
  position: fixed;
  inset: 0;
  background-color: #09090b;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.password-gate-box {
  background-color: var(--color-chassis);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 255, 135, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.password-gate-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.password-gate-logo {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--color-accent-lime), var(--color-musilac-cyan));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.3rem;
  color: #0f0519; /* Legible dark color matching G Goodiz */
}

.password-gate-header h2 {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 800;
  color: white;
}

.password-gate-msg {
  margin-bottom: 24px;
}

.password-gate-msg h3 {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
}

.password-gate-msg p {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.4;
}

#password-gate-form {
  width: 100%;
}

#password-gate-form input {
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 16px;
  text-align: center;
  color: white;
  width: 100%;
  transition: border-color 0.2s ease;
  outline: none;
}

#password-gate-form input:focus {
  border-color: var(--color-ca-mint);
}

/* Split Actions landing page styles */
.split-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 420px;
  margin: 0 auto 15px auto;
}

.action-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  text-align: left;
  color: #111827;
  width: 100%;
  box-sizing: border-box;
}

.action-card.card-goodies {
  border: 1px solid rgba(239, 68, 68, 0.45);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.08);
}

.action-card.card-poster {
  border: 1px solid rgba(99, 102, 241, 0.45);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.08);
}

.action-card.card-goodies:hover:not(:disabled) {
  transform: translateY(-4px);
  background: #ffffff;
  border-color: #ff2a2a;
  box-shadow: 0 0 20px rgba(255, 42, 42, 0.6);
}

.action-card.card-poster:hover:not(:disabled) {
  transform: translateY(-4px);
  background: #ffffff;
  border-color: #6366f1;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.6);
}

/* Effet de surbrillance pulsée (irradiation rouge vif) pour la Gift Box active */
.action-card.card-goodies:not(:disabled) {
  border-width: 1px;
  animation: glow-red 1.6s ease-in-out infinite alternate;
}

@keyframes glow-red {
  0% {
    box-shadow: 0 0 8px rgba(255, 42, 42, 0.3);
    border-color: rgba(255, 42, 42, 0.6);
  }
  100% {
    box-shadow: 0 0 22px rgba(255, 42, 42, 0.9), inset 0 0 8px rgba(255, 42, 42, 0.2);
    border-color: #ff1a1a;
  }
}

.action-card:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: none;
  animation: none;
}

.card-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.card-content h3 {
  margin: 0 0 2px 0;
  font-family: var(--font-title);
  font-size: 19px;
  font-weight: 800;
  color: #111827;
  letter-spacing: 0.2px;
}

.card-content p {
  margin: 0;
  font-family: var(--font-body);
  font-size: 13px;
  color: #4b5563;
  line-height: 1.45;
}

.card-status {
  align-self: flex-start;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  border-radius: 6px;
  margin-top: 6px;
}

.card-goodies .card-status {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.card-poster .card-status {
  background: rgba(99, 102, 241, 0.12);
  color: #4f46e5;
}

.action-card:disabled .card-status {
  background: rgba(0, 0, 0, 0.05);
  color: #71717a;
}

/* Customisations colonnes et titre du ticket */
.ticket-section-title {
  width: 100%;
  margin-top: 5px;
  margin-bottom: 2px;
  text-align: left;
}

.ticket-section-title .label {
  display: block;
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.ticket-qrcode-column .ticket-anti-fraud-code {
  font-size: 20px;
  margin: 4px 0 0 0;
  letter-spacing: 1.5px;
}

.ticket-card-footer {
  text-align: center;
  margin-top: 15px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.ticket-card-footer .ticket-countdown-wrapper {
  margin: 5px 0 10px 0;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background-color: rgba(226, 32, 38, 0.06);
  border: 1.5px dashed rgba(226, 32, 38, 0.35);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  box-shadow: 0 4px 12px rgba(226, 32, 38, 0.05);
}

.ticket-card-footer .countdown-label {
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.ticket-card-footer .countdown-timer {
  font-family: var(--font-title);
  font-size: 24px; /* Plus grand ! */
  font-weight: 800;
  color: var(--color-ca-red);
  letter-spacing: 1px;
  text-shadow: 0 0 12px rgba(226, 32, 38, 0.2);
}

.ticket-card-footer .ticket-date-label {
  font-size: 10px;
  opacity: 0.35;
}

/* Responsivité pour les petits téléphones */
@media (max-width: 380px) {
  .ticket-columns-container {
    gap: 10px;
    grid-template-columns: 1.15fr 1fr;
  }
  .ticket-prize-item {
    padding: 12px 6px;
  }
  .ticket-prize-icon {
    width: 80px; /* Un peu plus grand sur petit tel aussi */
    height: 80px;
  }
  .ticket-prize-icon svg,
  .ticket-prize-icon img {
    max-width: 80px;
    max-height: 80px;
  }
  .ticket-prize-name {
    font-size: 12px;
  }
  .ticket-header-code {
    font-size: 13px;
    padding: 3px 6px;
  }
  .ticket-card-footer .countdown-timer {
    font-size: 20px;
  }
}

/* Dialog de confirmation de remise */
.dialog-confirm-claim {
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  width: 90%;
  max-width: 380px;
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  margin: auto;
}

.dialog-confirm-claim::backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.confirm-claim-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Styles pour les lots bancaires */
.banking-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.banking-header {
  text-align: center;
}

.banking-prize-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 10px 0;
}

.banking-prize-icon {
  width: 96px;
  height: 96px;
  color: var(--color-ca-mint);
}

.banking-prize-icon svg,
.banking-prize-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
}

.banking-prize-name {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

.banking-prize-desc {
  font-size: 13px;
  color: var(--color-text-muted);
  max-width: 280px;
  margin: 0;
  line-height: 1.4;
}

.banking-email-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.banking-email-label {
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-muted);
  letter-spacing: 0.5px;
}

.banking-email-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
}

.banking-email-input:focus {
  outline: none;
  border-color: var(--color-ca-mint);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 10px rgba(13, 219, 157, 0.15);
}

.banking-card .banking-email-input {
  color: #0f172a !important;
  background-color: #f8fafc !important;
  border-color: #cbd5e1 !important;
}

.banking-card .banking-email-input:focus {
  border-color: var(--color-ca-green) !important;
  background-color: #ffffff !important;
  box-shadow: 0 0 10px rgba(0, 140, 100, 0.15) !important;
}

.banking-email-hint {
  font-size: 11px;
  color: var(--color-text-muted);
  line-height: 1.4;
  text-align: center;
  margin: 4px 0 0 0;
}

/* High-Contrast White Theme for Ticket Card (Readability in the Sun) */
.ticket-card {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12) !important;
}

.ticket-card .ticket-user-info .value {
  color: #0f172a !important;
}

.ticket-card .ticket-user-info .label,
.ticket-card .ticket-prizes-section .label,
.ticket-card .ticket-section-title .label,
.ticket-card .ticket-prize-sub,
.ticket-card .ticket-date-label {
  color: #64748b !important;
}

.ticket-card .ticket-divider .dashed-line {
  border-top-color: #cbd5e1 !important;
}

.ticket-card .ticket-divider .circle {
  border-color: #cbd5e1 !important;
}

.ticket-card .ticket-prize-item {
  background-color: #111827 !important; /* Dark background behind gift */
  border-top-color: #00875a !important; /* Premium CA Green */
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}

.ticket-card .ticket-prize-name {
  color: #ffffff !important; /* Light text for readability on dark background */
}

.ticket-card .ticket-prize-sub {
  color: #9ca3af !important; /* Muted gray text */
}

.ticket-card .countdown-timer {
  color: #e32021 !important; /* High contrast red */
  font-size: 26px !important;
  font-weight: 900 !important;
  text-shadow: 0 0 8px rgba(227, 32, 33, 0.1) !important;
}

.ticket-card .countdown-label {
  color: #b91c1c !important; /* Darker red for label */
  font-weight: 800 !important;
  letter-spacing: 1px !important;
}

.ticket-card .ticket-countdown-wrapper {
  border: 1.5px dashed #fca5a5 !important; /* Red dashed border */
  background-color: #fef2f2 !important; /* Soft light red tint */
  border-radius: 16px !important;
  padding: 12px 10px !important;
}

.ticket-card .ticket-card-header {
  background-color: #00875a !important; /* CA Green top band */
  margin: -24px -20px 15px -20px !important;
  padding: 16px 20px !important;
  display: flex !important;
  justify-content: center !important; /* Center the white logo */
  align-items: center !important;
  border-top-left-radius: inherit !important;
  border-top-right-radius: inherit !important;
}

.ticket-card .ticket-code-text {
  color: #1e293b !important; /* Slate color */
  background: none !important;
  border: none !important;
  padding: 0 !important;
  font-size: inherit !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px !important;
  display: inline !important;
}

/* Animated Rotating Border for Loading State Buttons */
.btn-loading {
  position: relative !important;
  overflow: hidden !important;
  z-index: 1 !important;
  background: transparent !important;
  border: none !important;
  color: #a1a1a6 !important;
}

.btn-loading::before {
  content: '' !important;
  position: absolute !important;
  top: -150% !important;
  left: -150% !important;
  width: 400% !important;
  height: 400% !important;
  background: conic-gradient(
    from 0deg,
    transparent 0%,
    var(--color-ca-mint) 50%,
    transparent 100%
  ) !important;
  animation: rotate-border-loading 2s linear infinite !important;
  z-index: -2 !important;
}

.btn-loading::after {
  content: '' !important;
  position: absolute !important;
  inset: 2px !important;
  background: #3a3a3c !important;
  border-radius: inherit !important;
  z-index: -1 !important;
}

@keyframes rotate-border-loading {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.btn-back-home-link {
  color: var(--color-text-muted) !important;
  text-decoration: none !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  transition: color 0.2s ease, transform 0.2s ease !important;
  cursor: pointer !important;
  text-transform: none !important;
}

.btn-back-home-link:hover {
  color: #ffffff !important;
  transform: translateX(-3px) !important;
}



