:root {
    --primary-color: #1a1a1a;
    --accent-color: #c9a227;
    --accent-secondary: #8b7355;
    --bg-color: #faf9f7;
    --alt-bg-color: #f0eeeb;
    --text-color: #333333;
    --text-light: #666666;
    --font-heading: 'Cinzel', serif;
    --font-subheading: 'Cormorant Garamond', serif;
    --font-body: 'Lato', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--text-color);
    line-height: 1.8;
    background-color: var(--bg-color);
    overflow-x: hidden;
}

h1 {
    font-family: var(--font-heading);
    color: var(--bg-color);
    text-transform: uppercase;
    letter-spacing: 4px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

h2, h3 {
    font-family: var(--font-subheading);
    color: var(--primary-color);
    font-weight: 600;
}

h2 {
    font-size: 2.5rem;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
    padding-bottom: 10px;
    margin-bottom: 30px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

em {
    font-family: var(--font-subheading);
    font-size: 1.1em;
    color: var(--primary-color);
    font-weight: 600;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: url('https://upload.wikimedia.org/wikipedia/commons/thumb/a/a4/Courbet_-_L%27Atelier_du_peintre_-_Google_Art_Project_2.jpg/1280px-Courbet_-_L%27Atelier_du_peintre_-_Google_Art_Project_2.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    color: white;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, rgba(26,26,26,0.85) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 40px 20px;
}

.hero-badge {
    display: inline-block;
    background: transparent;
    color: var(--accent-color);
    padding: 8px 20px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 4px;
    margin-bottom: 20px;
    border: 1px solid var(--accent-color);
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 6vw, 4rem);
    margin-bottom: 20px;
    color: white;
    text-shadow: none;
    text-transform: uppercase;
    letter-spacing: 8px;
    border-bottom: none;
    display: block;
    padding-bottom: 0;
    font-weight: 400;
}

.hero .subtitle {
    font-family: var(--font-subheading);
    font-size: clamp(1.1rem, 2.5vw, 1.6rem);
    font-weight: 400;
    margin-bottom: 30px;
    font-style: italic;
    color: rgba(255,255,255,0.7);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px 30px;
    margin-bottom: 30px;
    font-size: 0.85rem;
}

.hero-info .info-item {
    color: rgba(255,255,255,0.6);
}

.hero-info .info-item strong {
    color: var(--accent-color);
}

.hero-info .info-divider {
    color: rgba(255,255,255,0.3);
    display: none;
}

@media (min-width: 600px) {
    .hero-info .info-divider { display: inline; }
}

.hero .authors {
    font-family: var(--font-body);
    font-size: 0.8rem;
    opacity: 0.5;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.btn-scroll {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 35px;
    background-color: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 0;
    font-family: var(--font-body);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.8rem;
    transition: all 0.4s ease;
}

.btn-scroll svg {
    animation: bounce 2s infinite;
    opacity: 0.7;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

.btn-scroll:hover {
    transform: translateY(-3px);
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    border-color: white;
}

/* Navigation */
.sticky-nav {
    position: sticky;
    top: 0;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 0;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    letter-spacing: 4px;
    color: var(--primary-color);
    font-weight: 700;
}

.burger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.burger-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
}

.burger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.burger-btn.active span:nth-child(2) {
    opacity: 0;
}

.burger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.audio-toggle {
    background: none;
    border: 1px solid rgba(0,0,0,0.15);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.audio-toggle:hover {
    border-color: var(--accent-color);
    background: var(--accent-color);
}

.nav-menu {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 40px;
    margin: 0;
    padding: 0;
}

.sticky-nav a {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.sticky-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s;
}

.sticky-nav a:hover::after {
    width: 100%;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .nav-logo {
        font-size: 0.8rem;
    }
    
    .burger-btn {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        transition: right 0.4s ease;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu a {
        font-size: 1.2rem;
        letter-spacing: 3px;
    }
}

/* Sections */
.section {
    padding: 80px 0;
}

.section h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 50px;
    text-align: center;
    position: relative;
    font-weight: 400;
    letter-spacing: 2px;
}

.section h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--accent-color);
    margin: 20px auto 0;
}

/* Highlighter Effect */
.marker-highlight {
    position: relative;
    display: inline-block;
    z-index: 1;
    white-space: nowrap;
}

.marker-highlight::before {
    content: '';
    position: absolute;
    bottom: var(--h-bottom, 0.2em);
    left: -5px;
    width: 0;
    height: var(--h-height, 0.9em);
    background: rgba(201, 162, 39, 0.3); /* Gold accent */
    transform: skew(var(--h-skew, -15deg)) rotate(var(--h-rotate, -1deg));
    z-index: -1;
    transition: width 1s cubic-bezier(0.25, 1, 0.5, 1);
    border-radius: var(--h-radius, 3px 15px 5px 20px);
    pointer-events: none;
}

.marker-highlight.active::before {
    width: calc(100% + 10px);
}

.alt-bg {
    background-color: var(--alt-bg-color);
}

/* Content Blocks */
.content-block {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.2rem;
}

.highlight-box {
    margin-top: 40px;
    padding: 40px;
    background-color: white;
    border-left: 3px solid var(--accent-color);
    box-shadow: none;
    border-radius: 0;
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.card {
    background: white;
    padding: 40px;
    border-radius: 0;
    box-shadow: none;
    transition: transform 0.4s, border-color 0.4s;
    border: 1px solid rgba(0,0,0,0.08);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

/* Interactive Hotspots */
.interactive-container {
    position: relative;
    display: block;
}

.interactive-container > img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    transition: transform 0.5s;
}

.hotspot {
    position: absolute;
    width: clamp(16px, 4vw, 24px);
    height: clamp(16px, 4vw, 24px);
    background-color: var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 0 0 rgba(192, 57, 43, 0.7);
    animation: pulse 2s infinite;
    z-index: 10;
}

.hotspot:hover {
    z-index: 100;
    animation: none;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(192, 57, 43, 0.7);
    }
    
    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(192, 57, 43, 0);
    }
    
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(192, 57, 43, 0);
    }
}

