/* Martian Mono (licence libre OFL, voir assets/fonts/OFL.txt) : une seule police variable, graisse et largeur réglables */
@font-face {
    font-family: 'Martian Mono';
    src: url('assets/fonts/MartianMono-latin.woff2') format('woff2');
    font-weight: 100 800;
    font-stretch: 75% 112.5%;
    font-display: swap;
}

:root {
    --bg: #030304;
    --text: #e6e6e3;
    --muted: #8d8d88;
    --line: rgba(230, 230, 227, 0.16);
    --red: #e3262d;  /* le rouge du titre « sirena_01 » des vidéos */
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Martian Mono', ui-monospace, monospace;
    font-weight: 300;
    font-stretch: 87.5%;
    font-size: 15px;
    line-height: 1.7;
}

/* Une seule langue visible à la fois */
html:not([data-lang="fr"]) [lang="fr"],
html:not([data-lang="eu"]) [lang="eu"],
html:not([data-lang="en"]) [lang="en"] {
    display: none;
}

a {
    color: inherit;
}

/* ---------- Barre du haut ---------- */

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px 24px;
    background: linear-gradient(rgba(3, 3, 4, 0.85), transparent);
}

.wordmark {
    text-decoration: none;
    letter-spacing: 0.04em;
}

.topbar nav {
    display: flex;
    gap: 20px;
    margin-left: auto;
}

.topbar nav a {
    text-decoration: none;
    opacity: 0.75;
}

.topbar nav a:hover {
    opacity: 1;
}

.lang-switch {
    display: flex;
    gap: 4px;
}

.lang-switch button {
    font: inherit;
    font-size: 0.8em;
    color: var(--muted);
    background: none;
    border: 1px solid transparent;
    padding: 2px 6px;
    cursor: pointer;
}

html[data-lang="fr"] [data-set-lang="fr"],
html[data-lang="eu"] [data-set-lang="eu"],
html[data-lang="en"] [data-set-lang="en"] {
    color: var(--text);
    border-color: var(--line);
}

/* ---------- Accueil : teaser plein écran ---------- */

.hero {
    position: relative;
    height: 100vh;
    height: 100svh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-text {
    position: relative;
    text-align: center;
    padding: 0 16px;
    text-shadow: 0 0 24px rgba(0, 0, 0, 0.6);
}

.hero-text h1 {
    margin: 0;
    color: var(--red);
    font-size: clamp(2.6rem, 9vw, 6rem);
    font-weight: 250;
    font-stretch: 100%;
    letter-spacing: -0.04em;
    line-height: 1;
}

.hero-text p {
    margin: 0.6em 0 0;
    font-size: clamp(0.9rem, 2.2vw, 1.15rem);
}

.hero-sound {
    position: absolute;
    right: 20px;
    bottom: 20px;
    width: 48px;
    height: 48px;
    padding: 10px;
    color: var(--text);
    background: rgba(3, 3, 4, 0.4);
    border: 1px solid var(--line);
    border-radius: 50%;
    cursor: pointer;
}

.hero-sound svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.hero-sound .icon-on,
.hero-sound[aria-pressed="true"] .icon-off {
    display: none;
}

.hero-sound[aria-pressed="true"] .icon-on {
    display: block;
}

/* ---------- Rubriques ---------- */

.block {
    width: min(1040px, calc(100% - 32px));
    margin: 0 auto;
    padding: 12vh 0 0;
    scroll-margin-top: 40px;
}

.block h2 {
    margin: 0 0 1.2em;
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 500;
    letter-spacing: -0.03em;
}

.block h2 small {
    font-weight: 300;
    color: var(--muted);
    font-size: 0.6em;
}

.text {
    max-width: 680px;
    font-size: clamp(0.95rem, 1.4vw, 1.05rem);
}

.credit {
    margin: 8px 0 0;
    font-size: 0.8em;
    color: var(--muted);
}

.text p {
    margin: 0 0 1em;
}

/* Photos */

.photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
    margin-top: 48px;
}

.photos button {
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.photos img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.photos button:hover img {
    transform: scale(1.04);
}

/* Vidéos : une horizontale, deux verticales */

.videos {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 12px;
    margin-top: 48px;
    align-items: start;
}

.videos figure {
    margin: 0;
}

.videos video {
    display: block;
    width: 100%;
    background: #000;
}

.video-wide video {
    aspect-ratio: 16 / 9;
}

.video-tall video {
    aspect-ratio: 9 / 16;
}

.videos figcaption {
    margin-top: 6px;
    font-size: 0.85em;
    color: var(--muted);
}

@media (max-width: 700px) {
    .videos {
        grid-template-columns: 1fr 1fr;
    }

    .video-wide {
        grid-column: 1 / -1;
    }
}

/* Contact */

.links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.links li {
    padding: 12px 0;
    border-top: 1px solid var(--line);
}

.links .who {
    display: inline-block;
    min-width: 13em;
    color: var(--muted);
}

.links a {
    text-decoration: none;
}

.links a:hover {
    color: var(--red);
}

.footer {
    text-align: center;
    color: var(--muted);
    font-size: 0.8em;
    padding: 16vh 0 32px;
}

/* Agrandissement des photos */

#lightbox {
    max-width: 94vw;
    max-height: 94vh;
    padding: 0;
    border: 0;
    background: transparent;
}

#lightbox::backdrop {
    background: rgba(3, 3, 4, 0.94);
}

#lightbox img {
    display: block;
    max-width: 94vw;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close {
    position: fixed;
    top: 12px;
    right: 16px;
    font: inherit;
    font-size: 2rem;
    line-height: 1;
    color: var(--text);
    background: none;
    border: 0;
    cursor: pointer;
}

@media (max-width: 560px) {
    .topbar {
        gap: 12px;
        padding: 12px 16px;
    }

    .topbar nav {
        gap: 12px;
        font-size: 0.9em;
    }

    .topbar .wordmark {
        display: none;  /* la place manque : le menu suffit */
    }

    .links .who {
        display: block;
    }
}
