/* Page « Terms of Use & Privacy » de la beta DaTarget-AMR (core/templates/app/pages/terms.html).
   Memes couleurs et polices que la fenetre beta (beta.css) et les e-mails : bleu #3368C6, marine #0E2A5C.
   Maquette validee le 2026-11-16 : sommaire numerote a gauche (fixe pendant la lecture), document en carte,
   colonne de lecture (~68 caracteres), « Your sequences » en encadre, durees de conservation en tableau.
   Maquette v7 (2026-11-19) : trois parties (I. mentions legales, II. CGU, III. confidentialite), chacune avec
   un bandeau-titre (badge I/II/III, sans numero devant le titre). Les articles (h3) sont numerotes de 1 a 15
   sans reprendre a chaque partie, dans le document comme dans le sommaire. */
.terms-page {
  --t-bg: #F3F6FB; --t-surface: #FFFFFF; --t-tint: #EDF3FD; --t-soft: #F7F9FD;
  --t-ink: #0E2A5C; --t-text: #34425E; --t-muted: #5E6B84;
  --t-blue: #3368C6; --t-blue-dark: #1F4C9E; --t-line: #E2E8F2; --t-line-strong: #C8D6EE;
  --t-head: 'Poppins', 'Segoe UI', Arial, sans-serif;
  margin: 0; background: var(--t-bg); color: var(--t-text);
  font-family: 'Nunito Sans', 'Segoe UI', Arial, sans-serif; font-size: 16px; line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
.terms-page *, .terms-page *::before, .terms-page *::after { box-sizing: border-box; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* Largeur commune : barre, bandeau, corps, pied de page */
.tin { max-width: 1140px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* Barre du haut : logo, retour a l'accueil, selecteur EN/FR */
.tbar { border-bottom: 1px solid var(--t-line); background: var(--t-surface); }
.tbar__in { padding-block: 14px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; }
.tbar__logo { font-family: var(--t-head); font-weight: 700; font-size: 22px; letter-spacing: -.01em; color: var(--t-ink); text-decoration: none; }
.tbar__logo span { color: var(--t-blue); }
.tbar__right { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.tbar__back { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 14.5px; color: var(--t-muted); text-decoration: none; }
.tbar__back:hover { color: var(--t-blue); }
.tbar__back:focus-visible, .tbar__logo:focus-visible { outline: 2px solid var(--t-blue); outline-offset: 3px; border-radius: 4px; }

/* Bandeau : titre, introduction, date et editeur */
.thero { background: var(--t-tint); border-bottom: 1px solid var(--t-line); }
.thero .tin { padding-block: 44px 38px; }
.thero__body { max-width: 760px; display: flex; flex-direction: column; gap: 14px; }
.teyebrow { margin: 0; font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--t-blue); }
.thero h1 { margin: 0; font-family: var(--t-head); font-weight: 700; font-size: clamp(28px, 4.6vw, 40px); line-height: 1.15; letter-spacing: -.015em; color: var(--t-ink); text-wrap: balance; }
.tlead { margin: 0; font-size: 17.5px; line-height: 1.65; max-width: 68ch; }
.tmeta { margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; color: var(--t-muted); }
.tmeta b { color: var(--t-ink); font-weight: 700; }

/* Corps : sommaire + document */
.tlayout { padding-block: 36px 56px; display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 44px; align-items: start; }

/* Sommaire : titres de partie (non cliquables) puis articles numerotes 1 a 15 */
.ttoc { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow: auto; }
.ttoc summary { list-style: none; font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--t-muted); padding: 0 10px 10px; }
.ttoc summary::-webkit-details-marker { display: none; }
.ttoc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; counter-reset: toc; }
.ttoc__part { display: flex; gap: 8px; align-items: baseline; padding: 16px 10px 6px; font-family: var(--t-head); font-weight: 600; font-size: 13px; line-height: 1.35; color: var(--t-ink); }
.ttoc__part:first-child { padding-top: 2px; }
.ttoc__part span { min-width: 1.7em; font-family: 'Nunito Sans', 'Segoe UI', Arial, sans-serif; font-weight: 700; font-size: 12px; color: var(--t-blue); }
.ttoc a { counter-increment: toc; display: grid; grid-template-columns: 1.7em minmax(0, 1fr); gap: 4px; padding: 5px 10px; border-radius: 8px; font-size: 14px; line-height: 1.4; color: var(--t-muted); text-decoration: none; }
.ttoc a::before { content: counter(toc) "."; color: var(--t-blue); font-weight: 700; font-variant-numeric: tabular-nums; }
.ttoc a:hover { color: var(--t-ink); background: var(--t-surface); }
.ttoc a.is-active { color: var(--t-ink); background: var(--t-surface); font-weight: 700; box-shadow: inset 0 0 0 1px var(--t-line); }
.ttoc a:focus-visible, .ttoc summary:focus-visible { outline: 2px solid var(--t-blue); outline-offset: 2px; }

.tdoc { counter-reset: sec; background: var(--t-surface); border: 1px solid var(--t-line); border-radius: 14px; padding: 36px 52px 42px; max-width: 800px; min-width: 0; }

/* Les trois parties : bandeau-titre avec badge I / II / III, sans numero devant le titre */
.tpart + .tpart { margin-top: 30px; }
.tpart { scroll-margin-top: 24px; }
.tpart__head { display: flex; align-items: center; gap: 14px; margin: 0 0 6px; padding: 14px 18px; border-radius: 10px; background: var(--t-tint); border: 1px solid var(--t-line-strong); }
.tpart__num { flex: 0 0 auto; display: grid; place-items: center; min-width: 36px; height: 36px; padding: 0 8px; border-radius: 8px; background: var(--t-blue); color: #fff; font-family: var(--t-head); font-weight: 700; font-size: 15px; letter-spacing: .02em; }
.tdoc .tpart__title { margin: 0; font-family: var(--t-head); font-weight: 600; font-size: 21px; line-height: 1.3; color: var(--t-ink); text-wrap: balance; }

/* Articles : numerotes 1 a 15, sans reprendre a chaque partie */
.tdoc section { counter-increment: sec; padding-block: 24px; border-top: 1px solid var(--t-line); scroll-margin-top: 24px; }
.tpart__head + section { border-top: 0; padding-top: 18px; }
.tpart section:last-child { padding-bottom: 0; }
.tdoc section h3 { margin: 0 0 10px; display: flex; gap: 12px; align-items: baseline; font-family: var(--t-head); font-weight: 600; font-size: 19px; line-height: 1.35; color: var(--t-ink); text-wrap: balance; }
.tdoc section h3::before { content: counter(sec) "."; flex: 0 0 1.6em; font-family: 'Nunito Sans', 'Segoe UI', Arial, sans-serif; font-weight: 700; font-size: 15px; color: var(--t-blue); font-variant-numeric: tabular-nums; }
.tdoc p, .tdoc ul { margin: 0; max-width: 68ch; }
.tdoc section > * + * { margin-top: 12px; }
.tdoc section > h3 + * { margin-top: 0; }
.tdoc ul { padding-left: 1.25em; display: flex; flex-direction: column; gap: 8px; }
.tdoc li::marker { color: var(--t-blue); }
.tdoc strong { color: var(--t-ink); }
.tdoc a { color: var(--t-blue-dark); font-weight: 700; }
.tdoc a:hover { color: var(--t-blue); }
.tdoc a:focus-visible { outline: 2px solid var(--t-blue); outline-offset: 2px; border-radius: 3px; }

/* « Your sequences » : l'article mis en avant */
.tdoc section.tkey { border: 1px solid var(--t-line-strong); border-radius: 12px; background: var(--t-tint); padding: 24px 28px; margin-block: 12px 6px; }
.tpart__head + section.tkey { margin-top: 14px; }
.tdoc section.tkey + section { border-top: 0; }

/* « Who we are » : adresse, e-mail, telephone */
.tcontact { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 14px 20px; padding: 16px 18px; border: 1px solid var(--t-line); border-radius: 10px; background: var(--t-soft); }
.tcontact div { min-width: 0; }
.tcontact dt { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--t-muted); }
.tcontact dd { margin: 2px 0 0; color: var(--t-ink); font-weight: 600; overflow-wrap: anywhere; }

/* « How long we keep your information » : type de donnee | duree */
.tledger { margin: 0; display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); border: 1px solid var(--t-line); border-radius: 10px; overflow: hidden; }
.tledger dt, .tledger dd { margin: 0; padding: 14px 18px; border-top: 1px solid var(--t-line); }
.tledger dt:first-of-type, .tledger dd:first-of-type { border-top: 0; }
.tledger dt { background: var(--t-soft); color: var(--t-ink); font-weight: 700; line-height: 1.5; }
.tledger dd { line-height: 1.6; }
.tledger dd p { margin: 0; }
.tledger dd p + p { margin-top: 6px; }

