/* ---------- RESET & BASICS ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


    #preloader {
        position: fixed;
        inset: 0;
        z-index: 9999;
        transition: opacity 0.8s ease;
    }

    #preloader.hide {
        opacity: 0;
        pointer-events: none;
    }

    #preloader video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        filter: blur(5px);
    }

    .loader {
        color: #d4ffe1;
        font-size: 25px;
        animation: fade 2s infinite;
    }

    #skip {
        /* Positionnement */
        position: fixed;
        top: 45%;
        left: 45%;
        z-index: 10000;    /* Au-dessus du preloader (9999) */
        
        /* Apparence du bouton */
        background: #8a4a0a;
        color: #fdf6eb;
        padding: 15px 40px; 
        border-radius: 50px; /* Forme pilule */
        font-size: 35px;
        text-decoration: none;
        
        /* Dimensions */
        width: auto;
        display: inline-block;
        
        /* Animation */
        transition: all 0.3s ease;
        cursor: pointer;
        border: none; 
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    }

    #skip:hover {
        background: #fdf6eb;
        color: #8a4a0a;
        transform: scale(1.1);
        box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    }

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Arial', sans-serif;
    line-height: 1.6;
    background: #f9f6f2; /* Couleur de fond douce */
    color: #222;
}

/* LA MARGE : Le container centre le contenu avec des marges sur les côtés */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 25px; /* Évite que le texte touche les bords sur mobile */
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 20px;
    color: #111;
    display: flex;
    justify-content: center;
    text-decoration: underline;
    text-decoration-line: underline;
    text-decoration-color: #c0392b;
}

a {
    color: #7a1c13;
}


/* ---------- NAVBAR ---------- */
.navbar {
    width: 100%;
    background: rgba(138, 74, 10, 0.95);
    padding: 1.2rem 0;
    position: fixed;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-video video {
    height: 70px; /* Ajuste la hauteur selon tes besoins */
    width: 105%;  /* Garde les proportions */
    display: block;
    border-radius: 8px; /* Optionnel : pour arrondir les bords du logo */
    transition: transform 0.3s ease;
}

.logo-video video:hover {
    transform: scale(1.1); /* Petit effet au survol */
}

/* On s'assure que la navbar aligne bien le logo verticalement */
.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ---------- HERO (Colonnes Photo/Texte) ---------- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px; /* Espace pour la navbar */
}

.hero-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap; /* Pour que ça passe l'un sous l'autre sur mobile */
}

.hero-text {
    flex: 1;
    min-width: 300px;
}

.small-title {
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #333;
    margin-bottom: 0.5rem;
}

.hero-text h1 {
    font-size: clamp(2.5rem, 5vw, 4rem); /* Taille adaptative */
    line-height: 1;
    margin-bottom: 1.5rem;
}

