/* Global Bourse : bascule jour / nuit + logo qui suit le thème.
   Sans JavaScript, le thème suit le réglage du système (prefers-color-scheme). */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
@supports (overflow:clip){body{overflow-x:clip}}

/* Logo : une seule image (blanche), inversée en mode jour */
.logo-d{display:block}
@media (prefers-color-scheme:light){:root:not([data-theme="dark"]) .logo-d{filter:invert(1)}}
:root[data-theme="light"] .logo-d{filter:invert(1)}
:root[data-theme="dark"] .logo-d{filter:none}

/* Accessibilité : lien d'évitement et texte réservé aux lecteurs d'écran */
.skip{position:absolute;left:12px;top:-100px;z-index:3000;padding:10px 16px;background:var(--accent,#3DDC97);color:var(--on-accent,#04140C);font:600 .95rem Figtree,system-ui,sans-serif;text-decoration:none}
.skip:focus{top:calc(env(safe-area-inset-top,0px) + 8px);outline:3px solid var(--ink,#F4F4F1);outline-offset:2px}
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
main:focus{outline:none}

/* Bouton jour / nuit (caché tant que le script n'a pas démarré) */
.theme-toggle{display:none;flex:none;align-items:center;justify-content:center;width:44px;height:44px;padding:0;margin:0;
  background:transparent;color:var(--ink);border:1px solid var(--line);border-radius:0;cursor:pointer;
  -webkit-appearance:none;appearance:none;-webkit-tap-highlight-color:transparent;font:inherit;
  clip-path:polygon(8px 0,calc(100% - 8px) 0,100% 8px,100% calc(100% - 8px),calc(100% - 8px) 100%,8px 100%,0 calc(100% - 8px),0 8px)}
.js .theme-toggle{display:inline-flex}
@media (hover:hover){.theme-toggle:hover,.theme-toggle.float:hover{background:var(--ink);color:var(--bg)}}
.theme-toggle:active,.theme-toggle.float:active{background:transparent;color:var(--ink)}
.theme-toggle:focus-visible{outline:3px solid var(--accent);outline-offset:-3px}
.theme-toggle svg{width:20px;height:20px;display:block;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
/* Icône : soleil quand on est en nuit (clic = passer en jour), lune quand on est en jour */
.theme-toggle .i-moon{display:none}
@media (prefers-color-scheme:light){
  :root:not([data-theme="dark"]) .theme-toggle .i-sun{display:none}
  :root:not([data-theme="dark"]) .theme-toggle .i-moon{display:block}
}
:root[data-theme="light"] .theme-toggle .i-sun{display:none}
:root[data-theme="light"] .theme-toggle .i-moon{display:block}
:root[data-theme="dark"] .theme-toggle .i-sun{display:block}
:root[data-theme="dark"] .theme-toggle .i-moon{display:none}

/* Placement */
.hright{display:flex;align-items:center;gap:14px;flex:none}

@media (prefers-reduced-motion:no-preference){.theme-toggle{transition:background-color .2s,color .2s}}

@media (max-width:400px){.hright{gap:8px}}

/* ===== En-tête unique : mêmes cotes sur toutes les pages =====
   Enfant direct de <body>, collant, hauteur fixe ; éléments collés aux bords gauche et droit de l'écran. */
:root{--hdr-h:64px;--hdr-pad:20px}
@media (min-width:1100px){:root{--hdr-pad:40px}}
body>header{position:sticky;top:env(safe-area-inset-top,0px);z-index:25;display:flex;justify-content:space-between;align-items:center;gap:12px;
  height:var(--hdr-h);padding:0 var(--hdr-pad);background:var(--bg);border-bottom:1px solid var(--line)}
.brand{display:flex;align-items:center;gap:12px;color:inherit;text-decoration:none;min-width:0}
.brand img{width:40px;height:40px;flex:none}
.brand div{min-width:0}
.brand b{font:800 1.1rem/1.1 Sora,sans-serif;letter-spacing:-.02em;display:block}
.brand span{font-size:.85rem;color:var(--muted);display:block}

/* ===== Pied de page unique : même contenu, mêmes bords que l'en-tête ===== */
body>footer{margin:48px 0 0;padding:44px var(--hdr-pad) calc(28px + env(safe-area-inset-bottom,0px));color:var(--muted);font-size:.92rem;line-height:1.5;text-align:left;
  border-top:1px solid var(--line);background:linear-gradient(var(--accent),var(--accent)) var(--hdr-pad) 0 / 72px 2px no-repeat border-box}
body>footer p,body>footer ul{margin:0;padding:0;max-width:none}
body>footer ul{list-style:none}
body>footer li{margin:0}
body>footer a,body>footer .ft-btn{color:var(--ink);text-decoration:none}
body>footer .ft{display:grid;gap:36px}
body>footer .ft-logo{display:inline-flex;align-items:center;gap:12px;color:var(--ink)}
body>footer .ft-logo img{width:36px;height:36px;flex:none}
body>footer .ft-logo b{font:800 1.1rem/1.1 Sora,sans-serif;letter-spacing:-.02em}
body>footer .ft-brand p{margin-top:14px;max-width:34ch}
body>footer .ft-nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:28px 24px}
body>footer .ft-legal{grid-column:1 / -1}
body>footer .ft-t{margin:0 0 6px;font:700 .78rem/1.2 Sora,sans-serif;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
body>footer .ft-col li>a,body>footer .ft-col li>.ft-btn,body>footer .ft-soon{display:inline-flex;align-items:center;gap:6px;min-height:44px}
body>footer .ft-btn{padding:0;margin:0;background:none;border:0;font:inherit;cursor:pointer;text-align:left;-webkit-appearance:none;appearance:none}
body>footer .ft-soon em{font-style:normal;font-size:.8rem;padding:2px 8px;border:1px solid var(--line)}
body>footer .ft-ext::after{content:"\2197";font-size:.85em;color:var(--muted)}
@media (hover:hover){
  body>footer a:hover,body>footer .ft-btn:hover{color:var(--accent);text-decoration:underline;text-underline-offset:4px}
}
body>footer a:focus-visible,body>footer .ft-btn:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
body>footer .ft-bottom{display:grid;gap:14px;margin-top:36px;padding-top:20px;border-top:1px solid var(--line);font-size:.84rem}
body>footer .ft-risk{max-width:90ch}
body>footer .ft-risk strong{color:var(--ink);font-weight:600}
body>footer .ft-copy{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:4px 24px}
body>footer .ft-top{display:inline-flex;align-items:center;min-height:44px}
body>footer .ft-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
@media (min-width:900px){
  body>footer{padding-top:56px}
  body>footer .ft{grid-template-columns:minmax(0,1.5fr) minmax(0,3fr);gap:64px}
  body>footer .ft-nav{grid-template-columns:repeat(3,minmax(0,1fr));gap:32px}
  body>footer .ft-legal{grid-column:auto}
  body>footer .ft-col li>a,body>footer .ft-col li>.ft-btn,body>footer .ft-soon{min-height:36px}
  body>footer .ft-bottom{grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:48px}
  body>footer .ft-top{min-height:36px}
}

/* ===== Fil d'Ariane : sous l'en-tête, même gabarit que le contenu ===== */
.crumbs{max-width:1080px;margin:0 auto;padding:6px 20px 0}
@media (min-width:1100px){.crumbs{max-width:1280px;padding:6px 40px 0}}
.crumbs ol{display:flex;flex-wrap:wrap;align-items:center;margin:0;padding:0;list-style:none;font-size:.92rem;line-height:1.3}
.crumbs li{display:flex;align-items:center;margin:0;min-width:0}
.crumbs li+li::before{content:"";flex:none;width:6px;height:6px;margin:0 12px 0 10px;border-top:1.5px solid var(--muted);border-right:1.5px solid var(--muted);transform:rotate(45deg)}
.crumbs a{display:inline-flex;align-items:center;min-height:44px;color:var(--muted);text-decoration:none}
@media (hover:hover){.crumbs a:hover{color:var(--ink);text-decoration:underline;text-underline-offset:4px}}
.crumbs a:focus-visible{outline:3px solid var(--accent);outline-offset:-3px}
.crumbs [aria-current=page]{color:var(--ink);font-weight:600;overflow-wrap:anywhere}
