/* ===== RESET ET CONFIGURATION GÉNÉRALE ===== */
body {
    font-family: 'Poppins', Arial, sans-serif;
    margin: 0;
    color: white;
    background: radial-gradient(circle, #a59bb6 40%, #c5bdd3 70%, #dbd5e6 100%); 
    background-position: center center; /* Assure que le dégradé est centré */
    background-size: cover; /* Couvre toute la fenêtre */
    height: 100%;
    min-height: 100vh;
}

html, body {
    overflow-y: scroll;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

html::-webkit-scrollbar, 
body::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
    width: 0;
}

html {
    scroll-behavior: smooth;
}

.hr-gradient {
    width: 100%;
    height: 1.5px; /* Épaisseur fine */
    background: linear-gradient(to right, 
        rgba(255, 255, 255, 0) 0%,  /* Transparent à gauche */
        rgba(119, 119, 119, 0.856) 30%,  /* Blanc visible au centre */
        rgba(255, 255, 255, 0) 100%  /* Transparent à droite */
    );
    border: none;
    margin: 20px 0; /* Espacement vertical */
}










/* ===== TYPOGRAPHIE ===== */
h1 {
    font-weight: 600;
    font-size: 1.8rem;
}

h2 {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 10px 10px;
}

h4 {
    text-align: center;
    font-size: 1rem;
    margin: 10px 10px;
    color: #c9c9c9ce
}

#accueil h1 {
    font-size: 3.3rem; /* Encore plus grand */
}


h5 {
    font-weight: 600;
    font-size: 1.4rem;
    color: #e0e0e0;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

/* Classe qui sera ajoutée après le chargement */
h5.visible {
    opacity: 1;
    transform: translateY(0);
}




/* ===== HEADER ET NAVIGATION ===== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    padding: 10px 20px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-image {
    width: 50px;
    height: 50px;
    margin-right: 10px;
    border-radius: 50%;
}













/* ===== LIENS ET NAVIGATION ===== */
a {
    color: white;
    text-decoration: none;
}

.nav-links a {
    color: white;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
    margin-left: 30px;
    padding: 5px 10px;
}

/* Animation avec ligne qui apparaît par en-dessous */
.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 0;
    height: 2px;
    background-color: #FFD700;
    transition: width 0.3s ease;
}
/* Effet au survol */
.nav-links a:hover {
    color: #FFD700;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Lien actif */
.nav-links a.active {
    color: #FFD700;
}

.nav-links a.active::after {
    width: 100%;
    background-color: #FFD700;
}

/* Animation spéciale pour le titre omijica.fr */
.nav-links-title a h1 {
    transition: transform 0.3s ease, color 0.3s ease;
}

.nav-links-title a:hover h1 {
    color: #FFD700;
}

/* Navigation : lien actif */
.nav-link.active {
    color: yellow;
    font-weight: bold;
    text-decoration: underline;
}









/* ===== SECTION PLEIN ÉCRAN ===== */
.fullscreen {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
}

.fullscreen h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.fullscreen p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}










/* ===== BOUTONS ===== */
.btn {
    position: relative;
    display: inline-block;
    padding: 20px 30px;
    font-size: 20px;
    color: white;
    background-color: #8663b4;
    border: 0px solid #f5f5f5;
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.4s ease;
}

.btn:hover {
    transform: scale(1.1);
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease, opacity 0.5s ease;
    opacity: 0;
}

.btn:active::after {
    width: 200px;
    height: 200px;
    opacity: 0;
    transition: width 0.2s ease, height 0.2s ease;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    border: none;
    font-weight: bold;
    display: inline-block;
    z-index: -1;
    transition: width 0.5s ease-in-out;
}

.btn:hover::before {
    width: 100%;
}

/* Styles spécifiques pour les liens de la page crédits */
main p {
    text-align: center;
    line-height: 2.5; /* Espacement vertical entre les liens */
}

main a {
    display: inline-block;
    padding: 5px 10px;
}

/* Style de base du bouton */
#savoir-plus {
    position: relative;
    display: inline-block;
    padding: 20px 30px;
    font-size: 20px;
    color: white;
    background-color: #8663b4;
    border: 0px solid #f5f5f5;
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
    transform: translateY(30px);
    transition: opacity 1s ease-out, transform 1s ease-out;
    opacity: 0; /* Opacité initiale */
}

