/* Pages /confidentialite/ et /cgv/ (« Conditions générales ») : UNE feuille pour les deux.
   Sœur de core/static/core/css/politique_cookies.css : même registre de la manchette
   (Fraunces / DM Sans, filets et or), mêmes jetons --ard-* / --hn-gold-* portés par
   night_kitchen.css. Zéro hex, zéro rgba en dur, une seule surcharge de thème (--lg-filet).

   Ce que cette feuille ajoute à .ck-* :
   - .lg-bref      le bloc « En bref » sous la tête ;
   - .lg-som       un sommaire long (16 entrées) : colonne collante qui défile seule en
                   bureau, barre collante repliable (details) sous 860 px ;
   - .lg-partie    les intertitres de partie des conditions ;
   - .lg-ed        le bloc éditeur et hébergeur (cible de #editeur) ;
   - .lg-liste     les listes du texte ;
   - .lg-form      le formulaire type de rétractation.

   --lg-mono n'existe pas ailleurs (comme --ck-mono) : posé ici, localement.
   --lg-filet : l'or des filets décoratifs, le seul jeton qui change de source par thème. */

.lg {
  background: var(--ard-bg); color: var(--ard-ink); font-family: var(--ard-sans);
  padding: 56px 0 88px;
  --lg-mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --lg-filet: var(--ard-gold);
  /* Ce qui reste collé en haut de l'écran au-dessus du texte : sert aux ancres. */
  --lg-colle: calc(var(--nav-h-sticky) + 24px);
}
[data-theme="light"] .lg { --lg-filet: var(--ard-gold-text); }

/* :where() : spécificité nulle, les marges des listes écrites plus bas gardent la main. */
.lg :where(ol, ul, dl, dd) { margin: 0; padding: 0; list-style: none; }

/* ── Tête ─────────────────────────────────────────────────────────── */
.lg-tete { max-width: 1140px; margin: 0 auto; padding: 0 32px; }
.lg-k {
  display: flex; align-items: center; gap: 14px; margin: 0;
  font-size: 12px; font-weight: 600; letter-spacing: 2.4px; text-transform: uppercase; line-height: 1;
  color: var(--ard-gold-text);
}
.lg-k::before { content: ""; width: 28px; height: 1px; background: var(--ard-gold-text); opacity: .75; }
.lg-h1 {
  margin: 20px 0 0;
  font-family: var(--ard-serif); font-weight: 500; font-variation-settings: 'SOFT' 34, 'WONK' 1;
  font-size: 64px; line-height: 1; letter-spacing: -.02em; color: var(--ard-ink);
  overflow-wrap: break-word;
}
.lg-h1 em { font-style: normal; color: var(--ard-gold-text); }
.lg-lead { max-width: 620px; margin: 22px 0 0; font-size: 17px; line-height: 1.6; color: var(--ard-ink-2); }
.lg-date {
  display: flex; align-items: center; gap: 10px; margin: 22px 0 0;
  font-family: var(--ard-serif); font-style: italic; font-size: 15px; color: var(--ard-ink-2);
}
.lg-date svg { width: 16px; height: 16px; flex: none; color: var(--ard-gold-text); }
.lg-date-sep { margin: 0 6px; color: var(--ard-gold-text); }
.lg-filets {
  max-width: 1076px; margin: 40px auto 0;
  height: 5px; border-top: 1px solid var(--lg-filet); border-bottom: 1px solid var(--lg-filet);
}

/* ── « En bref » ──────────────────────────────────────────────────────
   Un aplat --ard-bg-2 qui déborde de 28 px de chaque côté : son contenu reste aligné
   sur les deux colonnes du corps (titre au-dessus du sommaire, lignes au-dessus du texte). */
