/* ── Modales & lightbox — style éditorial ── */

.tas-modal,
.lightbox,
.flipbook-modal {
    --modal-ease: cubic-bezier(0.33, 1, 0.68, 1);
    --modal-ease-in: cubic-bezier(0.4, 0, 0.2, 1);
    --modal-duration: 0s;
    --modal-paper: #fbfaf7;
    --modal-ink: #15243d;
    --modal-muted: #5c6d82;
    --modal-line: rgba(21, 36, 61, 0.1);
    --modal-overlay: rgba(10, 22, 40, 0.62);
    --modal-radius: 22px;
    --modal-shadow:
        0 28px 70px rgba(10, 22, 40, 0.2),
        0 2px 0 rgba(255, 255, 255, 0.65) inset;
}

.tas-modal,
.lightbox,
.flipbook-modal {
    border: none;
    padding: 0;
    background: transparent;
    max-width: none;
    max-height: none;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.tas-modal::backdrop,
.lightbox::backdrop,
.flipbook-modal::backdrop {
    background: transparent;
}

.tas-modal__backdrop,
.lightbox__backdrop,
.flipbook-modal__backdrop {
    position: fixed;
    inset: 0;
    background: var(--modal-overlay);
    opacity: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: none;
    pointer-events: none;
}

.tas-modal.is-visible .tas-modal__backdrop,
.tas-modal.is-closing .tas-modal__backdrop,
.lightbox.is-visible .lightbox__backdrop,
.lightbox.is-closing .lightbox__backdrop,
.flipbook-modal.is-visible .flipbook-modal__backdrop,
.flipbook-modal.is-closing .flipbook-modal__backdrop {
    pointer-events: auto;
}

.tas-modal.is-visible .tas-modal__backdrop,
.lightbox.is-visible .lightbox__backdrop,
.flipbook-modal.is-visible .flipbook-modal__backdrop {
    opacity: 1;
}

.tas-modal.is-closing .tas-modal__backdrop,
.lightbox.is-closing .lightbox__backdrop,
.flipbook-modal.is-closing .flipbook-modal__backdrop {
    opacity: 0;
}

/* Bouton fermer commun */
.tas-modal__close,
.lightbox__close,
.flipbook-modal__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    color: var(--modal-muted);
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--modal-line);
    border-radius: 50%;
    cursor: pointer;
    transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.tas-modal__close:hover,
.lightbox__close:hover,
.flipbook-modal__close:hover {
    color: var(--modal-ink);
    background: #ffffff;
    border-color: rgba(21, 36, 61, 0.16);
    transform: scale(1.04);
}

.tas-modal__close:focus-visible,
.lightbox__close:focus-visible,
.flipbook-modal__close:focus-visible,
.lightbox__nav:focus-visible,
.flipbook-modal__nav:focus-visible,
.flipbook-modal__download:focus-visible,
.flipbook-modal__btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ── Modale contenu (TAS) ── */

.tas-modal__panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% + 10px));
    width: min(880px, calc(100vw - 48px));
    max-height: min(92vh, 900px);
    display: flex;
    flex-direction: column;
    color: var(--modal-ink);
    background:
        radial-gradient(ellipse 120% 80% at 50% -20%, rgba(255, 255, 255, 0.9), transparent 55%),
        var(--modal-paper);
    border: 1px solid var(--modal-line);
    border-radius: var(--modal-radius);
    box-shadow: var(--modal-shadow);
    overflow: hidden;
    opacity: 0;
    transition: none;
}

.tas-modal.is-visible .tas-modal__panel {
    transform: translate(-50%, -50%);
    opacity: 1;
}

.tas-modal.is-closing .tas-modal__panel {
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: none;
}

.tas-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 3;
}

.tas-modal__header {
    position: relative;
    padding: 28px 64px 20px 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, transparent 100%);
}

.tas-modal__meta {
    min-width: 0;
}

.tas-modal__eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--color-secondary);
    margin-bottom: 8px;
}