/* Effet de survol */
#savoir-plus.visible {
    opacity: 1;
    transform: translateY(0);
}

#savoir-plus:hover {
    transform: scale(1.1);
    transition: transform 0.3   s ease; 
}








/* ===== FOOTER STYLING ===== */
.footer {
    margin-top: 50px;
    background-color: #9b8faf;
    padding: 25px 10px;
    display: flex;
    justify-content: center;
    width: 100%;
}


.footer-content {
    width: 90%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-social-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 20px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-image {
    width: 50px;
    height: 50px;
    margin-right: 10px;
    border-radius: 50%;
}

.social-icons {
    display: flex;
    align-items: center;
    margin-left: 80px; /* Espace entre le logo et les icônes */
}

.social-icon {
    width: 35px;
    height: 35px;
    margin: 0 18px; /* Augmente l'espace entre les icônes */
    transition: transform 0.3s, filter 0.3s;
}

.social-icon:hover {
    transform: scale(1.3);
}

#animated-text {
    font-weight: bold;
    font-size: 1.2rem;
    white-space: pre;
    overflow: hidden;
    display: inline-block;
    position: relative;
    vertical-align: middle;
    text-align: right;
}

.cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background-color: white;
    margin-left: 2px;
    position: relative;
    top: 2px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

.letter {
    display: inline-block;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.letter.visible {
    opacity: 1;
}

#animated-text, .cursor {
    vertical-align: middle;
    line-height: 1.2;
}

#animated-text2, .cursor {
    vertical-align: middle;
    line-height: 1.2;
    margin: 0 0px;
}









/* ===== SECTION PROJETS ET CARROUSEL ===== */
.carousel-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .projects-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    height: 600px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
  }
  
  .project-card {
    position: absolute;
    width: 300px;
    height: 450px;
    background-color: #282038;
    border: 1px solid #444;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, opacity 0.5s ease, box-shadow 0.3s ease;
    opacity: 0;
    pointer-events: none;
  }
  
  /* Classe active pour la carte centrale */
  .project-card.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0) scale(1); /* Reset de la transformation */
    z-index: 2;
  }
  
  /* Effet au survol */
  .project-card.active:hover {
    transform: scale(1.05); /* Grossissement de 1.1 fois */
    box-shadow: 
      -15px 0 15px rgba(195, 162, 255, 0.3),
      15px 0 15px rgba(195, 162, 255, 0.3),
      0 15px 15px rgba(195, 162, 255, 0.3);
    transition-delay: 50ms;
  }
  
  /* Positionnement des cartes inactives */
  .project-card.prev {
    transform: translateX(-100%) scale(0.9);
    opacity: 0.6;
    z-index: 1;
  }
  
  .project-card.next {
    transform: translateX(100%) scale(0.9);
    opacity: 0.6;
    z-index: 1;
  }
  
  .project-card.active {
    transform: translateX(0) scale(1);
    opacity: 1;
    z-index: 3;
    pointer-events: auto;
  }
  
  .project-card.side.left {
    transform: translateX(-110%) scale(0.7);
    opacity: 0.3;
    z-index: 1;
  }
  
  .project-card.side.right {
    transform: translateX(110%) scale(0.7);
    opacity: 0.3;
    z-index: 1;
  }
  
  .project-card.hidden {
    transform: scale(0.5);
    opacity: 0;
    z-index: 0;
  }
  
  /* Animation supprimée car remplacée par l'effet d'éclairage localisé */








/* Flèches de navigation */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s ease;
}

.carousel-container .left-arrow {
    left: -70px; /* Positionnement à l'extérieur du conteneur */
}

.carousel-container .right-arrow {
    right: -70px; /* Positionnement à l'extérieur du conteneur */
}

.carousel-arrow:hover {
    background: rgba(255, 215, 0, 0.8);
    color: #222;
}













/* Détails des cartes */
.project-card .project-image {
    width: 50%;
    height: 220px;
    min-width: 220px;  /* Largeur minimale */
    max-width: 220px;  /* Largeur maximale */
    min-height: 220px; /* Hauteur minimale */
    max-height: 220px; /* Hauteur maximale */
    object-fit: cover;
    border-radius: 15px;
    margin: 6px 0;
}

.project-card h3 {
    color: #FFD700;
    margin: 10px 0;
}

