/*
 * guide.css — pages « guides » rendues par le serveur (routes/guides.js).
 *
 * Le gabarit est celui de la page SEO donneuse (classes .hero, .section, .steps, .step,
 * .faq-item, .dks-crumb, .dks-links, .cta-section…) ; ce fichier n'ajoute que ce qui lui
 * manque. Chaque valeur trace vers DESIGN.md (tokens de public/fonts/inter.css) ou vers
 * une valeur déjà présente dans la donneuse (#fff des cartes, 1.7 d'interlignage, 15px de
 * la FAQ). Mise en page RTL-safe : propriétés logiques (inline-start/end) partout.
 */

/* Hero : H1 « pages SEO » de DESIGN.md §3, la question peut tenir sur trois lignes. */
body:has(.dks-top) .dkg-hero h1 { font-size: clamp(28px, 5vw, 48px); line-height: 1.15; max-width: 860px; }
.dkg-meta { margin: 0 auto 24px; font-size: 13px; line-height: 1.4; color: var(--text-light); }
.dkg-lead p { max-width: 560px; margin: 0 auto; font-size: clamp(15px, 2vw, 18px); line-height: 1.65; color: var(--text-muted); }

/* Encadré « réponse courte » : carte (§6), filet d'accent côté début de ligne. */
.dkg-answer { max-width: 720px; margin: 0 auto 32px; padding: 20px 24px; text-align: start; background: var(--bg); border: 1px solid var(--border); border-inline-start: 4px solid var(--primary); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.dkg-answer p { margin: 0; font-size: 16px; line-height: 1.7; color: var(--text); }
.dkg-answer .dkg-answer-label { margin: 0 0 8px; font-size: 12px; font-weight: 600; line-height: 1.2; letter-spacing: 1px; text-transform: uppercase; color: var(--primary); }
.dkg-answer a, .dkg-article a, .dkg-faq-a a, .dkg-hub-pillar a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.dkg-answer a:hover, .dkg-article a:hover, .dkg-faq-a a:hover, .dkg-hub-pillar a:hover { color: var(--primary-hover); }

/* Corps de l'article : une colonne de lecture, titres alignés au début de ligne
   (seo-shell.css centre les h2 de section : utile pour une page outil, pas pour un article). */
body:has(.dks-top) .dkg-article { max-width: 760px; margin: 0 auto; }
body:has(.dks-top) .dkg-article > h2 { margin: 48px 0 16px; text-align: start; }
body:has(.dks-top) .dkg-article > h2:first-child { margin-top: 0; }
body:has(.dks-top) .dkg-article > h2 + p,
body:has(.dks-top) .dkg-article p { max-width: none; margin: 0 0 16px; text-align: start; font-size: 16px; line-height: 1.7; color: var(--text-muted); }
.dkg-article strong { color: var(--text); font-weight: 600; }
.dkg-list { margin: 0 0 16px; padding-inline-start: 24px; font-size: 16px; line-height: 1.7; color: var(--text-muted); }
.dkg-list li { margin-bottom: 8px; }
.dkg-note { margin: 24px 0; padding: 16px 20px; background: var(--primary-50); border: 1px solid var(--border); border-inline-start: 4px solid var(--primary); border-radius: var(--radius-sm); }
body:has(.dks-top) .dkg-note p { margin: 0; color: var(--text); }
body:has(.dks-top) .dkg-article .dkg-pillar { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }

/* Étapes : la frise verticale de la donneuse (seo-shell.css, version mobile), à toutes les
   largeurs : dans une colonne de lecture, trois colonnes seraient trop étroites. */
body:has(.dks-top) .dkg-steps { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin: 24px 0 32px; }
body:has(.dks-top) .dkg-steps::before { top: 20px; bottom: 20px; left: auto; right: auto; inset-inline-start: 19px; width: 2px; height: auto; }
body:has(.dks-top) .dkg-steps .step { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 16px; text-align: start; }
body:has(.dks-top) .dkg-steps .step-num { grid-row: 1 / span 3; margin: 0; box-shadow: 0 0 0 8px var(--bg); }
body:has(.dks-top) .dkg-steps .step h3 { margin-top: 8px; }
body:has(.dks-top) .dkg-article .dkg-steps .step p { margin: 6px 0 0; max-width: none; font-size: 15px; line-height: 1.6; }

/* Tableau : défile dans son cadre, jamais la page (375 px). */
.dkg-table { margin: 24px 0 32px; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.dkg-table:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.dkg-table table { width: 100%; min-width: 480px; border-collapse: collapse; font-size: 15px; line-height: 1.6; }
.dkg-table th, .dkg-table td { padding: 12px 16px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--border); }
.dkg-table th { background: var(--surface); color: var(--text); font-weight: 600; }
.dkg-table td { color: var(--text-muted); }
.dkg-table tr:last-child td { border-bottom: 0; }

/* FAQ : <details>/<summary> natifs, habit .faq-item / .faq-btn / .faq-chevron de la
   donneuse (seo-shell.css : deux colonnes, filets, « + » qui pivote à l'ouverture). */
.dkg-faq-wrap { background: var(--surface); }
.dkg-faq summary { list-style: none; cursor: pointer; }
.dkg-faq summary::-webkit-details-marker { display: none; }
.dkg-faq summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
body:has(.dks-top) .dkg-faq details[open] .faq-chevron { transform: rotate(45deg); color: var(--primary); }
.dkg-faq-a { padding-block: 0 20px; padding-inline: 0 44px; }
body:has(.dks-top) .dkg-faq-a p { margin: 0; max-width: none; font-size: 15px; line-height: 1.7; color: var(--text-muted); }

/* Questions liées et hub : grille .dks-links de seo-shell.css, trois colonnes (titres longs). */
body:has(.dks-top) .dkg-related .dks-links,
body:has(.dks-top) .dkg-hub-topic .dks-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dkg-hub-topic.dkg-alt { background: var(--surface); }
.dkg-hub-topic h2 { margin-bottom: 8px; }
.section .dkg-hub-pillar { margin: 0; font-size: 15px; }
body:has(.dks-top) .dkg-hub-topic .dks-links { margin-top: 24px; }

/* Appel à l'action : bouton de la donneuse + lien secondaire vers les tarifs. */
.dkg-cta-alt { margin-top: 16px; }
.dkg-cta-alt a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; font-size: 15px; color: #fff; text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 1023px) {
  body:has(.dks-top) .dkg-related .dks-links,
  body:has(.dks-top) .dkg-hub-topic .dks-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .dkg-answer { padding: 16px 20px; }
  /* Tableau en fiches : une ligne = une fiche, chaque valeur précédée de son en-tête
     (data-label posé par utils/guides/render.js). Avant, la 3e colonne sortait de
     l'écran et son texte écrasé faisait des lignes de 120 px presque vides. */
  .dkg-table { overflow-x: visible; }
  .dkg-table table { min-width: 0; }
  .dkg-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .dkg-table tbody, .dkg-table tr, .dkg-table td { display: block; }
  .dkg-table tr { padding: 12px 16px; border-bottom: 1px solid var(--border); }
  .dkg-table tr:last-child { border-bottom: 0; }
  .dkg-table td { padding: 2px 0; border-bottom: 0; }
  .dkg-table td::before { content: attr(data-label); display: block; font-size: 13px; font-weight: 600; color: var(--text); }
  .dkg-table td[data-label=""]::before { content: none; }
  body:has(.dks-top) .dkg-related .dks-links,
  body:has(.dks-top) .dkg-hub-topic .dks-links { grid-template-columns: minmax(0, 1fr); }
}
