/* =============================================================================
   CompaRide — Site public : styles
   -----------------------------------------------------------------------------
   Rôle : apparence de toutes les pages publiques (accueil, confidentialité,
   conditions). Couleurs de la marque : bleu marine + orange, effet « Liquid Glass ».

   Organisation du fichier :
     1. Variables (couleurs, rayons, largeur)   6. Sections (cartes, conducteurs, pays)
     2. Base et fond coloré                     7. FAQ, appel à l'action, pied de page
     3. Effet verre                             8. Pages légales
     4. En-tête et boutons                      9. Langue et animations
     5. Section principale (hero + téléphone)  10. Adaptation mobile
   ============================================================================= */

/* ---------- 1. Variables : change une couleur ici, tout le site suit ---------- */
:root {
  --navy: #071426;
  --navy-2: #0b1d35;
  --orange: #ff8a1c;
  --orange-2: #ffb15c;
  --sky: #d8f0ff;
  --bg: #e9f4ff;
  --text: #071426;
  --soft: #42546a;
  --green: #21c17a;
  --blue: #2f80ed;
  --glass: rgba(255, 255, 255, 0.62);
  --glass-border: rgba(255, 255, 255, 0.85);
  --shadow: 0 18px 50px rgba(7, 20, 38, 0.12);
  --radius: 28px;
  --max: 1160px;
}

/* ---------- 2. Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* Halos de couleur flous derrière le verre */
.bg-glow { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bg-glow span { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.55; }
.bg-glow .g1 { width: 520px; height: 520px; background: #78cfff; top: -160px; left: -120px; }
.bg-glow .g2 { width: 460px; height: 460px; background: #ffb05c; top: 30%; right: -160px; }
.bg-glow .g3 { width: 420px; height: 420px; background: #7fe3d4; bottom: -160px; left: 20%; }

/* Conteneur centré, largeur maximale de la page */
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- 3. Effet verre (fond translucide + flou) ---------- */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border-radius: var(--radius);
}

/* ---------- 4. En-tête (menu collant en haut) ---------- */
.header { position: sticky; top: 12px; z-index: 50; margin-top: 12px; }
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px 10px 16px; border-radius: 22px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 900; font-size: 22px; letter-spacing: -0.6px; }
.brand img { width: 38px; height: 38px; border-radius: 10px; box-shadow: 0 6px 16px rgba(255, 138, 28, 0.35); }
.brand .c1 { color: var(--navy); }
.brand .c2 { color: var(--orange); }
.nav-links { display: flex; gap: 22px; }
.nav-links a { text-decoration: none; font-weight: 700; color: var(--soft); font-size: 15px; }
.nav-links a:hover { color: var(--navy); }
.nav-actions { display: flex; align-items: center; gap: 8px; }

/* Sélecteur de langue ES / EN / FR */
.lang {
  display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(7, 20, 38, 0.06);
}
.lang button {
  border: 0; background: transparent; font: inherit; font-weight: 800; font-size: 13px; color: var(--soft);
  padding: 6px 10px; border-radius: 999px; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: #fff; color: var(--navy); box-shadow: 0 2px 8px rgba(7, 20, 38, 0.12); }

/* Boutons : principal (orange), foncé, verre, petit */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 16px; padding: 14px 22px; font: inherit; font-weight: 800; font-size: 16px;
  text-decoration: none; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--orange-2), var(--orange)); box-shadow: 0 10px 24px rgba(255, 138, 28, 0.35); }
.btn-primary:hover { box-shadow: 0 14px 30px rgba(255, 138, 28, 0.45); }
.btn-dark { color: #fff; background: var(--navy); }
.btn-glass { color: var(--navy); background: rgba(255, 255, 255, 0.7); border: 1px solid var(--glass-border); }
.btn-small { padding: 9px 14px; font-size: 14px; border-radius: 12px; }

/* ---------- 5. Section principale (« hero ») ---------- */
.hero { padding: 70px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; color: var(--navy);
  padding: 7px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.7); border: 1px solid var(--glass-border);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(33, 193, 122, 0.18); }
