@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #306263; 
    --background-color: #0a0a0a; 
    --secondary-background: #1a1a1a; 
    --text-color: #cccccc; 
    --heading-color: #ffffff; 
    --card-color: #1a1a1a; 
    --border-color: #2c2c2c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #306263 var(--background-color);
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    background-image: radial-gradient(ellipse at center, transparent 0%, var(--background-color) 85%),
                      linear-gradient(160deg, #1c1c1c 0%, #0a0a0a 100%);
    background-attachment: fixed; 
    color: var(--text-color);
    line-height: 1.6;
    cursor: url('assets/cursor/pointer2.png'), auto;
}

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--background-color);
}

::-webkit-scrollbar-thumb {
    background-color: #306263;
    border-radius: 20px;
    border: 3px solid var(--background-color);
}

a,
button,
.cta, 
.projet-header,
.close-button {
    cursor: url('assets/cursor/clic1.png'), pointer;
}

a:active, 
button:active, 
.cta:active, 
.projet-header:active,
.close-button:active {
    cursor: grabbing;
}

/* Empêche le scroll quand le menu est ouvert */
body.no-scroll {
    overflow: hidden;
}

header {
    background: rgba(10, 10, 10, 0.85); 
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: background 0.3s ease;
}

nav {
    display: flex;
    justify-content: center; 
    align-items: center;
    width: 100%;
    padding: 0 2.5rem;
    position: relative; 
}

nav .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: 0 0 8px rgba(48, 98, 99, 0.7); 
    position: absolute; 
    left: 2.5rem;      
}

nav a.logo {
    text-decoration: none;
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin-left: 2.5rem;
}

nav ul li a {
    text-decoration: none;
    color: var(--heading-color);
    font-weight: 600;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

nav ul li a.active,
nav ul li a:hover {
    color: var(--primary-color);
    text-shadow: 0 0 8px rgba(48, 98, 99, 0.7);
}

nav ul li a.active::after,
nav ul li a:hover::after {
    width: 100%;
}

section {
    padding: 80px 10% 5rem; 
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

section:nth-child(even) {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

h2 {
    font-size: 2.8rem;
    color: var(--heading-color);
    margin-bottom: 2rem;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 4px;
    background: var(--primary-color);
    box-shadow: 0 0 10px rgba(48, 98, 99, 0.8); 
    border-radius: 2px;
}


#accueil {
    position: relative; 
    overflow: hidden; 
}

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative; 
    z-index: 1;
}

.hero-text h1 {
    color: var(--heading-color);
    font-size: 3.2rem;
    margin-bottom: 0.5rem;
}

.hero-text p {
    font-size: 1.5rem;
    color: var(--text-color);
}

.hero-text .subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    font-weight: 300;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    transition: opacity 0.3s;
}

.deco-shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color), #007782);
    filter: blur(120px);
    opacity: 0.15;
    z-index: 0; 
}

.deco-shape-1 {
    width: 450px;
    height: 450px;
    top: 10vh;
    left: 15vw;
    animation: float 15s infinite ease-in-out alternate;
}

.deco-shape-2 {
    width: 350px;
    height: 350px;
    bottom: 15vh;
    right: 20vw;
    animation: float 20s infinite ease-in-out alternate-reverse;
}

#cv .cta {
    margin-top: 2rem;
}

.cta {
    display: inline-block;
    padding: 0.9rem 2.5rem;
    background: transparent;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid var(--primary-color);
    font-weight: 600;
    box-shadow: 0 0 5px rgba(48, 98, 99, 0.5); 
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    cursor: pointer;
    font-size: 1rem;
}

.cta:hover {
    transform: translateY(-5px);
    background-color: rgba(48, 98, 99, 0.1);
    box-shadow: 0 0 15px var(--primary-color), 0 0 25px var(--primary-color);
}

.cta i {
    margin-right: 8px;
}

#projets .projets-container {
    width: 100%;
    max-width: 900px;
}

.projet {
    background: var(--background-color);
    margin-bottom: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-align: left;
    overflow: hidden;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.projet:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(48, 98, 99, 0.3);
}

.projet-header {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.projet-header h3 {
    font-size: 1.2rem;
}

.projet-header i {
    transition: transform 0.3s ease;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.projet.active .projet-header i {
    transform: rotate(180deg);
}

.projet-details {
    max-height: 0;
    overflow: hidden;
    padding: 0 2rem;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), padding 0.5s ease;
}

.projet-details p {
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.projet-details img {
    max-width: 100%;
    border-radius: 5px;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

#contact p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.contact-separator {
    width: 80px;
    height: 3px;
    background: var(--primary-color);
    border: none;
    border-radius: 2px;
    margin: 3rem auto; 
}

#contact form {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 600px;
}

#contact input, #contact textarea {
    background-color: var(--background-color);
    color: var(--text-color);
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    resize: none;
}

#contact input:focus, #contact textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(48, 98, 99, 0.3);
}

footer {
    text-align: center;
    padding: 2rem;
    background: var(--background-color);
    color: var(--text-color);
    border-top: 1px solid var(--border-color);
}