.tfoot { border-top: 1px solid var(--t-line); background: var(--t-surface); }
.tfoot__in { padding-block: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px; font-size: 13.5px; color: var(--t-muted); }

/* Tablette et telephone : le sommaire passe au-dessus du document, repliable (js/terms.js) */
@media (max-width: 920px) {
  .tlayout { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-block: 24px 40px; }
  .ttoc { position: static; max-height: none; background: var(--t-surface); border: 1px solid var(--t-line); border-radius: 12px; padding: 12px 8px; }
  .ttoc summary { padding: 4px 10px; cursor: pointer; display: flex; justify-content: space-between; }
  .ttoc summary::after { content: "+"; font-size: 16px; letter-spacing: 0; }
  .ttoc[open] summary::after { content: "\2013"; }
  .ttoc[open] summary { padding-bottom: 10px; }
  .tdoc { padding: 26px 22px 30px; }
}
/* Grand ecran : le sommaire reste ouvert */
@media (min-width: 921px) { .ttoc summary { pointer-events: none; } }

@media (max-width: 600px) {
  .tin { padding-left: 16px; padding-right: 16px; }
  .thero .tin { padding-block: 30px 26px; }
  .tdoc { padding: 20px 16px 26px; border-radius: 12px; }
  .tpart__head { padding: 12px 14px; gap: 12px; }
  .tdoc .tpart__title { font-size: 18px; }
  .tdoc section.tkey { padding: 20px 18px; }
  .tledger { grid-template-columns: minmax(0, 1fr); }
  .tledger dd { border-top: 0; padding-top: 0; }
  .tledger dt { background: none; padding-bottom: 4px; }
  .tledger dt:not(:first-of-type) { border-top: 1px solid var(--t-line); }
  .lang-switch__btn { padding: 7px 12px; }
}
