/* Mistermind — « Le plan de lignes »
   Ground: white enamel signage. Ink: near-black. Hues: the four line colours only.
   Loaded after Bootstrap 5, which stays as the grid and JS substrate. Tokens are documented in DESIGN.md. */

@font-face {
    font-family: "Archivo";
    src: url("../fonts/archivo-var.woff2") format("woff2");
    font-weight: 400 900;
    font-stretch: 62% 125%;
    font-display: swap;
}
@font-face {
    font-family: "Atkinson Hyperlegible";
    src: url("../fonts/atkinson-400.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "Atkinson Hyperlegible";
    src: url("../fonts/atkinson-400i.woff2") format("woff2");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: "Atkinson Hyperlegible";
    src: url("../fonts/atkinson-700.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
}

:root {
    --ink: #1d1d1b;
    --ink-2: #47474a;
    --ink-3: #6b6c70;
    --ink-mist: #c4c6cb;
    --paper: #ffffff;
    --tile: #f2f2f1;
    --rule: #d9dce1;
    --track: #c9cdd4;

    --l-perso: #ffcd00;
    --l-etudes: #0064b0;
    --l-pro: #e2231a;
    --l-methode: #00a88f;
    --l-etudes-ink: #00508d;
    --l-pro-ink: #b81810;
    --l-methode-ink: #00735f;

    --display: "Archivo", "Arial Narrow", sans-serif;
    --text: "Atkinson Hyperlegible", "Segoe UI", sans-serif;

    --r: 6px;
    --gutter: clamp(1rem, 4vw, 3rem);
    --wrap: 1240px;
    --ease-out: cubic-bezier(.16, 1, .3, 1);

    --bs-body-font-family: var(--text);
    --bs-body-color: var(--ink);
    --bs-link-color-rgb: 0, 80, 141;
    --bs-link-hover-color-rgb: 29, 29, 27;
    --bs-border-radius: var(--r);
}

/* ---------- Base ---------- */

html {
    font-size: 16px;
    scrollbar-color: var(--ink) var(--tile);
}

body {
    margin: 0;
    font-family: var(--text);
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection { background: var(--l-perso); color: var(--ink); }

:focus-visible {
    outline: 3px solid var(--l-etudes);
    outline-offset: 3px;
    border-radius: 2px;
}

input, textarea { caret-color: var(--l-etudes); }

a {
    color: var(--l-etudes-ink);
    text-decoration-thickness: 1px;
    text-underline-offset: .2em;
}
a:hover { color: var(--ink); text-decoration-thickness: 2px; }

h1, h2, h3, h4, h5, h6, .display {
    font-family: var(--display);
    font-stretch: 78%;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.01em;
    color: var(--ink);
    text-wrap: balance;
}
h1 { font-size: clamp(2.25rem, 1.4rem + 3.4vw, 4.25rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.75rem, 1.25rem + 1.9vw, 2.75rem); margin: 2.2em 0 .6em; }
h3 { font-size: clamp(1.25rem, 1.05rem + .7vw, 1.6rem); margin: 1.8em 0 .5em; font-weight: 750; }
h4, h5, h6 { font-size: 1.15rem; margin: 1.5em 0 .4em; font-weight: 700; }

/* Measure in em, not ch: Atkinson's wide zero makes 70ch run past 95 characters. */
p { max-width: 36em; }

hr { border: 0; border-top: 2px solid var(--rule); opacity: 1; }

table { font-variant-numeric: tabular-nums; }

/* ---------- Wrap ---------- */

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.page-main {
    padding-block: clamp(2rem, 5vw, 4rem) clamp(3rem, 7vw, 6rem);
    min-height: 50vh;
}
.page-main > .wrap > h1:first-child,
.page-main > .wrap > h2:first-child { margin-top: 0; }

/* ---------- Line badges ---------- */

.badge-line {
    --c: var(--ink);
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 2.1em;
    height: 2.1em;
    border-radius: 50%;
    background: var(--c);
    color: #fff;
    font-family: var(--display);
    font-stretch: 85%;
    font-weight: 800;
    font-size: .95rem;
    line-height: 1;
}
.badge-line.is-perso { --c: var(--l-perso); color: var(--ink); }
.badge-line.is-etudes { --c: var(--l-etudes); }
.badge-line.is-pro { --c: var(--l-pro); }
.badge-line.is-methode { --c: var(--l-methode-ink); }

/* ---------- Buttons ---------- */

.btn {
    --bs-btn-font-family: var(--display);
    font-family: var(--display);
    font-stretch: 85%;
    font-weight: 750;
    letter-spacing: .01em;
    border-radius: var(--r);
    padding: .7rem 1.25rem;
    border-width: 2px;
    transition: background-color .2s var(--ease-out), color .2s var(--ease-out), border-color .2s var(--ease-out), transform .2s var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn-primary, .btn-ink {
    --bs-btn-bg: var(--ink);
    --bs-btn-border-color: var(--ink);
    --bs-btn-hover-bg: #000;
    --bs-btn-hover-border-color: #000;
    --bs-btn-active-bg: #000;
    --bs-btn-disabled-bg: var(--ink-3);
    --bs-btn-disabled-border-color: var(--ink-3);
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}
.btn-primary:hover, .btn-ink:hover { background: #000; border-color: #000; color: var(--l-perso); }
.btn-secondary, .btn-default, .btn-outline {
    background: transparent;
    border-color: var(--ink);
    color: var(--ink);
}
.btn-secondary:hover, .btn-default:hover, .btn-outline:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-sm { padding: .4rem .8rem; font-size: .9rem; }
.btn-lg { padding: .9rem 1.6rem; font-size: 1.15rem; }

.btn .arrow, .link-arrow .arrow {
    display: inline-block;
    width: 1.1em;
    height: 1.1em;
    vertical-align: -.18em;
    margin-left: .35em;
    transition: transform .25s var(--ease-out);
}
.btn:hover .arrow, .link-arrow:hover .arrow { transform: translateX(4px); }
.btn .plus { display: inline-block; width: 1em; height: 1em; vertical-align: -.14em; margin-right: .35em; }

.link-arrow {
    font-family: var(--display);
    font-stretch: 85%;
    font-weight: 750;
    color: var(--ink);
    text-decoration: none;
}
.link-arrow:hover { color: var(--l-etudes-ink); }

/* ---------- Forms ---------- */

.form-control, .form-select {
    border: 2px solid var(--ink);
    border-radius: var(--r);
    padding: .65rem .85rem;
    font-size: 1rem;
    color: var(--ink);
    background-color: #fff;
}
.form-control::placeholder { color: var(--ink-3); opacity: 1; }
.form-control:focus, .form-select:focus {
    border-color: var(--l-etudes);
    box-shadow: 0 0 0 3px rgba(0, 100, 176, .25);
}
.form-label, .control-label, label {
    font-weight: 700;
    font-size: .95rem;
    color: var(--ink);
}
.input-group-text {
    border: 2px solid var(--ink);
    background: var(--tile);
    color: var(--ink);
    border-radius: var(--r);
}
.form-check-input { border: 2px solid var(--ink); width: 1.15em; height: 1.15em; }
.form-check-input:checked { background-color: var(--ink); border-color: var(--ink); }
.text-danger, .field-validation-error, .validation-summary-errors { color: var(--l-pro-ink) !important; font-weight: 700; }
.validation-summary-errors ul { padding-left: 1.1rem; margin: 0; }
.validation-summary-valid { display: none; }

/* ---------- Generic content ---------- */

.card {
    border: 2px solid var(--ink);
    border-radius: var(--r);
    background: #fff;
}
.card-body { padding: 1.25rem 1.4rem; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--l-etudes-ink); }

.table { --bs-table-color: var(--ink); --bs-table-hover-bg: var(--tile); }
.table > thead th {
    font-family: var(--display);
    font-stretch: 85%;
    font-weight: 750;
    border-bottom: 3px solid var(--ink);
}

.breadcrumb {
    gap: .5rem;
    font-family: var(--display);
    font-stretch: 85%;
    font-weight: 700;
}

.collapse-trigger, a[data-bs-toggle="collapse"] { text-decoration: none; }

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 2px solid var(--ink);
}
.site-header .bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    min-height: 68px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    color: var(--ink);
    text-decoration: none;
    flex: none;
}
.brand:hover { color: var(--ink); }
.brand svg { width: 34px; height: 34px; }
.brand-name {
    font-family: var(--display);
    font-stretch: 72%;
    font-weight: 850;
    font-size: 1.45rem;
    letter-spacing: .01em;
    text-transform: uppercase;
}
.nav-main {
    display: flex;
    align-items: center;
    gap: .25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.nav-main a {
    position: relative;
    display: block;
    padding: .5rem .75rem;
    color: var(--ink);
    text-decoration: none;
    font-family: var(--display);
    font-stretch: 85%;
    font-weight: 700;
    font-size: 1.02rem;
}
.nav-main a::after {
    content: "";
    position: absolute;
    left: .75rem;
    right: .75rem;
    bottom: .2rem;
    height: 4px;
    border-radius: 2px;
    background: var(--c, var(--ink));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s var(--ease-out);
}
.nav-main a:hover::after, .nav-main a[aria-current="page"]::after { transform: scaleX(1); }
.nav-main li:nth-child(1) a { --c: var(--l-perso); }
.nav-main li:nth-child(2) a { --c: var(--l-etudes); }
.nav-main li:nth-child(3) a { --c: var(--l-pro); }
.nav-main li:nth-child(4) a { --c: var(--l-methode); }

.nav-account {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-left: auto;
}
.nav-account .link-login {
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
    padding: .5rem .25rem;
}
.nav-account .link-login:hover { text-decoration: underline; }
.nav-account form { margin: 0; }
.nav-account .avatar { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--ink); object-fit: cover; }

.lang-switch {
    display: inline-flex;
    border: 2px solid var(--ink);
    border-radius: 999px;
    overflow: hidden;
    font-family: var(--display);
    font-stretch: 85%;
    font-weight: 750;
    font-size: .85rem;
}
.lang-switch a {
    padding: .3rem .6rem;
    color: var(--ink);
    text-decoration: none;
    line-height: 1.2;
}
.lang-switch a + a { border-left: 2px solid var(--ink); }
.lang-switch a:hover { background: var(--tile); }
.lang-switch a[aria-current="true"] { background: var(--ink); color: #fff; }

/* Mobile header keeps the sign-up in reach beside the menu. */
.nav-cta { display: none; flex-shrink: 0; }

.nav-toggle {
    display: none;
    flex-shrink: 0;
    margin-left: auto;
    background: none;
    border: 2px solid var(--ink);
    border-radius: var(--r);
    padding: .45rem .6rem;
    color: var(--ink);
}
.nav-toggle svg { width: 22px; height: 22px; display: block; }

@media (max-width: 991.98px) {
    .site-header .bar { gap: 0 1rem; }
    .nav-cta { display: inline-flex; margin-left: auto; }
    .nav-toggle { display: block; }
    .nav-cta + .nav-toggle { margin-left: .5rem; }
    .nav-panel {
        display: none;
        width: 100%;
        padding: .5rem 0 1.25rem;
        border-top: 2px solid var(--ink);
    }
    .nav-panel.is-open { display: block; }
    .nav-main { flex-direction: column; align-items: stretch; }
    .nav-main a { padding: .8rem 0; font-size: 1.2rem; border-bottom: 1px solid var(--rule); }
    .nav-main a::after { left: 0; right: auto; width: 2.5rem; bottom: .35rem; }
    .nav-account { margin: 1rem 0 0; flex-wrap: wrap; }
}
@media (min-width: 992px) {
    .nav-panel { display: flex; align-items: center; flex: 1; gap: 1.5rem; }
}
@media (max-width: 479.98px) {
    .site-header .bar { gap: 0 .5rem; }
    .brand-name { font-size: 1.2rem; }
    .brand svg { width: 28px; height: 28px; }
    .nav-cta { padding: .4rem .65rem; }
}

/* ---------- Footer: the network map ---------- */

.site-footer {
    background: var(--ink);
    color: #e9eaec;
    padding: clamp(3rem, 6vw, 5rem) 0 2rem;
    font-size: .98rem;
}
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--l-perso); text-decoration: underline; }
.footer-net {
    display: grid;
    grid-template-columns: minmax(16rem, 1.4fr) repeat(4, minmax(9rem, 1fr));
    gap: 2.5rem 2rem;
}
.footer-brand .brand { color: #fff; }
.footer-brand p { color: var(--ink-mist); margin-top: .9rem; max-width: 30ch; }
.footer-line h2 {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin: 0 0 1rem;
    color: #fff;
    font-size: 1.05rem;
    font-stretch: 85%;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.footer-line h2 .badge-line { font-size: .75rem; }
.footer-line ul {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0 0 0 1.55rem;
}
.footer-line ul::before {
    content: "";
    position: absolute;
    left: .6rem;
    top: .55rem;
    bottom: .55rem;
    width: 4px;
    border-radius: 2px;
    background: var(--c);
}
.footer-line li { position: relative; padding: .2rem 0; }
.footer-line li::before {
    content: "";
    position: absolute;
    left: -1.32rem;
    top: .62rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--ink);
    border: 3px solid #fff;
}
.footer-line.is-perso { --c: var(--l-perso); }
.footer-line.is-etudes { --c: var(--l-etudes); }
.footer-line.is-pro { --c: var(--l-pro); }
.footer-line.is-methode { --c: var(--l-methode); }
.footer-social { display: flex; gap: .8rem; margin-top: .25rem; }
.footer-social a { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 2px solid #fff; border-radius: 50%; }
.footer-social a:hover { background: var(--l-perso); border-color: var(--l-perso); color: var(--ink); }
.footer-social svg { width: 18px; height: 18px; }
.footer-base {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #3d3d3d;
    color: #b8bac0;
    font-size: .9rem;
}
.footer-base nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
@media (max-width: 991.98px) {
    .footer-net { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-brand { grid-column: 1 / -1; }
}

/* ---------- Cookie consent ---------- */

#cookieConsent, .cookie-consent {
    border: 2px solid var(--ink) !important;
    border-radius: var(--r) !important;
    background: #fff !important;
    color: var(--ink) !important;
}

/* ---------- Section rhythm ---------- */

.section { padding-block: clamp(3.5rem, 8vw, 7rem); }
.section-tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section > .wrap > h2:first-child, .section-head h2 { margin-top: 0; }
.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 1rem 2rem;
    margin-bottom: clamp(1.75rem, 4vw, 3rem);
}
.section-head h2 { margin-bottom: 0; max-width: 18ch; }
.section-head p { margin: 0; color: var(--ink-2); max-width: 40ch; }
.on-ink { background: var(--ink); color: #f3f4f5; }
.on-ink h2, .on-ink h3 { color: #fff; }
.on-ink a { color: #fff; }
.on-ink .link-arrow { color: #fff; }
.on-ink .link-arrow:hover { color: var(--l-perso); }
.on-tile { background: var(--tile); }

/* ---------- Hero: the plan ---------- */

.hero {
    position: relative;
    padding-top: clamp(1.75rem, 4vw, 3.25rem);
    padding-bottom: clamp(2rem, 4vw, 3rem);
    overflow: hidden;
}
.hero-top {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 1rem 3rem;
}
.hero h1 {
    margin: 0;
    max-width: 21ch;
    font-size: clamp(2.3rem, 1.1rem + 3.3vw, 4.35rem);
    font-stretch: 70%;
    font-weight: 850;
    line-height: .96;
    letter-spacing: -.015em;
}
.hero-lead {
    margin: 0 0 .35rem;
    font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem);
    color: var(--ink-2);
    max-width: 30ch;
}
.hero-lead u { text-decoration-color: var(--l-perso); text-decoration-thickness: .28em; text-underline-offset: -.05em; text-decoration-skip-ink: none; }

.legend {
    border: 2px solid var(--ink);
    border-radius: var(--r);
    background: #fff;
}
.legend-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .45rem .8rem;
    background: var(--ink);
    color: #fff;
    font-family: var(--display);
    font-stretch: 85%;
    font-weight: 750;
    font-size: .85rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.legend-head span:last-child { color: var(--ink-mist); text-transform: none; letter-spacing: 0; font-weight: 600; }
.view-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: .35rem;
    gap: .3rem;
}
.view-tabs button {
    border: 0;
    border-radius: 4px;
    background: transparent;
    padding: .55rem .4rem;
    font-family: var(--display);
    font-stretch: 85%;
    font-weight: 750;
    font-size: .98rem;
    color: var(--ink);
    cursor: pointer;
    transition: background-color .2s var(--ease-out), color .2s var(--ease-out);
}
.view-tabs button:hover { background: var(--tile); }
.view-tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
.legend-lines {
    list-style: none;
    margin: 0;
    padding: .2rem .8rem .7rem;
    display: grid;
    gap: .35rem;
    font-size: .92rem;
}
.legend-lines li { display: grid; grid-template-columns: 2.2rem 1fr auto; align-items: center; gap: .5rem; }
.legend-lines .swatch { height: 6px; border-radius: 3px; background: var(--c); }
.legend-lines .pct { font-family: var(--display); font-stretch: 85%; font-weight: 750; font-variant-numeric: tabular-nums; }

/* Plan left; legend and ticket stacked right. The ticket sits at the foot of the column,
   where the ink terminus line drawn by plan.js runs into it. */
.plan-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 21rem;
    grid-template-areas: "map legend" "map ticket";
    grid-template-rows: auto 1fr;
    gap: 1.25rem clamp(1.5rem, 3vw, 3rem);
    margin-top: clamp(1.25rem, 3vw, 2.25rem);
}
.plan-map { grid-area: map; min-width: 0; }
.plan-stage .legend { grid-area: legend; }
.plan-stage .ticket { grid-area: ticket; align-self: end; }
.plan-svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}
.plan-svg text { font-family: var(--display); font-stretch: 85%; fill: var(--ink); }
.plan-svg .st-label { font-size: 15px; font-weight: 650; }
.plan-svg .st-date { font-size: 12px; font-weight: 600; fill: var(--ink-3); font-family: var(--text); font-stretch: normal; }
.plan-svg .grid-text { font-size: 12px; font-weight: 700; fill: var(--ink-3); letter-spacing: .04em; text-transform: uppercase; }
.plan-svg .grid-line { stroke: var(--rule); stroke-width: 1; }
.plan-svg .station { transition: transform .75s var(--ease-out); }
.plan-svg .st-text { transition: opacity .2s ease; }
.plan-svg.is-moving .st-text { opacity: 0; }
.plan-svg .layer { transition: opacity .25s ease; }
.plan-svg .layer[hidden] { display: none; }
.plan-svg .draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw .9s var(--ease-out) forwards; animation-delay: var(--d, 0s); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.plan-svg .now-ring { transform-box: fill-box; transform-origin: center; animation: now 2.4s var(--ease-out) infinite; }
@keyframes now { 0% { opacity: .7; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(2.4); } }

.plan-caption {
    margin: .5rem 0 0;
    font-size: .85rem;
    color: var(--ink-3);
    max-width: 60ch;
}

.ticket {
    position: relative;
    background: var(--l-perso);
    color: var(--ink);
    border-radius: var(--r);
    padding: 1.35rem 1.4rem 1.2rem;
    box-shadow: 0 18px 40px -18px rgba(29, 29, 27, .45);
    -webkit-mask:
        radial-gradient(circle 11px at 0 4.1rem, #0000 98%, #000) left / 51% 100% no-repeat,
        radial-gradient(circle 11px at 100% 4.1rem, #0000 98%, #000) right / 51% 100% no-repeat;
            mask:
        radial-gradient(circle 11px at 0 4.1rem, #0000 98%, #000) left / 51% 100% no-repeat,
        radial-gradient(circle 11px at 100% 4.1rem, #0000 98%, #000) right / 51% 100% no-repeat;
}
.ticket.is-terminus::before {
    content: "";
    position: absolute;
    right: 100%;
    top: calc(var(--term-y) - 5px);
    width: clamp(1.5rem, 3vw, 3rem);
    height: 10px;
    background: var(--ink);
}
.ticket h2 {
    margin: 0;
    font-size: 1.65rem;
    font-stretch: 72%;
    font-weight: 850;
    text-transform: uppercase;
    line-height: 1;
}
.ticket-sub { margin: .35rem 0 0; font-size: .95rem; font-weight: 700; }
.ticket form {
    display: grid;
    gap: .55rem;
    margin-top: 1.05rem;
    padding-top: 1rem;
    border-top: 2px dashed rgba(29, 29, 27, .55);
}
.ticket label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ticket .form-control { border-color: var(--ink); }
.ticket .btn { width: 100%; justify-content: center; }
.ticket-alt { margin: .8rem 0 0; font-size: .92rem; }
.ticket-alt a { color: var(--ink); font-weight: 700; }

@media (max-width: 1023.98px) {
    .plan-stage {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "legend" "map" "ticket";
        grid-template-rows: auto;
    }
    .plan-stage .ticket { max-width: 30rem; }
    /* The terminus line drops past the caption into the ticket. */
    .plan-map .plan-caption { padding-left: 3rem; }
}

/* ---------- Lines (use cases) ---------- */

.lines { display: grid; gap: clamp(3.5rem, 7vw, 6.5rem); }
.line-row {
    --c: var(--ink);
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 1.1rem clamp(2rem, 5vw, 5rem);
    align-items: start;
}
.line-row.is-perso { --c: var(--l-perso); }
.line-row.is-etudes { --c: var(--l-etudes); }
.line-row.is-pro { --c: var(--l-pro); }
.line-row h3 {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin: 0;
    font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem);
    font-stretch: 75%;
}
.line-row h3 a { color: var(--ink); text-decoration: none; }
.line-row h3 a:hover { text-decoration: underline; text-decoration-color: var(--c); text-decoration-thickness: 4px; }
.line-row h3 .badge-line { font-size: 1.05rem; }
.line-row p { margin: 0 0 1rem; color: var(--ink-2); max-width: 36rem; }
/* The track heads each row, so the heading below reads as its own. */
.line-track {
    grid-column: 1 / -1;
    order: -1;
    position: relative;
    height: 24px;
    margin: 0 0 .6rem;
}
.line-track::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 8px;
    height: 8px;
    border-radius: 4px;
    background: var(--c);
}
.line-track i {
    position: absolute;
    top: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    border: 5px solid var(--ink);
}
.line-track i:nth-child(1) { left: 0; }
.line-track i:nth-child(2) { left: 33%; }
.line-track i:nth-child(3) { left: 66%; }
.line-track i:nth-child(4) { right: 0; width: 34px; height: 34px; top: -5px; background: var(--ink); border-color: #fff; box-shadow: 0 0 0 3px var(--ink); }
@media (max-width: 767.98px) {
    .line-row { grid-template-columns: 1fr; }
}

/* ---------- Method band ---------- */

.method {
    display: grid;
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: 2.5rem clamp(2rem, 6vw, 6rem);
    align-items: start;
}
.method h2 { margin-top: 0; font-size: clamp(2rem, 1.3rem + 2.6vw, 3.6rem); font-stretch: 70%; max-width: 12ch; }
.method-text p { color: #dadbde; }
.method-text b, .method-text strong { color: #fff; }
.views-route { list-style: none; margin: 0; padding: 0; position: relative; }
.views-route::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 18px;
    bottom: 18px;
    width: 8px;
    border-radius: 4px;
    background: var(--l-methode);
}
.views-route li {
    position: relative;
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 1.1rem;
    align-items: center;
    padding: .85rem 0;
}
.views-route li::before {
    content: "";
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--ink);
    border: 6px solid #fff;
    box-sizing: border-box;
    position: relative;
}
.views-route strong { display: block; font-family: var(--display); font-stretch: 80%; font-weight: 800; font-size: 1.45rem; color: #fff; line-height: 1.1; }
.views-route span { color: var(--ink-mist); font-size: .95rem; }
@media (max-width: 899.98px) { .method { grid-template-columns: 1fr; } }

/* ---------- Departures boards (news, library) ---------- */

.boards {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(2rem, 4vw, 3.5rem);
    align-items: start;
}
@media (max-width: 899.98px) { .boards { grid-template-columns: 1fr; } }
.board {
    border: 2px solid var(--ink);
    border-radius: var(--r);
    background: #fff;
    overflow: hidden;
}
.board-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: .9rem 1.2rem;
    background: var(--ink);
    color: #fff;
}
.board-head h2 { margin: 0; font-size: 1.35rem; color: #fff; font-stretch: 80%; text-transform: uppercase; letter-spacing: .02em; }
.board-head a { color: #fff; font-size: .92rem; font-weight: 700; }
.board-head a:hover { color: var(--l-perso); }
.board ol, .board ul.board-list { list-style: none; margin: 0; padding: 0; }
.board-row {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .9rem;
    align-items: start;
    padding: .95rem 1.2rem;
    border-top: 1px solid var(--rule);
    transition: background-color .15s ease;
}
.board-row:first-child { border-top: 0; }
.board-row:hover { background: var(--tile); }
.board-row a { color: var(--ink); text-decoration: none; font-weight: 700; line-height: 1.34; }
.board-row a:hover { color: var(--l-etudes-ink); text-decoration: underline; }
.board-row a::after { content: ""; position: absolute; inset: 0; }
.board-row .meta { display: block; margin-top: .15rem; color: var(--ink-2); font-size: .93rem; line-height: 1.45; max-width: 70ch; }
.board-row .badge-line { margin-top: .1rem; font-size: .8rem; }
.board-row .dot {
    width: 18px;
    height: 18px;
    margin-top: .25rem;
    border-radius: 50%;
    border: 4px solid var(--c, var(--ink));
    background: #fff;
}
.board-empty { padding: 1.2rem; color: var(--ink-2); margin: 0; }

/* ---------- Questions (details/summary) ---------- */

.qa { border-top: 2px solid var(--ink); max-width: 62rem; }
.qa details { border-bottom: 2px solid var(--ink); }
.qa summary {
    display: grid;
    grid-template-columns: 1fr 34px;
    gap: 1.5rem;
    align-items: center;
    padding: 1.25rem 0;
    cursor: pointer;
    list-style: none;
    font-family: var(--display);
    font-stretch: 80%;
    font-weight: 750;
    font-size: clamp(1.15rem, 1rem + .6vw, 1.45rem);
    line-height: 1.32;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
    content: "";
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 3px solid var(--ink);
    background:
        linear-gradient(var(--ink), var(--ink)) center / 14px 3px no-repeat,
        linear-gradient(var(--ink), var(--ink)) center / 3px 14px no-repeat;
    transition: transform .3s var(--ease-out), background-color .2s ease;
}
.qa details[open] summary::after {
    transform: rotate(45deg);
    background-color: var(--l-perso);
}
.qa summary:hover { color: var(--l-etudes-ink); }
.qa .answer { padding: 0 0 1.5rem; color: var(--ink-2); max-width: 36em; }
.qa .answer p:last-child { margin-bottom: 0; }
.qa-group + .qa-group { margin-top: clamp(2.5rem, 5vw, 4rem); }
.qa-group > h2 { display: flex; align-items: center; gap: .8rem; }
.qa-contact { margin-top: 2.5rem; font-weight: 700; }

/* ---------- Terminus CTA ---------- */

.terminus {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1.5rem clamp(1.5rem, 4vw, 3rem);
    align-items: center;
}
.terminus-mark {
    width: clamp(64px, 8vw, 96px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--ink);
    box-shadow: 0 0 0 8px #fff, 0 0 0 16px var(--ink);
    margin: 16px;
}
.terminus h2 { margin: 0; font-size: clamp(2rem, 1.2rem + 3vw, 3.8rem); font-stretch: 70%; }
.terminus p { margin: .5rem 0 0; color: var(--ink-2); }
@media (max-width: 767.98px) { .terminus { grid-template-columns: 1fr; } .terminus-mark { display: none; } }

/* ---------- Features page: one line, a station per feature ---------- */

.page-intro { max-width: 52rem; margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.page-intro p { font-size: 1.2rem; color: var(--ink-2); max-width: 36em; }

.route {
    position: relative;
    display: grid;
    gap: clamp(3rem, 7vw, 6rem);
    padding-left: clamp(2.5rem, 6vw, 5rem);
}
.route::before {
    content: "";
    position: absolute;
    left: clamp(.75rem, 2.2vw, 1.75rem);
    top: .9rem;
    bottom: .9rem;
    width: 10px;
    border-radius: 5px;
    background: var(--l-methode);
}
/* Each stop stacks its text over a full-width flat plate. */
.stop {
    --c: var(--ink);
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}
.stop::before {
    content: "";
    position: absolute;
    left: calc(-1 * clamp(2.5rem, 6vw, 5rem) + clamp(.75rem, 2.2vw, 1.75rem) - 11px);
    top: .55rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    border: 7px solid var(--ink);
    box-sizing: border-box;
}
.stop h2 { margin: 0 0 .75rem; font-size: clamp(1.8rem, 1.2rem + 2vw, 3rem); font-stretch: 72%; line-height: 1.34; }
.stop p { color: var(--ink-2); }
.stop .stop-text p { margin-bottom: 0; }
.stop .shot {
    position: relative;
    margin: 0;
    padding: clamp(1rem, 2.5vw, 1.75rem);
    border: 2px solid var(--ink);
    border-radius: var(--r);
    background: #fff;
    overflow: hidden;
}
.stop .shot img { display: block; width: 100%; max-width: 100%; height: auto; margin: 0 auto; border: 1px solid var(--rule); }
.stop .shot figcaption { margin-top: .75rem; font-size: .85rem; color: var(--ink-3); }

/* Quick add, staged in the plan's world: one field, and ideas parked on a siding. */
.quick-demo { display: grid; gap: 1.75rem; padding: .5rem 0; }
.quick-field {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .5rem .5rem .5rem 1rem;
    border: 2px solid var(--ink);
    border-radius: var(--r);
    max-width: 34rem;
}
.quick-input { flex: 1; font-size: 1.1rem; }
.quick-caret {
    display: inline-block;
    width: 2px;
    height: 1.15em;
    margin-left: 2px;
    vertical-align: -.2em;
    background: var(--l-etudes);
    animation: caret 1.1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }
.quick-siding strong { display: block; margin-bottom: .75rem; font-family: var(--display); font-stretch: 82%; font-weight: 800; font-size: 1.15rem; }
.quick-siding ol {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2.5rem;
    margin: 0;
    padding: 0 0 0 .2rem;
    list-style: none;
}
.quick-siding ol::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 11px;
    border-top: 6px dashed var(--track);
}
.quick-siding li {
    position: relative;
    padding-top: 32px;
    font-family: var(--display);
    font-stretch: 85%;
    font-weight: 700;
}
.quick-siding li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    width: 26px;
    height: 26px;
    box-sizing: border-box;
    border-radius: 50%;
    background: #fff;
    border: 5px solid var(--ink-3);
}

/* ---------- Library cards ---------- */

.lib-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
    gap: 1.5rem;
}
.lib-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 2px solid var(--ink);
    border-radius: var(--r);
    background: #fff;
    overflow: hidden;
    transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out);
}
.lib-card:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -18px rgba(29, 29, 27, .55); }
.lib-card img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 2px solid var(--ink); }
.lib-card .body { padding: 1rem 1.15rem 1.25rem; }
.lib-card h2 { margin: 0 0 .4rem; font-size: 1.3rem; font-stretch: 82%; line-height: 1.34; }
.lib-card h2 a { color: var(--ink); text-decoration: none; }
.lib-card h2 a::after { content: ""; position: absolute; inset: 0; }
.lib-card p { margin: 0; color: var(--ink-2); font-size: .97rem; }

/* ---------- Article (news, library detail, legal) ---------- */

.article { max-width: 36em; }
.article .standfirst { font-size: 1.3rem; line-height: 1.45; color: var(--ink-2); margin-bottom: 2rem; }
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.5rem;
    align-items: center;
    margin: 2.5rem 0 0;
    padding-top: 1.25rem;
    border-top: 2px solid var(--ink);
    color: var(--ink-2);
    font-size: .95rem;
}
.article img { max-width: 100%; height: auto; border-radius: var(--r); }
.article-body { font-size: 1.08rem; }
.article-body h2 { font-size: 1.8rem; }
.article-body img { max-width: 100%; height: auto; }

