/* =================================
   Styles personnalisés - BAKAYOKO
   ================================= */

/* Variables de couleurs */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --dark-color: #212529;
    --light-bg: #f8f9fa;
}

/* Styles généraux */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.3rem;
}

.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #fff !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #fff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    background-position: bottom;
}

.hero-image-container {
    position: relative;
    z-index: 1;
}

.hero-image-container img {
    border: 5px solid rgba(255,255,255,0.3);
    transition: transform 0.3s ease;
}

.hero-image-container img:hover {
    transform: scale(1.05);
}

.social-links a {
    transition: transform 0.3s ease, opacity 0.3s ease;
    display: inline-block;
}

.social-links a:hover {
    transform: translateY(-5px);
    opacity: 0.8;
}

/* Section Title */
.section-title {
    font-weight: bold;
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
    margin: 0 auto;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 60%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Cards */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2) !important;
}

/* Timeline */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--primary-color), var(--success-color));
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    width: calc(50% - 30px);
}

.timeline-item:nth-child(odd) {
    margin-left: 0;
    margin-right: auto;
    padding-right: 40px;
}

.timeline-item:nth-child(even) {
    margin-left: auto;
    margin-right: 0;
    padding-left: 40px;
}

.timeline-marker {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 3px solid #fff;
    top: 20px;
    z-index: 2;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.timeline-item:nth-child(odd) .timeline-marker {
    right: -10px;
}

.timeline-item:nth-child(even) .timeline-marker {
    left: -10px;
}

/* Responsive Timeline */
@media (max-width: 768px) {
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 50px !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .timeline-marker {
        left: 11px !important;
        right: auto !important;
    }
}

/* Project Cards */
.project-card {
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.project-card:hover {
    border-left-color: var(--success-color);
    transform: translateX(5px);
}

.project-icon {
    transition: transform 0.3s ease;
}

.project-card:hover .project-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Course Cards */
.course-card {
    border-top: 5px solid var(--primary-color);
}

.course-card:hover {
    border-top-color: var(--success-color);
}

/* Competence Cards */
.competence-card {
    transition: all 0.3s ease;
}

.competence-card:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.competence-icon {
    transition: all 0.3s ease;
}

.competence-card:hover .competence-icon i {
    transform: scale(1.2);
    color: var(--success-color) !important;
}

/* Progress bars */
.progress {
    height: 8px;
    border-radius: 10px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 10px;
    transition: width 1s ease;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.5em 0.8em;
    font-size: 0.85em;
}

/* Contact Info */
.contact-info i {
    vertical-align: top;
}

.contact-info a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: var(--success-color);
    text-decoration: underline;
}

/* Forms */
.form-control, .form-select {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.6rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0a58ca 100%);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0a58ca 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #146c43 100%);
}

.btn-success:hover {
    background: linear-gradient(135deg, #146c43 0%, var(--success-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(25, 135, 84, 0.3);
}

.btn-outline-primary:hover,
.btn-outline-light:hover {
    transform: translateY(-2px);
}

/* Alerts */
.alert {
    border-radius: 10px;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.alert-primary {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.1) 0%, rgba(13, 110, 253, 0.05) 100%);
    border-left: 4px solid var(--primary-color);
}

.alert-success {
    background: linear-gradient(135deg, rgba(25, 135, 84, 0.1) 0%, rgba(25, 135, 84, 0.05) 100%);
    border-left: 4px solid var(--success-color);
}

