/* Section Formation & Expérience */
.experience-section {
    padding: 100px 0;
    background: white;
}

.timeline-header h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-color);
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
}

.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 2.5rem;
}

.timeline-dot {
    position: absolute;
    left: 11px;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gradient-1);
    border: 4px solid white;
    box-shadow: 0 0 0 3px var(--primary-color);
    z-index: 2;
}

.timeline-dot.pro {
    background: var(--gradient-2);
    box-shadow: 0 0 0 3px #f5576c;
}

.timeline-content {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    border: 2px solid var(--light-color);
    overflow: hidden;
}

.timeline-card-bg {
    /* Le style JS gère le reste, mais on force le z-index */
    z-index: 0;
}
}

.timeline-content::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 20px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 12px 12px 12px 0;
    border-color: transparent white transparent transparent;
    filter: drop-shadow(-2px 0 3px rgba(0, 0, 0, 0.05));
}

.timeline-content:hover {
    transform: translateX(10px);
    box-shadow: 0 20px 50px rgba(108, 92, 231, 0.2);
    border-color: var(--primary-color);
}

.timeline-date {
    display: inline-block;
    background: var(--gradient-1);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.timeline-content h4 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.timeline-content .institution {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.8rem;
}

.timeline-content .description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.timeline-tags .badge {
    padding: 5px 12px;
    font-weight: 500;
    font-size: 0.85rem;
}

.achievement-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0 0;
}

.achievement-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 0.5rem;
    color: #666;
}

.achievement-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Certifications */
.certification-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    border: 2px solid var(--light-color);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

/* GIF overlay - caché par défaut */
.cert-gif-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(102, 126, 234, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 5;
    border-radius: 20px;
    pointer-events: none;
}

/* GIF image */
.cert-gif {
    max-width: 70%;
    max-height: 60%;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    transition: transform 0.4s ease;
    margin-bottom: 60px;
}

/* Afficher le GIF au survol */
.certification-card:hover .cert-gif-overlay {
    opacity: 1;
    visibility: visible;
}

.certification-card:hover .cert-gif {
    transform: scale(1);
}

/* S'assurer que le bouton reste visible et accessible */
.btn-cert {
    position: relative;
    z-index: 10;
}

.certification-card:hover {
    transform: translateY(-15px) scale(1.05);
    border-color: var(--primary-color);
    box-shadow: 0 20px 50px rgba(108, 92, 231, 0.25);
}

.certification-card i {
    font-size: 3rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.certification-card h5 {
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.certification-card p {
    color: #666;
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
}

/* Bouton Voir pour les certifications */
.btn-cert {
    background: var(--gradient-1);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin-top: auto;
}

.btn-cert:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(108, 92, 231, 0.4);
    color: white;
}

.btn-cert i {
    font-size: 0.9rem;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    -webkit-text-fill-color: white;
    margin-bottom: 0;
}

/* Bouton Voir Plus pour toutes les certifications */
.btn-see-more {
    display: inline-flex;
    align-items: center;
    background: var(--gradient-1);
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 20px rgba(108, 92, 231, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-see-more::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-see-more:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 35px rgba(108, 92, 231, 0.5);
    color: white;
}

.btn-see-more:hover::before {
    left: 100%;
}

.btn-see-more i {
    transition: transform 0.3s ease;
}

.btn-see-more:hover i {
    transform: translateX(5px);
}

/* Responsive Mobile - Certifications */
@media (max-width: 768px) {
    /* Améliorer les espacements des cartes de certification sur mobile */
    .certification-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    /* Désactiver les GIFs sur mobile pour de meilleures performances */
    .cert-gif-overlay {
        display: none !important;
    }
    
    /* Optimiser l'icône */
    .certification-card i {
        font-size: 2.5rem;
        margin-bottom: 0.75rem;
    }
    
    /* Optimiser le titre */
    .certification-card h5 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    /* Optimiser le texte */
    .certification-card p {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }
    
    /* Bouton Voir - bien intégré dans l'encadré - RÉDUIT */
    .btn-cert {
        width: auto;
        text-align: center;
        padding: 6px 16px;
        margin-top: 0.5rem;
        font-size: 0.8rem;
    }
    
    /* Réduire l'icône dans le bouton sur mobile */
    .btn-cert i {
        font-size: 0.75rem;
    }
    
    /* Cacher les certifications 3 et 4 sur mobile (index seulement) */
    .col-md-3.mb-3.reveal:nth-child(n+5) {
        display: none !important;
    }
    
    /* Espacement entre les colonnes de certifications */
    .col-md-3.mb-3 {
        margin-bottom: 1.5rem !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    /* Ajuster le conteneur parent */
    .row.mt-5 {
        margin-top: 2rem !important;
    }
    
    /* Espacer le bouton "Voir toutes les certifications" */
    .row.mt-4 {
        margin-top: 2rem !important;
    }
}