h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1.02; letter-spacing: -2px; margin: 18px 0 16px; font-weight: 900; }
h1 .accent { color: var(--orange); }
.lead { font-size: 19px; color: var(--soft); font-weight: 600; max-width: 560px; margin: 0 0 26px; }
.store-row { display: flex; flex-wrap: wrap; gap: 12px; }
/* Boutons App Store / Google Play */
.store {
  display: inline-flex; align-items: center; gap: 10px; padding: 11px 18px; border-radius: 16px;
  background: var(--navy); color: #fff; text-decoration: none; min-width: 180px;
}
.store svg { width: 26px; height: 26px; flex: none; }
.store small { display: block; font-size: 11px; opacity: 0.75; font-weight: 600; }
.store strong { display: block; font-size: 16px; line-height: 1.1; }
.note { margin-top: 14px; font-size: 14px; color: var(--soft); font-weight: 600; }

/* Téléphone dessiné en HTML/CSS (pas d'image) */
.phone-wrap { position: relative; display: flex; justify-content: center; }
.phone {
  width: 300px; height: 610px; border-radius: 48px; padding: 12px; background: var(--navy);
  box-shadow: 0 40px 80px rgba(7, 20, 38, 0.35), inset 0 0 0 2px #1d3352;
}
.screen {
  position: relative; width: 100%; height: 100%; border-radius: 38px; overflow: hidden;
  background: linear-gradient(180deg, #dff2ff, #eef7ff 60%, #fff4e8);
  padding: 46px 16px 16px; display: flex; flex-direction: column; gap: 12px;
}
.notch { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 96px; height: 28px; border-radius: 20px; background: var(--navy); }
.s-title { font-size: 22px; font-weight: 900; letter-spacing: -0.5px; }
.s-card { background: rgba(255, 255, 255, 0.75); border: 1px solid #fff; border-radius: 20px; padding: 12px; box-shadow: 0 8px 20px rgba(7, 20, 38, 0.08); }
.s-row { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 14px; }
.s-row + .s-row { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(7, 20, 38, 0.07); }
.s-ico { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-size: 14px; flex: none; }
.s-muted { color: var(--soft); font-weight: 700; font-size: 12px; }
.s-price { margin-left: auto; color: var(--orange); font-weight: 900; }
.s-btn { text-align: center; color: #fff; font-weight: 900; border-radius: 14px; padding: 11px; background: linear-gradient(135deg, var(--orange-2), var(--orange)); }
.s-btn.green { background: linear-gradient(135deg, #34c759, var(--green)); }
.stars { color: var(--orange); letter-spacing: 2px; }
/* Petites cartes flottantes autour du téléphone */
.float-card {
  position: absolute; padding: 12px 14px; border-radius: 18px; font-weight: 800; font-size: 14px; display: flex; gap: 10px; align-items: center;
}
.float-card.f1 { right: calc(50% + 128px); top: 120px; }
.float-card.f2 { left: calc(50% + 128px); bottom: 90px; }

/* ---------- 6. Sections ---------- */
section { padding: 70px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
h2 { font-size: clamp(30px, 4vw, 44px); letter-spacing: -1.2px; line-height: 1.08; margin: 10px 0 12px; font-weight: 900; }
.section-head p { color: var(--soft); font-size: 18px; font-weight: 600; margin: 0; }
.kicker { font-weight: 900; color: var(--orange); text-transform: uppercase; letter-spacing: 1.5px; font-size: 13px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.card { padding: 26px; }
.card h3 { margin: 14px 0 6px; font-size: 20px; letter-spacing: -0.3px; }
.card p { margin: 0; color: var(--soft); font-weight: 600; }
/* Pastilles d'icônes colorées */
.icon-badge {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #fff;
  box-shadow: 0 8px 18px rgba(7, 20, 38, 0.15);
}
.icon-badge svg { width: 26px; height: 26px; }
.ib-orange { background: linear-gradient(135deg, var(--orange-2), var(--orange)); }
.ib-blue { background: linear-gradient(135deg, #5aa9ff, var(--blue)); }
.ib-green { background: linear-gradient(135deg, #4ee09f, var(--green)); }
.ib-navy { background: linear-gradient(135deg, #1d3a63, var(--navy)); }
.step-num { font-weight: 900; color: var(--orange); font-size: 14px; letter-spacing: 1px; }

/* Section en deux colonnes pour les conducteurs */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: center; }
.split-panel { padding: 34px; }
.check-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 12px; font-weight: 700; color: var(--navy); }
.check-list li::before {
  content: "✓"; flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(33, 193, 122, 0.15); color: var(--green); font-weight: 900; font-size: 14px;
}
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 22px; }
.stat { padding: 16px; border-radius: 20px; background: rgba(255, 255, 255, 0.7); border: 1px solid #fff; text-align: center; }
.stat strong { display: block; font-size: 26px; color: var(--orange); letter-spacing: -0.5px; }
.stat span { font-size: 13px; font-weight: 700; color: var(--soft); }

/* Pays disponibles */
.countries { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; }
.country { display: flex; align-items: center; gap: 12px; padding: 16px 22px; border-radius: 22px; font-weight: 900; font-size: 18px; }
.country .flag { font-size: 30px; }
.country small { display: block; font-weight: 700; color: var(--soft); font-size: 13px; }

/* ---------- 7. Questions fréquentes (FAQ) ---------- */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { padding: 18px 22px; border-radius: 20px; }
.faq summary { cursor: pointer; font-weight: 800; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; color: var(--orange); line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 10px 0 0; color: var(--soft); font-weight: 600; }

/* Bloc final « Prêt pour ton premier trajet ? » */
.cta { padding: 44px; text-align: center; background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; border-radius: 34px; position: relative; overflow: hidden; }
.cta::after { content: ""; position: absolute; width: 360px; height: 360px; border-radius: 50%; background: var(--orange); filter: blur(90px); opacity: .35; right: -120px; top: -140px; }
.cta h2 { color: #fff; position: relative; z-index: 1; }
.cta p { color: rgba(255, 255, 255, 0.8); font-weight: 600; font-size: 18px; position: relative; z-index: 1; }
.cta .store-row { justify-content: center; position: relative; z-index: 1; }
.cta .store { background: #fff; color: var(--navy); }

/* Pied de page */
.footer { padding: 40px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; padding: 28px; }
.footer h4 { margin: 0 0 10px; font-size: 15px; }
.footer a { display: block; text-decoration: none; color: var(--soft); font-weight: 700; padding: 3px 0; }
.footer a:hover { color: var(--orange); }
.footer p { color: var(--soft); font-weight: 600; margin: 10px 0 0; }
.copyright { text-align: center; color: var(--soft); font-size: 14px; font-weight: 600; margin-top: 18px; }

/* ---------- 8. Pages légales ---------- */
.legal { max-width: 860px; margin: 40px auto 0; padding: 40px; }
.legal h1 { font-size: clamp(32px, 5vw, 48px); }
.legal h2 { font-size: 22px; letter-spacing: -0.3px; margin: 30px 0 8px; }
.legal p, .legal li { color: var(--soft); font-weight: 600; }
.legal .updated { color: var(--soft); font-weight: 700; }

/* ---------- 9. Langue : seule la langue active est visible ---------- */
html:not([lang="es"]) [lang="es"]:not(html),
html:not([lang="en"]) [lang="en"]:not(html),
html:not([lang="fr"]) [lang="fr"]:not(html) { display: none !important; }

/* Apparition douce des sections au défilement (désactivée si l'utilisateur réduit les animations) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ---------- 10. Adaptation aux écrans plus petits (tablette, téléphone) ---------- */
@media (max-width: 1200px) { .float-card { display: none; } }
@media (max-width: 960px) {
  .hero-grid, .split { grid-template-columns: 1fr; }
  .phone-wrap { margin-top: 10px; }
  .grid-3 { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .grid-2 { grid-template-columns: 1fr; }
  .hero { padding-top: 40px; }
  .lead { font-size: 17px; }
  .float-card { display: none; }
  .phone { width: 270px; height: 560px; }
  .cta, .legal, .split-panel { padding: 26px; }
  .stat-row { grid-template-columns: 1fr 1fr 1fr; }
  .stat strong { font-size: 20px; }
  .store { min-width: 0; flex: 1; }
  .nav-actions .btn { display: none; }
}
