/* ==========================================================================
   Validèl — main.css
   Variables, reset, typographie, navigation, pied de page, composants
   partagés et utilitaires. Chargé par TOUTES les pages.
   ========================================================================== */

/* ── 1. Design tokens ───────────────────────────────────────────────────── */
:root {
  --navy: #0A1628;
  --navy-mid: #152238;
  --navy-deep: #060E1A;
  --green: #1A6B3C;
  --green-light: #22A85C;
  --orange: #F97316;
  --orange-light: #FB923C;
  --red-soft: rgba(239, 68, 68, 0.12);
  --white: #FFFFFF;
  --off-white: #F8F9FB;
  --gray-100: #F1F4F8;
  --gray-200: #E2E8F0;
  --gray-400: #94A3B8;
  --gray-600: #475569;
  --text: #1E293B;

  --font-title: 'Syne', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 100px;

  --nav-h: 68px;
  --pad-x: 5%;
  --wrap: 1100px;
}

/* ── 2. Reset ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
ul, ol { list-style: none; }

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Lien d'évitement (accessibilité clavier) */
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 200;
  background: var(--orange); color: var(--white);
  padding: 0.6rem 1rem; border-radius: var(--r-sm);
  font-size: 0.85rem; font-weight: 600; text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 8px; }

/* ── 3. Mise en page ────────────────────────────────────────────────────── */
section { padding: 80px var(--pad-x); }
.wrap { max-width: var(--wrap); margin: 0 auto; }
.wrap-narrow { max-width: 760px; margin: 0 auto; }
.wrap-wide { max-width: 1200px; margin: 0 auto; }

.bg-navy { background: var(--navy); color: var(--white); }
.bg-soft { background: var(--off-white); }
.bg-gray { background: var(--gray-100); }
.text-center { text-align: center; }
.center-block { margin-left: auto; margin-right: auto; }

/* Visible des lecteurs d'écran uniquement */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

.mt-md { margin-top: 1.5rem; }
.mt-lg { margin-top: 2.5rem; }

/* Lien discret au fil du texte */
.link-inline { color: var(--green); font-weight: 600; text-decoration: none; }
.link-inline:hover { text-decoration: underline; }
.bg-navy .link-inline, .cta-band .link-inline { color: var(--green-light); }

/* ── 4. Titres de section ───────────────────────────────────────────────── */
.section-eyebrow {
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 0.75rem;
}
.section-eyebrow--accent { color: var(--orange-light); }

.section-title {
  font-family: var(--font-title);
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-sub {
  font-size: 1rem; color: var(--gray-600);
  max-width: 560px; line-height: 1.7;
  margin-bottom: 2.5rem;
}

.bg-navy .section-title,
.bg-navy .section-eyebrow + .section-title { color: var(--white); }
.bg-navy .section-sub { color: rgba(255, 255, 255, 0.55); }

/* ── 5. Boutons ─────────────────────────────────────────────────────────── */
.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: 10px;
  font-family: var(--font-body);
  font-weight: 600; font-size: 0.95rem;
  text-decoration: none;
  border: none; cursor: pointer;
  transition: background 0.2s, transform 0.2s, border-color 0.2s, color 0.2s;
}

.btn-primary {
  background: var(--green); color: var(--white);
  box-shadow: 0 4px 20px rgba(26, 107, 60, 0.4);
}
.btn-primary:hover { background: var(--green-light); transform: translateY(-1px); }

.btn-secondary {
  background: transparent; color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.07); }

.btn-ghost {
  background: var(--white); color: var(--navy);
  border: 1px solid var(--gray-200);
}
.btn-ghost:hover { border-color: var(--green); color: var(--green); }

.btn-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn-row.center { justify-content: center; }

/* ── 6. Navigation (injectée depuis partials/nav.html) ──────────────────── */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad-x);
  height: var(--nav-h);
  background: rgba(10, 22, 40, 0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.logo {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-title);
  font-weight: 800; font-size: 1.5rem;
  color: var(--white);
  letter-spacing: -0.5px;
  text-decoration: none;
}
/* Le mot-symbole est enveloppé dans un <span> pour être aligné avec la
   marque : il faut donc viser les deux niveaux séparément, sinon le
   sélecteur `.logo span` colore tout le mot au lieu du seul « è ». */
.logo > span { color: var(--white); }
.logo > span > span { color: var(--green-light); }
.logo img { width: 30px; height: 30px; }

.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a {
  display: inline-block;            /* sinon le padding vertical du CTA déborde
                                       de la barre : sur un élément en ligne il
                                       est peint sans occuper de place. */
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.875rem; font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--white); }
.nav-links a.is-active { color: var(--white); }

