/* ==========================================
   PALETTE PERSONNALISÉE
   ========================================== */

:root {
    --purple: #60519b;
    --dark: #31323c;
    --light: #bfc0d1;
    --bg: #1a1a24;
    --surface: #242430;
}

/* ==========================================
   RESET
   ========================================== */

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

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--light);
    position: relative;
}

/* Particules flottantes */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--purple);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 15s infinite ease-in-out;
}

.particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 12s;
}

.particle:nth-child(2) {
    left: 25%;
    animation-delay: 2s;
    animation-duration: 15s;
}

.particle:nth-child(3) {
    left: 40%;
    animation-delay: 4s;
    animation-duration: 18s;
}

.particle:nth-child(4) {
    left: 55%;
    animation-delay: 1s;
    animation-duration: 14s;
}

.particle:nth-child(5) {
    left: 70%;
    animation-delay: 3s;
    animation-duration: 16s;
}

.particle:nth-child(6) {
    left: 85%;
    animation-delay: 5s;
    animation-duration: 13s;
}

.particle:nth-child(7) {
    left: 15%;
    animation-delay: 6s;
    animation-duration: 17s;
}

.particle:nth-child(8) {
    left: 90%;
    animation-delay: 2.5s;
    animation-duration: 19s;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100px) scale(1);
        opacity: 0;
    }
}

/* Grain texture overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 10;
}

/* Fond avec mesh gradient animé */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(96, 81, 155, 0.25) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 80%, rgba(191, 192, 209, 0.15) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 50%, rgba(96, 81, 155, 0.2) 0%, transparent 50%);
    animation: meshMove 15s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes meshMove {
    0%, 100% {
        background-position: 0% 0%, 100% 100%, 50% 50%;
        opacity: 1;
    }
    50% {
        background-position: 20% 30%, 80% 70%, 60% 40%;
        opacity: 0.8;
    }
}

/* Grille animée en diagonale */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    background-image: 
        linear-gradient(45deg, rgba(96, 81, 155, 0.03) 1px, transparent 1px),
        linear-gradient(-45deg, rgba(96, 81, 155, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridSlide 30s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes gridSlide {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    100% {
        transform: translate(60px, 60px) rotate(1deg);
    }
}

a {
    text-decoration: none;
    color: inherit;
}

/* ==========================================
   LAYOUT PRINCIPAL
   ========================================== */

.container {
    height: 100vh;
    display: flex;
    position: relative;
    z-index: 1;
}

/* ==========================================
   SIDEBAR
   ========================================== */

.sidebar {
    width: 80px;
    background: rgba(36, 36, 48, 0.7);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(96, 81, 155, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 0;
    gap: 40px;
    position: relative;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, 
        transparent 0%, 
        var(--purple) 30%, 
        var(--purple) 70%, 
        transparent 100%);
    opacity: 0.6;
    animation: slideGlow 3s ease-in-out infinite;
}

@keyframes slideGlow {
    0%, 100% {
        opacity: 0.4;
        transform: translateY(0);
    }
    50% {
        opacity: 0.8;
        transform: translateY(20px);
    }
}

.year {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--purple);
    letter-spacing: 0.1em;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    text-transform: uppercase;
}

.divider {
    width: 2px;
    height: 60px;
    background: linear-gradient(to bottom, transparent, var(--purple), transparent);
}

.social {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: auto;
}

.social a {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--light);
    opacity: 0.7;
    transition: all 0.3s;
    letter-spacing: 0.05em;
    padding: 8px 0;
}

.social a:hover {
    opacity: 1;
    color: var(--purple);
    transform: translateX(3px);
}

/* ==========================================
   MAIN CONTENT
   ========================================== */

.main {
    flex: 1;
    padding: 60px 80px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* ==========================================
   HEADER
   ========================================== */

.header {
    position: relative;
    animation: fadeIn 0.8s ease-out;
}

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

/* Top bar */
.header-top {
    margin-bottom: 40px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(96, 81, 155, 0.15);
    border: 1px solid rgba(96, 81, 155, 0.4);
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--light);
    position: relative;
    overflow: hidden;
}

.status-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(96, 81, 155, 0.3), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 200%; }
}

.pulse {
    width: 8px;
    height: 8px;
    background: var(--purple);
    border-radius: 50%;
    position: relative;
    animation: pulse 2s infinite;
}

.pulse::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--purple);
    border-radius: 50%;
    animation: ripple 2s infinite;
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.2);
        opacity: 0.8;
    }
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(3);
        opacity: 0;
    }
}

/* Nom avec animation */
.name-wrapper {
    position: relative;
    margin-bottom: 30px;
}

.name {
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.2;
    padding-bottom: 15px;
    display: inline-block;
    background: linear-gradient(135deg, var(--light) 0%, var(--purple) 50%, var(--light) 100%);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientMove 6s ease infinite;
    transition: all 0.3s;
}

@keyframes gradientMove {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.name:hover {
    transform: scale(1.05);
    filter: brightness(1.3) drop-shadow(0 0 20px rgba(96, 81, 155, 0.6));
}

.name-letter {
    display: inline;
}

/* Ligne sous le nom */
.name-underline {
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--purple), var(--light));
    margin-top: 10px;
    animation: lineGrow 2s ease-out 0.5s forwards;
}

