/* Reset de base et variables */
:root {
    /* Mode clair par défaut */
    --primary-color: #00D9FF; /* Bleu vif */
    --secondary-color: #FF0000; /* Rouge vif */
    --accent-color: #333333; /* Gris foncé */
    --text-color: #000000; /* Noir */
    --bg-color: #FFFFFF; /* Blanc */
    --card-bg-color: #FFFFFF;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --border-color: rgba(0, 217, 255, 0.1);
    --gradient-primary: linear-gradient(135deg, #00D9FF 0%, #0099CC 100%);
    --gradient-secondary: linear-gradient(135deg, #FF0000 0%, #CC0000 100%);
    --gradient-nav-hover: linear-gradient(135deg, #FF0000 0%, #00D9FF 100%);
    --gradient-title: linear-gradient(135deg, #00D9FF 0%, #FF0000 100%);
    --transition-smooth: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

/* Mode sombre */
[data-theme="dark"] {
    --primary-color: #00D9FF;
    --secondary-color: #FF0000;
    --accent-color: #CCCCCC;
    --text-color: #FFFFFF;
    --bg-color: #121212;
    --card-bg-color: #1E1E1E;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --border-color: rgba(0, 217, 255, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    height: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

main {
    flex: 1;
}

/* --- LOGIQUE Z-INDEX (Correction du problème d'affichage) --- */
/*
   1. Header : 950
   2. Bouton Thème : 960 (DOIT être > Header pour être visible)
   3. Menu Mobile (Overlay) : 2000 (DOIT être > Bouton Thème pour le cacher quand ouvert)
   4. Bouton Burger/Croix : 2001 (DOIT être > Menu Mobile pour pouvoir fermer)
*/

/* Contrôle du thème */
.theme-switch-wrapper {
    position: fixed;
    top: 25px;       /* Alignement ajusté */
    right: 30px;     /* Position desktop */
    z-index: 960;    /* CORRECTION : Au-dessus du header (950) pour être visible */
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-switch {
    position: relative;
    width: 60px;
    height: 30px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.theme-slider:before {
    position: absolute;
    content: "☀️";
    display: flex;
    align-items: center;
    justify-content: center;
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    font-size: 12px;
}

input:checked + .theme-slider {
    background-color: #333;
}

input:checked + .theme-slider:before {
    content: "🌙";
    transform: translateX(30px);
}

/* Bouton Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 217, 255, 0.3);
    z-index: 800; /* Inférieur au menu et au header */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    border: 2px solid white;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--gradient-secondary);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.3);
}

/* En-tête et navigation */
header {
    background-color: var(--card-bg-color);
    padding: 1rem 2rem;
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 950; /* Niveau de base du header */
    border-bottom: 3px solid var(--secondary-color);
    transition: background-color 0.3s ease;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-link {
    display: flex;
    align-items: center;
}

.logo-link img {
    height: 45px;
}

.nav-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

/* Menu desktop */
.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links li {
    position: relative;
}

.nav-links li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links li a::before {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gradient-nav-hover);
    border-radius: 2px;
    transition: width 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-links li a:hover::before {
    width: 100%;
}

.nav-links li a:hover {
    color: var(--primary-color);
}

/* Menu burger pour mobile - CORRECTION DE LA CROIX */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between; /* Important pour l'espacement initial */
    cursor: pointer;
    z-index: 2001; /* Toujours au-dessus de tout */
    width: 30px;
    height: 22px;  /* Hauteur ajustée pour un meilleur ratio */
    position: relative;
}

.menu-toggle span {
    height: 3px;
    width: 100%;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
    position: absolute;
    left: 0;
    transform-origin: center; /* Assure une rotation propre */
}

/* Positionnement initial des barres */
.menu-toggle span:nth-child(1) { top: 0; }
.menu-toggle span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.menu-toggle span:nth-child(3) { bottom: 0; }

/* Transformation en Croix (Active) - CORRIGÉ */
.menu-toggle.active span:nth-child(1) {
    top: 50%;
    transform: translate(0, -50%) rotate(45deg); /* Centre verticalement puis tourne */
    background-color: var(--secondary-color); /* Rouge */
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0; /* La barre du milieu disparaît */
}

.menu-toggle.active span:nth-child(3) {
    top: 50%; /* On ramène la barre du bas au milieu */
    bottom: auto; /* On annule le bottom */
    transform: translate(0, -50%) rotate(-45deg); /* Centre verticalement puis tourne inversement */
    background-color: var(--secondary-color); /* Rouge */
}

/* Sections et mise en page */
.section {
    padding: 6rem 2rem;
    position: relative;
}

.section-content {
    max-width: 1000px;
    margin: 0 auto;
    background-color: var(--card-bg-color);
    padding: 4rem;
    border-radius: 20px;
    box-shadow: 0 15px 40px var(--shadow-color);
    transform: translateY(0);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.section-content:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 60px rgba(0, 217, 255, 0.15);
}

.section h2 {
    font-size: 3.2rem;
    margin-bottom: 3rem;
    color: var(--text-color);
    position: relative;
    display: inline-block;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-align: center;
    width: 100%;
    transition: color 0.3s ease;
}

.section h2::after {
    content: '';
    display: block;
    width: 100px;
    height: 6px;
    background: var(--gradient-secondary);
    margin: 15px auto 0;
    border-radius: 10px;
    transition: width 0.4s ease;
}

.section-content:hover h2::after {
    width: 150px;
}

/* Effet survol pour les titres */
.section h2:hover {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Styles spécifiques pour la page de veille */
.veille-title {
    font-size: 4.5rem;
    font-weight: 900;
    margin-bottom: 2rem;
    background: var(--gradient-title);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-align: center;
    line-height: 1.2;
}

.veille-subtitle {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text-color);
    text-align: center;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.veille-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.veille-text {
    font-size: 1.8rem;
    line-height: 1.8;
    margin-bottom: 3rem;
    text-align: justify;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.veille-section {
    margin-bottom: 4rem;
}

.veille-section h4 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    border-bottom: 3px solid var(--secondary-color);
    padding-bottom: 0.5rem;
    display: inline-block;
    transition: color 0.3s ease;
}

/* Styles pour les pages de détail des projets */
.projet-detail-content {
    text-align: left;
    margin: 2rem 0;
    padding: 2rem;
    background: linear-gradient(to right, rgba(0, 217, 255, 0.05), transparent);
    border-radius: 15px;
    border-left: 4px solid var(--secondary-color);
}

.projet-detail-content p {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.projet-detail-content h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.projet-detail-content ul {
    list-style-type: disc;
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.projet-detail-content li {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

/* Styles pour les icônes de compétences dans les détails */
.project-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    margin: 1.5rem 0 2rem 0;
    padding: 1.5rem;
    background-color: var(--card-bg-color);
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow-color);
    justify-content: flex-start;
}

.skill-tag {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    transition: transform 0.3s ease;
}

.skill-tag:hover {
    transform: translateY(-5px);
}

.skill-tag img {
    width: 90px;
    height: 90px;
    object-fit: contain;
}

.skill-tag span {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}

/* Conteneur des boutons d'action */
.project-actions {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 2.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

/* Bouton Retour */
.back-projets-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    background: var(--card-bg-color);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition-smooth);
    border: 2px solid var(--text-color);
}

.back-projets-btn:hover {
    background: var(--text-color);
    color: var(--bg-color);
    transform: translateY(-5px);
}

/* Bouton Téléchargement / Visite */
.btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-smooth);
    cursor: pointer;
    background: var(--gradient-secondary);
    color: #FFFFFF;
    box-shadow: 0 8px 25px rgba(255, 0, 0, 0.3);
    min-width: 250px;
    border: 2px solid transparent;
}

.btn-download:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(255, 0, 0, 0.4);
    background: var(--gradient-primary);
}

/* Section d'accueil (Hero) */
.hero {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/fond-accueil.jpeg');
    background-size: cover;
    background-position: center;
    filter: blur(10px) brightness(0.7);
    z-index: 0;
}

.hero-content {
    padding: 3rem;
    animation: fadeInUp 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: #FFFFFF;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.8rem;
    margin-top: 1.5rem;
    font-weight: 400;
    color: #FFFFFF;
    opacity: 0.95;
    animation: fadeInUp 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.3s forwards;
    position: relative;
    z-index: 2;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Boutons génériques */
.btn {
    display: inline-block;
    padding: 1rem 3rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    margin: 1rem;
    transition: var(--transition-smooth);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.btn:hover {
    transform: translateY(-5px) scale(1.05);
}

.btn.primary {
    background: var(--gradient-secondary);
    color: #FFFFFF;
    box-shadow: 0 10px 30px rgba(255, 0, 0, 0.3);
}

.btn.primary:hover {
    box-shadow: 0 15px 40px rgba(255, 0, 0, 0.4);
}

.cv-buttons {
    display: flex;
    justify-content: center;
    margin: 3rem 0;
    gap: 2rem;
}

.btn-cv {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-smooth);
    cursor: pointer;
    background: var(--card-bg-color);
    border: 2px solid var(--primary-color);
    box-shadow: 0 8px 25px rgba(0, 217, 255, 0.15);
    color: var(--text-color);
    min-width: 200px;
}

.btn-cv:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 217, 255, 0.25);
    background: var(--gradient-primary);
    color: #FFFFFF;
    border-color: transparent;
}

.cv-logo {
    width: 35px;
    height: 35px;
    margin-right: 10px;
    transition: transform 0.4s ease;
}

.btn-cv:hover .cv-logo {
    transform: scale(1.1);
}

.btn-projet {
    background: var(--gradient-primary);
    color: #FFFFFF;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    margin-top: 1.5rem;
    transition: var(--transition-smooth);
    box-shadow: 0 8px 25px rgba(0, 217, 255, 0.25);
    border: 2px solid transparent;
}

.btn-projet:hover {
    background: var(--gradient-secondary);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(255, 0, 0, 0.3);
}

/* Images */
.profile-img {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    object-fit: cover;
    border: 8px solid transparent;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color)) border-box;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    transition: var(--transition-smooth);
}

