/* ================================================================
   Lmed Taqbaylit — Charte graphique fidèle à l'application mobile
   Couleurs extraites de LessonScreen.js
   ================================================================ */
:root {
  /* Bleu — couleur primaire de toute l'app */
  --blue: #21a1ff;
  --blue-grad: #007fff;
  --blue-dark: #1e40af;
  --blue-pale: #eff6ff;
  --blue-light: #e0f2fe;
  --blue-border: #bfdbfe;

  /* Fond & surfaces — identiques à l'app */
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;

  /* Textes */
  --text-1: #1e293b; /* titres, texte fort */
  --text-2: #334155; /* corps */
  --text-3: #475569; /* secondaire */
  --text-4: #64748b; /* muted */
  --text-5: #94a3b8; /* très discret */

  /* Bordures */
  --border: #e2e8f0;
  --border-2: #cbd5e1;

  /* Accents */
  --green: #22c55e;
  --violet: #8b5cf6;
  --violet-d: #7c3aed;

  /* Typo */
  --font-display: "Playfair Display", Georgia, serif;
  --font-kabyle: Georgia, "Times New Roman", serif;
  --font-ui: "DM Sans", system-ui, -apple-system, sans-serif;

  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(33, 161, 255, 0.08);
  --shadow: 0 4px 24px rgba(33, 161, 255, 0.12);
  --shadow-lg: 0 12px 48px rgba(33, 161, 255, 0.22);
}

/* ===== RESET ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text-2);
  line-height: 1.7;
  overflow-x: hidden;
}
a {
  color: inherit;
  text-decoration: none;
}
ul {
  list-style: none;
}

/* ===== NAV ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2.5rem;
  background: rgba(248, 250, 252, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: var(--font-kabyle);
  font-size: 1.6rem;
  font-weight: 900;
  /* Gradient identique au header de l'app */
  background: linear-gradient(135deg, var(--blue), var(--blue-grad));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-links {
  display: flex;
  gap: 2rem;
}
.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-4);
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--blue);
  border-radius: 1px;
  transform: scaleX(0);
  transition: transform 0.2s;
}
.nav-links a:hover {
  color: var(--blue);
}
.nav-links a:hover::after {
  transform: scaleX(1);
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-1);
  border-radius: 2px;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
  padding: 6rem 2.5rem 4rem;
  overflow: hidden;
}
/* Halo bleu — comme le gradient de l'app */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.geo {
  position: absolute;
  border-radius: 50%;
}
.geo-1 {
  width: 700px;
  height: 700px;
  background: radial-gradient(
    circle,
    rgba(33, 161, 255, 0.13) 0%,
    transparent 65%
  );
  top: -250px;
  right: -150px;
}
.geo-2 {
  width: 350px;
  height: 350px;
  background: radial-gradient(
    circle,
    rgba(0, 127, 255, 0.08) 0%,
    transparent 65%
  );
  bottom: -80px;
  left: -80px;
}
.hero-content {
  position: relative;
  z-index: 1;
  animation: fadeUp 0.7s ease both;
}
.hero-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--blue);
  background: var(--blue-pale);
  border: 1px solid var(--blue-border);
  padding: 0.35rem 0.9rem;
  border-radius: 50px;
  margin-bottom: 1.5rem;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text-1);
  margin-bottom: 1.5rem;
}
/* Italique en bleu — comme lessonTitle color: #21A1FF */
.hero-title em {
  font-style: italic;
  color: var(--blue);
}
.hero-sub {
  font-size: 1rem;
  color: var(--text-4);
  max-width: 460px;
  margin-bottom: 2.5rem;
  line-height: 1.85;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}
.hero-rating {
  font-size: 0.82rem;
  color: var(--text-5);
}

/* ===== BOUTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  border: none;
}
.btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Bouton App Store — fond sombre comme completeButton de l'app */
.btn-apple {
  background: var(--text-1);
  color: white;
}

