/* Prépa Cafetier — guide pages (shared by every guide). Loaded after base.css + page.css.
   Every rule is scoped under main.guide and every class is prefixed .guide-. Tokens from base.css only. */

/* a long keyword title needs a slightly smaller, wider h1 than the legal pages */
.guide .doc-title { font-size: clamp(40px, 6.2vw, 80px); max-width: 17ch; line-height: 1.03; }

/* ------------------------------------------------------------------ "en bref" box */
.guide .guide-brief { margin: 0 0 clamp(40px, 6vw, 64px); padding: clamp(22px, 4vw, 32px); background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.guide .guide-brief-t { margin: 0 0 12px !important; font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--wine); }
.guide .guide-brief ul { margin: 0 !important; }

/* ------------------------------------------------------------------ tables (scroll inside their own box if ever too wide) */
.guide .guide-table { margin: 8px 0 26px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); }
.guide .guide-table:focus-visible { outline-offset: 2px; }
.guide .guide-table table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.5; }
.guide .guide-table caption { padding: 14px 16px 4px; text-align: left; font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--brass); }
.guide .guide-table th, .guide .guide-table td { padding: 12px 16px; text-align: left; vertical-align: top; }
.guide .guide-table thead th { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; font-weight: 650; color: var(--muted); border-bottom: 1px solid var(--line-strong); }
.guide .guide-table tbody th { font-weight: 600; }
.guide .guide-table tbody tr + tr > * { border-top: 1px solid var(--line); }
.guide .guide-table .guide-n { font-family: var(--serif); font-size: 17px; white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }
.guide .guide-table tfoot th, .guide .guide-table tfoot td { border-top: 1.5px solid var(--ink); font-weight: 650; }

/* ------------------------------------------------------------------ numbered steps */
.guide .guide-steps { list-style: none; margin: 8px 0 30px; padding: 0; counter-reset: guide-step; display: grid; gap: 0; }
.guide .guide-steps > li { counter-increment: guide-step; position: relative; padding: 0 0 26px 58px; }
.guide .guide-steps > li::before { content: counter(guide-step); position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--brass-deco); background: var(--card); font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--wine); font-variant-numeric: lining-nums; }
.guide .guide-steps > li::after { content: ""; position: absolute; left: 20px; top: 46px; bottom: 6px; width: 1px; background: var(--line-strong); }
.guide .guide-steps > li:last-child { padding-bottom: 0; }
.guide .guide-steps > li:last-child::after { display: none; }
.guide .guide-steps h3 { font-family: var(--serif); font-weight: 500; font-size: 20px; letter-spacing: -.01em; line-height: 1.25; margin: 7px 0 6px; }
.guide .guide-steps p { margin: 0 0 .6em; }

/* ------------------------------------------------------------------ links to the other guides */
.guide .guide-cards { list-style: none; margin: 8px 0 10px !important; padding: 0; display: grid !important; grid-template-columns: minmax(0, 1fr); gap: 12px !important; }
@media (min-width: 640px) { .guide .guide-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.guide .guide-cards li { padding: 0 !important; }
.guide .guide-cards li::before { display: none; }
.guide .guide-cards a { display: flex; flex-direction: column; gap: 6px; height: 100%; min-height: 44px; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--ink) !important; text-decoration: none !important; transition: border-color .2s, transform .35s var(--ease-out); }
.guide .guide-cards a:hover { border-color: var(--wine); transform: translateY(-2px); }
.guide .guide-cards b { font-family: var(--serif); font-weight: 500; font-size: 18px; line-height: 1.25; color: var(--wine); }
.guide .guide-cards span { font-size: 15px; line-height: 1.5; color: var(--muted); }

/* ------------------------------------------------------------------ FAQ */
.guide .guide-faq { margin: 0; }
.guide .guide-faq > div { padding: 18px 0; border-top: 1px solid var(--line); }
.guide .guide-faq > div:first-child { border-top: 0; padding-top: 0; }
.guide .guide-faq dt { font-family: var(--serif); font-weight: 500; font-size: 20px; line-height: 1.3; letter-spacing: -.01em; margin: 0 0 8px; }
.guide .guide-faq dd { margin: 0; line-height: 1.7; }

/* ------------------------------------------------------------------ sources */
.guide .guide-src li { overflow-wrap: anywhere; }
.guide .guide-src small { display: block; color: var(--muted); font-size: 14px; }

/* ------------------------------------------------------------------ branch lists inside a table cell (examen page, prefix exg-) */
.guide .doc-article .exg-br { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.guide .doc-article .exg-br li { padding-left: 0; line-height: 1.45; }
.guide .doc-article .exg-br li::before { display: none; }
.guide .exg-br b { display: inline-block; min-width: 1.9em; font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--brass); }
.guide .exg-br small { color: var(--muted); font-size: 14px; white-space: nowrap; }
.guide .guide-table th small { display: block; font-weight: 400; font-style: italic; font-size: 14px; color: var(--brass); }
@media (max-width: 479px) {
  .guide .exg-themes th, .guide .exg-themes td { padding: 10px 10px; }
  .guide .exg-themes { font-size: 15px; }
}