.profile-img:hover {
    transform: scale(1.08);
}

.bts-logo {
    max-width: 180px;
    transition: var(--transition-smooth);
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.1));
}

.bts-logo:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 10px 20px rgba(0, 217, 255, 0.2));
}

.veille-img {
    max-width: 60%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    transition: var(--transition-smooth);
    border: 3px solid transparent;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color)) border-box;
    margin: 0 auto;
    display: block;
}

.veille-img:hover {
    transform: scale(1.03) translateY(-5px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.2);
}

/* Mise en page */
.about-me {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4rem;
    position: relative;
}

.bts-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4rem;
    position: relative;
}

.competences-category {
    margin-bottom: 3rem;
    background: linear-gradient(to right, rgba(0, 217, 255, 0.05), transparent);
    padding: 2rem;
    border-radius: 15px;
    border-left: 4px solid var(--secondary-color);
}

.competences-category h3 {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-weight: 700;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
    text-align: left;
    width: 100%;
    transition: color 0.3s ease;
}

.competences-category h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60%;
    height: 3px;
    background: var(--gradient-secondary);
    border-radius: 2px;
}

.competences-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 2rem;
    justify-items: center;
    margin-top: 1.5rem;
}

.competence-item {
    text-align: center;
    transition: var(--transition-smooth);
    padding: 1.5rem;
    background: var(--card-bg-color);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    border: 2px solid rgba(0, 217, 255, 0.1);
}

