@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(../assets/fonts/space-grotesk-300.woff) format('woff');
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/space-grotesk-400.woff) format('woff');
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../assets/fonts/space-grotesk-500.woff) format('woff');
}

/* ---- Legal pages: the site's type and colours, no 3D. footer.css and consent.css are
   appended to this file by tools/build_site.py. ---- */
* { box-sizing: border-box; }
html { background: #05060a; }
body {
    margin: 0; min-height: 100vh; color: #f2f7ff; font-family: 'Space Grotesk', sans-serif;
    background:
        radial-gradient(70% 50% at 85% 0%, rgba(26, 115, 255, 0.16), rgba(5, 6, 10, 0) 70%),
        radial-gradient(60% 40% at 0% 30%, rgba(74, 77, 255, 0.10), rgba(5, 6, 10, 0) 70%),
        #05060a;
}
.legal-header {
    position: sticky; top: 0; z-index: 20;
    display: flex; justify-content: space-between; align-items: center; gap: 24px;
    height: 70px; padding: 0 60px;
    background: rgba(5, 6, 10, 0.78); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.065);
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: #ffffff; text-decoration: none; }
.brand-mark { display: block; width: 18px; height: 18px; flex: 0 0 18px; }
.brand-mark svg { display: block; width: 100%; height: 100%; }
.brand-text { font-size: 13px; font-weight: 500; letter-spacing: 0.06em; }
.legal-back {
    display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.28); color: #ffffff; text-decoration: none;
    font-size: 12px; font-weight: 500; transition: background 0.3s, border-color 0.3s;
}
.legal-back:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.75); }
.legal-main { max-width: 760px; margin: 0 auto; padding: 90px 24px 110px; }
.legal-main h1 {
    margin: 0 0 14px; font-size: clamp(40px, 6vw, 68px); line-height: 1.02;
    font-weight: 400; letter-spacing: -0.035em;
}
.legal-updated { margin: 0 0 56px; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: #8d97ab; }
.legal-main section { padding: 30px 0; border-top: 1px solid rgba(255, 255, 255, 0.08); scroll-margin-top: 70px; }
.legal-main h2 { margin: 0 0 14px; font-size: 20px; font-weight: 500; letter-spacing: -0.01em; }
.legal-main p, .legal-main li { font-size: 15px; line-height: 1.75; font-weight: 300; color: #d1d5db; }
.legal-main p { margin: 0 0 12px; }
.legal-main ul { margin: 0 0 12px; padding-left: 20px; }
.legal-main strong { font-weight: 500; color: #f2f7ff; }
.legal-main a { color: #ffffff; text-decoration: underline; text-underline-offset: 3px; }
.legal-main a:focus-visible, .legal-header a:focus-visible { outline: 2px solid #8fb4ff; outline-offset: 3px; }
@media (max-width: 700px) {
    .legal-header { padding: 0 20px; }
    .legal-main { padding: 60px 20px 80px; }
}

/* ---- Site footer: after the contact chapter on the home page, and on the legal pages ---- */
.site-footer {
    position: relative; z-index: 8;
    padding: 72px 60px 26px;
    background: linear-gradient(180deg, rgba(3, 4, 8, 0.72), rgba(3, 4, 8, 0.96) 45%);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #d1d5db; font-family: 'Space Grotesk', sans-serif;
}
.footer-inner {
    max-width: 1760px; margin: 0 auto;
    display: grid; grid-template-columns: minmax(260px, 1.1fr) minmax(0, 2fr); gap: clamp(40px, 6vw, 120px);
}
.footer-logo { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 22px; color: #ffffff; text-decoration: none; }
.footer-logo .brand-mark { width: 26px; height: 26px; flex-basis: 26px; }
.footer-logo .brand-text { font-size: 15px; letter-spacing: 0.12em; }
.footer-tagline { max-width: 40ch; margin: 0 0 26px; font-size: 14px; line-height: 1.7; font-weight: 300; color: #b9c1d1; }
.footer-contact { display: grid; gap: 8px; font-style: normal; font-size: 13px; line-height: 1.6; font-weight: 300; color: #8d97ab; }
.footer-contact a { color: #ffffff; text-decoration: none; }
.footer-contact a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-col h3 {
    margin: 0 0 20px; font: 500 11px/1 'Space Grotesk', sans-serif;
    letter-spacing: 0.22em; text-transform: uppercase; color: #cfd6e6;
}
.footer-col ul { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.footer-col a { color: #b9c1d1; text-decoration: none; font-size: 14px; font-weight: 300; transition: color 0.25s; }
.footer-col a:hover { color: #ffffff; }
.footer-bottom {
    max-width: 1760px; margin: 56px auto 0; padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px;
    font: 400 10px/1.4 'Space Grotesk', sans-serif; letter-spacing: 0.14em; text-transform: uppercase;
    color: rgba(255, 255, 255, 0.42);
}
.footer-bottom a { color: inherit; text-decoration: none; transition: color 0.3s; }
.footer-bottom a:hover { color: #ffffff; }
.site-footer a:focus-visible { outline: 2px solid #8fb4ff; outline-offset: 3px; border-radius: 2px; }
@media (max-width: 1000px) {
    .site-footer { padding: 56px 24px 24px; }
    .footer-inner { grid-template-columns: 1fr; gap: 44px; }
}
@media (max-width: 600px) {
    .footer-columns { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
    .footer-bottom { flex-direction: column; }
}

/* ---- Language switch (FR / EN), in the header of every page ---- */
.lang-switch { display: inline-flex; align-items: center; }
.lang-switch a {
    padding: 6px 8px; border-radius: 6px; text-decoration: none;
    font: 500 11px/1 'Space Grotesk', sans-serif; letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.42); transition: color 0.3s;
}
.lang-switch a + a { border-left: 1px solid rgba(255, 255, 255, 0.18); border-radius: 0 6px 6px 0; }
.lang-switch a:hover, .lang-switch a[aria-current] { color: #ffffff; }
.lang-switch a:focus-visible { outline: 2px solid #8fb4ff; outline-offset: 2px; }
.legal-actions { display: flex; align-items: center; gap: 16px; }
@media (max-width: 420px) { .main-header .lang-switch a { padding: 6px 6px; } }

/* ---- Cookie consent (js/consent.js): banner and preferences, same glass as the site.
   "Tout refuser" and "Tout accepter" carry exactly the same weight, as the CNIL asks. */
.consent-banner, .consent-panel {
    color: #f2f7ff; font-family: 'Space Grotesk', sans-serif;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: linear-gradient(160deg, rgba(22, 27, 44, 0.94), rgba(7, 9, 16, 0.94));
    -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    user-select: text; -webkit-user-select: text;
}
.consent-banner {
    /* top right, under the header: every chapter keeps its copy in the lower half of the
       screen (left or right), so this corner only ever covers the 3D */
    position: fixed; right: 24px; top: 94px; z-index: 9500;
    width: min(440px, calc(100vw - 48px));
    padding: 24px 24px 20px; border-radius: 22px;
    opacity: 0; transform: translateY(-16px);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.consent-banner.is-open { opacity: 1; transform: none; }
.consent-title {
    margin: 0 0 12px; font: 500 11px/1 'Space Grotesk', sans-serif;
    letter-spacing: 0.22em; text-transform: uppercase; color: #cfd6e6;
}
.consent-text { margin: 0 0 18px; font-size: 14px; line-height: 1.6; font-weight: 300; color: #d1d5db; }
.consent-banner a, .consent-panel a { color: #ffffff; text-decoration: underline; text-underline-offset: 3px; }
.consent-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.consent-btn {
    padding: 13px 16px; border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.55); background: rgba(255, 255, 255, 0.06); color: #ffffff;
    font: 500 13px/1 'Space Grotesk', sans-serif; letter-spacing: 0.2px;
    transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.consent-btn:hover { background: #ffffff; color: #000000; border-color: #ffffff; }
.consent-btn--quiet { grid-column: 1 / -1; border-color: rgba(255, 255, 255, 0.16); background: transparent; color: #cfd6e6; }
.consent-btn--wide { grid-column: 1 / -1; }
.consent-btn:focus-visible, .consent-close:focus-visible, .consent-banner a:focus-visible, .consent-panel a:focus-visible,
.consent-switch input:focus-visible + span { outline: 2px solid #8fb4ff; outline-offset: 3px; }

.consent-dialog {
    position: fixed; inset: 0; z-index: 9600;
    display: grid; place-items: center; padding: 24px;
    background: rgba(0, 0, 0, 0.6); opacity: 0; transition: opacity 0.35s;
}
.consent-dialog[hidden] { display: none; }
.consent-dialog.is-open { opacity: 1; }
.consent-panel {
    position: relative; width: min(560px, 100%); max-height: calc(100vh - 48px); overflow: auto;
    padding: 32px 30px 26px; border-radius: 26px;
    transform: translateY(16px); transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.consent-dialog.is-open .consent-panel { transform: none; }
.consent-panel h2 { margin: 0 0 10px; font-size: 26px; line-height: 1.15; font-weight: 400; letter-spacing: -0.02em; }
.consent-panel > p { margin: 0 0 22px; font-size: 14px; line-height: 1.6; font-weight: 300; color: #d1d5db; }
.consent-close {
    position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18); background: transparent; color: #ffffff;
    font-size: 20px; line-height: 1;
}
.consent-close:hover { background: rgba(255, 255, 255, 0.1); }
.consent-category {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 20px;
    padding: 18px 0; border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.consent-category h3 { margin: 0 0 6px; font-size: 15px; font-weight: 500; }
.consent-category p { margin: 0; font-size: 13px; line-height: 1.55; font-weight: 300; color: #b9c1d1; }
.consent-always {
    flex: none; padding-top: 3px; font-size: 10px; font-weight: 500;
    letter-spacing: 0.14em; text-transform: uppercase; color: #8fb4ff;
}
.consent-switch { position: relative; flex: none; width: 46px; height: 26px; }
.consent-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; }
.consent-switch span {
    position: absolute; inset: 0; border-radius: 999px; pointer-events: none;
    background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.25); transition: background 0.25s;
}
.consent-switch span::after {
    content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
    background: #ffffff; transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.consent-switch input:checked + span { background: #2f6bff; border-color: #6d95ff; }
.consent-switch input:checked + span::after { transform: translateX(20px); }
.consent-panel .consent-actions { margin-top: 20px; }
html.consent-locked { overflow: hidden; }

/* Cookie button: reopens the preferences once the banner is gone (bottom left, below
   every chapter's copy: the lowest text block ends 6% above the bottom on phones). */
.consent-fab {
    position: fixed; left: 20px; bottom: 20px; z-index: 9400;
    display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%;
    color: #f2f7ff; border: 1px solid rgba(255, 255, 255, 0.18);
    background: linear-gradient(160deg, rgba(22, 27, 44, 0.9), rgba(7, 9, 16, 0.9));
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    opacity: 0; transform: translateY(8px); pointer-events: none;
    transition: opacity 0.4s, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s, background 0.25s;
}
.consent-fab.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.consent-fab:hover { border-color: rgba(255, 255, 255, 0.55); background: rgba(30, 38, 62, 0.95); }
.consent-fab:focus-visible { outline: 2px solid #8fb4ff; outline-offset: 3px; }
.consent-fab svg { width: 20px; height: 20px; }
/* Stacked layout (same breakpoint as styles.css): copy sits at the top of the screen on
   chapters 1, 3 and 5, so the banner goes back to the bottom, the usual place. */
@media (max-width: 900px), (max-aspect-ratio: 4/5) {
    .consent-banner { top: auto; bottom: 16px; transform: translateY(16px); }
}
@media (max-width: 600px) {
    .consent-banner { left: 12px; right: 12px; bottom: 12px; width: auto; padding: 20px 18px 16px; }
    .consent-panel { padding: 28px 20px 20px; }
    .consent-fab { left: 12px; bottom: 12px; width: 36px; height: 36px; }
    .consent-fab svg { width: 17px; height: 17px; }
}
