.gradient-bg {
    background: linear-gradient(135deg, #1e3a8a 0%, #065f46 100%);
}

.card-shadow {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.blink {
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

.slide-in {
    animation: slideIn 0.5s ease-out forwards;
}

@keyframes slideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Styles pour les messages d'alerte */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
}

.alert-error {
    background-color: #FEE2E2;
    color: #B91C1C;
    border: 1px solid #FECACA;
}

.alert-success {
    background-color: #D1FAE5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.alert-warning {
    background-color: #FEF3C7;
    color: #92400E;
    border: 1px solid #FDE68A;
}

.alert-info {
    background-color: #DBEAFE;
    color: #1E40AF;
    border: 1px solid #BFDBFE;
}

/* Correction du modal d'authentification */
#authModal {
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

#authModal>div {
    max-height: 90vh;
    overflow-y: auto;
    margin: 1rem;
}

/* Styles responsives pour les formulaires */
@media (max-width: 768px) {
    #authModal>div {
        width: 95%;
        margin: 0.5rem;
    }

    .auth-form-container {
        padding: 1rem;
    }
}

/* Assurer que le modal reste centré */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* Style spécifique pour le formulaire d'inscription */
#registerForm {
    max-height: 80vh;
    overflow-y: auto;
    padding-right: 5px;
}

/* Scrollbar personnalisée */
#registerForm::-webkit-scrollbar {
    width: 6px;
}

#registerForm::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#registerForm::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

#registerForm::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Styles responsives pour les modals */
.modal-container {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 1rem;
}

.modal-content {
    width: 100%;
    max-width: 28rem;
    background-color: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 0.75rem;
}

/* Responsive design pour les modals */
@media (max-width: 640px) {
    .modal-container {
        padding: 0.5rem;
        align-items: flex-end;
    }

    .modal-content {
        max-width: 100%;
        border-radius: 0.75rem 0.75rem 0 0;
        max-height: 85vh;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-footer {
        flex-direction: column-reverse;
        padding: 1rem;
    }

    .modal-footer button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .modal-content {
        border-radius: 0.5rem 0.5rem 0 0;
    }

    .modal-header {
        padding: 0.75rem;
    }

    .modal-body {
        padding: 0.75rem;
    }
}

/* Animation pour l'apparition des modals */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes modalSlideInMobile {
    from {
        opacity: 0;
        transform: translateY(100%);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content {
    animation: modalSlideIn 0.3s ease-out;
}

@media (max-width: 640px) {
    .modal-content {
        animation: modalSlideInMobile 0.3s ease-out;
    }
}

/* Empêcher le défilement du body quand un modal est ouvert */
body.modal-open {
    overflow: hidden;
}

/* Styles pour les inputs dans les modals */
.modal-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    line-height: 1.5;
}

.modal-input:focus {
    outline: none;
    ring: 2px;
    ring-color: #3b82f6;
    border-color: #3b82f6;
}

@media (max-width: 640px) {
    .modal-input {
        font-size: 16px;
        /* Empêcher le zoom sur iOS */
    }
}