/* ==========================================================================
   Kroket · help-legal.css — pages Aide (/aide/, /en/help/) et textes légaux
   (/confidentialite/, /cgu/, /mentions-legales/ et leurs versions EN).
   Chargée uniquement sur ces pages (<link> en tête de _src/pages/{help,privacy,terms,legal}.*.html),
   en complément de site.css (budget 40 Ko préservé). Mêmes tokens que site.css.
   Composants : mark.todo  .doc-hero  .toc-m (sommaire mobile)  .doc__toc--side  .anchor/.doc-num
                .doc-summary  .table-wrap/.doc-table
                .help-hero  .help-search  .help-cats  .help-status  .help-cat  .help-q  .help-more
   ========================================================================== */

/* ---------- Marqueurs de relecture [À COMPLÉTER] / [TO BE COMPLETED] : à retirer avant la mise en ligne ---------- */
mark.todo{padding:.1em .4em;border-radius:6px;background:#FFF1B8;color:var(--ink);font-weight:600;box-shadow:inset 0 0 0 1.5px #C99700;-webkit-box-decoration-break:clone;box-decoration-break:clone}

/* ---------- En-tête des pages texte : aligné sur la colonne de lecture ---------- */
.doc-hero .h2{max-width:22ch}
.doc-hero .lede{max-width:40rem}
@media (min-width:1000px){
  .doc-hero .page-hero__inner{grid-template-columns:220px minmax(0,var(--container-text));justify-content:center;column-gap:64px}
  .doc-hero .page-hero__inner>*{grid-column:2}
}

/* ---------- Sommaire : repliable sur mobile, fixe à gauche sur desktop ---------- */
.toc-m{border-radius:var(--r-md);background:var(--surface);box-shadow:var(--sh-card)}
.toc-m summary{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:52px;padding:0 18px;font-size:16px;font-weight:700;cursor:pointer;list-style:none;border-radius:var(--r-md)}
.toc-m summary::-webkit-details-marker{display:none}
.toc-m summary .icon{transition:rotate var(--d-base) var(--ease-out)}
.toc-m[open] summary .icon{rotate:180deg}
.toc-m ol{margin:0;padding:0 18px 10px;list-style:none;font-size:15px}
.toc-m a,.doc__toc--side a{display:grid;grid-template-columns:2em minmax(0,1fr);color:var(--text-2);text-decoration:none}
.toc-m a{padding:10px 0;border-top:1px solid var(--line)}
.toc-m a:hover{color:var(--ink)}
.toc__num{font-variant-numeric:tabular-nums;color:var(--text-3)}
.doc__toc--side{display:none}
@media (min-width:1000px){
  .toc-m{display:none}
  .doc__toc--side{display:block;max-height:calc(100vh - var(--header-h) - 56px);overflow-y:auto;overscroll-behavior:contain}
  .doc__toc--side ol{margin:0;padding:0;list-style:none;border-left:1px solid var(--line)}
  .doc__toc--side a{padding:6px 0 6px 12px;margin-left:-1px;border-left:2px solid transparent;line-height:1.35;transition:color var(--d-fast),border-color var(--d-fast)}
  .doc__toc--side a[aria-current]{color:var(--ink);font-weight:600;border-left-color:var(--brand-400)}
}

/* ---------- Titres de section : numéro + ancre partageable ---------- */
.prose h2 .anchor{color:inherit;font-weight:inherit;text-decoration:none;border-radius:6px}
.prose h2 .anchor::after{content:"#";content:"#"/"";margin-left:.35em;color:var(--brand-700);opacity:0;transition:opacity var(--d-fast)}
.prose h2 .anchor:hover::after,.prose h2 .anchor:focus-visible::after{opacity:1}
@media (hover:none){.prose h2 .anchor::after{opacity:.4}}
.doc-num{color:var(--text-3);font-variant-numeric:tabular-nums}
.prose>h2:first-child{margin-top:0}
.prose h3{line-height:1.3}
.prose ul ul{margin-top:.4em}

/* ---------- Encadré « En bref » ---------- */
.doc-summary{padding:clamp(20px,3vw,28px)}
.doc-summary__title{font-size:14px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--brand-700)}
.prose .doc-summary__list{display:grid;gap:10px;margin-top:14px;padding-left:0}
.prose .doc-summary__list li{position:relative;margin:0;padding-left:30px;color:var(--text-1)}
.doc-summary__list li::before{content:"";position:absolute;left:0;top:.2em;width:20px;height:20px;background:var(--brand-700);-webkit-mask:var(--k-check) center/contain no-repeat;mask:var(--k-check) center/contain no-repeat}
:root{--k-check:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");--k-link:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13.5a4.5 4.5 0 0 0 6.4.4l3-3a4.5 4.5 0 0 0-6.4-6.4l-1.7 1.7'/%3E%3Cpath d='M14 10.5a4.5 4.5 0 0 0-6.4-.4l-3 3a4.5 4.5 0 0 0 6.4 6.4l1.7-1.7'/%3E%3C/svg%3E");--k-close:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E")}

