/* ========================================
   ARTWORK DETAIL - Against Stones
   Design moderne et minimaliste
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Gold */
    --gold-primary: var(--as-gold, #FFD700);
    --gold-secondary: var(--as-gold-dark, #D4AF37);
    --gold-muted: var(--as-gold-muted, #B8941F);

    /* Backgrounds — alignés sur layout.css (--as-surface) */
    --bg-primary: var(--as-surface-2, #1a1f28);
    --bg-card: var(--as-card-bg, linear-gradient(145deg, var(--as-surface-2, #1a1f28) 0%, var(--as-surface, #141820) 100%));
    --bg-preview: var(--as-surface-3, #222833);

    /* Borders */
    --border-subtle: var(--as-border, rgba(255, 255, 255, 0.07));
    --border-hover: var(--as-border-gold, rgba(255, 215, 0, 0.35));

    /* Text */
    --text-primary: var(--as-text, #FFFFFF);
    --text-secondary: var(--as-text-secondary, #CBD5E1);
    --text-muted: var(--as-text-muted, #94A3B8);
    --text-subtle: var(--as-text-muted, #64748B);

    /* States */
    --red-like: #EF4444;
    --green-success: #22C55E;

}

/* ========================================
   MAIN GRID — 2/3 descriptif | 1/3 récits
   ======================================== */
.main-grid {
    display: flex;
    flex-direction: column;
    gap: clamp(32px, 4vw, 48px);
    max-width: min(1400px, 98vw);
    margin: 0 auto;
    padding: clamp(32px, 5vw, 64px) clamp(20px, 4vw, 40px);
}

.content.content--wide:has(.main-grid) {
    max-width: min(1400px, 98vw);
    overflow: visible;
}

/* Top row: hero + descriptif (colonne principale) */
.oeuvre-top-row {
    display: flex;
    flex-direction: column;
    gap: clamp(28px, 3vw, 40px);
    min-width: 0;
}

/* Left column — hero + descriptif stacked */
.oeuvre-left-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.oeuvre-left-column > .artwork-preview,
.oeuvre-left-column > .artwork-descriptif {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.artwork-descriptif {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Right column — récits (desktop grid placement below) */
.oeuvre-right-column {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    align-self: start;
    position: static;
    top: auto;
}

.narratives-section {
    position: static;
    top: auto;
    overflow: visible;
    max-height: none;
}

@media (min-width: 901px) {
    /*
     * Grille 2/3 | 1/3 : descriptif + médias + commentaires à gauche,
     * récits à droite — flux normal, sans sticky.
     */
    .main-grid.main-grid--with-recits,
    .main-grid:has(.oeuvre-right-column) {
        display: grid;
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
        gap: 24px;
        align-items: start;
    }

    .main-grid.main-grid--with-recits .oeuvre-top-row,
    .main-grid.main-grid--with-recits .oeuvre-medias-row,
    .main-grid.main-grid--with-recits .oeuvre-comments-row,
    .main-grid:has(.oeuvre-right-column) .oeuvre-top-row,
    .main-grid:has(.oeuvre-right-column) .oeuvre-medias-row,
    .main-grid:has(.oeuvre-right-column) .oeuvre-comments-row {
        grid-column: 1;
        width: 100%;
        min-width: 0;
    }

    .main-grid.main-grid--with-recits .oeuvre-right-column,
    .main-grid:has(.oeuvre-right-column) .oeuvre-right-column {
        grid-column: 2;
        grid-row: 1 / -1;
        align-self: start;
        min-width: 0;
        width: 100%;
        position: static;
    }

    .main-grid.main-grid--with-recits .narratives-section,
    .main-grid:has(.oeuvre-right-column) .narratives-section {
        width: 100%;
        max-height: none;
        overflow: visible;
        position: static;
    }

    .main-grid.main-grid--with-recits .medias-scroll {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .main-grid.main-grid--with-recits .media-thumb {
        max-width: none;
    }
}

/* Full-width medias / comments rows below grid (left column on desktop) */
.oeuvre-medias-row,
.oeuvre-comments-row {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.oeuvre-medias-row .associated-medias,
.oeuvre-comments-row .work-comments-section {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Legacy aliases — kept for atelier-detail compatibility */
.preview-column {
    position: static;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.info-column {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Preview de l'œuvre — hero dans colonne gauche */
.artwork-preview {
    width: 100%;
    max-width: 100%;
    height: min(52vh, 480px);
    min-height: 200px;
    max-height: min(52vh, 480px);
    aspect-ratio: 16 / 9;
    background: var(--bg-preview);
    border: 1.5px solid var(--border-subtle);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

.artwork-preview:hover {
    border-color: var(--border-hover);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7),
                0 0 0 1px rgba(255, 215, 0, 0.2);
}

/* Image/Video dans preview */
.artwork-preview img,
.artwork-preview video,
.artwork-preview iframe,
.artwork-preview .preview-img,
.artwork-preview .as-video-facade-poster {
    width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
}

.artwork-preview .video-embed-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.artwork-preview .video-embed-wrap iframe,
.artwork-preview .video-embed-iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    pointer-events: auto;
    z-index: 1;
}

/* ========================================
   STATS - Like & Views
   ======================================== */
.artwork-stats {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 14px 16px;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.artwork-stats .stat-btn.like-btn {
    grid-column: 1;
    grid-row: 1;
}

.artwork-stats .stat-views {
    grid-column: 2;
    grid-row: 1;
}

.artwork-stats .btn-report {
    grid-column: 4;
    grid-row: 1;
    justify-self: end;
    margin-top: 0;
}

.artwork-stats .as-share-bar {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 0;
    width: 100%;
    min-width: 0;
}

.artwork-stats .as-share-bar .share-buttons {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding: 4px 2px 6px;
}

.artwork-stats .as-share-bar .share-btn {
    flex-shrink: 0;
}

/* Bouton Like */
.stat-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid var(--border-subtle);
    border-radius: 12px;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-btn .icon {
    font-size: 18px;
    filter: grayscale(1);
    transition: filter 0.3s ease;
}

.stat-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.stat-btn.liked {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--red-like);
}

.stat-btn.liked .icon {
    filter: grayscale(0);
}

@keyframes likePop {
    0% { transform: scale(1); }
    40% { transform: scale(1.2); }
    100% { transform: scale(1); }
}
.stat-btn.like-pop {
    animation: likePop 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
@media (prefers-reduced-motion: reduce) {
    .stat-btn.like-pop { animation: none; }
}

/* Stat Views */
.stat-views {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
}

.stat-views .icon {
    font-size: 18px;
    opacity: 0.7;
}

/* ========================================
   INFO / DESCRIPTIF — colonne gauche
   ======================================== */

/* Emotion Badge + Type */
.emotion-badge-container {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.emotion-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1.5px solid currentColor;
    border-radius: 999px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    backdrop-filter: blur(10px);
}

.type-separator {
    color: var(--text-subtle);
    font-size: 18px;
}

.artwork-type {
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* Titre */
.artwork-title {
    font-family: 'Inter', sans-serif;
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg,
                var(--gold-primary) 0%,
                #FFFFFF 30%,
                #FFFFFF 70%,
                var(--gold-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Auteur */
.artwork-author {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
}

.author-link {
    color: var(--gold-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.author-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--gold-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.author-link:hover {
    color: #FFFFFF;
}

.author-link:hover::after {
    transform: scaleX(1);
}

/* Meta Grid */
.artwork-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.meta-item {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.meta-item strong {
    color: var(--text-muted);
    font-weight: 600;
    margin-right: 8px;
}

/* Description */
.artwork-description {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
    padding: 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

/* ========================================
   SECTION TITLES
   ======================================== */
.section-title {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--gold-primary);
    margin: 0 0 20px 0;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, var(--gold-primary), var(--gold-secondary));
    border-radius: 2px;
}

/* ========================================
   NARRATIVES SECTION - Lecteur de récits
   ======================================== */
.narratives-section {
    padding: clamp(20px, 2.5vw, 28px);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45),
                inset 0 1px 0 rgba(255, 255, 255, 0.04);
    height: auto;
    max-height: none;
    overflow: visible;
}

/* Container des récits */
#recits-container {
    position: relative;
    min-height: 0;
    margin-bottom: 20px;
}

.recit-slide {
    display: none;
    animation: fadeIn 0.5s ease;
}

.recit-slide.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card récit — compact in sidebar */
.recit-card {
    padding: clamp(16px, 2vw, 24px);
    background: var(--as-surface-3, rgba(255, 255, 255, 0.03));
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.recit-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 215, 0, 0.2);
}

.recit-title {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

/* Video dans récit — boîte harmonisée, taille raisonnable */
.narrative-video,
.narrative-video-placeholder {
    width: 100%;
    max-width: 640px;
    min-height: 0;
    background: var(--bg-preview);
    border-radius: 12px;
    overflow: hidden;
    margin: 16px auto;
    border: 1px solid var(--border-subtle);
    position: relative;
}

.narrative-video-placeholder.video-full-mode,
.narrative-video-placeholder:not(.video-thumb-mode):not(.media-preview-thumb) {
    aspect-ratio: 16 / 9;
    max-height: 240px;
    max-width: 100%;
}

.narrative-video-placeholder .video-embed-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.narrative-video-placeholder .video-embed-wrap iframe,
.narrative-video-placeholder .video-embed-iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    pointer-events: auto;
    z-index: 1;
}

.narrative-video-placeholder video {
    width: 100%;
    height: 100%;
    display: block;
    border: none;
    object-fit: contain;
    pointer-events: auto;
    z-index: 1;
}

.narrative-video-placeholder img,
.narrative-video-placeholder .preview-img {
    width: 100%;
    height: 100%;
    display: block;
    border: none;
    object-fit: contain;
}

.video-sr-caption {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    pointer-events: none;
}

.recit-content {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 0;
}

/* Navigation récits */
.recit-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
}

.nav-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-btn:hover:not(:disabled) {
    background: rgba(255, 215, 0, 0.15);
    border-color: var(--gold-primary);
    color: var(--gold-primary);
    transform: translateX(-2px);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.recit-counter {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    padding: 8px 16px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 8px;
}

/* ========================================
   ASSOCIATED MEDIAS - Grille compacte
   ======================================== */
.associated-medias {
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45),
                inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Grille responsive — vignettes compactes, pas d'images géantes */
.medias-scroll {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
    padding: 4px 0 8px;
    max-width: 100%;
    overflow: visible;
}

/* Thumb média */
.media-thumb {
    box-sizing: border-box;
    width: 100%;
    max-width: 200px;
    justify-self: start;
    padding: 10px;
    background: var(--as-surface-3, rgba(255, 255, 255, 0.03));
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.media-thumb--photo {
    cursor: zoom-in;
}

.media-thumb--video {
    cursor: pointer;
}

.media-thumb--video .media-preview-thumb {
    cursor: pointer;
}

.media-thumb:hover {
    transform: translateY(-3px);
    background: var(--as-surface-elevated, rgba(255, 255, 255, 0.05));
    border-color: rgba(255, 215, 0, 0.25);
}

.media-preview,
.media-preview-thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
    max-height: 130px;
    min-height: 0;
    background: var(--as-surface-2, var(--bg-preview));
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
    position: relative;
    flex-shrink: 0;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.media-thumb:hover .media-preview,
.media-thumb:hover .media-preview-thumb {
    border-color: var(--gold-primary);
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.18);
}

.media-preview img,
.media-preview video,
.media-preview iframe,
.media-preview-thumb img,
.media-preview-thumb video,
.media-preview-thumb iframe,
.media-preview-thumb .preview-img {
    width: 100%;
    height: 100%;
    display: block;
    border: none;
    object-fit: cover;
}

.media-preview-thumb .video-thumb-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.media-preview-thumb .video-thumb-wrap iframe,
.media-preview-thumb.video-thumb-mode iframe,
.media-preview-thumb .video-thumb-iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    pointer-events: auto;
    z-index: 1;
}

.media-preview-thumb video {
    pointer-events: auto;
}

.media-thumb--photo .media-preview-thumb {
    cursor: zoom-in;
    touch-action: manipulation;
}

.media-thumb--photo .media-preview-thumb img,
.media-thumb--photo .media-preview-thumb .preview-img {
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: none;
}

/* Façade vidéo — lecture au clic */
.as-video-facade {
    cursor: pointer;
    background: var(--as-surface-2, var(--bg-preview)) !important;
}

.as-video-facade-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    opacity: 0.88;
}

.as-video-play-btn {
    position: absolute;
    inset: 0;
    z-index: 2;
    margin: 0;
    padding: 0;
    border: none;
    background: rgba(0, 0, 0, 0.28);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease;
}

.as-video-play-btn:hover,
.as-video-play-btn:focus-visible {
    background: rgba(0, 0, 0, 0.42);
    outline: none;
}

.media-preview-thumb .as-video-play-icon {
    width: 44px;
    height: 44px;
}

.media-preview-thumb .as-video-play-icon::after {
    border-width: 8px 0 8px 13px;
}

.as-video-play-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-secondary));
    box-shadow: 0 8px 28px rgba(255, 215, 0, 0.35);
    display: block;
    position: relative;
}

.as-video-play-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 54%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 11px 0 11px 18px;
    border-color: transparent transparent transparent #111;
}

.narrative-video-placeholder.as-video-facade .as-video-play-icon {
    width: 56px;
    height: 56px;
}

.as-video-active .video-embed-wrap,
.as-video-active .video-thumb-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Lightbox vidéo */
.as-video-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10060;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.as-video-lightbox[hidden]:not(.is-open) {
    display: none !important;
}

.as-video-lightbox.is-open {
    display: flex !important;
}

.as-video-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(6px);
}

.as-video-lightbox__dialog {
    position: relative;
    z-index: 1;
    width: min(1100px, calc(100vw - 40px));
    background: linear-gradient(145deg, #1a1a1a, #121212);
    border: 1px solid rgba(255, 215, 0, 0.22);
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
}

.as-video-lightbox__player {
    width: 100%;
}

.as-video-lightbox__shell {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    min-height: 0;
}

.as-video-lightbox__shell .video-embed-wrap,
.as-video-lightbox__shell .video-thumb-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding-bottom: 0;
}

.as-video-lightbox__shell .video-embed-iframe,
.as-video-lightbox__shell .video-thumb-iframe,
.as-video-lightbox__shell iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.as-video-lightbox__shell video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000;
}

.as-video-lightbox__close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 215, 0, 0.35);
    background: #1a1a1a;
    color: var(--gold-primary);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

body.as-video-lightbox-open {
    overflow: hidden;
}

.media-desc {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
}

/* ========================================
   BACK TO CATALOGUE
   ======================================== */
.back-to-catalogue {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid var(--border-subtle);
    border-radius: 12px;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-to-catalogue:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: var(--gold-primary);
    color: var(--gold-primary);
    transform: translateX(-4px);
}

/* ========================================
   RESPONSIVE - TABLET
   ======================================== */
@media (max-width: 900px) {
    .main-grid {
        gap: 32px;
        padding: 40px 24px;
    }

    .main-grid.main-grid--with-recits,
    .main-grid:has(.oeuvre-right-column) {
        display: flex;
        flex-direction: column;
    }

    .oeuvre-right-column {
        width: 100%;
    }

    .oeuvre-top-row {
        gap: 32px;
    }

    .artwork-meta-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .narratives-section,
    .associated-medias {
        padding: 24px;
    }
}

@media (min-width: 901px) {
    .medias-scroll {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */
@media (max-width: 768px) {
    .main-grid {
        padding: 32px 16px;
        gap: 28px;
    }

    .oeuvre-left-column {
        gap: 20px;
    }

    .artwork-descriptif {
        gap: 20px;
    }

    .artwork-preview {
        height: min(42vh, 280px);
        min-height: 160px;
        max-height: min(42vh, 280px);
        border-radius: 14px;
    }

    .narrative-video-placeholder.video-full-mode,
    .narrative-video-placeholder:not(.video-thumb-mode):not(.media-preview-thumb) {
        max-width: 100%;
        max-height: 220px;
    }

    .medias-scroll {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }

    .media-thumb {
        max-width: none;
        padding: 8px;
    }

    .media-preview-thumb {
        max-height: 110px;
    }

    .artwork-stats {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "like views"
            "share share"
            "report report";
        padding: 16px;
    }

    .artwork-stats .stat-btn.like-btn {
        grid-area: like;
        justify-self: start;
    }

    .artwork-stats .stat-views {
        grid-area: views;
        justify-self: end;
        margin-left: 0;
    }

    .artwork-stats .as-share-bar {
        grid-area: share;
    }

    .artwork-stats .btn-report {
        grid-area: report;
        justify-self: center;
    }

    .stat-btn {
        justify-content: center;
    }

    .artwork-title {
        font-size: 28px;
    }

    .artwork-meta-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 20px;
    }

    .artwork-description {
        padding: 20px;
        font-size: 14px;
    }

    .narratives-section,
    .associated-medias {
        padding: 20px;
    }

    .recit-card {
        padding: 16px;
    }

    .recit-navigation {
        flex-direction: column;
        gap: 12px;
    }

    .nav-btn {
        width: 100%;
        justify-content: center;
    }

    .medias-scroll {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ========================================
   RESPONSIVE - PETIT MOBILE
   ======================================== */
@media (max-width: 480px) {
    .main-grid {
        padding: 32px 16px;
        gap: 24px;
    }

    .artwork-preview {
        border-radius: 14px;
    }

    .section-title {
        font-size: 18px;
    }

    .section-title::before {
        height: 20px;
    }

    .narratives-section,
    .associated-medias {
        padding: 20px;
        border-radius: 16px;
    }

    .recit-card {
        padding: 16px;
    }

    .recit-title {
        font-size: 16px;
    }

    .medias-scroll {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .media-preview-thumb {
        max-height: 96px;
    }

    .back-to-catalogue {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
.stat-btn:focus-visible,
.nav-btn:focus-visible,
.media-thumb:focus-visible,
.media-thumb--photo .media-preview-thumb:focus-visible,
.back-to-catalogue:focus-visible,
.author-link:focus-visible,
.oeuvre-media-lightbox__close:focus-visible {
    outline: 2px solid var(--gold-primary);
    outline-offset: 2px;
}

/* ========================================
   MEDIA PHOTO LIGHTBOX
   ======================================== */
body.oeuvre-lightbox-open {
    overflow: hidden;
}

.oeuvre-media-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.oeuvre-media-lightbox[hidden] {
    display: none !important;
}

.oeuvre-media-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.oeuvre-media-lightbox__dialog {
    position: relative;
    z-index: 1;
    max-width: min(95vw, 1400px);
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.oeuvre-media-lightbox__img {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
}

.oeuvre-media-lightbox__close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 40px;
    height: 40px;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    background: rgba(10, 10, 10, 0.92);
    color: var(--text-primary);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.oeuvre-media-lightbox__close:hover {
    border-color: var(--gold-primary);
    background: rgba(255, 215, 0, 0.15);
    color: var(--gold-primary);
}

@media (max-width: 768px) {
    .oeuvre-media-lightbox {
        padding: 16px;
    }

    .oeuvre-media-lightbox__close {
        top: 8px;
        right: 8px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .artwork-preview,
    .narratives-section,
    .associated-medias {
        border-width: 2px;
    }

    .stat-btn,
    .nav-btn {
        border-width: 2px;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .artwork-stats,
    .recit-navigation,
    .back-to-catalogue {
        display: none;
    }

    .main-grid {
        display: block;
    }

    .oeuvre-top-row {
        grid-template-columns: 1fr;
    }

    .narratives-section,
    .associated-medias {
        box-shadow: none;
        border: 1px solid #333;
    }
}

/* ========================================
   SHARE
   ======================================== */

.share-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.share-header h4 {
    color: #FFD700;
    font-size: 1.35rem;
    margin: 0;
    font-weight: 500;
}

/* Partage : styles globaux hérités de share-bar.css ; la zone œuvre est ciblée plus haut */

/* ========================================
   WORK COMMENTS
   ======================================== */
.work-comments-section {
    margin-top: 0;
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
}

.work-comments-section .section-title {
    margin-bottom: 8px;
}

.comments-count {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0 0 24px;
}

.work-comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 28px;
}

.comments-empty {
    color: var(--text-muted);
    font-style: italic;
    margin: 0;
}

.work-comment {
    display: flex;
    gap: 14px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
}

.comment-avatar-link {
    flex-shrink: 0;
}

.comment-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 215, 0, 0.25);
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 12px;
    margin-bottom: 8px;
}

.comment-author {
    color: var(--gold-primary);
    font-weight: 600;
    text-decoration: none;
}

.comment-author:hover {
    text-decoration: underline;
}

.comment-date {
    color: var(--text-subtle);
    font-size: 0.85rem;
}

.comment-text {
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
    word-break: break-word;
}

.comment-actions {
    margin-top: 10px;
}

.comment-delete-btn {
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
    font-size: 0.85rem;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.comment-delete-btn:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: #ef4444;
}

.work-comment-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.work-comment-textarea {
    width: 100%;
    min-height: 90px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
}

.work-comment-textarea:focus {
    outline: none;
    border-color: var(--border-hover);
}

.work-comment-form .btn-primary {
    align-self: flex-start;
    padding: 10px 24px;
}

.work-comment-login {
    color: var(--text-muted);
    margin: 0;
}

.work-comment-login a {
    color: var(--gold-primary);
}

@media (max-width: 768px) {
    .work-comments-section {
        padding: 20px;
        margin-top: 0;
    }

    .work-comment {
        padding: 12px;
    }
}