/* Galerie et photos épinglées : lignes justifiées (ratios d'origine), « viseur » au survol, grands titres. */

/* ---------- Grille : lignes justifiées en CSS pur ----------
   Chaque photo prend une largeur proportionnelle à son ratio (flex-grow) : toutes les photos d'une ligne ont la même
   hauteur et la ligne remplit toute la largeur. Le pseudo-élément absorbe le reste de la dernière ligne, pour qu'elle
   ne soit pas étirée. --row-h est la hauteur visée d'une ligne. */
.photo-grid {
    --row-h: 300px;
    --gap: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap);
}
.photo-grid::after {
    content: "";
    flex-grow: 1000000;
}
.photo-item {
    position: relative;
    min-width: 0;
    margin: 0;
    flex: calc(var(--ratio, 1) * 100) 1 calc(var(--ratio, 1) * var(--row-h));
}
.photo-item[hidden],
.project-card[hidden] {
    display: none;
}
.photo-item__link {
    display: block;
    position: relative;
    container-type: inline-size; /* le texte du calque s'adapte à la taille de la photo */
}
.photo-grid--pinned {
    --row-h: 400px;
    --gap: 12px;
}
/* Affichage « colonnes » (choisi avec le bouton de la galerie) : mosaïque, ratios conservés */
.photo-grid--columns {
    display: block;
    column-count: 4;
    column-gap: var(--gap);
}
.photo-grid--columns::after {
    display: none;
}
.photo-grid--columns .photo-item {
    break-inside: avoid;
    margin-bottom: var(--gap);
}
@media (max-width: 1100px) {
    .photo-grid--columns {
        column-count: 3;
    }
}
@media (max-width: 800px) {
    .photo-grid {
        --row-h: 175px;
        --gap: 6px;
    }
    .photo-grid--pinned {
        --row-h: 230px;
    }
    .photo-grid--columns {
        column-count: 2;
    }
}

/* Disposition « photo vedette » de la section épinglée (calculée par featured_controller.js) */
.photo-grid.is-featured {
    flex-direction: column;
    flex-wrap: nowrap;
}
.photo-grid.is-featured::after {
    display: none;
}
.featured__block,
.featured__col,
.featured__row,
.featured__rest {
    display: flex;
    gap: var(--gap);
}
.featured__col {
    flex-direction: column;
}
.is-featured .photo-item {
    flex: none;
}