/* Footer */
footer {
    background: linear-gradient(135deg, #212529 0%, #343a40 100%);
}

footer a {
    text-decoration: none;
    transition: all 0.3s ease;
}

footer a:hover {
    color: var(--primary-color) !important;
    transform: translateX(5px);
}

footer .social-links a:hover {
    transform: translateY(-5px) !important;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scrollbar personnalisé */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-color), var(--success-color));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-section {
        min-height: auto;
        padding: 100px 0 50px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .display-3 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 80px 0 40px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .display-3 {
        font-size: 2rem;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .btn-lg {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--success-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.border-gradient {
    border: 3px solid;
    border-image: linear-gradient(135deg, var(--primary-color), var(--success-color)) 1;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* Pulse Animation for Important Elements */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(13, 110, 253, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Print Styles */
@media print {
    .navbar,
    footer,
    .btn,
    .social-links,
    #contact form {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
    }
    
    .card {
        page-break-inside: avoid;
    }
}


/* ========================================
   STYLES POUR LES SOUS-MENUS DÉROULANTS
   ======================================== */

/* Conteneur du cours parent */
.course-parent {
    transition: all 0.3s ease;
}

/* En-tête du cours (partie cliquable) */
.course-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 8px 0;
    transition: all 0.3s ease;
    user-select: none;
}

.course-header:hover {
    color: #0d6efd;
}

/* Icône de chevron */
.toggle-icon {
    transition: transform 0.3s ease;
    font-size: 14px;
    color: #6c757d;
}

/* Rotation de l'icône quand le menu est ouvert */
.course-parent.active .toggle-icon {
    transform: rotate(180deg);
    color: #0d6efd;
}

/* Sous-menu (caché par défaut) */
.course-submenu {
    list-style: none;
    padding-left: 25px;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
    opacity: 0;
}

/* Sous-menu visible quand actif */
.course-parent.active .course-submenu {
    max-height: 500px;
    opacity: 1;
    margin-top: 10px;
    margin-bottom: 10px;
}

/* Items du sous-menu */
.course-submenu li {
    margin-bottom: 8px;
    padding-left: 0;
}

/* Liens dans le sous-menu */
.course-submenu a {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    color: #495057;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 14px;
    background-color: #f8f9fa;
}

.course-submenu a:hover {
    background-color: #e9ecef;
    color: #0d6efd;
    transform: translateX(5px);
}

.course-submenu a i {
    font-size: 12px;
    color: #6c757d;
}

.course-submenu a:hover i {
    color: #0d6efd;
}

/* Style pour les cours sans sous-menu */
.list-group-item:not(.course-parent) {
    padding: 12px 16px;
}

/* Animation au survol pour tous les items */
.list-group-item {
    transition: background-color 0.2s ease;
}

.list-group-item:hover {
    background-color: #f8f9fa;
}

/* Amélioration de l'apparence générale */
.card-body .list-group-flush {
    margin-left: -20px;
    margin-right: -20px;
}

.card-body .list-group-flush .list-group-item {
    border-left: none;
    border-right: none;
}

/* Bordure gauche colorée au survol */
.list-group-item:hover {
    border-left: 3px solid #0d6efd;
}

/* Style pour le texte du cours parent */
.course-header span {
    flex: 1;
}

/* Responsive - ajustements pour mobile */
@media (max-width: 768px) {
    .course-submenu {
        padding-left: 15px;
    }
    
    .course-submenu a {
        font-size: 13px;
        padding: 6px 10px;
    }
    
    .course-header {
        font-size: 14px;
    }
}

/* Animation d'entrée pour les sous-menus */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.course-parent.active .course-submenu li {
    animation: slideDown 0.3s ease forwards;
}

/* Délai d'animation pour chaque item */
.course-parent.active .course-submenu li:nth-child(1) {
    animation-delay: 0.05s;
}

.course-parent.active .course-submenu li:nth-child(2) {
    animation-delay: 0.1s;
}

.course-parent.active .course-submenu li:nth-child(3) {
    animation-delay: 0.15s;
}

.course-parent.active .course-submenu li:nth-child(4) {
    animation-delay: 0.2s;
}

/* Style pour les icônes des cours */
.list-group-item i.fa-code,
.list-group-item i.fa-database,
.list-group-item i.fa-cloud {
    width: 20px;
    text-align: center;
}

/* Effet de focus pour l'accessibilité */
.course-header:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
    border-radius: 4px;
}