.lg-bref { max-width: 1140px; margin: 40px auto 0; padding: 0 32px; }
.lg-bref-in {
  display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 64px; align-items: start;
  margin: 0 -28px; padding: 32px 28px;
  background: var(--ard-bg-2);
}
.lg-bref-t {
  margin: 0;
  font-family: var(--ard-serif); font-weight: 500; font-variation-settings: 'SOFT' 34, 'WONK' 1;
  font-size: 30px; line-height: 1.15; letter-spacing: -.015em; color: var(--ard-ink);
}
.lg-bref-d { margin: 8px 0 0; font-size: 14px; line-height: 1.5; color: var(--ard-ink-2); }
.lg-bref-liste { border-top: 1px solid var(--ard-rule-strong); }
.lg-bref-liste li {
  display: flex; gap: 16px; align-items: flex-start; padding: 14px 0;
  border-bottom: 1px solid var(--ard-rule);
  font-size: 16.5px; line-height: 1.55; color: var(--ard-ink);
}
.lg-bref-liste svg { width: 22px; height: 22px; flex: none; margin-top: 2px; color: var(--ard-gold-text); }
.lg-bref-liste strong { font-weight: 600; }
.lg-bref-foi {
  margin: 16px 0 0;
  font-family: var(--ard-serif); font-style: italic; font-size: 14.5px; line-height: 1.5; color: var(--ard-ink-2);
}

/* ── Corps : sommaire + texte ─────────────────────────────────────── */
.lg-corps {
  max-width: 1140px; margin: 0 auto; padding: 48px 32px 0;
  display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 64px; align-items: start;
}

/* Sommaire, bureau : colonne collante. Trop long pour un écran bas (16 entrées), il
   défile dans sa colonne ; pages_legales.js garde l'entrée courante en vue. */
.lg-som {
  position: sticky; top: var(--lg-colle);
  max-height: calc(100vh - var(--nav-h-sticky) - 48px); overflow-y: auto; overscroll-behavior: contain;
}
/* Le summary sert d'intitulé en bureau (details ouvert par le script, non repliable)
   et de bouton en mobile. Sans script, il reste un bouton aux deux largeurs. */
.lg-som-k {
  display: block; margin: 0 0 12px; list-style: none; cursor: default;
  font-size: 11px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--ard-gold-text);
}
.lg-som-k::-webkit-details-marker { display: none; }
.lg-som-d:not([open]) > .lg-som-k { cursor: pointer; }
.lg-som-ici, .lg-som-chev { display: none; }
.lg-som-partie {
  margin: 18px 0 8px; padding-left: 12px;
  font-family: var(--ard-serif); font-style: italic; font-size: 14px; line-height: 1.3; color: var(--ard-ink);
}
.lg-som-partie b { font-weight: 400; color: var(--ard-gold-text); }
.lg-som ol { border-top: 1px solid var(--ard-rule-strong); }
.lg-som li { border-bottom: 1px solid var(--ard-rule); }
.lg-som a {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 35px; padding: 6px 0 6px 12px;
  font-size: 14px; line-height: 1.3; color: var(--ard-ink-2); text-decoration: none;
  transition: color var(--ard-tr);
}
.lg-som a:hover { color: var(--ard-ink); }
.lg-som a[aria-current="location"] { color: var(--ard-ink); font-weight: 500; }
.lg-som a[aria-current="location"]::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; background: var(--ard-gold-text); }
.lg-som-n { flex: none; min-width: 20px; font-family: var(--ard-serif); font-size: 14px; font-variant-numeric: tabular-nums; color: var(--ard-gold-text); }
.lg-som :is(a, summary):focus-visible { outline: 2px solid var(--ard-gold-text); outline-offset: -2px; }
/* Au doigt, la cible reprend ses 44 px. */
@media (pointer: coarse) { .lg-som a { min-height: 44px; } }

