/* =========================================================
   Fanaka&Co — Page de maintenance
   Tokens semantiques alignes sur specs/design-system/couleurs.md
   Aucun hex en dur dans les composants : tout passe par var(--*)
   ========================================================= */

:root {
  /* Palette */
  --color-primary-500: #001A4B;
  --color-primary-600: #001640;
  --color-primary-700: #001235;
  --color-primary-900: #000A20;
  --color-accent-500: #F15B61;
  --color-accent-600: #E04449;
  --color-accent-700: #C93338;
  --color-accent-800: #A2252A;
  --color-neutral-50:  #F8F9FB;
  --color-neutral-100: #EEF1F5;
  --color-neutral-200: #D8DDE6;
  --color-neutral-300: #BCBEC0;
  --color-neutral-400: #8F90A1;
  --color-neutral-500: #6D6E71;
  --color-neutral-600: #4A5568;
  --color-neutral-700: #2D3748;
  --color-neutral-800: #1A202C;
  --color-neutral-900: #0D1117;
  --color-white: #FFFFFF;

  /* Tokens semantiques */
  --color-bg: var(--color-primary-500);
  --color-bg-deep: var(--color-primary-900);
  --color-text-inverse: var(--color-white);
  --color-text-inverse-muted: var(--color-neutral-300);
  --color-cta-bg: var(--color-accent-500);
  --color-cta-bg-hover: var(--color-accent-600);
  --color-cta-text: var(--color-white);
  --color-link: var(--color-accent-700);
  --color-link-hover: var(--color-accent-800);

  /* Typographie — Poppins seule selon specs/design-system/typographie.md */
  --font-sans: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  /* Serif maintenue temporairement pour H1 et digit "6" (en attente d'arbitrage Romaric) */
  --font-serif: Georgia, 'Times New Roman', serif;

  /* Layout */
  --container-max: 1200px;
  --header-h: 80px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
}

/* Reset minimal */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { padding: 0; margin: 0; list-style: none; }

/* =========================================================
   Scrollbar custom — couleurs du design system
   Thumb Navy au repos, Corail au survol.
   ========================================================= */

/* Firefox */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--color-accent-500) rgba(0, 26, 75, 0.45);
}

/* WebKit : Chrome, Edge, Safari, Brave, Opera */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 26, 75, 0.45);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb {
  background: var(--color-accent-500);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
  transition: background-color 200ms ease;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent-600);
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:active {
  background: var(--color-accent-700);
  background-clip: padding-box;
}
::-webkit-scrollbar-corner {
  background: transparent;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text-inverse);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Fond carte digitale Afrique + overlay Navy : image discrete derriere le contenu.
   Utilise un pseudo-element fixed pour eviter les soucis de perf sur mobile. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: url('../img/bg-map-africa.webp');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0.45;
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at top, rgba(0, 26, 75, 0.55) 0%, rgba(0, 26, 75, 0.85) 60%, rgba(0, 10, 32, 0.95) 100%);
  pointer-events: none;
}

/* Fallback si JS desactive : tout reste visible. */
.js .hero__overline,
.js .hero__title,
.js .hero__lead,
.js .hero__pillars,
.js .hero__closing,
.js .hero__panel,
.js .site-header__logo,
.js .site-header__actions .btn { will-change: transform, opacity; }

@media (prefers-reduced-motion: no-preference) {
  .js .site-header__logo,
  .js .site-header__actions .btn,
  .js .hero__overline,
  .js .hero__title,
  .js .hero__lead,
  .js .hero__pillars,
  .js .hero__closing,
  .js .hero__panel { opacity: 0; }
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  background: transparent;
  padding: var(--space-4) 0;
  position: relative;
  z-index: 10;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}
