/* =========================================
   STYLES GLOBAUX
   ========================================= */
:root {
    --accent: #BFA181;
    --bg-dark: #0a0a0f;
    --text-light: rgba(255, 255, 255, 0.85);
    --text-muted: rgba(255, 255, 255, 0.6);
    --glass-bg: rgba(15, 15, 20, 0.75);
    --glass-border: rgba(191, 161, 129, 0.25);
    --glass-blur: blur(25px);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: #000; font-family: 'Inter', sans-serif; color: #fff; overflow: hidden; height: 100vh; width: 100vw; }

/* --- ZOOM INITIAL SUR LE CANVAS --- */
#canvas-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0;
    transform: scale(1.5);
    transition: transform 3s cubic-bezier(0.25, 1, 0.5, 1);
}
#canvas-container.zoom-out {
    transform: scale(1);
}

/* --- SPLASH SCREEN --- */
#splash-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: transparent;
    z-index: 9999;
    display: flex; flex-direction: column;
    padding: 40px 60px;
    transition: opacity 1s ease;
}

.splash-header-wrapper {
    width: 100%;
    opacity: 1; transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.splash-header-content {
    display: flex; justify-content: space-between; align-items: baseline;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(191, 161, 129, 0.4);
}

.splash-brand {
    font-family: 'Playfair Display', serif;
    font-size: clamp(40px, 6vw, 90px);
    font-weight: 700; color: #fff;
    letter-spacing: -2px; line-height: 0.8;
}

.splash-nav-list {
    font-family: 'Space Mono', monospace;
    font-size: 11px; color: var(--accent);
    text-transform: uppercase; letter-spacing: 3px;
    display: flex; gap: 40px;
}

.splash-center {
    flex-grow: 1;
    display: flex; flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 10vh;
    width: 100%;
}

.splash-text-container {
    text-align: center;
    margin-bottom: 80px;
}

.splash-quote-main {
    font-family: 'Playfair Display', serif;
    font-size: clamp(28px, 3.5vw, 52px);
    color: #fff; line-height: 1.3;
    margin-bottom: 40px;
    opacity: 1; transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.splash-quote-sub {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: clamp(16px, 2vw, 24px);
    color: rgba(255, 255, 255, 0.7);
    opacity: 1; transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.splash-btn {
    background: transparent; color: #fff;
    font-family: 'Space Mono', monospace;
    font-size: 13px; padding: 20px 60px;
    border: 1px solid rgba(255,255,255,0.2);
    text-transform: uppercase; letter-spacing: 3px;
    cursor: pointer; transition: all 0.3s ease;
    opacity: 1; transform: translateY(0);
}
.splash-btn:hover { background: #fff; color: #000; letter-spacing: 5px; border-color: #fff; }
.splash-btn.loading { opacity: 0; pointer-events: none; }

.splash-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-bottom: 40px;
    width: 220px;
    transition: opacity 0.6s ease;
}
.splash-loader.fade-out { opacity: 0; pointer-events: none; }
.splash-loader-track {
    width: 100%;
    height: 1px;
    background: rgba(255,255,255,0.12);
    position: relative;
    overflow: hidden;
}
.splash-loader-fill {
    position: absolute;
    top: 0; left: 0; height: 100%;
    width: 0%;
    background: var(--accent);
    transition: width 0.25s ease;
}
.splash-loader-percent {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    color: rgba(255,255,255,0.35);
    letter-spacing: 3px;
}

.fade-out-up {
    opacity: 0 !important;
    transform: translateY(-30px) !important;
    pointer-events: none;
}

@media (max-width: 900px) {
    #splash-screen { padding: 30px; }
    .splash-header-content { flex-direction: column; align-items: center; gap: 20px; border-bottom: none; }
    .splash-brand { font-size: 60px; }
    .splash-nav-list { font-size: 10px; gap: 20px; }
    .splash-center { padding-top: 5vh; }
}

/* HEADER */
#header {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 5000;
    padding: 10px 40px; display: flex; justify-content: space-between; align-items: center;
    gap: 40px;
    background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 50px; user-select: none;
    pointer-events: auto;
    width: auto; max-width: 95%;
    opacity: 0; transition: opacity 2s ease;
}
#header.visible { opacity: 1; }

.nav-group { display: flex; gap: 30px; align-items: center; width: 200px; justify-content: center; }

.nav-item {
    color: rgba(255, 255, 255, 0.5); text-decoration: none; font-family: 'Space Mono', monospace;
    font-size: 12px; letter-spacing: 1px; text-transform: uppercase; cursor: pointer;
    transition: color 0.3s; white-space: nowrap;
}
.nav-item:hover, .nav-item.active { color: #fff; text-shadow: 0 0 10px rgba(255,255,255,0.5); }

/* BOUTON CENTRAL */
#header-center-btn {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: 60px; height: 60px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    z-index: 5001;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: #000;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 0 15px rgba(0,0,0,0.8);
}
#header-center-btn:hover {
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 0 25px rgba(255, 165, 0, 0.4);
    border-color: var(--accent);
}
#header-center-btn img {
    width: 100%; height: 100%; object-fit: cover;
    transform: scale(1.5);
}