.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(10, 10, 10, 0.9); 
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-in-out;
}

.modal-content {
    position: relative;
    margin: 5vh auto;
    padding: 0;
    width: 80%;
    max-width: 900px;
    height: 90vh; 
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-content embed {
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

.close-button {
    color: var(--text-color);
    position: absolute;
    top: 10px;
    right: 25px;
    font-size: 35px;
    font-weight: bold;
    z-index: 2001;
    transition: color 0.3s ease;
}

.close-button:hover,
.close-button:focus {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

@keyframes slideIn {
    from {transform: translateY(-50px); opacity: 0;}
    to {transform: translateY(0); opacity: 1;}
}

@keyframes float {
    from {
        transform: translateY(0) translateX(0) rotate(0deg);
    }
    to {
        transform: translateY(40px) translateX(-30px) rotate(90deg);
    }
}

@keyframes scroll-wheel {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(10px);
        opacity: 0;
    }
}

.mouse {
    width: 25px;
    height: 45px;
    border: 2px solid var(--text-color);
    border-radius: 15px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--text-color);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    margin-left: -2px;
    animation: scroll-wheel 2s infinite;
}

#passions-hero {
    min-height: 60vh;
    justify-content: center;
}

.passion-section {
    padding: 6rem 10%;
    width: 100%;
    display: flex;
    justify-content: center;
}

.passion-section:nth-child(odd) {
    background: var(--secondary-background);
}

.passion-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
    max-width: 1200px;
}

.passion-content {
    text-align: left;
}

.passion-content h2 {
    text-align: left;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.passion-content h2::after {
    left: 0;
    transform: translateX(0);
}

.passion-content p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: var(--text-color);
}

.passion-media img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(0,0,0,0.2);
}

.stat-item .stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-item .stat-label {
    font-size: 0.9rem;
    color: var(--text-color);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.passion-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 1rem;
}

.passion-gallery img:first-child {
    grid-column: 1 / -1; 
}

.passion-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.passion-gallery img:hover {
    transform: scale(1.03);
}

#passions-teaser .cta {
    margin-top: 2rem;
}

/* --- Hamburger Menu --- */
.hamburger-menu {
    display: none; /* Caché par défaut sur grand écran */
    width: 35px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 1002; /* Au-dessus du menu */
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--heading-color);
    border-radius: 3px;
    position: absolute;
    left: 0;
    transition: all 0.3s ease-in-out;
}

.hamburger-menu span:nth-child(1) {
    top: 5px;
}

.hamburger-menu span:nth-child(2) {
    top: 13px;
}

.hamburger-menu span:nth-child(3) {
    top: 21px;
}

/* Animation du hamburger en croix */
.hamburger-menu.active span:nth-child(1) {
    top: 13px;
    transform: rotate(135deg);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
    left: -60px;
}

.hamburger-menu.active span:nth-child(3) {
    top: 13px;
    transform: rotate(-135deg);
}

/* --- Media Queries pour la Responsivité --- */
@media (max-width: 820px) {
    /* --- Navigation --- */
    nav {
        justify-content: space-between; /* Aligne le logo à gauche et le hamburger à droite */
    }

    nav .logo {
        position: static; /* Retire le positionnement absolu */
        font-size: 1.3rem;
    }

    .hamburger-menu {
        display: block; /* Affiche le hamburger */
    }

    nav ul {
        position: fixed;
        top: 0;
        right: -100%; /* Commence en dehors de l'écran */
        width: 100%;
        height: 100vh;
        background-color: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: right 0.5s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 1001;
        margin-left: 0;
    }

    nav ul.nav-active {
        right: 0; /* Fait entrer le menu */
    }

    nav ul li {
        margin: 0;
    }

    nav ul li a {
        font-size: 1.5rem;
    }

    /* Cache les boutons supplémentaires sur mobile pour ne pas surcharger */
    /* Le bouton du lab est maintenant visible, mais celui du portfolio reste caché sur mobile */
    #portfolio-buttons-container {
        display: none;
    }

    /* --- Ajustements généraux --- */
    section {
        padding: 80px 5% 4rem; /* Réduit le padding latéral */
    }

    .hero-text h1 {
        font-size: 2.5rem; /* Réduit la taille du titre principal */
    }

    h2 {
        font-size: 2.2rem; /* Réduit la taille des titres de section */
    }

    .hero-text p {
        font-size: 1.2rem;
    }

    /* --- Section À Propos --- */
    .about-container {
        flex-direction: column; /* Passe les colonnes en vertical */
        gap: 2.5rem;
    }

    /* --- Page Passions --- */
    #passions-content {
        padding: 100px 1rem 4rem;
    }

    .projet-header {
        padding: 1.2rem 1.5rem;
    }

    /* --- Page Lab --- */
    #lab-content {
        padding: 1rem;
    }

    .clock-display {
        flex-direction: column;
        gap: 1rem;
    }

    #time {
        font-size: 3.5rem;
    }

    .skin-controls {
        flex-direction: column;
        gap: 0.8rem;
    }
}