/* Shared styles. Page-specific rules live in styles/pages/<page>.css. */

@font-face {
    font-family: 'Schibsted Grotesk';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/schibsted-grotesk-latin-Y3zTFut.woff2") format('woff2');
}

:root {
    --ink: #111111;
    --muted: #6B6B66;
    --line: #DDDCD8;
    --bg: #FFFFFF;
    --tint: #F6F5F2;
    --footer: #EDECE8;
    --photo: #BEBBB4;
    --accent: #E4572E;
    --gutter: 32px;
    --font: 'Schibsted Grotesk', system-ui, sans-serif;
}

@media (max-width: 760px) {
    :root { --gutter: 20px; }
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    -webkit-text-size-adjust: 100%;
}

a { color: inherit; }
a:hover { color: var(--muted); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 3px;
}

h1, h2, h3, p, figure, dl, dd { margin: 0; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    top: 8px; left: 8px;
    z-index: 10;
    padding: 12px 16px;
    background: var(--ink);
    color: var(--bg);
    font-weight: 700;
    transform: translateY(-200%);
}
.skip-link:focus { transform: none; color: var(--bg); }

/* ---------- Layout helpers ---------- */

.gutter { padding-inline: var(--gutter); }
.muted { color: var(--muted); }
.narrow-only { display: none; }

/* Fake personal data ([[…]] in content): blurred, unselectable */
.redacted { display: inline-block; filter: blur(0.18em); user-select: none; }

@media (max-width: 760px) {
    .narrow-only { display: initial; }
    .wide-only { display: none !important; }
}

/* Giant page title (h1 of inner pages) */
.display {
    font-size: clamp(56px, 9vw, 144px);
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: -0.03em;
}
.display__count {
    font-size: 0.3em;
    font-weight: 500;
    letter-spacing: 0;
    vertical-align: top;
    color: var(--muted);
}

/* Small bold section title ("Actualités", "L'équipe"…) */
.kicker { font-size: 15px; font-weight: 700; }

/* Grey placeholder standing in for a photo. Set --tone inline for a specific grey. */
.photo {
    display: flex;
    align-items: flex-end;
    padding: 12px;
    background: var(--tone, var(--photo));
    color: var(--ink);
    font-size: 13px;
    position: relative;
    overflow: hidden;
    container-type: inline-size;
}
.photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo__ai {
    position: absolute;
    right: 8px;
    bottom: 8px;
    padding: 2px 6px;
    background: rgb(17 17 17 / 0.75);
    color: #fff;
    font-size: 11px;
    line-height: 1.4;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
    pointer-events: none;
}
/* Thumbnails only have room for the short form. */
@container (max-width: 240px) {
    .photo__ai { right: 4px; bottom: 4px; padding: 1px 4px; font-size: 10px; }
    .photo__ai-long { display: none; }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border: 1px solid var(--ink);
    background: var(--ink);
    color: var(--bg);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}
.btn:hover { color: var(--bg); background: #333330; }
.btn--outline { background: var(--bg); color: var(--ink); }
.btn--outline:hover { color: var(--ink); background: var(--tint); }

/* ---------- Demo banner ---------- */

.demo-banner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 12px;
    padding: 8px var(--gutter);
    background: var(--footer);
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
}
.demo-banner a { font-weight: 700; }

/* ---------- Header ---------- */

.site-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0 24px;
    padding: 20px var(--gutter);
    font-size: 15px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    font-weight: 700;
    text-decoration: none;
}
.brand__dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--accent);
}
.nav__list {
    display: flex;
    gap: 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.nav__link { text-decoration: none; }
.nav__link[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; text-decoration-color: var(--accent); }
.nav__extra { display: none; }
.burger {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
}
.burger__close { display: none; }

@media (max-width: 760px) {
    .site-header { padding: 12px var(--gutter); }
    .burger { display: flex; }
    .nav { display: none; flex-basis: 100%; }
    .site-header.is-open .nav { display: block; }
    .site-header.is-open .burger__open { display: none; }
    .site-header.is-open .burger__close { display: inline; }
    .nav__list {
        flex-direction: column;
        gap: 0;
        padding: 8px 0 28px;
        border-bottom: 1px solid var(--ink);
    }
    .nav__link {
        display: block;
        padding: 8px 0;
        font-size: 34px;
        font-weight: 700;
        letter-spacing: -0.02em;
    }
    .nav__extra { display: block; }
    .nav__extra .nav__link {
        padding: 12px 0 0;
        font-size: 17px;
        font-weight: 400;
        letter-spacing: 0;
    }
}

/* ---------- Footer ---------- */

.site-footer { background: var(--footer); font-size: 15px; line-height: 1.6; }
.site-footer__cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    padding: 48px var(--gutter) 24px;
}
.site-footer__col { display: flex; flex-direction: column; }
.site-footer__title { font-weight: 700; }
.site-footer__note { padding: 0 var(--gutter) 24px; font-size: 13px; color: var(--muted); }

