/* ══════════════════════════════════════════════════════════════
   CCM.CSS — Styles propres à la section "Comment ça marche".
   Section indépendante de la FAQ, mais réutilise les mêmes
   variables de charte graphique (/assets/tokens.css).
   ══════════════════════════════════════════════════════════════ */

/* Page plus large sur toute la section, tout en restant lisible
   sur très grand écran. */
.container { max-width: 1400px; }

/* ─── EN-TÊTE DE PAGE ─── */
.ccm-hero {
  padding: 56px 0 40px; text-align: center; border-bottom: 1px solid var(--border);
}
.ccm-hero h1 {
  font-size: clamp(28px, 4vw, 40px); font-weight: 800; color: var(--navy);
  letter-spacing: -.02em; margin-bottom: 14px;
}
.ccm-hero p { font-size: 16px; color: var(--body-txt); max-width: 520px; margin: 0 auto; }

/* ─── GRILLE DES 4 CATÉGORIES ─── */
.ccm-grid {
  padding: 56px 0 88px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;
}
.ccm-card {
  display: flex; align-items: flex-start; gap: 18px; padding: 26px 28px; border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); background: var(--white);
  transition: border-color .2s, box-shadow .2s, transform .15s;
}
.ccm-card:hover {
  border-color: var(--navy); box-shadow: 0 8px 32px rgba(3,50,92,0.07); transform: translateY(-2px);
}
.ccm-card-icon {
  width: 52px; height: 52px; border-radius: 50%; background: var(--green-pale); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.ccm-card-body { flex: 1; min-width: 0; }
.ccm-card h3 { font-size: 18px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.ccm-card p { font-size: 14px; color: var(--muted); line-height: 1.6; }
.ccm-card-count { display: inline-block; margin-top: 12px; font-size: 12px; font-weight: 600; color: var(--navy); }

/* ─── FIL D'ARIANE ─── */
.ccm-breadcrumb {
  position: static;
  padding: 20px 0; font-size: 13px; color: var(--muted);
}
.ccm-breadcrumb a { color: var(--muted); }
.ccm-breadcrumb .sep { margin: 0 6px; color: var(--border); }
.ccm-breadcrumb .current { color: var(--navy); font-weight: 600; }

/* ─── EN-TÊTE D'UN GUIDE ─── */
.ccm-guide-header { padding: 24px 0 32px; text-align: center; }
.ccm-guide-header .eyebrow {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--navy); margin-bottom: 12px;
}
.ccm-guide-header h1 {
  font-size: clamp(26px, 4vw, 38px); font-weight: 800; color: var(--navy);
  letter-spacing: -.02em; margin-bottom: 12px;
}
.ccm-guide-header p { font-size: 15px; color: var(--body-txt); max-width: 520px; margin: 0 auto; }

/* ─── "DE QUOI AVEZ-VOUS BESOIN ?" ─── */
.ccm-needs-section {
  background: var(--surface); border-radius: var(--radius-xl);
  padding: 32px 24px; margin-bottom: 40px;
}
.ccm-needs-label {
  text-align: center; font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--navy); margin-bottom: 24px;
}
.ccm-needs-row {
  display: flex; justify-content: center; gap: 48px; flex-wrap: wrap;
}
.ccm-needs-item { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 140px; }
.ccm-needs-item svg { width: 36px; height: 36px; }
.ccm-needs-item span { font-size: 13px; font-weight: 600; color: var(--ink); text-align: center; line-height: 1.4; }

/* ─── ÉTAPES : CARTES RELIÉES PAR UNE FRISE (ligne toujours visible) ─── */
.ccm-steps-stack { max-width: 1140px; margin: 0 auto; position: relative; padding-left: 60px; }
.ccm-steps-stack::before {
  content: ""; position: absolute; top: 20px; bottom: 20px; left: 19px;
  width: 2px; background: var(--border); z-index: 0;
}
.ccm-step-stack {
  position: relative; background: var(--white);
  border: 1.5px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px 32px; margin-bottom: 28px;
  box-shadow: 0 4px 16px rgba(3,50,92,0.04);
}
.ccm-step-header { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.ccm-step-dot {
  position: absolute; left: -60px; top: 28px;
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px; font-weight: 800; z-index: 1;
  border: 3px solid var(--white); box-shadow: 0 2px 8px rgba(3,50,92,0.15);
}
.ccm-step-header h3 { font-size: 21px; font-weight: 800; margin: 0; }

.ccm-step-content { display: flex; align-items: center; gap: 32px; }
.ccm-step-stack:nth-child(even) .ccm-step-content { flex-direction: row-reverse; }

.ccm-step-stack-image {
  border-radius: var(--radius-md);
  flex-shrink: 0; width: 220px; padding: 16px;
}
.ccm-step-stack-image img { width: 100%; display: block; border-radius: var(--radius-sm); }

.ccm-step-copy { flex: 1; min-width: 0; }
.ccm-step-copy p { font-size: 15px; color: var(--body-txt); line-height: 1.6; margin-bottom: 14px; }
.ccm-step-copy ul { margin: -4px 0 12px 20px; list-style-type: disc; }
.ccm-step-copy li { font-size: 14.5px; color: var(--body-txt); margin-bottom: 4px; display: list-item; list-style-type: inherit; }
.ccm-step-copy .ccm-example { color: var(--muted); font-size: 13px; font-style: italic; }
.ccm-step-help {
  display: flex; align-items: center; gap: 10px;
  margin-top: 20px; padding-top: 16px; border-top: 1px dashed rgba(3,50,92,0.18);
}
.ccm-step-help svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--navy); }
.ccm-step-help-text { font-size: 13.5px; color: var(--body-txt); }
.ccm-step-help-text strong { color: var(--ink); }
.ccm-step-help a {
  color: var(--navy); font-weight: 700; text-decoration: underline;
  text-underline-offset: 2px;
}