.project-description {
    color: #ccc;
    text-align: left; /* Alignement à gauche */
    padding: 5px 10px; /* Réduction de l'espace intérieur */
    margin: 0 auto;
    line-height: 1.2; /* Moins d'interligne */
    background: #313c4e; /* Fond gris noir */
    border-radius: 5px; /* Légère arrondi des bords */
    font-family: "Poppins", sans-serif; /* Police plus arrondie et moderne */
    font-size: 0.85rem; /* Texte plus petit */
    width: 85%;
    min-height: 60px; /* Hauteur minimale pour éviter que le fond bouge */
    max-height: 90px; /* Empêche le texte d’être trop long */
    overflow: hidden; /* Cache le texte qui dépasse */
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limite à 3 lignes */
    -webkit-box-orient: vertical;
}

.projectsavoirplus-link {
    display: inline-block;
    padding: 10px 30px;
    background-color: #764faa;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    transition: background-color 0.3s ease;
    margin-top: 15px;
}

.projectsavoirplus-link:hover {
    background-color: #FFD700;
    color: #222;
}

.project-details-container {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 900px;
    margin: 50px auto;
    background: #12161D;
    padding: 20px;
    border-radius: 10px;
    color: white;
}

.project-layout {
    display: flex;
    align-items: center;
    gap: 20px;
}

.project-left {
    flex: 1;
    text-align: center;
}

.project-right {
    flex: 2;
    background: #1d2430;
    padding: 20px;
    border-radius: 10px;
}

.project-name {
    color: #FFD700;
    font-weight: bold;
}

.project-description {
    font-size: 1rem;
    color: #ccc;
}

/* Personnalisation de la barre de défilement */
.dev-logs-container {
    max-height: 150px;
    overflow-y: auto;
    background: #303a4d;
    padding: 10px;
    border-radius: 8px;
}

/* Style de la barre de défilement pour WebKit (Chrome, Edge, Safari) */
.dev-logs-container::-webkit-scrollbar {
    width: 6px;
}

.dev-logs-container::-webkit-scrollbar-track {
    background: #222;
    border-radius: 10px;
}

.dev-logs-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.dev-logs-container::-webkit-scrollbar-thumb:hover {
    background: #FFD700;
}

/* Style de la barre de défilement pour Firefox */
.dev-logs-container {
    scrollbar-width: thin;
    scrollbar-color: #888 #222;
}

.dev-logs {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dev-logs li {
    background: #516381;
    margin: 5px 0;
    padding: 8px;
    border-radius: 5px;
}

.download-btn, .discord-link {
    display: inline-block;
    padding: 10px 20px;
    background: #764faa;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    transition: background 0.3s;
}

.download-btn:hover, .discord-link:hover {
    background: #FFD700;
    color: #222;
}

.copy-container {
    text-align: center;
    position: relative;
    display: inline-block;
}

.copy-message {
    position: absolute;
    top: -30px; /* Place le message au-dessus */
    left: 50%;
    transform: translateX(-50%);
    background: #222;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    opacity: 0; /* Caché au début */
    transition: opacity 0.3s ease;
}

.copy-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #764faa;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    transition: background 0.3s, color 0.3s;
    cursor: pointer;
}

.copy-btn:hover {
    background: #FFD700;
    color: #222;
}


/* Effet après le clic */
.copy-btn:active {
    background: #32CD32; /* Vert pour montrer que c'est copié */
    color: white;
}

.project-image-box {
    background: #1d232e;
    padding: 15px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 250px;
    height: 250px;
}