/* ---------- Tableaux (empilés en cartes sous 600 px) ---------- */
.table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:var(--r-md);background:var(--surface)}
.prose .table-wrap{margin-top:1.25em}
.doc-table{width:100%;border-collapse:collapse;font-size:15px;line-height:1.5}
.doc-table th{padding:12px 16px;text-align:left;vertical-align:bottom;font-size:13px;font-weight:700;letter-spacing:.02em;color:var(--text-2);background:var(--sunken)}
.doc-table td{padding:14px 16px;vertical-align:top;border-top:1px solid var(--line)}
.doc-table td:first-child{width:50%;color:var(--ink)}
@media (max-width:599px){
  .doc-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .doc-table tr{display:block;padding:14px 16px}
  .doc-table tbody tr+tr{border-top:1px solid var(--line)}
  .doc-table td{display:block;width:auto!important;padding:0;border:0}
  .doc-table td:first-child{font-weight:600}
  .doc-table td+td{margin-top:6px}
  .doc-table td+td::before{content:attr(data-label);display:block;margin-bottom:2px;font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--text-3)}
}

/* ---------- Aide : en-tête, recherche, catégories ---------- */
.help-hero{text-align:center;padding-bottom:clamp(24px,3vw,40px)}
.help-hero .page-hero__inner{justify-items:center}
.help-hero .display{max-width:20ch}
.help-hero__nowrap{white-space:nowrap}
.help-hero .lede{margin-inline:auto}
.help-search{position:relative;width:min(100%,600px);margin-top:12px}
.help-search__icon{position:absolute;left:20px;top:50%;translate:0 -50%;width:22px;height:22px;color:var(--text-3);pointer-events:none}
.help-search__input{width:100%;min-height:60px;padding:0 20px 0 54px;border:0;border-radius:var(--r-pill);background:var(--surface);box-shadow:var(--sh-float);font:500 18px/1.3 var(--font);color:var(--ink);-webkit-appearance:none;appearance:none}
.help-search__input::placeholder{color:var(--text-3);opacity:1}
.help-search__input:focus-visible{outline:3px solid var(--focus);outline-offset:3px;border-radius:var(--r-pill)}
.help-search__input::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:var(--text-3);-webkit-mask:var(--k-close) center/contain no-repeat;mask:var(--k-close) center/contain no-repeat;cursor:pointer}
.help-cats{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;max-width:820px;margin-top:4px}
.help-cats__chip{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 16px 0 12px;border-radius:var(--r-pill);background:var(--surface);box-shadow:var(--sh-card);font-size:15px;font-weight:600;color:var(--ink);text-decoration:none;transition:background-color var(--d-fast)}
.help-cats__chip .icon{width:20px;height:20px;color:var(--brand-700)}
.help-cats__chip:hover{background:var(--sand)}
.help-cats__chip:focus-visible{border-radius:var(--r-pill)}
.help-hero__note{max-width:36rem}

/* ---------- Aide : questions ---------- */
.help{padding-bottom:var(--section-y)}
.help-status{font-size:15px;font-weight:600;color:var(--text-2)}
.help-status:empty{display:none}
.help-cat{padding-top:clamp(36px,5vw,56px)}
.help-status+.visually-hidden+.help-cat{padding-top:20px}
.help-cat__head{display:flex;align-items:center;gap:14px;padding-bottom:16px}
.help-cat__icon{width:44px;height:44px;flex:none;display:grid;place-items:center;border-radius:50%;background:var(--brand-50);color:var(--brand-700)}
.help-cat__icon .icon{width:24px;height:24px}
.help-cat__title{font-size:clamp(1.375rem,1.2rem + .7vw,1.75rem);line-height:1.2;letter-spacing:-.02em;font-weight:700}
.help-cat__count{margin-left:auto;font-size:14px;color:var(--text-3);white-space:nowrap}
.help-q summary{border-radius:6px}
.help-q__title{flex:1}
.help-q__title mark{padding:0 1px;border-radius:3px;background:var(--brand-100);color:inherit}
.help-q .faq__answer{padding-bottom:0}
.help-q__answer>*+*{margin-top:.8em}
.help-q__actions{padding:4px 0 12px}
.help-q__link{display:inline-flex;align-items:center;gap:6px;min-height:44px;font-size:14px;font-weight:600;color:var(--text-3);text-decoration:none;border-radius:6px}
.help-q__link::before{content:"";width:16px;height:16px;background:currentColor;-webkit-mask:var(--k-link) center/contain no-repeat;mask:var(--k-link) center/contain no-repeat}
.help-q__link:hover{color:var(--brand-700);text-decoration:underline;text-underline-offset:3px}
.help-q__link.is-copied{color:var(--ink)}
.help-q:target>summary{color:var(--brand-700)}

/* ---------- Aide : « Besoin de plus d'aide ? » ---------- */
.help-more{display:grid;gap:24px;align-items:center;margin-top:clamp(56px,7vw,88px);padding:clamp(28px,4vw,44px);border-radius:var(--r-lg);background:var(--sand)}
.help-more__text{display:grid;gap:14px;justify-items:start}
.help-more__text a:not(.btn){color:var(--brand-700);font-weight:600;text-underline-offset:3px}
.help-more .btn .icon{width:20px;height:20px}
/* Le PNG (418×597) porte beaucoup de marge transparente : on ne garde que la bande centrale où dort le chat */
.help-more__illu{width:min(260px,75%);height:auto;aspect-ratio:2/1;object-fit:cover;justify-self:center}
@media (min-width:640px){.help-more{grid-template-columns:minmax(0,1fr) auto}.help-more__illu{width:220px}}
