/* === Variables CMA === */
:root {
    --rouge-cma: #A8131D;
    --rouge-cma-hover: #8e0e13;
    --rouge-eclaire: #EA4B3C;
    --rouge-eclaire-texte: #CD493D;
    --bleu-marine: #0F3250;
    --bleu-frais: #B0D2D9;

    --font-title: 'Montserrat', sans-serif;
    --font-body: 'Montserrat', sans-serif;
}

/* === Base globale === */
body {
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    background-color: #f8f8f8;
    color: #222;
}

/* === En-tête === */
header {
    background-color: var(--rouge-cma);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    margin: 0;
    font-size: 32px;
    font-family: var(--font-title);
}

.header-info {
    text-align: right;
    font-size: 16px;
}

.header-info b {
    font-weight: bold;
}

.logout-button {
    margin-left: 10px;
    padding: 6px 12px;
    background-color: white;
    color: var(--rouge-cma);
    border: none;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    font-family: var(--font-body);
}

/* === Contenu principal === */
main {
    padding: 40px;
}

main h2 {
    color: var(--rouge-cma);
    font-family: var(--font-title);
}

/* === Pied de page === */
footer {
    background-color: #f1f1f1;
    text-align: center;
    padding: 15px;
    font-size: 14px;
    margin-top: 40px;
}

/* === Boutons === */
.btn-cma {
    background-color: var(--rouge-cma);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    width: 100%;
    cursor: pointer;
    font-weight: bold;
    font-family: var(--font-body);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

.btn-cma:hover {
    background-color: var(--rouge-cma-hover);
}

/* === Formulaire de connexion === */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

.login-card {
    background-color: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 400px;
}

.login-card h2 {
    margin-top: 0;
    text-align: center;
    color: var(--rouge-cma);
    font-family: var(--font-title);
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
}

input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 15px;
}

.error {
    color: var(--rouge-cma);
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
}

.logo-cma {
    height: 48px;
    width: auto;
    object-fit: contain;
    display: block;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px; /* espace entre logo et titre */
}

.badge {
    font-size: 0.8rem;
    font-weight: bold;
    color: #A8131D;
    margin-left: 5px;
}


.alert {
    padding: 10px 15px; /* Espacement interne */
    margin-bottom: 15px; /* Espacement externe pour séparer les messages */
    border: 1px solid transparent; /* Bordure par défaut invisible */
    border-radius: 4px; /* Coins arrondis */
    font-size: 16px; /* Taille du texte */
    line-height: 1.5; /* Hauteur de ligne */
}

/* Le style spécifique pour une alerte de succès */
.alert-success {
    background-color: #d4edda; /* Fond vert clair */
    border-color: #c3e6cb; /* Bordure verte */
    color: #155724; /* Texte vert foncé */
}

.messages-container {
    text-align: center; /* Centre le texte horizontalement */
    margin-bottom: 20px; /* Ajoute un espace en-dessous du message */
}
