/* Styles pour la Page Règles Interactives Séquencées */
@import url('https://fonts.googleapis.com/css2?family=Bangers&family=Outfit:wght@400;600;700;900&display=swap');

@font-face {
  font-family: 'Handelson Four';
  src: local('Handelson Four'), local('HandelsonFour'), local('Handelson-Four');
  font-display: swap;
}

:root {
  --bg-rules: #FAF3EC;
  --blue-dark: #005171;
  --blue-light: #AEDCEE;
  --red-dark: #C64F4F;
  --red-light: #FFD4D4;
  --text-dark: #1E2530;
  --text-muted: #5A6A80;
  
  --font-title: 'Handelson Four', 'Bangers', cursive, sans-serif;
  --font-body: 'Outfit', sans-serif;
}

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

body {
  background-color: var(--bg-rules);
  color: var(--text-dark);
  font-family: var(--font-body);
  height: 100vh;
  overflow: hidden; /* Empêche le scroll classique */
  display: flex;
  flex-direction: column;
}

/* Header Compact Rules */
.rules-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  background: #FFF;
  border-bottom: 3px solid var(--blue-dark);
  z-index: 50;
}

.back-link {
  color: var(--blue-dark);
  font-weight: 800;
  text-decoration: none;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.step-indicator {
  font-family: var(--font-title);
  font-size: 1.4rem;
  color: var(--red-dark);
}

/* Container du Séquenceur */
.step-viewport {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 5%;
  position: relative;
}

.step-card-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1050px;
  width: 100%;
  background: #FFFFFF;
  border: 3px solid var(--blue-dark);
  border-radius: 24px;
  padding: 3rem;
  box-shadow: 8px 12px 0px var(--blue-dark);
  min-height: 480px;
  position: relative;
}

/* Contenu Texte Étape */
.step-content {
  flex: 1;
  max-width: 520px;
}

.step-tag {
  display: inline-block;
  background: var(--blue-light);
  color: var(--blue-dark);
  font-weight: 800;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.9rem;
  text-transform: uppercase;
  margin-bottom: 1rem;
  border: 1px solid var(--blue-dark);
}

.step-title {
  font-family: var(--font-title);
  font-size: 2.8rem;
  color: var(--blue-dark);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.step-description {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Zone 3D Animation Carte Tournante */
.step-visual-zone {
  width: 320px;
  height: 420px;
  perspective: 1000px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-flipper {
  width: 240px;
  height: 350px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-flipper.flip-animate {
  transform: rotateY(360deg);
}

.card-face {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 12px 25px rgba(0,81,113,0.25);
  border: 2px solid var(--blue-dark);
}

/* Navigation Bas de Page */
.step-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 5%;
  background: #FFF;
  border-top: 2px solid #E2E8F0;
}

.btn-step {
  background: var(--blue-dark);
  color: #FFF;
  font-family: var(--font-title);
  font-size: 1.4rem;
  padding: 0.8rem 2rem;
  border: 2px solid var(--text-dark);
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 3px 4px 0px var(--text-dark);
  transition: all 0.2s ease;
}

.btn-step:hover:not(:disabled) {
  transform: translate(-2px, -2px);
  box-shadow: 5px 6px 0px var(--text-dark);
  background: #006891;
}

.btn-step:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-step.btn-next {
  background: var(--red-dark);
}

.btn-step.btn-next:hover:not(:disabled) {
  background: #d85757;
}

/* Media Queries Responsive Mobile */
@media (max-width: 850px) {
  body {
    height: auto;
    overflow-y: auto;
  }

  .step-viewport {
    padding: 1.5rem 4%;
  }

  .step-card-container {
    flex-direction: column;
    padding: 1.8rem;
    min-height: auto;
    gap: 2rem;
  }

  .step-content {
    max-width: 100%;
    text-align: center;
  }

  .step-title {
    font-size: 2.2rem;
  }

  .step-visual-zone {
    width: 100%;
    height: 300px;
  }

  .card-flipper {
    width: 200px;
    height: 290px;
  }

  .step-controls {
    flex-direction: column;
    gap: 1.2rem;
    padding: 1.2rem 4%;
  }

  .btn-step {
    width: 100%;
    font-size: 1.2rem;
  }
}

/* Dots de Progression */
.progress-dots {
  display: flex;
  gap: 0.8rem;
}

.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #CBD5E1;
  transition: all 0.3s ease;
  cursor: pointer;
}

.dot.active {
  background: var(--red-dark);
  transform: scale(1.3);
}
