/* ===================== css/guides.css ===================== */
:root {
  --ink: #14322A; --ink-2: #44574E; --muted: #6B7E74;
  --green: #1E6B50; --green-2: #2E8B6B; --green-3: #3DA877;
  --mint: #EAF6EF; --mint-2: #F4FAF6; --mint-line: #D6EDE0;
  --paper: #FBFAF6; --sand: #F2EFE8; --line: #E6EAE3; --card: #FFFFFF;
  --amber-bg: #FFF7EE; --amber-line: #F3E3CE; --amber-ink: #7A4E10;
  --radius: 16px; --shadow: 0 14px 36px rgba(20,50,42,.07);
  --serif: Georgia, serif;
  --sans: system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--paper); line-height: 1.65; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 520px; z-index: 0; pointer-events: none;
  background: radial-gradient(520px 320px at 88% -40px, rgba(143,217,182,.38), transparent 70%), radial-gradient(460px 300px at 4% 120px, rgba(207,243,223,.55), transparent 70%); }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green-2); }
a:focus-visible, summary:focus-visible, button:focus-visible { outline: 3px solid var(--green-3); outline-offset: 3px; border-radius: 6px; }
.g-page { position: relative; z-index: 1; }

/* ---- en-tête (identique à la landing) ---- */
.g-header { max-width: 1180px; margin: 0 auto; padding: 22px 32px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.g-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.g-orb { width: 32px; height: 32px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0%, #B9ECD0 40%, #3DA877 100%); box-shadow: 0 4px 16px rgba(61,168,119,.5); }
.g-brand strong { font-weight: 800; font-size: 19px; letter-spacing: -.03em; }
.g-nav { display: flex; align-items: center; gap: 28px; font-size: 15px; font-weight: 600; }
.g-nav a { color: #3A5249; text-decoration: none; }
.g-nav a:hover { color: var(--green); }
.g-nav .g-cta { color: #fff; background: var(--green); padding: 10px 18px; border-radius: 999px; font-weight: 700; box-shadow: 0 6px 16px rgba(30,107,80,.25); }
.g-nav .g-cta:hover { color: #fff; background: var(--green-2); }

/* ---- mise en page ---- */
.g-wrap { max-width: 1120px; margin: 0 auto; padding: 8px 32px 72px; display: grid; grid-template-columns: minmax(0, 720px) 280px; gap: 56px; justify-content: center; align-items: start; }
.g-article { min-width: 0; }

/* ---- fil d'Ariane ---- */
.g-crumbs { font-size: 14px; color: var(--muted); margin: 8px 0 22px; }
.g-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.g-crumbs li + li::before { content: "›"; margin-right: 6px; color: #9AA89F; }
.g-crumbs a { color: var(--muted); text-decoration: none; }
.g-crumbs a:hover { color: var(--green); text-decoration: underline; }
.g-crumbs [aria-current] { color: var(--ink-2); }

/* ---- titre et signature ---- */
.g-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--green-2); background: var(--mint); border: 1px solid var(--mint-line); padding: 6px 13px; border-radius: 999px; text-decoration: none; }
.g-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green-3); box-shadow: 0 0 0 3px rgba(61,168,119,.18); }
.g-title { font-family: var(--serif); font-weight: 500; font-size: clamp(32px, 5vw, 46px); line-height: 1.08; letter-spacing: -.025em; margin: 18px 0 20px; text-wrap: balance; }
.g-byline { display: flex; align-items: center; gap: 14px; margin: 0 0 28px; font-size: 14.5px; color: var(--ink-2); }
.g-byline .g-orb { flex: none; width: 40px; height: 40px; }
.g-byline strong { color: var(--ink); }
.g-byline small { display: block; color: var(--muted); font-size: 13.5px; }

/* ---- En bref ---- */
.g-brief { position: relative; margin: 0 0 28px; padding: 22px 24px 22px 28px; background: var(--card); border: 1px solid var(--mint-line); border-radius: var(--radius); box-shadow: var(--shadow); font-size: 18px; line-height: 1.55; color: var(--ink); overflow: hidden; }
.g-brief::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: linear-gradient(180deg, var(--green-3), #8FD9B6); }
.g-brief strong:first-child { color: var(--green); }

/* ---- chiffres clés ---- */
.g-figures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0 0 36px; padding: 0; list-style: none; }
.g-figure { background: var(--mint-2); border: 1px solid var(--mint-line); border-radius: 14px; padding: 16px 16px 14px; }
.g-figure b { display: block; font-family: var(--serif); font-weight: 500; font-size: 30px; line-height: 1.1; letter-spacing: -.02em; color: var(--green); }
.g-figure span { display: block; margin-top: 6px; font-size: 13.5px; line-height: 1.35; color: var(--ink-2); }

/* ---- sommaire ---- */
.g-toc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.g-toc h2 { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-family: var(--sans); }
.g-toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; counter-reset: toc; }
.g-toc li { counter-increment: toc; }
.g-toc a { display: grid; grid-template-columns: 26px 1fr; gap: 6px; padding: 7px 8px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-size: 14.5px; line-height: 1.35; }
.g-toc a::before { content: counter(toc); font-weight: 700; color: var(--green-2); }
.g-toc a:hover { background: var(--mint); color: var(--ink); }
.g-aside { position: sticky; top: 24px; display: grid; gap: 16px; }
.g-toc--inline { display: none; }
.g-toc--inline summary { cursor: pointer; font-weight: 700; font-size: 15px; list-style: none; }
.g-toc--inline summary::-webkit-details-marker { display: none; }
.g-toc--inline summary::after { content: "+"; float: right; color: var(--green); font-size: 20px; line-height: 1; }
.g-toc--inline[open] summary::after { content: "−"; }
.g-toc--inline ol { margin-top: 10px; }

/* ---- aside : appel à l'action compact ---- */
.g-mini-cta { background: linear-gradient(165deg, #103A2C, #0B2A20); color: #fff; border-radius: var(--radius); padding: 20px; }
.g-mini-cta p { margin: 0 0 14px; font-size: 14.5px; line-height: 1.5; color: #C6D8CF; }
.g-mini-cta strong { display: block; color: #fff; font-family: var(--serif); font-weight: 500; font-size: 20px; line-height: 1.2; margin-bottom: 8px; }

/* ---- corps de la fiche (contenu_html) ---- */
.g-content { font-size: 17.5px; color: #1F3A31; }
.g-content > :first-child { margin-top: 0; }
.g-content h2 { font-family: var(--serif); font-weight: 500; font-size: 30px; line-height: 1.15; letter-spacing: -.02em; margin: 48px 0 14px; }
.g-content h3 { font-family: var(--serif); font-weight: 600; font-size: 22px; margin: 32px 0 10px; }
.g-content p { margin: 0 0 16px; }
.g-content ul, .g-content ol { margin: 0 0 20px; padding-left: 22px; }
.g-content li { margin-bottom: 10px; padding-left: 4px; }
.g-content li::marker { color: var(--green-3); }
.g-content strong { color: var(--ink); font-weight: 700; }
.g-content table { display: block; overflow-x: auto; width: 100%; border-collapse: separate; border-spacing: 0; margin: 0 0 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-size: 15.5px; }
.g-content th, .g-content td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.g-content th { background: var(--mint-2); font-size: 13.5px; font-weight: 700; letter-spacing: .02em; color: var(--ink-2); white-space: nowrap; }
.g-content tbody tr:last-child td { border-bottom: 0; }
.g-content td:first-child { color: var(--ink-2); }
.g-content td { font-variant-numeric: tabular-nums; }

.g-clair { margin: 24px 0; background: var(--mint-2); border-left: 4px solid var(--green-3); padding: 14px 16px; border-radius: 8px; font-size: 17px; color: var(--ink); }
.g-clair > :last-child { margin-bottom: 0; }
.g-schema { margin: 28px 0; text-align: center; }
.g-schema svg { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.g-schema figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }
.g-content .g-cas { list-style: none; padding: 0; display: grid; gap: 12px; }
.g-cas > li { margin: 0; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; }

/* ---- vidéo (masquée si absente) ---- */
.g-video { margin: 40px 0; }
.g-video figure { margin: 0; }
.g-video .g-video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: linear-gradient(135deg, #103A2C, #1E6B50); display: grid; place-items: center; color: #fff; box-shadow: var(--shadow); }
.g-video .g-play { width: 68px; height: 68px; border-radius: 50%; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.4); display: grid; place-items: center; }
.g-video .g-play::before { content: ""; margin-left: 5px; border-left: 18px solid #fff; border-top: 11px solid transparent; border-bottom: 11px solid transparent; }
.g-video figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }
.g-video button { width: 100%; border: 0; cursor: pointer; font: inherit; }
.g-video iframe { width: 100%; height: 100%; border: 0; }
.g-video-error { color: var(--amber-ink); }

/* ---- encadré terrain (masqué si vide) ---- */
.g-field { margin: 36px 0; padding: 22px 24px; background: var(--amber-bg); border: 1px solid var(--amber-line); border-radius: var(--radius); }
.g-field h2 { margin: 0 0 8px; font-family: var(--sans); font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--amber-ink); }
.g-field p { margin: 0 0 12px; font-size: 17px; }
.g-field footer { font-size: 14px; color: var(--amber-ink); font-weight: 600; }

/* ---- FAQ ---- */
.g-faq { margin: 48px 0 0; }
.g-section-title { font-family: var(--serif); font-weight: 500; font-size: 30px; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 16px; }
.g-faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin: 0 0 10px; }
.g-faq summary { cursor: pointer; padding: 16px 52px 16px 18px; font-weight: 700; font-size: 16.5px; line-height: 1.4; list-style: none; position: relative; }
.g-faq summary::-webkit-details-marker { display: none; }
.g-faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 22px; color: var(--green); font-weight: 400; }
.g-faq details[open] summary::after { content: "−"; }
.g-faq details[open] { border-color: var(--mint-line); box-shadow: var(--shadow); }
.g-faq details p { margin: 0; padding: 0 18px 18px; color: var(--ink-2); font-size: 16.5px; }

/* ---- sources et mention ---- */
.g-sources { margin: 44px 0 0; padding: 22px 24px; background: var(--sand); border-radius: var(--radius); }
.g-sources h2 { margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-family: var(--sans); }
.g-sources ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.g-sources li { font-size: 15.5px; line-height: 1.45; }
.g-sources .g-org { display: inline-block; margin-right: 8px; padding: 2px 9px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 12.5px; font-weight: 700; color: var(--green); }
.g-sources small { display: block; margin-top: 2px; color: var(--muted); font-size: 13.5px; }
.g-notice { margin: 16px 0 0; padding: 14px 16px; border-radius: 12px; background: var(--mint-2); border: 1px solid var(--mint-line); font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.g-notice strong { color: var(--green); }
.g-method { margin: 14px 0 0; font-size: 14px; }

/* ---- fiches liées ---- */
.g-related { margin: 52px 0 0; }
.g-related ul { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.g-related a { display: flex; flex-direction: column; justify-content: space-between; gap: 14px; height: 100%; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 15.5px; line-height: 1.35; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.g-related a span { font-size: 13.5px; font-weight: 700; color: var(--green); }
.g-related a:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(20,50,42,.12); border-color: var(--mint-line); }

/* ---- pages d'index (accueil guides, piliers, méthode) ---- */
.g-wrap--single { grid-template-columns: minmax(0, 820px); }
.g-intro { margin: 0 0 30px; font-size: 18px; line-height: 1.55; color: var(--ink-2); }
.g-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.g-list a { display: block; padding: 18px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.g-list strong { display: block; margin-bottom: 6px; font-size: 18px; line-height: 1.3; }
.g-list p { margin: 0 0 10px; font-size: 15.5px; line-height: 1.5; color: var(--ink-2); }
.g-list span { font-size: 13.5px; font-weight: 700; color: var(--green); }
.g-list a:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(20,50,42,.12); border-color: var(--mint-line); }
.g-wrap--single .g-method { margin-top: 32px; }

/* ---- appel à l'action Lou ---- */
.g-lou { position: relative; margin: 56px 0 0; padding: 34px 32px; border-radius: 22px; color: #fff; overflow: hidden; background: linear-gradient(165deg, #103A2C, #0B2A20); box-shadow: 0 28px 60px rgba(20,50,42,.18); }
.g-lou::before { content: ""; position: absolute; top: -90px; right: -70px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(111,203,154,.45), transparent 68%); }
.g-lou .g-orb { width: 46px; height: 46px; margin-bottom: 16px; position: relative; }
.g-lou h2 { position: relative; margin: 0 0 10px; font-family: var(--serif); font-weight: 500; font-size: 30px; line-height: 1.15; letter-spacing: -.02em; }
.g-lou p { position: relative; margin: 0 0 22px; max-width: 520px; color: #C6D8CF; font-size: 16.5px; }
.g-btn { position: relative; display: inline-block; padding: 14px 24px; border-radius: 999px; background: var(--green-3); color: #fff; font-weight: 700; font-size: 16px; text-decoration: none; box-shadow: 0 12px 28px rgba(0,0,0,.25); }
.g-btn:hover { background: #4FC18C; color: #fff; }
.g-lou small { position: relative; display: block; margin-top: 12px; font-size: 13.5px; color: #9FB8AC; }

/* ---- pied de page ---- */
.g-footer { position: relative; z-index: 1; background: var(--sand); padding: 36px 32px; margin-top: 8px; }
.g-footer div { max-width: 1120px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; align-items: center; font-size: 14.5px; color: var(--muted); }
.g-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.g-footer a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.g-footer a:hover { color: var(--green); text-decoration: underline; }

/* ---- tablette et mobile ---- */
@media (max-width: 960px) {
  .g-wrap { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 4px 20px 56px; }
  .g-aside { display: none; }
  .g-toc--inline { display: block; margin: 0 0 28px; }
  .g-header { padding: 16px 20px; }
  .g-nav { gap: 16px; font-size: 14.5px; }
  .g-nav .g-hide-sm { display: none; }
}
@media (max-width: 640px) {
  .g-figures { grid-template-columns: 1fr; }
  .g-related ul { grid-template-columns: 1fr; }
  .g-brief { font-size: 17px; padding: 18px 18px 18px 22px; }
  .g-content { font-size: 17px; }
  .g-content h2, .g-section-title { font-size: 26px; }
  .g-lou { padding: 26px 22px; }
  .g-lou h2 { font-size: 26px; }
  .g-btn { display: block; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .g-related a, .g-list a { transition: none; } }

.g-preview { padding-top: 72px; }
.g-preview .g-aside { top: 96px; }
.g-preview-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; padding: 11px 20px; background: #7A4E10; color: #fff; font: 700 14px/1.6 system-ui, sans-serif; letter-spacing: .04em; text-align: center; }
html:has(.g-preview) { scroll-padding-top: 96px; }

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #E5F2EB; --ink-2: #CAD8D0; --muted: #A4B8AB;
    --green: #8FD9B6; --green-2: #A7E5C6; --green-3: #3DA877;
    --mint: #203D30; --mint-2: #1B3026; --mint-line: #355847;
    --paper: #111E18; --sand: #192B22; --line: #365044; --card: #1B2E24;
    --amber-bg: #30291C; --amber-line: #635232; --amber-ink: #F1CD91;
  }
  body::before { opacity: .12; }
  .g-content, .g-nav a { color: var(--ink-2); }
  .g-sources .g-org { background: var(--card); }
  .g-nav .g-cta { background: #1E6B50; }
  .g-nav .g-cta:hover { background: #2E8B6B; }
}
@media print { body::before, .g-header, .g-aside, .g-lou, .g-footer, .g-toc--inline, .g-preview-banner { display: none; } .g-wrap { display: block; padding: 0; } .g-preview { padding-top: 0; } }
