/* modules.css – pages module des Bodic Apps (pages/module-*.php et leur version servie par le
   CMS, includes/module_template.php), charte « Bodic v2 ».

   Chargée par les 15 pages module via $additional_css, après charte.css. Le <main> de ces pages
   porte « hv2 hv2-modpage » ($main_class, lu par includes/header.php) : les sections restent
   enfants directs de <main class="site-main">, ce que l'importeur du CMS
   (_lighthouse/includes/module_import.php) exige.

   On ne renomme AUCUNE classe module-* : elles sont émises par les pages PHP, par
   includes/module_render.php (CMS) et reconnues par l'importeur ; les variantes stockées en base
   (alt, dark, cols-N, with-images, faq, logos, zoom, reverse) gardent leur sens. Ce fichier ne
   fait que les réhabiller sous .hv2-modpage : rien ne change sur les autres pages qui emploient
   des classes module-* (Connect, FDSI, Partenaires…). */

/* ---------- Gabarit ---------- */

.hv2-modpage .container {
  max-width: var(--hv2-max);
  padding-left: var(--hv2-gutter);
  padding-right: var(--hv2-gutter);
}

/* Liens dans les textes : la charte retire le soulignement de tous les liens sous .hv2 ; dans un
   paragraphe, un lien sans classe doit rester repérable. */
.hv2-modpage p a:not([class]),
.hv2-modpage li a:not([class]),
.hv2-modpage .capture-callout a:not([class]) {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--hv2-yellow);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* ---------- Hero : bandeau bleu nuit, liseré jaune ---------- */

.hv2-modpage .module-hero {
  background: var(--hv2-ink);
  color: var(--hv2-white);
  border-bottom: 6px solid var(--hv2-yellow);
  box-shadow: none;
}
.hv2-modpage .module-hero::before { display: none; }
.hv2-modpage .module-hero-inner { gap: 48px; padding: 64px 0 68px; }
.hv2-modpage .module-hero-text { flex: 1 1 460px; min-width: 0; }
.hv2-modpage .module-hero-kicker {
  margin-bottom: 18px;
  font-family: var(--hv2-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--hv2-yellow);
}
.hv2-modpage .module-hero-text h1 {
  margin: 0 0 18px;
  color: var(--hv2-white);
  font-size: clamp(2rem, 1.25rem + 2.3vw, 3rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 22ch;
}
.hv2-modpage .module-hero-text p { margin: 0 0 18px; max-width: 620px; font-size: 18px; line-height: 1.6; color: var(--hv2-on-dark); }
.hv2-modpage .module-hero-meta { gap: 8px; margin-top: 6px; }
.hv2-modpage .module-meta-pill {
  padding: 6px 14px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--hv2-white);
  font-size: 14px;
}
.hv2-modpage .module-hero-visual { flex: 1 1 420px; min-width: 0; min-height: 0; }
.hv2-modpage .module-hero-visual::before { display: none; }
.hv2-modpage .module-hero-visual img { border-radius: 16px; }

/* ---------- Boutons ---------- */

.hv2-modpage .btn-primary,
.hv2-modpage .btn-secondary {
  min-height: 46px;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  box-shadow: none;
}
.hv2-modpage .btn-primary::after { display: none; }
.hv2-modpage .btn-primary { background: var(--hv2-ink); border: 1.5px solid var(--hv2-ink); color: var(--hv2-white); }
.hv2-modpage .btn-primary:hover { background: var(--hv2-ink-hover); border-color: var(--hv2-ink-hover); transform: none; box-shadow: none; }
.hv2-modpage .btn-secondary { background: var(--hv2-white); border: 1.5px solid var(--hv2-ink); color: var(--hv2-ink); }
.hv2-modpage .btn-secondary:hover { background: var(--hv2-ink); color: var(--hv2-white); transform: none; box-shadow: none; }
/* Sur fond bleu nuit (hero, bande d'appel à l'action, section sombre) : primaire jaune,
   secondaire en contour blanc. */
