/* --- Variables & Reset --- */
:root {
    --dark-bg: #020202;
    --light-bg: #f8f9fa;
    --text-dark: #212529;
    --text-light: #ffffff;
    --text-grey: #6c757d;
    --border-color: #dee2e6;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth; /* Active le scroll fluide natif */
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a { text-decoration: none; color: inherit; }

/* --- P5.js Logo Containers --- */
.header-hero-wrapper, .projects {
    position: relative;
}

/* Règle unique et propre pour le logo du header */
#p5-logo-hero {
    position: absolute;
    z-index: 1; /* Au-dessus du fond, en dessous du contenu */
    pointer-events: none;
    opacity: 0.7;
    
    /* On enlève 'top' et 'left', JS s'en occupe */
    transform: translate(-50%, -50%); /* Crucial pour le centrage JS */
    transition: top 0.1s, left 0.1s; /* Transition douce */
}


/* Logo de la section projets (inchangé) */
#p5-logo-projects {
    position: absolute;
    z-index: -1;
    pointer-events: none;
    opacity: 0.3;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ... */

/* Assurez-vous que le .hero-content a bien ces règles pour passer au-dessus du logo */
.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    width: 100%;
    
    /* Ces deux lignes sont cruciales pour la superposition */
    position: relative;
    z-index: 2; 
}


/* --- Header & Hero Section --- */
.header-hero-wrapper {
    background-color: var(--dark-bg);
    color: var(--text-light);
    min-height: 100vh; /* min-height est plus flexible que height */
    display: flex;
    flex-direction: column;
}

header {
    padding: 25px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(2, 2, 2, 0.8); /* Fond avec transparence pour effet de profondeur */
    backdrop-filter: blur(5px); /* Effet de flou (support variable) */
    z-index: 1000;
}



.header-spacer { height: 90px; }

header .container { display: flex; justify-content: space-between; align-items: center; }

.logo p { font-weight: 700; font-size: 24px; }

nav ul { list-style: none; display: flex; gap: 30px; 

opacity: 0.8;
}

nav a {
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.5px;
    padding-bottom: 5px;
    position: relative;

}



nav a.active { border-bottom: 2px solid var(--text-light); }

/* ... Styles nav a:after ... (inchangés) */
nav a.active {
    border-bottom: 2px solid var(--text-light);
}

nav a:not(.active)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--text-light);
    transition: width 0.3s ease;
}

nav a:not(.active):hover::after {
    width: 100%;
}

.hero {
    flex-grow: 1; /* Permet à la section hero de prendre l'espace restant */
    display: flex;
    align-items: center; /* Centrage vertical du contenu du hero */
    margin-top: 0; /* Plus besoin avec le flex-grow */
}

#apropos {
    padding-top: 5vh;
    
    text-align: center;

    padding-left: 25vw;
    padding-right: 25vw;
    border-top: solid 3px black;

    p {
        padding: 10px;
    }
}

.ul {
    display: flex;
    justify-content: space-evenly;
}


.hero-text { flex-basis: 40%; }
.hero-text h1 { font-size: 64px; line-height: 1.2; font-weight: 700; margin-bottom: 30px; }

.btn {
    display: inline-block;
    border: 1px solid var(--text-light);
    color: var(--text-light);
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: background-color 0.3s, color 0.3s;
}

.btn:hover { background-color: var(--text-light); color: var(--dark-bg); }


#TASKCONTAINER {
    position: absolute;
    font-size: 80%;
    top: 27%;
    left: 25%;
    flex-basis: 60%;
    color: #020202;
    ul li {
        list-style: none;
    }
}

#ADDTASKBUTTON, .btn-supprimer {
    background-color: #020202;
    color: white;
    padding: 5px;
    border-radius: 10px;
}



.li-list {
    color: #020202;
    display: flex;
    justify-content: space-around;
    cursor: pointer;
}

.divprog > nav > ul > li > img {
    width: 15vw;
    height: 20vh;
    background-image: none;
    
}

.divprog > nav > ul {

    display: flex;
    justify-content: center;
}


.hero-image { flex-basis: 60%; text-align: center;
position: relative; }
.hero-image img, #TASKCONTAINER { max-width: 100%; height: auto; }