@keyframes lineGrow {
    0% { width: 0; opacity: 0; }
    100% { width: 200px; opacity: 1; }
}

/* Subtitle avec séparateurs */
.subtitle-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.subtitle {
    font-size: 1rem;
    color: var(--light);
    font-weight: 400;
    letter-spacing: 0.05em;
    opacity: 0;
    animation: fadeInLeft 0.6s ease-out forwards;
}

.subtitle:nth-child(1) { animation-delay: 1s; }
.subtitle:nth-child(3) { animation-delay: 1.2s; }
.subtitle:nth-child(5) { animation-delay: 1.4s; }

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 0.8;
        transform: translateX(0);
    }
}

.subtitle-separator {
    color: var(--purple);
    font-size: 1.2rem;
    opacity: 0;
    animation: fadeIn 0.4s ease-out forwards;
}

.subtitle-separator:nth-child(2) { animation-delay: 1.1s; }
.subtitle-separator:nth-child(4) { animation-delay: 1.3s; }

/* ==========================================
   GRID ASYMÉTRIQUE
   ========================================== */

.grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 15px;
    height: 50%;
}

/* Layout asymétrique */
.c-1 {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
}

.c-2 {
    grid-column: 3 / 4;
    grid-row: 1 / 2;
}

.c-3 {
    grid-column: 4 / 6;
    grid-row: 1 / 2;
}

.c-4 {
    grid-column: 3 / 5;
    grid-row: 2 / 3;
}

.c-5 {
    grid-column: 5 / 6;
    grid-row: 2 / 3;
}

/* ==========================================
   CARTES
   ========================================== */

.card {
    position: relative;
    background: rgba(36, 36, 48, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(96, 81, 155, 0.3);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 25px;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    animation: fadeInUp 0.6s ease-out backwards;
}

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

.c-1 { animation-delay: 0.1s; }
.c-2 { animation-delay: 0.2s; }
.c-3 { animation-delay: 0.3s; }
.c-4 { animation-delay: 0.4s; }
.c-5 { animation-delay: 0.5s; }

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(96, 81, 155, 0.3) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s;
}

.card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(96, 81, 155, 0.6) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.6s ease;
}

.card:hover {
    transform: translateY(-15px) scale(1.03);
    border-color: var(--purple);
    background: rgba(36, 36, 48, 0.95);
    box-shadow: 
        0 30px 80px rgba(96, 81, 155, 0.6),
        0 0 60px rgba(96, 81, 155, 0.3);
}

.card:hover::before {
    opacity: 0.4;
}

.card:hover::after {
    width: 400px;
    height: 400px;
}

.card:active {
    transform: translateY(-10px) scale(1);
}

.card-inner {
    position: relative;
    z-index: 1;
    width: 100%;
}

.num {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--purple);
    opacity: 0.6;
    margin-bottom: 10px;
    letter-spacing: 0.1em;
    transition: all 0.3s;
}

.card:hover .num {
    opacity: 1;
    transform: translateY(-3px);
    color: var(--light);
}

.card h3 {
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    font-weight: 700;
    color: var(--light);
    margin-bottom: 5px;
    line-height: 1;
    transition: all 0.3s;
}

.card:hover h3 {
    transform: translateX(5px);
}

.card p {
    font-size: 0.85rem;
    color: var(--light);
    font-weight: 400;
    opacity: 0.8;
}

/* ==========================================
   CANVAS 3D DANS LES CARTES
   ========================================== */

.card-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.4;
    pointer-events: none;
}

.card:hover .card-canvas {
    opacity: 0.6;
}

/* Style spécifique pour la grande carte */
.c-1 h3 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.c-1 p {
    font-size: 1rem;
    opacity: 0.9;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 1024px) {
    .main {
        padding: 40px 40px;
    }
    
    .grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
        height: 60%;
    }
    
    .c-1 {
        grid-column: 1 / 3;
        grid-row: 1 / 2;
    }
    
    .c-2, .c-3, .c-4, .c-5 {
        grid-column: span 1;
        grid-row: span 1;
    }
    
    .c-2 { grid-column: 1; grid-row: 2; }
    .c-3 { grid-column: 2; grid-row: 2; }
    .c-4 { grid-column: 1; grid-row: 3; }
    .c-5 { grid-column: 2; grid-row: 3; }
}

@media (max-width: 768px) {
    .sidebar {
        width: 60px;
        padding: 30px 0;
    }
    
    .main {
        padding: 30px 20px;
    }
    
    .name {
        font-size: 3rem;
    }
    
    .grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(5, 1fr);
        gap: 12px;
    }
    
    .c-1, .c-2, .c-3, .c-4, .c-5 {
        grid-column: 1;
        grid-row: span 1;
    }
    
    .c-1 { grid-row: 1; }
    .c-2 { grid-row: 2; }
    .c-3 { grid-row: 3; }
    .c-4 { grid-row: 4; }
    .c-5 { grid-row: 5; }
}

/* ==========================================
   ACCESSIBILITÉ
   ========================================== */

.card:focus-visible {
    outline: 2px solid var(--purple);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}