@import url('https://fonts.googleapis.com/css2?family=Schibsted+Grotesk:wght@400;600;900&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
    --bg: #050505;
    --surface: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.08);
    --aqua: #00E5FF;
    --text: #ffffff;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --c1: #00E5FF; --c2: #0099FF; --c3: #00FFBB; --c4: #29762F;
    --c5: #80FF00; --c6: #FF0000; --c7: #FF8BFF; --c8: #FFA5A5;
}

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

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Schibsted Grotesk', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background & Overlays */
#canvas-bg {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -2;
    filter: blur(100px);
    pointer-events: none;
}

.overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    background: rgba(0, 0, 0, 0.25); 
}

/* Loader */
#loader {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 1s cubic-bezier(0.85, 0, 0.15, 1);
}

.loader-wrapper { width: 100%; text-align: center; }

.loader-title {
    font-size: clamp(2.5rem, 12vw, 10rem);
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255,255,255,0);
    position: relative;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: -0.05em;
    display: inline-block;
    animation: showOutline 0.6s ease-out forwards;
}

@keyframes showOutline {
    to { -webkit-text-stroke: 1px rgba(255,255,255,0.3); }
}

.loader-title::after {
    content: "MyMacM3_";
    position: absolute;
    left: 0; top: 0;
    width: 0%;
    height: 100%;
    color: #fff;
    -webkit-text-stroke: 0px;
    overflow: hidden;
    background: linear-gradient(90deg, var(--c1), var(--c3), var(--c2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fillAndStretch 1.2s cubic-bezier(0.7, 0, 0.3, 1) 0.6s forwards;
}

@keyframes fillAndStretch {
    0% { width: 0%; transform: scaleX(1.1); filter: blur(10px); }
    100% { width: 100%; transform: scaleX(1); filter: blur(0px); }
}

.loaded #loader { transform: translateY(-100%); }

/* Animations global (Montée vers le haut) */
.animate-in {
    opacity: 0;
    transform: translateY(40px);
    filter: blur(10px);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), 
                filter 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.loaded .animate-in {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

/* Hero Section */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    padding: 40px 20px;
    position: relative;
}

header { text-align: center; margin-bottom: 30px; }

.name {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    letter-spacing: -2px;
    background: linear-gradient(135deg, var(--text) 50%, var(--c3));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--c1);
    font-size: 0.9rem;
    font-weight: 600;
}
.location svg { width: 18px; height: 18px; fill: currentColor; }

/* Socials & Links */
.social-container {
    display: flex;
    gap: clamp(15px, 4vw, 25px);
    background: var(--surface);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border);
    padding: 0 30px;
    border-radius: 100px;
    margin-bottom: 25px;
    height: 64px;
    align-items: center;
    z-index: 10;
}

.social-container a i {
    font-size: 22px;
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
}

.social-container a:hover i {
    color: var(--c1);
    opacity: 1;
    transform: translateY(-4px) scale(1.1);
    filter: drop-shadow(0 0 10px var(--c1));
}

.links-section {
    display: flex;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
    justify-content: center;
}

.link-item {
    padding: 12px 24px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.link-item:hover {
    border-color: var(--c1);
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.08);
}

/* Grille de projets */
.content-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 100px;
    width: 100%;
}

.section-title {
    width: 100%;
    max-width: 1100px;
    padding: 0 20px;
    margin: 60px 0 30px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--c6);
    font-weight: 900;
}

.grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    width: 100%;
    max-width: 1100px;
    padding: 0 20px;
}

.card {
    display: block; 
    text-decoration: none; 
    height: 420px;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    cursor: none; 
    transition: var(--transition);
    flex: 1 1 500px;
    max-width: 538px;
}

.card-wo-imgcursor {
    display: block; 
    text-decoration: none; 
    height: 420px;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
    flex: 1 1 500px;
    max-width: 538px;
}

.card-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover .card-img { transform: scale(1.08); }
.card:hover { border-color: var(--c6); box-shadow: 0 10px 40px rgba(0,0,0,0.6); }

.card-wo-imgcursor:hover .card-img { transform: scale(1.08); }
.card-wo-imgcursor:hover { border-color: var(--c6); box-shadow: 0 10px 40px rgba(0,0,0,0.6); }

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 5%, transparent 60%);
}

.card-content {
    position: absolute;
    bottom: 24px; left: 24px; right: 24px;
    z-index: 2;
}

.card h3 { font-size: 1.5rem; margin-bottom: 4px; color: var(--c3); }
.card p { color: rgba(255,255,255,0.6); font-size: 0.9rem; margin-bottom: 16px; }

.card-wo-imgcursor h3 { font-size: 1.5rem; margin-bottom: 4px; color: var(--c3); }
.card-wo-imgcursor p { color: rgba(255,255,255,0.6); font-size: 0.9rem; margin-bottom: 16px; }

/* Conteneur URL style badge mono - Mise à jour police */
.card-url {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 8px 12px;
    border-radius: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: -0.02em;
    color: var(--c1);
    display: inline-block;
    width: fit-content;
}

/* Scroll & Cursor */
#project-cursor {
    position: fixed;
    width: 120px;
    height: 80px;
    pointer-events: none;
    z-index: 1000;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.3s ease, transform 0.3s ease;
    border: 2px solid var(--c1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
}