.site-header__logo img { height: 44px; width: auto; }
.site-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* === Switcher de langue === */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
}
.lang-switcher__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.6px;
  color: var(--color-white);
  opacity: 0.55;
  border-radius: var(--radius-sm);
  transition: opacity 160ms ease, background 160ms ease;
  white-space: nowrap;
}
.lang-switcher__btn:hover {
  opacity: 0.9;
  background: rgba(255, 255, 255, 0.06);
}
.lang-switcher__btn--active {
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
}
.lang-switcher__btn--active:hover { background: rgba(255, 255, 255, 0.12); }
.lang-switcher__flag {
  width: 20px;
  height: 14px;
  border-radius: 2px;
  display: block;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.lang-switcher-sep {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.18);
  margin: 0 var(--space-2);
}

/* Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
  white-space: nowrap;
}
.btn--cta {
  background: var(--color-cta-bg);
  color: var(--color-cta-text);
  border-color: var(--color-cta-bg);
}
.btn--cta:hover { background: var(--color-cta-bg-hover); border-color: var(--color-cta-bg-hover); }
.btn--ghost {
  background: transparent;
  color: var(--color-text-inverse);
  border-color: rgba(255, 255, 255, 0.4);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--color-text-inverse); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  padding: var(--space-7) 0 var(--space-5) 0;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-7);
  align-items: start;
}
.hero__content {
  max-width: 820px;
  margin: 0;
}

/* === Panneau identite a droite (3/4 - 1/4 desktop) === */
.hero__panel {
  margin: 0;
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  background: rgba(0, 26, 75, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  text-align: center;
  list-style: none;
}
.hero__panel__digit {
  font-family: var(--font-serif);
  font-size: 80px;
  font-weight: 700;
  line-height: 1;
  color: var(--color-accent-500);
  margin: 0;
}
.hero__panel__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--color-white);
  margin-top: var(--space-3);
  line-height: 1.4;
}
.hero__panel__divider {
  height: 1px;
  width: 60%;
  background: rgba(255, 255, 255, 0.14);
  margin: var(--space-5) auto;
}
.hero__panel__stats {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  text-align: left;
}
.hero__panel__stats li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--color-text-inverse-muted);
}
.hero__panel__stats li svg {
  width: 14px;
  height: 14px;
  color: var(--color-accent-500);
  flex-shrink: 0;
  margin-top: 3px;
}
.hero__panel__stats li strong {
  color: var(--color-white);
  font-weight: 600;
  display: block;
  margin-bottom: 1px;
}
.hero__panel__stats li span {
  display: block;
}

@media (min-width: 960px) {
  .hero__grid {
    grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
    gap: var(--space-7);
  }
}
.hero__overline {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: var(--color-accent-500);
  text-transform: uppercase;
  margin: 0 0 var(--space-5) 0;
}
.hero__title {
  font-family: var(--font-serif);
  font-size: 36px;
  line-height: 1.25;
  font-weight: 700;
  margin: 0 0 var(--space-5) 0;
  color: var(--color-text-inverse);
}
.hero__lead {
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text-inverse);
  opacity: 0.9;
  margin: 0 0 var(--space-5) 0;
}
.hero__pillars {
  margin: 0 0 var(--space-5) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.hero__pillars li {
  position: relative;
  padding-left: 22px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text-inverse);
  opacity: 0.95;
}
.hero__pillars li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-cta-bg);
}
.hero__pillars strong { font-weight: 700; }
.hero__closing {
  font-size: 16px;
  font-weight: 600;
  margin: var(--space-5) 0 0 0;
  color: var(--color-text-inverse);
}

/* Boutons CTA dans le hero : visibles uniquement sur tablette/mobile (< 960px) */
.hero__cta {
  display: none;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
}
/* =========================================================
   FOOTER
   ========================================================= */
/* Bordure oblique ascendante : la pente part du bas a gauche
   et monte vers le haut a droite (effet "croissance"). */
