:root {
    /* Thème Clair (Défaut) */
    --bg-color: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --accent-color: #000000;
    --card-bg: #fcfcfc;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.05);
    --nav-bg: rgba(255, 255, 255, 0.8);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --transition-speed: 0.5s;
}

body.dark-mode {
    /* Thème Sombre Premium */
    --bg-color: #0d0d0e;
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0a0;
    --accent-color: #ffffff;
    --card-bg: #161618;
    --glass-bg: rgba(20, 20, 22, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --nav-bg: rgba(13, 13, 14, 0.82);
    --shadow-color: rgba(0, 0, 0, 0.5);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease, border-color var(--transition-speed) ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    scrollbar-width: none;
    -webkit-font-smoothing: antialiased;
}

body::-webkit-scrollbar {
    display: none;
}

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

ul {
    list-style: none;
}

/* =============================================
   NAVBAR
   ============================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100 !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: transparent;
    transition: background 0.3s ease, padding 0.3s ease;
}

.navbar.scrolled {
    padding: 15px 40px;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
}

.theme-toggle:hover {
    transform: rotate(15deg) scale(1.1);
}

.theme-toggle i {
    font-size: 1rem;
}

body.dark-mode .sun-icon { display: block; }
body.dark-mode .moon-icon { display: none; }
body:not(.dark-mode) .sun-icon { display: none; }
body:not(.dark-mode) .moon-icon { display: block; }

.nav-logo {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-links a {
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.nav-links a:hover {
    color: var(--accent-color);
}

/* =============================================
   MINIMALIST CARD (replaces glass-card)
   ============================================= */
.glass-card {
    background: transparent;
    border: none;
    border-radius: 0;
    transition: all 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
    display: inline-block;
    padding: 14px 28px;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--text-primary);
    background: transparent;
    color: var(--text-primary);
    letter-spacing: 2px;
    border-radius: 0;
}

.btn:hover {
    background: var(--text-primary);
    color: var(--bg-color);
}

/* =============================================
   SECTIONS (shared)
   ============================================= */
.section {
    padding: 100px 60px;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.section > * {
    width: 100%;
    max-width: 1100px;
}

/* Éléments internes pour parallaxe */
.section-title, .hero-greeting, .hero-name, .hero-tagline, .hero-buttons, 
.about-details, .skills-grid, .projects-grid, .timeline, .contact-card {
    transition: transform 0.1s linear, opacity 0.1s linear, letter-spacing 0.1s linear;
    will-change: transform, opacity, letter-spacing;
}

/* Removed dark backgrounds for light mode */
#apropos { background-color: transparent; }
#competences { background-color: transparent; }
#projets { background-color: transparent; }
#formation { background-color: transparent; }
#passions { background-color: transparent; }

.section-title {
    font-size: 11px;
    font-weight: 500;
    margin-bottom: 50px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-secondary);
    text-align: left;
    width: 100%;
}

/* =============================================
   HERO
   ============================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 40px;
    position: relative;
    background-color: transparent;
}

.hero-greeting {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 24px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.hero-name {
    font-size: 7vw;
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 24px;
    color: var(--text-primary);
    text-transform: uppercase;
}

.hero-tagline {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 48px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* =============================================
   ABOUT
   ============================================= */
.about-card {
    padding: 40px;
}

.about-card p {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 50px;
    letter-spacing: -0.01em;
}

.about-details {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    border-top: 1px solid var(--glass-border);
    padding-top: 30px;
}

.about-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.about-icon {
    font-size: 1.1rem;
}

/* =============================================
   SKILLS
   ============================================= */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

.skill-block {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.skill-block-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-primary);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--glass-border);
}

.skill-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 24px;
}

.skill-logo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 52px;
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0.8;
}

.skill-logo-item:hover {
    transform: translateY(-3px);
    opacity: 1;
}

.skill-logo-item i {
    font-size: 32px;
    line-height: 1;
}

.skill-logo-item span {
    font-size: 9px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    text-align: center;
    white-space: nowrap;
}

.skill-logo-item.skill-logo-text {
    width: auto;
}

.skill-logo-text span {
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    padding: 6px 10px;
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    white-space: nowrap;
}