/* ------------------------------------------------------------------ end-of-article buttons: no underlined wine link style from .doc-article */
.guide .doc-article .doc-back a.btn { text-decoration: none; }
.guide .doc-article .doc-back a.btn-ghost { color: var(--ink); }

/* ------------------------------------------------------------------ closing CTA band (night) */
.guide .guide-cta { overflow: hidden; }
.guide .guide-cta .container { position: relative; z-index: 1; max-width: 880px; text-align: center; }
.guide .guide-cta .h2 { margin-bottom: 18px; }
.guide .guide-cta .lead { margin: 0 auto; }
.guide .guide-cta-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: clamp(28px, 4vw, 40px) 0 0; }
.guide .guide-cta-note { margin: 22px 0 0; font-size: 14.5px; color: var(--on-night-muted); }
.guide .guide-cta svg.guide-cta-art { width: 56px; height: 46px; margin: 0 auto 22px; color: var(--brass-deco); }
@media (max-width: 420px) { .guide .guide-cta-acts .btn { width: 100%; } }

/* ------------------------------------------------------------------ questions page (prefix qx-) */
.doc .qx-q { position: relative; margin: 0 0 22px; padding: clamp(20px, 4vw, 30px); background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.doc .qx-k { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 10px !important; font-size: 14px; line-height: 1.4 !important; color: var(--brass); font-family: var(--serif); font-style: italic; }
.doc .qx-k b { font-family: var(--sans); font-style: normal; font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }
.doc .qx-t { font-family: var(--serif); font-weight: 500; font-size: clamp(19px, 2.2vw, 22px); line-height: 1.35; letter-spacing: -.01em; margin: 0 0 16px; }
.doc .qx-opts { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.doc .qx-opts li { display: flex; align-items: flex-start; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); line-height: 1.5; }
.doc .qx-l { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--brass-deco); font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--brass); }
.doc .qx-d { border-top: 1px solid var(--line); }
.doc .qx-d summary { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 12px 0 0; cursor: pointer; list-style: none; font-weight: 650; color: var(--wine); }
.doc .qx-d summary::-webkit-details-marker { display: none; }
.doc .qx-d summary svg { width: 18px; height: 18px; flex: none; transition: transform .3s var(--ease-out); }
.doc .qx-d[open] summary svg { transform: rotate(180deg); }
.doc .qx-d summary:hover span { text-decoration: underline; text-underline-offset: 3px; }
.doc .qx-d summary:focus-visible { outline: 2px solid var(--wine); outline-offset: 4px; border-radius: 6px; }
.doc .qx-a { padding: 14px 0 0; }
.doc .qx-ans { display: flex; align-items: center; gap: 12px; margin: 0 0 12px !important; padding: 12px 14px; border-radius: var(--r-sm); background: var(--ok-soft); color: var(--ink); }
.doc .qx-ans .qx-l { border-color: var(--ok); color: var(--ok); background: var(--card); }
.doc .qx-ans b { color: var(--ok); }
.doc .qx-law { margin: 0 0 12px; padding: 4px 0 4px 18px; border-left: 2px solid var(--brass-deco); font-family: var(--serif); font-style: italic; font-size: 16.5px; line-height: 1.6; }
.doc .qx-law p { margin: 0 !important; }
.doc .qx-src { margin: 0 !important; font-size: 14.5px; color: var(--muted); }
.doc .qx-tw { margin: 6px 0 14px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); }
.doc .qx-tw:focus-visible { outline: 2px solid var(--wine); outline-offset: 2px; }
.doc .qx-table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.45; }
.doc .qx-table caption { caption-side: bottom; text-align: left; padding: 10px 14px; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); }
.doc .qx-table th, .doc .qx-table td { padding: 11px 14px; text-align: left; vertical-align: top; }
.doc .qx-table thead th { font-weight: 650; font-size: 14px; color: var(--muted); border-bottom: 1px solid var(--line-strong); }
.doc .qx-table tbody tr + tr th, .doc .qx-table tbody tr + tr td { border-top: 1px solid var(--line); }
.doc .qx-table tbody th { font-weight: 600; }
.doc .qx-table td.num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.doc .doc-article ol.qx-steps { margin: 0 0 1.1em; padding-left: 1.4em; display: grid; gap: 8px; }
.doc .qx-faq h3 { margin-top: 26px; }
.doc .qx-cta { text-align: center; }
.doc .qx-cta .container { max-width: 760px; }
.doc .qx-cta .lead { margin: 0 auto 30px; }
.doc .qx-cta-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
@media (max-width: 420px) { .doc .qx-cta-acts .btn { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .doc .qx-d summary svg { transition: none; } }

/* ------------------------------------------------------------------ prix page CTA (prefix prix-) */
.doc .prix-cta .container { max-width: 60rem; }
.doc .prix-cta .lead { margin-bottom: 30px; }
.doc .prix-cta .doc-back { justify-content: flex-start; margin-top: 0; }
@media (max-width: 420px) { .doc .prix-cta .doc-back .btn { width: 100%; } }

@media (prefers-reduced-motion: reduce) {
  .guide .guide-cards a { transition: none; }
  .guide .guide-cards a:hover { transform: none; }
}
