/* ============================
   ROOT & BASE
============================ */
:root {
  --bg-dark: #02152a;
  --bg-section: #041d3a;
  --accent: #f4b400;
  --accent-soft: #f4b40033;
  --text-light: #ffffff;
  --text-muted: #c7d2e0;
  --card-bg: #062446;
  --border-soft: #12345a;
  --danger: #ff4b4b;
  --success: #3ecf8e;
  --link: #7fb7ff;
  --shadow-soft: 0 10px 25px rgba(0, 0, 0, 0.35);
  --radius: 10px;
  --radius-pill: 999px;
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background: radial-gradient(circle at top, #06386b 0, #02152a 45%, #010813 100%);
  color: var(--text-light);
  line-height: 1.6;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 1600px;
  margin: 0 auto;
}

/* ============================
   HEADER & NAV
============================ */
header {
  border-bottom: 1px solid var(--border-soft);
  background: rgba(0, 0, 0, 0.4);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
}

.nav {
  max-width: 1600px;
  margin: 0 auto;
  padding: clamp(0.5rem, 1vw, 1rem) clamp(1rem, 3vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 20%, #f4b400, #c47f00);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.logo-wheel {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #2b1a00;
  background: radial-gradient(circle, #f7d58a, #c48a2a);
  position: relative;
}

.logo-wheel::before,
.logo-wheel::after {
  content: "";
  position: absolute;
  inset: 50%;
  width: 2px;
  height: 130%;
  background: #2b1a00;
  transform: translate(-50%, -50%);
}

.logo-wheel::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-text span:first-child {
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: clamp(0.85rem, 1.2vw, 1rem);
}

.logo-text span:last-child {
  font-size: clamp(0.65rem, 1vw, 0.8rem);
  color: var(--text-muted);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
}

.lang-toggle button {
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 0.25rem 0.7rem;
  font-size: clamp(0.7rem, 1vw, 0.85rem);
  cursor: pointer;
}

.lang-toggle button.active {
  background: var(--accent-soft);
  color: var(--text-light);
}

/* ============================
   BUTTONS
============================ */
.btn {
  border-radius: var(--radius-pill);
  border: none;
  padding: clamp(0.45rem, 1vw, 0.7rem) clamp(0.9rem, 2vw, 1.3rem);
  font-size: clamp(0.75rem, 1vw, 0.9rem);
  cursor: pointer;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #f4b400, #ffcf4b);
  color: #1b1300;
  box-shadow: var(--shadow-soft);
}

.btn-outline {
  background: transparent;
  color: var(--text-light);
  border: 1px solid var(--border-soft);
}

/* ============================
   LAYOUT & SECTIONS
============================ */
main {
  flex: 1;
  width: 100%;
}

.section {
  max-width: 1600px;
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 3rem) clamp(1rem, 4vw, 3rem);
}

.section-title {
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  color: var(--text-muted);
  max-width: 40rem;
  margin-bottom: 1.5rem;
}

/* ============================
   HERO
============================ */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding-top: clamp(2rem, 4vw, 3rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

.hero-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  font-size: clamp(0.9rem, 1.4vw, 1rem);
  color: var(--text-muted);
  max-width: 32rem;
  margin-bottom: 1.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.hero-note {
  font-size: clamp(0.75rem, 1vw, 0.85rem);
  color: var(--text-muted);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: clamp(0.7rem, 1vw, 0.85rem);
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-soft);
  margin-bottom: 0.75rem;
}

.hero-visual {
  background: radial-gradient(circle at top, #0b3b7a, #02152a);
  border-radius: 18px;
  padding: clamp(1rem, 2vw, 1.5rem);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-soft);
  position: relative;
  overflow: hidden;
}

.hero-visual-title {
  font-size: clamp(0.75rem, 1vw, 0.9rem);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.hero-visual-main {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.hero-visual-list {
  font-size: clamp(0.8rem, 1vw, 0.9rem);
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.hero-visual-list li {
  margin-left: 1.1rem;
  margin-bottom: 0.25rem;
}

.hero-visual-footer {
  font-size: clamp(0.75rem, 1vw, 0.85rem);
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.75rem;
  margin-top: 0.5rem;
}

/* ============================
   GRID & CARDS
============================ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--card-bg);
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
  padding: 1.1rem 1.2rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.card-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.card-tag {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
}

.card-body {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.card-actions {
  margin-top: 0.75rem;
}

.card-cta {
  text-align: center;
}

.card-cta-title {
  margin-bottom: 0.4rem;
}

/* ============================
   PRICING
============================ */
.pricing {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: flex-start;
}

.price-main {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0.4rem 0;
}

.price-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.price-compare {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.price-card {
  background: #041d3a;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  padding: 1rem 1.1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.price-card h4 {
  margin-bottom: 0.4rem;
}

/* ============================
   MISC
============================ */
.divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.pill {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
}

.highlight {
  color: var(--accent);
  font-weight: 600;
}

/* ============================
   FLIPCARD SYSTEM
============================ */
.flip-instruction-text {
  margin-bottom: 0.5rem;
}

#flipcard-demo-slot {
  margin-top: 0.5rem;
}

.flipcard {
  width: 100%;
  min-height: 260px;
  position: relative;
  transform-style: preserve-3d;
  transition: 0.6s;
  cursor: pointer;
}

.flipcard.flipped {
  transform: rotateY(180deg);
}

.flipcard-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 12px;
  padding: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.flipcard-back {
  transform: rotateY(180deg);
}

/* Rule (blanc, gros, gras) */
.fc-rule {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 0.3rem;
}

/* Keyword (jaune, gros, gras) */
.fc-keyword {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

/* Image optionnelle */
.fc-image {
  width: 100%;
  max-height: 160px;
  object-fit: contain;
  margin-bottom: 0.8rem;
}

.fc-image-placeholder {
  height: 0.1px;
  margin-bottom: 0.8rem;
}

/* Question (blanc) */
.fc-question {
  font-size: 1rem;
  color: var(--text-light);
  margin-top: auto;
}

/* Answer (blanc, gros, gras) */
.fc-answer {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 0.8rem;
}

/* Memo (petit, blanc/muted) */
.fc-memo {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ============================
   QCM SYSTEM
============================ */
.quiz-card {
  border-radius: 14px;
  padding: 1.2rem;
  position: relative;
  overflow: hidden;
}

.quiz-question-big {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.9rem;
}

.quiz-options {
  list-style: none;
  padding: 0;
  margin: 0;
}

.quiz-options li {
  margin-bottom: 0.5rem;
}

.quiz-options button {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-light);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: transform 0.15s ease, background 0.3s ease;
}

.quiz-options button:hover {
  transform: translateX(4px);
}

.quiz-options button.correct {
  border-color: var(--success);
  background: rgba(62, 207, 142, 0.15);
  color: var(--success);
}

.quiz-options button.wrong {
  border-color: var(--danger);
  background: rgba(255, 75, 75, 0.15);
  color: var(--danger);
}

.qc-letter {
  font-size: 1.4rem;
  font-weight: 700;
  width: 40px;
  text-align: center;
  color: var(--accent);
}

.qc-text {
  font-size: 0.9rem;
  color: var(--text-light);
}

.quiz-feedback {
  margin-top: 0.6rem;
  font-size: 0.9rem;
}

.quiz-feedback.correct {
  color: var(--success);
}

.quiz-feedback.wrong {
  color: var(--danger);
}

.quiz-explanation {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.quiz-animation {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.quiz-animation.success {
  background: radial-gradient(circle at center, rgba(0, 255, 150, 0.25), transparent 70%);
  opacity: 1;
  animation: waveSuccess 0.8s ease;
}

.quiz-animation.fail {
  background: radial-gradient(circle at center, rgba(255, 0, 0, 0.25), transparent 70%);
  opacity: 1;
  animation: waveFail 0.8s ease;
}

@keyframes waveSuccess {
  0% { transform: scale(0.6); opacity: 0; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 0; }
}

@keyframes waveFail {
  0% { transform: scale(0.6); opacity: 0; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 0; }
}

/* ============================
   SUPPORT & FOOTER
============================ */
.support-paragraph {
  margin-bottom: 1rem;
}

footer {
  border-top: 1px solid var(--border-soft);
  padding: 1rem clamp(1rem, 4vw, 3rem);
  background: rgba(0, 0, 0, 0.4);
}

.footer-inner {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

/* ============================
   RESPONSIVE
============================ */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .pricing {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}