/* Soulignement du lien courant — jamais sur le bouton, qui signale déjà
   sa page par son fond plein. `:not()` évite une règle d'annulation qui
   perdrait la bataille de spécificité. */
.nav-links a.is-active:not(.nav-cta)::after {
  content: ''; display: block; height: 2px; margin-top: 4px;
  background: var(--green-light); border-radius: 2px;
}

.nav-cta {
  background: var(--green);
  color: var(--white) !important;
  padding: 0.5rem 1.2rem;
  border-radius: var(--r-sm);
  font-weight: 600 !important;
  line-height: 1.4;
  transition: background 0.2s !important;
}
.nav-cta:hover { background: var(--green-light) !important; }

.nav-burger {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: 0.5rem; width: 42px; height: 42px;
}
.nav-burger span {
  display: block; width: 22px; height: 2px;
  background: var(--white); border-radius: 2px;
  margin: 5px auto;
  transition: transform 0.25s, opacity 0.2s;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── 7. Pied de page (injecté depuis partials/footer.html) ──────────────── */
.site-footer {
  background: var(--navy-deep);
  padding: 2.5rem var(--pad-x);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-inner {
  max-width: var(--wrap); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1.5rem;
}

.footer-logo {
  font-family: var(--font-title);
  font-size: 1.2rem; font-weight: 800;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}
.footer-logo span { color: var(--green-light); }

.footer-legal {
  font-size: 0.72rem; color: rgba(255, 255, 255, 0.3);
  margin-top: 0.25rem; font-family: monospace;
}
.footer-legal a { color: rgba(255, 255, 255, 0.5); text-decoration: none; }
.footer-legal a:hover { color: rgba(255, 255, 255, 0.8); text-decoration: underline; }

.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.82rem; text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: rgba(255, 255, 255, 0.7); }

.footer-contact {
  display: flex; flex-direction: column; gap: 0.3rem;
  font-size: 0.78rem; color: rgba(255, 255, 255, 0.3);
}
.footer-contact a { color: rgba(255, 255, 255, 0.4); text-decoration: none; transition: color 0.2s; }
.footer-contact a:hover { color: rgba(255, 255, 255, 0.7); }

.footer-socials { display: flex; gap: 0.75rem; }
.social-btn {
  width: 34px; height: 34px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.07);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; text-decoration: none;
  color: rgba(255, 255, 255, 0.6);
  transition: background 0.2s;
}
.social-btn:hover { background: rgba(255, 255, 255, 0.14); }

.footer-copy {
  text-align: center; font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.2);
  margin-top: 1.5rem;
}

/* ── 8. Composants partagés ─────────────────────────────────────────────── */

/* Pastilles de confiance */
.trust-pills {
  display: flex; gap: 1.25rem; justify-content: center; flex-wrap: wrap;
  margin-top: 1.5rem;
}
.trust-pill {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.8rem; color: rgba(255, 255, 255, 0.4);
}

/* Pastilles plateformes */
.platform-logos {
  display: flex; align-items: center; justify-content: center;
  gap: 1.5rem; flex-wrap: wrap; margin-top: 2.5rem;
}
.platform-pill {
  display: flex; align-items: center; gap: 0.65rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-pill); padding: 0.6rem 1.25rem;
  font-size: 0.9rem; font-weight: 600;
  color: var(--navy);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.platform-pill .picon { font-size: 1.4rem; }

/* Encadré d'information */
.note-box {
  margin-top: 1.75rem;
  background: rgba(249, 115, 22, 0.07);
  border: 1px solid rgba(249, 115, 22, 0.2);
  border-radius: 12px; padding: 1rem 1.25rem;
  display: flex; align-items: flex-start; gap: 0.75rem;
}
.note-box-icon { font-size: 1rem; flex-shrink: 0; margin-top: 0.1rem; }
.note-box-text { font-size: 0.82rem; color: var(--gray-600); line-height: 1.6; }
.note-box-text strong { color: var(--navy); }

/* Cartes infrastructure / conformité — index.html et conformite.html */
.infra-card {
  background: var(--off-white);
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  padding: 1.6rem;
}

.infra-card-label {
  font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--orange); margin-bottom: 1.1rem;
}

.payment-rails { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.85rem; }

