:root {
    --dark-bg: #1A1D24; /* Couleur de fond principale */
    --text-color: #E0E0E0; /* Couleur du texte clair */
    --accent-color: #007bff; /* Couleur d'accentuation pour les boutons, etc. */
    --card-bg: #2B2F38; /* Couleur de fond des cartes */
    --border-color: #444; /* Couleur des bordures subtiles */
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--dark-bg);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden; /* Empêche le défilement horizontal indésirable */
}

/* --- Navigation Bar --- */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 60px;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
  background: transparent;
}

.navbar.scrolled {
  background: var(--glass-bg);
  backdrop-filter: var(--blur);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.navbar nav ul {
  display: flex;
  list-style: none;
  gap: 35px;
}

.navbar nav ul li a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: var(--transition);
}

.navbar nav ul li a::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}

.navbar nav ul li a:hover::after,
.navbar nav ul li a.active::after {
  width: 100%;
}

.search-icon {
  font-size: 1.3em;
  cursor: pointer;
  color: var(--accent-color);
}

/* --- Hero Section --- */
.hero-section {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: var(--dark-bg); /* Couleur de fond principale */
}

.hero-content {
    max-width: 800px;
}

.hero-content h1 {
    font-size: 4.5em; /* Grande taille pour le nom du designer */
    margin: 0;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: 2px;
}

.hero-content .tagline {
    font-size: 1.5em;
    margin-top: 15px;
    margin-bottom: 40px;
    font-weight: 300;
    color: var(--text-color);
}

