/* ==========================================================================
   S2GE — Page de connexion unique
   Aucune dépendance externe (pas de CDN) : fonctionne hors ligne.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

.page-connexion {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #263238;
    background: #eceff1;
    background-image:
        radial-gradient(at 15% 20%, rgba(0, 139, 138, .16) 0, transparent 55%),
        radial-gradient(at 85% 80%, rgba(0, 105, 106, .14) 0, transparent 55%);
}

/* --- La carte ------------------------------------------------------------ */
.carte-connexion {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 14px;
    padding: 2rem 1.85rem 1.6rem;
    box-shadow: 0 12px 32px rgba(38, 50, 56, .14),
                0 2px 6px rgba(38, 50, 56, .08);
}

/* --- En-tête -------------------------------------------------------------- */
.entete {
    text-align: center;
    margin-bottom: 1.5rem;
}

.entete .logo {
    width: 68px;
    height: 68px;
    object-fit: contain;
    margin-bottom: .65rem;
}

.entete h1 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.3;
    color: #00696a;
}

.entete .annee {
    margin: .3rem 0 0;
    font-size: .82rem;
    color: #78909c;
}

/* --- Messages ------------------------------------------------------------- */
.alerte {
    margin: 0 0 1rem;
    padding: .7rem .85rem;
    border-radius: 8px;
    font-size: .87rem;
    line-height: 1.4;
    border-left: 4px solid;
}

.alerte--erreur {
    background: #fdecea;
    border-color: #d32f2f;
    color: #a92720;
}

.alerte--info {
    background: #e3f2fd;
    border-color: #1976d2;
    color: #14568f;
}

/* --- Champs --------------------------------------------------------------- */
.champ {
    margin-bottom: 1.05rem;
}

.champ label {
    display: block;
    margin-bottom: .35rem;
    font-size: .84rem;
    font-weight: 600;
    color: #37474f;
}

.champ input[type="text"],
.champ input[type="password"] {
    width: 100%;
    padding: .7rem .8rem;
    font-size: .95rem;
    font-family: inherit;
    color: #263238;
    background: #fafafa;
    border: 1px solid #cfd8dc;
    border-radius: 8px;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.champ input:focus {
    outline: none;
    background: #fff;
    border-color: #008b8a;
    box-shadow: 0 0 0 3px rgba(0, 139, 138, .16);
}

.champ .aide {
    display: block;
    margin-top: .35rem;
    font-size: .76rem;
    line-height: 1.4;
    color: #78909c;
}

/* --- Afficher / masquer le mot de passe ---------------------------------- */
.champ-mdp {
    position: relative;
}

.champ-mdp input {
    padding-right: 5.2rem;
}

.voir-mdp {
    position: absolute;
    top: 50%;
    right: .4rem;
    transform: translateY(-50%);
    padding: .35rem .6rem;
    font-size: .78rem;
    font-family: inherit;
    font-weight: 600;
    color: #00696a;
    background: transparent;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
}

.voir-mdp:hover { background: #e0f2f1; }

.voir-mdp:focus-visible {
    outline: 2px solid #008b8a;
    outline-offset: 1px;
}

/* --- Bouton principal ----------------------------------------------------- */
.bouton-principal {
    width: 100%;
    margin-top: .3rem;
    padding: .8rem 1rem;
    font-size: .95rem;
    font-family: inherit;
    font-weight: 600;
    color: #fff;
    background: #008b8a;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color .15s ease, transform .05s ease;
}

.bouton-principal:hover  { background: #007675; }
.bouton-principal:active { transform: translateY(1px); }

.bouton-principal:focus-visible {
    outline: 2px solid #00494a;
    outline-offset: 2px;
}

/* --- Liens et note -------------------------------------------------------- */
.liens {
    margin-top: 1rem;
    text-align: center;
}

.liens a {
    font-size: .85rem;
    color: #00696a;
    text-decoration: none;
}

.liens a:hover { text-decoration: underline; }

.note {
    margin: 1.4rem 0 0;
    padding-top: 1rem;
    border-top: 1px solid #eceff1;
    font-size: .76rem;
    line-height: 1.5;
    text-align: center;
    color: #90a4ae;
}

/* --- Petits écrans -------------------------------------------------------- */
@media (max-width: 420px) {
    .page-connexion { padding: 0; align-items: stretch; }

    .carte-connexion {
        max-width: none;
        min-height: 100vh;
        border-radius: 0;
        box-shadow: none;
        padding: 2.2rem 1.25rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

/* --- Confort visuel ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
