/* ==========================================================
   Guides (travailler en mine, CV pour la mine) :
   s'appuie sur legal.css (en-tête sombre, sommaire, corps de texte)
   et ajoute les blocs propres aux guides.
   ========================================================== */

/* ---------- En-tête ---------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .85rem; color: var(--on-dark-2); }
.crumbs a { padding-block: 11px; margin-block: -11px; transition: color .3s; }
.crumbs a:hover { color: var(--hivis); }
.crumbs [aria-current] { color: var(--on-dark); }
.guide-hero .legal-hero__title { max-width: 15ch; }

/* ---------- Intro + image ---------- */
.guide-figure { margin: 34px 0 8px; }
.guide-figure picture, .guide-figure img { display: block; width: 100%; height: auto; border-radius: var(--r-md); }
.guide-figure img { aspect-ratio: 16 / 8; object-fit: cover; background: var(--sand); }
.guide-figure figcaption { margin-top: 10px; font-size: .82rem; color: var(--ink-3); }

/* ---------- Chiffres clés ---------- */
.guide-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 30px 0 10px; }
.guide-facts > div { padding: 20px 22px; border-radius: var(--r-md); background: var(--paper); border: 1px solid var(--line); }
.guide-facts b {
  display: block; font-family: var(--f-display); font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 650;
  letter-spacing: -.03em; line-height: 1.05; color: var(--rust);
}
.guide-facts span { display: block; margin-top: 8px; font-size: .9rem; line-height: 1.45; color: var(--ink-2); }
.guide-facts + .guide-small { margin-top: 0; }
.guide-small { font-size: .8rem; color: var(--ink-3); }

/* ---------- Tableaux ---------- */
.guide-table { margin: 22px 0 10px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper); }
.guide-table table { width: 100%; border-collapse: collapse; font-size: .93rem; line-height: 1.5; }
.guide-table caption { caption-side: bottom; padding: 12px 18px; text-align: left; font-size: .8rem; color: var(--ink-3); border-top: 1px solid var(--line); }
.guide-table th, .guide-table td { padding: 14px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.guide-table thead th {
  font-family: var(--f-display); font-stretch: 112%; font-size: .7rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-3); background: var(--cream);
}
.guide-table tbody tr:last-child > * { border-bottom: 0; }
.guide-table tbody th { font-weight: 600; color: var(--ink); min-width: 150px; }
.guide-table td.num { white-space: nowrap; font-weight: 600; color: var(--ink); }
.guide-table td:not(.num) { min-width: 210px; }

/* ---------- Étapes numérotées ---------- */
.legal__body ol.guide-steps { counter-reset: step; display: grid; gap: 12px; margin: 20px 0; padding: 0; list-style: none; }
.legal__body ol.guide-steps > li {
  counter-increment: step; position: relative; padding: 18px 20px 18px 66px;
  border-radius: var(--r-md); background: var(--paper); border: 1px solid var(--line);
}
.legal__body ol.guide-steps > li::before {
  content: counter(step, decimal-leading-zero); position: absolute; left: 18px; top: 18px;
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--f-display); font-size: .78rem; font-weight: 650; color: #fff; background: var(--rust);
  transform: none;
}
.guide-steps b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }

/* ---------- Deux colonnes « à faire / à éviter » ---------- */
.guide-dodont { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 22px 0; }
.guide-dodont > div { padding: 20px 22px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--paper); }
.guide-dodont > div:last-child { background: var(--blush); border-color: transparent; }
.guide-dodont .label { display: flex; margin-bottom: 10px; color: var(--rust); }
.guide-dodont > div:last-child .label { color: var(--rust-deep); }
.legal__body .guide-dodont ul { margin: 0; gap: 8px; }
.legal__body .guide-dodont li { font-size: .94rem; }
.legal__body .guide-dodont > div:last-child li::before { background: none; border-radius: 0; width: auto; height: auto; top: 0; left: 2px; transform: none; content: "×"; color: var(--rust-deep); font-weight: 700; }

/* ---------- Mots-clés ---------- */
.legal__body ul.guide-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.legal__body ul.guide-chips li { padding: 8px 14px; border-radius: var(--r-pill); background: var(--paper); border: 1px solid var(--line); font-size: .88rem; font-weight: 500; color: var(--ink); }
.legal__body ul.guide-chips li::before { display: none; }

/* ---------- Avant / après ---------- */
.guide-ba { display: grid; gap: 10px; margin: 20px 0; }
.guide-ba p { margin: 0 !important; padding: 16px 20px; border-radius: var(--r-md); font-size: .95rem; }
.guide-ba p:first-child { background: var(--paper); border: 1px solid var(--line); color: var(--ink-3); }
.guide-ba p:last-child { background: var(--night); color: var(--on-dark); }
.guide-ba .label { display: block; margin-bottom: 6px; color: var(--rust); }
.guide-ba p:last-child .label { color: var(--hivis-soft); }

/* ---------- Exemple de CV ---------- */
.guide-cv {
  margin: 24px 0 10px; padding: clamp(22px, 4vw, 40px); border-radius: var(--r-md); background: var(--paper);
  border: 1px solid var(--line); box-shadow: 0 30px 60px -40px rgba(28, 25, 23, .35);
  font-size: .9rem; line-height: 1.55; color: var(--ink-2);
}
.guide-cv__name { font-family: var(--f-display); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 650; letter-spacing: -.02em; color: var(--ink); line-height: 1.1; }
.guide-cv__role { margin-top: 4px; font-weight: 600; color: var(--rust); }
.guide-cv__contact { margin-top: 4px; font-size: .84rem; color: var(--ink-3); }
.guide-cv h3 {
  margin: 20px 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line);
  font-family: var(--f-display); font-stretch: 112%; font-size: .7rem; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink);
}
.guide-cv p + p { margin-top: .4em !important; }
.legal__body .guide-cv ul { margin: 6px 0 0; gap: 4px; }
.legal__body .guide-cv li { padding-left: 18px; }
.legal__body .guide-cv li::before { left: 2px; width: 5px; height: 5px; }
.guide-cv__job { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; margin-top: 12px; color: var(--ink); font-weight: 600; }
.guide-cv__job span { font-weight: 400; color: var(--ink-3); }

