﻿/* ============================================================
   ENHANCED PROFILE STYLES - Titre et Onglets Modernes
   ============================================================ */

/* MODERN PAGE TITLE STYLES */
.modern-pagetitle {
    margin-bottom: 20px;
    padding: 0;
    background: linear-gradient(135deg, #3a5fcc 0%, #5447a8 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(84, 71, 168, 0.15);
    overflow: hidden;
    position: relative;
}

    .modern-pagetitle::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 100%);
        pointer-events: none;
    }

.modern-title {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    margin: 0 !important;
    padding: 20px 25px 15px 25px;
    position: relative;
    z-index: 2;
}

.title-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: 10px;
}

.title-icon {
    font-size: 28px;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.page-title-text {
    color:white;
    font-weight: 700;
    letter-spacing: -0.02em;
    font-size: 17px;
}

/* Breadcrumb dans le titre moderne */
.modern-pagetitle .breadcrumb {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 0;
    margin: 0;
    padding: 12px 25px 20px 25px;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 2;
}

    .modern-pagetitle .breadcrumb .breadcrumb-item {
        color: rgba(255, 255, 255, 0.8);
        font-weight: 500;
        font-size: 14px;
    }

        .modern-pagetitle .breadcrumb .breadcrumb-item a {
            color: rgba(255, 255, 255, 0.9);
            text-decoration: none;
            transition: color 0.2s ease;
        }

            .modern-pagetitle .breadcrumb .breadcrumb-item a:hover {
                color: #ffffff;
            }

        .modern-pagetitle .breadcrumb .breadcrumb-item.active {
            color: #ffffff;
            font-weight: 600;
        }

        .modern-pagetitle .breadcrumb .breadcrumb-item::before {
            color: rgba(255, 255, 255, 0.6);
        }

/* ENHANCED TAB STYLES */
.nav-tabs-bordered {
    border-bottom: 2px solid #e8ecef;
    background: #ffffff;
    border-radius: 12px 12px 0 0;
    padding: 8px 8px 0 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 0;
    display: flex;
    flex-wrap: wrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
}

    .nav-tabs-bordered .nav-item {
        flex: 0 1 auto;
        margin-right: 4px;
        min-width: 0;
    }

    .nav-tabs-bordered .nav-link {
        border: none !important;
        border-radius: 8px 8px 0 0;
        color: #6c757d;
        font-weight: 600;
        font-size: 14px;
        padding: 14px 20px;
        margin: 0;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        background: transparent;
        position: relative;
        overflow: hidden;
        text-align: center;
        white-space: nowrap;
        text-overflow: ellipsis;
        min-height: 54px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

        .nav-tabs-bordered .nav-link::before {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(135deg, #3a5fcc 0%, #5447a8 100%);
            transform: scaleX(0);
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .nav-tabs-bordered .nav-link:hover {
            color: #3a5fcc;
            background: rgba(58, 95, 204, 0.05);
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(58, 95, 204, 0.15);
        }

            .nav-tabs-bordered .nav-link:hover::before {
                transform: scaleX(0.5);
            }

        .nav-tabs-bordered .nav-link.active {
            background: linear-gradient(135deg, rgba(58, 95, 204, 0.08) 0%, rgba(84, 71, 168, 0.08) 100%);
            color: #3a5fcc !important;
            font-weight: 700;
            box-shadow: 0 4px 12px rgba(58, 95, 204, 0.12);
            transform: translateY(-3px);
        }

            .nav-tabs-bordered .nav-link.active::before {
                transform: scaleX(1);
            }

/* Tab content container enhancement */
.tab-content {
    background: #ffffff;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    min-height: 400px;
}

.tab-pane {
    padding: 30px;
    animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RESPONSIVE DESIGN */
@media (max-width: 1200px) {
    .nav-tabs-bordered .nav-link {
        padding: 14px 16px;
        font-size: 13px;
        min-height: 52px;
    }

    .modern-title {
        font-size: 22px !important;
        padding: 18px 20px 12px 20px;
    }

    .title-icon {
        font-size: 24px;
    }
}

@media (max-width: 992px) {
    .nav-tabs-bordered {
        padding: 6px 6px 0 6px;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-around;
    }

        .nav-tabs-bordered .nav-item {
            flex: 0 0 calc(25% - 6px);
            min-width: 0;
            margin-bottom: 6px;
        }

        .nav-tabs-bordered .nav-link {
            margin: 0 2px;
            padding: 12px 8px;
            font-size: 12px;
            min-height: 48px;
            border-radius: 6px;
        }

    .modern-title {
        font-size: 20px !important;
        padding: 16px 18px 10px 18px;
    }

    .title-icon {
        font-size: 22px;
    }

    .modern-pagetitle .breadcrumb {
        padding: 10px 18px 16px 18px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .nav-tabs-bordered {
        flex-wrap: wrap;
        justify-content: space-between;
        max-height: none;
        padding: 6px;
    }

        .nav-tabs-bordered .nav-item {
            flex: 0 0 calc(25% - 4px);
            min-width: 0;
            margin-right: 0;
            margin-bottom: 6px;
        }

        .nav-tabs-bordered .nav-link {
            padding: 10px 4px;
            font-size: 11px;
            min-height: 42px;
            text-align: center;
            justify-content: center;
        }

    .modern-title {
        font-size: 18px !important;
        padding: 14px 16px 8px 16px;
    }

    .title-wrapper {
        gap: 8px;
    }

    .title-icon {
        font-size: 20px;
    }

    .tab-pane {
        padding: 20px 15px;
    }
}

@media (max-width: 576px) {
    .nav-tabs-bordered {
        flex-wrap: wrap;
        justify-content: space-between;
        max-height: none;
        padding: 6px;
    }

        .nav-tabs-bordered .nav-item {
            flex: 0 0 calc(33.333% - 4px);
            min-width: 0;
            margin-right: 0;
            margin-bottom: 6px;
        }

        .nav-tabs-bordered .nav-link {
            padding: 8px 4px;
            margin: 0;
            text-align: center;
            justify-content: center;
            font-size: 10px;
            min-height: 38px;
            white-space: normal;
        }

    .modern-pagetitle {
        margin-bottom: 16px;
        background: linear-gradient(135deg, #3a5fcc 0%, #5447a8 100%);
    }

    .modern-title {
        font-size: 16px !important;
        padding: 12px 14px 6px 14px;
    }

    .modern-pagetitle .breadcrumb {
        padding: 8px 14px 12px 14px;
        font-size: 12px;
    }

    .tab-pane {
        padding: 15px 12px;
    }
}

/* Loading spinner enhancement */
.spinner-border {
    width: 2rem;
    height: 2rem;
    border-width: 0.25em;
    border-color: #3a5fcc;
    border-right-color: transparent;
}

/* Hover effects and micro-interactions */
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced focus states for accessibility */
.nav-tabs-bordered .nav-link:focus {
    outline: 2px solid #3a5fcc;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(58, 95, 204, 0.15);
}

/* Smooth scrolling for tab navigation */
.nav-tabs-bordered {
    scroll-behavior: smooth;
}

/* Custom scrollbar for tab navigation */
.nav-tabs-bordered::-webkit-scrollbar {
    height: 4px;
}

.nav-tabs-bordered::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 2px;
}

.nav-tabs-bordered::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3a5fcc 0%, #5447a8 100%);
    border-radius: 2px;
}

.nav-tabs-bordered::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #34569b 0%, #473c90 100%);
}




    /* Modification des onglets pour supprimer le cadre bleu */
    .nav-tabs-bordered .nav-link.active {
        background: transparent !important; /* Supprime le fond bleu */
        color: #3a5fcc !important;
        font-weight: 700;
        box-shadow: none !important; /* Supprime l'ombre */
        transform: translateY(0) !important; /* Supprime le décalage vers le haut */
    }

        /* Conserve uniquement le trait en dessous */
        .nav-tabs-bordered .nav-link.active::before {
            transform: scaleX(1);
            height: 3px;
            background: linear-gradient(135deg, #3a5fcc 0%, #5447a8 100%);
        }

    /* Style au survol modifié pour être cohérent */
    .nav-tabs-bordered .nav-link:hover {
        color: #3a5fcc;
        background: transparent !important; /* Supprime le fond au survol également */
        transform: translateY(0) !important; /* Supprime le décalage au survol */
        box-shadow: none !important; /* Supprime l'ombre au survol */
    }

    /* Style de focus modifié */
    .nav-tabs-bordered .nav-link:focus {
        outline: none !important;
        box-shadow: none !important;
    }

    /* Optionnel: ajuster légèrement l'apparence pour compensar la perte du fond */
    .nav-tabs-bordered .nav-link {
        font-weight: 500;
        transition: color 0.3s ease;
    }

        .nav-tabs-bordered .nav-link.active {
            font-weight: 700;
        }

/* ======= AMÉLIORATION RESPONSIVE DES ONGLETS ======= */
/* Assurer que les onglets s'adaptent bien en responsive */
.nav-tabs-bordered {
    display: flex;
    flex-wrap: wrap;
}

    .nav-tabs-bordered .nav-item {
        flex: 0 0 auto; /* Empêche le rétrécissement excessif */
        margin-bottom: 5px;
    }

    .nav-tabs-bordered .nav-link {
        white-space: nowrap; /* Empêche le texte de se retourner à la ligne */
        overflow: hidden;
        text-overflow: ellipsis; /* Ajoute des points de suspension si nécessaire */
        min-width: 100px; /* Largeur minimale pour chaque onglet */
        padding: 8px 12px; /* Ajustement du padding pour donner plus d'espace */
        text-align: center;
    }

/* Ajustements responsives pour différentes tailles d'écran */
@media (max-width: 768px) {
    .nav-tabs-bordered .nav-link {
        min-width: 90px; /* Légèrement plus petit sur tablette */
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    /* Sur mobile, permettre aux onglets de prendre toute la largeur disponible */
    .nav-tabs-bordered {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }

        .nav-tabs-bordered .nav-item {
            flex: 0 0 48%; /* Deux onglets par ligne sur très petits écrans */
            margin: 0 0 6px 0;
        }

        .nav-tabs-bordered .nav-link {
            min-width: 0; /* Supprimer la largeur minimale */
            width: 100%; /* Prendre toute la largeur disponible */
            padding: 8px 5px;
            font-size: 12px;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 35px; /* Hauteur fixe pour uniformité */
            white-space: normal; /* Permettre le retour à la ligne */
        }
}

/* Spécifiquement pour les textes longs comme "Tableau de bord" */
@media (max-width: 576px) {
    .nav-tabs-bordered .nav-link {
        line-height: 1.2; /* Espacement des lignes réduit */
        height: auto; /* Hauteur automatique pour s'adapter au contenu */
        min-height: 35px; /* Hauteur minimale */
        padding-top: 6px;
        padding-bottom: 6px;
    }
}