.site-footer {
  background: #FFFFFF;
  color: var(--color-neutral-700);
  padding: calc(var(--space-5) + 80px) 0 var(--space-5) 0;
  margin-top: var(--space-3);
  position: relative;
  z-index: 1;
  clip-path: polygon(0 80px, 100% 0, 100% 100%, 0 100%);
}
.site-footer__top {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--space-7);
  padding-bottom: var(--space-7);
  border-bottom: 1px solid rgba(0, 26, 75, 0.10);
}
.site-footer__logo img { height: 56px; width: auto; }
.site-footer__cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-7);
}
/* Sparateurs verticaux en degrade (effet "crete au milieu") */
.site-footer__col {
  position: relative;
}
.site-footer__col + .site-footer__col::before {
  content: "";
  position: absolute;
  left: calc(var(--space-7) * -0.5);
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 26, 75, 0.18) 50%,
    transparent 100%
  );
  pointer-events: none;
}
.site-footer__col h3 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-primary-500);
  margin: 0 0 var(--space-3) 0;
}
.site-footer__col h3.footer-h3-spaced { margin-top: var(--space-7); }
/* Texte courant (adresses, etc.) — gris fonce neutre */
.site-footer__col p,
.site-footer__col span {
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-neutral-700);
  margin: 0 0 var(--space-2) 0;
}
/* Liens cliquables (telephone, mail) — Navy + weight 500 pour distinction sans accent */
.site-footer__col a {
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-primary-500);
  font-weight: 500;
  text-decoration: none;
  transition: color 160ms ease;
}
.site-footer__col a:hover {
  color: var(--color-primary-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.site-footer__col .icon-line {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin-bottom: var(--space-1);
}
.site-footer__col .icon-line svg {
  width: 14px;
  height: 14px;
  color: var(--color-primary-500);
  flex-shrink: 0;
  margin-top: 3px;
}

.site-footer__socials {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-2);
}
.site-footer__socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-neutral-100);
  color: var(--color-primary-500);
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}
.site-footer__socials a:hover {
  background: var(--color-primary-500);
  color: #FFFFFF;
  transform: translateY(-2px);
}
.site-footer__socials svg { width: 18px; height: 18px; }

.site-footer__bottom {
  text-align: right;
  padding-top: var(--space-4);
  margin-top: var(--space-4);
  font-size: 12px;
  color: var(--color-neutral-500);
}

/* =========================================================
   ANIMATIONS : pilotees par GSAP (cf. inline script HTML)
   Aucun keyframe CSS ici pour eviter les doublons.
   ========================================================= */

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 960px) {
  .hero__panel { max-width: 480px; }

  /* Bascule des CTA : header -> hero */
  .site-header__cta-desktop { display: none; }
  .lang-switcher-sep { display: none; }
  .hero__cta { display: flex; }

  .site-footer {
    clip-path: polygon(0 50px, 100% 0, 100% 100%, 0 100%);
    padding-top: calc(var(--space-5) + 50px);
  }
  .site-footer__top { grid-template-columns: 1fr; }
  .site-footer__cols { grid-template-columns: repeat(2, 1fr); gap: var(--space-6) var(--space-7); }
  .site-footer__col + .site-footer__col::before {
    left: calc(var(--space-7) * -0.5);
  }
  /* Cacher les separateurs des cols qui passent en debut de ligne */
  .site-footer__col:nth-child(odd)::before { display: none; }
  .site-footer__bottom { text-align: left; }
}
@media (max-width: 640px) {
  /* Le header reste compact : logo + flags uniquement, pas de wrap */
  .site-header__inner { gap: var(--space-3); }
  .site-header__actions { gap: var(--space-2); }
  .lang-switcher__btn { padding: 5px 8px; font-size: 11px; }
  .btn { padding: 10px 18px; font-size: 13px; }

  /* Boutons CTA hero : empiles full-width pour faciliter le tap */
  .hero__cta {
    flex-direction: column;
    align-items: stretch;
  }
  .hero__cta .btn {
    justify-content: center;
    width: 100%;
  }

  .hero { padding: var(--space-6) 0; }
  .site-footer {
    clip-path: polygon(0 32px, 100% 0, 100% 100%, 0 100%);
    padding-top: calc(var(--space-4) + 32px);
  }
  .site-footer__cols { grid-template-columns: 1fr; }
  .site-footer__col + .site-footer__col::before { display: none; }
}