.tas-modal__title {
    font-size: clamp(1.35rem, 3.2vw, 1.65rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.025em;
    color: var(--modal-ink);
    margin: 0;
}

.tas-modal__date,
.tas-modal__location {
    font-size: 0.875rem;
    color: var(--modal-muted);
    line-height: 1.5;
    margin-top: 8px;
}

.tas-modal__body {
    padding: 4px 28px 28px;
    overflow-y: auto;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: rgba(21, 36, 61, 0.22) transparent;
    transition: none;
}

.tas-modal__body.is-swapping {
    opacity: 1;
}

.tas-modal__body::-webkit-scrollbar { width: 5px; }
.tas-modal__body::-webkit-scrollbar-thumb {
    background: rgba(21, 36, 61, 0.2);
    border-radius: 999px;
}

.tas-modal__para {
    font-size: 0.96875rem;
    line-height: 1.78;
    color: var(--modal-muted);
    margin-bottom: 16px;
}

.tas-modal__para:last-child { margin-bottom: 0; }

.tas-modal__list {
    padding-left: 1.15rem;
    font-size: 0.96875rem;
    line-height: 1.72;
    color: var(--modal-muted);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tas-modal__list li::marker { color: var(--color-secondary); }

.tas-modal__figure {
    margin: 0 0 22px;
    padding: 16px;
    background: #0e1c30;
    border-radius: 14px;
    line-height: 0;
    text-align: center;
}

.tas-modal__figure-img {
    width: 100%;
    max-width: 260px;
    max-height: 260px;
    object-fit: contain;
}

.tas-modal__loading {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9375rem;
    color: var(--modal-muted);
    padding: 12px 0;
}

.tas-modal__spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(21, 36, 61, 0.12);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: modalSpin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes modalSpin {
    to { transform: rotate(360deg); }
}

.tas-modal__para--departure {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--modal-line);
}

.tas-modal__para--departure strong {
    color: var(--modal-ink);
    font-weight: 600;
}

/* Hommage */
.tas-modal--hommage .tas-modal__panel {
    width: min(1000px, calc(100vw - 48px));
}

.tas-modal--hommage .tas-modal__header {
    padding-bottom: 16px;
}

.tas-modal--hommage .tas-modal__body {
    padding: 0;
}

.tas-hommage-modal {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    align-items: stretch;
    min-height: 300px;
}

.tas-hommage-modal__visual {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: clamp(24px, 3vw, 32px) clamp(18px, 2.5vw, 24px);
    background: linear-gradient(165deg, #0c1829 0%, #152a47 100%);
    text-align: center;
}

.tas-hommage-modal__halo {
    display: none;
}

.tas-hommage-modal__photo {
    position: relative;
    z-index: 1;
    width: 100%;
    line-height: 0;
}

.tas-hommage-modal__photo img {
    width: 100%;
    max-height: clamp(240px, 36vh, 320px);
    object-fit: contain;
    object-position: center bottom;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.35));
}

.tas-hommage-modal__years {
    position: relative;
    z-index: 1;
    margin-top: 16px;
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(240, 192, 32, 0.92);
    letter-spacing: 0.03em;
}

.tas-hommage-modal__content {
    padding: clamp(24px, 3vw, 32px) clamp(24px, 3vw, 36px);
    overflow-y: auto;
    max-height: min(62vh, 560px);
    scrollbar-width: thin;
}

.tas-hommage-modal__lead {
    font-size: 1.02rem;
    font-weight: 600;
    line-height: 1.72;
    color: var(--modal-ink);
    margin-bottom: 16px;
}

.tas-hommage-modal__text {
    font-size: 0.9375rem;
    line-height: 1.78;
    color: var(--modal-muted);
    margin-bottom: 14px;
}

.tas-hommage-modal__text:last-child {
    margin-bottom: 0;
}

/* Chronogramme */
.chrono-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--modal-line);
    border-radius: 14px;
    background: #ffffff;
}

.chrono-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.chrono-table th,
.chrono-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(21, 36, 61, 0.07);
    vertical-align: top;
    color: #334155;
}

.chrono-table th {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--modal-muted);
    background: rgba(21, 36, 61, 0.03);
    white-space: nowrap;
}

.chrono-table tbody tr:last-child td { border-bottom: none; }

.chrono-table tbody tr:nth-child(even) {
    background: rgba(21, 36, 61, 0.02);
}

.chrono-table td:first-child {
    font-weight: 600;
    color: var(--modal-ink);
    white-space: nowrap;
}

