/* ========================================
   CSS "La Déconstruction de l'Œuvre"
   Palette "Soleil de 18h30" - Design Cinématographique
   ======================================== */

/* Variables CSS - Palette "Soleil de 18h30" */
:root {
    --brun-cendre: #4A4644;
    --ambre-fonce: #2B2A2E;
    --bourgogne-profond: #1F1B1E;
    --or-pale: #FFF5E1;
    --degrade-rayons: linear-gradient(45deg, #D95D39, #F0A27B);
    --degrade-ambre-bourgogne: linear-gradient(135deg, #2B2A2E 0%, #1F1B1E 100%);
    --texture-bois: radial-gradient(circle at 20% 50%, #4A4644 0%, #3D3A37 50%, #4A4644 100%);
    
    /* Transitions et animations */
    --transition-reveal: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-hover: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-luxe: 0 20px 40px rgba(0, 0, 0, 0.4), 0 10px 20px rgba(0, 0, 0, 0.2);
    --shadow-douce: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Reset et Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--brun-cendre);
    color: var(--or-pale);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ========================================
   SYSTÈME DE RÉVÉLATION SCROLL
   ======================================== */

/* État initial - Invisible */
.reveal-element {
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px);
    transition: var(--transition-reveal);
}

/* État révélé - Visible */
.reveal-element.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Variantes d'animation d'entrée */
.reveal-element.slide-left {
    transform: translateX(-50px);
}

.reveal-element.slide-left.is-visible {
    transform: translateX(0);
}

.reveal-element.slide-right {
    transform: translateX(50px);
}

.reveal-element.slide-right.is-visible {
    transform: translateX(0);
}

.reveal-element.scale-up {
    transform: scale(0.8);
}

.reveal-element.scale-up.is-visible {
    transform: scale(1);
}

/* ========================================
   ACTE 1: LE PLAN D'OUVERTURE
   ======================================== */

#project-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-video-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--degrade-rayons);
    opacity: 0.7;
    z-index: 2;
}

.hero-video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 800px;
    padding: 0 2rem;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--or-pale);
    text-shadow: 0 0 20px rgba(255, 245, 225, 0.3), 0 4px 8px rgba(0, 0, 0, 0.5);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.hero-content p {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    margin-bottom: 3rem;
    color: var(--or-pale);
    opacity: 0.9;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.scroll-invitation {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    opacity: 0.8;
    animation: pulse-invitation 2s infinite;
}

.scroll-invitation span {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--or-pale);
}

.scroll-invitation::after {
    content: '↓';
    font-size: 1.5rem;
    color: var(--or-pale);
}

@keyframes pulse-invitation {
    0%, 100% { opacity: 0.8; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-5px); }
}

/* ========================================
   ACTE 2: LA TABLE DE L'ARCHITECTE
   ======================================== */

#architect-desk {
    position: relative;
    background: var(--texture-bois);
    padding: 8rem 0;
    min-height: 80vh;
}

.architect-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.challenge-column,
.strategy-column {
    position: relative;
}

.architect-grid h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 600;
    margin-bottom: 2rem;
    background: var(--degrade-rayons);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.text-block {
    background: rgba(47, 42, 46, 0.8);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 245, 225, 0.1);
    box-shadow: var(--shadow-douce);
    backdrop-filter: blur(10px);
}

.text-block p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--or-pale);
    opacity: 0.9;
}

.annotations-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

/* ========================================
   ACTE 3: L'ATELIER DU DESIGNER
   ======================================== */

#design-workshop {
    background: var(--texture-bois);
    padding: 8rem 0;
}

.workshop-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.workshop-container h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 4rem;
    background: var(--degrade-rayons);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mosaic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-auto-rows: minmax(200px, auto);
    gap: 2rem;
    grid-template-areas: 
        "palette typography wireframe"
        "text text tech";
}

.mosaic-card {
    background: var(--ambre-fonce);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(255, 245, 225, 0.15);
    box-shadow: var(--shadow-douce);
    transition: var(--transition-hover);
    position: relative;
    overflow: hidden;
}

.mosaic-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 245, 225, 0.1), transparent);
    transition: left 0.6s;
}

.mosaic-card:hover::before {
    left: 100%;
}

.mosaic-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-luxe);
}

.palette-card {
    grid-area: palette;
}

.typography-card {
    grid-area: typography;
}

.wireframe-card {
    grid-area: wireframe;
}

.text-card {
    grid-area: text;
    font-size: 1.1rem;
    line-height: 1.7;
}

.tech-card {
    grid-area: tech;
}

.tech-card ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.tech-card li {
    background: rgba(217, 93, 57, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    border: 1px solid rgba(217, 93, 57, 0.3);
}

/* ========================================
   ACTE 4: LE TABLEAU DES TROPHÉES
   ======================================== */

#trophy-room {
    background: var(--degrade-ambre-bourgogne);
    padding: 8rem 0;
    position: relative;
}

