/* HiddenDocs, accueil : l'encyclopédie des dossiers (même langage que les landings : Jost seule, phrases sobres). */
:root {
    --space: #050505;
    --ink: #ece8df;
    --mute: #908b81;
    --paper: #f3efe6;
    --f: 'Jost', 'Futura', 'Century Gothic', system-ui, sans-serif;
    --gut: clamp(22px, 6.4vw, 72px);
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--space); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body.pt {
    margin: 0; background: var(--space); color: var(--ink);
    font: 400 17px/1.55 var(--f); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden;
}
a { color: inherit; }
img { max-width: 100%; }

/* L'espace : une seule toile fixe, derrière tout */
.space { position: fixed; left: 0; top: 0; width: 100%; height: 100vh; height: 100lvh; display: block; z-index: 0; opacity: 0; transition: opacity 1.4s ease; }
.space.is-on { opacity: 1; }
.shade { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0; }

.top {
    position: absolute; left: 0; right: 0; top: 0; z-index: 4;
    display: flex; align-items: center; justify-content: space-between;
    padding: calc(env(safe-area-inset-top) + 20px) var(--gut) 0;
}
.top__logo img { display: block; width: auto; height: 26px; }
.top__lang { display: flex; gap: 18px; font-size: 14px; letter-spacing: 0.04em; }
.top__lang a { color: var(--mute); text-decoration: none; }
.top__lang a[aria-current='true'] { color: var(--ink); }

/* La traversée : sa hauteur fixe la durée (portail.js) ; la scène reste collée à l'écran */
main { position: relative; z-index: 2; }
.trip { position: relative; height: calc((var(--length, 5.6) + 1) * 100svh); }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; height: var(--vis, 100svh); overflow: hidden; }

.beat { position: absolute; margin: 0; }
.js .beat { opacity: 0; visibility: hidden; transition: opacity 0.6s ease, visibility 0s linear 0.6s; }
.js .beat.is-on { opacity: 1; visibility: visible; transition: opacity 0.8s ease, visibility 0s; }

