/*============== Details Compétences ====================*/
main {
    padding: 100px 0;
}

html {
    scroll-snap-type: y proximity;
}

.details_competence {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 120px 0;
    background-color: var(--color-bg);
    position: relative;
    z-index: 20;
    overflow: hidden;
    scroll-snap-align: start
}

/* Numéro géant en arrière-plan */
.details_competence::before {
    content: attr(data-num);
    position: absolute;
    right: -2%;
    top: 50%;
    transform: translateY(-50%);
    font-size: clamp(150px, 20vw, 280px);
    font-family: var(--font-title);
    font-weight: 900;
    color: var(--color-primary);
    opacity: 0.03;
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

.details_competence.reverse::before {
    right: auto;
    left: -2%;
}

/* Ligne de séparation stylée */
.details_competence + .details_competence::after {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
    opacity: 0.2;
}

.details_container {
    width: 85%;
    max-width: 1200px;
    position: relative;
}

/* Header */
.details_header {
    margin-bottom: 70px;
    position: relative;
}

.skill_number {
    font-family: var(--font-title);
    font-size: 0.85rem;
    color: var(--color-primary);
    letter-spacing: 4px;
    opacity: 0.7;
    display: block;
    margin-bottom: 8px;
}

.titre_section {
    font-family: var(--font-title);
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    letter-spacing: 6px;
    color: var(--color-text-main);
    margin: 0 0 20px 0;
    position: relative;
    display: inline-block;
}

/* Soulignement animé sur le titre */
.titre_section::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--color-primary);
    border-radius: 2px;
    transition: width 0.4s ease;
}

.details_competence:hover .titre_section::after {
    width: 100%;
}

.description_skill {
    font-family: var(--font-corps);
    color: var(--color-text-main);
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 700px;
    border-left: 3px solid var(--color-primary);
    padding-left: 20px;
    opacity: 0.8;
    margin: 0;
}

/* Grid */
.details_grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 70px;
    align-items: start;
}

.reverse .details_grid {
    grid-template-columns: 0.9fr 1.1fr;
    direction: rtl;
}

.reverse .details_grid > * {
    direction: ltr;
}

/* Titres de colonnes */
.details_info h3,
.details_project h3 {
    font-family: var(--font-title);
    color: var(--color-primary);
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.details_info h3::after,
.details_project h3::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-primary);
    opacity: 0.25;
}

/* Liste acquis */
.acquis_list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.acquis_list li {
    background: var(--color-card);
    padding: 11px 12px;
    border-radius: 16px;
    border: 1px solid rgba(109, 210, 238, 0.08);
    position: relative;
    transition: border-color 0.3s ease, transform 0.3s ease;
    overflow: hidden;
}

.acquis_list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--color-primary);
    border-radius: 2px 0 0 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.acquis_list li:hover {
    border-color: rgba(109, 210, 238, 0.25);
    transform: translateX(6px);
}

.acquis_list li:hover::before {
    opacity: 1;
}

.niveau_badge {
    display: inline-block;
    color: var(--color-primary);
    font-family: var(--font-title);
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: rgba(109, 210, 238, 0.08);
    border: 1px solid rgba(109, 210, 238, 0.2);
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.acquis_list li p {
    margin: 0;
    font-family: var(--font-corps);
    color: var(--color-text-main);
    font-size: 0.95rem;
    line-height: 1.5;
    opacity: 0.85;
}

/* Carte Projet */
.project_card {
    background: var(--color-card);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(109, 210, 238, 0.12);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.project_card:hover {
    transform: translateY(-8px);
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.35), 0 0 40px rgba(109, 210, 238, 0.07);
}

.project_img {
    height: 220px;
    background: #1a1a1a;
    overflow: hidden;
    position: relative;
}

.project_img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.5s ease;
}

.project_card:hover .project_img img {
    transform: scale(1.04);
}

/* Placeholder quand pas d'image */
.placeholder_img {
    display: flex;
    align-items: center;
    justify-content: center;
    background: repeating-linear-gradient(
        45deg,
        #1a1a1a,
        #1a1a1a 10px,
        #1e1e1e 10px,
        #1e1e1e 20px
    );
}

.placeholder_img span {
    font-family: var(--font-corps);
    font-size: 0.8rem;
    color: rgba(109, 210, 238, 0.3);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.project_text {
    padding: 28px;
}

.project_text h4 {
    font-family: var(--font-title);
    font-size: 1.2rem;
    margin: 0 0 12px 0;
    color: var(--color-text-main);
    letter-spacing: 1px;
}

.project_text p {
    font-family: var(--font-corps);
    font-size: 0.88rem;
    color: var(--color-text-main);
    opacity: 0.75;
    line-height: 1.6;
    margin: 0;
}

.tech_tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.tech_tags span {
    padding: 4px 14px;
    background: rgba(109, 210, 238, 0.07);
    border: 1px solid rgba(109, 210, 238, 0.3);
    color: var(--color-primary);
    border-radius: 20px;
    font-size: 0.72rem;
    font-family: var(--font-title);
    letter-spacing: 1px;
    transition: background 0.2s ease;
}

.tech_tags span:hover {
    background: rgba(109, 210, 238, 0.15);
}

/* ---- Bilan de compétence ---- */
.bilan_competence {

    border-top: 1px solid rgba(109, 210, 238, 0.1);
}

.bilan_competence h3 {
    font-family: var(--font-title);
    color: var(--color-primary);
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.bilan_competence h3::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-primary);
    opacity: 0.2;
}