.project-image-large {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.project-buttons-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.project-buttons {
    display: flex;
    gap: 15px;
}












/* ===== SECTION LISTE DES PROJETS ===== */
.projects-list {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column; /* Met les projets en colonne */
    gap: 20px; /* Espace entre chaque projet */
}

.project-item {
    background: #12161D;
    padding: 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 30px;
    position: relative;
    width: 100%; /* Empêcher que plusieurs projets s'alignent */
}


/* Désactiver l'ancienne animation de survol */
.project-item:hover {
    transform: none; /* On supprime le décalage */
}

.project-item .project-image {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.project-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.project-title {
    color: #FFD700;
    font-size: 1.5rem;
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.project-title:hover {
    color: #764faa;
}

/* Centrer la description avec le titre */
.project-description-container {
    background: #1e1e1e;
    border-radius: 10px;
    padding: 15px;
    width: 90%; /* Réajuster la largeur */
    text-align: left; /* Aligner le texte à gauche */
}

.project-item .project-description {
    color: #ccc;
    line-height: 1.6;
    font-size: 1rem;
    margin: 0;
    background: none;
    padding: 0;
    max-height: none;
    width: 100%;
}

/* Styles pour les flèches */
.arrow {
    font-size: 4rem; /* Rendre les flèches plus grosses */
    color: #FFD700;
    cursor: pointer;
    user-select: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0; /* Les flèches sont invisibles par défaut */
    transition: opacity 0.3s ease; /* Animation d'apparition */
}

/* Afficher les flèches au survol */
.project-item:hover .arrow {
    opacity: 1;
}

.left-arrow {
    left: -90px; /* Déplacer la flèche gauche à l'extérieur */
}

.right-arrow {
    right: -90px; /* Déplacer la flèche droite à l'extérieur */
}

/* Rendre toute la carte cliquable */
.project-link {
    text-decoration: none; /* Supprimer le soulignement du lien */
    color: inherit; /* Hériter de la couleur du texte */
    display: flex;
    align-items: center;
    gap: 30px;
    width: 100%;
}









/* ===== SECTION COOKIE CLICKER ===== */
body {
    background-color: #0c0f14;
    color: #e0e0e0;
    font-family: 'Poppins', sans-serif;
}

.cookie-clicker {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 100px; /* Espace entre le cookie et le tableau des scores */
    margin-top: 50px;
    flex-wrap: wrap; /* Pour responsivité sur petits écrans */
}

.cookie-container {
    text-align: center;
}

.cookie {
    width: 300px; /* Cookie plus gros */
    height: 300px; /* Cookie plus gros */
    cursor: pointer;
    transition: transform 0.1s ease;
}

.cookie:hover {
    transform: scale(1.02); /* Légère animation au survol */
}

.cookie:active {
    transform: scale(0.95); /* Effet de clic sur le cookie */
}

.click-message {
    color: hsl(0, 0%, 85%);
    font-size: 2.7rem; /* Texte plus gros */
    margin-top: 20px;
}

.score-container {
    text-align: center;
}

.score-table {
    background: #12161D; /* Fond gris foncé */
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 400px; /* Largeur fixe */
}

/* Modification du conteneur de score pour aligner correctement les textes */
.score-header {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #252d3b;
    padding: 20px;
    border-radius: 10px;
    font-size: 1.2rem;
    color: #FFD700;
}

/* Style pour chaque ligne de score */
.score-header p {
    display: flex;
    justify-content: space-between;
    margin: 0;
    padding: 5px 0;
    border-bottom: 1px solid #3a4356;
}

.score-header p:last-child {
    border-bottom: none;
}

/* Style pour les valeurs */
.score-header span {
    font-weight: 600;
}

/* Shop section */
.shop {
    margin-top: 30px;
    width: 400px;
}

#buy-boulanger {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    padding: 15px;
    background-color: #252d3b;
    border: none;
    border-radius: 10px;
    color: #e0e0e0;
    cursor: pointer;
    transition: background-color 0.3s;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
}

#buy-boulanger:hover {
    background-color: #303d54;
}

.boulanger-image {
    width: 40px;
    height: 40px;
}

#leaderboard {
    max-height: 500px; /* Hauteur définie pour voir 10 scores sans tout bloquer */
    overflow-y: auto; /* Activation du scroll vertical */
    margin-top: 15px;
    padding-right: 5px; /* Évite que le scroll touche les nombres */
}

/* Amélioration du style des scores */
#leaderboard .score-row {
    font-size: 1rem;
    line-height: 1.3; /* Réduction légère de l'interligne */
    padding: 4px 0;
    border-bottom: 0.5px solid #444;
}

#leaderboard .score-row:last-child {
    border-bottom: none; /* Pas de ligne sous le dernier score */
}

/* Style pour une barre de scroll plus discrète */
#leaderboard::-webkit-scrollbar {
    width: 5px;
}

#leaderboard::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 10px;
}

#leaderboard::-webkit-scrollbar-track {
    background: #2e2e2e;
}