.skill-card {
    padding: 28px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.skill-icon {
    font-size: 1.5rem;
}

.skill-name {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =============================================
   PROJECTS
   ============================================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.project-card {
    padding: 32px;
}

.project-card h3 {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-card p {
    font-size: 14px;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 24px;
}

.project-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    padding: 6px 14px;
    font-size: 10px;
    font-weight: 500;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =============================================
   TIMELINE (Formation)
   ============================================= */
.timeline {
    position: relative;
    padding-left: 0;
}

.timeline::before {
    display: none;
}

.timeline-item {
    position: relative;
    margin-bottom: 0;
    border-bottom: 1px solid var(--glass-border);
}

.timeline-dot {
    display: none;
}

.timeline-card {
    padding: 30px 0;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
}

.timeline-card h3 {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 0;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timeline-place {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timeline-date {
    font-size: 11px;
    color: var(--text-primary);
    text-align: right;
    font-weight: 500;
}

/* =============================================
   CONTACT
   ============================================= */
.contact-card {
    padding: 0;
    max-width: 600px;
    width: 100%;
}

.form-group {
    margin-bottom: 24px;
}

.form-input {
    width: 100%;
    padding: 16px 0;
    border: none;
    border-bottom: 1px solid var(--glass-border);
    background: transparent;
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all 0.3s ease;
    border-radius: 0;
}

.form-input::placeholder {
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1px;
    opacity: 0.5;
}

.form-input:focus {
    border-color: var(--accent-color);
}

.form-textarea {
    min-height: 140px;
    resize: vertical;
}

.btn-submit {
    width: 100%;
    text-align: center;
    margin-top: 8px;
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
    text-align: center;
    padding: 40px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
    border-top: 1px solid var(--glass-border);
    background-color: transparent;
    position: relative;
    width: 100vw;
}

/* =============================================
   HORIZONTAL SLIDER (INJECTED CLASSES)
   ============================================= */
.scroll-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: var(--bg-color);
    z-index: 10;
}

/* L'index Navbar doit être au-dessus du z-index 10 ! */
.navbar {
    z-index: 100 !important;
}

.horizontal-wrapper {
    display: flex;
    align-items: center; 
    height: 100vh;
    width: max-content;
    padding: 0; /* Géré par l'offset JS désormais */
    gap: 0; /* Géré par SLIDE_WIDTH_VW dans script.js */
    will-change: transform;
}

.slide {
    width: 100vw; 
    height: 100vh;
    flex-shrink: 0;
    overflow-y: hidden;
    overflow-x: hidden;
    transform-origin: center center;
    background: var(--card-bg);
    /* Ombre profonde et diffuse pour le mode Galerie */
    box-shadow: 0 60px 120px var(--shadow-color);
    border-radius: 4px; 
    will-change: transform, opacity;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* On ajuste les espacements internes de la slide pour le format centré */
.slide > div, .slide > form {
    width: 100%;
    padding: 20px;
}

.slide::-webkit-scrollbar {
    width: 0px;
    display: none;
}

/* =============================================
   FADE-IN ANIMATION
   ============================================= */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
    .navbar {
        padding: 0 20px;
    }

    .nav-links {
        display: none;
    }

    .hero-name {
        font-size: 2.8rem;
    }

    .section {
        padding: 80px 24px;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .about-details {
        flex-direction: column;
        gap: 16px;
    }
}

/* =============================================
   ZOOM PROJET (OVERLAY FLIP ANIMATION)
   ============================================= */
.project-card {
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.project-card:hover {
    background-color: var(--glass-bg);
    border-color: var(--glass-border);
    transform: translateY(-2px);
}

.project-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: 9999;
    pointer-events: none;
    visibility: hidden; /* Masqué quand inactif */
}

.project-overlay.preparing { 
    pointer-events: auto; 
    visibility: visible; 
}

.project-overlay.active { 
    pointer-events: auto; 
    visibility: visible; 
}

.project-overlay-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-color);
    opacity: 0;
    transition: opacity 0.6s ease;
}

.project-overlay.active .project-overlay-bg {
    opacity: 1; /* Le fond devient uni pour masquer le reste du portfolio */
}

.project-overlay-card {
    position: absolute;
    background: var(--bg-color);
    border: 1px solid var(--glass-border);
    /* L'Easing cubic-bezier Apple-like très smooth pour le zoom et le dézoom */
    transition: all 0.6s cubic-bezier(0.85, 0, 0.15, 1); 
    z-index: 10000;
    overflow: hidden;
}

.project-overlay.active .project-overlay-card {
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    border-radius: 0;
    border: none;
    overflow-y: auto; /* Permet de scroller à l'intérieur de l'étude de cas */
}

/* Le clone visuel parfait de la carte pour faire illusion au début */
#card-clone {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 1;
    transition: opacity 0.4s ease;
}

.project-overlay.active #card-clone {
    opacity: 0; /* Fond la carte initiale pour faire place au contenu textuel détaillé */
    pointer-events: none;
}

/* Le contenu détaillé du projet */
.modal-content-wrapper {
    position: absolute;
    top: 0; left: 0; width: 100%; min-height: 100%;
    padding: 120px 20px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease 0.3s; /* Commence à apparaitre après le début du déplacement */
    pointer-events: none;
}

.project-overlay.active .modal-content-wrapper {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.modal-close {
    position: fixed;
    top: 40px;
    right: 40px;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 500;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-primary);
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-overlay.active .modal-close {
    opacity: 1;
    transition: opacity 0.3s ease 0.6s; /* Le bouton retour apparait à la toute fin */
}

.modal-title {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.modal-body p {
    font-size: 15px;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 24px;
}

/* =============================================
   PASSIONS (Interactive map on slide)
   ============================================= */
.passion-section {
    padding: 0 !important;
    justify-content: center !important;
    align-items: center !important;
    overflow: hidden !important;
    position: relative;
}

.passion-section > * {
    max-width: none !important;
}

/* --- Teaser (default view, before zoom) --- */
.passion-teaser {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 5;
    opacity: 1;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.teaser-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.teaser-hint {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-secondary);
    opacity: 0.5;
    margin-top: 16px;
    transition: opacity 0.3s ease;
}

/* --- CSS Door (white + black outline, 3D open) --- */
.door-frame {
    width: 200px;
    height: 320px;
    border: 4px solid #1a1a1a;
    border-radius: 6px 6px 2px 2px;
    background: #111;
    perspective: 800px;
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    filter: drop-shadow(0 16px 40px rgba(0,0,0,0.25));
    transition: filter 0.3s ease;
}
.door-frame:hover {
    filter: drop-shadow(0 20px 50px rgba(0,0,0,0.35));
}

/* The actual panel that swings open */
.door-panel {
    position: absolute;
    inset: 4px;
    background: #f5f5f5;
    border-radius: 3px 3px 0 0;
    transform-origin: right center;
    transform: rotateY(0deg);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.5s ease;
    box-shadow: inset 2px 0 8px rgba(0,0,0,0.04);
    /* Subtle panel lines */
    background-image:
        linear-gradient(to bottom, transparent 18%, #e8e8e8 18%, #e8e8e8 18.5%, transparent 18.5%,
                                     transparent 55%, #e8e8e8 55%, #e8e8e8 55.5%, transparent 55.5%);
}

body.dark-mode .door-frame {
    border-color: #e0e0e0;
    background: #ccc;
}
body.dark-mode .door-panel {
    background: #f0f0f0;
    background-image:
        linear-gradient(to bottom, transparent 18%, #ddd 18%, #ddd 18.5%, transparent 18.5%,
                                     transparent 55%, #ddd 55%, #ddd 55.5%, transparent 55.5%);
}

/* Door handle */
.door-handle {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 28px;
    border-radius: 5px;
    background: linear-gradient(135deg, #d4a54a, #c49332);
    box-shadow: -1px 1px 3px rgba(0,0,0,0.2);
    transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Frame states */
.door-frame.frame-1 .door-panel {
    transform: rotateY(18deg);
    box-shadow: -6px 0 20px rgba(0,0,0,0.12);
}
.door-frame.frame-2 .door-panel {
    transform: rotateY(42deg);
    box-shadow: -12px 0 30px rgba(0,0,0,0.15);
}
.door-frame.frame-3 .door-panel {
    transform: rotateY(78deg);
    box-shadow: -18px 0 40px rgba(0,0,0,0.18);
}

/* Subtle idle breathing animation */
.door-frame:not(.frame-3) {
    animation: doorPulse 2.5s ease-in-out infinite;
}
@keyframes doorPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.012); }
}

/* Hide hint when door starts opening */
.passion-teaser.door-hovering .teaser-hint {
    opacity: 0;
}

/* When focused: hide teaser */
.passion-section.focused .passion-teaser {
    opacity: 0;
    pointer-events: none;
}

/* --- Map layer (hidden by default, shown on zoom) --- */
.passion-map-layer {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease 0.15s;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

.passion-section.focused .passion-map-layer {
    opacity: 1;
    pointer-events: auto;
    cursor: default;
    touch-action: none;
    background: var(--bg-color);
    z-index: 999;
    position: fixed;
    inset: 0;
}
.passion-section.focused .passion-map-layer:active {
    cursor: default;
}

/* Kill selection on EVERYTHING inside the map, keep default cursor */
.passion-section.focused .passion-map-layer,
.passion-section.focused .passion-map-layer * {
    cursor: default !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    -webkit-user-drag: none !important;
    -webkit-touch-callout: none !important;
}
/* Grabbing cursor while actively dragging */
.passion-section.focused .passion-map-layer.dragging,
.passion-section.focused .passion-map-layer.dragging * {
    cursor: grabbing !important;
}

/* Only nodes and back button get pointer cursor */
.passion-section.focused .map-node,
.passion-section.focused .map-node * {
    cursor: pointer !important;
}
.passion-section.focused .passion-back-btn {
    cursor: pointer !important;
}

.passion-map-title {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-primary);
    pointer-events: none;
}

/* =============================================
   INTRO ANIMATION
   ============================================= */
#intro-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #0d0d0e;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
    overflow: hidden;
    /* Whole overlay fades out at end */
    animation: intro-overlay-out 0.5s ease 2.6s forwards;
}
#intro-overlay.skip {
    display: none;
}
.intro-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    text-align: center;
    position: relative;
    z-index: 2;
    animation: intro-inner-out 0.35s ease 2.2s forwards;
}
.intro-line {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    opacity: 0;
    transform: translateY(12px);
}
.intro-name {
    font-family: 'Inter', sans-serif;
    font-size: clamp(36px, 6vw, 72px);
    font-weight: 700;
    letter-spacing: -1px;
    color: #ffffff;
    opacity: 0;
    transform: translateY(16px);
}
.intro-line-1 { animation: intro-fade-up 0.6s cubic-bezier(0.16,1,0.3,1) 0.25s forwards; }
.intro-name   { animation: intro-fade-up 0.7s cubic-bezier(0.16,1,0.3,1) 0.55s forwards; }
.intro-line-2 { animation: intro-fade-up 0.6s cubic-bezier(0.16,1,0.3,1) 0.85s forwards; }
.intro-curtain {
    position: absolute;
    left: 0;
    width: 100%;
    height: 50%;
    background: #0d0d0e;
    z-index: 1;
}
.intro-curtain-top    { top: 0;    transform-origin: top;    animation: curtain-top-out    0.65s cubic-bezier(0.7,0,0.3,1) 2.25s forwards; }
.intro-curtain-bottom { bottom: 0; transform-origin: bottom; animation: curtain-bottom-out 0.65s cubic-bezier(0.7,0,0.3,1) 2.25s forwards; }
@keyframes intro-fade-up {
    to { opacity: 1; transform: translateY(0); }
}
@keyframes intro-inner-out {
    to { opacity: 0; transform: scale(0.96); }
}
@keyframes curtain-top-out {
    to { transform: scaleY(0); }
}
@keyframes curtain-bottom-out {
    to { transform: scaleY(0); }
}
@keyframes intro-overlay-out {
    to { opacity: 0; pointer-events: none; }
}

/* =============================================
   NAV DOTS
   ============================================= */
.nav-dots {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 9000;
}
.nav-dot {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid var(--text-primary);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background 0.25s ease, transform 0.25s ease;
    outline: none;
}
.nav-dot.active {
    background: var(--text-primary);
    transform: scale(1.35);
}
.nav-dot .nav-dot-label {
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-primary);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.nav-dot:hover .nav-dot-label,
.nav-dot.active .nav-dot-label {
    opacity: 1;
}
/* Hide dots when passion map is open */
.passion-section.focused ~ .nav-dots,
body.passion-focused .nav-dots {
    opacity: 0;
    pointer-events: none;
}
@media (max-width: 600px) {
    .nav-dots { right: 12px; gap: 10px; }
}

.passion-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-primary);
    background: transparent;
    border: 1px solid var(--text-primary);
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
    position: relative;
    overflow: hidden;
}
.passion-open-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--text-primary);
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 0;
}
.passion-open-btn:hover::after {
    transform: scaleX(1);
    opacity: 1;
}
.passion-open-btn:hover .passion-open-label,
.passion-open-btn:hover .passion-open-arrow {
    color: var(--bg-color);
    position: relative;
    z-index: 1;
}
.passion-open-btn .passion-open-label,
.passion-open-btn .passion-open-arrow {
    position: relative;
    z-index: 1;
    transition: color 0.25s ease;
}
.passion-open-btn .passion-open-arrow {
    transition: color 0.25s ease, transform 0.25s ease;
}
.passion-open-btn:hover .passion-open-arrow {
    transform: translateX(4px);
}

