.skills-section {
    padding: 2rem;
    margin: 2rem auto;
    max-width: 1200px;
    text-align: center;
}

.skills-section h3 {
    text-align: center;
    margin-bottom: 2rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.skills-category {
    background: url("banniere-legende.png"), rgba(248, 243, 233, 0.92);
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
    border-radius: 10px;
    padding: 1.5rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    transition: transform 0.3s ease;
}

/* Style spécial pour la section AI & No/Low Code avec contour arc-en-ciel macaron */
.skills-category:has(h4:contains("AI & No/Low Code")),
.skills-category:nth-child(4) {
    background: url("banniere-legende.png"), rgba(248, 243, 233, 0.92);
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
    border: 6px solid transparent;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(255, 182, 193, 0.4);
    animation: rainbow-glow 3s ease-in-out infinite alternate;
    position: relative;
    overflow: hidden;
}

.skills-category:nth-child(4)::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    background: linear-gradient(45deg, 
        #FFB6C1, #FFDAB9, #FFFACD, #98FB98, #87CEEB, #DDA0DD, #FFB6C1
    );
    background-size: 300% 300%;
    border-radius: 16px;
    z-index: -1;
    animation: rainbow-border 4s linear infinite;
}

@keyframes rainbow-glow {
    0% { box-shadow: 0 8px 25px rgba(255, 182, 193, 0.4); }
    25% { box-shadow: 0 8px 30px rgba(255, 255, 186, 0.5); }
    50% { box-shadow: 0 8px 30px rgba(186, 255, 201, 0.5); }
    75% { box-shadow: 0 8px 30px rgba(186, 225, 255, 0.5); }
    100% { box-shadow: 0 8px 25px rgba(221, 160, 221, 0.4); }
}

@keyframes rainbow-border {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.skills-category:nth-child(4) h4 {
    background: linear-gradient(45deg, #FF69B4, #FFD700, #32CD32, #00BFFF, #9370DB);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    animation: rainbow-text 2s ease-in-out infinite alternate;
    position: relative;
    z-index: 2;
}

@keyframes rainbow-text {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(20deg); }
}

.skills-category:nth-child(4) .skill-tag {
    background-color: rgb(93, 64, 55);
    border: 2px solid rgba(255, 182, 193, 0.8);
    color: white;
    position: relative;
    overflow: hidden;
    animation: subtle-glow 3s ease-in-out infinite alternate;
}

/* Style spécial pour les jauges de niveau de la section AI & No/Low Code */
.skills-category:nth-child(4) .skill-level {
    background: linear-gradient(90deg, 
        rgba(255, 105, 180, 0.9),    /* Rose foncé */
        rgba(255, 140, 0, 0.9),      /* Orange foncé */
        rgba(218, 165, 32, 0.9),     /* Jaune foncé */
        rgba(34, 139, 34, 0.9),      /* Vert foncé */
        rgba(30, 144, 255, 0.9),     /* Bleu foncé */
        rgba(138, 43, 226, 0.9)      /* Violet foncé */
    );
    background-size: 200% 100%;
    animation: rainbow-fill 4s linear infinite;
}

@keyframes rainbow-fill {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes subtle-glow {
    0% { box-shadow: 0 2px 8px rgba(255, 182, 193, 0.3); }
    50% { box-shadow: 0 2px 12px rgba(186, 225, 255, 0.4); }
    100% { box-shadow: 0 2px 8px rgba(221, 160, 221, 0.3); }
}

.skills-category:nth-child(4) .skill-tag:hover {
    background-color: #A1887E;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 182, 193, 0.6);
    border-color: rgba(186, 225, 255, 0.9);
}

.skills-category:nth-child(4) .skill-tag:hover .skill-level {
    animation-duration: 2s;
}

.skills-category:hover {
    transform: translateY(-5px);
}

.skills-category h4 {
    color: rgb(93, 64, 55);
    font-size: 1.5rem;
    font-family: "Press Start 2P", cursive;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tag {
    background-color: rgb(93, 64, 55);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    width: 200px;
    overflow: visible;
    justify-content: space-between;
}

.skill-tag i {
    position: relative;
    z-index: 3;
}

.skill-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-tag i {
    font-size: 1rem;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
}

@keyframes fadeInIcon {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.skill-level {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    z-index: 1;
}

.skill-name {
    z-index: 2;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-tag i {
    z-index: 2;
    position: relative;
}

.skill-percentage {
    margin-left: auto;
    z-index: 2;
    position: relative;
    opacity: 0.8;
    font-size: 0.9em;
}

.skill-tag:hover {
    background-color: #A1887E;
    transform: scale(1.05);
}

.skill-name {
    z-index: 2;
    flex: 1;
}

.skill-level {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: #A1887E;
    opacity: 1;
    transition: width 0.6s ease;
    z-index: 1;
}

.skill-tag i,
.skill-name,
.skill-percentage {
    z-index: 2;
    position: relative;
}

.skill-percentage {
    margin-left: auto;
    font-size: 0.8em;
    opacity: 0.9;
    z-index: 2;
}

@media (max-width: 768px) {
    .skills-section {
        padding: 1rem;
    }

    .skills-section h3 {
        text-align: center;
        font-size: 24px;
        padding: 0 15px;
        word-wrap: break-word;
        white-space: normal;
        margin: 10px auto;
        max-width: 100%;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .skills-category {
        padding: 1rem;
        transition: transform 0.3s ease;
        cursor: pointer;
    }

    .skills-category .skills-list {
        display: flex;
    }

    .skill-tag {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
        width: 180px;
    }
}