.rail-badge {
  display: flex; align-items: center; gap: 0.45rem;
  padding: 0.55rem 0.9rem;
  border-radius: var(--r-sm); font-size: 0.85rem; font-weight: 700;
  border: 2px solid;
}
.rail-badge.wave { background: #E8F2FF; color: #1256A0; border-color: #1256A0; }
.rail-badge.om { background: #FFF2E6; color: #CC4E00; border-color: #CC4E00; }

.rail-note { font-size: 0.75rem; color: var(--gray-400); line-height: 1.4; }

.bceao-box {
  display: flex; align-items: flex-start; gap: 0.85rem;
  background: var(--white); border-radius: 10px; padding: 1rem;
  border: 1px solid var(--gray-200);
}
.bceao-logo {
  background: var(--navy);
  color: var(--white); font-family: var(--font-title);
  font-weight: 800; font-size: 0.72rem;
  padding: 0.4rem 0.55rem; border-radius: 6px;
  white-space: nowrap; flex-shrink: 0; line-height: 1.2;
  text-align: center;
}
.bceao-desc { font-size: 0.78rem; color: var(--gray-600); line-height: 1.55; }
.bceao-desc strong { color: var(--navy); display: block; font-size: 0.82rem; margin-bottom: 0.2rem; }

.legal-name {
  font-family: var(--font-title); font-size: 1rem; font-weight: 800;
  color: var(--navy); margin-bottom: 0.4rem;
}
.legal-rccm {
  font-family: monospace; font-size: 0.79rem; color: var(--gray-600);
  background: var(--white); padding: 0.3rem 0.6rem;
  border-radius: 6px; display: inline-block;
  border: 1px solid var(--gray-200); margin-bottom: 0.5rem;
}
.legal-location { font-size: 0.78rem; color: var(--gray-400); display: block; margin-bottom: 0.3rem; }
.legal-product { font-size: 0.78rem; color: var(--green); font-weight: 600; }

/* Accordéon FAQ — utilisé sur index.html et faq.html */
.faq-list { display: flex; flex-direction: column; margin-top: 2rem; }

.faq-item { background: var(--white); overflow: hidden; }
.faq-item:first-child { border-radius: 12px 12px 0 0; border: 1px solid var(--gray-200); border-bottom: none; }
.faq-item:last-child { border-radius: 0 0 12px 12px; border: 1px solid var(--gray-200); }
.faq-item:not(:first-child):not(:last-child) {
  border-left: 1px solid var(--gray-200);
  border-right: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
}
.faq-item:first-child:last-child { border: 1px solid var(--gray-200); border-radius: 12px; }

.faq-q {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; text-align: left;
  padding: 1.1rem 1.25rem;
  background: none; border: none; cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600; font-size: 0.95rem;
  color: var(--navy);
  gap: 1rem;
}

.faq-chevron {
  width: 24px; height: 24px; flex-shrink: 0;
  background: var(--gray-100); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700;
  color: var(--gray-400);
  transition: transform 0.25s, background 0.2s, color 0.2s;
}
.faq-item.open .faq-chevron { transform: rotate(180deg); background: var(--green); color: var(--white); }

.faq-a {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}
.faq-a > div { overflow: hidden; }
.faq-a p {
  font-size: 0.9rem; color: var(--gray-600); line-height: 1.7;
  padding: 0 1.25rem 1.25rem;
}
.faq-item.open .faq-a { grid-template-rows: 1fr; }

/* Bandeau d'appel à l'action — repris en bas de chaque page */
.cta-band {
  background: var(--navy);
  text-align: center;
  padding: 100px var(--pad-x);
  position: relative; overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 50% 70% at 50% 100%, rgba(26, 107, 60, 0.2) 0%, transparent 70%);
}
.cta-band-inner { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; }
.cta-band .section-title { color: var(--white); margin-bottom: 0.75rem; }
.cta-band-sub {
  font-size: 1rem; color: rgba(255, 255, 255, 0.5);
  margin: 0 auto 2.25rem; max-width: 520px; line-height: 1.7;
}
.cta-band-sub strong { color: rgba(255, 255, 255, 0.75); font-weight: 700; }
.cta-band .btn-primary { font-size: 1.05rem; padding: 1rem 2.25rem; }

/* ── 9. Animation d'apparition au défilement ────────────────────────────── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ── 10. Responsive partagé ─────────────────────────────────────────────── */
@media (max-width: 860px) {
  .nav-burger { display: block; }

  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(10, 22, 40, 0.98);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    padding: 0.5rem var(--pad-x) 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateY(-120%);
    transition: transform 0.3s ease;
  }
  .nav-links.open { transform: none; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block; padding: 0.9rem 0;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  .nav-links a.is-active:not(.nav-cta)::after { display: none; }
  .nav-cta { text-align: center; margin-top: 0.75rem; border-bottom: none !important; }

  section { padding: 60px var(--pad-x); }
  .cta-band { padding: 72px var(--pad-x); }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ── 11. Mouvement réduit ───────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ── 12. Impression ─────────────────────────────────────────────────────── */
@media print {
  .site-nav, .nav-burger, .cta-band, .site-footer { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  body { color: #000; background: #fff; }
}