/* Bouton Google Play — bleu primaire exact de l'app */
.btn-google {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-grad) 100%);
  color: #ffffff !important;
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-grad) 100%);
  color: white;
  padding: 0.9rem 2rem;
  box-shadow: var(--shadow);
}
.btn-outline {
  background: transparent;
  color: var(--blue);
  border: 2px solid var(--blue);
  padding: 0.85rem 1.9rem;
}
.btn-outline:hover {
  background: var(--blue-pale);
}

/* ===== PHONE MOCKUP ===== */
.hero-mockup {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  animation: fadeUp 0.7s 0.15s ease both;
}
/* Bordure dégradée bleue — reprend le LinearGradient header de l'app */
.phone-frame {
  width: 255px;
  height: 510px;
  background: linear-gradient(145deg, var(--blue), var(--blue-grad));
  border-radius: 38px;
  padding: 3px;
  box-shadow: 0 32px 80px rgba(33, 161, 255, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}
.phone-inner {
  background: var(--text-1);
  border-radius: 36px;
  height: 100%;
  padding: 14px;
  position: relative;
}
.phone-inner::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}
/* Fond de l'écran — identique à phone-screen de l'app */
.phone-screen {
  background: linear-gradient(160deg, #1a2233, #0f172a);
  border-radius: 24px;
  height: 100%;
  padding: 2.5rem 1.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  overflow: hidden;
}
/* Carte mot — reproduit audioButton style de l'app */
.phone-word {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  animation: wordReveal 0.55s ease both;
  background: rgba(33, 161, 255, 0.07);
  border: 1px solid rgba(33, 161, 255, 0.2);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
}
.phone-word.delay-1 {
  animation-delay: 0.25s;
}
.phone-word.delay-2 {
  animation-delay: 0.5s;
}
/* Mot kabyle — identique à lessonTitle color: #21A1FF */
.phone-kabyle {
  font-family: var(--font-kabyle);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--blue);
}
/* Traduction — identique à lessonTranslation color: #64748B */
.phone-trans {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 300;
}

/* ===== FEATURES ===== */
.features {
  padding: 6rem 2.5rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.container {
  max-width: 1100px;
  margin: 0 auto;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-1);
  margin-bottom: 3.5rem;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.feature-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue-border);
}
.feature-icon {
  font-size: 1.8rem;
  margin-bottom: 0.9rem;
}
.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 0.4rem;
}
.feature-card p {
  font-size: 0.875rem;
  color: var(--text-4);
  line-height: 1.75;
}

/* ===== CTA — reprend le gradient header LinearGradient de l'app ===== */
.cta {
  padding: 6rem 2.5rem;
  background: linear-gradient(
    135deg,
    var(--blue) 0%,
    var(--blue-grad) 50%,
    var(--blue-dark) 100%
  );
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  top: -200px;
  right: -80px;
}
.cta h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  color: white;
  font-weight: 900;
  margin-bottom: 0.75rem;
  position: relative;
}
.cta p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 2.5rem;
  font-size: 1rem;
  position: relative;
}
.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}
.cta .btn-apple {
  background: white;
  color: var(--text-1);
}
.cta .btn-google {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
}
.cta .btn-google:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ===== FOOTER ===== */
.footer {
  padding: 3rem 2.5rem;
  background: var(--text-1);
  text-align: center;
}
.footer-logo {
  font-family: var(--font-kabyle);
  font-size: 1.15rem;
  color: var(--blue);
  font-weight: 700;
  margin-bottom: 1.5rem;
}
.footer-nav {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.footer-nav a {
  font-size: 0.83rem;
  color: rgba(255, 255, 255, 0.35);
  transition: color 0.2s;
}
.footer-nav a:hover {
  color: var(--blue);
}
.footer-contact {
  margin-bottom: 0.85rem;
}
.footer-contact a {
  font-size: 0.83rem;
  color: rgba(255, 255, 255, 0.45);
  transition: color 0.2s;
}
.footer-contact a:hover {
  color: var(--blue);
}
.footer-copy {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.2);
}