.scroll-indicator svg {
    width: 24px;
    height: 24px;
    animation: bounce 2s infinite ease-in-out;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
    60% { transform: translateY(-4px); }
}

@media (max-width: 900px) {
    .grid { gap: 20px; }
    .card { flex: 1 1 100%; max-width: 100%; height: 350px; cursor: default; }
    .social-container { padding: 0 15px; height: 56px; gap: 15px; }
    #project-cursor { display: none; }
}

.music-dashboard {
    display: grid;
    grid-template-columns: 1.5fr 1fr; /* Le morceau actuel prend plus de place */
    gap: 20px;
    width: 100%;
    max-width: 900px;
    padding: 0 20px;
}

.main-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 32px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.main-visual { position: relative; width: 100%; aspect-ratio: 1; }
#track-art { width: 100%; height: 100%; border-radius: 20px; object-fit: cover; }

.history-sidebar {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 32px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    max-height: 450px;
}

.sidebar-title { font-size: 0.7rem; text-transform: uppercase; opacity: 0.4; letter-spacing: 2px; margin-bottom: 15px; }

.history-list {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    transition: 0.3s;
}

.history-item img { width: 40px; height: 40px; border-radius: 8px; }
.history-item-info h4 { font-size: 0.85rem; color: #fff; margin: 0; }
.history-item-info p { font-size: 0.75rem; opacity: 0.5; margin: 0; }

.status-badge {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
}

/* Responsive */
@media (max-width: 768px) {
    .music-dashboard { grid-template-columns: 1fr; }
}

/* Style spécifique pour l'effet "Pile d'images" */
.card-album {
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Les "fausses" photos derrière la principale */
.card-album::before, 
.card-album::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    z-index: -1;
    transition: all 0.4s ease;
}

/* Position de la 1ère photo cachée */
.card-album::after {
    transform: rotate(-3deg) scale(0.98);
}

/* Position de la 2ème photo cachée */
.card-album::before {
    transform: rotate(3deg) scale(0.96);
}

/* Animation au survol : la pile s'écarte */
.card-album:hover::after {
    transform: rotate(-6deg) translate(-10px, -5px) scale(1);
    background: rgba(255, 255, 255, 0.08);
}

.card-album:hover::before {
    transform: rotate(6deg) translate(10px, -5px) scale(1);
    background: rgba(255, 255, 255, 0.08);
}

/* Ajustement du contenu pour l'album */
.card-album .card-img {
    filter: grayscale(20%);
    transition: 0.4s ease;
}

.card-album:hover .card-img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.album-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--c3); /* Ton rouge */
    color: white;
    font-size: 0.6rem;
    font-weight: 900;
    padding: 5px 12px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
}

/* --- SECTION EXPÉRIENCES (TIMELINE STYLE) --- */

.timeline {
    position: relative;
    max-width: 800px;
    margin: 60px auto;
    padding-left: 30px;
}

/* Ligne verticale avec fondu au début et à la fin */
.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 15%,
        rgba(255, 255, 255, 0.1) 85%,
        transparent 100%
    );
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

/* Le point lumineux sur la ligne */
.timeline-dot {
    position: absolute;
    left: -34px;
    top: 12px;
    width: 10px;
    height: 10px;
    background: var(--c3); /* Ta couleur principale */
    border-radius: 50%;
    box-shadow: 0 0 15px var(--c3);
    z-index: 2;
}

/* Carte d'expérience */
.experience-card {
    display: flex;
    gap: 20px;
    background: rgba(255, 255, 255, 0.02);
    padding: 25px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.experience-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #00ffa3;
    transform: translateX(10px);
}

.company-logo {
    width: 64px;
    height: 64px;
    min-width: 64px;
    background: #000;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    padding: 0;
}

.company-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Titres et Liens */
.company-link {
    text-decoration: none !important; /* Pas de souligné */
    display: inline-block;
}

.experience-info h3 { 
    margin: 0; 
    font-size: 1.4rem; 
    color: #fff; 
    font-weight: 900;
    transition: 0.3s ease;
}

.company-link:hover h3 {
    color: #00ffa3;
}

/* Description de l'entreprise (VERT NÉON) */
.company-desc { 
    color: #00ffa3 !important;
    font-size: 0.8rem; 
    font-weight: 800; 
    margin: 4px 0 15px 0; 
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

/* Sous-postes et dates */
.sub-role {
    margin-top: 15px;
    padding-left: 15px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.sub-role h4 { 
    margin: 0; 
    font-size: 1rem; 
    color: rgba(255, 255, 255, 0.9); 
}

.experience-date { 
    font-size: 0.8rem; 
    color: rgba(255, 255, 255, 0.4); 
    margin-top: 4px; 
}

.role-detail { 
    font-size: 0.85rem; 
    color: rgba(255, 255, 255, 0.6); 
    margin: 4px 0; 
}

/* Adaptabilité mobile */
@media (max-width: 600px) {
    .experience-card {
        flex-direction: column;
        padding: 20px;
    }
    
    .timeline {
        padding-left: 20px;
    }
    
    .timeline-dot {
        left: -24px;
    }
}