:root {
    --bg-dark: #0a0a0a;
    --bg-darker: #050505;
    --text-white: #ffffff;
    --accent-cyan: #00f2ff;
    --text-muted: #a0a0a0;
    --subtitle-height: 1.2em;
}

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

/* --- BASE & LAYOUT (Fusionné) --- */
body {
    height: 100vh;          /* Fixe la hauteur */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at top left, var(--bg-dark), var(--bg-darker));
    color: var(--text-white);
    font-family: 'Outfit', sans-serif;
    overflow: hidden;       /* Gardé tel quel */
}

main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10%;
    height: 100%;
}

/* --- NAVIGATION DESKTOP --- */
nav {
    position: absolute;
    top: 40px;
    right: 50px;
    display: flex;
    gap: 40px;
    z-index: 100;
}

nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.3s ease;
    position: relative;
}

nav a:hover, nav a.active {
    color: var(--accent-cyan);
    text-shadow: 0 0 12px rgba(0, 242, 255, 0.6);
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -6px;
    left: 0;
    background-color: var(--accent-cyan);
    transition: width 0.3s ease;
}

nav a:hover::after, nav a.active::after {
    width: 100%;
}

/* --- HERO SECTION --- */
.text-content {
    flex: 1;
    z-index: 2;
}

.image-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
}

h1 {
    font-size: 7rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 15px;
    letter-spacing: -2px;
}

.hero-subtitle {
    display: flex;
    align-items: flex-end;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-white);
    height: var(--subtitle-height);
    overflow: hidden;
}

.static-text {
    margin-right: 15px;
    white-space: nowrap;
}

.scrolling-words-container {
    height: var(--subtitle-height);
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(to bottom, transparent 0%, black 35%, black 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 35%, black 100%);
}

.scrolling-words-box {
    display: flex;
    flex-direction: column;
}

.scrolling-words-box span {
    display: block;
    height: var(--subtitle-height);
    line-height: var(--subtitle-height);
    color: var(--accent-cyan);
    text-shadow: 0 0 20px rgba(0, 242, 255, 0.5);
    padding-left: 5px;
}

/* --- GOKU ANIMATION --- */
.goku-container {
    position: relative;
    width: 500px;
    height: 500px;
    background: #000;
    border-radius: 50%;
    box-shadow: 0 0 60px rgba(0, 242, 255, 0.2), inset 0 0 40px rgba(0, 242, 255, 0.1);
    overflow: visible;
    transition: transform 0.1s ease-out, box-shadow 0.3s ease;
}

.goku-container:hover {
    box-shadow: 0 0 80px rgba(200, 220, 255, 0.4), inset 0 0 50px rgba(200, 220, 255, 0.2);
}

.goku-image {
    position: absolute;
    width: 100%;
    height: auto;
    bottom: 0;
    left: 0;
    image-rendering: -webkit-optimize-contrast;
    border-radius: 0 0 50% 50%;
    transform: translateY(1px);
    will-change: filter;
    filter: grayscale(100%) contrast(1.1);
    transition: filter 0.3s ease;
}

.goku-container:hover .goku-image {
    animation: ultraInstinctAura 3s ease-in-out infinite alternate;
}

@keyframes ultraInstinctAura {
    0% {
        filter: grayscale(100%) contrast(1.2)
        drop-shadow(0 0 20px rgba(220, 230, 255, 0.8))
        drop-shadow(0 -10px 40px rgba(0, 150, 255, 0.5))
        drop-shadow(0 0 0 rgba(150, 0, 255, 0));
    }
    50% {
        filter: grayscale(100%) contrast(1.25)
        drop-shadow(0 0 25px rgba(255, 255, 255, 0.9))
        drop-shadow(20px -30px 50px rgba(0, 150, 255, 0.3))
        drop-shadow(-20px -20px 40px rgba(180, 50, 255, 0.6));
    }
    100% {
        filter: grayscale(100%) contrast(1.3)
        drop-shadow(0 0 30px rgba(255, 255, 255, 1))
        drop-shadow(-10px -50px 60px rgba(0, 100, 255, 0.2))
        drop-shadow(10px -40px 50px rgba(200, 80, 255, 0.7));
    }
}