/* ---------- Une photo dans une grille : numéro, étoile, viseur au survol ---------- */
.photo-item__no {
    position: absolute;
    left: 10px;
    bottom: 8px;
    z-index: 3;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.72);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
    pointer-events: none;
    transition: opacity 250ms var(--ease);
}
.photo-item__badge {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(13, 13, 13, 0.78);
    color: var(--accent-text);
    pointer-events: none;
}
.photo-item__over {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px 18px;
    background: linear-gradient(180deg, rgba(13, 13, 13, 0.3) 0%, rgba(13, 13, 13, 0.04) 42%, rgba(13, 13, 13, 0.9) 100%);
    color: #fff;
    opacity: 0;
    pointer-events: none;
    transition: opacity 350ms var(--ease);
}
/* Les quatre coins du viseur : se resserrent sur la photo au survol */
.photo-item__over::before {
    --c: var(--accent);
    content: "";
    position: absolute;
    inset: 12px;
    transform: scale(1.08);
    transition: transform 450ms var(--ease);
    background:
        linear-gradient(var(--c), var(--c)) left top / 18px 2px,
        linear-gradient(var(--c), var(--c)) left top / 2px 18px,
        linear-gradient(var(--c), var(--c)) right top / 18px 2px,
        linear-gradient(var(--c), var(--c)) right top / 2px 18px,
        linear-gradient(var(--c), var(--c)) left bottom / 18px 2px,
        linear-gradient(var(--c), var(--c)) left bottom / 2px 18px,
        linear-gradient(var(--c), var(--c)) right bottom / 18px 2px,
        linear-gradient(var(--c), var(--c)) right bottom / 2px 18px;
    background-repeat: no-repeat;
}
.photo-item__chip {
    align-self: flex-start;
    margin: 4px 0 0 4px;
    padding: 4px 8px;
    border-radius: 3px;
    background: var(--accent);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
}
.photo-item__info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 52px 6px 4px;
    min-height: 0;
}
.photo-item__title {
    font-family: var(--font-display);
    font-size: clamp(11px, 7cqw, 20px);
    line-height: 1.1;
    letter-spacing: -0.01em;
    text-transform: uppercase;
}
.photo-item__brand,
.photo-item__shoot {
    font-family: var(--font-mono);
    font-size: clamp(8px, 3.4cqw, 11px);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #f0647f;
}
.photo-item__brand {
    color: #fff;
    opacity: 0.85;
}
.photo-item__go {
    position: absolute;
    right: 18px;
    bottom: 16px;
    display: grid;
    place-items: center;
    width: clamp(26px, 15cqw, 38px);
    height: clamp(26px, 15cqw, 38px);
    border-radius: 50%;
    background: var(--accent);
    transform: scale(0.7);
    transition: transform 350ms var(--ease);
}
@container (max-width: 170px) {
    .photo-item__shoot,
    .photo-item__brand {
        display: none;
    }
    .photo-item__over {
        padding: 10px;
    }
    .photo-item__over::before {
        inset: 8px;
    }
}
@media (hover: hover) {
    .photo-item__link:hover .photo-item__over,
    .photo-item__link:focus-visible .photo-item__over {
        opacity: 1;
    }
    .photo-item__link:hover .photo-item__over::before,
    .photo-item__link:focus-visible .photo-item__over::before {
        transform: scale(1);
    }
    .photo-item__link:hover .photo-item__go,
    .photo-item__link:focus-visible .photo-item__go {
        transform: scale(1);
    }
    .photo-item__link:hover .photo-item__no {
        opacity: 0;
    }
}
.photo-item__link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* ---------- Mots-clés communs ---------- */
.accent-dot {
    color: var(--accent);
}
.eyebrow--line {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}
.eyebrow--line::before {
    content: "";
    width: 28px;
    height: 2px;
    background: var(--accent);
}
.tag__count {
    margin-left: 6px;
    font-style: normal;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
}
.tag[aria-current="true"] .tag__count,
.tag[aria-pressed="true"] .tag__count {
    color: rgba(255, 255, 255, 0.78);
}
.btn--dark {
    background: #0d0d0d;
    color: #fff;
}
.btn--dark:hover {
    background: #000;
}
.btn svg {
    flex: none;
}

/* ---------- Galerie : en-tête ---------- */
.gallery-hero {
    position: relative;
    overflow: hidden;
    padding-block: 150px 96px;
}
.gallery-hero__glow {
    position: absolute;
    right: -140px;
    top: -180px;
    width: 780px;
    height: 780px;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(218, 49, 90, 0.34), rgba(218, 49, 90, 0));
    pointer-events: none;
}
.gallery-hero__bg {
    position: absolute;
    inset: -40px 0 -40px auto;
    width: min(780px, 58vw);
    will-change: transform;
}
.gallery-hero__bg picture,
.gallery-hero__bg img {
    display: block;
    width: 100%;
    height: 100%;
}
.gallery-hero__bg img {
    object-fit: cover;
    opacity: 0.55;
}
.gallery-hero__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, var(--bg) 0%, rgba(13, 13, 13, 0.55) 40%, rgba(13, 13, 13, 0.1) 100%),
        linear-gradient(0deg, var(--bg) 0%, transparent 45%);
}
[data-theme="light"] .gallery-hero__bg::after {
    background:
        linear-gradient(90deg, var(--bg) 0%, rgba(242, 242, 242, 0.6) 40%, rgba(242, 242, 242, 0.1) 100%),
        linear-gradient(0deg, var(--bg) 0%, transparent 45%);
}
.gallery-hero__ghost {
    position: absolute;
    left: 28px;
    top: 70px;
    font-family: var(--font-display);
    font-size: clamp(220px, 29vw, 440px);
    line-height: 1;
    letter-spacing: -0.05em;
    color: color-mix(in srgb, var(--text) 3%, transparent);
    pointer-events: none;
    user-select: none;
}
.gallery-hero__inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    column-gap: var(--space-7);
}
.gallery-hero__inner > .eyebrow {
    grid-column: 1 / -1;
}
.gallery-hero__title {
    margin: var(--space-5) 0 0;
    font-family: var(--font-display);
    font-size: clamp(52px, 8.6vw, 128px);
    line-height: 0.92;
    letter-spacing: -0.035em;
    font-weight: 400;
}
.gallery-stats {
    display: flex;
    gap: var(--space-7);
    margin: 0;
    padding-bottom: 14px;
}
.gallery-stat {
    display: flex;
    flex-direction: column-reverse;
    gap: var(--space-2);
}
.gallery-stat dd {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(34px, 3.8vw, 54px);
    line-height: 1;
    letter-spacing: -0.03em;
}
.gallery-stat dt {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}
@media (max-width: 800px) {
    .gallery-hero {
        padding-block: 110px 56px;
    }
    .gallery-hero__inner {
        grid-template-columns: 1fr;
        row-gap: var(--space-5);
    }
    .gallery-stats {
        gap: var(--space-6);
    }
}

