/* Pages réglementaires (mentions légales, politique de confidentialité) : mêmes couleurs et typographies que le site. */
:root {
  color-scheme: light;
  --ink: #10251d;
  --paper: #f0eee5;
  --paper-bright: #f7f5ee;
  --acid: #c9ab7f;
  --muted: #6f6d62;
  --rule-light: rgba(16, 37, 29, .14);
  --rule-dark: rgba(240, 238, 229, .23);
  --sans: "DM Sans", "Helvetica Neue", sans-serif;
  --serif: "Cormorant Garamond", Georgia, serif;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
::selection { color: var(--ink); background: var(--acid); }

/* En-tête vert : logo et retour au site. */
.legal-header { background: linear-gradient(to bottom, rgba(22,37,28,.35), #16251c), #13281e url("images/fond-vert.jpg") left center / cover no-repeat; color: var(--paper); }
.legal-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; max-width: 1180px; margin: 0 auto; padding: 26px 6vw; }
.legal-bar img { display: block; width: 74px; height: auto; }
.legal-back { font-size: 12px; font-weight: 500; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; color: var(--paper); opacity: .8; transition: opacity .25s ease; }
.legal-back:hover, .legal-back:focus-visible { opacity: 1; }
.legal-back span { color: var(--acid); }
.legal-hero { max-width: 1180px; margin: 0 auto; padding: 56px 6vw 64px; }
.legal-hero .eyebrow { margin: 0 0 14px; color: var(--acid); font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.legal-hero h1 { margin: 0; font-family: var(--serif); font-size: clamp(40px, 5.4vw, 72px); font-weight: 400; line-height: 1.02; }
.legal-hero h1 em { color: var(--acid); }
.legal-hero p:last-child { margin: 20px 0 0; color: rgba(240,238,229,.65); font-size: 13px; }

/* Contenu : une colonne lisible, sommaire à gauche sur grand écran. */
.legal-main { display: grid; grid-template-columns: 220px minmax(0, 720px); justify-content: center; gap: 70px; max-width: 1180px; margin: 0 auto; padding: 72px 6vw 96px; }
.legal-toc { position: sticky; top: 32px; align-self: start; font-size: 12.5px; line-height: 1.5; }
.legal-toc p { margin: 0 0 14px; color: var(--muted); font-size: 10.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.legal-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.legal-toc li { counter-increment: toc; margin: 0 0 10px; }
.legal-toc a { display: flex; gap: 10px; text-decoration: none; color: var(--ink); opacity: .7; transition: opacity .2s ease; }
.legal-toc a::before { content: counter(toc, decimal-leading-zero); color: var(--acid); font-weight: 600; }
.legal-toc a:hover, .legal-toc a:focus-visible { opacity: 1; }

.legal-content section { padding: 0 0 38px; margin: 0 0 38px; border-bottom: 1px solid var(--rule-light); scroll-margin-top: 28px; }
.legal-content section:last-child { border-bottom: 0; margin-bottom: 0; }
.legal-content h2 { margin: 0 0 18px; font-family: var(--serif); font-size: clamp(27px, 2.6vw, 34px); font-weight: 500; line-height: 1.15; }
.legal-content h3 { margin: 26px 0 8px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.legal-content p, .legal-content li { margin: 0 0 12px; }
.legal-content ul { margin: 0 0 14px; padding-left: 20px; }
.legal-content li::marker { color: var(--acid); }
.legal-content a { text-decoration-color: var(--acid); text-underline-offset: 3px; }
.legal-content strong { font-weight: 600; }
.legal-content .lead { font-size: 16.5px; }

/* Fiche d'identification (libellé / valeur). */
.legal-facts { margin: 0; display: grid; grid-template-columns: 210px 1fr; border-top: 1px solid var(--rule-light); }
.legal-facts dt, .legal-facts dd { margin: 0; padding: 11px 0; border-bottom: 1px solid var(--rule-light); }
.legal-facts dt { padding-right: 18px; color: var(--muted); font-size: 13px; }

/* Tableau des traitements. */
.legal-table { width: 100%; margin: 6px 0 16px; border-collapse: collapse; font-size: 13.5px; line-height: 1.55; }
.legal-table th, .legal-table td { padding: 12px 14px 12px 0; border-bottom: 1px solid var(--rule-light); text-align: left; vertical-align: top; }
.legal-table th { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.legal-table td:first-child { font-weight: 600; }

/* Encadré (information candidats). */
.legal-callout { margin: 8px 0 18px; padding: 26px 28px 14px; background: var(--paper-bright); border-left: 2px solid var(--acid); }
.legal-callout h3 { margin-top: 0; }

/* Champ à compléter : bien visible tant que l'information manque. */
.todo { padding: 1px 6px; border-radius: 3px; background: rgba(201,171,127,.28); color: #6b4f22; font-style: normal; font-size: .93em; white-space: normal; }

.legal-hero .todo { background: rgba(201,171,127,.18); color: var(--acid); }
.legal-footer { background: var(--ink); color: #a7aaa2; font-size: 11px; }
.legal-footer div { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; max-width: 1180px; margin: 0 auto; padding: 22px 6vw; }
.legal-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.legal-footer a { text-decoration: none; transition: color .2s ease; }
.legal-footer a:hover, .legal-footer a:focus-visible, .legal-footer a[aria-current="page"] { color: var(--paper); }
.legal-footer .footer-mark { color: white; font-family: var(--serif); font-size: 12px; font-weight: 600; letter-spacing: .13em; }
.legal-footer .footer-mark span { color: var(--acid); }

@media (max-width: 900px) {
  .legal-main { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 48px; }
  .legal-toc { position: static; padding: 0 0 26px; border-bottom: 1px solid var(--rule-light); }
}
@media (max-width: 650px) {
  body { font-size: 14.5px; }
  .legal-bar { padding: 20px 16px; }
  .legal-bar img { width: 58px; }
  .legal-hero { padding: 34px 16px 44px; }
  .legal-main { padding: 36px 16px 64px; }
  .legal-facts { grid-template-columns: 1fr; }
  .legal-facts dt { padding: 12px 0 0; border-bottom: 0; }
  .legal-facts dd { padding: 2px 0 12px; }
  .legal-table thead { display: none; }
  .legal-table, .legal-table tbody, .legal-table tr, .legal-table td { display: block; width: 100%; }
  .legal-table tr { padding: 10px 0; border-bottom: 1px solid var(--rule-light); }
  .legal-table td { padding: 3px 0; border: 0; }
  .legal-table td[data-label]::before { content: attr(data-label) " : "; color: var(--muted); font-weight: 400; }
  .legal-callout { padding: 20px 18px 8px; }
  .legal-footer div { padding: 20px 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Lien « Aller au contenu » : visible seulement lorsqu'il reçoit le focus clavier. */
.skip-link { position: absolute; z-index: 10; top: 12px; left: 12px; padding: 12px 18px; color: var(--ink); background: var(--acid); font-size: 15px; font-weight: 600; text-decoration: none; transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.legal-content:focus { outline: none; }
.legal-mail { font-family: var(--serif); font-size: clamp(24px, 2.4vw, 30px); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Mode accessible activé sur le site : mêmes réglages sur ces pages (textes agrandis, contour de focus, aucune transition). */
html.a11y *, html.a11y *::before, html.a11y *::after { transition: none !important; scroll-behavior: auto !important; }
html.a11y :focus-visible { outline: 3px solid var(--acid); outline-offset: 3px; }
html.a11y :is(.legal-toc, .legal-toc p, .legal-hero .eyebrow, .legal-hero p:last-child, .legal-back, .legal-facts dt, .legal-table, .legal-table th, .legal-footer, .legal-footer .footer-mark) { font-size: 15px; }
html.a11y .legal-hero p:last-child { color: rgba(240,238,229,.85); }
html.a11y .legal-toc a { opacity: 1; }
html.a11y .legal-content :is(p, li, dd) { font-size: 16px; }
html.a11y .legal-content h3 { font-size: 15px; }
html.a11y .todo { font-size: 1em; }

/* Page 404 : en-tête vert sur toute la hauteur de l'écran, pied de page en bas. */
.error-page { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; background: var(--ink); }
.error-page .legal-header { flex: 1; display: flex; flex-direction: column; }
.error-page .legal-bar { width: 100%; }
.error-hero { flex: 1; display: flex; flex-direction: column; justify-content: center; width: 100%; padding-top: 40px; padding-bottom: 96px; }
.error-hero:focus { outline: none; }
.legal-hero .error-text { margin: 22px 0 0; max-width: 34em; color: rgba(240,238,229,.75); font-size: 16px; }
.error-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.error-btn { display: inline-block; padding: 14px 26px; border: 1px solid var(--rule-dark); border-radius: 999px; color: var(--paper); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-decoration: none; text-transform: uppercase; transition: background-color .25s ease, color .25s ease, border-color .25s ease; }
.error-btn:hover, .error-btn:focus-visible { border-color: var(--paper); }
.error-btn-main { background: var(--acid); border-color: var(--acid); color: var(--ink); }
.error-btn-main:hover, .error-btn-main:focus-visible { background: var(--paper); border-color: var(--paper); }
@media (max-width: 650px) { .error-hero { padding-bottom: 64px; } .error-btn { flex: 1 1 auto; text-align: center; } }
.legal-hero .error-suggest { margin: 14px 0 0; color: var(--paper); font-size: 16px; }
.error-suggest a { color: var(--acid); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.error-suggest a:hover, .error-suggest a:focus-visible { color: var(--paper); }
html.a11y .legal-hero .error-text, html.a11y .error-btn { font-size: 16px; }
/* Symboles (©, ↗, ✓, ✳…) toujours affichés en version texte, jamais en émoji (iPhone, Android). */
html { font-variant-emoji: text; }