/* --- MEDIA QUERIES TABLETTE/LAPTOP --- */
@media (max-width: 1024px) {
    body {
        overflow-y: auto;
        height: auto;
        min-height: 100vh;
        padding-bottom: 50px;
    }

    nav {
        position: relative;
        top: 0;
        left: 0;
        right: auto;
        width: 100%;
        justify-content: center;
        padding: 30px 0;
        margin-bottom: 20px;
    }

    nav a {
        font-size: 0.9rem;
        gap: 20px;
    }

    main {
        flex-direction: column;
        justify-content: flex-start;
        padding: 0 20px;
        gap: 60px;
    }

    .text-content {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    h1 {
        font-size: 4rem;
        margin-bottom: 10px;
    }

    .hero-subtitle {
        font-size: 2rem;
        justify-content: center;
    }

    .scrolling-words-container {
        min-width: 120px;
        text-align: left;
    }

    .goku-container {
        width: 300px;
        height: 300px;
        margin: 0 auto;
        transform: none !important;
    }
}

@media (max-width: 380px) {
    .goku-container {
        width: 250px;
        height: 250px;
    }
    h1 {
        font-size: 3rem;
    }
}

/* =========================================
   7. PAGE LANGAGES
   ========================================= */
.languages-page {
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 120px;
    align-items: center;
    overflow-y: auto;
}

.page-title {
    font-size: 3.5rem;
    margin-bottom: 50px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
}

.highlight {
    color: var(--accent-cyan);
    text-shadow: 0 0 15px rgba(0, 242, 255, 0.4);
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    width: 100%;
    max-width: 1200px;
    padding-bottom: 50px;
}

.skill-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    backdrop-filter: blur(5px);
    --level-color: var(--accent-cyan); 
}

.skill-card:hover {
    transform: translateY(-10px);
    border-color: var(--level-color);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.3), 0 0 20px -5px var(--level-color);
}

.skill-icon img {
    height: 70px;
    width: auto;
    margin-bottom: 20px;
    filter: grayscale(100%);
    transition: 0.4s ease;
}

.skill-card:hover .skill-icon img {
    filter: grayscale(0%);
    transform: scale(1.1);
}

.skill-card h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-weight: 300;
    color: var(--text-white);
}

.skill-level-container {
    display: flex;
    justify-content: center;
    gap: 6px;
    position: relative;
    cursor: help;
    padding-top: 10px;
}

.bar {
    width: 100%;
    height: 6px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.bar.empty {
    background-color: rgba(255, 255, 255, 0.1);
}

.bar.filled {
    background-color: var(--level-color);
    box-shadow: 0 0 8px var(--level-color);
}

.skill-level-container::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: var(--level-color);
    color: #000;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 5px 10px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    box-shadow: 0 0 10px var(--level-color);
}

.skill-level-container::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    border-width: 6px;
    border-style: solid;
    border-color: var(--level-color) transparent transparent transparent;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.skill-level-container:hover::after,
.skill-level-container:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

/* =========================================
   8. PAGE PROJETS
   ========================================= */
.projects-page {
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 120px;
    align-items: center;
    overflow-y: auto;
}

.project-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-cyan);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

.project-image {
    width: 100%;
    height: 200px;
    position: relative;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-stack {
    display: flex;
    gap: 15px;
}

.project-stack img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.5));
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.project-card:hover .project-stack img {
    transform: translateY(0);
}

.project-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-content h3 {
    font-size: 1.5rem;
    color: var(--text-white);
    margin-bottom: 10px;
}

.project-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 20px;
    flex: 1;
}

.project-link {
    display: inline-block;
    text-decoration: none;
    color: var(--accent-cyan);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    align-self: flex-start;
    position: relative;
}

.project-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--accent-cyan);
    transition: width 0.3s ease;
}

.project-link:hover::after {
    width: 100%;
}

.project-meta {
    font-size: 0.85rem;
    color: var(--accent-cyan);
    font-weight: 600;
    margin-bottom: 15px;
    opacity: 0.9;
}

/* =========================================
   9. PAGE CONTACT
   ========================================= */

.contact-page {
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 120px;
    align-items: center;
    overflow-y: auto;
    padding-bottom: 50px;
}

.contact-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 50px;
    width: 100%;
    max-width: 1200px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    flex: 1;
    min-width: 300px;
}

.contact-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: 0.3s;
}

.contact-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-cyan);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 5px 20px rgba(0, 242, 255, 0.1);
}

.contact-icon img {
    width: 50px;
    height: 50px;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.2));
}

.contact-info h3 {
    color: var(--text-white);
    margin-bottom: 5px;
}

.contact-info span {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: block;
    margin-bottom: 20px;
}

