/* Variables CSS pour la cohérence des couleurs */
:root {
    --primary-color: #2c5aa0;
    --secondary-color: #f8f9fa;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gold-color: #d4af37;
    --church-blue: #1e3a8a;
    --church-gold: #fbbf24;
    --shadow-light: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 20px rgba(0,0,0,0.15);
    --shadow-heavy: 0 8px 30px rgba(0,0,0,0.2);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* Styles généraux */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: rgba(255, 255, 255, 0.95);
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '✟';
    position: fixed;
    font-size: 800px;
    color: rgba(26, 75, 140, 0.08) !important;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
}

header.navbar {
    margin-top: 0;
}

/* Si le problème persiste, ciblez l'élément spécifique */
body > *:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Container principal */
.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-heavy);
    padding: 2rem;
    margin: 10% auto;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

/* Titre principal */
h1 {
    color: var(--church-blue);
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

h1 i {
    color: var(--church-gold);
    margin-right: 0.5rem;
}

/* Lead text */
.lead {
    color: var(--dark-color);
    font-size: 1.2rem;
    line-height: 1.6;
}

/* Boutons principaux */
.btn {
    border-radius: var(--border-radius);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
}

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

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

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--church-blue));
    box-shadow: var(--shadow-light);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    background: linear-gradient(45deg, var(--church-blue), var(--primary-color));
}

.btn-outline-info {
    border: 2px solid var(--info-color);
    color: var(--info-color);
    background: transparent;
}

.btn-outline-info:hover {
    background: var(--info-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.btn-success {
    background: linear-gradient(45deg, var(--success-color), #20c997);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.card-body {
    padding: 2rem;
}

.card i {
    transition: var(--transition);
}

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

/* Modales */

.modal{
    z-index: 1500;
}

/* Effet de flou sur l'arrière-plan quand un modal est ouvert */
.modal-backdrop.show {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px); /* Pour Safari */
    background-color: rgba(0, 0, 0, 0.3);
    opacity: 1 !important;
    z-index: 1040; /* Doit être inférieur au modal mais supérieur à la navbar */
}

@media (min-width: 992px) {
    .navbar {
        position: sticky;
        top: 0;
    }
}


/* Animation douce pour l'apparition du flou */
.modal-backdrop.show {
    transition: backdrop-filter 0.3s ease, background-color 0.3s ease;
}

/* Style spécifique pour le contenu derrière le modal */
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-heavy);
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(45deg, var(--primary-color), var(--church-blue));
    color: white;
    border-bottom: none;
    padding: 1.5rem;
}

.modal-header .modal-title {
    font-weight: 600;
    font-size: 1.3rem;
}

.modal-header i {
    color: var(--church-gold);
    margin-right: 0.5rem;
}

.modal-body {
    padding: 2rem;
    background: var(--light-color);
}

.modal-footer {
    background: white;
    border-top: 1px solid #dee2e6;
    padding: 1.5rem;
}

/* Formulaires */
.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 0.75rem;
    transition: var(--transition);
    font-size: 1rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(44, 90, 160, 0.25);
    transform: translateY(-1px);
}

.form-control:hover, .form-select:hover {
    border-color: var(--primary-color);
}

/* Boutons de montant */
.montant-btn {
    border-radius: 20px;
    font-weight: 600;
    transition: var(--transition);
    margin: 0.2rem;
}

.montant-btn:hover {
    transform: scale(1.05);
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

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

/* Checkbox personnalisé */
.form-check-input {
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid var(--primary-color);
    border-radius: 4px;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-label {
    font-weight: 500;
    margin-left: 0.5rem;
}

/* Alertes */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    font-weight: 500;
}

.alert-info {
    background: linear-gradient(45deg, #d1ecf1, #bee5eb);
    color: #0c5460;
    border-left: 4px solid var(--info-color);
}

.alert-success {
    background: linear-gradient(45deg, #d4edda, #c3e6cb);
    color: #155724;
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background: linear-gradient(45deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border-left: 4px solid var(--danger-color);
}

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

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

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

/* Classes d'animation */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

.pulse {
    animation: pulse 2s infinite;
}

/* Spinner de chargement */
.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
}

/* Modal de chargement */
#loadingModal .modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

/* Styles pour les icônes */
.fa-church {
    color: var(--church-gold);
}

.fa-hand-holding-heart {
    color: #e74c3c;
}

.fa-hammer {
    color: var(--primary-color);
}

.fa-hands-helping {
    color: var(--success-color);
}

.fa-pray {
    color: var(--warning-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
        margin-top: 8rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
        margin-bottom: 1rem;
        width: 100%;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .lead {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .montant-btn {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-header .modal-title {
        font-size: 1.1rem;
    }
}

/* Effets de survol pour les éléments interactifs */
.form-control:hover,
.form-select:hover,
.btn:hover {
    cursor: pointer;
}

/* Style pour les messages d'erreur */
.error-message {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Style pour les champs valides */
.form-control.is-valid,
.form-select.is-valid {
    border-color: var(--success-color);
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Amélioration de l'accessibilité */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: none;
}

/* Style pour les tooltips personnalisés */
.tooltip-custom {
    position: relative;
    display: inline-block;
}

.tooltip-custom .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: var(--dark-color);
    color: white;
    text-align: center;
    border-radius: var(--border-radius);
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip-custom:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Styles pour l'impression */
@media print {
    body {
        background: white;
    }
    
    .container {
        box-shadow: none;
        background: white;
    }
    
    .btn {
        display: none;
    }
    
    .modal {
        display: none;
    }
}

/* Dans votre fichier dons.css */
#mobileMoneyOptions {
    transition: all 0.3s ease;
    border-left: 3px solid #dee2e6;
    padding-left: 15px;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