.chrono-table tbody tr:hover {
    background: rgba(21, 36, 61, 0.03);
}

/* ── Lightbox galerie (éditorial) ── */

.lightbox__panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% + 14px));
    width: min(1120px, calc(100vw - 48px));
    height: min(92vh, 900px);
    max-height: min(92vh, 900px);
    display: flex;
    flex-direction: column;
    color: var(--modal-ink);
    background:
        radial-gradient(ellipse 120% 70% at 50% -15%, rgba(255, 255, 255, 0.92), transparent 55%),
        var(--modal-paper);
    border: 1px solid var(--modal-line);
    border-radius: var(--modal-radius);
    box-shadow: var(--modal-shadow);
    overflow: hidden;
    opacity: 0;
    transition: none;
}

.lightbox.is-visible .lightbox__panel {
    transform: translate(-50%, -50%);
    opacity: 1;
}

.lightbox.is-closing .lightbox__panel {
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: none;
}

.lightbox__close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 3;
}

.lightbox__chrome {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 64px 12px 28px;
    flex-shrink: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, transparent 100%);
}

.lightbox__eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--color-secondary);
    margin: 0;
}

.lightbox__counter {
    font-size: 0.8125rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--modal-muted);
    letter-spacing: 0.02em;
}

.lightbox__stage {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    margin: 0 20px;
    padding: 12px 52px 16px;
    background:
        radial-gradient(ellipse at 50% 100%, rgba(21, 36, 61, 0.05), transparent 68%),
        #f0eeea;
    border-radius: 14px;
}

.lightbox__frame {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox__img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow:
        0 12px 36px rgba(10, 22, 40, 0.14),
        0 1px 0 rgba(255, 255, 255, 0.8) inset;
    transition: none;
    user-select: none;
    -webkit-user-drag: none;
}

.lightbox__img.is-swapping {
    opacity: 1;
}

.lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--modal-muted);
    background: #ffffff;
    border: 1px solid var(--modal-line);
    border-radius: 50%;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s;
    z-index: 2;
    -webkit-tap-highlight-color: transparent;
}

.lightbox__nav:hover {
    color: var(--modal-ink);
    border-color: rgba(21, 36, 61, 0.18);
    background: #ffffff;
    transform: translateY(-50%) scale(1.04);
}

.lightbox__nav--side.lightbox__nav--prev { left: 10px; }
.lightbox__nav--side.lightbox__nav--next { right: 10px; }

.lightbox__toolbar {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 10px 20px 4px;
    flex-shrink: 0;
}

.lightbox__toolbar-counter {
    font-size: 0.8125rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--modal-muted);
    min-width: 64px;
    text-align: center;
}

.lightbox__caption {
    flex-shrink: 0;
    text-align: center;
    color: var(--modal-muted);
    font-size: 0.9375rem;
    line-height: 1.55;
    padding: 14px 28px 24px;
    margin: 0;
    border-top: 1px solid var(--modal-line);
    background: rgba(255, 255, 255, 0.45);
}

.lightbox__caption:empty {
    display: none;
}

/* ── Modale flipbook ── */

.flipbook-modal__panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% + 12px));
    width: min(1240px, calc(100vw - 40px));
    height: min(94vh, 940px);
    max-height: min(94vh, 940px);
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(ellipse 100% 60% at 50% 0%, rgba(255, 255, 255, 0.75), transparent 50%),
        var(--modal-paper);
    border: 1px solid var(--modal-line);
    border-radius: var(--modal-radius);
    box-shadow: var(--modal-shadow);
    overflow: hidden;
    opacity: 0;
    transition: none;
}

.flipbook-modal.is-visible .flipbook-modal__panel {
    transform: translate(-50%, -50%);
    opacity: 1;
}

.flipbook-modal.is-closing .flipbook-modal__panel {
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: none;
}

.flipbook-modal__header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 22px 24px 16px;
    flex-shrink: 0;
}

.flipbook-modal__header-copy {
    min-width: 0;
    padding-right: 48px;
}

.flipbook-modal__close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 2;
}

.flipbook-modal__eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--modal-muted);
    margin-bottom: 4px;
}

.flipbook-modal__title {
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--modal-ink);
    line-height: 1.3;
}

