/* Reset and Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #1E2D3D;
    font-family: 'Montserrat', sans-serif;
    color: #FFFFFF;
    overflow-x: hidden;
    padding-top: 60px; /* Compense la hauteur du header */
}

/* Background Shapes */
.background-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Derrière tout le contenu */
    overflow: hidden;
}

.triangle {
    position: absolute;
    opacity: 0.10; /* Pour un effet plus subtil */
    animation: float 15s infinite alternate;
}

/* Triangles variés */
.triangle-1 {
    width: 0;
    height: 0;
    border-left: 150px solid transparent;
    border-right: 150px solid transparent;
    border-bottom: 150px solid #FFD700;
    top: 10%;
    left: 10%;
}

.triangle-2 {
    width: 0;
    height: 0;
    border-left: 100px solid transparent;
    border-right: 100px solid #5A89FF;
    border-bottom: 100px solid transparent;
    top: 50%;
    left: 25%;
}

.triangle-3 {
    width: 0;
    height: 0;
    border-left: 120px solid #33FF57;
    border-right: 120px solid transparent;
    border-bottom: 120px solid transparent;
    bottom: 15%;
    right: 10%;
    transform: rotate(-15deg);
}

.triangle-4 {
    width: 0;
    height: 0;
    border-left: 200px solid transparent;
    border-right: 200px solid transparent;
    border-bottom: 200px solid #FF5733;
    top: 30%;
    right: 5%;
    transform: rotate(45deg);
}

.triangle-5 {
    width: 0;
    height: 0;
    border-left: 90px solid #FFFFFF;
    border-right: 90px solid transparent;
    border-bottom: 90px solid transparent;
    bottom: 5%;
    left: 15%;
    transform: rotate(-30deg);
}

.triangle-6 {
    width: 0;
    height: 0;
    border-left: 70px solid transparent;
    border-right: 70px solid transparent;
    border-bottom: 70px solid #FFD700;
    top: 70%;
    left: 40%;
    transform: rotate(20deg);
}

.triangle-7 {
    width: 0;
    height: 0;
    border-left: 130px solid #FF6347;
    border-right: 130px solid transparent;
    border-bottom: 130px solid transparent;
    bottom: 20%;
    right: 30%;
}

.triangle-8 {
    width: 0;
    height: 0;
    border-left: 110px solid transparent;
    border-right: 110px solid #FFD700;
    border-bottom: 110px solid transparent;
    top: 40%;
    left: 60%;
}

.triangle-9 {
    width: 0;
    height: 0;
    border-left: 150px solid #00FA9A;
    border-right: 150px solid transparent;
    border-bottom: 150px solid transparent;
    top: 30%;
    left: 40%;
    transform: rotate(-45deg);
}

/* Animation pour triangles flottants */
@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    100% {
        transform: translateY(-20px) rotate(10deg);
    }
}

.portfolio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background-color: rgba(15, 18, 28, 0.95);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    color: #FFFFFF;
}

.nav-bar {
    margin-left: auto;
}

.nav-bar ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.nav-bar li {
    display: inline;
}

.nav-bar a {
    text-decoration: none;
    color: #ffffff;
    font-weight: 600;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}

.nav-bar a:hover {
    background-color: #FFD700;
    color: #1E2D3D;
}

.nav-bar-mobile {
    display: none; /* Caché par défaut */
}


/* Main Layout */
.layout {
    display: flex;
    gap: 50px;
    padding: 50px;
    align-items: flex-start;
}

/* Pyramide Section */
.pyramid-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pyramid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    margin-top: 10%;
}