.hv2-modpage .module-hero .btn-primary,
.hv2-modpage .module-cta-band .btn-primary,
.hv2-modpage .module-section-dark .btn-primary { background: var(--hv2-yellow); border-color: var(--hv2-yellow); color: var(--hv2-ink); }
.hv2-modpage .module-hero .btn-primary:hover,
.hv2-modpage .module-cta-band .btn-primary:hover,
.hv2-modpage .module-section-dark .btn-primary:hover { background: #FFD45C; border-color: #FFD45C; color: var(--hv2-ink); }
.hv2-modpage .module-hero .btn-secondary,
.hv2-modpage .module-cta-band .btn-secondary,
.hv2-modpage .module-section-dark .btn-secondary { background: transparent; border-color: rgba(255, 255, 255, 0.7); color: var(--hv2-white); }
.hv2-modpage .module-hero .btn-secondary:hover,
.hv2-modpage .module-cta-band .btn-secondary:hover,
.hv2-modpage .module-section-dark .btn-secondary:hover { background: var(--hv2-white); color: var(--hv2-ink); }
.hv2-modpage .module-hero a:focus-visible,
.hv2-modpage .module-cta-band a:focus-visible,
.hv2-modpage .module-section-dark a:focus-visible { outline-color: var(--hv2-yellow); }

/* ---------- Sections ---------- */

.hv2-modpage .module-section,
.hv2-modpage .module-section-with-image { padding: 80px 0; background: var(--hv2-white); }
.hv2-modpage .module-section-alt { background: var(--hv2-sand); border-top: 0; border-bottom: 0; }
.hv2-modpage .module-section-dark { background: var(--hv2-ink); border: 0; color: var(--hv2-white); }
.hv2-modpage .module-section-header { max-width: 780px; margin-bottom: 36px; display: flex; flex-direction: column; gap: 14px; }
.hv2-modpage .module-tagline {
  margin: 0;
  font-family: var(--hv2-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--hv2-muted);
}
.hv2-modpage .module-section h2,
.hv2-modpage .module-section-with-image h2 {
  margin: 0;
  font-size: clamp(1.75rem, 1.15rem + 1.6vw, 2.5rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--hv2-ink);
}
.hv2-modpage .module-section p { max-width: 780px; font-size: 17px; line-height: 1.65; color: var(--hv2-text); }
.hv2-modpage .module-section-header p { margin: 0; font-size: 18px; }
.hv2-modpage .module-section .hero-actions { margin: 0 0 32px; }

/* Section sombre */
.hv2-modpage .module-section-dark h2,
.hv2-modpage .module-section-dark h3 { color: var(--hv2-white); }
.hv2-modpage .module-section-dark p { color: var(--hv2-on-dark); }
.hv2-modpage .module-section-dark .module-tagline { color: var(--hv2-yellow); }
.hv2-modpage .module-section-dark .module-keypoint { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.16); }
.hv2-modpage .module-section-dark .module-keypoint-icon svg { color: var(--hv2-yellow); }

/* ---------- Cartes (keypoints) ---------- */

.hv2-modpage .module-keypoints { gap: 20px; }
.hv2-modpage .module-keypoint {
  padding: 24px;
  border: 1px solid var(--hv2-line);
  border-radius: 16px;
  background: var(--hv2-white);
  box-shadow: none;
}
.hv2-modpage .module-keypoint::before { display: none; }
.hv2-modpage .module-keypoint:hover { transform: none; border-color: var(--hv2-line-2); box-shadow: 0 10px 28px rgba(14, 27, 61, 0.06); }
.hv2-modpage .module-keypoint h3 { margin: 0 0 8px; font-size: 19px; line-height: 1.3; font-weight: 700; color: var(--hv2-ink); }
.hv2-modpage .module-keypoint p { font-size: 15px; line-height: 1.6; color: var(--hv2-muted-2); }
.hv2-modpage .module-keypoint-icon { gap: 14px; margin-bottom: 12px; }
.hv2-modpage .module-keypoint-icon svg {
  width: 40px;
  height: 40px;
  padding: 9px;
  border-radius: 10px;
  background: var(--hv2-blue-soft);
  color: var(--hv2-ink);
}
.hv2-modpage .module-keypoint-icon h3 { margin: 0; }
/* Carte qui porte elle-même la classe module-keypoint-icon (écosystème et extension Chrome de
   CRM 360°) : main.css la met en ligne (inline-flex) et écrase le texte en colonne étroite. On la
   remet en colonne : icône, titre, texte. */
.hv2-modpage .module-keypoint.module-keypoint-icon { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 0; }
.hv2-modpage .module-keypoint.module-keypoint-icon > h3 { margin: 0; }
.hv2-modpage .module-keypoint-icon-wrap { display: flex; }
.hv2-modpage .module-keypoint-image { border-color: var(--hv2-line); background: var(--hv2-blue-soft); box-shadow: none; }

/* Lien « Découvrir X » en fin de carte : flèche jaune au lieu du rouge. */
.hv2-modpage .module-keypoints:not(.module-faq) .module-keypoint > p > a:last-child:not([style]) { color: var(--hv2-ink); }
.hv2-modpage .module-keypoints:not(.module-faq) .module-keypoint > p > a:last-child:not([style])::after { color: var(--hv2-ink); }
.hv2-modpage .module-keypoints:not(.module-faq) .module-keypoint > p > a:last-child:not([style]):hover { text-decoration-color: var(--hv2-yellow); text-decoration-thickness: 2px; }
.hv2-modpage .module-section-dark .module-keypoints:not(.module-faq) .module-keypoint > p > a:last-child:not([style]) { color: var(--hv2-white); }
.hv2-modpage .module-section-dark .module-keypoints:not(.module-faq) .module-keypoint > p > a:last-child:not([style])::after { color: var(--hv2-yellow); }