.flipbook-modal__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.flipbook-modal__stage {
    position: relative;
    flex: 1;
    min-height: 0;
    padding: clamp(16px, 2.5vw, 28px);
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse at 50% 100%, rgba(21, 36, 61, 0.05), transparent 68%),
        #f0eeea;
    overflow: visible;
}

.flipbook-modal__viewer-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 10px 20px 14px;
    flex-shrink: 0;
}

.flipbook-modal__loader {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    font-size: 0.9375rem;
    color: var(--modal-muted);
    z-index: 2;
    background: rgba(240, 238, 234, 0.92);
}

.flipbook-modal__loader[hidden] { display: none; }

.flipbook-modal__spinner {
    width: 32px;
    height: 32px;
    border: 2px solid rgba(21, 36, 61, 0.12);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: modalSpin 0.7s linear infinite;
}

.flipbook-modal__nav {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--modal-muted);
    background: #ffffff;
    border: 1px solid var(--modal-line);
    border-radius: 50%;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s;
}

.flipbook-modal__nav:hover {
    color: var(--modal-ink);
    border-color: rgba(21, 36, 61, 0.18);
    background: #ffffff;
    transform: scale(1.04);
}

.flipbook-modal__counter {
    font-size: 0.8125rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--modal-muted);
    min-width: 64px;
    text-align: center;
}

.flipbook-modal__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 14px 24px 20px;
    border-top: 1px solid var(--modal-line);
    background: rgba(255, 255, 255, 0.5);
}

.flipbook-modal__download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--modal-ink);
    text-decoration: none;
    border-radius: 50%;
    border: 1px solid var(--modal-line);
    background: #ffffff;
    transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s;
}

.flipbook-modal__download:hover {
    color: var(--color-primary);
    border-color: rgba(21, 36, 61, 0.18);
    transform: scale(1.04);
}

.flipbook-modal__download svg {
    flex-shrink: 0;
}

.flipbook-modal__btn {
    padding: 10px 18px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--modal-muted);
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}

.flipbook-modal__btn:hover,
.flipbook-modal__btn:focus {
    color: var(--modal-ink);
    background: rgba(21, 36, 61, 0.05);
    outline: none;
}

body.is-modal-open,
body.is-flipbook-open {
    overflow: hidden;
    overscroll-behavior: none;
}

