/* FAFA - CSS Principal */

/* Variables CSS - Couleurs FAFA conformes à la maquette */
:root {
    --primary-color: #e53e3e;      /* Rouge FAFA principal */
    --secondary-color: #c53030;    /* Rouge FAFA foncé */
    --accent-color: #1a365d;       /* Bleu marine FAFA */
    --text-color: #4a5568;         /* Gris texte */
    --background-light: #f7fafc;   /* Gris clair background */
    --text-dark: #333333;          /* Texte foncé neutre */
    --accent-blue: #1a365d;        /* Bleu marine FAFA pour accents */
    --text-muted: #6c757d;
    --border-color: #e9ecef;
}

/* Styles généraux */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-light);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Navigation */
.navbar-brand {
    font-weight: bold;
    font-size: 1.2rem;
}

.navbar-brand img {
    margin-right: 8px;
}

/* Cards et conteneurs */
.card {
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    margin-bottom: 20px;
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
    border-bottom: none;
    padding: 20px 25px 15px;
}

.card-body {
    padding: 25px;
}

/* Buttons */
.btn {
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #0052a3);
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, var(--secondary-color), #1e7e34);
    border: none;
}

.btn-lg {
    padding: 12px 30px;
    font-size: 1.1rem;
}

/* Forms */
.form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

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

.form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.is-invalid {
    border-color: #dc3545;
}

.invalid-feedback {
    display: block;
    font-size: 0.875rem;
}

/* Sections avec titres */
.section-title {
    background: linear-gradient(135deg, var(--primary-color), #0052a3);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 10px;
}

/* Radio buttons pour les options FAFA */
.btn-check:checked + .btn-outline-primary {
    background: linear-gradient(135deg, var(--primary-color), #0052a3);
    border-color: var(--primary-color);
    transform: scale(1.05);
}

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

.alert-info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

/* Timeline (manuel) */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline-item {
    position: relative;
    padding-bottom: 25px;
}

.timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: -19px;
    top: 20px;
    height: calc(100% - 10px);
    width: 3px;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.timeline-marker {
    position: absolute;
    left: -25px;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 3px var(--primary-color);
}

.timeline-content {
    margin-left: 20px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Dashboard Admin */
.card.bg-primary, .card.bg-success, .card.bg-info, .card.bg-warning {
    background: linear-gradient(135deg, var(--primary-color), #0052a3) !important;
}

.card.bg-success {
    background: linear-gradient(135deg, var(--secondary-color), #1e7e34) !important;
}

.card.bg-info {
    background: linear-gradient(135deg, #17a2b8, #138496) !important;
}

.card.bg-warning {
    background: linear-gradient(135deg, #ffc107, #e0a800) !important;
}

/* Tables */
.table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.table thead th {
    background: var(--background-light);
    border: none;
    font-weight: 600;
    padding: 15px;
}

.table td {
    padding: 12px 15px;
    vertical-align: middle;
}

/* Badges */
.badge {
    font-size: 0.8rem;
    padding: 6px 10px;
    border-radius: 20px;
}

/* Footer */
footer {
    margin-top: 50px;
    background: linear-gradient(135deg, #343a40, #212529) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .card-body {
        padding: 20px 15px;
    }
    
    .btn-lg {
        padding: 10px 20px;
        font-size: 1rem;
    }
    
    .timeline {
        padding-left: 20px;
    }
    
    .timeline-content {
        margin-left: 10px;
    }
}

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

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

/* Hover effects */
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

/* Page d'accueil spécifique */
.display-4 {
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Paiement */
.card.border-primary {
    border: 2px solid var(--primary-color) !important;
}

.card.border-success {
    border: 2px solid var(--secondary-color) !important;
}

/* Loading spinner (pour les paiements) */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

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

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 20px 25px 15px;
}

.modal-body {
    padding: 20px 25px;
}

/* Accordion (FAQ) */
.accordion-button {
    font-weight: 500;
    border-radius: 8px !important;
}

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

/* Print styles pour PDF */
@media print {
    .navbar, .footer, .btn, .alert {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}

/* Utilities supplémentaires */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.border-gradient {
    border: 3px solid;
    border-image: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) 1;
}