/* Responsive design */
@media (max-width: 900px) {
    .cookie-clicker {
        flex-direction: column;
        gap: 40px;
    }
    
    .cookie {
        width: 250px;
        height: 250px;
    }
    
    .score-table, .shop {
        width: 90%;
        max-width: 400px;
    }
}

/* Animation de secousse pour remplacer l'alerte */
@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

.shake {
    animation: shake 0.5s;
    background-color: rgba(255, 0, 0, 0.2) !important; /* Feedback visuel rouge */
}














/* ===== Custom cursor ===== */
/* Style du curseur personnalisé */
#custom-cursor {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: width 0.2s ease, height 0.2s ease, border 0.2s ease;
    z-index: 9999;
}

/* Point noir pour remplacer le curseur */
#cursor-dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 10000;
}

/* Effet quand on passe sur un élément cliquable */
#custom-cursor.active {
    width: 45px;
    height: 45px;
    border: 2px solid yellow;
}





















/* ===== SECTION COmpetence ===== */
.competences {
    text-align: center;
    padding: 50px 20px;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.competences-title {
    font-size: 28px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 20px;
}

.competences-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.competence {
    width: 45%;
    max-width: 400px;
    background: #222;
    padding: 15px;
    border-radius: 10px;
    transition: transform 0.3s;
}

.competence:hover {
    transform: scale(1.05);
}

.progress-bar {
    width: 100%;
    background: #777;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 10px;
    border-radius: 5px;
    transition: width 1s ease-in-out;
}

.progress-text {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    font-weight: bold;
    color: rgb(255, 255, 255);
}

.skill-level {
    display: block;
    font-size: 14px;
    font-weight: bold;
    color: #00ffff;
    margin-bottom: 5px;
    text-transform: uppercase;
}


























/* ===== RESPONSIVE DESIGN - MOBILE ===== */
/* Fix for horizontal scrolling on iPhone XR */
.hr-gradient {
    width: 95%; /* Reduce from 100% to prevent overflow */
    max-width: 100vw; /* Ensure it never exceeds viewport width */
    margin: 20px auto; /* Center it and keep vertical spacing */
}

/* Prevent overflow on all elements */
* {
    max-width: 100%; /* Ensure no element exceeds parent width */
    box-sizing: border-box; /* Include padding in width calculations */
}

/* Fix potential body overflow */
body {
    overflow-x: hidden; /* Hide horizontal overflow */
    width: 100%; /* Set width to viewport */
}

@media (max-width: 768px) {
    /* Adaptation de la typographie */
    h1 {
        font-size: 1.4rem;
    }
    
    #accueil h1 {
        font-size: 2.2rem; /* Réduction pour mobile */
    }
    
    h5 {
        font-size: 1.1rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    /* Ajustement du header et navigation */
    .header {
        flex-direction: column;
        padding: 10px;
    }
    
    .nav-links a {
        margin-left: 10px;
        padding: 3px 6px;
        font-size: 0.9rem;
    }
    
    /* Adaptation du footer */
    .footer {
        padding: 15px 5px;
    }
    
    .footer-content {
        width: 100%;
    }
    
    .logo-social-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .social-icons {
        margin-left: 0;
    }
    
    .social-icon {
        width: 28px;
        height: 28px;
        margin: 0 10px;
    }
    
    #animated-text {
        font-size: 1rem;
    }
    
    /* Adaptation de la liste des projets */
    .project-item {
        flex-direction: column;
        padding: 15px;
        border-radius: 25px;
        gap: 15px;
    }
    
    .project-link {
        flex-direction: column;
        gap: 15px;
    }
    
    .project-item .project-image {
        width: 150px;
        height: 150px;
    }
    
    .project-title {
        font-size: 1.3rem;
        text-align: center;
    }
    
    .project-description-container {
        width: 100%;
        padding: 10px;
    }
    
    .project-item .project-description {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    /* Ajustement des flèches du carrousel */
    .carousel-container {
        position: relative;
        padding: 0 50px; /* Espace pour les flèches */
    }
    
    .carousel-container .left-arrow {
        left: 5px;
        width: 40px;
        height: 40px;
    }
    
    .carousel-container .right-arrow {
        right: 5px;
        width: 40px;
        height: 40px;
    }
    
    /* Ajustement des projets dans le carrousel */
    .projects-container {
        height: 500px;
    }
    
    .project-card {
        width: 250px;
        height: 400px;
    }
    
    .project-card .project-image {
        width: 180px;
        height: 180px;
        min-width: 180px;
        max-width: 180px;
        min-height: 180px;
        max-height: 180px;
    }
    
    .project-description {
        font-size: 0.8rem;
        min-height: 50px;
        max-height: 80px;
    }
    
    /* Correction du problème lorsqu'on clique sur réseaux */
    .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }
    
    /* Ajustement des compétences */
    .competence {
        width: 90%;
    }
    
    /* Adaptation des boutons */
    .btn, #savoir-plus {
        padding: 15px 20px;
        font-size: 16px;
    }
    
    /* Correction des sections plein écran */
    .fullscreen {
        height: auto;
        min-height: 100vh;
        padding: 50px 20px;
    }
    
    /* Ajustements pour les détails du projet */
    .project-layout {
        flex-direction: column;
    }
    
    .project-image-box {
        width: 200px;
        height: 200px;
    }
    
    .project-buttons {
        flex-direction: column;
        gap: 10px;
    }
}

