/* AIPDA Côte d'Ivoire — feuille de style unique
   Mobile first : les styles de base visent le téléphone,
   la version desktop s'applique à partir de 768px. */

@font-face {
  font-family: "Red Hat Display";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/RedHatDisplay-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Red Hat Display";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/RedHatDisplay-Bold.woff2") format("woff2");
}
@font-face {
  font-family: "Red Hat Display";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("../fonts/RedHatDisplay-Black.woff2") format("woff2");
}

:root {
  --ink: #0a2418;
  --text: #1e3a2b;
  --text-2: #4a6656;
  --text-3: #5f7768;
  --text-footer: #8ea396;
  --green: #1d7a46;
  --green-hover: #186a3c;
  --green-active: #135a32;
  --green-pale: #a8d5b5;
  --on-ink: #bfe0c9;
  --on-ink-2: #d4ebdb;
  --tint: #e6f3ea;
  --surface-preview: #f3f9f4;
  --bg: #f7faf7;
  --card: #ffffff;
  --border-subtle: #e2ebe4;
  --border: #c3d3c8;
  --error: #b3261e;

  --shadow-btn: 0 8px 24px rgba(29, 122, 70, .28);
  --shadow-preview: 0 18px 48px rgba(10, 36, 24, .14);
  --shadow-card: 0 12px 28px rgba(10, 36, 24, .14);
  --focus-ring: 0 0 0 4px rgba(29, 122, 70, .35);
  --ease: cubic-bezier(.22, 1, .36, 1);

  --gutter: clamp(20px, 5vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Red Hat Display", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

img, svg { display: block; }
a { color: var(--green); }
a:hover { color: var(--green-active); }
a:focus-visible, button:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.container { max-width: 1200px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

.eyebrow {
  display: block;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green);
}

.only-desktop { display: none; }

/* ---------- Logo ---------- */
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.logo__icon { width: 34px; height: 34px; color: var(--ink); flex: none; }
.logo__text { display: flex; flex-direction: column; line-height: 1; }
.logo__name { font-weight: 900; font-size: 17px; letter-spacing: -.01em; }
.logo__country { font-weight: 700; font-size: 9px; letter-spacing: .22em; margin-top: 4px; white-space: nowrap; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: 17px;
  line-height: 1.2;
  color: #fff;
  background: var(--green);
  padding: 16px 28px;
  border: none;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: background 160ms var(--ease), transform 160ms var(--ease);
}
.btn:hover { background: var(--green-hover); color: #fff; }
.btn:active { background: var(--green-active); transform: translateY(0); }
.btn:focus-visible { box-shadow: var(--focus-ring); }
@media (hover: hover) {
  .btn:hover { transform: translateY(-1px); }
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  color: var(--green);
  background: var(--tint);
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 160ms var(--ease), color 160ms var(--ease);
}
.btn-secondary:hover { background: var(--on-ink-2); color: var(--green-active); }

.btn-outline {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  margin-top: 6px;
  font-weight: 700;
  font-size: 16px;
  color: var(--green);
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  transition: background 160ms var(--ease);
}
.btn-outline:hover { background: var(--tint); }

/* ---------- Header accueil ---------- */
.hero { position: relative; overflow: hidden; background: var(--bg); }
.hero__shape { position: absolute; aspect-ratio: 1; }
.hero__shape--1 { width: 200px; right: -70px; top: -60px; background: var(--green-pale); border-radius: 30%; }
.hero__shape--2 { display: none; background: var(--ink); border-radius: 50% 50% 18% 18%; }
.hero__shape--3 { width: 44px; right: 16px; top: 96px; background: var(--green); border-radius: 30%; }

.hero__inner { position: relative; padding-top: 56px; padding-bottom: 40px; }
.hero__logo { margin-bottom: 44px; }
.hero .eyebrow { margin-bottom: 12px; }
.hero__title {
  font-weight: 900;
  font-size: 38px;
  line-height: 1.04;
  letter-spacing: -.03em;
  color: var(--ink);
  margin: 0 0 14px;
  text-wrap: balance;
}
.hero__title em { font-style: normal; color: var(--green); }
.hero__lead {
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  margin: 0 0 24px;
  text-wrap: pretty;
}
.hero__cta { display: flex; width: 100%; height: 54px; padding: 0 28px; }

/* ---------- Section document ---------- */
.download { flex: 1; background: var(--card); border-top: 1.5px solid var(--border-subtle); }
.download__inner { padding-top: 32px; padding-bottom: 40px; }
.download .eyebrow { margin-bottom: 16px; }
.doc { display: grid; gap: 0; }

/* Aperçu : carrousel à glisser */
.preview { display: flex; flex-direction: column; min-width: 0; }
.preview__track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  margin: 0 calc(-1 * var(--gutter));
  padding: 4px var(--gutter) 20px;
  scroll-padding: 0 var(--gutter);
  scrollbar-width: none;
}
.preview__track::-webkit-scrollbar { display: none; }
.preview__slide {
  flex: 0 0 86%;
  scroll-snap-align: center;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-preview);
  border: 1.5px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
}
.preview__slide img { width: 100%; height: 100%; object-fit: cover; }

.preview__nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 28px; }
.preview__caption { font-size: 14px; color: var(--text-3); }
.preview__controls { display: flex; align-items: center; gap: 12px; }
.round-btn {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--ink);
  place-items: center;
  padding: 0;
  cursor: pointer;
  transition: background 160ms var(--ease);
}
.round-btn:hover { background: var(--tint); }
.preview__dots { display: flex; gap: 6px; }
/* zone de tap élargie autour de la pastille */
.dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: none;
  padding: 0;
  background: var(--border);
  cursor: pointer;
  transition: width 200ms var(--ease), background 200ms var(--ease);
}
.dot::after { content: ""; position: absolute; inset: -12px -4px; }
.dot[aria-current="true"] { width: 22px; background: var(--green); }

