/**
 * APERMIS v3 — Accueil (transposition de la maquette validée accueil-v3.html).
 * Sections AIDA : hero → conquête → pourquoi → cartes → parcours → démarches →
 * comparatif → réassurance → FAQ → action. Chargé uniquement sur la home.
 */

/* ═════ Hero v3.1 (ATTENTION) — photo full-bleed, voile marine, texte par-dessus ═════ */
.ap-hero {
  position: relative;
  background: linear-gradient(120deg, var(--ap-marine-d), var(--ap-marine)); /* fallback avant chargement photo */
  color: #fff;
  overflow: hidden;
}
.ap-hero-media, .ap-hero-media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
/* v3.2 (§2bis) : la photo respire — sur elle, SEULS le kicker (pastille pleine) et les
   2 CTA ancrés en bas. Voile léger MESURÉ (.18/.10/.68) : CTA ghost 3,1-3,7:1 ≥3 ✅
   sur les 3 devices (blanc 19px gras = texte large). Plus aucun scrim latéral. */
.ap-hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14, 43, 67, .18) 0%, rgba(14, 43, 67, .10) 45%, rgba(14, 43, 67, .68) 100%);
  z-index: 1;
  pointer-events: none;
}
.ap-hero-inner {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; justify-content: space-between;
  align-items: flex-start;
  min-height: min(92vh, 780px);
  min-height: min(92svh, 780px);
  padding-top: clamp(20px, 3vw, 32px);
  padding-bottom: clamp(24px, 4vw, 40px);
}
/* Bordure du CTA ghost renforcée sur photo (WCAG 1.4.11 non-textuel ≥3:1) */
.ap-hero .ap-btn-ghost { border-color: rgba(255, 255, 255, .85); }
.ap-hero-ctas { width: 100%; }
@media (max-width: 640px) {
  .ap-hero-inner { min-height: 88vh; min-height: 88svh; }
}

/* ═════ v3.2 : première section SOUS la photo — H1 + réassurance sur fond clair ═════ */
.ap-hero-intro { padding: clamp(36px, 5vw, 56px) 0 clamp(28px, 4vw, 44px); }
.ap-hero-intro h1 { max-width: 840px; margin: 0 0 14px; } /* marine serif (base) — 10,3:1 sur crème */
/* Italique : corail-d MESURÉ 3,57:1 sur crème / 4,02:1 sur blanc — OK car H1 = texte large (≥3).
   (Le corail pur #F0633C mesure 2,85:1 → toujours interdit, même en large.) */
.ap-hero-intro h1 em { font-style: italic; color: var(--ap-corail-d); }
.ap-hero-intro .ap-hero-lead {
  font-size: var(--ap-fs-lead);
  color: var(--ap-ink);
  max-width: 660px;
  margin-bottom: var(--ap-s-6);
}
.ap-hero-pills { list-style: none; margin: 0 0 var(--ap-s-4); padding: 0; display: flex; gap: 10px; flex-wrap: wrap; }
.ap-hero-compare { margin: 0 0 var(--ap-s-4); }
.ap-hero-compare a { color: var(--ap-marine); font-weight: 600; font-size: 15px; text-underline-offset: 3px; }
/* Encadré accompagnateur — palette chaude claire (cohérente avec la réassurance) */
.ap-hero-accomp {
  display: inline-block;
  background: #FFF7F2;
  border: 1px solid #F6D8C9;
  color: #6E4F3D;                     /* 6,6:1 sur #FFF7F2 */
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 var(--ap-s-3);
  max-width: 660px;
}
.ap-hero-legal {
  margin: 0;
  font-size: 13px;
  color: var(--ap-muted);             /* 4,8:1 sur crème */
  max-width: 620px;
}
/* Kicker sur pastille pleine (fond garanti quelle que soit la photo) : #FFC9A6 sur marine-d ≈ 9:1 */
.ap-hero-eyebrow {
  display: inline-block;
  align-self: flex-start;
  background: rgba(11, 34, 53, .92);
  color: var(--ap-corail-tint);
  border-radius: var(--ap-r-btn);
  padding: 7px 14px;
}
/* (v3.2 : plus AUCUN texte libre sur la photo — H1/sous-titre/pills/accomp/legal
   vivent dans .ap-hero-intro ci-dessus, sur fond crème.) */