.competence-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 217, 255, 0.2);
    background: var(--gradient-primary);
    color: #FFFFFF;
}

.competence-item:hover p {
    color: #FFFFFF;
}

.competence-item img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 1rem;
    transition: transform 0.4s ease;
}

.competence-item:hover img {
    transform: scale(1.1);
}

.competence-item p {
    font-weight: 600;
    color: var(--text-color);
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

/* Section Projets */
.projets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
    justify-items: center;
    margin-top: 3rem;
}

.projet-card {
    background-color: var(--card-bg-color);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    padding: 2rem;
    text-align: center;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(0, 217, 255, 0.1);
}

.projet-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 50px rgba(0, 217, 255, 0.2);
    background: var(--gradient-primary);
    color: #FFFFFF;
}

.projet-card:hover h3,
.projet-card:hover p {
    color: #FFFFFF;
}

.projet-card img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    border-radius: 15px;
    margin-bottom: 1.5rem;
    transition: transform 0.4s ease;
}

.projet-card:hover img {
    transform: scale(1.05);
}

.projet-card h3 {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    font-weight: 700;
    transition: color 0.3s ease;
}

.projet-card p {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    line-height: 1.7;
    transition: color 0.3s ease;
}

/* Timeline (Parcours) */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto 3rem;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.timeline-item {
    margin-bottom: 3rem;
    position: relative;
    text-align: left;
}