/* Infos */
.info { display: flex; flex-direction: column; gap: 18px; }
.info__head { display: flex; flex-direction: column; gap: 8px; }
.info__meta { font-weight: 700; font-size: 14px; color: var(--text-2); }
.info__title {
  font-weight: 900;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
.info__summary { font-size: 16px; line-height: 1.6; color: var(--text); margin: 0; max-width: 560px; text-wrap: pretty; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chip {
  font-weight: 700;
  font-size: 13px;
  color: var(--green);
  background: var(--tint);
  padding: 6px 12px;
  border-radius: 999px;
}

/* Bloc formulaire */
.access {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 560px;
  margin: 4px -4px 0;
  padding: 20px;
  background: var(--surface-preview);
  border-radius: 20px;
  scroll-margin-top: 12px;
}
.gate { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.gate[hidden] { display: none; }
.gate__label { order: 0; font-weight: 700; font-size: 15px; color: var(--ink); }
.gate__row { display: contents; }
.gate__input {
  order: 1;
  width: 100%;
  min-width: 0;
  height: 54px;
  padding: 0 20px;
  font-family: inherit;
  font-size: 17px;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.gate__input::placeholder { color: var(--text-3); opacity: 1; }
.gate__input:focus { border: 2px solid var(--green); padding: 0 19.5px; box-shadow: 0 0 0 4px rgba(29, 122, 70, .2); }
.gate__input[aria-invalid="true"] { border: 2px solid var(--error); padding: 0 19.5px; }
.gate__error { order: 2; font-size: 14px; font-weight: 700; color: var(--error); }
.gate__error:empty { display: none; }
.gate__submit { order: 3; width: 100%; height: 56px; padding: 0 28px; }
.gate__help { order: 4; font-size: 13px; line-height: 1.5; color: var(--text-3); }

.confirm { display: flex; flex-direction: column; gap: 8px; }
.confirm[hidden] { display: none; }
.confirm__title { font-weight: 900; font-size: 20px; color: var(--ink); }
.confirm__text { font-size: 15px; line-height: 1.55; color: var(--text); }
.confirm__text a { font-weight: 700; }
.access__type { display: none; font-size: 14px; color: var(--text-2); }

.rights {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-3);
  max-width: 560px;
  margin: 0;
}

/* ---------- Barre de téléchargement fixe (mobile) ---------- */
.dlbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  background: rgba(247, 250, 247, .92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1.5px solid var(--border-subtle);
  transform: translateY(110%);
  visibility: hidden;
  transition: transform 240ms var(--ease), visibility 0s linear 240ms;
}
.dlbar.is-visible { transform: translateY(0); visibility: visible; transition: transform 240ms var(--ease), visibility 0s; }
.dlbar__text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.dlbar__title { font-weight: 700; font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dlbar__meta { font-size: 12px; color: var(--text-3); }
.dlbar__btn { flex: 0 0 auto; height: 46px; padding: 0 18px; gap: 8px; font-size: 15px; box-shadow: none; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--on-ink-2); }
.footer__inner { padding-top: 36px; padding-bottom: 36px; display: flex; flex-direction: column; gap: 28px; }
.footer--with-bar .footer__inner { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
.footer__top { display: flex; flex-direction: column; gap: 28px; }
.footer__brand { display: flex; flex-direction: column; gap: 12px; max-width: 360px; }
.footer .logo { color: #fff; }
.footer .logo__badge { width: 36px; height: 36px; border-radius: 10px; background: #fff; display: grid; place-items: center; flex: none; }
.footer .logo__icon { width: 28px; height: 28px; }
.footer .logo__name { font-size: 16px; }
.footer__about { margin: 0; font-size: 14px; line-height: 1.55; color: var(--on-ink); }
.footer__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.footer__col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.footer__heading { font-weight: 700; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--green-pale); margin: 0; }
.footer__link { color: #fff; font-size: 15px; padding: 4px 0; text-decoration: none; overflow-wrap: anywhere; transition: color 160ms var(--ease); }
.footer__link--strong { font-weight: 700; }
a.footer__link:hover { color: var(--green-pale); }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  border-top: 1.5px solid var(--text);
  padding-top: 16px;
  font-size: 13px;
  color: var(--text-footer);
}
.footer__mark { font-weight: 700; letter-spacing: .16em; color: var(--on-ink); }
.footer__legal { color: var(--text-footer); text-decoration: none; transition: color 160ms var(--ease); }
.footer__legal:hover { color: #fff; }
.footer--compact .footer__inner { padding-top: 28px; padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
.footer--compact .footer__bottom { border-top: none; padding-top: 0; }
.footer--compact .footer__legal { color: var(--on-ink); }

/* ---------- Mentions légales ---------- */
.topbar { border-bottom: 1.5px solid var(--border-subtle); background: var(--bg); }
.topbar__inner { padding-top: 20px; padding-bottom: 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar .logo { gap: 12px; }
.topbar .logo__icon { width: 36px; height: 36px; }
.topbar .logo__name { font-size: 18px; }
.topbar .logo__country { font-size: 10px; }
.topbar .logo:focus-visible { border-radius: 8px; }
@media (max-width: 420px) {
  .btn-secondary__more { display: none; }
}

.legal { flex: 1; }
.legal__inner {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(48px, 8vw, 88px) var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.legal__head { display: flex; flex-direction: column; gap: 14px; }
.legal__head .eyebrow { font-size: 13px; }
.legal__title {
  font-weight: 900;
  font-size: clamp(38px, 6vw, 56px);
  line-height: 1.04;
  letter-spacing: -.03em;
  color: var(--ink);
  margin: 0;
}
.legal__date { margin: 0; font-size: 15px; color: var(--text-3); }
.legal section { display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 24px; }
.legal h2 { font-weight: 900; font-size: 24px; letter-spacing: -.015em; color: var(--ink); margin: 0; }
.legal p { margin: 0; font-size: 17px; line-height: 1.65; }
.legal a { font-weight: 700; }
.legal a:focus-visible { border-radius: 4px; }


/* ======================================================
   Desktop (à partir de 768px)
   ====================================================== */
@media (min-width: 768px) {
  .eyebrow { font-size: 13px; }
  .only-desktop { display: initial; }
  .only-mobile { display: none !important; }

  .logo { gap: 12px; }
  .logo__icon { width: 40px; height: 40px; }
  .logo__name { font-size: 20px; }
  .logo__country { font-size: 11px; }

  /* Header */
  .hero__shape--1 { width: min(34vw, 480px); right: -10%; top: -22%; }
  .hero__shape--2 { display: block; width: min(20vw, 220px); right: 12%; bottom: -8%; }
  .hero__shape--3 { width: min(8vw, 90px); right: 2%; top: 58%; }
  .hero__inner { padding-top: 28px; padding-bottom: clamp(64px, 10vw, 120px); }
  .hero__logo { margin-bottom: clamp(56px, 9vw, 104px); }
  .hero__content { max-width: 720px; }
  .hero .eyebrow { margin-bottom: 16px; }
  .hero__title { font-size: clamp(40px, 7vw, 72px); line-height: 1.02; margin-bottom: 20px; }
  .hero__lead { font-size: clamp(17px, 2.2vw, 20px); line-height: 1.6; margin-bottom: 32px; max-width: 540px; }
  .hero__cta { display: inline-flex; width: auto; height: auto; padding: 16px 28px; }

  /* Section document */
  .download__inner { padding-top: clamp(56px, 8vw, 96px); padding-bottom: clamp(56px, 8vw, 96px); }
  .download .eyebrow { margin-bottom: 28px; }
  .doc {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: clamp(32px, 6vw, 72px);
    align-items: start;
  }

  /* Aperçu : cadre unique en fondu */
  .preview { gap: 16px; }
  .preview__track {
    position: relative;
    display: block;
    overflow: hidden;
    margin: 0;
    padding: 0;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    background: var(--surface-preview);
    border: 1.5px solid var(--border-subtle);
    box-shadow: var(--shadow-preview);
    scroll-snap-type: none;
  }
  .preview__slide {
    position: absolute;
    inset: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms var(--ease);
  }
  .preview__slide.is-active { opacity: 1; pointer-events: auto; }
  .preview__nav { flex-direction: column-reverse; gap: 16px; margin-bottom: 0; }
  .preview__caption { text-align: center; }
  .round-btn { display: grid; }
  .preview__dots { gap: 8px; }
  .dot { width: 10px; height: 10px; }
  .dot[aria-current="true"] { width: 28px; }

  /* Infos */
  .info { gap: 24px; padding-top: 8px; }
  .info__head { gap: 12px; }
  .info__meta { font-size: 15px; }
  .info__title { font-size: clamp(30px, 4vw, 44px); line-height: 1.08; letter-spacing: -.025em; }
  .info__summary { font-size: 18px; }
  .chips { gap: 8px; }
  .chip { font-size: 14px; padding: 7px 14px; }

  .access { margin: 0; padding: 0; background: none; border-radius: 0; }
  .gate__row { display: flex; flex-wrap: wrap; gap: 10px; order: 1; }
  .gate__input { flex: 1 1 240px; width: auto; height: 58px; padding: 0 22px; }
  .gate__input:focus, .gate__input[aria-invalid="true"] { padding: 0 21.5px; }
  .gate__submit { flex: 0 0 auto; width: auto; height: 58px; gap: 12px; }
  .confirm { padding: 20px 24px; background: var(--tint); border-radius: 20px; }
  .access__type { display: block; }

  .rights { border-top: 1.5px solid var(--border-subtle); padding-top: 16px; font-size: 14px; }

  .dlbar { display: none; }

  /* Footer */
  .footer__inner,
  .footer--with-bar .footer__inner { padding-top: 56px; padding-bottom: 32px; gap: 40px; }
  .footer__top { flex-direction: row; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
  .footer__brand { gap: 16px; }
  .footer .logo__badge { width: 40px; height: 40px; border-radius: 12px; }
  .footer .logo__icon { width: 32px; height: 32px; }
  .footer .logo__name { font-size: 18px; }
  .footer .logo__country { font-size: 10px; }
  .footer__about { font-size: 15px; line-height: 1.6; }
  .footer__cols { display: flex; flex-wrap: wrap; gap: 48px; }
  .footer__heading { font-size: 12px; }
  .footer__link { font-size: 16px; padding: 0; }
  .footer__bottom { gap: 16px; padding-top: 20px; font-size: 14px; }
  .footer__mark { letter-spacing: .18em; }
  .footer--compact .footer__inner { padding-top: 28px; padding-bottom: 28px; }
}
