/* ================= FONDATIONS ================= */
:root {
    --bleu-france: #000091;
    --bleu-info: #0063cb;
    --rouge-marianne: #E1000F;
    --gris-fond-info: #f6f6f6;
    --gris-bordure: #dddddd;
    --texte-principal: #161616;
    --texte-secondaire: #666666;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    color: var(--texte-principal);
    line-height: 1.5;
    background-color: #ffffff;
}

a {
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ================= EN-TÊTE ================= */
.entete-principale {
    width: 100%;
    border-bottom: 1px solid var(--gris-bordure);
}

.entete-conteneur {
    display: flex;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 0;
}

.logo-republique img, 
.logo-republique-footer img {
    width: 130px;
    display: block;
}

.titres-entete {
    margin-left: 20px;
}

.titre-principal {
    font-weight: bold;
    font-size: 1.2rem;
}

.sous-titre {
    font-size: 0.9rem;
    color: var(--texte-secondaire);
}

.lien-assistance {
    margin-left: auto;
    font-weight: bold;
}

.lien-assistance a {
    color: var(--bleu-france);
}

/* ================= BANNIÈRE ALERTE ================= */
.banniere-alerte {
    display: flex;
    align-items: center;
    border: 1px solid var(--bleu-info);
    margin: 20px auto;
    max-width: 1000px;
    font-size: 0.95rem;
}

.icone-info {
    background-color: var(--bleu-info);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    font-weight: bold;
    margin-right: 15px;
    font-size: 1.2rem;
}

.lien-alerte {
    color: var(--texte-principal);
    text-decoration: underline;
    text-underline-offset: 3px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.icone-externe {
    width: 14px;
    height: 14px;
}

/* ================= GRILLE CENTRALE ================= */
.titre-page {
    text-align: center;
    margin: 40px 0;
    font-size: 1.8rem;
}

.conteneur-grille {
    display: grid;
    grid-template-columns: 55% 40%;
    gap: 5%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px 50px 20px;
}

/* ================= FORMULAIRE & ONGLETS ================= */
.colonne-formulaire {
    max-width: 400px;
    width: 100%;
    justify-self: end;
}

.onglets-navigation {
    display: flex;
    margin-bottom: 0;
}

.onglet {
    background-color: #e3e3fd;
    border: 1px solid var(--gris-bordure);
    padding: 12px 24px;
    font-size: 1rem;
    cursor: pointer;
    color: var(--texte-principal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.icone-onglet {
    width: 16px;
    height: auto;
}

.onglet.actif {
    background-color: white;
    color: var(--bleu-france);
    border-top: 2px solid var(--bleu-france);
    border-left: 1px solid var(--gris-bordure);
    border-right: 1px solid var(--gris-bordure);
    border-bottom: 1px solid white;
    margin-bottom: -1px;
    z-index: 2;
    position: relative;
}

.formulaire-connexion {
    border: 1px solid var(--gris-bordure);
    padding: 30px;
    background-color: white;
}

.groupe-saisie {
    margin-bottom: 25px;
}

.groupe-saisie label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.texte-aide {
    font-size: 0.85rem;
    color: var(--texte-secondaire);
    margin-bottom: 10px;
}

input[type="text"], 
input[type="password"] {
    width: 100%;
    padding: 12px;
    background-color: #eeeeee;
    border: none;
    border-bottom: 2px solid var(--texte-principal);
    font-size: 1rem;
}

input[type="text"]:focus, 
input[type="password"]:focus {
    outline: none;
    border-bottom-color: var(--bleu-france);
}

.case-afficher {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bouton-soumettre {
    background-color: var(--bleu-france);
    color: white;
    width: 100%;
    padding: 15px;
    border: none;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}

.bouton-soumettre:hover {
    background-color: #000074;
}

/* ================= COLONNE INFOS (DROITE) ================= */
.colonne-informations {
    background-color: var(--gris-fond-info);
    padding: 30px;
}

.colonne-informations h2, 
.colonne-informations h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.colonne-informations p {
    margin-bottom: 20px;
    font-size: 0.95rem;
    text-align: justify;
}

.liste-liens-conditions {
    list-style-position: inside;
}

.liste-liens-conditions li {
    margin-bottom: 12px;
    color: var(--bleu-france);
}

/* ================= PIED DE PAGE ================= */
.pied-de-page {
    width: 100%;
    border-top: 2px solid var(--bleu-france);
    margin-top: 60px;
}

.footer-conteneur {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

.footer-corps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-contenu-droite {
    max-width: 65%;
}

.footer-liens-externes {
    display: flex;
    gap: 30px;
    list-style: none;
    margin-top: 20px;
    font-weight: bold;
}

.footer-bas {
    border-top: 1px solid var(--gris-bordure);
    padding-top: 20px;
}

.footer-liens-legaux {
    display: flex;
    gap: 15px;
    list-style: none;
    font-size: 0.8rem;
    color: var(--texte-secondaire);
    flex-wrap: wrap;
}

.footer-liens-legaux li:not(:last-child):after {
    content: "|";
    margin-left: 15px;
    color: var(--gris-bordure);
}

/* ================= ANIMATION LOADER (L'ÉCRAN BLANC) ================= */
#loading-screen {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #ffffff;
    z-index: 99999;
    display: none; /* Piloté par le JS en 'flex' */
    justify-content: center;
    align-items: center;
}

.loading-logo {
    width: 120px;
    height: auto;
    animation: breathe 1.5s infinite ease-in-out;
}

@keyframes breathe {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* Le conteneur de l'alerte rouge */
.alerte-erreur {
    display: flex;
    align-items: center;
    background-color: #fdf2f2;
    border: 1px solid #b01919;
    padding: 15px;
    margin-bottom: 25px;
}

.icone-croix {
    background-color: #b01919;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    margin-right: 15px;
    font-size: 14px;
}

.texte-erreur {
    color: #1b1b1b;
    font-weight: 500;
    margin: 0;
}

/* État d'erreur pour les champs */
.input-erreur {
    border-left: 4px solid #b01919 !important; /* Le trait rouge à gauche */
}

/* Style du trait rouge à gauche */
.input-erreur {
    border-left: 3px solid #b01919;
    padding-left: 10px; /* Espace entre le trait et le texte */
    margin-left: -13px; /* Pour compenser le trait sans décaler tout le bloc */
}

.input-erreur input {
    border: 1px solid #b01919 !important; /* Le cadre de l'input en rouge */
}

/* ================= MOBILE ================= */
@media (max-width: 768px) {
    .entete-conteneur {
        flex-direction: column;
        text-align: center;
    }
    .titres-entete {
        margin-left: 0;
        margin-top: 10px;
    }
    .conteneur-grille {
        grid-template-columns: 1fr;
    }
    .colonne-formulaire {
        justify-self: center;
    }
    .footer-corps {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer-contenu-droite {
        max-width: 100%;
        margin-top: 20px;
    }
}