@media (max-width: 760px) {
    .site-footer__cols { gap: 20px; padding-top: 32px; }
}

/* ---------- Breadcrumb ---------- */

.breadcrumb { font-size: 14px; color: var(--muted); }
.breadcrumb ol { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.breadcrumb li + li::before { content: '/'; padding: 0 0.4em; }

/* ---------- Filters (aria-pressed buttons) and list / grid toggle ---------- */

.filters { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.filter {
    min-height: 44px;
    padding: 0;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 15px;
    cursor: pointer;
}
.filter[aria-pressed="true"] { border-bottom-color: var(--accent); font-weight: 700; }

@media (max-width: 760px) {
    /* One scrollable line of filters, edge to edge */
    .filters { flex-wrap: nowrap; gap: 18px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
    .filter { flex: none; }
    /* overflow-x clips outlines drawn outside the scroll box */
    .filter:focus-visible { outline-offset: -2px; }
}

.toggle { display: flex; gap: 4px; }
.toggle__btn {
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--ink);
    background: var(--bg);
    font-size: 14px;
    cursor: pointer;
}
.toggle__btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* ---------- Project index rows (home + projects list view) ---------- */

.project-rows { --cols: 96px minmax(0, 3fr) minmax(0, 1.4fr) minmax(0, 1.4fr) 64px; }
.project-rows--full { --cols: 96px minmax(0, 3fr) minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.2fr) 64px; }
.project-row {
    display: grid;
    grid-template-columns: var(--cols);
    gap: 24px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
    text-decoration: none;
}
.project-row--head { font-size: 13px; color: var(--muted); }
.project-row__thumb { aspect-ratio: 4 / 3; background: var(--tone, var(--photo)); }
.project-row__main { display: flex; flex-direction: column; gap: 2px; }
.project-row__name { font-size: clamp(20px, 2vw, 28px); font-weight: 500; line-height: 1.15; }
.project-row__place { font-size: 14px; color: var(--muted); }
.project-row__prog { line-height: 1.4; }

@media (max-width: 760px) {
    .project-rows, .project-rows--full { --cols: 72px minmax(0, 1fr); }
    .project-row { gap: 16px; }
}

/* ---------- Cards (project grid, news, related) ---------- */

.card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; }
.card__img { aspect-ratio: var(--ratio, 3 / 2); }
.card__meta { font-size: 13px; color: var(--muted); }
.card__title { font-size: 22px; font-weight: 500; line-height: 1.25; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--min, 300px), 1fr)); gap: var(--gap, 48px 24px); }

[hidden] { display: none !important; }

/* ---------- Forms ---------- */

.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; align-content: start; }
.field { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.field--full { grid-column: 1 / -1; }
.field > label { font-weight: 500; }
.field__input {
    min-height: 48px;
    padding: 0 12px;
    border: 1px solid var(--ink);
    border-radius: 0;
    background: var(--bg);
    font: inherit;
    font-size: 16px;
}
textarea.field__input { padding: 12px; resize: vertical; }
input[type="file"].field__input { padding: 10px 12px; }
.field__input[aria-invalid="true"] { border-color: #B3261E; border-width: 2px; }
.field__help { color: var(--muted); }
.field__error { margin: 0; padding: 0; list-style: none; color: #B3261E; font-weight: 500; }
.field--check { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 4px 12px; line-height: 1.5; }
.field--check input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--ink); }
.field--check label { flex: 1 1 0; font-weight: 400; }
.field--check .field__error { flex-basis: 100%; }
.form__submit { justify-self: start; min-height: 52px; padding: 0 32px; }
.form-errors { grid-column: 1 / -1; padding: 16px; border: 2px solid #B3261E; color: #B3261E; font-weight: 500; }

.confirmation {
    padding: 32px;
    background: var(--tint);
    border-top: 2px solid var(--accent);
    font-size: 17px;
    line-height: 1.6;
}
.confirmation__title { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