.name { color: #c0392b; font-family: "Bitcount Grid Double", sans-serif; }
.surname { color: #000; font-family: "Bitcount Grid Double", sans-serif; }

.subtitle { font-size: 1.2rem; margin-bottom: 1rem; }
.description { color: #444; max-width: 450px; }

.hero-buttons { margin-top: 2rem; display: flex; gap: 1rem; }

.btn, .btn-outline {
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.btn { background: #111; color: #fff; }
.btn-outline { border: 2px solid #111; color: #111; }
.btn:hover { background: #c0392b; }

/* Image avec cercle */
.hero-image {
    position: relative;
    width: 350px;
    height: 350px;
}

.hero-image img {
    height: 150%;
    object-fit: cover;
    border-radius: 44%;
    position: relative;
    z-index: 2;
    width: 350px;
    top: -140px;
    right: -15px;
}

.circle {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #b8323a;
    border-radius: 50%;
    top: 15px;
    right: -15px;
    z-index: 1;
}

/* ---------- PROJETS (Grille) ---------- */
.projects {
    padding: 100px 0;
    background: #fff;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: #f9f6f2;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.card img { 
    width: 100%; 
    height: 200px; 
    object-fit: cover; 
}
.card-content { 
    padding: 25px; 
    text-align: left; }


.btn-projets {
    padding: 5px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.btn-projets { color: #111; }
.btn-projets:hover {
    background: #6d3907;
    color: #ffffff;
}

/* ---------- ABOUT & CONTACT (Ligne pleine) ---------- */
.about, .contact {
    padding: 100px 0;
    text-align: center;
}

.contact-info a {
    color: #8b1e14;
    font-weight: bold;
    text-decoration: underline;
    font-size: 1.2rem;
}

footer {
    padding: 20px 0;
    background: #8a4a0a;
    color: #ffffff;
    text-align: center;
}

footer a {
    color: #ffffff;
}


/* ---------- LAYOUT À PROPOS ---------- */
.about-grid {
    display: flex;
    gap: 50px; /* Espace entre la timeline et les compétences */
    align-items: flex-start;
    margin-top: 40px;
}

.timeline-container {
    flex: 1.5; /* La timeline prend un peu plus de place */
}

.skills-side {
    flex: 1; /* Colonne des compétences */
    position: sticky; /* Reste visible au scroll si la timeline est longue */
    top: 100px;
    background: #fff;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* ---------- TIMELINE ---------- */
.about-text {
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.timeline {
    position: relative;
    padding: 10px 0;
    left: 75px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px; /* Aligné sur le centre des points */
    top: 0;
    bottom: 0;
    width: 2px;
    background: #000000;
}

.timeline-item {
    position: relative;
    margin-bottom: 35px;
    padding-left: 75px;
    text-align: left;
}


.timeline-dot {
    position: absolute;
    left: 0;
    top: 5px;
    width: 16px;
    height: 16px;
    background: #c0392b;
    border: 3px solid #f9f6f2;
    border-radius: 50%;
    z-index: 2;
}

.timeline-date {
    font-weight: bold;
    color: #c0392b;
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.timeline-content h3 {
    font-size: 1.1rem;
    color: #111;
    margin-bottom: 5px;
}

.timeline-place {
    font-style: italic;
    font-size: 0.85rem;
    color: #555;
    margin-top: 5px;
}


.timeline2::before {
    content: '';
    position: absolute;
    left: 7px; /* Aligné sur le centre des points */
    top: 0;
    bottom: 0;
    width: 2px;
    background: #000000;
}

.timeline-item2 {
    position: relative;
    margin-bottom: 35px;
    padding-left: 75px;
    text-align: left;
}


.timeline-dot2 {
    position: absolute;
    left: 0;
    top: 5px;
    width: 16px;
    height: 16px;
    background: #9a3ac7;
    border: 3px solid #f9f6f2;
    border-radius: 50%;
    z-index: 2;
}

.timeline-date2 {
    font-weight: bold;
    color: #9a3ac7;
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.timeline-content2 h3 {
    font-size: 1.1rem;
    color: #111;
    margin-bottom: 5px;
}

.timeline-place2 {
    font-style: italic;
    font-size: 0.85rem;
    color: #555;
    margin-top: 5px;
}

/* ---------- NUAGE DE COMPÉTENCES ---------- */
.skills-cloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 15px 25px; /* Espacement horizontal et vertical */
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.skill-tag {
    display: inline-block;
    color: #333;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: default;
    text-transform: uppercase;
    position: relative; /* This stays here to anchor the image */
    padding: 10px 20px; /* Adjust as needed for spacing */
    overflow: hidden;   /* Keeps the large image inside the tag */
}

.skill-tag::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: url("/images/papi.png") center/contain no-repeat;
    opacity: 0.9;
    pointer-events: none;
    z-index: -1; /* Ensures the image stays behind the text */
    opacity: 0.7;
    filter: grayscale(100%) blur(2px);
}

/* Tailles différentes pour l'aspect aléatoire */
.s1 { font-size: 0.5rem; opacity: 0.8; font-weight: 600; color: #111;  border-radius: 30px; padding: 5px;}
.s2 { font-size: 0.8rem; opacity: 0.9; font-weight: 700; color: #111;  border-radius: 30px; padding: 5px;}
.s3 { font-size: 1.1rem; opacity: 1; font-weight: 800; color: #111;  border-radius: 30px; padding: 5px;}

/* Légères rotations pour casser la ligne */
.skill-tag:nth-child(odd) { transform: rotate(-1deg); }
.skill-tag:nth-child(even) { transform: rotate(2deg); }
.skill-tag:nth-child(3n) { transform: rotate(1deg); }

/* Effet au survol */
.skill-tag:hover {
    color: #c0392b; /* Ta couleur d'accentuation */
    transform: scale(1.2) rotate(0deg) !important;
    opacity: 1;
}

/* Effet au survol sur le parent */
.skill-tag:hover {
    color: #c0392b; 
    transform: scale(1.2) rotate(0deg) !important;
    opacity: 1;
}

/* On cible spécifiquement le ::before lors du survol du parent */
.skill-tag:hover::before {
    filter: grayscale(0%) blur(0px);
    opacity: 1; /* Optionnel : si tu veux aussi qu'il soit plus net */
}
/* On enlève l'ancien style des tags si nécessaire */
.skill-tags span {
    background: none; /* Plus de fond */
    padding: 0;
}

/* ---------- CONTACT ---------- */
#divcontact {
    text-align: left;
}

#sectioncontact {
    display: flex; 
    flex-wrap: wrap;
    gap: 20px; 
    width: 35%;
    margin: 40px auto;
    padding: 20px;
    background-color: white;
    border: 1px solid #ccc;
    margin-bottom: 15px;
    box-shadow: 0 0 10px rgba(0, 0, 0, .2);
    display: flex; 
    justify-content: space-between;
    align-items: flex-start; 
}

#sectioncontact form {
    flex: 1;
    max-width: 500px;
}

/*Contact*/
.message-succes { 
    color: #155724; 
    background-color: #d4edda; 
    border: 1px solid #c3e6cb; 
} 
    
.message-erreur { 
    color: #721c24; 
    background-color: #f8d7da; 
    border: 1px solid #f5c6cb; 
} 
.message-succes, 
.message-erreur { 
    padding: 12px 16px; 
    margin-bottom: 20px; 
    border-radius: 6px; 
    font-size: 25px;
    text-align: center;
}


/* Labels */

#entete {
    display: flex;
    gap: -5px;
    margin-bottom: 15px;
    font-size: 20px;
}

#entete div {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#entete label {
    display: flex;
    align-items: baseline;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 15px;
    text-transform: uppercase;
}

/* Astérisque */
label span {
    color: red;
}

/* Champs */
input, textarea {
    width: 70%;
    padding: 6px;
    margin-bottom: 15px;
    border: 1px solid #8a4a0a;
    box-sizing: border-box;
}

/* Hauteur message */
textarea {
    height: 130px;
}

/*radio*/
.choix {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio input {
    display: none;
}

.radio span {
    display: block;
    padding: 10px 25px;
    border-radius: 25px;
    border: 2px solid #8a4a0a;
    width: fit-content;
    cursor: pointer;
    font-size: 15px;
    transition: 0.2s ease;
    background: #f9f6f2;
    color: #000;
}

.radio span:hover {
    background: #eed4b1;
    color: #8a4a0a;
}

.radio input:checked + span {
    background: #eed4b1;
    font-weight: bold;
    color: #8a4a0a;
}



/* Bouton */
button[type="submit"] {
    background-color: #fdf6eb;
    color: #8a4a0a;
    font-weight: bold;
    border: none;
    padding: 18px;
    cursor: pointer;
    margin-bottom: 15px;
}

button[type="submit"]:hover {
    background-color: #eed4b1;
    color: #000000;
}

    #skipliste {
        position: fixed;
        right: 30px;
        bottom: 30px;
        background: #6d3907;
        color: white;
        padding: 5px 10px;
        border-radius: 20px;
        font-size: 18px;
        text-decoration: none; 
        width: fit-content;
        z-index: 1000; 
    }

    #skipliste a{
        text-decoration: none; 
        color: #fdf6eb;
    }


    #skipliste:hover {
        background: #fdf6eb;
        color: #8a4a0a;
        border: 4px solid #8a4a0a;
    }
    #skipliste:hover a{
        color: #8a4a0a;
    }


/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
    .about-grid {
        flex-direction: column; /* On repasse l'un sous l'autre sur petit écran */
    }
    .skills-side {
        position: static;
        width: 100%;
    }
}

/* Responsive : On s'assure que les marges restent propres sur mobile */
@media (max-width: 600px) {
    .timeline {
        padding-left: 10px;
    }
}

/* Responsive tablette/mobile */
@media (max-width: 768px) {
    .hero-wrapper {
        flex-direction: column-reverse; /* Photo au dessus sur mobile */
        text-align: center;
    }
    .hero-image { width: 250px; height: 250px; }
    .hero-text { display: flex; flex-direction: column; align-items: center; }
}