/* Ajustements pour les très petits écrans */
@media (max-width: 480px) {
    #accueil h1 {
        font-size: 1.8rem;
    }
    
    h5 {
        font-size: 1rem;
    }
    
    .nav-links a {
        margin-left: 5px;
        padding: 3px 5px;
        font-size: 0.8rem;
    }
    
    .project-card {
        width: 220px;
        height: 380px;
    }
    
    .project-card .project-image {
        width: 160px;
        height: 160px;
        min-width: 160px;
        max-width: 160px;
        min-height: 160px;
        max-height: 160px;
    }
    
    /* Ajuster le cookie clicker */
    .cookie {
        width: 200px;
        height: 200px;
    }
    
    .click-message {
        font-size: 2rem;
    }
    
    /* Réduction supplémentaire pour les arrows */
    .arrow {
        font-size: 3rem;
    }
    
    .left-arrow {
        left: -40px;
    }
    
    .right-arrow {
        right: -100px;
    }
}

@media (max-width: 414px) {
    /* Correction pour le carrousel */
    .carousel-container {
        padding: 0 0px;
        max-width: 90%;
        overflow: hidden;
    }
    
    .projects-container {
        width: 90%;
        height: 450px;
    }
    
    .project-card {
        width: 200px;
        height: 360px;
    }
    
    .project-card .project-image {
        width: 140px;
        height: 140px;
        min-width: 140px;
        max-width: 140px;
        min-height: 140px;
        max-height: 140px;
    }
    
    .project-card h3 {
        font-size: 1rem;
        margin: 5px 0;
    }
    
    .project-description {
        width: 90%;
        min-height: 45px;
        max-height: 70px;
        font-size: 0.75rem;
        -webkit-line-clamp: 4;
    }
    
    .projectsavoirplus-link {
        padding: 8px 20px;
        font-size: 0.8rem;
        margin-top: 10px;
    }
    
    /* Flèches de navigation */
    .carousel-container .left-arrow {
        left: 0px;
        width: 30px;
        height: 30px;
    }
    
    .carousel-container .right-arrow {
        right: 0px;
        width: 30px;
        height: 30px;
    }
    
    /* Correction pour la liste des projets */
    .projects-list {
        margin: 20px auto;
        padding: 0 10px;
    }
    
    .project-item {
        border-radius: 15px;
        padding: 10px;
        margin: 0 auto;
        width: 90%;
    }
    
    .project-item .project-image {
        width: 120px;
        height: 120px;
    }
    
    .project-content {
        width: 100%;
        align-items: center;
    }
    
    .project-description-container {
        padding: 8px;
    }
    
    /* Cachez les flèches qui débordent */
    .project-item .arrow {
        display: none; /* Sur mobile, on peut simplement faire défiler les projets */
    }
    
    /* Correction pour les détails du projet */
    .project-details-container {
        padding: 10px;
        margin: 30px auto;
    }
    
    .project-right {
        padding: 10px;
    }
    
    .project-image-box {
        width: 180px;
        height: 180px;
        padding: 10px;
    }
    
    /* Pour éviter tout problème de dépassement */
    .project-buttons-container {
        width: 100%;
    }
    
    .project-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .copy-btn, .download-btn, .discord-link {
        padding: 8px 15px;
        font-size: 0.85rem;
    }
    
    /* S'assurer que tout est bien contenu */
    .projects-list, .carousel-container, .project-details-container {
        overflow-x: hidden;
    }
}

