/* 
 * Fichier: /public/assets/css/styles.css 
 * Styles personnalisés pour l'application
 */

/* Variables CSS globales */
:root {
    --primary-color: #0d6efd;
    --primary-hover: #0a58ca;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

/* Styles généraux */
body {
    background-color: #f5f8fa;
    color: #333;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Animation de transition globale */
a, button, .btn {
    transition: all 0.3s ease;
}

/* Styles pour les cartes */
.card {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    border-radius: 0.5rem 0.5rem 0 0 !important;
    border-bottom: none;
}

/* Style pour la barre de navigation */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

/* Styles personnalisés pour les boutons */
.btn {
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

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

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Styles pour les formulaires */
.form-control, .input-group-text {
    border-radius: 0.375rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Style du footer */
footer {
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

/* Styles pour le tableau */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(13, 110, 253, 0.05);
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Animations pour les icônes */
.fa-spin-hover:hover {
    animation: fa-spin 2s infinite linear;
}

@keyframes fa-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(359deg);
    }
}

/* Styles pour la page d'accueil */
.display-4 {
    font-weight: 700;
}

.lead {
    font-weight: 400;
}

/* Styles pour les boîtes de services */
.col-md-4 .p-4:hover .display-4 {
    color: var(--primary-hover);
    transform: scale(1.1);
    transition: all 0.3s ease;
}

/* Styles pour les alertes */
.alert {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

.alert-success {
    background-color: rgba(25, 135, 84, 0.1);
    color: var(--success-color);
}

.alert-info {
    background-color: rgba(13, 202, 240, 0.1);
    color: var(--info-color);
}

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

/* Styles pour les icônes utilisées dans les listes */
.list-group-item i {
    min-width: 20px;
    text-align: center;
}

/* Styles des étiquettes de formulaire */
.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Style pour le préchargeur (peut être utilisé lors des appels AJAX) */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.preloader-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--light-color);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Media queries pour le responsive */
@media (max-width: 768px) {
    .card-title {
        font-size: 1.25rem;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .h1, h1 {
        font-size: 1.8rem;
    }
    
    .h2, h2 {
        font-size: 1.5rem;
    }
}

/* Mode sombre - Peut être activé avec un toggle en JavaScript */
.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

.dark-mode .card {
    background-color: #1e1e1e;
    color: #e0e0e0;
}

.dark-mode .card-header {
    background-color: #2c2c2c;
}

.dark-mode .table {
    color: #e0e0e0;
}

.dark-mode .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(255, 255, 255, 0.05);
}

.dark-mode .form-control,
.dark-mode .input-group-text {
    background-color: #2c2c2c;
    border-color: #444;
    color: #e0e0e0;
}
