/* style.css */

/* --- Thème Clair, Fun et Moderne --- */

:root {
    --bs-primary: #0d6efd;
    --bs-primary-rgb: 13, 110, 253;
    --bs-secondary: #6c757d;
    --bs-warning: #ffc107;
    --bs-light: #f8f9fa;
    --bs-white: #ffffff;
    --bs-body-bg: #f0f2f5; /* Un gris très clair pour le fond */
    --bs-body-color: #343a40;
    --bs-border-color: #dee2e6;
    --bs-card-bg: var(--bs-white);
    --bs-card-border-radius: 0.5rem;
    --bs-card-box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--bs-body-bg);
}

main.container { 
    flex: 1; 
}

/* --- Overrides Bootstrap --- */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
}

/* Cartes (Cards) */
.card {
    border-radius: var(--bs-card-border-radius);
    box-shadow: var(--bs-card-box-shadow);
    border: none;
}
.card-header, .card-footer {
    background-color: var(--bs-white);
    border-bottom-color: var(--bs-border-color);
    border-top-color: var(--bs-border-color);
}

/* Tableaux (Tables) */
.table {
    --bs-table-striped-bg: #f8f9fa;
}
.table > :not(caption) > * > * {
    padding: 0.9rem 0.75rem; /* Plus d'espace vertical */
    vertical-align: middle;
}

/* Boutons (Buttons) */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}
.btn-primary {
    --bs-btn-bg: var(--bs-primary);
    --bs-btn-border-color: var(--bs-primary);
    --bs-btn-hover-bg: #0b5ed7;
    --bs-btn-hover-border-color: #0a58ca;
}
.btn-warning {
    --bs-btn-color: #000;
    --bs-btn-bg: var(--bs-warning);
    --bs-btn-border-color: var(--bs-warning);
    --bs-btn-hover-color: #000;
    --bs-btn-hover-bg: #ffca2c;
    --bs-btn-hover-border-color: #ffc720;
}
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Formulaires (Forms) */
.form-control, .form-select {
    border-radius: 0.375rem;
}
.form-control:focus, .form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Barre de navigation */
.navbar {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}
.nav-link {
    font-weight: 500;
    color: rgba(0, 0, 0, 0.65);
}
.nav-link:hover, .nav-link.active {
    color: var(--bs-primary);
}

/* Pagination */
.page-link {
    border-radius: 0.375rem;
    margin: 0 2px;
}

/* Pied de page */
footer {
    background-color: var(--bs-white);
    color: var(--bs-text-muted);
}

.table-hover-pointer tbody tr:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.075);
    cursor: pointer;
}

/* --- Thème Sombre Électrique --- */
.theme-dark-electric {
    --bs-body-bg: #0d1117;
    --bs-body-color: #e2e8f0;
    --bs-border-color: #30363d;
    --bs-card-bg: #161b22;
    --bs-primary: #38bdf8;
    --bs-primary-rgb: 56, 189, 248;
}
.theme-dark-electric .navbar {
    background-color: #161b22 !important;
}
.theme-dark-electric .navbar-brand,
.theme-dark-electric .nav-link,
.theme-dark-electric .dropdown-item {
    color: #e2e8f0;
}
.theme-dark-electric .nav-link:hover,
.theme-dark-electric .dropdown-item:hover {
    color: var(--bs-primary);
}
.theme-dark-electric .dropdown-menu {
    background-color: #161b22;
    border-color: #30363d;
}
.theme-dark-electric .form-control,
.theme-dark-electric .form-select {
    background-color: #0d1117;
    border-color: #30363d;
    color: #e2e8f0;
}
.theme-dark-electric .form-control:focus,
.theme-dark-electric .form-select:focus {
    background-color: #0d1117;
    color: #e2e8f0;
}
.theme-dark-electric .table {
    --bs-table-color: #e2e8f0;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.03);
    --bs-table-hover-bg: rgba(255, 255, 255, 0.06);
}
.theme-dark-electric footer {
    background-color: #161b22 !important;
}

/* --- Thème Vert (Clair) --- */
.theme-light-green {
    --bs-primary: #198754;
    --bs-primary-rgb: 25, 135, 84;
}

