@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

:root {
    --caste-red: #E30613;
    --caste-green: #39B54A;
    --caste-gray: #F5F6FA;
    --caste-dark: #222;
    --caste-light: #fff;
}

html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    background-color: var(--caste-gray);
    color: var(--caste-dark);
    font-family: 'Roboto', Arial, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--caste-red);
    font-weight: 700;
}

.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding: 0.75rem 0 !important;
    min-height: 60px;
    border: none;
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0 !important;
    min-height: 50px;
}

.navbar-brand, .navbar-brand span {
    color: #2c3e50 !important;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    transform: translateY(-1px);
    color: #27ae60 !important;
}

.navbar-brand img {
    height: 32px !important;
    width: auto;
    margin-right: 10px;
    display: inline-block;
    vertical-align: middle;
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: rotate(5deg) scale(1.1);
}

.navbar-brand span {
    font-size: 1.3rem !important;
    line-height: 1;
}

.nav-link {
    color: #2c3e50 !important;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.75rem 1.25rem !important;
    border: none;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    border-radius: 12px;
    margin: 0 0.25rem;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translate(-50%, -50%);
    z-index: -1;
    opacity: 0;
}

.nav-link:hover::before {
    width: 100%;
    height: 100%;
    opacity: 1;
}

.nav-link:hover, .nav-link.active {
    color: #ffffff !important;
    transform: translateY(-2px);
    text-shadow: none;
}