.bilan_grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.bilan_item {
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid transparent;
    position: relative;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.bilan_item:hover {
    transform: translateX(4px);
}

/* Couleurs par type */
.bilan_item.succes {
    background: rgba(34, 197, 94, 0.05);
    border-color: rgba(34, 197, 94, 0.2);
}

.bilan_item.difficulte {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.2);
}

.bilan_item.fait {
    background: rgba(109, 210, 238, 0.05);
    border-color: rgba(109, 210, 238, 0.15);
}

.bilan_item.pas_vu {
    background: rgba(168, 85, 247, 0.05);
    border-color: rgba(168, 85, 247, 0.2);
}

.bilan_label {
    display: block;
    font-family: var(--font-title);
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.bilan_item.succes .bilan_label   { color: rgb(34, 197, 94); }
.bilan_item.difficulte .bilan_label { color: rgb(239, 68, 68); }
.bilan_item.fait .bilan_label     { color: var(--color-primary); }
.bilan_item.pas_vu .bilan_label   { color: rgb(168, 85, 247); }

.bilan_item p {
    margin: 0;
    font-family: var(--font-corps);
    font-size: 0.85rem;
    color: var(--color-text-main);
    opacity: 0.8;
    line-height: 1.5;
}


.bilan_exemples {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 10px;
}

.bilan_exemples li {
    font-family: var(--font-corps);
    font-size: 0.78rem;
    color: var(--color-text-main);
    opacity: 0.6;
    padding-left: 14px;
    position: relative;
    line-height: 1.4;
}

/* La puce reprend la couleur du bloc parent */
.bilan_exemples li::before {
    content: '→';
    position: absolute;
    left: 0;
    font-size: 0.7rem;
}

.succes .bilan_exemples li::before   { color: rgb(34, 197, 94); }
.difficulte .bilan_exemples li::before { color: rgb(239, 68, 68); }
.fait .bilan_exemples li::before     { color: var(--color-primary); }
.pas_vu .bilan_exemples li::before   { color: rgb(168, 85, 247); }


/* ---- Accordéon Bilan ---- */
.bilan_toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 16px 20px;
    background: rgba(109, 210, 238, 0.05);
    border: 1px solid rgba(109, 210, 238, 0.15);
    border-radius: 14px;
    margin-top: 30px;
    transition: background 0.3s ease, border-color 0.3s ease;
    user-select: none;
}

.bilan_toggle:hover {
    background: rgba(109, 210, 238, 0.1);
    border-color: rgba(109, 210, 238, 0.35);
}

.bilan_toggle span {
    font-family: var(--font-title);
    font-size: 0.78rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--color-primary);
}

.bilan_toggle_icon {
    width: 20px;
    height: 20px;
    position: relative;
    flex-shrink: 0;
    transition: transform 0.4s ease;
}

.bilan_toggle_icon::before,
.bilan_toggle_icon::after {
    content: '';
    position: absolute;
    background: var(--color-primary);
    border-radius: 2px;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

/* Ligne horizontale */
.bilan_toggle_icon::before {
    width: 100%;
    height: 2px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

/* Ligne verticale (le + devient -) */
.bilan_toggle_icon::after {
    width: 2px;
    height: 100%;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
}

/* Quand ouvert : la croix devient un tiret */
.bilan_toggle.open .bilan_toggle_icon::after {
    transform: translateX(-50%) rotate(90deg);
    opacity: 0;
}

/* Contenu accordéon */
.bilan_competence {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.5s cubic-bezier(0.23, 1, 0.32, 1), 
                opacity 0.4s ease,
                margin-top 0.4s ease;
    margin-top: 0;
}

.bilan_competence.open {
    max-height: 1400px;
    opacity: 1;
    margin-top: 16px;
}


/* Responsive */
@media (max-width: 600px) {
    .bilan_grid {
        grid-template-columns: 1fr;
    }
}

/* Responsive */
@media (max-width: 900px) {
    .details_grid,
    .reverse .details_grid {
        grid-template-columns: 1fr;
        direction: ltr;
        gap: 40px;
    }

    .details_competence::before {
        font-size: 30vw;
        opacity: 0.02;
    }
        /* 👇 Force l'ordre : info en premier, projet en second, bilan en dernier */
    .details_info {
        order: 1;
    }

    .details_project {
        order: 2;
    }

    .bilan_toggle {
        order: 3;
    }

    .bilan_competence {
        order: 4;
    }
}

@media (max-width: 600px) {
    .details_competence {
        padding: 80px 0;
    }

    .details_container {
        width: 90%;
    }

    .details_header {
        margin-bottom: 40px;
    }
}
/*============== Fin Details Compétences ====================*/