/* ────────────────────────────────────────────────────────────
   Nivellia — Site vitrine
   Palette reprise telle quelle du design system de l'app
   (src/constants/theme.js) : corail chaleureux + sauge apaisante
   + fond crème "cocon". Typographie ronde et douce pour évoquer
   la petite enfance, sans tomber dans le "rose bébé".
   ──────────────────────────────────────────────────────────── */

:root {
  --coral: #E8836A;
  --coral-dark: #C86A52;
  --coral-light: #FBE4DD;

  --sage: #8FAE93;
  --sage-dark: #6F9375;
  --sage-light: #E7F0E8;

  --gold: #F4B860;
  --gold-light: #FDEED2;

  --bg: #FFF8F2;
  --card: #FFFFFF;
  --text: #3D3229;
  --muted: #9C8D82;
  --border: #F1E4D8;

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-round: 999px;

  --shadow-soft: 0 12px 30px -12px rgba(200, 106, 82, 0.28);
  --shadow-card: 0 8px 24px -10px rgba(61, 50, 41, 0.14);

  --font-display: "Baloo 2", "Fredoka", sans-serif;
  --font-body: "Figtree", "Segoe UI", sans-serif;
  --font-arabic: "Tajawal", "Cairo", sans-serif;

  --container: 1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
}

html[lang="ar"] body { font-family: var(--font-arabic); }
html[dir="rtl"] { text-align: right; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] h4 {
  font-family: var(--font-arabic);
  font-weight: 700;
}

p { margin: 0 0 1em; color: var(--text); }

a { color: var(--coral-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Focus visible pour l'accessibilité clavier */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 2px;
}

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 248, 242, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--coral-dark);
}
.brand img { width: 34px; height: 34px; border-radius: 10px; }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a {
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
}
.main-nav a:hover { color: var(--coral-dark); text-decoration: none; }
.main-nav a.active { color: var(--coral-dark); }

.header-right { display: flex; align-items: center; gap: 14px; }

.lang-switch { display: flex; gap: 4px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-round); padding: 3px; }
.lang-switch button {
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.02em;
  padding: 6px 10px;
  border-radius: var(--radius-round);
  cursor: pointer;
  text-transform: uppercase;
}
.lang-switch button.active { background: var(--coral); color: #fff; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-round);
  font-weight: 700;
  font-size: 15px;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
}
html[lang="ar"] .btn { font-family: var(--font-arabic); }
.btn-primary { background: var(--coral); color: #fff; box-shadow: var(--shadow-soft); }
.btn-primary:hover { background: var(--coral-dark); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--coral-dark); border: 1.5px solid var(--coral); }
.btn-ghost:hover { background: var(--coral-light); text-decoration: none; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--coral-dark);
  cursor: pointer;
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 110px;
}
.hero-blob {
  position: absolute;
  top: -180px;
  right: -160px;
  width: 620px;
  height: 620px;
  z-index: 0;
}
html[dir="rtl"] .hero-blob { right: auto; left: -160px; transform: scaleX(-1); }

.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }

.eyebrow {
  display: inline-block;
  background: var(--sage-light);
  color: var(--sage-dark);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 7px 16px;
  border-radius: var(--radius-round);
  margin-bottom: 20px;
}

.hero h1 { font-size: 46px; max-width: 560px; }
.hero .subtitle { font-size: 18px; color: var(--muted); max-width: 480px; margin-bottom: 32px; }

