/* ==========================================================================
   Thème BreckerFabrik - Bleu / Blanc
   ========================================================================== */

:root {
    --bf-dark: #081222;
    --bf-surface: rgba(255,255,255,0.08);
    --bf-surface-strong: rgba(255,255,255,0.14);
    --bf-white: #eff6ff;
    --bf-muted: #cbd5e1;
    --bf-primary: #0ea5e9;
    --bf-primary-dark: #0284c7;
    --bf-accent: #38bdf8;
    --bf-border: rgba(255,255,255,0.12);
}

/* 1. Glassmorphism sur la barre latérale */
.bg-gradient-primary {
    background: linear-gradient(135deg, rgba(8, 18, 34, 0.98) 0%, rgba(5, 15, 35, 0.98) 100%) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar {
    background: linear-gradient(180deg, rgba(8, 18, 34, 0.98), rgba(4, 12, 27, 0.98));
}

.sidebar .nav-link {
    color: rgba(255,255,255,0.88);
    transition: background 0.2s ease, color 0.2s ease;
}

.sidebar .nav-link:hover,
.sidebar .nav-item.active .nav-link {
    background: rgba(56, 189, 248, 0.12);
    color: #fff;
}

.sidebar .nav-link i {
    color: var(--bf-accent);
}

/* 2. Effets de survol (Hover Elevate) sur les cartes */
.hover-elevate {
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.hover-elevate:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.14) !important;
}

/* 3. Animations d'entrée fluides (Fade In Up) */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 20px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.animate-fade-in-up {
    animation-name: fadeInUp;
    animation-duration: 0.6s;
    animation-fill-mode: both;
    animation-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 4. Effets sur les tableaux */
.table-hover tbody tr:hover {
    background-color: rgba(56, 189, 248, 0.08) !important;
    transform: scale(1.002);
    box-shadow: inset 3px 0 0 var(--bf-primary);
}

/* 5. Effet pulse doux sur les badges "Stock Critique" */
@keyframes softPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.35); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(14, 165, 233, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(14, 165, 233, 0); }
}

.badge-pulse-danger {
    animation: softPulse 2s infinite;
}

/* 6. Transitions des modales (Zoom In) */
.modal.fade .modal-dialog {
    transform: scale(0.95);
    transition: transform 0.3s ease-out;
}
.modal.show .modal-dialog {
    transform: scale(1);
}

/* Boutons plus vivants */
.btn {
    transition: all 0.2s ease;
}
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.btn:active {
    transform: translateY(1px);
    box-shadow: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--bf-primary), var(--bf-accent));
    border: none;
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #0b86b9, #22d3ee);
}

.btn-outline-light {
    color: var(--bf-white);
    border-color: rgba(255,255,255,0.28);
}

.btn-outline-light:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.4);
    color: #fff;
}

body {
    background: linear-gradient(180deg, #f8fbff 0%, #e6f2ff 42%, #dbe8f7 100%);
    color: #0f172a !important;
}

html, body, .main-content, .container-fluid, .card, .bg-white, .card-header, .modal-content, .table, .table-responsive {
    color: #0f172a !important;
}

.card,
.hero-card,
.feature-card,
.login-card,
.modal-content,
.table-responsive,
.card-header,
.table,
.table th,
.table td,
.table-responsive .table {
    border-color: rgba(14,165,233,0.12) !important;
    background-color: rgba(255,255,255,0.96) !important;
}

.sidebar {
    background: linear-gradient(180deg, rgba(8, 18, 34, 0.96), rgba(5, 15, 35, 0.96)) !important;
}

.bg-white {
    background-color: #ffffff !important;
}

.card-header.bg-white,
.table thead.table-light th,
.table thead.table-light td,
.table tbody tr {
    background-color: #f8fbff !important;
}

.table-light th,
.table-light td {
    color: #475569 !important;
}

.text-gray-800 {
    color: #0f172a !important;
}

.text-muted,
.small,
.text-secondary {
    color: #64748b !important;
}

.text-primary {
    color: var(--bf-primary) !important;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    white-space: normal;
    word-break: break-word;
}

.table-responsive table {
    width: 100%;
    table-layout: fixed;
    min-width: 0;
}

th, td {
    white-space: normal !important;
    word-break: break-word;
}

.table-responsive th,
.table-responsive td {
    min-width: 0;
}

@media (max-width: 992px) {
    .table-responsive {
        margin-bottom: 1rem;
    }
    .table-responsive th,
    .table-responsive td {
        padding: 0.75rem 0.6rem;
        font-size: 0.92rem;
    }
}

@media (max-width: 992px) {
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        min-height: auto;
    }

    .main-content {
        margin-left: 0 !important;
    }

    .sidebar .nav-links li a {
        white-space: normal;
        padding: 0.85rem 1rem;
    }
}

/* 2. Effets de survol (Hover Elevate) sur les cartes */
.hover-elevate {
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.hover-elevate:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

/* 3. Animations d'entrée fluides (Fade In Up) */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 20px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.animate-fade-in-up {
    animation-name: fadeInUp;
    animation-duration: 0.6s;
    animation-fill-mode: both;
    animation-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Décalage des animations pour un effet cascade */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* 4. Effets sur les tableaux */
.table-hover tbody tr {
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.table-hover tbody tr:hover {
    background-color: rgba(78, 115, 223, 0.05) !important;
    transform: scale(1.002);
    box-shadow: inset 3px 0 0 #4e73df;
}

/* 5. Effet pulse doux sur les badges "Stock Critique" */
@keyframes softPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(231, 74, 59, 0.4); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(231, 74, 59, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(231, 74, 59, 0); }
}

.badge-pulse-danger {
    animation: softPulse 2s infinite;
}

/* 6. Transitions des modales (Zoom In) */
.modal.fade .modal-dialog {
    transform: scale(0.95);
    transition: transform 0.3s ease-out;
}
.modal.show .modal-dialog {
    transform: scale(1);
}

/* Boutons plus vivants */
.btn {
    transition: all 0.2s ease;
}
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.btn:active {
    transform: translateY(1px);
    box-shadow: none;
}