/* ─── GALERIE D'EXEMPLES DE DOCUMENTS (ex: où trouver le code) ─── */
.ccm-doc-examples {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
  margin: 18px 0 20px;
}
.ccm-doc-example {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.ccm-doc-example:hover { border-color: var(--navy); box-shadow: 0 6px 18px rgba(3,50,92,0.08); }
.ccm-doc-example-image {
  aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface);
  display: flex; align-items: center; justify-content: center; padding: 8px;
  cursor: zoom-in; position: relative;
}
.ccm-doc-example-image img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ccm-doc-zoom-hint {
  position: absolute; bottom: 6px; right: 6px;
  background: rgba(3,50,92,0.82); color: #fff; border-radius: 100px;
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
}
.ccm-doc-zoom-hint svg { width: 14px; height: 14px; }
.ccm-doc-example-body { padding: 12px 14px; }
.ccm-doc-example-body .ccm-doc-title {
  font-size: 13.5px; font-weight: 700; color: var(--ink); margin-bottom: 3px;
}
.ccm-doc-example-body .ccm-doc-caption {
  font-size: 12px; color: var(--muted); line-height: 1.4;
}

/* ─── LIGHTBOX (zoom au clic) ─── */
.ccm-lightbox {
  display: none; position: fixed; inset: 0; background: rgba(3,10,20,0.85);
  z-index: 999; align-items: center; justify-content: center; padding: 32px;
  cursor: zoom-out;
}
.ccm-lightbox.is-open { display: flex; }
.ccm-lightbox img {
  max-width: min(900px, 92vw); max-height: 88vh; object-fit: contain;
  border-radius: var(--radius-md); box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.ccm-lightbox-close {
  position: absolute; top: 20px; right: 24px;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.12); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.ccm-lightbox-close svg { width: 18px; height: 18px; }

@media (max-width: 640px) {
  .ccm-doc-examples { grid-template-columns: 1fr; }
}


.ccm-contact-note {
  display: flex; align-items: center; gap: 10px;
  margin-top: 18px; padding: 14px 16px;
  background: rgba(255,255,255,0.6); border: 1px dashed rgba(3,50,92,0.25);
  border-radius: var(--radius-md);
}
.ccm-contact-note svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--navy); }
.ccm-contact-note p { font-size: 13.5px; color: var(--body-txt); margin: 0; }
.ccm-contact-note a { color: var(--navy); font-weight: 700; text-decoration: underline; }

/* ─── BESOIN DE PLUS D'INFORMATIONS ─── */
.ccm-more-help {
  text-align: center; max-width: 560px; margin: 64px auto 0; padding-top: 40px;
  border-top: 1px solid var(--border);
}
.ccm-more-help h2 { font-size: 20px; font-weight: 800; color: var(--navy); margin-bottom: 10px; }
.ccm-more-help p { font-size: 14.5px; color: var(--muted); }
.ccm-more-help a { color: var(--navy); font-weight: 700; }

/* ─── NAVIGATION ENTRE GUIDES ─── */
.ccm-back-link {
  display: inline-flex; align-items: center; gap: 6px; font-size: 14px;
  font-weight: 700; color: var(--navy); margin: 40px 0;
}
.ccm-back-link svg { width: 13px; height: 13px; transform: scaleX(-1); }

/* ─── RESPONSIVE ─── */
@media (max-width: 700px) {
  .ccm-steps-stack { padding-left: 44px; }
  .ccm-steps-stack::before { left: 15px; }
  .ccm-step-dot { left: -44px; width: 32px; height: 32px; font-size: 13px; top: 24px; }
  .ccm-step-content, .ccm-step-stack:nth-child(even) .ccm-step-content {
    flex-direction: column; align-items: flex-start; gap: 16px;
  }
  .ccm-step-stack-image { width: 180px; margin: 0 auto; }
}
@media (max-width: 640px) {
  .ccm-grid { grid-template-columns: 1fr; }
}