/* ── Parties (conditions) ─────────────────────────────────────────── */
.lg-texte { min-width: 0; max-width: 772px; }
.lg-partie + .lg-partie { margin-top: 64px; }
.lg-partie-tete { padding-bottom: 32px; }
.lg-partie + .lg-partie > .lg-partie-tete::before {
  content: ""; display: block; height: 5px; margin-bottom: 36px;
  border-top: 1px solid var(--lg-filet); border-bottom: 1px solid var(--lg-filet);
}
.lg-partie-k { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 2.4px; text-transform: uppercase; line-height: 1; color: var(--ard-gold-text); }
.lg-partie-t {
  margin: 14px 0 0;
  font-family: var(--ard-serif); font-weight: 500; font-variation-settings: 'SOFT' 34, 'WONK' 1;
  font-size: 40px; line-height: 1.08; letter-spacing: -.02em; color: var(--ard-ink);
}
.lg-partie-d { max-width: 560px; margin: 12px 0 0; font-size: 16px; line-height: 1.6; color: var(--ard-ink-2); }

/* ── Articles ─────────────────────────────────────────────────────── */
.lg-art { padding: 36px 0; border-top: 1px solid var(--ard-rule); scroll-margin-top: var(--lg-colle); }
.lg-texte > .lg-art:first-child { padding-top: 0; border-top: 0; }
.lg-art-t {
  display: flex; align-items: baseline; gap: 16px; margin: 0 0 16px;
  font-family: var(--ard-serif); font-weight: 500; font-variation-settings: 'SOFT' 34, 'WONK' 1;
  font-size: 30px; line-height: 1.15; letter-spacing: -.015em; color: var(--ard-ink);
}
.lg-art-n { flex: none; font-size: 18px; letter-spacing: 0; font-variant-numeric: tabular-nums; color: var(--ard-gold-text); }
.lg-st {
  margin: 26px 0 10px;
  font-family: var(--ard-serif); font-weight: 500; font-size: 20px; line-height: 1.3; color: var(--ard-ink);
}
.lg-art p { margin: 0 0 14px; font-size: 16px; line-height: 1.7; color: var(--ard-ink-2); }
.lg-art p:last-child { margin-bottom: 0; }
.lg-art strong { font-weight: 500; color: var(--ard-ink); }

.lg-nom {
  font-family: var(--lg-mono); font-size: .86em; font-weight: 400;
  padding: 2px 6px; border: 1px solid var(--ard-rule); border-radius: 2px;
  background: var(--ard-bg-3); color: var(--ard-ink);
  white-space: nowrap;
}
.lg-lien {
  color: var(--ard-ink); font-weight: 500;
  text-decoration: underline; text-decoration-color: var(--ard-gold-text);
  text-decoration-thickness: 1px; text-underline-offset: 4px;
  transition: color var(--ard-tr);
}
.lg-lien:hover { color: var(--ard-gold-text); }
.lg-lien:focus-visible { outline: 2px solid var(--ard-gold-text); outline-offset: 3px; }

/* Les listes du texte : un court filet d'or pour puce. */
.lg-liste { display: grid; gap: 8px; margin: 4px 0 16px; }
.lg-liste:last-child { margin-bottom: 0; }
.lg-liste li { position: relative; padding-left: 24px; font-size: 16px; line-height: 1.65; color: var(--ard-ink-2); }
.lg-liste li::before { content: ""; position: absolute; left: 0; top: .82em; width: 12px; height: 1px; background: var(--ard-gold-text); }

/* La note : filet d'or à gauche, pas de carte. */
.lg-art .lg-note {
  margin-top: 22px; padding: 4px 0 4px 20px;
  border-left: 2px solid var(--ard-gold-text);
}
.lg-art .lg-note--alerte { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; background: var(--ard-bg-2); color: var(--ard-ink); }
.lg-note--alerte svg { width: 20px; height: 20px; flex: none; margin-top: 3px; color: var(--ard-gold-text); }
.lg-art .lg-note + :is(p, ul, table, dl, h3, h4) { margin-top: 22px; }

/* ── Bloc éditeur et hébergeur ─────────────────────────────────────
   Dans les conditions il porte id="editeur" : le lien « Mentions légales » du pied y mène. */