/* Special adjustments for very small devices like iPhone SE */
@media (max-width: 375px) {
    /* Header and navigation */
    .header {
        padding: 5px;
    }
    
    .logo-image {
        width: 40px;
        height: 40px;
    }
    
    .nav-links a {
        margin-left: 3px;
        padding: 2px 4px;
        font-size: 0.75rem;
    }
    
    /* Typography */
    #accueil h1 {
        font-size: 1.5rem;
    }
    
    h5 {
        font-size: 0.9rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    /* Project cards */
    .project-card {
        width: 180px;
        height: 340px;
    }
    
    .project-card .project-image {
        width: 120px;
        height: 120px;
        min-width: 120px;
        max-width: 120px;
        min-height: 120px;
        max-height: 120px;
    }
    
    .project-description {
        font-size: 0.7rem;
        -webkit-line-clamp: 3;
    }
    
    /* Buttons */
    .btn, #savoir-plus {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    /* Projects list */
    .project-item .project-image {
        width: 100px;
        height: 100px;
    }
    
    .project-title {
        font-size: 1.1rem;
    }
    
    .project-item .project-description {
        font-size: 0.8rem;
    }
    
    /* Carousel */
    .projects-container {
        height: 400px;
    }
    
    /* Cookie clicker */
    .cookie {
        width: 150px;
        height: 150px;
    }
    
    .click-message {
        font-size: 1.5rem;
    }
    
    /* Footer */
    .social-icon {
        width: 24px;
        height: 24px;
        margin: 0 8px;
    }
    
    #animated-text {
        font-size: 0.8rem;
    }
}

























/* ===== MODE CLAIR/SOMBRE SWITCHER ===== */
/* Modifier le CSS pour le bouton theme-toggle dans le footer */
.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    width: 50px;
    height: 25px;
    background-color: #8663b4;
    border-radius: 25px;
    display: flex;
    align-items: center;
    padding: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.theme-toggle:hover {
    background-color: #764faa;
}

.theme-toggle-ball {
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease, background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
}

/* Mode sombre */
.theme-toggle.dark {
    background-color: #51426b;
}

.theme-toggle.dark:hover {
    background-color: #443656;
}

.theme-toggle.dark .theme-toggle-ball {
    transform: translateX(25px);
    background-color: #FFD700; /* Jaune pour plus de visibilité en mode sombre */
}

.theme-toggle-ball i {
    font-size: 12px;
    color: #51426b;
}

/* Icône soleil pour le mode clair */
.theme-toggle:not(.dark) .theme-toggle-ball i:before {
    content: "\f185"; /* Icône de soleil de Font Awesome */
    color: #f39c12;
}

/* Icône lune pour le mode sombre */
.theme-toggle.dark .theme-toggle-ball i:before {
    content: "\f186"; /* Icône de lune de Font Awesome */
    color: #443656;
}

/* Ajouter un positionnement relatif pour le footer */
.footer-content {
    position: relative;
    /* autres propriétés existantes */
}

/* Styles pour le mode sombre par défaut */
body {
    background: radial-gradient(circle, #51426b 30%, #2E243F 70%, #1A0F2B 100%);
    background-position: center center;
    background-size: cover;
    color: white;
}

.footer {
    background-color: #1A0F2B;
}

.project-item,
.project-card,
.project-details-container,
.score-table,
.competence {
    background: #12161D;
    color: white;
}

.project-description-container,
.project-right,
.score-header,
#buy-boulanger {
    background: #1d2430;
    color: white;
}

.project-title,
.project-card h3,
.project-name,
.score-header {
    color: #FFD700;
}

.skill-level {
    color: #00ffff;
}

.dev-logs-container {
    background: #303a4d;
    color: white;
}

.dev-logs li {
    background: #516381;
    color: white;
}

/* ===== MEDIA QUERIES POUR LE MODE CLAIR/SOMBRE ===== */

.theme-toggle {
    background-color: #51426b;
}

.theme-toggle:hover {
    background-color: #443656;
}

.theme-toggle-ball i {
    color: #51426b;
}