/* ---------- Appels à l'action ---------- */
.guide-cta {
  position: relative; overflow: hidden; margin: 30px 0; padding: clamp(24px, 4vw, 36px);
  border-radius: var(--r-md); background: var(--night); color: var(--on-dark);
}
.guide-cta::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 122, 53, .35), transparent 70%); pointer-events: none;
}
.guide-cta .label { display: flex; color: var(--hivis-soft); }
.guide-cta__title { margin-top: 10px; font-family: var(--f-display); font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 650; line-height: 1.1; letter-spacing: -.02em; color: #fff; }
.legal__body .guide-cta p { margin-top: 10px; color: var(--on-dark-2); }
.guide-cta__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 20px; position: relative; z-index: 1; }
.legal__body .guide-cta a:not(.btn) { color: var(--hivis-soft); }
.legal__body .guide-cta a.btn, .legal__body .guide-offers a.btn { text-decoration: none; color: var(--btn-fg); }

/* ---------- Offres ---------- */
.guide-offers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 22px 0; }
.guide-offers > div { display: flex; flex-direction: column; gap: 8px; padding: 22px; border-radius: var(--r-md); background: var(--paper); border: 1px solid var(--line); }
.guide-offers .label { color: var(--rust); }
.guide-offers b { font-family: var(--f-display); font-size: 1.2rem; font-weight: 650; color: var(--ink); letter-spacing: -.01em; }
.guide-offers p { font-size: .92rem; line-height: 1.55; margin: 0 !important; flex: 1; }
.guide-offers .btn { align-self: flex-start; margin-top: 8px; }

/* ---------- FAQ (reprend l'accordéon de l'accueil) ---------- */
.legal__body .faq__list { margin-top: 14px; }
.legal__body .qa__a p { padding-bottom: 22px; }

/* ---------- Auteur ---------- */
.guide-author {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start;
  margin-top: 48px; padding: 24px; border-radius: var(--r-md); background: var(--cream); border: 1px solid var(--line);
}
.guide-author__mark {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--night);
}
.guide-author__mark img { width: 38px; height: auto; }
.guide-author .label { color: var(--rust); }
.guide-author b { display: block; margin-top: 4px; font-family: var(--f-display); font-size: 1.15rem; font-weight: 650; color: var(--ink); }
.legal__body .guide-author p { margin-top: 6px; font-size: .94rem; line-height: 1.6; }
.guide-author__links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: .9rem; font-weight: 500; }

/* ---------- Mobile ---------- */
/* la colonne de texte ne doit jamais s'élargir à cause d'un tableau : c'est le tableau qui défile */
.legal__body { min-width: 0; }
@media (max-width: 1000px) {
  .legal__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .guide-table td:not(.num) { min-width: 170px; }
  .guide-facts, .guide-dodont, .guide-offers { grid-template-columns: 1fr; }
  .guide-table th, .guide-table td { padding: 12px 14px; }
  .legal__body ol.guide-steps > li { padding: 16px 16px 16px 58px; }
  .legal__body ol.guide-steps > li::before { left: 14px; top: 16px; }
  .guide-author { grid-template-columns: 1fr; }
}

/* ---------- Cartes de guides (« À lire aussi » et page Guides) ---------- */
.guide-related { margin-top: 48px; }
.guide-related > .label { display: flex; margin-bottom: 14px; color: var(--rust); }
.guide-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.guide-card {
  position: relative; display: flex; flex-direction: column; gap: 8px; padding: 22px 22px 54px;
  border-radius: var(--r-md); background: var(--paper); border: 1px solid var(--line); color: var(--ink-2);
  transition: border-color .3s, transform .3s, box-shadow .3s;
}
.legal__body a.guide-card { text-decoration: none; color: var(--ink-2); }
.guide-card:hover { border-color: var(--rust); transform: translateY(-2px); box-shadow: 0 24px 48px -36px rgba(28, 25, 23, .45); }
.guide-card__cat {
  font-family: var(--f-display); font-stretch: 112%; font-size: .68rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--rust);
}
.guide-card b { font-family: var(--f-display); font-size: 1.15rem; font-weight: 650; line-height: 1.15; letter-spacing: -.01em; color: var(--ink); }
.guide-card__desc { font-size: .9rem; line-height: 1.5; }
.guide-card__meta { font-size: .8rem; color: var(--ink-3); }
.guide-card__go { position: absolute; left: 22px; bottom: 18px; font-weight: 600; color: var(--rust); transition: transform .3s; }
.guide-card:hover .guide-card__go { transform: translateX(4px); }

/* ---------- Page Guides ---------- */
.legal__body.guide-hub { max-width: none; }
.guide-hub__group + .guide-hub__group { margin-top: 8px; }
.guide-hub__group:first-child h2 { margin-top: 0; }
.legal__body .guide-hub__intro { max-width: 60ch; margin: -4px 0 20px; }
.guide-hub .guide-cta { margin-top: clamp(48px, 7vw, 80px); }
.guide-hub .guide-cta p:not(.guide-cta__title) { color: var(--on-dark-2); max-width: 60ch; }
.guide-hub .guide-cta a:not(.btn) { color: var(--hivis-soft); text-decoration: underline; text-underline-offset: 3px; }