/* --- Projects Section --- */
.projects { padding: 80px 0; }
.projects h2 { font-size: 36px; margin-bottom: 40px; text-align: center; }

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.project-card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%; /* S'assure que toutes les cartes ont la même hauteur */
}
/* ... le reste des styles de project-card ... */
.project-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); }
.project-card img { width: 100%; height: 250px; object-fit: cover; /* Assure que l'image remplit l'espace sans se déformer */ }
.card-content { padding: 20px; flex-grow: 1; }
.card-content h3 { font-size: 18px; font-weight: 600; margin-bottom: 5px; }
.card-content p { font-size: 14px; color: var(--text-grey); }

/* --- Footer --- */
/* ... Styles du footer ... (inchangés) */
footer {
    padding: 40px 0;
    background-color: #ffffff;
    border-top: 1px solid var(--border-color);

}
footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Pour le responsive */
    gap: 20px;
}

.ulprog {
    border-bottom: solid 3px black;
}

.prmecontact > p {
position: relative;
left: 190px;
top: 5px;
border: solid 3px black;
background: #020202;
color: white;
border-radius: 25px;


}
.prmecontact {
    display: flex;
    justify-content: center;

}



.prmecontact > p > img {
    position: absolute;
    width: 9vw;
left: 150px;
top: -12px;
animation-duration: 0.5s;
animation-name: clignoter;
animation-iteration-count: infinite;
transition: none;
}

@keyframes clignoter {
  0%   { opacity:1; }
  40%   {opacity:0; }
  100% { opacity:1; }
}
/* ======================================================= */
/*          MEDIA QUERY POUR LE RESPONSIVE MOBILE          */
/* ======================================================= */

/* Pour les écrans de 768px de large ou moins (téléphones) */
@media (max-width: 768px) {
    .modal-content {
        /* On passe la modale en plein écran pour une meilleure expérience mobile */
        width: 100vw;
        height: 100vh;
        border-radius: 0; /* Plus de bords arrondis en plein écran */
    }

    #TASKCONTAINER {
        right: 25%;
    }

}


/* ======================================================= */
/*                      MEDIA QUERIES                      */
/* ======================================================= */

/* --- Pour les tablettes (<= 1024px) --- */
@media (max-width: 1024px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    .hero-text {
        flex-basis: auto;
        margin-bottom: 40px;
    }
    .hero-image {
        flex-basis: auto;
    }
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    #p5-logo-hero {
        left: -100px; /* On le décale pour qu'il ne soit pas trop au milieu */
        opacity: 0.2;
    }
.prmecontact > p {

  top: 70px;
  left: 100px;
}
nav ul {
    gap: 20px; /* Réduit l'écart entre les liens */
}

}

/* --- Pour les mobiles (<= 768px) --- */
@media (max-width: 768px) {
    .hero-text h1 {
        font-size: 48px;
    }
    nav a {
        font-size: 12px;
    }
    .project-grid {
        grid-template-columns: 1fr; /* Une seule colonne */
    }
    .projects {
        padding: 60px 0;
    }
    .projects h2 {
        font-size: 28px;
    }
    footer .container {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    #p5-logo-hero, #p5-logo-projects {
        display: none; /* On cache les logos sur mobile pour la performance et la lisibilité */
    }

    .ulprog {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        padding: 10px;
    }
}


@media (max-width :660px) {
    #TASKINPUTT, #TASKINPUT, #ADDTASKBUTTON, .li-list, .btn-supprimer {
       font-size: 90%;
    }
    
}
@media (max-width :560px) {
    #TASKINPUTT, #TASKINPUT, #ADDTASKBUTTON, .li-list, .btn-supprimer {
       font-size: 70%;
    }
    
}
@media (max-width :497px) {
    #TASKINPUTT, #TASKINPUT, #ADDTASKBUTTON, .li-list, .btn-supprimer, .h2 {
       font-size: 50%;
    }
    
    #TASKINPUT {
        width: 80%;
    }

    .prmecontact > p {
        left: 50px;
    }

    .prmecontact > p > img {
        top: 10px;
    }
}