.passion-map-hint {
    position: absolute;
    top: 50px;
    right: 50px;
    left: auto;
    transform: none;
    z-index: 20;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-secondary);
    pointer-events: none;
    opacity: 0.6;
}

.passion-back-btn {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%) scale(1);
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 10px 22px 10px 18px;
    border-radius: 999px;
    cursor: pointer;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 18px rgba(0,0,0,0.18);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    animation: backbtn-pulse 3s ease-in-out infinite;
    opacity: 0;
    pointer-events: none;
}
.passion-section.focused .passion-back-btn {
    opacity: 1;
    pointer-events: auto;
}
@keyframes backbtn-pulse {
    0%, 100% { box-shadow: 0 2px 18px rgba(0,0,0,0.18); }
    50%       { box-shadow: 0 2px 28px rgba(0,0,0,0.32); }
}
.passion-back-btn .back-btn-icon {
    font-size: 14px;
    line-height: 1;
}
.passion-back-btn .back-btn-label {
    line-height: 1;
}
.passion-back-btn:hover {
    background: var(--text-primary);
    color: var(--bg-color);
    transform: translateX(-50%) scale(1.06);
    box-shadow: 0 4px 32px rgba(0,0,0,0.28);
    animation: none;
}

/* Map specific styles */
.map-viewport {
    width: 100%;
    height: 100%;
    border-radius: 0;
    overflow: hidden;
    position: absolute;
    inset: 0;
    cursor: inherit;
    touch-action: none;
    background: var(--bg-color);
    clip-path: inset(0);
}
.map-viewport:active { cursor: inherit; }