#trophy-room::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(217, 93, 57, 0.1) 0%, transparent 70%);
}

.trophy-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.trophy-container h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 4rem;
    color: var(--or-pale);
    text-shadow: 0 0 20px rgba(255, 245, 225, 0.3);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.stat-card {
    background: rgba(255, 245, 225, 0.1);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(255, 245, 225, 0.2);
    backdrop-filter: blur(10px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--degrade-rayons);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
    margin-bottom: 0.5rem;
}

.testimonial-card {
    background: linear-gradient(135deg, rgba(255, 245, 225, 0.15) 0%, rgba(255, 245, 225, 0.05) 100%);
    padding: 3rem;
    border-radius: 20px;
    border: 2px solid rgba(255, 245, 225, 0.3);
    box-shadow: var(--shadow-luxe);
    text-align: center;
    position: relative;
    backdrop-filter: blur(15px);
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 6rem;
    color: var(--or-pale);
    opacity: 0.3;
    font-family: serif;
}

.testimonial-card p {
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: var(--or-pale);
}

.testimonial-card p span {
    transition: background-color 0.4s ease;
    padding: 0 2px;
    border-radius: 3px;
}

.testimonial-card p span.highlighted {
    background: var(--degrade-rayons);
    color: white;
}

.testimonial-card footer {
    font-size: 1rem;
    font-weight: 600;
    color: var(--or-pale);
    opacity: 0.8;
}

.testimonial-card footer::before {
    content: '— ';
}

/* ========================================
   ACTE 5: LA PROCHAINE ŒUVRE
   ======================================== */

#next-creation {
    background: var(--texture-bois);
    padding: 8rem 0;
}

.next-creation-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.next-creation-container h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 4rem;
    background: var(--degrade-rayons);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.article-card {
    display: block;
    background: var(--ambre-fonce);
    border-radius: 16px;
    padding: 2rem;
    text-decoration: none;
    color: var(--or-pale);
    border: 1px solid rgba(255, 245, 225, 0.1);
    transition: var(--transition-hover);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--degrade-rayons);
    opacity: 0;
    transition: var(--transition-hover);
    z-index: -1;
}

.article-card:hover {
    transform: rotateX(5deg) rotateY(5deg) translateY(-10px);
    box-shadow: var(--shadow-luxe);
}

.article-card:hover::before {
    opacity: 0.1;
}

.final-cta {
    text-align: center;
}

.final-cta p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--or-pale);
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    background: var(--degrade-rayons);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition-hover);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(217, 93, 57, 0.4);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .architect-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .mosaic-grid {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "palette"
            "typography"
            "wireframe"
            "text"
            "tech";
    }
    
    .hero-content {
        padding: 0 1rem;
    }
    
    .text-block,
    .mosaic-card,
    .testimonial-card {
        padding: 1.5rem;
    }
    
    section {
        padding: 4rem 0 !important;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .text-block,
    .mosaic-card,
    .testimonial-card {
        padding: 1rem;
    }
    
    .related-articles-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   ANIMATIONS GLOBALES
   ======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Améliorations des performances */
* {
    will-change: auto;
}

.reveal-element {
    will-change: opacity, visibility, transform;
}

.article-card,
.mosaic-card,
.cta-button {
    will-change: transform, box-shadow;
}

/* Print styles */
@media print {
    .hero-video-container {
        display: none;
    }
    
    .scroll-invitation {
        display: none;
    }
    
    .annotations-container {
        display: none;
    }
}

/* --- NOUVEAUX STYLES SPÉCIFIQUES AUX CARTES --- */

/* Style commun pour les titres de cartes */
.mosaic-card h4 {
    color: var(--or-pale);
    font-family: 'Lora', serif;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 245, 225, 0.2);
    padding-bottom: 1rem;
}

/* Carte Palette de Couleurs */
.color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.swatch {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid rgba(255, 245, 225, 0.8);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Carte Typographie */
.font-display {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.font-display p {
    margin: 0;
}

.font-primary-example, .font-secondary-example {
    font-size: 3rem;
    color: var(--or-pale);
    line-height: 1;
}

.font-name {
    font-family: 'Inter', sans-serif;
    color: rgba(255, 245, 225, 0.8);
}

/* Carte Wireframe */
.wireframe-card img {
    border-radius: 8px;
    margin-top: 1rem;
    border: 1px solid rgba(255, 245, 225, 0.2);
}

/* Carte Technologies */
.tech-card ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0;
    margin-top: 1rem;
}

.tech-card li {
    background: rgba(217, 93, 57, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    border: 1px solid rgba(217, 93, 57, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--or-pale);
}