/* ---------- Galerie : barre de recherche, filtres ---------- */
.gallery {
    --header-h: 76px;
    padding-bottom: var(--space-9);
}
.gallery-sticky {
    position: sticky;
    top: calc(var(--header-h) + 8px);
    z-index: 20;
    margin-top: -40px;
}
.gallery-bar {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface) 86%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.gallery-bar .search {
    display: flex;
    flex: 1;
    align-items: center;
    gap: var(--space-3);
    min-width: 0;
    height: 48px;
    padding: 0 20px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg);
    color: var(--text-muted);
}
.gallery-bar .search:focus-within {
    border-color: var(--accent);
}
.gallery-bar .search input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 15px;
    outline: none;
}
.search__key {
    padding: 2px 7px;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-family: var(--font-mono);
    font-size: 11px;
}
.view-toggle {
    display: flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg);
}
.view-toggle__btn {
    display: grid;
    place-items: center;
    width: 40px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
}
.view-toggle__btn[aria-pressed="true"] {
    background: var(--accent);
    color: #fff;
}
.sort {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    height: 48px;
    padding: 0 18px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
}
.sort select {
    height: 46px;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    cursor: pointer;
}
.sort select option {
    background: var(--surface);
}
.gallery-filters {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: var(--space-5);
    padding: 20px 22px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--surface);
}
.filter-row {
    display: flex;
    align-items: baseline;
    gap: var(--space-5);
}
.filter-row__label {
    flex: none;
    width: 60px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.filters-summary {
    display: flex;
    justify-content: space-between;
    gap: var(--space-4);
    margin: var(--space-5) 0 var(--space-4);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.filters-summary strong {
    font-weight: 500;
    color: var(--accent-text);
}
.filters-summary__reset {
    color: var(--accent-text);
    text-decoration: underline;
}
@media (max-width: 800px) {
    .gallery-sticky {
        margin-top: -28px;
    }
    .gallery-bar {
        flex-wrap: wrap;
        border-radius: 22px;
    }
    .gallery-bar .search {
        flex: 1 0 100%;
    }
    .search__key {
        display: none;
    }
    .sort {
        flex: 1;
    }
    .filter-row {
        flex-direction: column;
        gap: var(--space-2);
    }
    .filters-summary__note {
        display: none;
    }
}

/* ---------- Galerie : bandeau, « charger plus », appel à l'action ---------- */
.load-more {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
    margin-top: var(--space-8);
    padding: 36px 44px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--surface);
}
.load-more[hidden] {
    display: none;
}
.load-more__count {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin: 0;
    white-space: nowrap;
}
.load-more__count b {
    font-family: var(--font-display);
    font-size: clamp(56px, 7vw, 96px);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.04em;
}
.load-more__count span {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.load-more__bar {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    overflow: hidden;
}
.load-more__bar span {
    display: block;
    height: 100%;
    background: var(--accent);
    transition: width 500ms var(--ease);
}
@media (max-width: 800px) {
    .load-more {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-4);
        padding: 24px;
    }
    .load-more .btn {
        justify-content: center;
    }
}
.gallery-cta {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--space-6);
    min-height: 340px;
    margin-top: var(--space-9);
    padding: clamp(28px, 4vw, 56px);
    border-radius: 28px;
    background: linear-gradient(110deg, #da315a 0%, #8e1c3a 60%, #2a0f18 100%);
    color: #fff;
}
.gallery-cta__title {
    margin: 0;
    max-width: 780px;
    font-family: var(--font-display);
    font-size: clamp(40px, 5.8vw, 84px);
    line-height: 0.95;
    letter-spacing: -0.035em;
}
.gallery-cta__title span {
    color: #0d0d0d;
}
.gallery-cta .btn {
    align-self: flex-start;
}

/* ---------- Accueil : section « photos épinglées » ---------- */
.section--photo {
    position: relative;
    overflow: hidden;
}
.pinned-glow {
    position: absolute;
    right: -220px;
    top: -140px;
    width: 840px;
    height: 840px;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(218, 49, 90, 0.28), rgba(218, 49, 90, 0));
    pointer-events: none;
}
.pinned-ghost {
    position: absolute;
    left: 30px;
    top: 40px;
    font-family: var(--font-display);
    font-size: clamp(120px, 26vw, 380px);
    line-height: 1;
    letter-spacing: -0.05em;
    color: color-mix(in srgb, var(--text) 3%, transparent);
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}
.pinned {
    position: relative;
    z-index: 2;
}
.pinned-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-6);
}
.pinned-head h2 {
    margin: var(--space-5) 0 0;
    font-family: var(--font-display);
    font-size: clamp(40px, 7vw, 104px);
    line-height: 0.92;
    letter-spacing: -0.035em;
    font-weight: 400;
}
.pinned-count {
    margin: 0;
    text-align: right;
}
.pinned-count b {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(54px, 9vw, 132px);
    font-weight: 400;
    line-height: 0.9;
    letter-spacing: -0.05em;
    white-space: nowrap;
}
.pinned-count i {
    font-style: normal;
    color: var(--accent);
}
.pinned-count small {
    display: block;
    margin-top: 14px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.pinned-desc {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-6);
    margin-block: var(--space-7) var(--space-7);
}
.pinned-desc p {
    max-width: 520px;
    margin: 0;
    font-size: 18px;
    line-height: 1.55;
    color: var(--text-muted);
}
.pinned-desc .filters {
    margin: 0;
    justify-content: flex-end;
}
.pinned-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-5);
    margin-top: var(--space-7);
}
.pinned-cta__note {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.btn--circle {
    padding-right: 10px;
    gap: var(--space-4);
}
.btn--circle span {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #0d0d0d;
}
@media (max-width: 900px) {
    .pinned-head,
    .pinned-desc {
        flex-direction: column;
        align-items: flex-start;
    }
    .pinned-count {
        text-align: left;
    }
    .pinned-desc .filters {
        justify-content: flex-start;
    }
    .pinned-cta__note {
        display: none;
    }
    .pinned-cta {
        justify-content: stretch;
    }
    .pinned-cta .btn {
        flex: 1;
        justify-content: center;
    }
}
@media (prefers-reduced-motion: reduce) {
    .photo-item__over,
    .photo-item__over::before,
    .photo-item__go {
        transition: none;
    }
}

/* ---------- Légende sous la photo : seulement sur téléphone (sur ordinateur elle est dans le calque du survol) ---------- */
.photo-item__caption,
.photo-item__badge-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
.filters-btn,
.sheet-head,
.sheet-foot,
.sheet-backdrop,
.active-filters {
    display: none;
}
.filter-row--sheet-only {
    display: none;
}
.site-header__back {
    display: none;
}

/* ---------- Téléphone : mise en page de la maquette mobile (en-tête compact, panneau « Filtres », 2 colonnes avec légendes) ---------- */
@media (max-width: 800px) {
    /* En-tête des pages secondaires : « ← Accueil » à gauche, le nom à droite, pas de burger */
    .site-header--sub .site-header__inner {
        justify-content: space-between;
    }
    .site-header--sub .site-header__back {
        display: block;
        font-size: 15px;
        font-weight: 500;
    }
    .site-header--sub .brand {
        order: 2;
    }
    .site-header--sub .nav,
    .site-header--sub .header-actions {
        display: none;
    }

    /* Titre compact */
    .gallery-hero {
        padding-block: 96px 20px;
    }
    .gallery-hero__glow,
    .gallery-hero__bg,
    .gallery-hero__ghost {
        display: none;
    }
    .gallery-hero__title {
        margin-top: var(--space-3);
        font-size: clamp(36px, 11.5vw, 48px);
        line-height: 1;
    }
    .gallery-hero__inner {
        row-gap: var(--space-3);
    }
    .gallery-stats {
        gap: 0;
        padding: 0;
    }
    .gallery-stat {
        flex-direction: row-reverse;
        justify-content: flex-end;
        align-items: baseline;
        gap: 6px;
    }
    .gallery-stat + .gallery-stat::after {
        content: "·";
        margin-inline: 10px 2px;
        color: var(--text-muted);
    }
    .gallery-stat dd,
    .gallery-stat dt {
        font-family: var(--font-mono);
        font-size: 12px;
        font-weight: 400;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: var(--text-muted);
    }

    /* Recherche + bouton Filtres */
    .gallery-sticky {
        position: static;
        margin-top: var(--space-3);
    }
    .gallery-bar {
        flex-wrap: nowrap;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    .gallery-bar .search {
        flex: 1;
        height: 46px;
    }
    .js .filters-btn {
        display: flex;
        align-items: center;
        gap: var(--space-2);
        height: 46px;
        padding: 0 22px;
        border: 0;
        border-radius: 999px;
        background: var(--accent);
        color: #fff;
        font: inherit;
        font-weight: 600;
        cursor: pointer;
    }
    .filters-btn__n {
        font-family: var(--font-mono);
        font-size: 12px;
    }
    .js .view-toggle,
    .js .sort {
        display: none;
    }
    .active-filters {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-2);
        margin-top: var(--space-4);
    }
    .filters-summary {
        margin-block: var(--space-4);
    }

    /* Panneau de filtres : monte du bas de l'écran (sans JavaScript, il reste affiché dans la page) */
    .gallery-filters {
        margin-top: var(--space-4);
    }
    .js .gallery-filters {
        position: fixed;
        inset: auto 0 0 0;
        z-index: 120;
        max-height: 88vh;
        margin: 0;
        padding: 14px 20px calc(20px + env(safe-area-inset-bottom));
        overflow-y: auto;
        border-radius: 24px 24px 0 0;
        border-bottom: 0;
        background: var(--surface);
        transform: translateY(105%);
        visibility: hidden;
        transition: transform 420ms var(--ease), visibility 0s linear 420ms;
    }
    .js .gallery-filters.is-open {
        transform: none;
        visibility: visible;
        transition: transform 420ms var(--ease);
    }
    .js .sheet-backdrop {
        position: fixed;
        inset: 0;
        z-index: 110;
        display: block;
        background: rgba(0, 0, 0, 0.62);
    }
    .js .sheet-backdrop[hidden] {
        display: none;
    }
    .js .sheet-head {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-top: 14px;
    }
    .sheet-handle {
        position: absolute;
        top: 0;
        left: 50%;
        width: 40px;
        height: 4px;
        margin-left: -20px;
        border-radius: 2px;
        background: var(--border);
    }
    .sheet-title {
        margin: 0;
        font-family: var(--font-heading);
        font-weight: 800;
        font-size: 28px;
    }
    .sheet-close {
        display: grid;
        place-items: center;
        width: 40px;
        height: 40px;
        border: 0;
        background: transparent;
        color: var(--text);
        cursor: pointer;
    }
    .js .filter-row--sheet-only {
        display: flex;
    }
    .js .sheet-foot {
        position: sticky;
        bottom: 0;
        display: flex;
        gap: var(--space-3);
        padding-top: var(--space-3);
        background: var(--surface);
    }
    .sheet-foot .btn {
        flex: 1;
        justify-content: center;
        padding-inline: 12px;
        white-space: nowrap;
    }

    /* Grille : 2 colonnes, ratios d'origine, légende sous chaque photo (comme la maquette) */
    .photo-grid,
    .photo-grid--pinned {
        display: block;
        column-count: 2;
        column-gap: 12px;
    }
    /* Accueil sur téléphone : la sélection se limite aux 6 premières photos (« Voir toute la galerie » donne le reste). Une fois
       un tag choisi (data-filtered, voir filter_controller.js), le contrôleur limite lui-même le nombre de photos montrées. */
    .photo-grid--pinned:not([data-filtered]) > .photo-item:nth-child(n + 7) {
        display: none;
    }
    .photo-grid::after {
        display: none;
    }
    .photo-item {
        break-inside: avoid;
        margin-bottom: 16px;
    }
    .photo-item__over,
    .photo-item__no {
        display: none;
    }
    .photo-item__caption {
        position: static;
        display: flex;
        flex-direction: column;
        gap: 2px;
        width: auto;
        height: auto;
        margin-top: 8px;
        overflow: visible;
        clip: auto;
        white-space: normal;
        font-family: var(--font-mono);
        font-size: 11px;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: var(--text-muted);
    }
    .photo-item__caption-brand {
        color: var(--accent-text);
    }
    .photo-item__badge {
        top: 8px;
        right: auto;
        left: 8px;
        display: flex;
        align-items: center;
        gap: 6px;
        width: auto;
        height: auto;
        padding: 5px 10px 5px 8px;
        border-radius: 999px;
        font-size: 11px;
        line-height: 1;
        color: #fff;
    }
    .photo-item__badge svg {
        color: var(--accent-text);
    }
    .photo-item__badge-label {
        position: static;
        width: auto;
        height: auto;
        overflow: visible;
        clip: auto;
    }

    /* Charger plus : compteur discret, barre fine, grand bouton */
    .load-more {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-3);
        margin-top: var(--space-5);
        padding: 0;
        border: 0;
        background: none;
    }
    .load-more__count {
        justify-content: center;
        gap: 6px;
    }
    .load-more__count b {
        font-family: var(--font-mono);
        font-size: 11px;
        font-weight: 400;
        letter-spacing: 0.1em;
        color: var(--text-muted);
    }
    .load-more__count span {
        font-size: 11px;
    }
    .load-more .btn {
        height: 52px;
        justify-content: center;
    }
    .load-more__bar {
        flex: none;
        width: 100%;
    }
    .gallery-cta {
        display: none;
    }
    .gallery {
        padding-bottom: var(--space-7);
    }

    /* Accueil, photos épinglées : titre compact, filtres qui défilent, bouton fin */
    .pinned-glow,
    .pinned-ghost,
    .pinned-desc p,
    .pinned-count {
        display: none;
    }
    .pinned-head h2 {
        margin-top: var(--space-3);
        font-size: clamp(30px, 8.6vw, 38px);
        line-height: 1.05;
    }
    .pinned-desc {
        margin-block: var(--space-4) var(--space-5);
    }
    /* Les tags passent à la ligne et restent dans l'écran, comme le filtre des projets. Ils étaient prévus pour défiler en une
       seule ligne, mais la boîte s'élargissait à la largeur de tous les tags (1 000 px et plus) au lieu de se limiter à l'écran :
       le défilement ne s'enclenchait jamais et les tags sortaient de l'écran. */
    .pinned-desc .filters {
        flex-wrap: wrap;
        width: 100%;
        max-width: 100%;
    }
    .pinned-cta {
        margin-top: var(--space-5);
    }
    /* Même bouton que sur ordinateur (rose, avec le rond de la flèche), sur toute la largeur. Il était réduit à un contour
       transparent sans marge verticale (23 px de haut). */
    .btn--circle {
        justify-content: space-between;
        padding: 6px 6px 6px 24px;
    }
}