.map-inner {
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    transform-origin: 0 0;
    will-change: transform;
    cursor: inherit;
}
.map-inner.zoom-transition {
    transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Gallery tile — ordered grid */
.map-node {
    position: absolute;
    width: 180px;
    height: 220px;
    cursor: pointer !important;
    user-select: none;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.35s ease,
                filter 0.35s ease;
    opacity: 0.9;
}
.map-node:hover:not(.active) {
    transform: scale(1.06);
    opacity: 1;
    z-index: 50;
}
.map-node.active {
    opacity: 1;
    z-index: 100;
    filter: none !important;
    transform-origin: center center;
    transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.35s ease;
    will-change: transform;
}
.map-node.no-anim {
    transition: none !important;
}

/* Title label (cathydolle-style) */
.map-node .node-title {
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-secondary);
    opacity: 0;
    transition: opacity 0.25s ease;
}

/* =============================================
   IMMERSIVE MIND — "Dans la tête d'Amine"
   ============================================= */
.mind-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: radial-gradient(ellipse at 50% 50%, #111118 0%, #08080c 60%, #020204 100%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s 1s;
    overflow: hidden;
}

.mind-overlay.active {
    opacity: 1;
    visibility: visible;
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s 0s;
}

/* Particle canvas */
.mind-particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Cursor light */
.mind-light {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.3s;
    will-change: left, top;
}