/* ═════ Conquête (INTÉRÊT) ═════ */
.ap-pains {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 18px; margin-bottom: var(--ap-s-6);
}
.ap-pain {
  background: var(--ap-cream);
  border: 1px solid var(--ap-sable);
  border-radius: var(--ap-r-card);
  padding: 22px;
}
.ap-pain h3 { font-size: 1rem; margin-bottom: 6px; }
.ap-pain p { font-size: 14.5px; color: var(--ap-muted); margin: 0; }
.ap-turn {
  background: var(--ap-marine);
  color: #fff;
  border-radius: var(--ap-r-panel);
  padding: 28px 30px;
  font-size: 1.125rem;
}
.ap-turn strong { color: var(--ap-corail-tint); }

/* ═════ Pourquoi (4 atouts) ═════ */
.ap-grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.ap-vcard {
  background: var(--ap-white);
  border: 1px solid var(--ap-sable);
  border-radius: var(--ap-r-card);
  padding: 26px;
  transition: transform .15s ease;
}
.ap-vcard:hover { transform: translateY(-3px); }
.ap-vico {
  width: 48px; height: 48px;
  border-radius: 13px;
  background: #FCEAE3;
  color: var(--ap-corail-text);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700;
  margin-bottom: 14px;
}
.ap-vcard h3 { font-size: 1.0625rem; margin-bottom: 6px; }
.ap-vcard p { font-size: 14.5px; color: var(--ap-muted); margin: 0; }

/* ═════ Galerie cartes photo ═════ */
.ap-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

/* ═════ Parcours A→Z ═════ */
.ap-steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.ap-step {
  background: var(--ap-cream);
  border: 1px solid var(--ap-sable);
  border-radius: var(--ap-r-card);
  padding: 22px;
}
.ap-step-n {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--ap-marine); color: #fff;
  font-weight: 600; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.ap-step h3 { font-size: 15.5px; margin-bottom: 5px; }
.ap-step p { font-size: 13.5px; color: var(--ap-muted); margin: 0; }

/* ═════ Démarches Somme ═════ */
.ap-demarches {
  background: var(--ap-white);
  border: 1px solid var(--ap-sable);
  border-radius: var(--ap-r-card);
  padding: 30px 32px;
}
.ap-demarches .ap-sec-intro { margin-bottom: 20px; }
.ap-demarches-next {
  margin: 18px 0 16px;
  color: var(--ap-muted);
  font-size: 15px;
  max-width: 740px;
}

