/**
 * SecuCentral Breadcrumb Styles
 * Styles unifies pour le fil d'Ariane
 *
 * @version 1.0.0
 */

/* ========================================
   WRAPPER & CONTAINER
   ======================================== */
.breadcrumb-wrapper {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
}

/* Variante sans fond */
.breadcrumb-wrapper.transparent {
    background: transparent;
    border-bottom: none;
    padding: 0.5rem 0;
}

/* Variante compacte */
.breadcrumb-wrapper.compact {
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
}

/* ========================================
   BREADCRUMB LIST
   ======================================== */
.breadcrumb-wrapper .breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
    flex-wrap: wrap;
}

/* ========================================
   BREADCRUMB ITEMS
   ======================================== */
.breadcrumb-wrapper .breadcrumb-item {
    color: #6c757d;
    display: flex;
    align-items: center;
}

.breadcrumb-wrapper .breadcrumb-item + .breadcrumb-item::before {
    content: "\f105"; /* fa-angle-right */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #adb5bd;
    padding: 0 0.75rem;
    font-size: 0.75rem;
}

/* Liens */
.breadcrumb-wrapper .breadcrumb-item a {
    color: #1e40af;
    text-decoration: none;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
}

.breadcrumb-wrapper .breadcrumb-item a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.breadcrumb-wrapper .breadcrumb-item a:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Element actif */
.breadcrumb-wrapper .breadcrumb-item.active {
    color: #374151;
    font-weight: 500;
}

/* Icones */
.breadcrumb-wrapper .breadcrumb-item i {
    font-size: 0.8rem;
    opacity: 0.8;
}

.breadcrumb-wrapper .breadcrumb-item a i {
    color: inherit;
}

/* ========================================
   DARK MODE
   ======================================== */
[data-theme="dark"] .breadcrumb-wrapper {
    background: linear-gradient(135deg, var(--surface, #1e293b) 0%, var(--bg-primary, #0f172a) 100%);
    border-bottom-color: var(--border-color, #334155);
}

[data-theme="dark"] .breadcrumb-wrapper .breadcrumb-item {
    color: var(--text-muted, #94a3b8);
}

[data-theme="dark"] .breadcrumb-wrapper .breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-muted, #64748b);
}

[data-theme="dark"] .breadcrumb-wrapper .breadcrumb-item a {
    color: #60a5fa;
}

[data-theme="dark"] .breadcrumb-wrapper .breadcrumb-item a:hover {
    color: #93c5fd;
}

[data-theme="dark"] .breadcrumb-wrapper .breadcrumb-item.active {
    color: var(--text-primary, #f1f5f9);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .breadcrumb-wrapper {
        padding: 0.5rem 0.75rem;
        margin-bottom: 1rem;
    }

    .breadcrumb-wrapper .breadcrumb {
        font-size: 0.8rem;
    }

    .breadcrumb-wrapper .breadcrumb-item + .breadcrumb-item::before {
        padding: 0 0.5rem;
    }

    /* Masquer les elements intermediaires sur petits ecrans */
    .breadcrumb-wrapper .breadcrumb-item:not(:first-child):not(:last-child) {
        display: none;
    }

    /* Afficher un indicateur "..." entre premier et dernier */
    .breadcrumb-wrapper .breadcrumb-item:last-child:not(:nth-child(2))::before {
        content: "...";
        font-family: inherit;
        padding: 0 0.5rem;
        color: #adb5bd;
    }
}

@media (max-width: 576px) {
    .breadcrumb-wrapper {
        padding: 0.5rem;
    }

    .breadcrumb-wrapper .breadcrumb {
        font-size: 0.75rem;
    }
}

/* ========================================
   PRINT
   ======================================== */
@media print {
    .breadcrumb-wrapper {
        background: none !important;
        border: none !important;
        padding: 0 !important;
        margin-bottom: 0.5rem !important;
    }

    .breadcrumb-wrapper .breadcrumb-item a {
        color: #000 !important;
        text-decoration: none !important;
    }

    .breadcrumb-wrapper .breadcrumb-item + .breadcrumb-item::before {
        content: " > " !important;
        font-family: inherit !important;
    }
}

/* ========================================
   ACCESSIBILITE
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    .breadcrumb-wrapper .breadcrumb-item a {
        transition: none;
    }
}

@media (prefers-contrast: high) {
    .breadcrumb-wrapper {
        background: #fff;
        border-bottom: 2px solid #000;
    }

    .breadcrumb-wrapper .breadcrumb-item a {
        color: #0000ee;
        text-decoration: underline;
    }

    .breadcrumb-wrapper .breadcrumb-item.active {
        color: #000;
    }
}

/* ========================================
   INTEGRATION AVEC PAGES EXISTANTES
   ======================================== */

/* Retirer les anciens styles breadcrumb inline */
.container > nav[aria-label="breadcrumb"]:first-child,
.container-fluid > nav[aria-label="breadcrumb"]:first-child {
    margin-top: -1rem;
    margin-left: -1rem;
    margin-right: -1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
}

/* Style pour breadcrumbs dans les headers de page */
.page-header .breadcrumb-wrapper {
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 0.5rem;
}

/* Breadcrumb au-dessus du titre de page */
.page-title-wrapper .breadcrumb-wrapper {
    margin-bottom: 0.25rem;
}