/* Card space */
.mind-space {
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow: hidden;
}

/* Floating image cards */
.mind-card {
    position: absolute;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    will-change: transform, filter, opacity;
    transition: filter 0.6s ease, box-shadow 0.6s ease;
    box-shadow: 0 4px 30px rgba(0,0,0,0.4);
}

.mind-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.mind-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    pointer-events: none;
    z-index: 2;
}

.mind-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.55) 100%);
    pointer-events: none;
    border-radius: 14px;
    z-index: 1;
    transition: opacity 0.4s;
}

.mind-card .mind-card-title {
    position: absolute;
    bottom: 10px;
    left: 12px;
    right: 12px;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0);
    z-index: 3;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.4s ease;
}

.mind-card:hover .mind-card-title {
    color: rgba(255,255,255,0.9);
}

.mind-card:hover {
    box-shadow: 0 0 60px rgba(255,255,255,0.12), 0 8px 40px rgba(0,0,0,0.5);
    filter: brightness(1.2) !important;
}

/* Close button */
.mind-close {
    position: absolute;
    top: 32px;
    right: 40px;
    background: none;
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.6);
    font-size: 18px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mind-close:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
    transform: rotate(90deg);
    border-color: rgba(255,255,255,0.3);
}

.mind-title {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    z-index: 100;
    opacity: 0;
    transition: opacity 0.8s 0.6s;
}

