* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

body {
    background-color: #f2f6f4;
    padding-top: 60px; /* Taille réservée à la navbar fixe */
}

a {
  text-decoration: none; /* Enlève le soulignement */
  color: black;          /* Change la couleur */
}

.navbar {
    position: fixed;       /* Reste fixe au défilement */
    top: 0;
    left: 0;
    width: 100%;           /* Prend toute la largeur de l'écran */
    height: 60px;
    background-color: #ffffff; /* Fond blanc */
    padding: 0 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Ombre sous la barre */
    display: flex;
    align-items: center;
    justify-content: center; /* Centre les liens au milieu */
    gap: 30px;             /* Espace entre chaque lien */
    z-index: 1000;         /* Garde la barre au-dessus de tout le reste */
}

/* --- SECTIONS PLEIN ÉCRAN (100vh / 100dvh) --- */
.section-fullscreen {
    min-height: calc(100vh - 60px);
    min-height: calc(100dvh - 60px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 50px 20px;
    box-sizing: border-box;
    scroll-margin-top: 60px;
    width: 100%;
}

.section-title, h2 {
    margin-top: 0;
    margin-bottom: 30px;
    font-size: 2.6rem;
    color: #1d1d1d;
    text-align: center;
    font-family: 'Permanent Marker', cursive, sans-serif;
    letter-spacing: 1.5px;
    font-weight: normal;
    scroll-margin-top: 60px;
}

/* --- HERO SECTION (Style Développeur Sombre - Plein Écran) --- */
.hero-section {
    background-color: #1d1d1d;
    color: #ffffff;
    min-height: calc(100vh - 60px);  /* Remplit la hauteur exacte de l'écran sous la navbar */
    min-height: calc(100dvh - 60px); /* Prise en compte de la hauteur dynamique mobile */
    display: flex;
    align-items: center;            /* Centre verticalement le contenu */
    padding: 40px 20px;
    margin: 0 0 40px 0;
    border-radius: 0 0 25px 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    scroll-margin-top: 60px;        /* Ajuste l'alignement lors du clic sur le lien d'ancre */
    width: 100%;
}

h2 {
    scroll-margin-top: 80px;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1100px;
    margin: 0 auto;
    gap: 40px;
}

.hero-left {
    flex: 1;
}

.hero-right {
    flex: 1;
    display: flex;
    justify-content: center;
}

.code-tag {
    font-family: 'Courier New', Courier, monospace;
    color: #515151;
    font-size: 1.1rem;
    font-style: italic;
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.15;
    margin: 15px 0;
    color: #ffffff;
}

.highlight-name {
    color: #2ecc71; /* Vert Émeraude / Vert Projet */
}

.hero-subtitle {
    color: #a0a0a0;
    font-size: 1.1rem;
    margin-bottom: 30px;
    letter-spacing: 1px;
}

.btn-hero {
    display: inline-block;
    border: 2px solid #2ecc71;
    color: #2ecc71 !important;
    padding: 12px 28px;
    font-weight: bold;
    letter-spacing: 1.5px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-hero:hover {
    background-color: #2ecc71;
    color: #1d1d1d !important;
    box-shadow: 0 0 15px rgba(46, 204, 113, 0.5);
}

.hero-profile-picture {
    width: 300px;
    height: 300px;
    max-width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center;
    border-radius: 30px;
    border: 3px solid #2ecc71;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: block;
}

.footer {
    padding: 25px 0;
    text-align: center;
    color: #777777;
    font-size: 0.9rem;
    border-top: 1px solid #e0e0e0;
    margin-top: 40px;
}

/* --- SECTION CONTACT (Inspirée du modèle & Thème Portfolio) --- */
.contact-section {
    padding: 20px 20px 60px 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.contact-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Grille des 4 cartes à gauche */
.contact-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    z-index: 2; /* Passe au-dessus du bord du formulaire */
    flex: 1;
    max-width: 480px;
}

.contact-card {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 25px 20px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
    border: 1px solid #e0e0e0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(46, 204, 113, 0.15);
}

.contact-icon {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-card h4 {
    margin: 5px 0 8px 0;
    font-size: 0.85rem;
    font-weight: 800;
    color: #1d1d1d;
    letter-spacing: 1px;
}

.contact-card p {
    margin: 0;
    font-size: 0.95rem;
    color: #555555;
    line-height: 1.4;
}

.status-badge {
    display: inline-block;
    background-color: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 12px;
    margin-top: 4px;
}

.contact-link {
    color: #2ecc71;
    font-weight: 600;
    transition: color 0.2s ease;
}

.contact-link:hover {
    color: #235b3e;
    text-decoration: underline;
}

/* Bloc du formulaire à droite (superposition) */
.contact-form-wrapper {
    background-color: #1d1d1d;
    color: #ffffff;
    border-radius: 24px;
    padding: 45px 40px 45px 70px;
    margin-left: -50px; /* Effet de chevauchement comme la maquette */
    z-index: 1;
    flex: 1.2;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.contact-form-wrapper h3 {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 2.2rem;
    font-family: 'Permanent Marker', cursive, sans-serif;
    font-weight: normal;
    color: #ffffff;
    letter-spacing: 1px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border-radius: 6px;
    border: 2px solid transparent;
    background-color: #ffffff;
    font-family: inherit;
    font-size: 0.95rem;
    color: #1d1d1d;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2ecc71;
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.3);
}

.btn-submit {
    align-self: flex-start;
    background-color: transparent;
    border: 2px solid #2ecc71;
    color: #2ecc71;
    padding: 14px 32px;
    font-size: 0.95rem;
    font-weight: bold;
    letter-spacing: 1.5px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-submit:hover {
    background-color: #2ecc71;
    color: #1d1d1d;
    box-shadow: 0 0 15px rgba(46, 204, 113, 0.5);
}

/* Conteneur principal */
.skills-container {
    display: flex;
    justify-content: center;
    gap: 20px;               /* Espace entre les 3 cartes */
    max-width: 1200px;       /* Largeur maximale de la section */
    margin: 30px auto;       /* Centre la section dans la page */
    padding: 0 20px;
}
/* Les cartes se partagent équitablement la ligne */
.card {
    flex: 1;                 /* Force les 3 cartes à avoir exactement 1/3 de la largeur chacune */
    background-color: #ffffff;
    border-radius: 15px;
    padding: 20px 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e0e0e0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
/* Effet au survol */
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}
.card h4 {
    margin-top: 0;
    color: #235b3e;
    font-size: 1.1em;
}
.card ul {
    padding-left: 20px;
    line-height: 1.6;
}
/* RESPONSIVE : Sur petit écran (tablette/mobile) */
@media (max-width: 900px) {
    .contact-container {
        flex-direction: column;
    }

    .contact-cards-grid {
        max-width: 100%;
        width: 100%;
    }

    .contact-form-wrapper {
        margin-left: 0;
        margin-top: 25px;
        padding: 35px 25px;
        width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 768px) {
    .hero-container {
        flex-direction: column-reverse; /* La photo passe au-dessus sur mobile */
        text-align: center;
        gap: 20px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .skills-container {
        flex-direction: column; /* Empile les cartes verticalement sur mobile */
    }
}

@media (max-width: 500px) {
    .contact-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* --- SECTION PROJETS (Menu d'onglets cliquables) --- */
.projects-section {
    max-width: 1000px;
    margin: 30px auto;
    padding: 0 20px;
}

/* Barre d'onglets */
.project-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.tab-btn {
    background-color: #ffffff;
    border: 2px solid #e0e0e0;
    color: #1d1d1d;
    padding: 12px 22px;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.tab-btn:hover {
    border-color: #2ecc71;
    color: #2ecc71;
    transform: translateY(-2px);
}

.tab-btn.active {
    background-color: #2ecc71;
    color: #1d1d1d;
    border-color: #2ecc71;
    box-shadow: 0 6px 18px rgba(46, 204, 113, 0.35);
}

/* Zone d'affichage des fiches */
.project-display-area {
    position: relative;
}

.project-card-detail {
    display: none;
    background-color: #ffffff;
    border-radius: 20px;
    padding: 35px 40px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
    border: 1px solid #e0e0e0;
    animation: fadeIn 0.4s ease;
}

.project-card-detail.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 10px;
}

.project-header h3 {
    margin: 0;
    font-size: 1.8rem;
    color: #1d1d1d;
    font-weight: 800;
}

/* Badges de statut */
.status-tag {
    font-size: 0.82rem;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-completed {
    background-color: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.status-in-progress {
    background-color: rgba(52, 152, 219, 0.15);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.status-planned {
    background-color: rgba(155, 89, 182, 0.15);
    color: #9b59b6;
    border: 1px solid rgba(155, 89, 182, 0.3);
}

.status-training {
    background-color: rgba(241, 196, 15, 0.15);
    color: #d35400;
    border: 1px solid rgba(241, 196, 15, 0.3);
}

.project-description {
    font-size: 1.05rem;
    line-height: 1.65;
    color: #444444;
    margin-bottom: 25px;
}

.project-techs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 30px;
}

.project-techs strong {
    color: #1d1d1d;
    margin-right: 6px;
}

.tech-badge {
    background-color: #f0f4f2;
    color: #235b3e;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 4px 12px;
    border-radius: 8px;
    border: 1px solid #dcdcdc;
}

.btn-project {
    display: inline-block;
    border: 2px solid #1d1d1d;
    background-color: #1d1d1d;
    color: #ffffff !important;
    padding: 10px 24px;
    font-weight: bold;
    font-size: 0.9rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.btn-project:hover {
    background-color: #2ecc71;
    border-color: #2ecc71;
    color: #1d1d1d !important;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4);
}

/* --- SECTION PRÉSENTATION (OPTION 2 : 2 Colonnes Côte à Côte) --- */
.presentation-section {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 20px;
}

.presentation-grid-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.presentation-card {
    background-color: #ffffff;
    border-radius: 20px;
    padding: 30px 32px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
    border: 1px solid #e0e0e0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.presentation-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.presentation-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    border-bottom: 2px solid #f0f4f2;
    padding-bottom: 12px;
}

.flag-icon {
    font-size: 1.8rem;
}

.presentation-card-header h3 {
    margin: 0;
    font-size: 1.4rem;
    color: #1d1d1d;
    font-weight: 800;
}

.presentation-card p {
    font-size: 1rem;
    line-height: 1.65;
    color: #444444;
    margin-bottom: 12px;
}

.presentation-card p:last-child {
    margin-bottom: 0;
}

.presentation-card strong {
    color: #235b3e;
}

@media (max-width: 768px) {
    .presentation-grid-2col {
        grid-template-columns: 1fr;
    }
}