body.light-mode .hr-gradient {
    width: 100%;
    height: 1.5px; /* Épaisseur fine */
    background: linear-gradient(to right, 
        rgba(199, 199, 199, 0) 0%,  /* Transparent à gauche */
        rgba(243, 243, 243, 0.856) 30%,  /* Blanc visible au centre */
        rgba(136, 136, 136, 0) 100%  /* Transparent à droite */
    );
    border: none;
    margin: 20px 0; /* Espacement vertical */
}

/* Nous allons ajouter une classe pour forcer le mode clair */
body.light-mode {
    background: radial-gradient(circle, #a59bb6 40%, #c5bdd3 70%, #dbd5e6 100%);
    background-position: center center;
    background-size: cover;
    color: #333;
}

body.light-mode .footer {
    background-color: #9d8fb4;
}

body.light-mode .project-item,
body.light-mode .project-card,
body.light-mode .project-details-container,
body.light-mode .score-table,
body.light-mode .competence {
    background: #f0eaf5;
    color: #333;
}

body.light-mode .project-description-container,
body.light-mode .project-right,
body.light-mode .score-header,
body.light-mode #buy-boulanger {
    background: #e6e0f0;
    color: #333;
}

body.light-mode .project-item .project-description {
    color: #493c5a;
}

body.light-mode .project-title,
body.light-mode .project-card h3,
body.light-mode .project-name,
body.light-mode .score-header,
body.light-mode .skill-level {
    color: #764faa;
}

body.light-mode .dev-logs-container {
    background: #dbd5e6;
    color: #333;
}

body.light-mode .dev-logs li {
    background: #c5bdd3;
    color: #333;
}


body.dark-mode .footer {
    background-color: #1A0F2B;
}

body.dark-mode body {
    background: radial-gradient(circle, #51426b 30%, #2E243F 70%, #1A0F2B 100%); 
    background-position: center center; 
    background-size: cover;
}


body.light-mode .fullscreen h1 {
    color: #2E1437; /* Violet foncé */
    text-shadow: 0 2px 4px rgba(46, 20, 55, 0.1);
}

body.light-mode .fullscreen p {
    color: #4A306D; /* Violet moyen */
}

body.light-mode .btn {
    background-color: #9D71BC; /* Violet pastel */
    color: #2E1437;
    box-shadow: 0 4px 15px rgba(157, 113, 188, 0.3);
}

body.light-mode .btn:hover {
    background-color: #B28FCE;
    transform: scale(1.1) translateY(-2px);
}

body.light-mode .btn::after {
    background: rgba(255, 255, 255, 0.3);
}

/* Adaptation du footer pour le mode clair */
body.light-mode .footer {
    background-color: #D3C2E3 !important; /* Lavande claire */
}

body.light-mode #animated-text {
    color: #4A306D;
}

body.light-mode .cursor {
    background-color: #4A306D;
}

body.light-mode .social-icon:hover {
    filter: brightness(0.8) saturate(1.5);
}

/* Animation supplémentaire pour le mode clair */
@media (prefers-color-scheme: light) {
    .fullscreen {
        animation: lightFadeIn 1s ease;
    }

    @keyframes lightFadeIn {
        from {
            background-position-y: -20%;
            opacity: 0.9;
        }
        to {
            background-position-y: center;
            opacity: 1;
        }
    }
}

/* Pour forcer le mode sombre */
body.dark-mode {
    background: radial-gradient(circle, #51426b 30%, #2E243F 70%, #1A0F2B 100%);
    background-position: center center;
    background-size: cover;
    color: white;
}

body.dark-mode .footer {
    background-color: #1A0F2B;
}

body.dark-mode .project-item,
body.dark-mode .project-card,
body.dark-mode .project-details-container,
body.dark-mode .score-table,
body.dark-mode .competence {
    background: #12161D;
    color: white;
}

body.dark-mode .project-description-container,
body.dark-mode .project-right,
body.dark-mode .score-header,
body.dark-mode #buy-boulanger {
    background: #1d2430;
    color: white;
}

body.dark-mode .project-title,
body.dark-mode .project-card h3,
body.dark-mode .project-name,
body.dark-mode .score-header {
    color: #FFD700;
}

body.dark-mode .skill-level {
    color: #00ffff;
}

body.dark-mode .dev-logs-container {
    background: #303a4d;
    color: white;
}

body.dark-mode .dev-logs li {
    background: #516381;
    color: white;
}