.btn {
    display: inline-block;
    padding: 15px 35px;
    border: 2px solid var(--text-color);
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1em;
    letter-spacing: 1px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.btn:hover {
    background-color: var(--text-color);
    color: var(--dark-bg);
}

/* --- Projects Preview Section --- */
.projects-preview {
    display: flex;
    justify-content: center;
    padding: 50px 0;
    gap: 20px;
    background-color: var(--dark-bg); /* Assure la continuité du fond */
    flex-wrap: wrap; /* Permet aux cartes de passer à la ligne */
}

.project-card {
    width: 250px; /* Taille fixe pour l'exemple */
    height: 180px;
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Scroll Indicator --- */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.8em;
    color: var(--text-color);
    animation: bounce 2s infinite;
}

/* --- About Me & Services Section --- */
.about-section {
    padding: 100px 50px;
    text-align: center;
    background-color: var(--dark-bg);
}

.about-section h2 {
    font-size: 3.5em;
    margin-bottom: 40px;
    font-weight: 700;
    color: var(--text-color);
}

.about-description {
    font-size: 1.2em;
    max-width: 900px;
    margin: 0 auto 60px auto;
    color: var(--text-color);
    line-height: 1.8;
}

.section-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    width: 60%;
    margin: 60px auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* 3 colonnes flexibles */
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 40px 30px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

.service-icon {
    font-size: 2.5em;
    color: var(--accent-color); /* Couleur d'accentuation pour les icônes */
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.8em;
    margin-bottom: 25px;
    color: var(--text-color);
    font-weight: 600;
}

.service-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-card ul li {
    font-size: 1.05em;
    color: var(--text-color);
    margin-bottom: 10px;
    line-height: 1.5;
}

/* --- Projects Page Section --- */
.projects-page {
    padding: 100px 50px;
    text-align: center;
    background-color: var(--dark-bg);
    min-height: 100vh;
}

.projects-page .section-title {
    font-size: 3.5em;
    margin-bottom: 30px;
    font-weight: 700;
    color: var(--text-color);
}

.projects-page .title-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    width: 300px;
    margin: 0 auto 60px auto;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* 3 colonnes comme dans l'image */
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card-detail {
    display: flex;
    flex-direction: column;
    text-align: left;
    background-color: var(--card-bg); /* Utilise la couleur des cartes définie précédemment */
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none; /* Enlève le soulignement du lien */
    color: var(--text-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card-detail:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.project-image {
    width: 100%;
    height: 200px; /* Hauteur fixe pour les images */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-image img {
    width: 100%;
    display: block;
}

.project-info {
    padding: 20px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.project-info div{
    flex-direction: column;
}

.project-info h3 {
    margin: 0;
    font-size: 1.2em;
    font-weight: 600;
}

.project-info p {
    margin: 5px 0 0 0;
    font-size: 0.9em;
    color: #999; /* Texte secondaire plus clair */
    flex-grow: 1; /* Permet au paragraphe de prendre l'espace */
}

.project-arrow {
    font-size: 1.2em;
    color: var(--text-color);
    padding-left: 15px; /* Espace entre le texte et la flèche */
}

/* --- Contact Section --- */
.contact-section {
    padding: 100px 50px;
    text-align: center;
    background-color: var(--dark-bg);
    min-height: 80vh;
}

.contact-section .section-title {
    font-size: 3.5em;
    margin-bottom: 30px;
    font-weight: 700;
    color: var(--text-color);
}

.contact-section .title-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    width: 300px;
    margin: 0 auto 60px auto;
}

.contact-intro {
    font-size: 1.1em;
    max-width: 700px;
    margin: 0 auto 50px auto;
    color: var(--text-color);
    line-height: 1.6;
}

.email-link {
    display: inline-block;
    font-size: 1.8em;
    font-weight: 600;
    color: var(--accent-color); /* Utilise la couleur d'accentuation */
    text-decoration: none;
    margin-bottom: 60px;
    transition: color 0.3s ease;
}

.email-link:hover {
    color: var(--text-color);
}

/* Formulaire de Contact */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}

.form-group {
    margin-bottom: 25px;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 15px;
    background-color: var(--card-bg); /* Fond des champs plus sombre */
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 1em;
    border-radius: 4px;
    box-sizing: border-box; /* Inclut padding et bordure dans la largeur */
}

.contact-form textarea {
    resize: vertical;
}

.submit-btn {
    width: 100%;
    border: 2px solid var(--text-color);
    color: var(--text-color);
    background-color: transparent;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1em;
    padding: 15px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.submit-btn:hover {
    background-color: var(--text-color);
    color: var(--dark-bg);
}

/* --- Footer --- */
.site-footer {
    padding: 30px 50px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    background-color: var(--dark-bg);
    color: #666;
    font-size: 0.9em;
}

.site-footer p {
    margin: 0 0 15px 0;
}

.social-links a {
    color: #666;
    font-size: 1.5em;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--text-color);
}
a{
    color: white;
}

/* --- CV Page Section --- */
.cv-section {
    padding: 150px 50px 100px 50px; /* Ajout d'espace en haut pour le header fixe */
    text-align: center;
    background-color: var(--dark-bg);
    min-height: 100vh;
}

.cv-intro {
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto 40px auto;
    color: var(--text-color);
}

.download-btn {
    /* Style hérité de .btn mais ajusté pour le téléchargement */
    margin-bottom: 50px;
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--dark-bg);
    font-weight: 700;
    
}

.download-btn:hover {
    background-color: var(--text-color);
    border-color: var(--text-color);
    color: var(--dark-bg);
}

.download-btn i {
    margin-right: 10px;
}

.cv-embed {
    max-width: 1000px;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    overflow: hidden; /* Assure que le iframe respecte les coins arrondis */
}

/* Style de l'iframe pour le PDF */
.cv-embed iframe {
    border: none;
    background-color: #fff; /* Fond clair pour le contenu PDF */
}

/* --- Skills Section --- */
.skills-section {
    padding: 100px 135px;
    text-align: center;
    background-color: var(--dark-bg);
}

.skills-intro {
    font-size: 1.2em;
    max-width: 900px;
    margin: 0 auto 60px auto;
    color: var(--text-color);
    line-height: 1.8;
}

.skills-category {
    margin-bottom: 70px;
    text-align: left;
}

.skills-category h3 {
    font-size: 2em;
    font-weight: 600;
    color: var(--accent-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 30px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Trois colonnes */
    gap: 30px;
}

.skill-item {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.skill-item h4 {
    font-size: 1.4em;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--text-color);
}

.skill-item .level {
    font-size: 1.05em;
    margin: 5px 0;
    font-weight: 500;
    color: #fff;
}

.skill-item .level strong {
    color: var(--accent-color);
}

.skill-item .acquired-from {
    font-size: 0.9em;
    margin-top: 15px;
    color: #999;
}

/* Responsive */
@media (max-width: 768px) {
    .skills-section {
        padding: 80px 30px;
    }
    .skills-grid {
        grid-template-columns: 1fr; /* Une seule colonne sur mobile */
    }
    .skills-category h3 {
        font-size: 1.7em;
    }
}

/* --- Skills Section --- */
.skills-section {
    padding: 100px 50px;
    text-align: center;
    background-color: var(--dark-bg);
}

/* NOUVEAU : Contrainte de largeur pour aligner avec la section About */
.skills-section .container {
    max-width: 1200px; /* Aligné sur la max-width de la section Projects */
    margin: 0 auto;
}

.skills-intro {
    font-size: 1.2em;
    max-width: 900px; /* Maintient le paragraphe centré */
    margin: 0 auto 60px auto;
    color: var(--text-color);
    line-height: 1.8;
}

/* ... (Les styles .skills-category restent) ... */

/* Ajustement de la grille pour une meilleure compaction sur desktop */
.skills-grid {
    /* Ancienne : grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); */
    grid-template-columns: repeat(3, 1fr); /* Force 3 colonnes égales sur les grands écrans */
    gap: 30px;
}

/* --- NOUVEAU STYLE : XP BAR pour les Niveaux de Compétence --- */

.xp-bar-container {
    width: 100%;
    height: 20px;
    background-color: var(--dark-bg); /* Fond très sombre pour le conteneur */
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-top: 10px;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden; /* Important pour les coins arrondis du remplissage */
}

.xp-bar-fill {
    height: 100%;
    background-color: var(--accent-color); /* Couleur d'XP (bleu vif) */
    width: 0; /* Commence à zéro, sera animé par JS */
    transition: width 1.5s ease-out; /* Animation douce pour le remplissage */
    position: absolute;
    top: 0;
    left: 0;
}

.level-text {
    position: absolute;
    width: 100%;
    text-align: center;
    line-height: 20px; /* Centrage vertical */
    font-size: 0.9em;
    font-weight: 600;
    color: white; /* Texte sombre par défaut */
    mix-blend-mode: screen; /* Rend le texte lisible sur fond clair ou foncé */
    z-index: 2; /* S'assure que le texte est au-dessus de la barre */
}

/* Optionnel : Rendre le texte blanc pour un niveau très faible si mix-blend-mode ne suffit pas */
.xp-bar-fill[data-level="30"] + .level-text,
.xp-bar-fill[data-level="40"] + .level-text {
    color: var(--text-color); /* Texte clair pour les barres peu remplies */
    mix-blend-mode: normal;
}

/* Suppression de l'ancien style de niveau */
.skill-item .level {
    /* Suppression ou mise en commentaire de l'ancien style de <p class="level"> */
    display: none; 
}

/* Responsive (Mise à jour) */
@media (max-width: 992px) {
    /* Changement pour 2 colonnes sur tablette */
    .skills-grid {
        grid-template-columns: repeat(2, 1fr); 
    }
}

@media (max-width: 768px) {
    /* Changement pour 1 colonne sur mobile */
    .skills-grid {
        grid-template-columns: 1fr; 
    }
    .skills-section {
        padding: 80px 30px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .cv-section {
        padding: 100px 20px 50px 20px;
    }
    .download-btn {
        padding: 12px 20px;
        font-size: 1em;
    }
}

/* Responsive pour la section Contact */
@media (max-width: 768px) {
    .contact-section {
        padding: 80px 30px;
    }
    .email-link {
        font-size: 1.5em;
    }
    .site-footer {
        padding: 20px 30px;
    }
}

/* Responsive pour la section Projets */
@media (max-width: 992px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 colonnes sur tablette */
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .projects-page {
        padding: 80px 30px;
    }
    .projects-page .section-title {
        font-size: 2.5em;
    }
    .projects-grid {
        grid-template-columns: 1fr; /* 1 colonne sur mobile */
    }
    .project-image {
        height: 250px; /* Plus grand sur mobile si c'est la seule colonne */
    }
}

/* Responsive pour la section About/Services */
@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Ajuste la taille minimale des cartes */
        gap: 25px;
    }
    .about-section h2 {
        font-size: 2.8em;
    }
    .about-description {
        font-size: 1.1em;
    }
}

@media (max-width: 768px) {
    .about-section {
        padding: 80px 30px;
    }
    .about-section h2 {
        font-size: 2.5em;
        margin-bottom: 30px;
    }
    .about-description {
        font-size: 1em;
        margin-bottom: 40px;
    }
    .section-divider {
        width: 80%;
        margin: 40px auto;
    }
    .services-grid {
        grid-template-columns: 1fr; /* Une seule colonne sur mobile */
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .about-section {
        padding: 60px 20px;
    }
    .about-section h2 {
        font-size: 2em;
    }
    .service-card h3 {
        font-size: 1.5em;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-10px) translateX(-50%);
    }
    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

/* --- Responsive Design (Basic) --- */
@media (max-width: 768px) {
    .navbar {
        padding: 20px 30px;
        width: calc(100% - 60px);
    }

    .navbar nav ul li {
        margin-right: 20px;
    }

    .hero-content h1 {
        font-size: 3em;
    }

    .hero-content .tagline {
        font-size: 1.2em;
    }

    .btn {
        padding: 12px 25px;
        font-size: 1em;
    }

    .projects-preview {
        padding: 30px 20px;
    }
    .project-card {
        width: 100%; /* Les cartes prennent toute la largeur sur mobile */
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .navbar {
        flex-direction: column;
        align-items: center;
        padding: 15px 20px;
        width: calc(100% - 40px);
    }
    .navbar nav {
        margin-bottom: 15px;
    }
    .navbar nav ul {
        justify-content: center;
        width: 100%;
    }
    .navbar nav ul li {
        margin: 0 10px;
    }
    .search-icon {
        margin-top: 10px;
    }
    .hero-content h1 {
        font-size: 2.5em;
    }
    .hero-content .tagline {
        font-size: 1em;
    }
}