/* MAINTELIER — documents institutionnels, composant visuel commun. */
:root{color-scheme:dark}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body.legal-page{margin:0;min-width:0;background:radial-gradient(ellipse 80% 400px at 75% 0,#17344155,transparent),#09151d;color:#eaf2f6;font:16px/1.75 system-ui,-apple-system,"Segoe UI",sans-serif}
.legal-page a{color:#ffb782;text-underline-offset:3px}
.legal-page a:hover{color:#ffd5b5}
.legal-page a:focus-visible{outline:3px solid #ffb782;outline-offset:4px;border-radius:3px}
.legal-skip{position:absolute;z-index:20;top:10px;left:12px;transform:translateY(-170%);background:#ffad75;color:#18130e!important;padding:10px 15px;border-radius:9px;font-weight:750;text-decoration:none}
.legal-skip:focus{transform:none}
.legal-header{background:#0d1b24e8;border-bottom:1px solid #304653}
.legal-header-inner{width:min(1140px,calc(100% - 44px));min-height:76px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:20px}
.legal-brand{display:inline-flex;align-items:center;min-height:44px;gap:12px;color:#fff!important;text-decoration:none;font-weight:850;letter-spacing:.075em;font-size:15px}
.legal-brand-mark{display:grid;place-items:center;width:37px;height:37px;border-radius:10px;background:#182e3b;border:1px solid #537487;font-size:19px;font-weight:900;letter-spacing:-.08em}
.legal-brand-mark span{color:#ff9e61}
.legal-header-cta{display:inline-flex;align-items:center;min-height:44px;gap:10px;border:1px solid #4b6a79;border-radius:10px;padding:9px 14px;color:#e4f2f9!important;text-decoration:none;font-size:14px;font-weight:750}
.legal-header-cta:hover{background:#1d3645}
.legal-page main{width:min(1140px,calc(100% - 44px));margin:auto;padding:clamp(45px,6vw,76px) 0 95px}
.legal-hero{border-bottom:1px solid #2b414f;padding:0 0 35px}
.legal-eyebrow{display:inline-flex;align-items:center;gap:9px;color:#ffb581;font-size:12px;letter-spacing:.15em;font-weight:850}
.legal-eyebrow:before{content:"";width:7px;height:7px;border-radius:50%;background:#ff9e61}
.legal-hero h1{max-width:850px;font-size:clamp(36px,5.4vw,65px);letter-spacing:-.045em;line-height:1.11;margin:17px 0 16px;color:#fff;font-weight:800}
.legal-date{display:inline-block;border:1px solid #385363;background:#142733;border-radius:99px;color:#bdd1dc;font-size:14px;padding:5px 13px;margin:0}
.legal-layout{display:grid;grid-template-columns:240px minmax(0,1fr);align-items:start;gap:clamp(36px,6vw,84px);padding-top:43px}
.legal-toc{position:sticky;top:24px;padding:18px;background:#10232e;border:1px solid #2f4858;border-radius:15px;box-shadow:0 12px 30px #03080c24}
.legal-toc-title{display:block;color:#9eb6c5;font-size:12px;font-weight:850;letter-spacing:.12em;text-transform:uppercase;margin:2px 9px 12px}
.legal-toc-links{display:grid;gap:3px}
.legal-toc a{display:flex;align-items:center;min-height:44px;padding:10px 12px;border-radius:8px;color:#d1e1e9;text-decoration:none;font-size:15px;font-weight:650;line-height:1.5}
.legal-toc a:hover{color:#fff;background:#223c4b}
.legal-content{max-width:75ch;min-width:0}
.legal-content h2{font-size:clamp(20px,2.4vw,25px);font-weight:780;line-height:1.32;letter-spacing:-.025em;color:#f5faff;margin:32px 0 13px;padding-top:30px;border-top:1px solid #2a3e4a;scroll-margin-top:24px}
.legal-content h2:first-child{margin-top:0;padding-top:0;border-top:0}
.legal-content h2:before{content:"";display:inline-block;width:5px;height:19px;margin-right:12px;background:#ff9d60;border-radius:3px;vertical-align:-2px}
/* Repere de lecture apres un saut depuis le sommaire, sans animation ni decalage. */
.legal-content h2:target{color:#ffdbbf;background:linear-gradient(90deg,#ffad751a,transparent 65%);border-radius:8px}
.legal-content h2:target:before{background:#ffd4b1;box-shadow:0 0 0 4px #ff9d6026}
.legal-content p{margin:0 0 17px;color:#c5d5df;font-size:16px;line-height:1.8;overflow-wrap:anywhere}
.legal-content a{font-weight:680}
/* Liens utiles dans les textes juridiques : cibles tactiles >= 44 px, sans espacement artificiel. */
.legal-content p a{padding:13px 0;box-decoration-break:clone;-webkit-box-decoration-break:clone}
.legal-footer{border-top:1px solid #30434e;background:#0d1c25}
.legal-footer-inner{width:min(1140px,calc(100% - 44px));margin:auto;padding:26px 0 31px;display:flex;align-items:center;justify-content:space-between;gap:22px}
.legal-footer-brand{font-size:14px;color:#8fa9b8;font-weight:700;letter-spacing:.02em}
.legal-footer-links{display:flex;flex-wrap:wrap;gap:12px 22px}
.legal-footer-links a{display:inline-flex;align-items:center;min-height:44px;padding:8px 3px;font-size:14px;color:#d5e3eb;text-decoration:none}
.legal-footer-links a:hover{text-decoration:underline}
/* Documents longs : retour explicite au sommaire, accessible au clavier et au toucher. */
.legal-page-end{display:flex;justify-content:flex-end;margin-top:34px;padding-top:23px;border-top:1px solid #2b414f}
.legal-back-to-top{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:46px;padding:10px 16px;border:1px solid #537487;border-radius:10px;background:#152c39;color:#eaf2f6!important;text-decoration:none;font-size:14px;font-weight:750;line-height:1.45}
.legal-back-to-top:hover{background:#234153;border-color:#ffb782;color:#fff!important}
.legal-back-to-top span{color:#ffb782;font-size:19px;line-height:1}
@media(max-width:850px){
 .legal-layout{display:block;padding-top:27px}
 .legal-toc{position:static;margin-bottom:34px;padding:14px}
 .legal-toc-title{margin-bottom:7px}
 .legal-toc-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:3px 2px 4px}
 .legal-toc a{display:flex;align-items:center;min-height:46px;white-space:normal;overflow-wrap:anywhere;border:1px solid #365466;padding:10px 12px;transition:background-color .15s,border-color .15s}
 .legal-toc a:hover,.legal-toc a:focus-visible{background:#254251;border-color:#ffb782}
 .legal-footer-inner{align-items:flex-start;flex-direction:column;gap:13px}
}
@media(max-width:480px){
 .legal-header-inner{min-height:67px}
 .legal-brand{font-size:12px;gap:7px}
 .legal-brand-mark{width:32px;height:32px;font-size:16px}
 .legal-header-cta{padding:9px 10px;font-size:13px;gap:5px}
 .legal-page main{padding-top:43px;padding-bottom:60px}
 .legal-hero{padding-bottom:28px}
 .legal-hero h1{font-size:clamp(33px,9vw,43px)}
 .legal-content h2{font-size:21px}
 .legal-content p{font-size:16px;line-height:1.8}
}
@media(max-width:359px){.legal-toc-links{grid-template-columns:minmax(0,1fr)}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

/* Impression des documents institutionnels : fond clair, texte lisible et sommaire écran retiré. */
@media print{
  @page{size:A4;margin:15mm 17mm}
  :root{color-scheme:light}
  html{scroll-behavior:auto}
  body.legal-page{background:#fff!important;color:#1b2a33!important;font:11pt/1.48 system-ui,-apple-system,"Segoe UI",sans-serif}
  .legal-skip,.legal-header,.legal-toc,.legal-footer,.legal-page-end{display:none!important}
  .legal-page main{width:100%;max-width:none;margin:0;padding:0}
  .legal-hero{padding:0 0 12pt;border-bottom:1px solid #bcc9d1}
  .legal-eyebrow{color:#465f6d;font-size:9pt;letter-spacing:.08em}
  .legal-eyebrow:before{background:#465f6d}
  .legal-hero h1{color:#172a35;font-size:24pt;line-height:1.18;letter-spacing:-.025em;margin:9pt 0}
  .legal-date{color:#465f6d;border:0;background:none;padding:0;font-size:9pt}
  .legal-layout{display:block;padding-top:6pt}
  .legal-content{max-width:none}
  .legal-content h2{color:#182d38;font-size:14pt;line-height:1.3;margin:15pt 0 7pt;padding-top:9pt;border-color:#d2dce1;break-after:avoid;page-break-after:avoid}
  .legal-content h2:before{background:#587487}
  .legal-content h2:target{color:#182d38;background:none}
  .legal-content p{color:#273b46;font-size:10pt;line-height:1.5;margin:0 0 9pt;orphans:3;widows:3}
  .legal-page a{color:#173e54;text-decoration:underline}
  .legal-content p a{padding:0}
}