.contact-btn {
    padding: 8px 20px;
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.85rem;
    transition: 0.3s;
    text-transform: uppercase;
    font-weight: 700;
}

.contact-card:hover .contact-btn {
    background: var(--accent-cyan);
    color: #000;
    box-shadow: 0 0 10px var(--accent-cyan);
}

.form-container {
    flex: 1;
    min-width: 300px;
    background: rgba(255, 255, 255, 0.02);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.form-container h2 {
    margin-bottom: 30px;
    color: var(--text-white);
    font-weight: 300;
    letter-spacing: 1px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-white);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    transition: 0.3s;
    outline: none;
}

.input-group input:focus,
.input-group textarea:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.1);
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: transparent;
    border: 2px solid var(--accent-cyan);
    color: var(--text-white);
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    border-radius: 8px;
    transition: 0.3s;
    font-family: 'Outfit', sans-serif;
}

.submit-btn:hover {
    background: var(--accent-cyan);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.4);
}

/* =========================================
   SECTION ABOUT (HOME)
   ========================================= */
.about-mini {
    margin-top: 50px;
    max-width: 500px;
    animation: fadeIn 1s ease-out 0.5s backwards;
}

.about-mini p {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 30px;
    border-left: 3px solid var(--accent-cyan);
    padding-left: 20px;
}

.about-actions {
    display: flex;
    gap: 20px;
}

.btn-cv {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background: rgba(0, 242, 255, 0.1);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.1);
}

.btn-cv:hover {
    background: var(--accent-cyan);
    color: #000;
    box-shadow: 0 0 25px rgba(0, 242, 255, 0.6);
    transform: translateY(-3px);
}

.btn-cv svg {
    transition: transform 0.3s ease;
}

.btn-cv:hover svg {
    transform: translateY(3px);
}

.btn-work {
    padding: 12px 25px;
    color: var(--text-white);
    text-decoration: none;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    transition: all 0.3s ease;
}

.btn-work:hover {
    border-color: var(--text-white);
    background: rgba(255, 255, 255, 0.1);
}

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

@media (max-width: 1024px) {
    .about-mini {
        text-align: left;
        margin: 40px auto 0;
        padding: 0 10px;
    }
    
    .about-actions {
        justify-content: center;
    }
}

/* =========================================
   FOOTER
   ========================================= */
footer {
    width: 100%;
    padding: 30px 0;
    text-align: center;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
    color: var(--text-muted);
    font-size: 0.9rem;
    position: relative;
    z-index: 10;
}

.footer-links {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 25px;
}

footer a {
    color: var(--text-white);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

footer a:hover {
    color: var(--accent-cyan);
    text-shadow: 0 0 8px rgba(0, 242, 255, 0.6);
}

footer a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--accent-cyan);
    transition: width 0.3s ease;
}

footer a:hover::after {
    width: 100%;
}

/* =========================================
   MOBILE MENU (HAMBURGER) - UNIFIED
   ========================================= */

/* Par défaut (PC), on cache le bouton hamburger */
.menu-toggle {
    display: none;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 30px;
}

.logo {
    color: var(--text-white);
    font-weight: 800;
    font-size: 1.5rem;
    margin-right: auto;
    letter-spacing: 2px;
}

/* --- VERSION MOBILE CORRIGÉE --- */
@media (max-width: 768px) {
    nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px;
        position: relative;
        width: 100%;
    }

    .logo {
        margin-right: auto; 
    }

    .contact-container {
        flex-direction: column;
    }

    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 21px;
        cursor: pointer;
        z-index: 1001;
        margin-left: auto; 
    }

    .menu-toggle .bar {
        height: 3px;
        width: 100%;
        background-color: var(--text-white);
        border-radius: 10px;
        transition: 0.3s;
    }

    /* Le menu liste (caché par défaut) */
    .nav-list {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.4s ease-in-out;
        z-index: 1000;
        box-shadow: -5px 0 15px rgba(0, 242, 255, 0.1);
        display: flex;
    }

    .nav-list.active {
        right: 0;
    }
    
    .nav-list li {
        margin: 25px 0;
    }

    .nav-list a {
        font-size: 1.5rem;
    }

    /* Animation du Burger en Croix (X) */
    .menu-toggle.is-active .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
        background-color: var(--accent-cyan);
    }

    .menu-toggle.is-active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.is-active .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
        background-color: var(--accent-cyan);
    }
}