/* L'ouverture */
.hero { left: var(--gut); bottom: calc(12svh + env(safe-area-inset-bottom)); width: min(40em, calc(100vw - 2 * var(--gut))); }
.hero__title { margin: 0; max-width: 9.5em; font-weight: 300; font-size: clamp(40px, 5.8vw, 98px); line-height: 1.02; letter-spacing: -0.01em; text-wrap: balance; text-shadow: 0 0 30px rgba(5, 5, 5, 0.7); }
.hero__line { margin: 24px 0 0; max-width: 30em; font-weight: 300; font-size: clamp(17px, 1.35vw, 21px); line-height: 1.5; color: #d9d3c8; text-shadow: 0 0 18px rgba(5, 5, 5, 0.8); }

/* Une phrase de passage */
.say { left: var(--gut); bottom: calc(14svh + env(safe-area-inset-bottom)); max-width: 12em; font-weight: 300; font-size: clamp(30px, 4.2vw, 68px); line-height: 1.12; text-wrap: balance; text-shadow: 0 0 28px rgba(5, 5, 5, 0.7); }

/* Un univers par dossier : les pièces, la question, la phrase, le lien */
.uv { inset: 0; pointer-events: none; }
.uv.is-on .uv__text, .uv.is-on .pc { pointer-events: auto; }
.uv__text { position: absolute; top: 50%; width: min(31em, 38vw); transform: translateY(-50%); }
.uv--ovni .uv__text { left: 55vw; }
.uv--apollo .uv__text { left: var(--gut); }
.uv__title { margin: 0; font-weight: 300; font-size: clamp(30px, 3.2vw, 54px); line-height: 1.08; text-wrap: balance; text-shadow: 0 0 26px rgba(5, 5, 5, 0.75); }
.uv__line { margin: 20px 0 0; font-weight: 300; font-size: clamp(17px, 1.3vw, 21px); line-height: 1.5; color: #ddd7cc; text-shadow: 0 0 16px rgba(5, 5, 5, 0.85); }
.uv__meta { margin: 18px 0 0; font-size: 14px; line-height: 1.5; letter-spacing: 0.01em; color: var(--mute); }
.uv__cta {
    display: inline-block; margin-top: 26px; padding: 14px 24px; border: 1px solid rgba(236, 232, 223, 0.55);
    font-size: 16px; letter-spacing: 0.02em; text-decoration: none; color: var(--ink); background: rgba(5, 5, 5, 0.35);
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.uv__cta:hover, .uv__cta:focus-visible { background: var(--ink); color: var(--space); border-color: var(--ink); }
.uv .w { display: inline-block; }

/* Les pièces : posées en éventail au-dessus de la question, elles montent à l'arrivée (portail.js les décale au défilement) */
.uv__pieces { display: flex; align-items: flex-end; gap: 4%; margin: 0 0 30px; }
.pc { position: relative; flex: 0 0 29%; margin: 0; transform-origin: 50% 80%; }
.pc img { display: block; width: 100%; height: auto; box-shadow: 0 18px 30px rgba(0, 0, 0, 0.55), 0 3px 6px rgba(0, 0, 0, 0.35); }
.pc--photo img, .pc--video img { padding: 5px 5px 6px; background: var(--paper); aspect-ratio: 1 / 1; object-fit: cover; }
.pc--video img { aspect-ratio: 4 / 3; background: var(--paper); }
.pc figcaption { margin-top: 9px; font-size: 12px; line-height: 1.35; letter-spacing: 0.01em; color: var(--mute); text-shadow: 0 1px 6px rgba(5, 5, 5, 0.9); }

/* La liste de tous les dossiers */
.ix { left: var(--gut); top: 50%; width: min(36em, 46vw); transform: translateY(-50%); }
.ix__title { margin: 0 0 22px; font-weight: 300; font-size: clamp(30px, 3.4vw, 56px); line-height: 1.05; text-shadow: 0 0 26px rgba(5, 5, 5, 0.75); }
.ix__list { list-style: none; margin: 0; padding: 0; }
.ix__list li { border-top: 1px solid rgba(236, 232, 223, 0.16); }
.ix__list li:last-child { border-bottom: 1px solid rgba(236, 232, 223, 0.16); }
.ix__list a { display: grid; grid-template-columns: 6.6em 1fr; gap: 4px 18px; padding: 18px 0; text-decoration: none; }
.ix__years { grid-row: span 2; padding-top: 6px; font-size: 14px; letter-spacing: 0.02em; color: var(--mute); }
.ix__name { font-weight: 300; font-size: clamp(20px, 1.7vw, 28px); line-height: 1.2; text-shadow: 0 0 20px rgba(5, 5, 5, 0.8); }
.ix__meta { font-size: 13.5px; color: var(--mute); }
.ix__list a:hover .ix__name, .ix__list a:focus-visible .ix__name { text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
.ix__next { margin: 20px 0 0; font-size: 15px; color: var(--mute); }

/* Le repère (même que la landing ovni) */
.ping { position: absolute; left: 0; top: 0; z-index: 1; width: 0; height: 0; opacity: 0; pointer-events: none; }
.ping__dot { position: absolute; left: -3.5px; top: -3.5px; width: 7px; height: 7px; border-radius: 50%; background: #ff4e36; box-shadow: 0 0 0 1.5px rgba(5, 5, 5, 0.55); }
.ping__lock { position: absolute; left: -18px; top: -18px; width: 36px; height: 36px; opacity: 0; transform: scale(2) rotate(45deg); transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease; }
.ping.is-locked .ping__lock { opacity: 0.9; transform: none; }
.ping__lock i { position: absolute; width: 9px; height: 9px; border: 0 solid #f4f1ea; }
.ping__lock i:nth-child(1) { left: 0; top: 0; border-top-width: 1.5px; border-left-width: 1.5px; }
.ping__lock i:nth-child(2) { right: 0; top: 0; border-top-width: 1.5px; border-right-width: 1.5px; }
.ping__lock i:nth-child(3) { left: 0; bottom: 0; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.ping__lock i:nth-child(4) { right: 0; bottom: 0; border-bottom-width: 1.5px; border-right-width: 1.5px; }
.ping__place { position: absolute; left: 28px; top: -10px; white-space: nowrap; font-size: 14px; letter-spacing: 0.02em; color: #f4f1ea; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85); opacity: 0; transition: opacity 0.4s ease; }
.ping.is-locked .ping__place { opacity: 1; transition-delay: 0.45s; }

/* Les articles, par univers */
.reads { position: relative; z-index: 3; padding: 14svh var(--gut) 10svh; background: linear-gradient(rgba(5, 5, 5, 0), var(--space) 18svh); }
.reads__title { margin: 0; font-weight: 300; font-size: clamp(30px, 3.4vw, 56px); line-height: 1.05; }
.reads__line { margin: 14px 0 0; font-size: 17px; color: #cfc8bc; }
.reads__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(28px, 5vw, 80px); margin-top: 40px; max-width: 1240px; }
.reads__col h3 { margin: 0 0 6px; font-size: 14px; font-weight: 400; letter-spacing: 0.02em; color: var(--mute); }
.reads__col ul { list-style: none; margin: 0; padding: 0; }
.reads__col li a { display: block; padding: 15px 0; border-bottom: 1px solid rgba(236, 232, 223, 0.13); text-decoration: none; font-weight: 300; font-size: 19px; line-height: 1.35; }
.reads__col li a:hover, .reads__col li a:focus-visible { color: #fff; text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
.reads__all { display: inline-block; margin-top: 28px; font-size: 16px; text-underline-offset: 0.2em; }

.foot { position: relative; z-index: 3; padding: 6svh var(--gut) calc(40px + env(safe-area-inset-bottom)); background: var(--space); color: var(--mute); font-size: 14px; line-height: 1.6; }
.foot__links { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-bottom: 14px; }
.foot__links a { color: var(--mute); text-decoration: none; }
.foot__links a:hover { color: var(--ink); }
.foot p { margin: 0; max-width: 60em; }

/* Sans WebGL : les dossiers restent lisibles, empilés */
html.no-webgl .space, html.no-webgl .ping { display: none; }
html.no-js .trip, html.no-webgl .trip { height: auto; }
html.no-js .stage, html.no-webgl .stage { position: relative; height: auto; overflow: visible; padding: 18svh 0 4svh; }
html.no-js .beat, html.no-webgl .beat { position: relative; inset: auto; left: auto; top: auto; bottom: auto; transform: none; opacity: 1; visibility: visible; margin: 0 var(--gut) 12svh; width: auto; }
html.no-js .uv__text, html.no-webgl .uv__text { position: relative; left: auto; top: auto; transform: none; width: auto; max-width: 36em; }

/* ------------------------------------------------------------------ téléphone : les astres en haut, le texte en bas */
@media (max-aspect-ratio: 21/20) {
    .top__logo img { height: 24px; }
    .ping__place { left: -90px; top: 22px; width: 180px; text-align: center; white-space: normal; font-size: 13px; }
    .shade { opacity: 1; background: linear-gradient(rgba(5, 5, 5, 0) 38%, rgba(5, 5, 5, 0.72) 62%, rgba(5, 5, 5, 0.9)); }
    .hero { bottom: calc(9svh + env(safe-area-inset-bottom)); }
    .hero__title { font-size: clamp(38px, 10.5vw, 60px); }
    .hero__line { font-size: 17px; margin-top: 18px; }
    .say { bottom: auto; top: 58svh; max-width: 11em; font-size: clamp(28px, 8.4vw, 44px); }
    .uv__text { top: auto; bottom: calc(6svh + env(safe-area-inset-bottom)); left: var(--gut) !important; width: calc(100vw - 2 * var(--gut)); transform: none; }
    .uv__title { font-size: clamp(26px, 7.4vw, 36px); }
    .uv__line { font-size: 16px; margin-top: 14px; }
    .uv__meta { font-size: 13px; margin-top: 12px; }
    .uv__cta { margin-top: 18px; padding: 13px 20px; font-size: 15px; }
    .uv__pieces { gap: 5%; margin-bottom: 18px; }
    .pc { flex-basis: 24%; }
    .pc figcaption { display: none; }
    .ix { top: auto; bottom: calc(6svh + env(safe-area-inset-bottom)); width: calc(100vw - 2 * var(--gut)); transform: none; }
    .ix__title { font-size: 32px; margin-bottom: 14px; }
    .ix__list a { grid-template-columns: 1fr; gap: 2px; padding: 14px 0; }
    .ix__years { grid-row: auto; padding-top: 0; font-size: 13px; }
    .ix__name { font-size: 20px; }
    .reads__cols { grid-template-columns: 1fr; }
    .reads__col + .reads__col { margin-top: 34px; }
    .reads__col li a { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
    .js .beat, .js .beat.is-on { transition: none; }
    .space { transition: none; }
}

/* Écran large mais bas (portable) : les pièces et le texte tiennent dans la hauteur */
@media (min-aspect-ratio: 21/20) and (max-height: 760px) {
    .uv__pieces { margin-bottom: 18px; }
    .pc { flex-basis: 22%; }
    .uv__line { font-size: 16px; margin-top: 14px; }
    .uv__cta { margin-top: 18px; }
}

/* Sélecteur de langue compact (05/12/2026) : langue courante + menu déroulant */
.langsel { position: relative; font-size: 14px; letter-spacing: 0.06em; }
.langsel summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; padding: 8px 2px; color: var(--ink, #ece8df); -webkit-tap-highlight-color: transparent; }
.langsel summary::-webkit-details-marker { display: none; }
.langsel summary svg { opacity: 0.7; transition: transform 0.2s; }
.langsel[open] summary svg { transform: rotate(180deg); }
.langsel__menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 158px; padding: 6px 0; background: #0b0b0a; border: 1px solid rgba(236, 232, 223, 0.18); display: flex; flex-direction: column; }
.langsel__menu a { display: flex; gap: 12px; padding: 9px 16px; color: var(--mute, #908b81); text-decoration: none; letter-spacing: 0.02em; white-space: nowrap; }
.langsel__menu a b { font-weight: 500; color: var(--ink, #ece8df); min-width: 22px; letter-spacing: 0.06em; }
.langsel__menu a:hover, .langsel__menu a:focus-visible { color: var(--ink, #ece8df); background: rgba(236, 232, 223, 0.06); }