.lg-ed { margin: 18px 0; scroll-margin-top: calc(var(--lg-colle) + 16px); }
.lg-ed:last-child { margin-bottom: 0; }
.lg-ed > div { display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-top: 1px solid var(--ard-rule); }
.lg-ed > div:first-child { border-top-color: var(--ard-rule-strong); }
.lg-ed > div:last-child { border-bottom: 1px solid var(--ard-rule); }
.lg-ed dt { font-family: var(--ard-serif); font-weight: 500; font-size: 18px; line-height: 1.35; color: var(--ard-ink); }
.lg-ed dd { font-size: 15.5px; line-height: 1.65; color: var(--ard-ink-2); }
.lg-ed dd span { display: block; }
.lg-ed dd span:first-child { font-weight: 500; color: var(--ard-ink); }
.lg-ed:target { outline: 1px solid var(--hn-gold-38); outline-offset: 12px; background: var(--hn-gold-08); }

/* ── Tableaux ─────────────────────────────────────────────────────── */
.lg-tab { width: 100%; margin: 8px 0 0; border-collapse: collapse; font-size: 15px; }
.lg-tab thead th {
  padding: 0 16px 12px 0; text-align: left; border-bottom: 1px solid var(--ard-rule-strong);
  font-size: 11px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; color: var(--ard-gold-text);
  white-space: nowrap;
}
.lg-tab tbody :is(th, td) {
  padding: 16px 16px 16px 0; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--ard-rule); line-height: 1.55; color: var(--ard-ink-2);
}
.lg-tab tbody th { font-weight: 500; color: var(--ard-ink); }
.lg-tab :is(th, td):last-child { padding-right: 0; }
/* Largeurs posées sur l'en-tête : masqué en mobile, il ne gêne pas les fiches. */
.lg-tab--2 thead th:first-child { width: 46%; }
.lg-tab--3 thead th:first-child { width: 168px; }
.lg-tab--3 thead th:last-child { width: 196px; }
.lg-tab + p { margin-top: 18px; }

/* ── Formulaire type de rétractation ──────────────────────────────── */
.lg-form {
  margin: 22px 6px 6px; padding: 26px 28px;
  border: 1px solid var(--ard-rule-strong); outline: 1px solid var(--hn-gold-38); outline-offset: 5px;
  background: var(--ard-bg-2);
}
.lg-art .lg-form p { margin: 0 0 12px; font-size: 15.5px; line-height: 1.65; color: var(--ard-ink); }
.lg-art .lg-form p:last-child { margin-bottom: 0; }
.lg-art .lg-form .lg-form-k {
  margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--ard-rule);
  font-size: 11px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; line-height: 1.3; color: var(--ard-gold-text);
}
.lg-form-champ { font-style: italic; color: var(--ard-ink-2); border-bottom: 1px dotted var(--ard-rule-strong); }

.lg-fin {
  display: flex; justify-content: center; gap: 12px; margin: 8px 0 0; padding: 18px 0 0;
  border-top: 1px solid var(--ard-rule-strong);
  font-family: var(--ard-serif); font-style: italic; font-size: 14px; color: var(--ard-ink-3);
}
.lg-partie + .lg-fin { margin-top: 36px; }

