/* Styles personnalisés pour l'application SCI Anser Fabalis */

/* Variables CSS */
:root {
    --primary-color: #0d6efd;
    --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 {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

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

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.3s ease;
}

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

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 10px 10px 0 0 !important;
    font-weight: 600;
}

/* Boutons */
.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    transform: translateY(-1px);
}

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

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

.btn-warning {
    background-color: var(--warning-color);
    border-color: var(--warning-color);
    color: #000;
}

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

/* Formulaires */
.form-control, .form-select {
    border-radius: 6px;
    border: 1px solid #ced4da;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

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

.form-label {
    font-weight: 500;
    color: #495057;
}

/* Tableaux */
.table {
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

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

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.5em 0.75em;
}

/* Alertes */
.alert {
    border: none;
    border-radius: 8px;
    font-weight: 500;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

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

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Dashboard */
.border-left-primary {
    border-left: 4px solid var(--primary-color) !important;
}

.border-left-success {
    border-left: 4px solid var(--success-color) !important;
}

.border-left-info {
    border-left: 4px solid var(--info-color) !important;
}

.border-left-warning {
    border-left: 4px solid var(--warning-color) !important;
}

/* Graphiques */
.chart-pie {
    position: relative;
    height: 300px;
}

.chart-bar {
    position: relative;
    height: 400px;
}

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

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Sidebar (si utilisé) */
.sidebar {
    background-color: #f8f9fa;
    border-right: 1px solid #dee2e6;
}

.sidebar .nav-link {
    color: #495057;
    border-radius: 6px;
    margin: 2px 0;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--primary-color);
}

.sidebar .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

/* Footer */
footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    margin-top: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
    }
}

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

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* Styles pour les icônes */
.fas, .far, .fab {
    margin-right: 0.5rem;
}

/* Styles pour les avatars */
.avatar-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    background-color: var(--primary-color);
}

.avatar-md {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    background-color: var(--primary-color);
    font-size: 1.5rem;
}

/* Styles pour les statistiques */
.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.stats-card h3 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stats-card p {
    margin-bottom: 0;
    opacity: 0.9;
}

/* Styles pour les formulaires de recherche */
.search-form {
    background-color: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Styles pour les modales */
.modal-content {
    border-radius: 10px;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    border-radius: 10px 10px 0 0;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    border-radius: 0 0 10px 10px;
}

/* Styles pour les tooltips */
.tooltip {
    font-size: 0.875rem;
}

/* Styles pour les dropdowns */
.dropdown-menu {
    border: none;
    border-radius: 8px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.dropdown-item {
    padding: 0.5rem 1rem;
    transition: background-color 0.3s ease;
}

.dropdown-item:hover {
    background-color: rgba(13, 110, 253, 0.1);
}

/* Styles pour les breadcrumbs */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: #6c757d;
}

/* Styles pour les progress bars */
.progress {
    border-radius: 10px;
    height: 8px;
}

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

/* Styles pour les listes */
.list-group-item {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.list-group-item:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
}

/* Styles pour les accordéons */
.accordion-item {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.accordion-button {
    border-radius: 8px;
    font-weight: 500;
}

.accordion-button:not(.collapsed) {
    background-color: var(--primary-color);
    color: white;
}

/* Styles pour les spinners */
.spinner-border {
    width: 1.5rem;
    height: 1.5rem;
}

/* Styles pour les placeholders */
.placeholder {
    background-color: #e9ecef;
    border-radius: 4px;
    animation: placeholder-glow 2s ease-in-out infinite alternate;
}

@keyframes placeholder-glow {
    0% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

/* Styles pour les notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    border-radius: 8px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Styles pour les cartes de statistiques */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stats-item {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: transform 0.3s ease;
}

.stats-item:hover {
    transform: translateY(-5px);
}

.stats-item .icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.stats-item .number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.stats-item .label {
    color: var(--secondary-color);
    font-weight: 500;
}

/* Styles pour les graphiques responsifs */
@media (max-width: 768px) {
    .chart-pie, .chart-bar {
        height: 250px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Styles pour l'impression */
@media print {
    .navbar, .btn, .no-print {
        display: none !important;
    }
    
    .card {
        border: 1px solid #000;
        box-shadow: none;
    }
    
    .table {
        border: 1px solid #000;
    }
    
    .table th, .table td {
        border: 1px solid #000;
    }
}

/* Carrousel page d'accueil */
.home-carousel-section {
    background: #0b1f3a;
}

.home-carousel-static,
#homeCarousel,
.home-carousel-image-wrap {
    position: relative;
    max-height: 420px;
    overflow: hidden;
}

.home-carousel-image {
    width: 100%;
    height: 420px;
    max-height: 420px;
    object-fit: cover;
    object-position: center;
    display: block;
}

.home-carousel-caption {
    background: rgba(0, 0, 0, 0.6);
    border-radius: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 1.05rem;
    font-weight: 500;
    color: #fff;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    line-height: 1.4;
    z-index: 2;
}

/* Légende superposée — mode 1 image */
.home-carousel-static .home-carousel-caption {
    position: absolute;
    left: 50%;
    bottom: 1.25rem;
    transform: translateX(-50%);
    max-width: min(900px, 90%);
}

/* Légende Bootstrap carousel */
#homeCarousel .carousel-caption.home-carousel-caption {
    position: absolute;
    right: 10%;
    left: 10%;
    bottom: 1.25rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.home-carousel-caption a {
    color: #fff;
    text-decoration: underline;
    font-weight: 600;
}

.home-carousel-caption a:hover {
    color: #dbeafe;
}

.home-carousel-caption strong,
.home-carousel-caption b {
    font-weight: 700;
}

.home-carousel-caption p {
    margin-bottom: 0.35rem;
}

.home-carousel-caption p:last-child {
    margin-bottom: 0;
}

.home-carousel-caption ul,
.home-carousel-caption ol {
    margin: 0.25rem 0 0;
    padding-left: 1.25rem;
    text-align: left;
}

@media (max-width: 768px) {
    .home-carousel-static,
    #homeCarousel,
    .home-carousel-image-wrap {
        max-height: 360px;
    }

    .home-carousel-image {
        height: 360px;
        max-height: 360px;
    }

    .home-carousel-static .home-carousel-caption,
    #homeCarousel .carousel-caption.home-carousel-caption {
        position: absolute;
        left: 0.5rem;
        right: 0.5rem;
        bottom: 4rem;
        transform: none;
        max-width: none;
        width: auto;
        margin: 0;
        padding: 1rem 1.1rem;
        font-size: 1.05rem;
        line-height: 1.45;
        max-height: 55%;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 0.65rem;
    }

    #homeCarousel .carousel-indicators {
        margin-bottom: 0.35rem;
    }

    #homeCarousel .carousel-control-prev,
    #homeCarousel .carousel-control-next {
        height: 100%;
    }
}