/* The column names are model property names, so the header is kept for screen readers only. */
.news-table { width: 100%; border-collapse: collapse; }
.news-table thead th { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; padding: 0; border: 0; }
.news-table tbody tr:first-child td { border-top: 3px solid var(--ink); }
.news-table td { padding: 1.1rem 1rem 1.1rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.news-table td:first-child { white-space: nowrap; font-family: var(--display); font-stretch: 85%; font-weight: 750; font-variant-numeric: tabular-nums; width: 8rem; }
.news-table td a { color: var(--ink); font-weight: 700; text-decoration: none; }
.news-table td a:hover { text-decoration: underline; color: var(--l-etudes-ink); }
.news-table td.lede { color: var(--ink-2); }
@media (max-width: 699.98px) {
    .news-table thead { display: none; }
    .news-table tr { display: grid; padding: 1rem 0; border-bottom: 1px solid var(--rule); }
    .news-table td { border: 0; padding: 0; width: auto !important; }
    .news-table td.lede { margin-top: .35rem; }
}

/* ---------- Account (sign-in / sign-up) ---------- */

.account-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 27rem);
    gap: 2.5rem clamp(2rem, 6vw, 6rem);
    align-items: start;
}
.account-shell h1 { font-stretch: 70%; max-width: 12ch; }
.account-shell .aside p { color: var(--ink-2); }
.account-route { display: block; width: 100%; max-width: 26rem; height: auto; margin-top: 2.5rem; }
.account-panel {
    border: 2px solid var(--ink);
    border-radius: var(--r);
    background: #fff;
    overflow: hidden;
}
.account-panel .panel-head {
    padding: .8rem 1.25rem;
    background: var(--l-perso);
    border-bottom: 2px solid var(--ink);
    font-family: var(--display);
    font-stretch: 80%;
    font-weight: 850;
    font-size: 1.3rem;
    text-transform: uppercase;
}
.account-panel form { padding: 1.4rem 1.25rem 1.5rem; display: grid; gap: 1rem; }
.account-panel .mb-3 { margin: 0 !important; }
.account-panel .links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; font-size: .95rem; }
.account-panel .links a { font-weight: 700; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* Register: the steps ahead drawn as a short route. */
.signup-route { list-style: none; margin: 2rem 0 0; padding: 0; position: relative; max-width: 26rem; }
.signup-route::before {
    content: "";
    position: absolute;
    left: 13px;
    top: 16px;
    bottom: 16px;
    width: 8px;
    border-radius: 4px;
    background: linear-gradient(var(--l-perso), var(--l-perso)) top / 100% 50% no-repeat, var(--track);
}
.signup-route li {
    position: relative;
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 1rem;
    align-items: center;
    padding: .7rem 0;
}
.signup-route li::before {
    content: "";
    width: 34px;
    height: 34px;
    box-sizing: border-box;
    border-radius: 50%;
    background: #fff;
    border: 6px solid var(--ink);
}
.signup-route li.is-now::before { background: var(--l-perso); }
.signup-route strong { font-family: var(--display); font-stretch: 82%; font-weight: 800; font-size: 1.3rem; line-height: 1.34; }
.signup-note { margin-top: 1rem; font-weight: 700; }

@media (max-width: 899.98px) {
    .account-shell { grid-template-columns: 1fr; }
    .account-route, .signup-route, .signup-note { display: none; }
}
@media (max-width: 479.98px) { .field-pair { grid-template-columns: 1fr; } }

/* ---------- Use-case nav ---------- */

.usecase-nav { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 2rem; padding: 0; list-style: none; }
.usecase-nav a {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem .9rem .35rem .35rem;
    border: 2px solid var(--ink);
    border-radius: 999px;
    color: var(--ink);
    text-decoration: none;
    font-family: var(--display);
    font-stretch: 85%;
    font-weight: 750;
}
.usecase-nav a:hover, .usecase-nav a[aria-current="page"] { background: var(--ink); color: #fff; }
.usecase-nav .badge-line { font-size: .7rem; }

/* ---------- Legacy content blocks (library detail, privacy, my plans) ---------- */

.ferContainer {
    margin-top: 3rem;
    padding: clamp(1.25rem, 3vw, 2rem);
    background: var(--tile);
    border-radius: var(--r);
}
.ferContainer h3, .ferContainer h4 { margin-top: 0; font-size: 1.25rem; }
.ferZone + .ferZone { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 2px solid var(--rule); }
.footerInLine { color: var(--ink-2); }

.ratio iframe { border: 2px solid var(--ink); border-radius: var(--r); }

.progress { height: 12px; border-radius: 6px; background: var(--tile); }
.progress-bar { background: var(--l-methode-ink); }

.page-main .card + br + h2, .page-main br + h2 { margin-top: 1.5rem; }
.page-main .row { --bs-gutter-y: 1.5rem; }

.rTable { display: table; width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.rTableRow { display: table-row; }
.rTableHead, .rTableCell { display: table-cell; padding: .6rem .8rem; border-bottom: 1px solid var(--rule); }
.rTableHead { font-weight: 700; border-bottom: 3px solid var(--ink); }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
    .plan-svg .now-ring { display: none; }
}
