/* ============================================
   COMPETENCES.CSS — Page Compétences
   À placer dans style/competences.css
   ============================================ */

/* --- LAYOUT PRINCIPAL --- */
.comp-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 100px;
}

/* =========================================
   SECTIONS
   ========================================= */
.comp-section {
    margin-bottom: 80px;
}

/* En-tête de section */
.section-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 35px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.light-mode .section-header {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

.section-icon {
    width: 56px;
    height: 56px;
    min-width: 56px;
    background: rgba(59, 130, 246, 0.12);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.section-desc {
    color: var(--text-sub);
    font-size: 0.95rem;
}

/* =========================================
   GRILLE DE CARTES
   ========================================= */
.comp-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* =========================================
   CARTE COMPÉTENCE
   ========================================= */
.comp-card {
    background: var(--bg-card);
    border-radius: 18px;
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.comp-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px var(--primary-glow);
    border-color: rgba(59, 130, 246, 0.3);
}

/* Carte mise en avant (colonne 1) */
.comp-card--featured {
    border-left: 3px solid var(--primary);
}

/* En-tête de carte */
.comp-card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

/* Le bloc titre + badge : en colonne pour que le badge passe en dessous */
.comp-card-header > div {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.comp-card-header h3 {
    word-break: break-word;
}

/* Icône de la carte */
.comp-logo-wrap {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: rgba(59, 130, 246, 0.12);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--primary);
    transition: background 0.3s ease;
}

.comp-logo-wrap--sm {
    width: 40px;
    height: 40px;
    min-width: 40px;
    font-size: 1.1rem;
    border-radius: 10px;
}

.comp-card:hover .comp-logo-wrap {
    background: rgba(59, 130, 246, 0.22);
}

.comp-card-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 5px;
}

/* =========================================
   NIVEAUX (BADGES)
   ========================================= */
.comp-level {
    display: inline-block;
    width: fit-content;        /* ne prend que la largeur du texte */
    align-self: flex-start;    /* ne s'étire pas dans un parent flex */
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.comp-level--advanced {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e !important;
    border: 1px solid rgba(34, 197, 94, 0.25);
}
.comp-level--intermediate {
    background: rgba(250, 204, 21, 0.12);
    color: #eab308;
    border: 1px solid rgba(250, 204, 21, 0.25);
}
.comp-level--beginner {
    background: rgba(148, 163, 184, 0.12);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

/* =========================================
   DESCRIPTION
   ========================================= */
.comp-desc {
    color: var(--text-sub);
    font-size: 0.9rem;
    line-height: 1.65;
    flex: 1;
}

/* =========================================
   BARRE DE PROGRESSION
   ========================================= */
.comp-bar-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.comp-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 99px;
    overflow: hidden;
}

.light-mode .comp-bar {
    background: rgba(0, 0, 0, 0.08);
}

.comp-bar-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary), #60a5fa);
    border-radius: 99px;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.comp-bar-wrap span {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    min-width: 30px;
}

/* =========================================
   TAGS
   ========================================= */
.comp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.comp-tags span {
    display: inline-block;
    width: fit-content;           /* ne s'étire jamais */
    align-self: flex-start;
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid rgba(59, 130, 246, 0.15);
    transition: background 0.2s ease;
    white-space: nowrap;
}

.comp-card:hover .comp-tags span {
    background: rgba(59, 130, 246, 0.18);
}

/* =========================================
   SOFT SKILLS GRID
   ========================================= */
.soft-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.soft-card {
    background: var(--bg-card);
    border-radius: 18px;
    padding: 28px 22px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: var(--card-shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.soft-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px var(--primary-glow);
}

.soft-card i {
    font-size: 1.8rem;
    color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: background 0.3s ease;
}

.soft-card:hover i {
    background: rgba(59, 130, 246, 0.2);
}

.soft-card h4 {
    font-size: 1rem;
    font-weight: 700;
}

.soft-card p {
    color: var(--text-sub);
    font-size: 0.88rem;
    line-height: 1.6;
}

/* =========================================
   CTA SECTION
   ========================================= */
.comp-cta {
    text-align: center;
    padding: 60px 30px;
    background: var(--bg-card);
    border-radius: 24px;
    border: 1px solid rgba(59, 130, 246, 0.15);
    box-shadow: var(--card-shadow);
    margin-top: 20px;
}

.comp-cta h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.comp-cta p {
    color: var(--text-sub);
    font-size: 1.05rem;
    margin-bottom: 30px;
}

.cta-btns {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.cta-btns .btn-primary,
.cta-btns .btn-secondary {
    width: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 900px) {
    .comp-cards-grid {
        grid-template-columns: 1fr;
    }
    .soft-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .soft-grid {
        grid-template-columns: 1fr;
    }
    .cta-btns {
        flex-direction: column;
        align-items: center;
    }
    .cta-btns .btn-primary,
    .cta-btns .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    .comp-cta {
        padding: 40px 20px;
    }
}