.nav-link i {
    margin-right: 0.5rem;
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.nav-link:hover i {
    transform: scale(1.2);
}

/* Boutons modernes */
.btn {
    border-radius: 25px !important;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-outline-success {
    background: linear-gradient(135deg, #00b894, #00cec9);
    color: white !important;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 184, 148, 0.3);
}

.btn-outline-success:hover {
    background: linear-gradient(135deg, #00a085, #00b7b8);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 184, 148, 0.4);
    color: white !important;
}

.btn-success {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    color: white !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    color: white !important;
}

/* Logo circulaire moderne */
.bg-success.rounded-circle {
    width: 28px !important;
    height: 28px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.navbar-brand:hover .bg-success.rounded-circle {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Navbar toggler moderne */
.navbar-toggler {
    border: none;
    padding: 0.5rem;
    border-radius: 8px;
    background: rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
}

.navbar-toggler:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: scale(1.05);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2844, 62, 80, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Dropdown moderne */
.dropdown-menu {
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    margin-top: 0.5rem;
    animation: dropdownFadeIn 0.3s ease-out;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    color: #2c3e50;
    transition: all 0.3s ease;
    border-radius: 12px;
    margin: 0.25rem 1rem;
    position: relative;
    overflow: hidden;
}

.dropdown-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transition: left 0.3s ease;
    z-index: -1;
    border-radius: 12px;
}

.dropdown-item:hover::before {
    left: 0;
}

.dropdown-item:hover {
    background: transparent;
    color: white;
    transform: translateX(5px);
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    margin-right: 0.75rem;
    transition: transform 0.3s ease;
}

.dropdown-item:hover i {
    transform: scale(1.2);
}

/* Responsive design */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-radius: 16px;
        margin-top: 1rem;
        padding: 1rem;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    }
    
    .nav-link {
        margin: 0.25rem 0;
        text-align: center;
    }
    
    .navbar-nav .btn {
        margin: 0.5rem 0;
        width: 100%;
    }
}

/* Animation au scroll */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.navbar {
    animation: slideDown 0.5s ease-out;
}

/* Effet de focus moderne */
.nav-link:focus,
.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

/* Badge moderne pour notifications */
.badge {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    border-radius: 12px;
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.btn, .btn-caste-red, .btn-caste-green {
    border-radius: 22px !important;
    font-weight: 500;
    transition: box-shadow 0.2s, background 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: none;
}

.btn-caste-red, .btn-primary {
    background-color: var(--caste-red) !important;
    border-color: var(--caste-red) !important;
    color: #fff !important;
}

.btn-caste-red:hover, .btn-primary:hover {
    background-color: #b8000f !important;
    border-color: #b8000f !important;
}

.btn-caste-green, .btn-success {
    background-color: var(--caste-green) !important;
    border-color: var(--caste-green) !important;
    color: #fff !important;
}

.btn-caste-green:hover, .btn-success:hover {
    background-color: #2e9e3e !important;
    border-color: #2e9e3e !important;
}

.btn-outline-primary {
    color: var(--caste-red) !important;
    border-color: var(--caste-red) !important;
}

.btn-outline-primary:hover {
    background-color: var(--caste-red) !important;
    color: #fff !important;
}

.badge, .badge-caste-green, .badge-caste-red {
    border-radius: 12px;
    font-size: 0.95em;
    padding: 0.45em 1em;
    font-weight: 500;
    border: none;
}

.badge-caste-green, .badge-success {
    background-color: #39B54A !important;
    color: #fff !important;
}

.badge-caste-red, .badge-danger {
    background-color: var(--caste-red) !important;
    color: #fff !important;
}

.card {
    border-radius: 18px;
    border: none;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    border-top: 4px solid var(--caste-red);
    margin-bottom: 1.5rem;
    background: #fff;
}

.card-header {
    background: transparent !important;
    border: none !important;
    padding: 1.5rem 1.5rem 0.5rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

.table {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: none;
}

.table thead {
    background-color: #f1f1f1;
    color: #222;
    font-weight: 600;
    border: none;
}

.table th, .table td {
    vertical-align: middle;
    padding: 0.85rem 1.2rem;
    border: none;
    border-bottom: 1px solid #f0f0f0;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.btn-profile {
    background: #fff !important;
    color: #229954 !important;
    border-radius: 22px !important;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    border: 2px solid #229954 !important;
    padding: 0.4rem 1.2rem;
    margin-left: 1rem;
    transition: background 0.2s, color 0.2s;
}

.btn-profile:hover {
    background: #39B54A !important;
    color: #fff !important;
    border-color: #39B54A !important;
}

/* Main content area */
.main-content {
    padding: 0.5rem 0;
    min-height: calc(100vh - 24px); /* Hauteur totale moins header ultra-compact */
}

/* Styles pour la page d'accueil moderne */
.bg-gradient {
    background: linear-gradient(135deg, #229954 0%, #39B54A 100%) !important;
}

.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12) !important;
}

/* Animations pour les boutons d'action rapide */
.btn-outline-success:hover,
.btn-outline-danger:hover,
.btn-outline-info:hover,
.btn-outline-primary:hover,
.btn-outline-secondary:hover,
.btn-outline-dark:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
}

/* Timeline pour l'activité récente */
.timeline {
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #e9ecef;
}

.timeline-item {
    position: relative;
}

.timeline-marker {
    position: relative;
    z-index: 1;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Indicateurs avec animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-body h4 {
    animation: fadeInUp 0.6s ease;
}

/* Couleurs paisibles et professionnelles */
.text-success { color: #28a745 !important; }
.text-primary { color: #007bff !important; }
.text-warning { color: #ffc107 !important; }
.text-info { color: #17a2b8 !important; }

/* Espacement et typographie améliorés */
.fw-bold {
    font-weight: 700 !important;
}

.fw-semibold {
    font-weight: 600 !important;
}

/* Suppression des bordures et traits indésirables */
.border-0 {
    border: none !important;
}

.shadow-sm {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
}

/* Icônes */
.fas {
    transition: transform 0.2s ease;
}

.card:hover .fas {
    transform: scale(1.1);
}

/* Responsive amélioré */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .card-body h4 {
        font-size: 1.5rem;
    }
    
    .navbar-brand span {
        font-size: 1.1rem !important;
    }
    
    .btn-profile {
        margin-left: 0.5rem;
        padding: 0.3rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .main-content {
        padding: 1rem 0;
        min-height: calc(100vh - 32px);
    }
}

/* Correction des espacements */
.container-fluid {
    padding-left: 2rem;
    padding-right: 2rem;
}

@media (max-width: 576px) {
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Suppression des traits de séparation */
hr {
    display: none;
}

/* Amélioration des boutons d'action */
.btn-outline-success,
.btn-outline-danger,
.btn-outline-info,
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-dark {
    border-width: 2px;
    font-weight: 600;
    padding: 0.75rem 1rem;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Correction des marges et paddings */
.row {
    margin-left: 0;
    margin-right: 0;
}

.col, .col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12,
.col-lg, .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12,
.col-md, .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem rgba(0, 123, 255, 0.25);
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background: linear-gradient(135deg, #e8f5e8 0%, #f1f8f1 100%);
  color: #2c3e50;
}

/* Styles pour l'authentification */
.avatar-circle {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007bff, #0056b3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-nav .nav-link.dropdown-toggle::after {
    display: none;
}

.dropdown-menu-end {
    --bs-position: end;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
}

.dropdown-item {
    padding: 8px 16px;
    border-radius: 4px;
    margin: 2px 4px;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-item.text-danger:hover {
    background-color: #f8d7da;
    color: #721c24 !important;
}

/* Modal de connexion */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modal-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-radius: 12px 12px 0 0;
}

.modal-header .btn-close {
    filter: invert(1);
}

.input-group-text {
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-outline-light:hover {
    background-color: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
}

/* Animation pour les boutons */
.btn {
    transition: all 0.2s ease;
}

/* Responsive pour le nom d'utilisateur */
@media (max-width: 991.98px) {
    .navbar-nav .d-none.d-lg-block {
        display: none !important;
    }
}

/* Styles pour les liens désactivés */
.nav-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    color: rgba(255, 255, 255, 0.6) !important;
}

.nav-link.disabled:hover {
    color: rgba(255, 255, 255, 0.6) !important;
    background: transparent !important;
}

/* Styles pour le tableau de bord */
.bg-gradient {
    background: linear-gradient(135deg, #229954 0%, #39B54A 100%);
}

.card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

.timeline-item {
    position: relative;
    padding-left: 0;
}

.timeline-marker {
    position: relative;
    z-index: 2;
}

.timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 11px;
    top: 20px;
    bottom: -10px;
    width: 2px;
    background: #e9ecef;
    z-index: 1;
}

/* Styles pour les boutons d'action rapide */
.btn-outline-success:hover,
.btn-outline-danger:hover,
.btn-outline-info:hover,
.btn-outline-primary:hover,
.btn-outline-secondary:hover,
.btn-outline-dark:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Animation pour les icônes */
.fas {
    transition: transform 0.2s ease-in-out;
}

.btn:hover .fas {
    transform: scale(1.1);
}

/* Styles pour les statistiques */
.card-body.text-center .fas {
    transition: all 0.3s ease;
}

.card:hover .card-body.text-center .fas {
    transform: scale(1.1);
}

/* Responsive design amélioré */
@media (max-width: 768px) {
    .container-fluid {
        padding: 0.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        font-size: 0.9rem;
    }
}

/* Styles pour les badges et indicateurs */
.badge {
    font-weight: 500;
}

.progress {
    border-radius: 10px;
}

.progress-bar {
    border-radius: 10px;
}

/* Styles pour les ombres */
.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

/* Animation d'entrée pour les cartes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.6s ease-out;
}

/* Styles pour les liens dans les cartes */
.card a {
    text-decoration: none;
    color: inherit;
}

.card a:hover {
    text-decoration: none;
    color: inherit;
}

/* Styles pour les pages de connexion */
.min-vh-100 {
    min-height: 100vh;
}

.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-indicator .badge {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.form-control-lg {
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
}

/* Animation pour les étapes */
.card {
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Styles pour les boutons de connexion */
.btn-primary {
    background-color: #003366;
    border-color: #003366;
}

.btn-primary:hover {
    background-color: #002244;
    border-color: #002244;
}

/* Styles pour les messages d'alerte */
.alert {
    border-radius: 8px;
    border: none;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

/* Styles pour les onglets de connexion */
.nav-tabs .nav-link {
    border: none;
    color: #6c757d;
    font-weight: 500;
    padding: 0.75rem 1rem;
}

.nav-tabs .nav-link.active {
    color: #003366;
    background-color: transparent;
    border-bottom: 3px solid #003366;
}

.nav-tabs .nav-link:hover {
    border-color: transparent;
    color: #003366;
}

/* Styles pour les boutons de connexion */
.btn[style*="background-color:#28a745"] {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
}

.btn[style*="background-color:#28a745"]:hover {
    background-color: #218838 !important;
    border-color: #1e7e34 !important;
}

/* Styles pour les modals de connexion */
.modal-dialog {
    margin: 0;
}

.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-radius: 12px 12px 0 0;
}

.btn-close-white {
    filter: brightness(0) invert(1);
}

/* Styles pour le logo Caste */
.bg-success.rounded-circle {
    width: 14px !important;
    height: 14px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: bold;
    line-height: 1;
}

/* Styles pour les boutons d'action */
.btn-outline-info {
    border-color: #17a2b8;
    color: #17a2b8;
}

.btn-outline-info:hover {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: white;
}

/* Animation d'entrée pour les modals */
.modal-content {
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Styles pour le menu principal */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

/* Styles pour les dropdowns */
.dropdown-menu {
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    padding: 0.75rem 0;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.05);
    margin-top: 0.5rem;
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    color: #2c3e50;
    transition: all 0.3s ease;
    border-radius: 6px;
    margin: 0 0.5rem;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, #e8f5e8 0%, #d4edda 100%);
    color: #1e8449;
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(30, 132, 73, 0.1);
}

.dropdown-item i {
    width: 20px;
    text-align: center;
}

.dropdown-divider {
    margin: 0.5rem 0;
    border-color: #e9ecef;
}

/* Styles pour les badges de notification */
.badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.6rem;
    font-weight: 600;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.position-relative .badge {
    font-size: 0.5rem;
    padding: 0.05rem 0.25rem;
    font-weight: 600;
    border-radius: 4px;
    line-height: 1;
}

.position-relative .badge {
    font-size: 0.55rem;
    padding: 0.1rem 0.3rem;
    font-weight: 600;
    border-radius: 6px;
}

/* Styles pour les notifications */
.dropdown-header {
    font-weight: 700;
    color: #2c3e50;
    font-size: 0.9rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px 8px 0 0;
    margin: -0.75rem -0.5rem 0.5rem -0.5rem;
}

/* Animation pour les dropdowns */
.dropdown-menu {
    animation: fadeInDown 0.2s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive design pour mobile */
@media (max-width: 991.98px) {
    .navbar-nav .dropdown-menu {
        border: none;
        box-shadow: none;
        background-color: rgba(255, 255, 255, 0.05);
    }
    
    .dropdown-item {
        color: rgba(255, 255, 255, 0.8);
    }
    
    .dropdown-item:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color: white;
    }
}

/* Styles pour les icônes dans le menu */
.navbar-nav .nav-link i {
    width: 10px;
    text-align: center;
    font-size: 0.65rem;
}

/* Hover effects pour les éléments du menu */
.navbar-nav .nav-item:hover .nav-link {
    transform: translateY(-1px);
}

/* Styles pour le logo */
.navbar-brand .bg-success.rounded-circle {
    transition: transform 0.3s ease;
}

.navbar-brand:hover .bg-success.rounded-circle {
    transform: scale(1.1);
}

/* Styles pour les tableaux */
.table-dark {
    --bs-table-bg: #e3f2fd !important;
    --bs-table-striped-bg: #f3f8ff !important;
    --bs-table-striped-color: #2c3e50 !important;
    --bs-table-active-bg: #bbdefb !important;
    --bs-table-active-color: #1976d2 !important;
    --bs-table-hover-bg: #e8f4fd !important;
    --bs-table-hover-color: #1976d2 !important;
    color: #2c3e50 !important;
    border-color: #dee2e6 !important;
}

.table-dark.table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-accent-bg: #f3f8ff !important;
    color: #2c3e50 !important;
}

.table-dark.table-hover > tbody > tr:hover > * {
    --bs-table-accent-bg: #e8f4fd !important;
    color: #1976d2 !important;
}

/* Alternative : style moderne avec dégradé coloré */
.table-modern {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3f8ff 100%);
    color: #2c3e50;
    border: none;
}

.table-modern thead th {
    background: rgba(25, 118, 210, 0.15);
    border-bottom: 2px solid rgba(25, 118, 210, 0.3);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    color: #1976d2;
}

.table-modern tbody tr {
    border-bottom: 1px solid rgba(25, 118, 210, 0.1);
    transition: all 0.3s ease;
}

.table-modern tbody tr:hover {
    background: rgba(25, 118, 210, 0.08);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Style pour les tableaux avec thème CasteFlow coloré */
.table-casteflow {
    background: linear-gradient(135deg, #e8f5e8 0%, #f1f8f1 100%);
    color: #2c3e50;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.table-casteflow thead th {
    background: rgba(76, 175, 80, 0.2);
    color: #2e7d32;
    border: none;
    padding: 1rem 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.table-casteflow tbody tr {
    border-bottom: 1px solid rgba(76, 175, 80, 0.1);
    transition: all 0.3s ease;
}

.table-casteflow tbody tr:hover {
    background: rgba(76, 175, 80, 0.1);
    transform: scale(1.01);
}

.table-casteflow tbody tr:last-child {
    border-bottom: none;
}

/* Style pour les cellules de données */
.table-casteflow td {
    padding: 0.75rem;
    vertical-align: middle;
}

/* Style pour les badges dans les tableaux */
.table-casteflow .badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
    border-radius: 20px;
}

/* Responsive pour les tableaux */
@media (max-width: 768px) {
    .table-casteflow {
        font-size: 0.9rem;
    }

    .table-casteflow thead th,
    .table-casteflow td {
        padding: 0.5rem 0.25rem;
    }
}

/* Styles pour les liens de navigation désactivés */
.nav-link.disabled {
    color: #adb5bd !important;
    pointer-events: none;
    cursor: not-allowed;
}

/* Styles pour le tableau de bord */
.dashboard-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.dashboard-stat {
    background: linear-gradient(135deg, #e8f5e8 0%, #f1f8f1 100%);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 1rem;
}

.dashboard-stat .stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #4caf50;
}

.dashboard-stat .stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #2e7d32;
    margin-bottom: 0.5rem;
}

.dashboard-stat .stat-label {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Timeline pour l'activité récente */
.timeline {
    position: relative;
}

.timeline-item {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #4caf50;
    border: 3px solid #e8f5e8;
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1.2rem;
    width: 2px;
    height: calc(100% + 0.5rem);
    background: #e8f5e8;
}

.timeline-item:last-child::after {
    display: none;
}

/* Boutons avec couleurs vives */
.btn-primary {
    background: linear-gradient(135deg, #2196f3 0%, #42a5f5 100%);
    border: none;
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
    border: none;
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #ff9800 0%, #ffb74d 100%);
    border: none;
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #f44336 0%, #ef5350 100%);
    border: none;
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, #00bcd4 0%, #4dd0e1 100%);
    border: none;
    color: white;
}

/* Navigation colorée */
.navbar-light {
    background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.navbar-light .navbar-brand {
    color: #ffffff !important;
}

.navbar-light .nav-link {
    color: #ffffff !important;
}

.navbar-light .nav-link:hover {
    color: #e8f5e8 !important;
}

/* Cards avec couleurs */
.card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.card-header {
    background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
    border-bottom: 1px solid #4caf50;
    color: #ffffff;
    font-weight: 600;
}

/* Formulaires avec couleurs */
.form-control {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #ffffff;
}

.form-control:focus {
    border-color: #4caf50;
    box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.25);
}

/* Alertes avec couleurs vives */
.alert-success {
    background: linear-gradient(135deg, #e8f5e8 0%, #f1f8f1 100%);
    border: 2px solid #4caf50;
    color: #2e7d32;
}

.alert-danger {
    background: linear-gradient(135deg, #ffebee 0%, #fce4ec 100%);
    border: 2px solid #f44336;
    color: #c62828;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3e0 0%, #fbe9e7 100%);
    border: 2px solid #ff9800;
    color: #ef6c00;
}

.alert-info {
    background: linear-gradient(135deg, #e1f5fe 0%, #f3e5f5 100%);
    border: 2px solid #00bcd4;
    color: #0277bd;
}

/* Badges avec couleurs vives */
.badge.bg-success {
    background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%) !important;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #f44336 0%, #ef5350 100%) !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, #ff9800 0%, #ffb74d 100%) !important;
    color: white !important;
}

.badge.bg-info {
    background: linear-gradient(135deg, #00bcd4 0%, #4dd0e1 100%) !important;
}

.badge.bg-primary {
    background: linear-gradient(135deg, #2196f3 0%, #42a5f5 100%) !important;
}

.badge.bg-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #adb5bd 100%) !important;
}

/* Progress bars avec couleurs vives */
.progress {
    background: #e9ecef;
    border-radius: 8px;
    height: 8px;
}

.progress-bar {
    background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
    border-radius: 8px;
}

/* Dropdown avec couleurs */
.dropdown-menu {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.dropdown-item:hover {
    background: linear-gradient(135deg, #e8f5e8 0%, #f1f8f1 100%);
    color: #2e7d32;
}

/* Modal avec couleurs */
.modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.modal-header {
    background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
    border-bottom: 1px solid #4caf50;
    border-radius: 12px 12px 0 0;
    color: #ffffff;
}

/* Step indicator pour la première connexion */
.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 1rem;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.step-indicator.active .step-number {
    background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
    color: white;
}

.step-label {
    font-size: 0.8rem;
    color: #6c757d;
    text-align: center;
}

.step-indicator.active .step-label {
    color: #2e7d32;
    font-weight: 600;
}

.step-line {
    width: 60px;
    height: 2px;
    background: #e9ecef;
    margin: 20px 0;
    transition: all 0.3s ease;
}

.step-line.active {
    background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
}

/* Animation slideInUp */
@keyframes slideInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.slideInUp {
    animation: slideInUp 0.5s ease-out;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dashboard-stat {
        padding: 1rem;
    }
    
    .dashboard-stat .stat-icon {
        font-size: 2rem;
    }
    
    .dashboard-stat .stat-number {
        font-size: 1.5rem;
    }
    
    .step-indicator {
        margin: 0 0.5rem;
    }
    
    .step-line {
        width: 30px;
    }
}

/* Couleurs supplémentaires pour réduire le blanc */
.container-fluid {
    background: linear-gradient(135deg, #e8f5e8 0%, #f1f8f1 100%);
    min-height: 100vh;
    padding: 20px;
}

.row {
    margin-bottom: 20px;
}

.col-12, .col-md-6, .col-lg-3, .col-lg-4, .col-lg-8 {
    margin-bottom: 15px;
}

/* Couleurs pour les sections */
.section-hero {
    background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
    color: white;
    padding: 8px 0;
    margin-bottom: 5px;
}

.section-features {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3f8ff 100%);
    padding: 20px 0;
    margin-bottom: 15px;
}

.section-advantages {
    background: linear-gradient(135deg, #fff3e0 0%, #fbe9e7 100%);
    padding: 20px 0;
    margin-bottom: 15px;
}

.section-contact {
    background: linear-gradient(135deg, #f1f8f1 0%, #e8f5e8 100%);
    padding: 20px 0;
    margin-bottom: 15px;
}

/* Correction du positionnement du contenu */
.container-fluid {
    padding-top: 0.1rem;
    padding-bottom: 0.1rem;
    min-height: calc(100vh - 24px);
}

main {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Suppression des marges supplémentaires */
body {
    margin: 0;
    padding: 0;
}

.container {
    padding-top: 0.25rem;
}

/* Optimisation du conteneur pour réduire l'espace */
.container {
    max-width: 1400px;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Styles pour le tableau de bord */
.dashboard-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.dashboard-stat {
    background: linear-gradient(135deg, #e8f5e8 0%, #f1f8f1 100%);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 1rem;
}

.dashboard-stat .stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #4caf50;
}

.dashboard-stat .stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #2e7d32;
    margin-bottom: 0.5rem;
}

.dashboard-stat .stat-label {
    color: #6c757d;
    font-size: 0.9rem;
}

.navbar .btn {
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
    border-radius: 10px !important;
    line-height: 1;
}

.navbar .btn-lg {
    font-size: 0.7rem;
    padding: 0.15rem 0.6rem;
    line-height: 1;
}

.navbar .btn-outline-success {
    border-width: 1px;
    font-weight: 500;
}

/* Correction du problème de texte blanc */
.card-body {
    color: #333 !important;
}

.table {
    color: #333 !important;
}

.table th {
    color: #333 !important;
}

.table td {
    color: #333 !important;
}

.card-title {
    color: #333 !important;
}

.card-header {
    color: #333 !important;
}

/* Styles pour les statistiques */
.stat-icon {
    margin-bottom: 0.3rem;
}

.stat-icon i {
    font-size: 1.3rem !important;
}

.stat-number {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.15rem;
    line-height: 1;
}

.stat-label {
    font-size: 0.65rem;
    opacity: 0.9;
    font-weight: 500;
    line-height: 1;
}

/* Ajuster les cartes de statistiques */
.card.bg-primary,
.card.bg-success,
.card.bg-warning,
.card.bg-danger,
.card.bg-info,
.card.bg-secondary {
    min-height: 70px;
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card.bg-primary .card-body,
.card.bg-success .card-body,
.card.bg-warning .card-body,
.card.bg-danger .card-body,
.card.bg-info .card-body,
.card.bg-secondary .card-body {
    width: 100%;
    padding: 0.6rem;
    text-align: center;
}

/* Espacement entre les cartes et le menu */
.container-fluid .row:first-child {
    margin-top: 1rem;
}

/* Ajuster la largeur des colonnes pour les cartes */
.col-lg-3.col-md-6.mb-3 {
    padding: 0 0.5rem;
}

/* Styles spécifiques pour les cartes du dashboard */
.dashboard-stat {
    min-height: 66px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: none;
    transition: transform 0.2s ease;
}

.dashboard-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.dashboard-stat .card-body {
    padding: 0.55rem !important;
}

.dashboard-stat .stat-icon {
    margin-bottom: 0.22rem;
}

.dashboard-stat .stat-icon i {
    font-size: 1.21rem !important;
}

.dashboard-stat .stat-number {
    font-size: 1.1rem;
    margin-bottom: 0.11rem;
}

.dashboard-stat .stat-label {
    font-size: 0.66rem;
    margin-bottom: 0.11rem;
}

.dashboard-stat small {
    font-size: 0.605rem;
}

/* Styles pour les cartes cliquables du dashboard */
.dashboard-stat.clickable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.dashboard-stat.clickable:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
    border-color: #007bff;
}

.dashboard-stat.clickable:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

/* S'assurer que les liens n'ont pas de décoration */
.dashboard-stat.clickable a {
    text-decoration: none;
    color: inherit;
}

/* Effet de focus pour l'accessibilité */
.dashboard-stat.clickable:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Amélioration de la lisibilité des tableaux */
.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(0, 0, 0, 0.02);
}

.table-hover > tbody > tr:hover > * {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Styles pour les badges dans les tableaux */
.table .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* Amélioration des boutons d'action */
.btn-group .btn {
    margin-right: 0.25rem;
}

.btn-group .btn:last-child {
    margin-right: 0;
}