.timeline-dot {
    position: absolute;
    left: -38px;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--gradient-secondary);
    border-radius: 50%;
    border: 4px solid var(--card-bg-color);
    box-shadow: 0 0 0 4px var(--primary-color);
    z-index: 2;
}

.timeline-content {
    padding: 2rem;
    background-color: var(--card-bg-color);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border-left: 4px solid var(--secondary-color);
    transition: var(--transition-smooth);
}

.timeline-content:hover {
    transform: translateX(10px);
    box-shadow: 0 15px 40px rgba(255, 0, 0, 0.15);
    background: var(--gradient-primary);
    color: #FFFFFF;
}

.timeline-content:hover h3,
.timeline-content:hover p {
    color: #FFFFFF;
}

.timeline-content h3 {
    margin-top: 0;
    color: var(--text-color);
    font-size: 1.6rem;
    margin-bottom: 1rem;
    font-weight: 700;
    transition: color 0.3s ease;
}

.timeline-content p {
    line-height: 1.8;
    color: var(--text-color);
    transition: color 0.3s ease;
}

/* CV Viewer - VERSION IMAGE PNG */
.cv-viewer {
    margin-top: 3rem;
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    background: var(--card-bg-color);
    position: relative;
    height: auto;
    border: 1px solid var(--border-color);
}

.cv-container {
    width: 100%;
    position: relative;
    display: block;
}

.cv-image-full {
    width: 100%;
    height: auto;
    display: block;
}

/* Veille Technologique */
.veille-container {
    text-align: center;
    padding: 3rem 0;
}

.veille-container h3 {
    font-size: 2.2rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    font-weight: 700;
    text-align: center;
    transition: color 0.3s ease;
}

.veille-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.veille-card {
    background-color: var(--card-bg-color);
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    text-align: left;
    transition: var(--transition-smooth);
    border-top: 4px solid var(--secondary-color);
}

.veille-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(255, 0, 0, 0.15);
    background: var(--gradient-primary);
    color: #FFFFFF;
}

.veille-card:hover h4,
.veille-card:hover p {
    color: #FFFFFF;
}

.veille-card h4 {
    font-size: 1.6rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-weight: 700;
    transition: color 0.3s ease;
}

.veille-card p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    transition: color 0.3s ease;
}

/* Pied de page */
footer {
    text-align: center;
    padding: 2rem;
    background: var(--gradient-primary);
    color: #FFFFFF;
    font-size: 1.1rem;
    margin-top: auto;
    position: relative;
    overflow: hidden;
}