/* ═════ Comparatif teaser ═════ */
.ap-compare {
  background: var(--ap-marine);
  color: #fff;
  border-radius: var(--ap-r-panel);
  padding: clamp(24px, 4vw, 40px);
}
.ap-compare h2 { color: #fff; font-size: clamp(1.5rem, 1.36rem + 0.6vw, 1.75rem); margin-bottom: 8px; }
.ap-compare-intro { color: var(--ap-on-dark); margin-bottom: 22px; max-width: 640px; }
.ap-cmpgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: var(--ap-s-6); }
.ap-cmpcard {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 14px;
  padding: 20px;
}
.ap-cmpcard h3 { font-size: 15px; color: #fff; margin-bottom: 10px; }
.ap-cmpcard ul { list-style: none; margin: 0; padding: 0; font-size: 14px; color: var(--ap-on-dark); }
.ap-cmpcard li { padding: 4px 0 4px 20px; position: relative; }
.ap-cmpcard li::before { content: "·"; position: absolute; left: 6px; color: var(--ap-corail-tint); }
.ap-cmpcard-win { border-color: var(--ap-corail); background: rgba(240, 99, 60, .12); }

/* ═════ Réassurance bénévole (éditorial photo + texte — GO Fouad 02/07) ═════ */
.ap-reassure {
  background: #FFF7F2;
  border: 1px solid #F6D8C9;
  border-radius: var(--ap-r-panel);
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(260px, 380px) 1fr;
  gap: var(--ap-s-8);
  align-items: center;
}
.ap-reassure-photo {
  display: block;
  border-radius: var(--ap-r-card);
  overflow: hidden;
  aspect-ratio: 4 / 3;              /* AUCUNE ombre (règle cartes photo) */
}
.ap-reassure-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ap-reassure h2 { font-family: var(--ap-sans); font-weight: 600; font-size: 1.25rem; line-height: var(--ap-lh-h3); margin: 0 0 6px; }
.ap-reassure p { color: #6E4F3D; font-size: 15px; max-width: 780px; margin: 0 0 8px; } /* 6,6:1 sur #FFF7F2 */
.ap-reassure-quiz { margin: 0; }
.ap-reassure-quiz a { font-weight: 600; color: var(--ap-marine); }

/* ═════ CTA final (ACTION) ═════ */
.ap-final {
  background: linear-gradient(120deg, var(--ap-corail), var(--ap-corail-d));
  color: #fff;
  border-radius: var(--ap-r-panel);
  padding: clamp(32px, 5vw, 54px);
  text-align: center;
}
.ap-final h2 { color: #fff; font-size: clamp(1.625rem, 1.45rem + 0.8vw, 2rem); margin-bottom: 10px; }
/* Sur dégradé corail : blanc 19px GRAS obligatoire (AA texte large — 3,2:1 sur corail) */
.ap-final > p { color: #fff; font-weight: 700; font-size: 1.1875rem; margin-bottom: var(--ap-s-6); }
/* Bordure du bouton ghost renforcée sur corail (WCAG 1.4.11 : ≥ 3:1) */
.ap-final .ap-btn-ghost { border-color: #fff; }
.ap-final-more { margin: 18px 0 0; }
.ap-final-more a {
  color: #fff; font-weight: 700; font-size: 1.1875rem; /* AA texte large sur corail */
  text-decoration: underline; text-underline-offset: 3px;
}

/* ═════ Responsive (breakpoints système : 640 / 960 / 1200) ═════ */
@media (max-width: 960px) {
  .ap-grid4 { grid-template-columns: repeat(2, 1fr); }
  .ap-steps { grid-template-columns: repeat(2, 1fr); }
  .ap-pains { grid-template-columns: repeat(2, 1fr); }
  .ap-gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .ap-grid4 { grid-template-columns: 1fr; }
  .ap-steps { grid-template-columns: 1fr; }
  .ap-pains { grid-template-columns: 1fr; }
  .ap-gallery { grid-template-columns: 1fr; }
  .ap-cmpgrid { grid-template-columns: 1fr; }
  .ap-reassure { grid-template-columns: 1fr; gap: var(--ap-s-4); }
  .ap-reassure p { max-width: none; }
}

/* ── Bande funnel « code » sous le hero (#33) ── */
.ap-band-code { background: var(--ap-marine); }
.ap-band-code-in {
	display: flex; flex-direction: column; gap: var(--ap-s-3);
	align-items: flex-start;
	padding-top: var(--ap-s-6); padding-bottom: var(--ap-s-6);
}
.ap-band-code-txt h2 { color: #fff; font-size: var(--ap-fs-h3); margin: 0 0 6px; }
.ap-band-code-txt p { color: var(--ap-on-dark-soft); margin: 0; font-size: var(--ap-fs-small); }
.ap-band-code-cta { flex-shrink: 0; }
@media (min-width: 780px) {
	.ap-band-code-in { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--ap-s-6); }
	.ap-band-code-txt { max-width: 62%; }
}
