/* =========================================================
   cartescolaire.bj — pages intérieures
   (Fonctionnalités, Comment ça marche ?, Sécurité, Aide)
   S'ajoute à styles.css : mêmes variables, boutons, étiquettes et titres.
   ========================================================= */

/* ---------- En-tête de page ---------- */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 54px 0 64px;
  background: radial-gradient(120% 140% at 25% 40%, #06402D 0%, var(--green-deep) 60%, #032C20 100%);
  color: #fff;
}
.page-hero__rings {
  position: absolute;
  right: -120px;
  top: 50%;
  width: 520px;
  transform: translateY(-50%);
  fill: none;
  stroke: rgba(244, 180, 0, .22);
  stroke-width: 1.2;
  pointer-events: none;
}
.page-hero__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 52px; align-items: center; }
.page-hero--text .page-hero__grid { grid-template-columns: minmax(0, 780px); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; font-size: 13px; color: rgba(255, 255, 255, .7); }
.breadcrumb a { color: rgba(255, 255, 255, .85); text-decoration: underline; text-underline-offset: 3px; }
.breadcrumb a:hover { color: var(--yellow-btn); }
.page-hero h1 {
  margin-bottom: 18px;
  font-family: var(--font-title);
  font-size: clamp(32px, 3.6vw, 52px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.page-hero .lead { max-width: 580px; margin-bottom: 28px; color: rgba(255, 255, 255, .9); }
.page-hero__photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 16px; box-shadow: 0 24px 60px rgba(0, 0, 0, .3); }

/* ---------- Capture réelle de l'application ---------- */
.shot { margin: 0; }
.shot__frame {
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(5, 46, 34, .08);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(5, 46, 34, .16);
}
.shot__bar { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; background: #EEF2EF; }
.shot__bar i { width: 9px; height: 9px; border-radius: 50%; background: #CBD6CF; }
.shot__bar span { margin-left: 10px; font-size: 11px; color: #7A8E85; }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12.5px; color: var(--muted-2); }
.shot figcaption::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: #1E9D5B; }
.page-hero .shot figcaption { color: rgba(255, 255, 255, .72); }
.shot--phone { max-width: 290px; }
.shot--phone .shot__frame { border: 8px solid #10241B; border-radius: 30px; }
.shot--card .shot__frame { border-radius: 10px; }
.shots-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.shots-pair--stack { grid-template-columns: minmax(0, 1fr); max-width: 640px; }

/* ---------- Navigation interne (ancres) ---------- */
.subnav { position: sticky; top: 72px; z-index: 20; background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.subnav ul { display: flex; gap: 8px; overflow-x: auto; padding-block: 12px; scrollbar-width: none; }
.subnav ul::-webkit-scrollbar { display: none; }
.subnav a {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line-green);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--green-dark);
  white-space: nowrap;
  transition: background-color .2s ease, color .2s ease;
}
.subnav a:hover, .subnav a.is-active { background: var(--green); border-color: var(--green); color: #fff; }

/* ---------- Blocs de fonctionnalités ---------- */
.feature { padding-block: 60px; scroll-margin-top: 130px; }
.feature:nth-of-type(even) { background: #fff; }
.feature__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 56px; align-items: center; }
.feature--rev .feature__text { order: 2; }
.feature .h2 { margin-bottom: 14px; }
.feature .lead { margin-bottom: 20px; color: var(--muted); }
.feature .checklist { gap: 12px; }
.feature .checklist li { color: var(--ink); line-height: 1.5; }
.feature__more { margin-top: 22px; }

/* ---------- Galerie des cartes produites ---------- */
.cards-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.cards-gallery figure { margin: 0; }
.cards-gallery img { width: 100%; border-radius: 10px; border: 1px solid #E3EBE6; background: #fff; box-shadow: var(--shadow); }
.cards-gallery figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); }
.gallery-note { margin-top: 22px; font-size: 13px; color: var(--muted-2); }

/* ---------- Étapes détaillées (Comment ça marche ?) ---------- */
.howto { padding-block: 64px; }
.howto__list { display: grid; gap: 72px; margin-top: 44px; }
.howto__item {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 32px;
  align-items: start;
  scroll-margin-top: 100px;
}
.howto__item:not(:last-child)::before {         /* trait reliant les numéros */
  content: "";
  position: absolute;
  left: 27px;
  top: 64px;
  bottom: -64px;
  width: 2px;
  background: var(--line-green);
}
.howto__num {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--green-dark);
  box-shadow: 0 0 0 8px #E3EFE8;
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}
.howto__body h3 { margin-bottom: 10px; font-family: var(--font-title); font-size: 24px; font-weight: 800; line-height: 1.2; color: var(--green-dark); }
.howto__body > p { margin-bottom: 16px; color: var(--muted); }
.howto__body .checklist { gap: 11px; }
.howto__body .checklist li { color: var(--ink); line-height: 1.5; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #EEF5F0;
  font-family: var(--font-title);
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
}
.tag--gold { background: #FFF4CF; color: #5C4300; }

/* ---------- Encadré ---------- */
.callouts { display: grid; gap: 18px; }
.callout {
  display: flex;
  gap: 18px;
  padding: 22px 24px;
  border: 1px solid #F2DA86;
  border-radius: 12px;
  background: #FFF8E1;
}
.callout__icon { display: grid; flex: none; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--yellow-btn); }
.callout__icon svg { width: 22px; height: 22px; fill: none; stroke: var(--green-dark); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.callout h3 { margin-bottom: 4px; font-family: var(--font-title); font-size: 17px; font-weight: 800; color: var(--green-dark); }
.callout p { font-size: 14.5px; color: #4A4A3A; }
.callout--green { border-color: var(--line-green); background: #EEF5F0; }
.callout--green .callout__icon { background: var(--green); }
.callout--green .callout__icon svg { stroke: #fff; }

/* ---------- Vidéo principale ---------- */
.video-main { position: relative; z-index: 2; margin-top: -36px; padding-bottom: 20px; }
.video-main .player { max-width: 1040px; margin-inline: auto; }
.video-main__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; max-width: 1040px; margin: 14px auto 0; font-size: 13px; color: var(--muted); }

/* ---------- Bandeau d'appel final ---------- */
.cta-band {
  position: relative;
  overflow: hidden;
  padding: 60px 0;
  background: radial-gradient(120% 140% at 70% 50%, #06402D 0%, var(--green-deep) 60%, #032C20 100%);
  color: #fff;
  text-align: center;
}
.cta-band .h2 { margin-bottom: 12px; color: #fff; }
.cta-band p { max-width: 620px; margin: 0 auto 28px; color: rgba(255, 255, 255, .88); }
.cta-band .actions { justify-content: center; }

/* ---------- Mise en page avec sommaire (Sécurité, Aide) ---------- */
.side-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; align-items: start; padding-block: 56px; }
.toc { position: sticky; top: 100px; }
.toc p { margin-bottom: 12px; font-family: var(--font-title); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); }
.toc ul { display: grid; gap: 2px; }
.toc a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--ink);
  transition: background-color .2s ease;
}
.toc a:hover, .toc a.is-active { background: #E6F0EA; color: var(--green-dark); }
.toc svg { width: 18px; height: 18px; fill: none; stroke: var(--green); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Page Sécurité ---------- */
.sec-block { padding-bottom: 38px; margin-bottom: 38px; border-bottom: 1px solid var(--line); scroll-margin-top: 100px; }
.sec-block:last-child { border-bottom: 0; }
.sec-block__head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.sec-block__head .sec-card__icon { margin: 0; }
.sec-block h2 { font-family: var(--font-title); font-size: 24px; font-weight: 800; color: var(--green-dark); }
.sec-block p { margin-bottom: 12px; color: var(--ink); }
.sec-block p:last-child { margin-bottom: 0; }
.sec-block ul.bullets { display: grid; gap: 8px; margin: 4px 0 12px; }
.bullets li { position: relative; padding-left: 20px; }
.bullets li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--green-600); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.fact { padding: 16px 18px; background: #fff; border: 1px solid #EAF0EC; border-radius: 10px; }
.fact b { display: block; margin-bottom: 4px; font-family: var(--font-title); font-size: 14px; color: var(--green-dark); }
.fact span { font-size: 13.5px; color: var(--muted); }
.note-box { padding: 16px 20px; border-left: 4px solid var(--yellow-btn); border-radius: 0 10px 10px 0; background: #FFF8E1; font-size: 14px; color: #4A4A3A; }

/* ---------- Page Aide ---------- */
.help-search { position: relative; max-width: 560px; }
.help-search input {
  width: 100%;
  height: 56px;
  padding: 0 20px 0 52px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
  font: 500 15.5px var(--font-text);
  color: var(--ink);
}
.help-search input:focus { outline: 3px solid rgba(249, 193, 34, .6); }
.help-search svg { position: absolute; left: 20px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); fill: none; stroke: var(--muted-2); stroke-width: 2; stroke-linecap: round; }
.help-group { margin-bottom: 44px; scroll-margin-top: 100px; }
.help-group h2 { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; font-family: var(--font-title); font-size: 22px; font-weight: 800; color: var(--green-dark); }
.help-group h2 svg { width: 26px; height: 26px; padding: 5px; border-radius: 8px; background: #EEF5F0; fill: none; stroke: var(--green); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; box-sizing: content-box; }
.help .accordion summary { min-height: 52px; font-size: 15px; font-weight: 600; }
.help .accordion details p, .help .accordion details ul { padding: 0 52px 16px 16px; font-size: 14.5px; line-height: 1.65; color: var(--muted); }
.help .accordion details ul { display: grid; gap: 6px; padding-left: 36px; list-style: disc; }
.help-empty { display: none; padding: 26px; border: 1px dashed var(--line-green); border-radius: 12px; text-align: center; color: var(--muted); }
.help-empty.is-visible { display: block; }
.is-hidden { display: none !important; }

.contact-card { display: grid; gap: 16px; padding: 30px; border-radius: 16px; background: var(--green-deep); color: #fff; }
.contact-card h2 { font-family: var(--font-title); font-size: 22px; font-weight: 800; }
.contact-card > p { color: rgba(255, 255, 255, .85); }
.contact-list { display: grid; gap: 12px; }
.contact-list a, .contact-list span { display: flex; align-items: center; gap: 12px; font-size: 15px; color: #fff; }
.contact-list a:hover { color: var(--yellow-btn); }
.contact-list svg { width: 38px; height: 38px; padding: 9px; border-radius: 10px; background: rgba(255, 255, 255, .1); fill: none; stroke: var(--yellow-btn); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; box-sizing: border-box; }
.contact-list .is-todo { color: rgba(255, 255, 255, .55); }
.contact-list small { display: block; font-size: 12px; color: rgba(255, 255, 255, .55); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1180px) {
  .subnav { top: 66px; }
}
@media (max-width: 1080px) {
  .page-hero__grid, .feature__grid { grid-template-columns: 1fr; gap: 36px; }
  .feature--rev .feature__text { order: 0; }
  .howto__item { grid-template-columns: 56px minmax(0, 1fr); gap: 20px 24px; }
  .howto__media { grid-column: 2; }
  .howto__item:not(:last-child)::before { left: 27px; }
  .side-layout { grid-template-columns: 1fr; gap: 28px; }
  .toc { position: static; }
  .toc ul { display: flex; flex-wrap: wrap; gap: 6px; }
  .toc a { border: 1px solid var(--line-green); border-radius: 999px; padding: 6px 12px; }
  .cards-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .page-hero { padding: 40px 0 52px; }
  .feature { padding-block: 44px; }
  .howto__list { gap: 52px; }
  .howto__item { grid-template-columns: 1fr; }
  .howto__media { grid-column: 1; }
  .howto__item::before { display: none; }
  .howto__num { width: 48px; height: 48px; font-size: 16px; }
  .shots-pair, .facts, .cards-gallery { grid-template-columns: 1fr; }
  .callout { flex-direction: column; }
  .help .accordion details p, .help .accordion details ul { padding-right: 16px; }
  .contact-card { padding: 24px 20px; }
}
