/* Importation des polices modernes pour un look plus frais */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600&family=Poppins:wght@500;600;700&display=swap');

/* Définition des variables de couleur */
:root {
    --1: #F8EDEB;
    --2: #F9DCC4;
    --3: #FCD5CE;
    --4: #FEC89A;
    --5: #FFB5A7;
    --6: #EAAD8B;
    --7: #9B592A;
    --8: #442818;
}

/* Réinitialisation et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Transition plus douce et cohérente */
}
html {
    scroll-behavior: smooth;
}
body {
    background-color: var(--1);
    font-family: 'Open Sans', sans-serif;
    color: var(--8);
}
h1, h2, h3 {
    font-family: 'Poppins', sans-serif;
    color: var(--7);
}

/* -------------------- BARRE DE NAVIGATION -------------------- */
.navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--1);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
}
.navbar ul {
    display: flex;
    list-style: none;
    margin: 0;
}
.navbar ul li a {
    text-decoration: none;
    color: var(--8);
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    padding: 10px 25px;
    border-radius: 50px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}
.navbar ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: var(--7);
    transition: width 0.3s ease;
    z-index: -1;
}
.navbar ul li a:hover::before {
    width: 100%;
}
.navbar ul li a:hover {
    color: var(--1);
}

/* -------------------- PARTIE HOME -------------------- */
#accueil {
    background: linear-gradient(to bottom, var(--1), var(--2));
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
}
.main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 40px;
    max-width: 1200px;
}
.profil {
    flex: 1 1 400px;
    text-align: center;
}
.profil img {
    width: 350px;
    height: 450px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 5px solid var(--5);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
.profil img:hover {
    transform: scale(1.05) rotate(2deg);
    border-radius: 50%;
}
.moi {
    flex: 1 1 400px;
    text-align: center;
}
.moi h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--8);
}
.nom {
    font-size: 3.5rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--7);
    line-height: 1.2;
}
.prof {
    font-size: 1.5rem;
    font-weight: 400;
    margin-top: 10px;
    color: var(--6);
}
.reseaux {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 20px;
}
.reseaux img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
.reseaux img:hover {
    transform: translateY(-5px) scale(1.1);
}
.btn {
    padding: 12px 40px;
    background-color: var(--7);
    color: var(--1);
    border: none;
    border-radius: 50px;
    font-weight: bold;
    margin-top: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}
.btn:hover {
    background-color: var(--6);
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

/* -------------------- SECTIONS COMPÉTENCES ET PROJETS -------------------- */
.heading {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 60px 0 40px;
    color: var(--7);
    position: relative;
    padding-bottom: 15px;
}
.heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--6);
    border-radius: 5px;
}
.row_comp, .row_projet, .row_service {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin: 0 auto;
    max-width: 1200px;
    padding: 0 20px;
}
.box_comp, .box_projet, .box_service {
    width: 300px;
    padding: 30px;
    background-color: var(--1);
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
}
.box_comp::before, .box_projet::before, .box_service::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(135deg, var(--3), var(--4));
    transition: left 0.4s ease-out;
    z-index: -1;
}
.box_comp:hover::before, .box_projet:hover::before, .box_service:hover::before {
    left: 0;
}
.box_comp:hover, .box_projet:hover, .box_service:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    color: white;
}
.box_comp h1, .box_projet h1, .box_service p {
    font-size: 1.2rem;
    margin: 15px 0;
    color: var(--8);
}
.box_comp:hover h1, .box_projet:hover h1, .box_service:hover p {
    color: white;
}
.box_comp p, .box_projet p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--7);
}
.box_comp:hover p, .box_projet:hover p {
    color: var(--1);
}
.box_comp img, .box_projet img, .box_service img {
    filter: grayscale(100%);
    transition: filter 0.4s ease-out;
}
.box_comp:hover img, .box_projet:hover img, .box_service:hover img {
    filter: grayscale(0%);
}