/* Liste à coches */
.hv2-modpage .module-checklist { margin-top: 12px; font-size: 15px; display: flex; flex-direction: column; gap: 6px; }
.hv2-modpage .module-checklist li { position: relative; padding-left: 20px; color: var(--hv2-text); }
.hv2-modpage .module-checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  margin: 0;
  border-radius: 2px;
  background: var(--hv2-yellow);
}

/* Cartes dans une section sombre (variante « dark ») : placées APRÈS les règles de cartes et plus
   spécifiques, sinon le titre et le texte restent bleu nuit sur fond bleu nuit. */
.hv2-modpage .module-section-dark .module-keypoint h3 { color: var(--hv2-white); }
.hv2-modpage .module-section-dark .module-keypoint p { color: var(--hv2-on-dark); }
.hv2-modpage .module-section-dark .module-keypoint-icon svg { background: rgba(255, 255, 255, 0.08); color: var(--hv2-yellow); }
.hv2-modpage .module-section-dark .module-checklist li,
.hv2-modpage .module-section-dark .module-image-content ul:not([class]) li,
.hv2-modpage .module-section-dark .module-section-header ul:not([class]) li { color: var(--hv2-on-dark); }

/* Le CMS rend les listes des sections image/texte en <ul> simples, sans module-checklist : mêmes
   puces jaunes, pour que la page servie depuis la base ressemble à la page PHP. */
.hv2-modpage .module-image-content ul:not([class]),
.hv2-modpage .module-section-header ul:not([class]) { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.hv2-modpage .module-image-content ul:not([class]) li,
.hv2-modpage .module-section-header ul:not([class]) li { position: relative; padding-left: 20px; color: var(--hv2-text); }
.hv2-modpage .module-image-content ul:not([class]) li::before,
.hv2-modpage .module-section-header ul:not([class]) li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 8px; height: 8px; border-radius: 2px; background: var(--hv2-yellow); }

/* FAQ */
.hv2-modpage .module-faq .module-keypoint h3::after { color: var(--hv2-ink); }
.hv2-modpage .module-faq .module-keypoint[data-ouvert="1"] { border-color: var(--hv2-ink); }

/* Bandeau de logos */
.hv2-modpage .module-logos .module-keypoint { background: transparent; border-color: transparent; }
.hv2-modpage .module-logos .module-keypoint:hover { box-shadow: none; }

/* ---------- Image et texte côte à côte ---------- */

.hv2-modpage .module-image-section { gap: 56px; }
.hv2-modpage .module-image-visual {
  border: 1px solid var(--hv2-line);
  border-radius: 20px;
  background: var(--hv2-blue-soft);
  box-shadow: none;
  min-height: 0;
}
.hv2-modpage .module-image-visual::before { display: none; }
.hv2-modpage .module-image-visual img { border-radius: 20px; }
.hv2-modpage .module-image-content { display: flex; flex-direction: column; gap: 14px; }
.hv2-modpage .module-image-content p { margin: 0; }

/* ---------- Bande d'appel à l'action : panneau bleu nuit arrondi ---------- */

.hv2-modpage .module-cta-band { background: transparent; color: var(--hv2-white); padding: 0 0 88px; margin: 0; }
.hv2-modpage .module-cta-band-inner {
  background: var(--hv2-ink);
  border-radius: 24px;
  padding: 56px 48px;
  gap: 24px 40px;
  justify-content: space-between;
}
.hv2-modpage .module-cta-band h2 { margin: 0 0 10px; color: var(--hv2-white); font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.25rem); line-height: 1.2; }
.hv2-modpage .module-cta-band p { max-width: 620px; font-size: 17px; line-height: 1.6; color: var(--hv2-on-dark); }
/* La bande suit en général une section blanche : on lui redonne de l'air au-dessus. */
.hv2-modpage .module-section + .module-cta-band,
.hv2-modpage .module-section-with-image + .module-cta-band { padding-top: 8px; }

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .hv2-modpage .module-section,
  .hv2-modpage .module-section-with-image { padding: 64px 0; }
  .hv2-modpage .module-hero-inner { padding: 48px 0 52px; gap: 36px; }
}
@media (max-width: 768px) {
  .hv2-modpage .module-section,
  .hv2-modpage .module-section-with-image { padding: 52px 0; }
  .hv2-modpage .module-hero-inner { padding: 36px 0 40px; }
  .hv2-modpage .module-hero-text p { font-size: 17px; }
  .hv2-modpage .module-cta-band { padding-bottom: 56px; }
  .hv2-modpage .module-cta-band-inner { padding: 36px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .hv2-modpage .module-keypoint { transition: none; }
}