.store-badges { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.store-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--text);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  min-width: 168px;
}
.store-badge:hover { background: #2a221c; text-decoration: none; }
.store-badge svg { flex-shrink: 0; }
.store-badge .lines { display: flex; flex-direction: column; line-height: 1.25; }
.store-badge .lines span:first-child { font-size: 10.5px; opacity: 0.85; }
.store-badge .lines span:last-child { font-size: 16px; font-weight: 700; font-family: var(--font-display); }

.store-note { margin-top: 14px; font-size: 13px; color: var(--muted); }

/* Mockup de téléphone (aperçu abstrait, à remplacer par de vraies captures) */
.phone-mock {
  position: relative;
  margin-inline: auto;
  width: 260px;
  height: 540px;
  background: var(--card);
  border-radius: 44px;
  border: 10px solid var(--text);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.phone-mock .screen { padding: 26px 18px; height: 100%; background: linear-gradient(180deg, var(--coral-light) 0%, var(--bg) 40%); }
.phone-mock .dot { width: 60px; height: 6px; border-radius: 999px; background: var(--text); margin: 0 auto 22px; opacity: 0.85; }
.phone-mock .card {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
}
.phone-mock .card .bar { height: 10px; border-radius: 6px; background: var(--border); margin-bottom: 8px; }
.phone-mock .card .bar.short { width: 55%; }
.phone-mock .ring {
  width: 96px; height: 96px; border-radius: 50%;
  border: 10px solid var(--coral);
  border-right-color: var(--border);
  border-bottom-color: var(--border);
  margin: 6px auto 18px;
}

/* ── Features ───────────────────────────────────────────── */
.features { padding: 90px 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 56px; }
.section-head h2 { font-size: 32px; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  box-shadow: var(--shadow-card);
}
.feature-card .icon {
  width: 52px; height: 52px;
  border-radius: 16px;
  background: var(--coral-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin-bottom: 18px;
}
.feature-card:nth-child(2) .icon { background: var(--sage-light); }
.feature-card:nth-child(3) .icon { background: var(--gold-light); }
.feature-card:nth-child(4) .icon { background: var(--coral-light); }
.feature-card h3 { font-size: 18px; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: 14.5px; margin: 0; }

/* ── CTA band ───────────────────────────────────────────── */
.cta-band {
  background: var(--coral);
  border-radius: var(--radius-lg);
  padding: 56px;
  text-align: center;
  color: #fff;
  margin: 0 auto 90px;
}
.cta-band h2 { color: #fff; font-size: 28px; }
.cta-band p { color: rgba(255,255,255,0.9); margin-bottom: 28px; }
.cta-band .store-badges { justify-content: center; }
.cta-band .store-badge { background: rgba(0,0,0,0.22); }
.cta-band .store-badge:hover { background: rgba(0,0,0,0.32); }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); padding: 56px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand .brand { margin-bottom: 12px; }
.footer-brand p { color: var(--muted); font-size: 14px; max-width: 320px; }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 14px; }
.footer-col a { display: block; color: var(--text); font-size: 14.5px; margin-bottom: 10px; }
.footer-col a:hover { color: var(--coral-dark); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

/* ── Legal pages ────────────────────────────────────────── */
.legal-hero { padding: 64px 0 20px; }
.legal-hero .back-link { font-size: 14px; font-weight: 600; margin-bottom: 18px; display: inline-block; }
.legal-hero h1 { font-size: 34px; }
.legal-meta { color: var(--muted); font-size: 14px; }

.legal-disclaimer {
  background: var(--gold-light);
  border: 1px solid var(--gold);
  color: #6b5019;
  border-radius: var(--radius-md);
  padding: 18px 22px;
  font-size: 14px;
  margin: 28px 0 8px;
}

.legal-body { padding: 20px 0 90px; max-width: 780px; }
.legal-section { padding: 26px 0; border-bottom: 1px solid var(--border); }
.legal-section:last-child { border-bottom: none; }
.legal-section h2 { font-size: 19px; }
.legal-section p { color: var(--muted); line-height: 1.65; margin: 0 0 14px; }
.legal-section p:last-child { margin-bottom: 0; }
.legal-section ul { color: var(--muted); line-height: 1.65; margin: 0 0 14px; padding-inline-start: 22px; }
.legal-section ul:last-child { margin-bottom: 0; }
.legal-section li { margin-bottom: 6px; }
.legal-section strong { color: var(--text); }

/* ── Contact page ───────────────────────────────────────── */
.contact-section { padding: 64px 0 100px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: flex-start; }
.contact-form { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-card); }
.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 6px; }
.form-row input, .form-row textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
}
html[lang="ar"] .form-row input, html[lang="ar"] .form-row textarea { font-family: var(--font-arabic); }
.form-row textarea { min-height: 130px; resize: vertical; }
.form-row input:focus, .form-row textarea:focus { outline: 2px solid var(--coral); border-color: var(--coral); }

.contact-side .info-block { margin-bottom: 26px; }
.contact-side .info-block h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 6px; }
.contact-side .info-block .value { font-size: 17px; font-weight: 700; color: var(--coral-dark); }

/* ── Mobile ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero .phone-mock { display: none; }
  .hero h1 { font-size: 34px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 40px 24px; }
}

@media (max-width: 640px) {
  .main-nav { display: none; }
  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
  }
  /* Le bouton "Télécharger" du header est redondant avec le menu ☰
     et les CTA de la page — on l'enlève pour laisser respirer le header. */
  .header-right .btn-primary { display: none; }
  .header-right { gap: 8px; }
  .brand { font-size: 17px; }
  .brand img { width: 28px; height: 28px; }
  .lang-switch button { padding: 6px 8px; font-size: 11px; }
  .feature-grid { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 70px; }
  .hero-blob { width: 420px; height: 420px; top: -120px; }
  .hero h1 { font-size: 28px; }
  .cta-band h2 { font-size: 22px; }
}

@media (max-width: 380px) {
  .lang-switch button { padding: 5px 6px; font-size: 10px; }
  .brand span, .brand { font-size: 15px; }
}

/* Menu mobile déroulant */
.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 16px 24px 22px;
}
.mobile-nav.open { display: flex; }
.mobile-nav a { display: block; padding: 13px 0; font-weight: 600; color: var(--text); border-bottom: 1px solid var(--border); }
.mobile-nav a:last-child { border-bottom: none; }