/* ── Tablette et mobile : une colonne, le sommaire devient une barre repliable ─── */
@media (max-width: 860px) {
  /* La barre du sommaire (49 px) s'ajoute à ce qui reste collé en haut. */
  .lg { padding: 32px 0 64px; --lg-colle: calc(var(--nav-h-sticky) + 49px + 16px); }
  .lg-tete { padding: 0 20px; }
  .lg-h1 { font-size: 44px; }
  .lg-lead { font-size: 16px; }
  .lg-filets { margin: 28px 20px 0; }

  .lg-bref { margin-top: 28px; padding: 0; }
  .lg-bref-in { grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 0; padding: 24px 20px; }
  .lg-bref-t { font-size: 25px; }
  .lg-bref-d { margin-top: 4px; }
  .lg-bref-liste li { font-size: 15.5px; gap: 14px; }

  /* display:block et non grid : un élément collant de grille ne dépasse pas sa rangée. */
  .lg-corps { display: block; padding: 0; }
  .lg-som {
    top: var(--nav-h-sticky); z-index: 20; max-height: none; overflow: visible;
    background: var(--ard-bg); border-block: 1px solid var(--ard-rule-strong);
  }
  .lg-som-k { display: flex; align-items: center; gap: 12px; min-height: 48px; margin: 0; padding: 0 20px; cursor: pointer; }
  .lg-som-ici {
    display: block; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: 14px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ard-ink);
  }
  .lg-som-ici:empty { visibility: hidden; }
  .lg-som-chev { display: block; width: 18px; height: 18px; flex: none; margin-left: auto; transition: transform var(--ard-tr); }
  .lg-som-d[open] .lg-som-chev { transform: rotate(180deg); }
  /* Le panneau passe par-dessus le texte : ouvrir le sommaire ne déplace pas la lecture. */
  .lg-som-liste {
    position: absolute; left: 0; right: 0; top: 100%;
    max-height: calc(100vh - var(--nav-h-sticky) - 49px - 32px);
    max-height: calc(100dvh - var(--nav-h-sticky) - 49px - 32px);
    overflow-y: auto; overscroll-behavior: contain; padding: 0 20px 16px;
    background: var(--ard-bg-2); border-bottom: 1px solid var(--ard-rule-strong); box-shadow: var(--ard-shadow);
  }
  .lg-som-liste > ol:first-child { border-top: 0; }
  .lg-som-partie { margin: 16px 0 8px; padding-left: 0; }
  .lg-som a { min-height: 44px; padding-left: 12px; }
  .lg-som a[aria-current="location"]::before { top: 10px; bottom: 10px; }

  .lg-texte { max-width: none; padding: 32px 20px 0; }
  .lg-partie + .lg-partie { margin-top: 48px; }
  .lg-partie-t { font-size: 31px; }
  .lg-art-t { font-size: 25px; gap: 12px; }
  .lg-art-n { font-size: 16px; }
  .lg-art p, .lg-liste li { font-size: 15.5px; }
  .lg-form { padding: 22px 20px; }
}

/* Sous 640 : chaque ligne de tableau devient une fiche, plus rien à faire défiler. */
@media (max-width: 640px) {
  .lg-tab, .lg-tab tbody, .lg-tab tr, .lg-tab tbody :is(th, td) { display: block; }
  .lg-tab thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .lg-tab tbody { border-top: 1px solid var(--ard-rule-strong); }
  .lg-tab tr { padding: 16px 0; border-bottom: 1px solid var(--ard-rule); }
  .lg-tab tbody :is(th, td) { padding: 0; border: 0; }
  .lg-tab tbody th { margin-bottom: 10px; font-size: 16px; }
  /* Deux colonnes : l'intitulé (repris de l'en-tête masqué) et la valeur, dans un seul <span>. */
  .lg-tab tbody td { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 4px 0; }
  .lg-tab tbody td::before {
    /* Texte de remplacement vide : le lecteur d'écran a déjà l'en-tête, il ne le lit pas deux fois.
       La première déclaration sert de repli aux navigateurs qui ignorent la syntaxe « / "" ». */
    content: attr(data-l);
    content: attr(data-l) / "";
    padding-top: 4px;
    font-size: 11px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; line-height: 1.2;
    color: var(--ard-gold-text);
  }
  .lg-ed > div { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  /* « confidentialité » : 15 lettres d'un seul tenant, la taille suit la largeur. */
  .lg-h1 { font-size: clamp(32px, 10.4vw, 40px); }
  .lg-fin { flex-wrap: wrap; row-gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  .lg-som a, .lg-lien, .lg-som-chev { transition: none; }
}
