/* styles-competences.css */

/* Header de page */
.page-header {
    position: relative;
    padding: 120px 0 60px;
    background: linear-gradient(135deg, var(--rouge-principal), var(--rouge-fonce));
    overflow: hidden;
    margin-top: 70px;
}

.header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(255,255,255,.1) 35px, rgba(255,255,255,.1) 70px);
    animation: slide 20s linear infinite;
}

@keyframes slide {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(100px);
    }
}

.page-title {
    color: var(--blanc);
    font-size: 3rem;
    margin-bottom: 1rem;
    text-align: center;
    animation: fadeInUp 0.8s ease;
}

.page-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    text-align: center;
    animation: fadeInUp 0.8s ease 0.2s both;
}

/* Section des compétences */
.competences-section {
    padding: 80px 0;
    position: relative;
    background: linear-gradient(180deg, var(--blanc), var(--gris-clair), var(--blanc));
}

.competence-group {
    margin-bottom: 80px;
}

.group-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    color: var(--rouge-principal);
    font-weight: 600;
}

.group-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--rouge-principal), transparent);
}

/* Grille de cartes */
.competence-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.competence-card {
    background: var(--blanc);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    animation: fadeInUp 0.6s ease both;
}

.competence-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--rouge-principal), var(--rouge-clair));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.competence-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(220, 20, 60, 0.15);
}

.competence-card:hover::before {
    transform: scaleX(1);
}

/* Icônes des cartes */
.card-icon {
    margin-bottom: 20px;
}

.icon-wrapper {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--rouge-principal), var(--rouge-gradient-2));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--blanc);
    box-shadow: 0 4px 15px rgba(220, 20, 60, 0.3);
    transition: var(--transition);
}

.competence-card:hover .icon-wrapper {
    transform: rotate(360deg) scale(1.1);
}

.competence-card h3 {
    font-size: 1.3rem;
    color: var(--rouge-fonce);
    margin-bottom: 20px;
    font-weight: 600;
}

/* Liste des compétences */
.competence-list {
    list-style: none;
}

.competence-list li {
    padding: 8px 0;
    color: var(--gris);
    position: relative;
    padding-left: 25px;
    transition: var(--transition);
}

.competence-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--rouge-principal);
    font-weight: 700;
    transition: var(--transition);
}

.competence-list li:hover {
    color: var(--noir);
    padding-left: 30px;
}

.competence-list li:hover::before {
    transform: scale(1.3);
}

/* Bulles flottantes */
.floating-bubbles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.bubble {
    position: absolute;
    background: var(--blanc);
    border-radius: 50%;
    opacity: 0;
    box-shadow: 0 5px 20px rgba(220, 20, 60, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: floatBubble 15s infinite;
    pointer-events: all;
    cursor: pointer;
    transition: var(--transition);
}

.bubble:hover {
    transform: scale(1.2);
    box-shadow: 0 8px 30px rgba(220, 20, 60, 0.3);
}

.bubble img {
    width: 60%;
    height: 60%;
    object-fit: contain;
}

/* Positions et tailles des bulles */
.bubble-1 {
    width: 80px;
    height: 80px;
    left: 5%;
    animation-delay: 0s;
}

.bubble-2 {
    width: 100px;
    height: 100px;
    left: 15%;
    animation-delay: 2s;
}

.bubble-3 {
    width: 90px;
    height: 90px;
    left: 85%;
    animation-delay: 4s;
}

.bubble-4 {
    width: 110px;
    height: 110px;
    left: 90%;
    animation-delay: 6s;
}

.bubble-5 {
    width: 85px;
    height: 85px;
    left: 10%;
    animation-delay: 8s;
}

.bubble-6 {
    width: 95px;
    height: 95px;
    left: 80%;
    animation-delay: 10s;
}

.bubble-7 {
    width: 105px;
    height: 105px;
    left: 75%;
    animation-delay: 12s;
}

.bubble-8 {
    width: 88px;
    height: 88px;
    left: 95%;
    animation-delay: 14s;
}
.bubble-9 {
    width: 88px;
    height: 88px;
    left: 79%;
    animation-delay: 16s;
}

@keyframes floatBubble {
    0% {
        opacity: 0;
        transform: translateY(100vh) rotate(0deg);
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        opacity: 0;
        transform: translateY(-100vh) rotate(360deg);
    }
}

/* Animation d'apparition décalée pour les cartes */
.competence-card:nth-child(1) { animation-delay: 0.1s; }
.competence-card:nth-child(2) { animation-delay: 0.2s; }
.competence-card:nth-child(3) { animation-delay: 0.3s; }
.competence-card:nth-child(4) { animation-delay: 0.4s; }
.competence-card:nth-child(5) { animation-delay: 0.5s; }
.competence-card:nth-child(6) { animation-delay: 0.6s; }
.competence-card:nth-child(7) { animation-delay: 0.7s; }
.competence-card:nth-child(8) { animation-delay: 0.8s; }
.competence-card:nth-child(9) { animation-delay: 0.9s; }

/* Responsive */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }
    
    .competence-cards {
        grid-template-columns: 1fr;
    }
    
    .bubble {
        display: none;
    }
    
    .group-title {
        font-size: 1.5rem;
    }
}