/* ===== PAGES INTERNES ===== */
/* Hero page — reprend le gradient de l'app header */
.page-hero {
  padding: 5rem 2.5rem 3.5rem;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-grad) 100%);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  background: rgba(255, 255, 255, 0.08);
  top: -200px;
  right: -80px;
  border-radius: 50%;
}
.page-hero-tag {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: white;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.3rem 0.85rem;
  border-radius: 50px;
  margin-bottom: 1.25rem;
  display: inline-block;
  position: relative;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  color: white;
  line-height: 1.08;
  letter-spacing: -0.03em;
  position: relative;
}
.page-hero h1 em {
  font-style: italic;
  color: rgba(255, 255, 255, 0.85);
}
.page-hero p {
  color: rgba(255, 255, 255, 0.75);
  margin-top: 1rem;
  font-size: 0.95rem;
  max-width: 540px;
  line-height: 1.8;
  position: relative;
}

.page-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 2.5rem;
}
.page-content h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-1);
  margin: 2.75rem 0 1rem;
  padding-left: 1rem;
  /* Barre bleue identique au paragraphBorderKabyle de l'app */
  border-left: 3px solid var(--blue);
}
.page-content h2:first-child {
  margin-top: 0;
}
.page-content p {
  color: var(--text-4);
  line-height: 1.9;
  margin-bottom: 1rem;
  font-size: 0.94rem;
}
.page-content a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.page-content a:hover {
  color: var(--blue-dark);
}
.page-content ul {
  list-style: disc;
  padding-left: 1.5rem;
  color: var(--text-4);
  margin-bottom: 1rem;
}
.page-content ul li {
  margin-bottom: 0.4rem;
  font-size: 0.94rem;
  line-height: 1.75;
}

/* Info box — reprend correctAnswerCard background: #EFF6FF, border: #BFDBFE */
.info-box {
  background: var(--blue-pale);
  border: 1px solid var(--blue-border);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  margin: 1.5rem 0;
}
.info-box p {
  color: var(--blue-dark);
  margin: 0;
  font-size: 0.9rem;
}

.store-links-inline {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}

/* Contact card — reprend le style audioButton de l'app */
.contact-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin: 2rem 0;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.contact-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow);
}
.contact-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}
.contact-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 0.35rem;
  font-size: 1.05rem;
}
.contact-card p {
  font-size: 0.9rem;
  color: var(--text-4);
  margin: 0;
}
.contact-card a {
  color: var(--blue);
  font-weight: 500;
}

/* ===== FAQ — reprend le style optionButton de l'app ===== */
.faq {
  margin: 2rem 0;
}
.faq-item {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.6rem;
  overflow: hidden;
  transition: border-color 0.2s;
}
.faq-item.open {
  border-color: var(--blue);
}
.faq-q {
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: none;
  padding: 1.1rem 1.4rem;
  font-family: var(--font-ui);
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: background 0.2s, color 0.2s;
}
/* Hover — identique à selectedOption background: #EFF6FF de l'app */
.faq-q:hover {
  background: var(--blue-pale);
  color: var(--blue-dark);
}
.faq-item.open .faq-q {
  background: var(--blue-pale);
  color: var(--blue-dark);
}
.faq-q::after {
  content: "+";
  font-size: 1.2rem;
  color: var(--blue);
  flex-shrink: 0;
  transition: transform 0.25s;
}
.faq-item.open .faq-q::after {
  transform: rotate(45deg);
}
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.25s;
  background: var(--surface);
  padding: 0 1.4rem;
  font-size: 0.9rem;
  color: var(--text-4);
  line-height: 1.85;
}
.faq-item.open .faq-a {
  max-height: 600px;
  padding: 1rem 1.4rem 1.25rem;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes wordReveal {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 4rem 1.5rem 3rem;
    text-align: center;
  }
  .hero-sub {
    margin: 0 auto 2rem;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-mockup {
    display: none;
  }
  .features-grid {
    grid-template-columns: 1fr 1fr;
  }
  .nav {
    padding: 1rem 1.5rem;
  }
}
@media (max-width: 600px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 1rem;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-toggle {
    display: flex;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .page-content {
    padding: 3rem 1.25rem;
  }
  .page-hero {
    padding: 3rem 1.25rem 2rem;
  }
  .footer-nav {
    gap: 1rem;
  }
  .store-links-inline {
    flex-direction: column;
  }
}