.hotspot:hover::after {
    content: attr(data-info);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    width: clamp(180px, 40vw, 250px);
    padding: clamp(10px, 2vw, 15px);
    background-color: #333;
    color: white;
    border-radius: 5px;
    font-size: clamp(0.75rem, 2vw, 0.9rem);
    pointer-events: none;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 20;
    line-height: 1.4;
}

.hotspot:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

/* Quiz Styles */
.quiz-container {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.question-box {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.question {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-quiz {
    padding: 10px 20px;
    border: 2px solid var(--primary-color);
    background: transparent;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-quiz:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-quiz.correct {
    background-color: #27ae60;
    border-color: #27ae60;
    color: white;
}

.btn-quiz.wrong {
    background-color: #e74c3c;
    border-color: #e74c3c;
    color: white;
}

/* Polemique Timeline */
.timeline {
    max-width: 800px;
    margin: 0 auto;
}

.event {
    margin-bottom: 30px;
    padding-left: 20px;
    border-left: 3px solid #ddd;
    transition: border-color 0.3s;
}

.event:hover {
    border-left-color: var(--accent-color);
}

.event span.bad {
    display: block;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 5px;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* Analysis Section */
.painting-analysis {
    display: flex;
    align-items: center;
    gap: 60px;
    margin-bottom: 120px;
}

.painting-analysis.reverse {
    flex-direction: row-reverse;
}

.painting-img {
    flex: 1.2;
}

.painting-img:hover img {
    transform: scale(1.02);
}

.caption {
    display: block;
    margin-top: 15px;
    font-family: var(--font-subheading);
    font-size: 1.1rem;
    color: #555;
    font-style: italic;
    text-align: center;
    font-style: italic;
}

.analysis-text {
    flex: 1;
}

.analysis-text h3 {
    margin-bottom: 24px;
    font-size: 2rem;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 60px 0;
    margin-top: 80px;
}

/* Responsive */
@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .painting-analysis, .painting-analysis.reverse {
        flex-direction: column;
    }
    
    .hero h1 {
        font-size: 3rem;
    }

    .sticky-nav ul {
        flex-wrap: wrap;
        gap: 15px;
    }

    .hotspot {
        width: 16px;
        height: 16px;
    }

    .hotspot:hover::after {
        width: 160px;
        font-size: 0.75rem;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .hotspot {
        width: 14px;
        height: 14px;
    }

    .hotspot:hover::after {
        width: 140px;
        font-size: 0.7rem;
        padding: 8px;
        left: 0;
        transform: translateX(-20%);
    }

    .hotspot:hover::before {
        left: 20%;
    }
}

/* Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #ddd; /* Placeholder background */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.scroll-progress.active {
    opacity: 1;
    visibility: visible;
}

.scroll-progress:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.scroll-progress::before {
    content: '';
    position: absolute;
    inset: 5px; /* Border thickness */
    background-color: var(--bg-color);
    border-radius: 50%;
    z-index: 1;
}

#scroll-value {
    position: relative;
    z-index: 2;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary-color);
}

/* Quote Box */
.quote-container {
    background-color: var(--bg-color);
    border-left: 5px solid var(--accent-color);
    padding: 20px;
    margin: 30px 0;
    font-family: var(--font-subheading);
    font-size: 1.3rem;
    font-style: italic;
    color: var(--primary-color);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.quote-container cite {
    display: block;
    margin-top: 10px;
    font-size: 1rem;
    font-weight: 600;
    font-style: normal;
    text-align: right;
}

/* Sources List */
.sources-list {
    list-style-type: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.sources-list li {
    background: white;
    padding: 10px 20px;
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    font-weight: 600;
    color: var(--primary-color);
    border: 1px solid var(--alt-bg-color);
}

/* Texture Linen Body */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://www.transparenttextures.com/patterns/white-linen.png');
    opacity: 0.25;
    z-index: -1;
    pointer-events: none;
}

/* Comparator Slider */
#comparaison {
    padding: 60px 0;
    text-align: center;
}

.comparator-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin: 40px auto;
    flex-wrap: wrap;
}

.comp-info-card {
    background: white;
    padding: 25px 30px;
    border-radius: 0;
    box-shadow: none;
    border: 1px solid rgba(0,0,0,0.08);
    text-align: left;
    min-width: 200px;
    max-width: 220px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.comp-info-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-color);
}

.comp-info-card h4 {
    font-family: var(--font-subheading);
    font-size: 1.4rem;
    margin: 10px 0 5px;
    color: var(--primary-color);
}

.comp-info-card .artist {
    font-weight: 600;
    color: var(--accent-color);
    margin: 0;
}

.comp-info-card .date {
    font-size: 0.95rem;
    color: #666;
    margin: 5px 0;
}

.comp-info-card .museum {
    font-size: 0.85rem;
    color: #888;
    font-style: italic;
    margin: 0;
}

.comp-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 0;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.comp-badge.realisme {
    background: var(--primary-color);
    color: white;
}

.comp-badge.academisme {
    background: var(--accent-color);
    color: white;
}

.comparator-container {
    position: relative;
    width: 400px;
    height: 550px;
    border: 8px solid #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    overflow: hidden;
    cursor: ew-resize;
    user-select: none;
    touch-action: none;
    flex-shrink: 0;
}

.comp-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
    overflow: hidden;
    z-index: 2;
}

.img-overlay .comp-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: white;
    box-shadow: 0 0 15px rgba(0,0,0,0.6);
    pointer-events: none;
    z-index: 10;
}

.handle-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

.handle-icon::before {
    content: '◀  ▶';
    font-size: 12px;
    color: #333;
    font-weight: bold;
}

/* Responsive Comparator */
@media (max-width: 900px) {
    .comparator-wrapper {
        flex-direction: column;
    }
    .comp-info-card {
        max-width: 100%;
        width: 100%;
    }
    .comp-info-card.left { order: 1; }
    .comparator-container { order: 2; width: 100%; max-width: 400px; }
    .comp-info-card.right { order: 3; }
}

/* Audio Control - Hidden (now in navbar) */
.audio-control {
    display: none;
}

