/* Styles personnalisés pour TechPlus - Solution simple pour connexions complexes */

:root {
    --primary-color: #045651; /* TechPlus primary */
    --secondary-color: #045651; /* unified theme */
    --success-color: #16a34a;
    --info-color: #0ea5e9;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-color: #eef6f5; /* very light variant */
    --dark-color: #033f3b; /* darker shade */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-color);
}

/* Navigation */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: none;
}

.navbar-nav .nav-link:hover {
    transform: translateY(-1px);
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    transition: none;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.25rem 2rem 0 rgba(58, 59, 69, 0.2);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    font-weight: 600;
}

/* Boutons */
.btn {
    border-radius: 25px;
    font-weight: 500;
    transition: none;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary { background: var(--primary-color); border: none; }

.btn-primary:hover { background: #033f3b; }

/* Formulaires */
.form-control {
    border-radius: 10px;
    border: 2px solid #e3e6f0;
    transition: none;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(4, 86, 81, 0.25);
}

.form-select {
    border-radius: 10px;
    border: 2px solid #e3e6f0;
}

/* Tables */
.table {
    border-radius: 10px;
    overflow: hidden;
}

.table thead th { background-color: var(--primary-color); color:#fff; border:none; font-weight:600; vertical-align: middle; }

/* Sort controls in table header */
.sort-header { display:flex; align-items:center; gap:8px; }
.sort-btn-group { display:inline-flex; gap:4px; }
.sort-btn {
    background: transparent;
    border: none;
    color: #cbd5e1; /* slate-300 */
    padding: 2px 6px;
    border-radius: 6px;
    line-height: 1;
}
.sort-btn:hover { color: #fff; background: rgba(255,255,255,0.1); }
.sort-btn.active { color: #fff; background: rgba(255,255,255,0.18); }

/* Compact layout for filters section (products page) */
.filters-compact .row { margin-bottom: 0.5rem !important; }
.filters-compact .mb-3 { margin-bottom: 0.5rem !important; }
.filters-compact .form-label { margin-bottom: 0.25rem !important; }
.filters-compact .form-text { margin-top: 0.2rem !important; }
@media (min-width: 768px) {
  .filters-compact .form-control,
  .filters-compact .form-select { padding-top: .35rem; padding-bottom: .35rem; }
}

.table tbody tr {
    transition: none;
}

.table tbody tr:hover { background-color: rgba(4,86,81,0.08); }

/* Badges */
.badge {
    border-radius: 10px;
    font-weight: 500;
}

/* Modals */
.modal-content {
    border-radius: 15px;
    border: none;
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 15px 15px 0 0;
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0 0 15px 15px;
}

/* Alertes */
.alert {
    border-radius: 10px;
    border: none;
}

/* Spinners */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Disable all Bootstrap spinners site-wide */
.spinner-border,
.spinner-grow {
    display: none !important;
}

/* Statistiques du dashboard */
.stats-card { background: linear-gradient(135deg, #0d9488, #14b8a6); color:#fff; border-radius:15px; padding:1.5rem; margin-bottom:1rem; }

.stats-card .stats-number {
    font-size: 2rem;
    font-weight: 700;
}

.stats-card .stats-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Sidebar pour mobile */
@media (max-width: 768px) {
    .navbar-nav {
        background-color: rgba(255, 255, 255, 0.95);
        border-radius: 10px;
        margin-top: 1rem;
        padding: 1rem;
    }
    
    .navbar-nav .nav-link {
        color: var(--dark-color) !important;
        padding: 0.75rem 1rem;
        border-radius: 8px;
        margin-bottom: 0.25rem;
    }
    
    .navbar-nav .nav-link:hover {
        background-color: var(--primary-color);
        color: white !important;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: none;
}

/* Utilitaires */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary { background: var(--primary-color) !important; }

.border-primary {
    border-color: var(--primary-color) !important;
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb { background:#045651; border-radius:10px; }

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Loading states (disabled visual overlay) */
.loading {
    position: static;
    pointer-events: auto;
}

.loading::after {
    content: none !important;
    display: none !important;
}

/* Responsive tables */
.table-responsive {
    border-radius: 10px;
}

/* Custom checkbox and radio */
.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Pagination */
.pagination .page-link { border-radius:8px; margin:0 2px; border:1px solid #dee2e6; color:#045651; }

.pagination .page-item.active .page-link { background-color:#045651; border-color:#045651; color:#fff; }

.pagination .page-link:hover { background-color: rgba(4,86,81,0.08); border-color:#045651; }

/* Search input */
.search-input {
    position: relative;
}

.search-input .form-control {
    padding-left: 2.5rem;
}

.search-input .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    z-index: 5;
}

/* Status badges */
.status-en-attente {
    background-color: var(--warning-color);
}

.status-payee {
    background-color: var(--success-color);
}

.status-partiellement-payee {
    background-color: var(--info-color);
}

.status-en-retard {
    background-color: var(--danger-color);
}

.status-annulee {
    background-color: #6c757d;
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    .pagination {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
}