.mind-overlay.active .mind-title { opacity: 1; }

.mind-explore {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 32px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #fff;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 30px;
    cursor: pointer;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.6s 0.9s, background 0.3s, border-color 0.3s, transform 0.3s;
    backdrop-filter: blur(8px);
    white-space: nowrap;
}
.mind-overlay.active .mind-explore { opacity: 1; }
.mind-explore:hover {
    background: rgba(255,255,255,0.14);
    border-color: rgba(255,255,255,0.35);
    transform: translateX(-50%) scale(1.05);
}

.mind-hint {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.18);
    z-index: 100;
    opacity: 0;
    transition: opacity 0.8s 1.2s;
    white-space: nowrap;
}

.mind-overlay.active .mind-hint { opacity: 1; }

/* Fullscreen zoom view */
.mind-zoomed {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: rgba(2,2,4,0.92);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0s 0.6s;
    cursor: zoom-out;
}

.mind-zoomed.active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.6s ease, visibility 0s 0s;
}

.mind-zoomed img {
    max-width: 75vw;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 30px 100px rgba(0,0,0,0.7);
    transform: scale(0.8);
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.mind-zoomed.active img {
    transform: scale(1);
}

.mind-zoomed-title {
    margin-top: 24px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.6s 0.3s ease;
}

.mind-zoomed.active .mind-zoomed-title {
    opacity: 1;
    transform: translateY(0);
}

.map-node:hover .node-title {
    opacity: 1;
}
.map-node.active .node-title {
    opacity: 1;
    color: var(--text-primary);
}

.map-node .node-visual {
    width: 100%;
    height: 100%;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    background: transparent;
    border: none;
    box-shadow: none;
    transition: box-shadow 0.35s ease;
    overflow: hidden;
    position: relative;
}
.map-node .node-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
    filter: grayscale(100%);
    transition: filter 0.4s ease, object-fit 0s;
    -webkit-user-drag: none !important;
    user-select: none !important;
    pointer-events: none;
}
/* GIF tiles: always animated, color only on hover/active */
.map-node.gif-tile .node-visual .gif-img {
    filter: grayscale(100%);
    transition: filter 0.4s ease;
    object-fit: cover;
}
.map-node.gif-tile:hover .node-visual .gif-img,
.map-node.gif-tile.active .node-visual .gif-img {
    filter: grayscale(0%) !important;
}
.map-node.gif-tile.active .node-visual .gif-img {
    object-fit: contain;
    transition: none;
}

.map-node:hover .node-visual img {
    filter: grayscale(0%);
}

/* When enlarged: show full image in color */
.map-node.active .node-visual img {
    object-fit: contain;
    filter: grayscale(0%) !important;
    transition: none;
}
.map-node:hover .node-visual {
    box-shadow: none;
}

/* Music play button */
.map-node .node-music-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    opacity: 0.85;
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
    pointer-events: none;
    backdrop-filter: blur(4px);
    border: 2px solid rgba(255,255,255,0.25);
}
.map-node:hover .node-music-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(0,0,0,0.7);
}
.map-node.playing .node-music-icon {
    opacity: 1;
    background: rgba(30,215,96,0.8);
    border-color: rgba(30,215,96,0.5);
}

/* Hide play icon when tile is active/zoomed */
.map-node.active .node-music-icon {
    opacity: 0;
    pointer-events: none;
}

/* Spotify embed — fixed overlay, positioned by JS */
.spotify-embed-overlay {
    position: fixed;
    width: 300px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    pointer-events: auto;
    z-index: 1100;
    cursor: default !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    transform: translateX(-50%);
    display: none;
}
.spotify-embed-overlay.visible {
    display: block;
}
.spotify-embed-overlay iframe {
    pointer-events: auto;
    cursor: default !important;
}

/* Hide non-active tiles when one is focused (prevents dezoom visual on settle swap) */
.map-inner.has-active .map-node:not(.active) {
    opacity: 0 !important;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

@media (max-width: 900px) {
    .passion-back-btn { bottom: 20px; }
    .passion-map-title { top: 20px; font-size: 11px; }
}