/* --- Thème Orange (Clair) --- */
.theme-light-orange {
    --bs-primary: #fd7e14;
    --bs-primary-rgb: 253, 126, 20;
}

/* --- Thème Rouge (Clair) --- */
.theme-light-red {
    --bs-primary: #dc3545;
    --bs-primary-rgb: 220, 53, 69;
}

/* --- Thème Cyan (Clair) --- */
.theme-light-cyan {
    --bs-primary: #0dcaf0;
    --bs-primary-rgb: 13, 202, 240;
}

/* --- Thème Ardoise (Sombre) --- */
.theme-dark-slate {
    --bs-body-bg: #212529;
    --bs-body-color: #dee2e6;
    --bs-border-color: #495057;
    --bs-card-bg: #343a40;
    --bs-primary: #ffc107; /* Jaune */
    --bs-primary-rgb: 255, 193, 7;
}
.theme-dark-slate .navbar,
.theme-dark-slate footer,
.theme-dark-slate .dropdown-menu {
    background-color: #343a40 !important;
}
.theme-dark-slate .navbar-brand,
.theme-dark-slate .nav-link,
.theme-dark-slate .dropdown-item {
    color: #f8f9fa;
}
.theme-dark-slate .nav-link:hover,
.theme-dark-slate .dropdown-item:hover {
    color: var(--bs-primary);
}
.theme-dark-slate .form-control,
.theme-dark-slate .form-select {
    background-color: #212529;
    border-color: #495057;
    color: #f8f9fa;
}
.theme-dark-slate .table {
    --bs-table-color: #dee2e6;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.04);
    --bs-table-hover-bg: rgba(255, 255, 255, 0.08);
}

/* --- Thème Violet (Sombre) --- */
.theme-dark-purple {
    --bs-body-bg: #1c1c2d;
    --bs-body-color: #e0e0e0;
    --bs-border-color: #3d3d5c;
    --bs-card-bg: #2a2a40;
    --bs-primary: #9d72ff; /* Violet clair */
    --bs-primary-rgb: 157, 114, 255;
}
.theme-dark-purple .navbar,
.theme-dark-purple footer,
.theme-dark-purple .dropdown-menu {
    background-color: #2a2a40 !important;
}
.theme-dark-purple .navbar-brand,
.theme-dark-purple .nav-link,
.theme-dark-purple .dropdown-item {
    color: #f0f0f0;
}
.theme-dark-purple .nav-link:hover,
.theme-dark-purple .dropdown-item:hover {
    color: var(--bs-primary);
}
.theme-dark-purple .form-control,
.theme-dark-purple .form-select {
    background-color: #1c1c2d;
    border-color: #3d3d5c;
    color: #f0f0f0;
}
.theme-dark-purple .table {
    --bs-table-color: #e0e0e0;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.03);
    --bs-table-hover-bg: rgba(255, 255, 255, 0.06);
}

/* --- Thème Océan (Sombre) --- */
.theme-dark-ocean {
    --bs-body-bg: #0b222a;
    --bs-body-color: #cce0e6;
    --bs-border-color: #1a4b5a;
    --bs-card-bg: #0f303a;
    --bs-primary: #20c997; /* Vert d'eau */
    --bs-primary-rgb: 32, 201, 151;
}
.theme-dark-ocean .navbar, .theme-dark-ocean footer, .theme-dark-ocean .dropdown-menu { background-color: #0f303a !important; }
.theme-dark-ocean .navbar-brand, .theme-dark-ocean .nav-link, .theme-dark-ocean .dropdown-item { color: #e6f2f5; }
.theme-dark-ocean .nav-link:hover, .theme-dark-ocean .dropdown-item:hover { color: var(--bs-primary); }
.theme-dark-ocean .form-control, .theme-dark-ocean .form-select { background-color: #0b222a; border-color: #1a4b5a; color: #e6f2f5; }
.theme-dark-ocean .table { --bs-table-color: #cce0e6; --bs-table-striped-bg: rgba(255, 255, 255, 0.03); --bs-table-hover-bg: rgba(255, 255, 255, 0.06); }