/* ========================================
   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: #FFD700;
    --gold-secondary: #D4AF37;
    --gold-muted: #B8941F;

    /* Backgrounds */
    --bg-primary: #0A0A0A;
    --bg-card: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    --bg-preview: #0f172a;

    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 215, 0, 0.3);

    /* Text */
    --text-primary: #FFFFFF;
    --text-secondary: #CBD5E1;
    --text-muted: #94A3B8;
    --text-subtle: #64748B;

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

/* ========================================
   MAIN GRID - 2 colonnes desktop
   ======================================== */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    max-width: 1600px;
    margin: 0 auto;
    padding: 80px 40px;
}

/* ========================================
   PREVIEW COLUMN - Gauche
   ======================================== */
.preview-column {
    position: sticky;
    top: 100px;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Preview de l'œuvre */
.artwork-preview {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: var(--bg-preview);
    border: 1.5px solid var(--border-subtle);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.artwork-preview:hover {
    border-color: var(--border-hover);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.8),
                0 0 0 1px rgba(255, 215, 0, 0.2);
    transform: translateY(-4px);
}

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

/* ========================================
   STATS - Like & Views
   ======================================== */
.artwork-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    justify-content: space-around;
}

/* 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);
}

/* 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 COLUMN - Droite
   ======================================== */
.info-column {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* 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: 32px;
    background: var(--bg-card);
    border: 1.5px solid var(--border-subtle);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

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

.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 */
.recit-card {
    padding: 28px;
    background: 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 */
.narrative-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--bg-preview);
    border-radius: 12px;
    overflow: hidden;
    margin: 20px 0;
    border: 1px solid var(--border-subtle);
}

.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 - Bande déroulante
   ======================================== */
.associated-medias {
    padding: 32px;
    background: var(--bg-card);
    border: 1.5px solid var(--border-subtle);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Scroll horizontal */
.medias-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 0 20px 0;
    scroll-behavior: smooth;

    /* Scrollbar personnalisée */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 215, 0, 0.3) rgba(255, 255, 255, 0.05);
}

.medias-scroll::-webkit-scrollbar {
    height: 8px;
}

.medias-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.medias-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.3);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.medias-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.5);
}

/* Thumb média */
.media-thumb {
    flex: 0 0 280px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.media-thumb:hover {
    transform: translateY(-6px);
}

.media-preview {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--bg-preview);
    border: 1.5px solid var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

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

.media-preview img,
.media-preview video,
.media-preview iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-desc {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========================================
   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: 1024px) {
    .main-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 60px 32px;
    }

    .preview-column {
        position: relative;
        top: 0;
    }

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

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

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

    .preview-column {
        gap: 20px;
    }

    .artwork-preview {
        aspect-ratio: 1 / 1;
        border-radius: 16px;
    }

    .artwork-stats {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
    }

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

    .stat-views {
        justify-content: center;
        margin-left: 0;
    }

    .info-column {
        gap: 28px;
    }

    .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: 24px;
    }

    #recits-container {
        min-height: 300px;
    }

    .recit-card {
        padding: 20px;
    }

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

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

    .media-thumb {
        flex: 0 0 240px;
    }
}

/* ========================================
   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;
    }

    .media-thumb {
        flex: 0 0 200px;
    }

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

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

/* 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 {
        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;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    flex-direction: row;
    align-content: center;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.share-btn {
    width: 28px;
    height: 28px;
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1.5px solid rgba(255,215,0,0.25);
    transition: all 0.35s ease;
    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
}

.share-btn:hover {
    transform: translateY(-6px);
    border-color: #FFD700;
    box-shadow: 0 12px 28px rgba(255, 215, 0, 0.25);
}

.share-btn.primary-share {
    width: auto;
    padding: 0 24px;
    gap: 10px;
    font-size: 1.05rem;
    font-weight: 600;
    background: linear-gradient(135deg, #005BBB, #003d80);
    color: white;
    border-color: #FFD700;
}

.share-btn img {
    width: 28px;
    height: 28px;
    filter: brightness(1.1);
}