.pyramid-row {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.skill-card {
    background: linear-gradient(145deg, #2A3B4D, #1D293B);
    border-radius: 15px;
    padding: 17px;
    width: 200px;
    text-align: center;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.skill-card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.skill-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: white;
}

.skill-card p {
    font-size: 1rem;
    color: #D3D3D3;
    line-height: 1.5;
}

/* Colors for Cards */
.skill-card.frontend {
    background: linear-gradient(145deg, #3498DB, #2980B9);
}

.skill-card.backend {
    background: linear-gradient(145deg, #E67E22, #D35400);
}

.skill-card.database {
    background: linear-gradient(145deg, #27AE60, #1E5631);
}

.skill-card.tools {
    background: linear-gradient(145deg, #E74C3C, #C0392B);
}

.skill-card.systems {
    background: linear-gradient(145deg, #9B59B6, #8E44AD);
}

.skill-card.linux {
    background: linear-gradient(145deg, #34495E, #2C3E50);
}

/* Détails des Compétences Section */
.details-container {
    flex: 1;
    width: 40%;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    align-self: flex-start;
}

.details-title {
    text-align: center;
    font-size: 2rem;
    font-weight: bold;
    color: #FFD700;
    margin-bottom: 20px;
}

.details-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.details-card {
    background: linear-gradient(145deg, #2A3B4D, #1D293B);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.details-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.card-header h3 {
    font-size: 1.4rem;
    font-weight: bold;
    color: #FFD700;
}

.skill-icon {
    font-size: 2rem;
    color: #FFD700;
}

.details-card p {
    font-size: 1rem;
    color: #D3D3D3;
    line-height: 1.6;
}

/* Conteneur pour les certifications multiples en ligne */
.certification-links-container {
    display: flex;
    flex-wrap: wrap; /* Permet de passer à la ligne suivante si nécessaire */
    gap: 10px; /* Espacement entre les boutons */
    margin-top: 10px;
}

/* Style pour chaque lien de certification */
.certification-link {
    display: inline-block;
    padding: 10px 15px;
    background: #FFD700;
    color: #1E2D3D;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
    text-align: center;
    white-space: nowrap; /* Empêche les textes de se couper sur plusieurs lignes */
}

.certification-link:hover {
    background: #FFFFFF;
    color: #1E2D3D;
}

.certification-hint {
    font-style: italic;
    color: #B0B0B0; /* Gris clair */
    text-align: center;
    margin-bottom: 20px;
}



/* Responsive Design */
@media (max-width: 768px) {
    .layout {
        flex-direction: column;
        align-items: center;
    }

    .details-container {
        width: 100%;
    }

    .details-cards {
        grid-template-columns: 1fr;
    }
}

/* Container pour Compétences Scolaires */
#school-skills-section {
    margin: 30px auto; /* Centrage vertical et horizontal */
    padding: 15px 20px; /* Réduction du padding */
    background: #1E2D3D; /* Fond discret */
    border-radius: 10px; /* Coins arrondis */
    max-width: 70%; /* Ajuste la largeur pour laisser de la marge des deux côtés */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
}


#school-skills-title {
    font-size: 2rem;
    font-weight: bold;
    color: #FFD700;
    margin-bottom: 10px;
}

#school-certification-hint {
    font-style: italic;
    color: #B0B0B0;
    margin-bottom: 20px;
}

/* Grille des tuiles */
#school-skills-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px; /* Espacement réduit entre les tuiles */
}

/* Styles pour les tuiles */
.school-card {
    background: linear-gradient(145deg, #1E2D3D, #161E2A);
    border: none; /* Suppression de la bordure jaune */
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 300px;
    padding: 15px; /* Réduction du padding intérieur */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.school-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

/* En-tête de chaque tuile */
.school-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.school-card-header h3 {
    font-size: 1.4rem;
    font-weight: bold;
    color: #FFD700;
}

.school-skill-icon {
    font-size: 2rem;
    color: #FFD700;
}

/* Liens */
.school-certification-links {
    margin-top: 10px;
}

.school-certification-link {
    display: inline-block;
    background-color: #FFD700;
    color: #1E2D3D;
    text-decoration: none;
    padding: 8px 12px;
    margin: 5px;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.school-certification-link:hover {
    background-color: #FFFFFF;
    color: #1E2D3D;
}

/* Espacement des tags colorés */
.language {
    display: inline-block; /* Alignement en ligne */
    font-weight: bold;
    padding: 3px 6px; /* Réduction du padding */
    border-radius: 5px;
    margin: 2px 3px; /* Réduction de la marge entre les tags */
    font-size: 0.9rem; /* Taille de texte compacte */
}

/* Couleurs pour chaque catégorie */
.language.orange { /* Backend */
    background-color: #E67E22; /* Orange */
    color: #FFFFFF;
}

.language.blue { /* Frontend */
    background-color: #3498DB; /* Bleu */
    color: #FFFFFF;
}

.language.green { /* Réseaux */
    background-color: #27AE60; /* Vert */
    color: #FFFFFF;
}

.language.purple { /* Cybersécurité */
    background-color: #9B59B6; /* Violet */
    color: #FFFFFF;
}

/* Espacement pour chaque description */
.school-card p {
    line-height: 1.4; /* Réduction de l'espacement vertical */
    margin-top: 8px; /* Légère marge pour aérer */
}


/* Header Navigation Mobile */
.nav-bar-mobile {
    display: none; /* Caché par défaut */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Fond sombre */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none; /* Désactive les clics */
    transition: opacity 0.3s ease-in-out;
    z-index: 1000;
}
.nav-bar-mobile.active {
    opacity: 1;
    pointer-events: auto;
}

.nav-bar-mobile ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 0;
    padding: 0;
    text-align: center;
}

.nav-bar-mobile a {
    font-size: 1.5rem;
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-bar-mobile a:hover {
    color: #FFD700;
}

/* Menu Toggle Button */
.menu-toggle {
    display: none; /* Caché par défaut */
    flex-direction: column;
    justify-content: space-around;
    height: 25px;
    width: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.menu-bar {
    width: 100%;
    height: 3px;
    background-color: #ffffff;
    border-radius: 5px;
    transition: all 0.3s ease;
}

/* Close Button */
.close-menu {
    display: none; /* Masqué par défaut */
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    color: #ffffff;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001; /* Toujours visible au-dessus de l'overlay */
}

.close-menu:hover {
    color: #FFD700;
}
/* Responsive Design */

@media (max-width: 768px) {
    body.no-scroll {
        overflow: hidden; /* Empêche le défilement */
    }

    .nav-bar {
        display: none;
    }

    /* Affiche le menu mobile */
    .nav-bar-mobile {
        display: flex;
    }

    /* Affiche le bouton toggle */
    .menu-toggle {
        display: flex;
    }

    /* Affiche le bouton close */
    .close-menu {
        display: block;
    }

    .pyramid {
        margin-top: 5%; /* Réduit la hauteur de la pyramide */
        gap: 15px; /* Espacement réduit pour optimiser l'espace */
    }

    .pyramid-row {
        gap: 10px; /* Espacement entre les cartes dans chaque rangée */
        justify-content: center; /* Centre les éléments dans la rangée */
    }



    .skill-card {
        width: 140px; /* Réduction de la largeur pour s'adapter aux petits écrans */
        padding: 10px; /* Réduction du padding interne */
    }

    .skill-card h3 {
        font-size: 1.1rem; /* Réduction de la taille des titres */
    }

    .skill-card p {
        font-size: 0.9rem; /* Réduction de la taille du texte descriptif */
        word-wrap: break-word; /* Assure que le texte reste dans le conteneur */
        line-height: 1.4; /* Réduction de l'espacement entre les lignes */
    }
}

/* Responsivité pour petits smartphones (max 480px) */
@media (max-width: 480px) {
    .nav-bar {
        display: none;
    }

    /* Affiche le menu mobile */
    .nav-bar-mobile {
        display: flex;
    }

    /* Affiche le bouton toggle */
    .menu-toggle {
        display: flex;
    }

    /* Affiche le bouton close */
    .close-menu {
        display: block;
    }


    .pyramid {
        margin-top: 10%; /* Ajustement supplémentaire pour petits écrans */
        gap: 10px; /* Réduction de l'espacement entre les rangées */
    }

    .pyramid-row {
        justify-content: center; /* Centre les cartes dans chaque rangée */
    }

    .skill-card {
        width: 120px; /* Réduction supplémentaire pour les très petits écrans */
        padding: 8px; /* Compactage des marges internes */
    }

    .skill-card h3 {
        font-size: 1rem; /* Taille ajustée pour le titre */
    }

    .skill-card p {
        font-size: 0.8rem; /* Réduction de la taille du texte descriptif */
    }
}