footer p {
    position: relative;
    z-index: 2;
    font-weight: 400;
    letter-spacing: 0.5px;
    margin: 0.5rem 0;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===== RESPONSIVE DESIGN - CORRIGÉ ===== */
@media (max-width: 768px) {
    /* Toggle theme - Positionnement sur mobile */
    .theme-switch-wrapper {
        top: 25px;       /* Alignement avec le menu burger */
        right: 70px;     /* Décalé à gauche du menu burger */
        z-index: 960;    /* Au-dessus du header, mais SOUS le menu ouvert */
    }
    
    .theme-switch {
        width: 50px;
        height: 25px;
    }
    
    .theme-slider:before {
        height: 18px;
        width: 18px;
        left: 3px;
        bottom: 3px;
        font-size: 10px;
    }
    
    input:checked + .theme-slider:before {
        transform: translateX(25px);
    }
    
    /* Bouton Back to Top */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    /* Navigation */
    header {
        padding: 0.8rem 1rem;
        z-index: 950;
    }
    
    nav {
        position: relative;
        flex-wrap: wrap;
    }
    
    .menu-toggle {
        display: flex;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        z-index: 2001; /* Doit être au-dessus de TOUT pour fermer le menu */
    }
    
    .nav-links {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--card-bg-color);
        padding: 80px 2rem 2rem;
        z-index: 2000; /* Le menu ouvert recouvre le site ET le bouton de thème (960) */
        overflow-y: auto;
        gap: 1.5rem;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links li {
        width: 100%;
        text-align: center;
    }
    
    .nav-links li a {
        display: block;
        padding: 1rem;
        font-size: 1.3rem;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-links li a::before {
        display: none;
    }
    
    .nav-left {
        width: 100%;
        justify-content: space-between;
        padding-right: 40px; /* Espace pour le menu burger */
    }
    
    .nav-name {
        font-size: 1.1rem;
        text-align: left;
        flex: 1;
    }
    
    /* Fermer le menu quand on clique sur un lien */
    .nav-links.active ~ .menu-toggle {
        position: fixed;
        right: 20px;
        top: 25px;
    }
    
    /* Sections */
    .section {
        padding: 4rem 1rem;
    }

    .section-content {
        padding: 2rem 1.2rem;
        margin: 0 0.5rem;
    }

    .section h2 {
        font-size: 2.2rem;
        margin-bottom: 2rem;
    }

    /* Veille */
    .veille-title {
        font-size: 2.5rem;
    }
    
    .veille-subtitle {
        font-size: 1.8rem;
    }
    
    .veille-text {
        font-size: 1.2rem;
    }
    
    .veille-section h4 {
        font-size: 1.5rem;
    }

    /* Hero */
    .hero {
        padding: 1rem;
    }
    
    .hero-content {
        padding: 1.5rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.2rem;
    }

    /* Images */
    .profile-img {
        width: 150px;
        height: 150px;
    }

    /* Projets */
    .projets-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .projet-card {
        padding: 1.5rem;
    }

    /* CV Buttons */
    .cv-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .btn-cv {
        width: 100%;
        max-width: 280px;
        padding: 1rem 1.5rem;
    }

    /* Compétences */
    .competences-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .competence-item {
        padding: 1rem;
    }
    
    .competence-item img {
        width: 60px;
        height: 60px;
    }

    /* Timeline */
    .timeline {
        padding-left: 20px;
    }

    .timeline::before {
        left: 8px;
    }

    .timeline-dot {
        left: -12px;
        width: 16px;
        height: 16px;
    }
    
    .timeline-content {
        padding: 1.5rem;
    }

    /* Veille image */
    .veille-img {
        max-width: 95%;
    }
    
    /* Projet détail */
    .projet-detail-content {
        padding: 1.2rem;
    }
    
    .project-actions {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .btn-download {
        min-width: auto;
        width: 100%;
        max-width: 280px;
        padding: 1rem 1.5rem;
    }
    
    .skill-tag img {
        width: 70px;
        height: 70px;
    }
    
    /* Espacement réduit pour les sections */
    .section {
        padding: 3rem 1rem;
    }
}

/* Tablettes */
@media (min-width: 769px) and (max-width: 1024px) {
    .section-content {
        padding: 3rem;
    }
    
    .projets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nav-links {
        gap: 1.5rem;
    }
    
    .nav-links li a {
        font-size: 1rem;
    }
}

/* Grands écrans */
@media (min-width: 1025px) {
    .about-me, .bts-info {
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 4rem;
    }

    .about-me p, .bts-info p {
        text-align: justify;
        flex: 1;
    }

    .about-me .profile-img {
        flex-shrink: 0;
    }
}