/* SECTIONS */
#sections-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 10; pointer-events: none; }
.section { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; visibility: hidden; transition: opacity 0.8s ease, visibility 0.8s; pointer-events: none; }
.section.active { opacity: 1; visibility: visible; pointer-events: auto !important; z-index: 100; }

.glass-panel { background: var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-border); box-shadow: 0 15px 35px -10px rgba(0,0,0,0.5); transition: transform 0.3s ease, border-color 0.3s ease; }
.deco-cross { position: absolute; font-family: 'Space Mono', monospace; font-size: 12px; color: rgba(255, 255, 255, 0.15); pointer-events: none; }
.section-number { position: absolute; bottom: 25px; left: 40px; font-family: 'Space Mono', monospace; font-size: 48px; font-weight: 700; color: rgba(255, 255, 255, 0.08); line-height: 1; pointer-events: none; }
.section-number span { font-size: 14px; color: #BFA181; display: block; margin-top: 5px; }

/* ACCUEIL */
.accueil-quote { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 100%; max-width: 480px; text-align: center; pointer-events: none; z-index: 200; }
.accueil-quote blockquote { font-family: 'Space Mono', monospace; font-size: clamp(16px, 2vw, 22px); font-weight: 700; line-height: 1.6; color: #fff; text-transform: uppercase; letter-spacing: 2px; text-shadow: 0 4px 20px rgba(0,0,0,1); margin: 0; padding: 0; display: inline; }
.quote-line { display: block; line-height: 1.3; }
.quote-line.line-1 { display: flex; justify-content: center; align-items: center; gap: 15px; margin-bottom: 5px; }
.word-transition { display: inline-block; width: 120px; height: 1em; position: relative; vertical-align: text-bottom; margin-left: 10px; }
.word-transition .word { position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.word-transition .word-next { opacity: 0; }
.word-transition .word-active { opacity: 1; }
.word-transition .word .letter { display: inline-block; transition: transform 0.4s ease, opacity 0.4s ease; }
.word-transition .word .letter.out { transform: translateY(-100%); opacity: 0; }
.word-transition .word .letter.in { transform: translateY(100%); opacity: 0; }
.word-code { font-family: 'Source Code Pro', monospace; color: #4EC9B0; }
.accueil-quote .author { font-size: 10px; color: rgba(255, 255, 255, 0.5); margin-top: 25px; text-transform: uppercase; letter-spacing: 3px; display: block; width: 100%; text-align: center; }
.accueil-location { position: absolute; bottom: 140px; left: 60px; font-family: 'Space Mono', monospace; font-size: 10px; color: rgba(255, 255, 255, 0.3); letter-spacing: 1px; pointer-events: none; }
.accueil-location span { display: block; margin-top: 3px; }
.accueil-cta { position: absolute; bottom: 60px; right: 60px; font-family: 'Space Mono', monospace; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; background: transparent; border: 1px solid rgba(255, 255, 255, 0.3); color: #fff; padding: 12px 25px; cursor: pointer; transition: all 0.3s; text-decoration: none; pointer-events: auto; z-index: 200; }
.accueil-cta:hover { background: #fff; color: #0a0a0f; }

/* SCROLL INDICATOR */
.scroll-hint {
    position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 15px;
    opacity: 0; transition: opacity 0.5s ease; pointer-events: none; z-index: 4000;
}
.scroll-hint.visible { opacity: 1; }

.scroll-hint span {
    font-family: 'Space Mono', monospace; font-size: 11px; color: #fff;
    text-transform: uppercase; letter-spacing: 4px; font-weight: 700;
    background: rgba(0,0,0,0.4); padding: 6px 12px; border-radius: 4px;
    border: 1px solid rgba(191, 161, 129, 0.3);
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

.scroll-mouse {
    width: 26px; height: 44px;
    border: 2px solid rgba(255,255,255,0.6);
    border-radius: 13px;
    position: relative;
    background: rgba(0,0,0,0.2);
    backdrop-filter: blur(4px);
}
.scroll-wheel {
    position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
    width: 4px; height: 6px; background: var(--accent);
    border-radius: 2px;
    animation: scrollWheel 1.5s infinite cubic-bezier(0.65, 0, 0.35, 1);
}

@keyframes scrollWheel {
    0% { transform: translateX(-50%) translateY(0); opacity: 1; }
    100% { transform: translateX(-50%) translateY(16px); opacity: 0; }
}

/* OVERLAY PROJET */
#project-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    z-index: 6000;
    display: flex; justify-content: center; align-items: center;
    opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
}
#project-overlay.visible { opacity: 1; pointer-events: auto; }

.overlay-content {
    width: 80%; max-width: 900px; max-height: 85vh;
    background: rgba(15, 15, 20, 0.95);
    border: 1px solid var(--accent);
    padding: 50px; border-radius: 4px;
    overflow-y: auto; position: relative;
    transform: translateY(30px); transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    scrollbar-width: thin; scrollbar-color: var(--accent) rgba(0,0,0,0.3);
}
#project-overlay.visible .overlay-content { transform: translateY(0); }

.overlay-close {
    position: absolute; top: 30px; right: 30px;
    font-family: 'Space Mono'; font-size: 12px; color: rgba(255,255,255,0.5);
    cursor: pointer; transition: color 0.3s; text-transform: uppercase;
    border: 1px solid rgba(255,255,255,0.2); padding: 8px 15px;
    background: transparent;
}
.overlay-close:hover { color: var(--accent); border-color: var(--accent); }

.overlay-header h2 {
    font-family: 'Playfair Display', serif; font-size: 3rem; color: var(--accent);
    margin-bottom: 20px; line-height: 1.1;
}
.overlay-tags { display: flex; gap: 10px; margin-bottom: 40px; }
.overlay-tag {
    font-family: 'Space Mono'; font-size: 9px; color: #000;
    background: var(--accent); padding: 5px 10px; text-transform: uppercase; font-weight: 700;
}
.overlay-body { font-family: 'Inter', sans-serif; font-size: 1.05rem; line-height: 1.8; color: var(--text-light); }
.overlay-body h3 {
    font-family: 'Space Mono'; color: var(--accent); font-size: 1.1rem;
    margin: 40px 0 15px 0; text-transform: uppercase; letter-spacing: 1px;
    border-bottom: 1px solid rgba(191,161,129,0.2); padding-bottom: 10px; display: inline-block;
}
.overlay-body p { margin-bottom: 20px; text-align: justify; }

.overlay-btn {
    display: inline-block; margin-top: 30px; margin-right: 15px; padding: 15px 35px;
    background: transparent; border: 1px solid var(--accent);
    color: var(--accent); font-family: 'Space Mono'; font-size: 11px;
    text-transform: uppercase; letter-spacing: 2px; text-decoration: none;
    transition: all 0.3s; cursor: pointer;
}
.overlay-btn:hover { background: var(--accent); color: #000; }
#toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(100px); background: rgba(191, 161, 129, 0.9); color: #000; padding: 12px 24px; border-radius: 4px; font-family: 'Space Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; z-index: 10000; opacity: 0; transition: all 0.5s ease; pointer-events: none; box-shadow: 0 5px 20px rgba(0,0,0,0.5); }
#toast.visible { transform: translateX(-50%) translateY(0); opacity: 1; }


/* =========================================
   INTÉGRATION LIVRE & TABLEAU (SECTION 02)
   ========================================= */
#section-about .section-content {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100vh;
    padding: 0 !important;
}

#container-about-livre {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    z-index: 1;
}

#container-about-livre iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 900px) {
    #header { min-width: 95%; padding: 15px 20px; gap: 20px; display: flex; }
    .nav-group { gap: 15px; width: auto; }
    .overlay-content { width: 95%; padding: 30px; }
    .overlay-header h2 { font-size: 2rem; }
}

@media (max-width: 768px) {
    #header { gap: 10px; padding: 10px 15px; width: 95%; top: 15px; }
    .nav-item { font-size: 9px; }
    #header-center-btn { width: 40px; height: 40px; }
    .accueil-quote { top: 47%; }
    .scroll-mouse { display: none; }

    .competences-bento {
        grid-template-columns: repeat(10, minmax(90px, 1fr));
        left: 15px; right: 15px; bottom: 40px;
    }

    #splash-screen { padding: 30px 20px; }
    .splash-header-content { flex-direction: column; align-items: flex-start; gap: 20px; }
    .splash-brand { font-size: 48px; }
    .splash-nav-list { font-size: 9px; width: 100%; justify-content: space-between; gap: 0; }
    .splash-quote-main { font-size: 24px; margin-bottom: 20px; }
    .splash-quote-sub { font-size: 16px; margin-bottom: 40px; }
    .splash-btn { padding: 15px 40px; width: 100%; border-color: rgba(255,255,255,0.3); }
}