/* -------------------- SECTION APTITUDE -------------------- */
.content-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px;
    padding: 40px 20px;
    max-width: 1200px;
    margin: auto;
}
.box_apt {
    flex: 1 1 450px;
    background: var(--1);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.5s ease;
}
.box_apt:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    transform: scale(1.02);
}
.etude {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--2);
}
.etude:last-child {
    border-bottom: none;
}
.annee {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--7);
    flex-shrink: 0;
}
.titre-diplome {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--8);
    margin-bottom: 5px;
}
.etablissement {
    font-size: 0.9rem;
    color: var(--6);
    font-style: italic;
}
.langage p {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}
.barre {
    width: 100%;
    height: 12px;
    background-color: var(--3);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}
.barre_remplissage {
    height: 100%;
    background-color: var(--7);
    transition: width 1s ease-in-out;
}

/* -------------------- SECTION CONTACT -------------------- */
#contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    background: linear-gradient(to top, var(--1), var(--2));
}
.form {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 600px;
}
.input, #msg {
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    border: 2px solid var(--5);
    outline: none;
    background-color: var(--1);
    border-radius: 8px;
    transition: all 0.3s ease;
}
.input:focus, #msg:focus {
    border-color: var(--7);
    box-shadow: 0 0 10px rgba(155, 89, 42, 0.3);
}
#send {
    padding: 12px 40px;
    background-color: var(--7);
    color: var(--1);
    border: none;
    border-radius: 50px;
    font-weight: bold;
    margin-top: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}
#send:hover {
    background-color: var(--6);
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

/* -------------------- FOOTER -------------------- */
#footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    background: linear-gradient(to top, var(--1), var(--2));
}
footer {
    background-color: var(--1);
    color: var(--8);
    font-family: 'Open Sans', sans-serif;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);

}
.footer-content {
    display: flex;
    justify-content: space-around;
    margin: 0 auto;
    gap: 30px;
    padding:20px;
    margin: 20px;
}
.footer-section {
    flex: 1;
    min-width: 250px;
}
.footer-section h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--7);
}
.footer-section p, .footer-section a, .footer-section li {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--8);
}
.footer-section a:hover {
    text-decoration: underline;
    color: var(--6);
}
.footer-section ul {
    list-style: none;
    padding: 0;
}
.socials a img {
    width: 40px;
    height: 40px;
    margin-right: 15px;
    transition: transform 0.3s;
}
.socials a img:hover {
    transform: scale(1.1);
}
.footer-bottom {
    text-align: center;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid var(--5);
    font-size: 0.9rem;
    color: var(--7);
}

/* -------------------- MEDIA QUERIES (pour les téléphones) -------------------- */
@media (max-width: 768px) {
    .main {
        flex-direction: column;
        text-align: center;
    }
    .profil img {
        width: 250px;
        height: 350px;
        /* Ajout de transition sur les bords pour un effet plus fluide */
        transition: border-radius 0.5s ease;
    }
    /* La photo redevient ronde au survol sur mobile */
    .profil img:hover {
        border-radius: 50%;
    }
    .moi h1 {
        font-size: 1.5rem;
    }
    .nom {
        font-size: 2.5rem;
    }
    .prof {
        font-size: 1.2rem;
    }
    .reseaux {
        justify-content: center;
        gap: 15px; /* Réduit l'espacement entre les icônes */
    }
    .heading {
        font-size: 2rem;
        margin: 40px 0 20px;
    }
    .row_comp, .row_projet, .row_service, .content-container {
        flex-direction: column;
        gap: 20px;
    }
    .box_comp, .box_projet, .box_service, .box_apt {
        width: 100%;
        max-width: none;
        padding: 20px; /* Réduit le padding pour une meilleure utilisation de l'espace */
    }
    .input, #msg {
        width: 100%;
        padding: 12px; /* Réduit la taille des champs de formulaire */
    }
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    .footer-section {
        margin: 10px 0;
    }
    .navbar ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    .navbar ul li a {
        padding: 8px 15px; /* Réduit la taille des liens de navigation */
        font-size: 0.9rem;
        margin: 5px;
    }
}