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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #000;
    color: #fff;
    overflow-x: hidden;
}

/* Pages */
.page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
}

.page.active {
    opacity: 1;
    visibility: visible;
}

/* Page d'accueil */
#home-page {
    background: radial-gradient(ellipse at center, #1a1a2e 0%, #000 100%);
    min-height: 400vh;
    position: relative;
}

/* Miroir intact */
#mirror-intact {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

#mirror-intact img {
    width: 800px;
    height: 800px;
    filter: drop-shadow(0 0 100px rgba(139, 92, 246, 0.7));
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(1deg);
    }
}

#mirror-intact.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Animation de fissure */
#mirror-intact.cracking {
    animation: crack 1s ease-out forwards;
}

@keyframes crack {
    0% {
        filter: drop-shadow(0 0 100px rgba(139, 92, 246, 0.7));
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        filter: drop-shadow(0 0 150px rgba(255, 50, 50, 0.8)) brightness(1.3);
        transform: translate(-50%, -50%) scale(1.05);
    }
    100% {
        filter: drop-shadow(0 0 200px rgba(255, 0, 0, 0.9)) brightness(0.5);
        transform: translate(-50%, -50%) scale(0.95);
        opacity: 0;
    }
}

/* Fragments */
.fragment {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    cursor: pointer;
    transition: opacity 0.6s ease, transform 0.6s ease;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.fragment.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.5) rotateY(90deg);
}

.fragment.visible {
    opacity: 1;
    pointer-events: auto;
    animation: fragmentAppear 1s ease-out forwards;
}

@keyframes fragmentAppear {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.3) rotateY(180deg) rotateX(45deg);
    }
    60% {
        transform: translate(-50%, -50%) scale(1.1) rotateY(-10deg) rotateX(-5deg);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotateY(0deg) rotateX(0deg);
    }
}

.fragment:hover .shard {
    transform: scale(1.08) rotateY(5deg);
    filter: drop-shadow(0 0 100px rgba(139, 92, 246, 1)) brightness(1.3);
}

/* Éclats de verre dessinés en CSS */
.shard {
    width: 350px;
    height: 450px;
    background: 
        linear-gradient(135deg, 
            #e8e8e8 0%,
            #f5f5f5 15%,
            #d0d0d0 30%,
            #ffffff 45%,
            #c8c8c8 60%,
            #e0e0e0 75%,
            #f0f0f0 90%,
            #d8d8d8 100%
        );
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-left-color: rgba(180, 180, 180, 0.6);
    border-bottom-color: rgba(160, 160, 160, 0.7);
    box-shadow: 
        inset 0 0 50px rgba(255, 255, 255, 0.5),
        inset -10px -10px 40px rgba(100, 100, 100, 0.2),
        inset 10px 10px 40px rgba(255, 255, 255, 0.4),
        0 0 80px rgba(139, 92, 246, 0.8),
        0 15px 50px rgba(0, 0, 0, 0.6),
        0 25px 80px rgba(139, 92, 246, 0.4),
        0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    animation: shardFloat 3s ease-in-out infinite;
}

@keyframes shardFloat {
    0%, 100% {
        transform: translateY(0px) rotateZ(0deg);
    }
    50% {
        transform: translateY(-10px) rotateZ(2deg);
    }
}

/* Reflets lumineux sur le miroir */
.shard::before {
    content: '';
    position: absolute;
    top: 8%;
    left: 15%;
    width: 40%;
    height: 45%;
    background: 
        radial-gradient(ellipse at top left,
            rgba(255, 255, 255, 0.95) 0%,
            rgba(255, 255, 255, 0.7) 20%,
            rgba(255, 255, 255, 0.3) 50%,
            transparent 80%
        );
    border-radius: 60% 40% 50% 50%;
    pointer-events: none;
    filter: blur(3px);
    animation: shimmer 4s ease-in-out infinite;
    mix-blend-mode: overlay;
}

@keyframes shimmer {
    0%, 100% {
        opacity: 0.7;
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.05) rotate(2deg);
    }
}

/* Éclat 1 - Forme irrégulière gauche */
.shard-1 {
    clip-path: polygon(
        20% 0%,
        0% 15%,
        5% 35%,
        0% 60%,
        15% 80%,
        10% 100%,
        35% 95%,
        50% 85%,
        60% 70%,
        55% 50%,
        65% 30%,
        50% 15%,
        40% 5%
    );
    transform: rotate(-15deg);
}

/* Éclat 2 - Forme triangulaire allongée */
.shard-2 {
    clip-path: polygon(
        30% 0%,
        10% 20%,
        5% 45%,
        20% 70%,
        15% 100%,
        45% 90%,
        70% 75%,
        85% 50%,
        95% 25%,
        80% 10%,
        60% 5%
    );
    transform: rotate(12deg);
}

/* Éclat 3 - Forme irrégulière droite */
.shard-3 {
    clip-path: polygon(
        40% 0%,
        20% 10%,
        10% 30%,
        0% 55%,
        5% 80%,
        25% 95%,
        50% 100%,
        75% 90%,
        90% 70%,
        95% 45%,
        85% 20%,
        70% 5%,
        55% 0%
    );
    transform: rotate(-8deg);
}

/* Reflets secondaires sur le miroir */
.shard::after {
    content: '';
    position: absolute;
    bottom: 10%;
    right: 12%;
    width: 30%;
    height: 40%;
    background: 
        radial-gradient(ellipse at bottom right,
            rgba(255, 255, 255, 0.8) 0%,
            rgba(255, 255, 255, 0.5) 30%,
            rgba(139, 92, 246, 0.15) 60%,
            transparent 80%
        );
    border-radius: 50% 60% 40% 50%;
    pointer-events: none;
    filter: blur(4px);
    animation: shimmer 4s ease-in-out infinite reverse;
    mix-blend-mode: overlay;
}

/* Bords cassés réalistes */
.shard-1,
.shard-2,
.shard-3 {
    filter: 
        drop-shadow(0 0 80px rgba(139, 92, 246, 0.8))
        drop-shadow(0 15px 50px rgba(0, 0, 0, 0.6))
        drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.4));
}

/* Effet de profondeur sur les bords */
.shard-1::before,
.shard-2::before,
.shard-3::before {
    box-shadow: 
        inset 0 0 30px rgba(255, 255, 255, 0.4),
        inset -8px -8px 25px rgba(100, 100, 100, 0.15),
        inset 8px 8px 25px rgba(255, 255, 255, 0.3);
}

/* Zone de scroll */
.scroll-spacer {
    height: 400vh;
    width: 100%;
}

/* Pages d'articles */
.article-page {
    background: radial-gradient(ellipse at top, #1a1a2e 0%, #000 100%);
    overflow-y: auto;
}

.article-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.back-btn {
    background: rgba(139, 92, 246, 0.2);
    border: 2px solid rgba(139, 92, 246, 0.5);
    color: #fff;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.back-btn:hover {
    background: rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.8);
}

article h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #fff 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.article-content {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #ddd;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content blockquote {
    border-left: 4px solid rgba(139, 92, 246, 0.6);
    padding-left: 2rem;
    margin: 2rem 0;
    font-style: italic;
    font-size: 1.3rem;
    color: #fff;
    background: rgba(139, 92, 246, 0.1);
    padding: 1.5rem 2rem;
    border-radius: 12px;
}