.flipbook-mount {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flipbook-mount .flipbook-book,
.flipbook-mount .stf__parent,
.flipbook-mount .stf__wrapper {
    margin-left: auto;
    margin-right: auto;
}

.flipbook-modal__error {
    text-align: center;
    color: var(--modal-muted);
    padding: 40px 20px;
}

/* ── Responsive ── */

@media (max-width: 900px) {
    .tas-modal__panel {
        width: calc(100vw - 20px);
        max-height: calc(100dvh - 20px);
    }

    .tas-modal__header {
        padding: 24px 56px 16px 20px;
    }

    .tas-modal__body {
        padding: 4px 20px 24px;
    }

    .lightbox__panel {
        width: calc(100vw - 20px);
        height: min(90dvh, 820px);
        max-height: calc(100dvh - 20px);
    }

    .lightbox__chrome {
        padding: 20px 56px 10px 20px;
    }

    .lightbox__stage {
        margin: 0 14px;
        padding: 10px 44px 14px;
    }

    .lightbox__caption {
        padding: 12px 20px 20px;
    }

    .flipbook-modal__panel {
        width: calc(100vw - 12px);
        height: calc(100dvh - 12px);
        max-height: calc(100dvh - 12px);
        border-radius: 16px;
    }
}

/* ── Mobile : feuilles plein écran unifiées ── */
@media (max-width: 768px) {
    .tas-modal__backdrop,
    .lightbox__backdrop,
    .flipbook-modal__backdrop {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(10, 22, 40, 0.72);
    }

    .tas-modal__panel,
    .lightbox__panel,
    .flipbook-modal__panel {
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: 100%;
        height: 100%;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
        border-left: none;
        border-right: none;
        transform: none;
    }

    .tas-modal.is-visible .tas-modal__panel,
    .lightbox.is-visible .lightbox__panel,
    .flipbook-modal.is-visible .flipbook-modal__panel {
        transform: none;
    }

    .tas-modal.is-closing .tas-modal__panel,
    .lightbox.is-closing .lightbox__panel,
    .flipbook-modal.is-closing .flipbook-modal__panel {
        transform: none;
    }

    .tas-modal__close,
    .lightbox__close,
    .flipbook-modal__close {
        top: max(10px, env(safe-area-inset-top, 0px));
        right: max(10px, env(safe-area-inset-right, 0px));
        width: 44px;
        height: 44px;
    }

    /* Modale contenu */
    .tas-modal__header {
        flex-shrink: 0;
        padding:
            calc(max(14px, env(safe-area-inset-top, 0px)) + 6px)
            52px 12px 18px;
    }

    .tas-modal__title {
        font-size: 1.2rem;
        line-height: 1.3;
    }

    .tas-modal__body {
        padding: 0 18px calc(18px + env(safe-area-inset-bottom, 0px));
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        min-height: 0;
    }

    .tas-modal__para,
    .tas-modal__list {
        font-size: 0.9375rem;
        line-height: 1.72;
    }

    .tas-modal--hommage .tas-modal__panel {
        width: 100%;
    }

    .tas-hommage-modal {
        grid-template-columns: 1fr;
    }

    .tas-hommage-modal__visual {
        min-height: 200px;
        padding: 20px 16px;
    }

    .tas-hommage-modal__photo img {
        max-height: min(36dvh, 260px);
    }

    .tas-hommage-modal__content {
        max-height: none;
        padding: 20px 18px calc(16px + env(safe-area-inset-bottom, 0px));
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    .chrono-table-wrap {
        margin: 0 -2px;
        border-radius: 12px;
    }

    .chrono-table {
        font-size: 0.8125rem;
    }

    .chrono-table th,
    .chrono-table td {
        padding: 10px 12px;
    }

    /* Lightbox galerie */
    .lightbox__chrome {
        flex-shrink: 0;
        padding:
            calc(max(12px, env(safe-area-inset-top, 0px)) + 4px)
            52px 6px 18px;
    }

    .lightbox__counter {
        display: none;
    }

    .lightbox__stage {
        flex: 1;
        min-height: 0;
        margin: 0 10px;
        padding: 6px 8px 8px;
        border-radius: 12px;
    }

    .lightbox__nav--side {
        display: none;
    }

    .lightbox__toolbar {
        display: flex;
        flex-shrink: 0;
        padding: 6px 16px 4px;
    }

    .lightbox__toolbar .lightbox__nav {
        position: static;
        transform: none;
        width: 44px;
        height: 44px;
    }

    .lightbox__toolbar .lightbox__nav:active {
        transform: scale(0.96);
    }

    .lightbox__caption {
        flex-shrink: 0;
        font-size: 0.875rem;
        padding: 8px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    }

    /* Modale flipbook */
    .flipbook-modal__header {
        flex-shrink: 0;
        padding:
            calc(max(12px, env(safe-area-inset-top, 0px)) + 4px)
            52px 8px 16px;
    }

    .flipbook-modal__header-copy {
        padding-right: 0;
    }

    .flipbook-modal__eyebrow {
        display: none;
    }

    .flipbook-modal__title {
        font-size: 0.9375rem;
        line-height: 1.35;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .flipbook-modal__body {
        min-height: 0;
    }

    .flipbook-modal__stage {
        flex: 1;
        min-height: 0;
        padding: 6px 8px;
        overflow: hidden;
    }

    .flipbook-mount {
        max-width: 100%;
    }

    .flipbook-mount .stf__parent {
        max-width: 100% !important;
    }

    .flipbook-modal__viewer-bar {
        flex-shrink: 0;
        gap: 16px;
        padding: 8px 16px;
    }

    .flipbook-modal__nav {
        width: 44px;
        height: 44px;
        -webkit-tap-highlight-color: transparent;
    }

    .flipbook-modal__footer {
        flex-shrink: 0;
        justify-content: flex-end;
        gap: 8px;
        padding: 6px 16px calc(10px + env(safe-area-inset-bottom, 0px));
        border-top: none;
        background: transparent;
    }

    .flipbook-modal__btn {
        display: none;
    }

    .flipbook-modal__download {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 480px) {
    .tas-modal__header {
        padding-right: 48px;
    }

    .tas-modal__body {
        padding-left: 16px;
        padding-right: 16px;
    }

    .lightbox__stage {
        margin: 0 8px;
    }

    .lightbox__caption {
        font-size: 0.8125rem;
        padding-left: 14px;
        padding-right: 14px;
    }
}

/* ── Desktop : modales plus grandes, texte lisible ── */
@media (min-width: 901px) {
    .tas-modal,
    .lightbox,
    .flipbook-modal {
        --modal-muted: #46596d;
        --modal-line: rgba(21, 36, 61, 0.12);
        --modal-radius: 24px;
    }

    .tas-modal__panel {
        width: min(1040px, calc(100vw - 56px));
        max-height: min(94vh, 960px);
    }

    .tas-modal--hommage .tas-modal__panel {
        width: min(1120px, calc(100vw - 56px));
    }

    .tas-modal__header {
        padding: 32px 72px 24px 36px;
    }

    .tas-modal__body {
        padding: 8px 36px 36px;
    }

    .tas-modal__eyebrow {
        font-size: 0.8125rem;
        margin-bottom: 10px;
    }

    .tas-modal__title {
        font-size: clamp(1.625rem, 2.2vw, 2rem);
        line-height: 1.22;
    }

    .tas-modal__date,
    .tas-modal__location {
        font-size: 1rem;
        margin-top: 10px;
    }

    .tas-modal__para,
    .tas-modal__list {
        font-size: 1.0625rem;
        line-height: 1.82;
    }

    .tas-modal__list {
        gap: 14px;
        padding-left: 1.35rem;
    }

    .tas-modal__para {
        margin-bottom: 18px;
    }

    .tas-modal__para--departure {
        font-size: 1rem;
        margin-bottom: 24px;
        padding-bottom: 18px;
    }

    .tas-modal__loading {
        font-size: 1rem;
    }

    .tas-modal__figure-img {
        max-width: 320px;
        max-height: 320px;
    }

    .tas-hommage-modal {
        grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
        min-height: 360px;
    }

    .tas-hommage-modal__photo img {
        max-height: clamp(280px, 42vh, 380px);
    }

    .tas-hommage-modal__content {
        padding: clamp(28px, 3vw, 40px) clamp(28px, 3vw, 44px);
        max-height: min(66vh, 620px);
    }

    .tas-hommage-modal__lead {
        font-size: 1.125rem;
        line-height: 1.75;
        margin-bottom: 18px;
    }

    .tas-hommage-modal__text {
        font-size: 1.0625rem;
        line-height: 1.82;
        margin-bottom: 16px;
    }

    .tas-hommage-modal__years {
        font-size: 0.9375rem;
    }

    .chrono-table {
        font-size: 0.96875rem;
    }

    .chrono-table th,
    .chrono-table td {
        padding: 14px 18px;
    }

    .chrono-table th {
        font-size: 0.75rem;
    }

    .chrono-table td {
        color: #2f3f52;
    }

    .lightbox__panel {
        width: min(1320px, calc(100vw - 56px));
        height: min(94vh, 960px);
        max-height: min(94vh, 960px);
    }

    .lightbox__chrome {
        padding: 28px 72px 16px 36px;
    }

    .lightbox__eyebrow {
        font-size: 0.8125rem;
    }

    .lightbox__counter {
        font-size: 0.9375rem;
    }

    .lightbox__caption {
        font-size: 1.0625rem;
        line-height: 1.65;
        padding: 18px 36px 28px;
    }

    .lightbox__stage {
        margin: 0 28px;
        padding: 16px 60px 20px;
    }

    .flipbook-modal__panel {
        width: min(1400px, calc(100vw - 48px));
        height: min(96vh, 980px);
        max-height: min(96vh, 980px);
    }

    .flipbook-modal__header {
        padding: 26px 32px 18px;
    }

    .flipbook-modal__eyebrow {
        font-size: 0.8125rem;
    }

    .flipbook-modal__title {
        font-size: clamp(1.35rem, 2vw, 1.625rem);
        line-height: 1.28;
    }

    .flipbook-modal__counter,
    .flipbook-modal__loader {
        font-size: 1rem;
    }

    .flipbook-modal__stage {
        padding: clamp(20px, 2.5vw, 32px);
    }
}
