/* =====================================================================
   GS-SCHOOL — La page de connexion

   C'est le premier écran que voit une école. Il porte donc trois choses :
   le nom de l'établissement, la promesse du logiciel, et un formulaire
   qui ne fasse hésiter personne.

   Le fond est un bleu nuit profond parcouru de trois halos — bleu, jaune,
   rouge, les couleurs de GS-SCHOOL — qui dérivent lentement. La carte de
   connexion est en verre dépoli : elle laisse deviner le fond sans jamais
   gêner la lecture. Tout ce qui bouge s'arrête si le visiteur a demandé
   à son système de réduire les animations.
   ===================================================================== */

:root {
    --lg-nuit:    #070E24;
    --lg-nuit-2:  #0C1738;
    --lg-bleu:    #2563EB;
    --lg-bleu-c:  #60A5FA;
    --lg-jaune:   #FACC15;
    --lg-rouge:   #DC2626;
    --lg-texte:   #EAF1FF;
    --lg-doux:    rgba(234, 241, 255, .62);
    --lg-verre:   rgba(255, 255, 255, .055);
    --lg-bord:    rgba(255, 255, 255, .13);
}

html, body { height: 100%; }

body.lg-body {
    margin: 0;
    min-height: 100vh;
    background: var(--lg-nuit);
    color: var(--lg-texte);
    font-family: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
    overflow-x: hidden;
}

/* ------------------------------------------------------------------ fond */
.lg-fond { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--lg-nuit); }

/* Le dégradé de base, qui respire */
.lg-fond::before {
    content: '';
    position: absolute; inset: -30%;
    background: radial-gradient(60% 55% at 22% 18%, rgba(37, 99, 235, .55), transparent 62%),
                radial-gradient(52% 48% at 82% 26%, rgba(29, 78, 216, .40), transparent 60%),
                radial-gradient(70% 60% at 50% 100%, rgba(12, 23, 56, .95), transparent 70%);
    animation: lg-respire 22s ease-in-out infinite alternate;
}

/* Trois halos aux couleurs du logiciel, qui dérivent */
.lg-halo { position: absolute; border-radius: 50%; filter: blur(110px); opacity: .40; }
.lg-halo-1 { width: 620px; height: 620px; background: var(--lg-bleu);  top: -220px; left: -160px;  animation: lg-derive-1 26s ease-in-out infinite alternate; }
.lg-halo-2 { width: 430px; height: 430px; background: var(--lg-jaune); bottom: -300px; right: -210px; opacity: .13; animation: lg-derive-2 31s ease-in-out infinite alternate; }
.lg-halo-3 { width: 400px; height: 400px; background: var(--lg-rouge); top: 40%; left: 40%; opacity: .14; animation: lg-derive-3 37s ease-in-out infinite alternate; }

/* La grille : une trame très discrète, comme un papier millimétré */
.lg-grille {
    position: absolute; inset: 0;
    background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(90% 75% at 50% 40%, #000 30%, transparent 78%);
    -webkit-mask-image: radial-gradient(90% 75% at 50% 40%, #000 30%, transparent 78%);
}

@keyframes lg-respire  { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.08) translate(-2%, -2%); } }
@keyframes lg-derive-1 { from { transform: translate(0, 0); }      to { transform: translate(120px, 90px); } }
@keyframes lg-derive-2 { from { transform: translate(0, 0); }      to { transform: translate(-130px, -70px); } }
@keyframes lg-derive-3 { from { transform: translate(-50%, -50%); } to { transform: translate(-32%, -64%); } }

/* ---------------------------------------------------------------- écran */
.lg-ecran {
    position: relative; z-index: 1;
    min-height: 100vh;
    display: grid; grid-template-columns: 1fr;
    align-items: center;
    padding: 28px 18px;
    gap: 40px;
}
@media (min-width: 1100px) {
    .lg-ecran { grid-template-columns: 1.02fr .98fr; padding: 40px 6vw; gap: 64px; }
}

/* --------------------------------------------------------- panneau marque */
.lg-marque { display: none; }
@media (min-width: 1100px) { .lg-marque { display: block; max-width: 620px; } }

.lg-logo {
    width: 76px; height: 76px; border-radius: 22px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--lg-bleu), #1E3A8A);
    box-shadow: 0 22px 46px -12px rgba(37, 99, 235, .75),
                inset 0 1px 0 rgba(255, 255, 255, .28);
    font-size: 2rem; color: #fff; overflow: hidden; margin-bottom: 26px;
}
.lg-logo img { width: 100%; height: 100%; object-fit: cover; }

.lg-marque h1 {
    font-size: 2.7rem; line-height: 1.08; font-weight: 800;
    letter-spacing: -.035em; margin: 0 0 16px; color: #fff;
}
.lg-marque h1 em { font-style: normal; color: var(--lg-jaune); }

.lg-baseline { font-size: 1.02rem; line-height: 1.65; color: var(--lg-doux); max-width: 530px; margin: 0; }

.lg-atouts { display: grid; gap: 12px; margin-top: 34px; max-width: 530px; }
.lg-atout {
    display: flex; gap: 14px; align-items: flex-start;
    padding: 13px 16px; border-radius: 15px;
    background: var(--lg-verre); border: 1px solid var(--lg-bord);
    backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px);
}
.lg-atout i {
    width: 38px; height: 38px; border-radius: 11px; flex: none;
    display: flex; align-items: center; justify-content: center;
    background: rgba(37, 99, 235, .28); color: var(--lg-bleu-c); font-size: .92rem;
}
.lg-atout b { display: block; font-size: .92rem; color: #fff; font-weight: 700; }
.lg-atout span { display: block; font-size: .8rem; color: var(--lg-doux); line-height: 1.5; margin-top: 2px; }

.lg-drapeau {
    height: 6px; width: 260px; border-radius: 6px; margin-top: 34px;
    background: linear-gradient(90deg, var(--lg-bleu) 0 34%, var(--lg-jaune) 34% 67%, var(--lg-rouge) 67% 100%);
    box-shadow: 0 0 30px rgba(37, 99, 235, .55);
}

/* ------------------------------------------------------------ carte verre */
.lg-cote { display: flex; justify-content: center; }

.lg-carte {
    width: 100%; max-width: 430px;
    border-radius: 26px; padding: 34px 32px 28px;
    background: linear-gradient(160deg, rgba(255,255,255,.10), rgba(255,255,255,.045));
    border: 1px solid var(--lg-bord);
    backdrop-filter: blur(22px) saturate(140%);
    -webkit-backdrop-filter: blur(22px) saturate(140%);
    box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .85),
                inset 0 1px 0 rgba(255, 255, 255, .22);
    position: relative;
}
/* Un liseré lumineux en haut de la carte */
.lg-carte::before {
    content: ''; position: absolute; left: 32px; right: 32px; top: -1px; height: 2px; border-radius: 2px;
    background: linear-gradient(90deg, transparent, var(--lg-bleu-c), var(--lg-jaune), transparent);
    opacity: .8;
}

.lg-entete-mobile { text-align: center; margin-bottom: 22px; }
.lg-entete-mobile .lg-logo { margin: 0 auto 14px; width: 62px; height: 62px; border-radius: 18px; font-size: 1.6rem; }
.lg-entete-mobile h1 { font-size: 1.28rem; font-weight: 800; color: #fff; margin: 0; letter-spacing: -.02em; }
.lg-entete-mobile p { font-size: .76rem; color: var(--lg-doux); margin: 4px 0 0; }
@media (min-width: 1100px) { .lg-entete-mobile { display: none; } }

.lg-carte h2 { font-size: 1.4rem; font-weight: 800; color: #fff; margin: 0 0 4px; letter-spacing: -.02em; }
.lg-carte .lg-sous { font-size: .82rem; color: var(--lg-doux); margin: 0 0 24px; }

/* ---------------------------------------------------------------- champs */
.lg-champ { margin-bottom: 17px; }
.lg-champ label {
    display: block; font-size: .74rem; font-weight: 700; letter-spacing: .06em;
    text-transform: uppercase; color: var(--lg-doux); margin-bottom: 7px;
}
.lg-boite { position: relative; }
.lg-boite > i.lg-icone {
    position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
    color: rgba(234, 241, 255, .45); font-size: .88rem; pointer-events: none; transition: color .18s;
}
.lg-boite input {
    width: 100%; padding: 14px 44px 14px 42px;
    border-radius: 14px; font-size: .94rem; color: #fff;
    background: rgba(8, 15, 38, .55);
    border: 1px solid var(--lg-bord);
    outline: none; transition: border-color .18s, box-shadow .18s, background .18s;
    -webkit-appearance: none; appearance: none;
}
.lg-boite input::placeholder { color: rgba(234, 241, 255, .3); }
.lg-boite input:focus {
    border-color: var(--lg-bleu-c);
    background: rgba(8, 15, 38, .75);
    box-shadow: 0 0 0 4px rgba(96, 165, 250, .18), 0 0 26px -6px rgba(96, 165, 250, .55);
}
.lg-boite input:focus ~ i.lg-icone { color: var(--lg-bleu-c); }
/* Le remplissage automatique de Chrome repeint le champ en blanc : on le rhabille */
.lg-boite input:-webkit-autofill,
.lg-boite input:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff;
    -webkit-box-shadow: 0 0 0 1000px #0B1633 inset;
    caret-color: #fff;
}
.lg-oeil {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    background: none; border: 0; color: rgba(234, 241, 255, .45);
    padding: 8px 10px; cursor: pointer; border-radius: 10px; transition: color .18s;
}
.lg-oeil:hover { color: #fff; }
.lg-aide { font-size: .73rem; color: rgba(234, 241, 255, .45); margin-top: 6px; }

/* --------------------------------------------------------------- bouton */
.lg-entrer {
    width: 100%; margin-top: 8px; padding: 15px 18px;
    border: 0; border-radius: 14px; cursor: pointer;
    font-size: .97rem; font-weight: 700; color: #fff; letter-spacing: .01em;
    background: linear-gradient(135deg, #3B82F6, var(--lg-bleu) 55%, #1E3A8A);
    box-shadow: 0 16px 34px -12px rgba(37, 99, 235, .95), inset 0 1px 0 rgba(255,255,255,.25);
    position: relative; overflow: hidden;
    transition: transform .16s, box-shadow .16s, filter .16s;
}
.lg-entrer:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 22px 42px -12px rgba(37, 99, 235, 1); }
.lg-entrer:active:not(:disabled) { transform: translateY(0); }
.lg-entrer:disabled { filter: grayscale(.7); opacity: .6; cursor: not-allowed; }
/* Le reflet qui traverse le bouton au survol */
.lg-entrer::after {
    content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.32), transparent);
    transform: skewX(-18deg); transition: left .6s ease;
}
.lg-entrer:hover:not(:disabled)::after { left: 130%; }

/* --------------------------------------------------------------- divers */
.lg-alerte {
    display: flex; gap: 11px; align-items: flex-start;
    padding: 12px 15px; border-radius: 13px; margin-bottom: 15px;
    font-size: .84rem; line-height: 1.5;
    background: rgba(220, 38, 38, .15); border: 1px solid rgba(248, 113, 113, .38); color: #FECACA;
}
.lg-alerte i { margin-top: 2px; }
.lg-alerte-info { background: rgba(37, 99, 235, .16); border-color: rgba(96, 165, 250, .38); color: #DBEAFE; }
.lg-alerte-succes { background: rgba(21, 128, 61, .18); border-color: rgba(74, 222, 128, .38); color: #BBF7D0; }

.lg-lien { display: block; text-align: center; margin-top: 18px; font-size: .84rem; color: var(--lg-bleu-c); text-decoration: none; }
.lg-lien:hover { color: #fff; text-decoration: underline; }

.lg-appli {
    margin-top: 22px; padding: 16px; border-radius: 16px; text-align: center;
    background: rgba(250, 204, 21, .07); border: 1px dashed rgba(250, 204, 21, .32);
}
.lg-appli h6 { font-size: .85rem; font-weight: 800; color: var(--lg-jaune); margin: 0 0 4px; }
.lg-appli p  { font-size: .76rem; color: var(--lg-doux); margin: 0 0 12px; line-height: 1.5; }
.lg-appli button {
    width: 100%; padding: 11px 14px; border: 0; border-radius: 12px; cursor: pointer;
    font-size: .85rem; font-weight: 700; color: #3B2A00;
    background: linear-gradient(135deg, #FDE68A, var(--lg-jaune));
    transition: transform .16s;
}
.lg-appli button:hover { transform: translateY(-2px); }
.lg-appli .lg-indice { font-size: .72rem; color: var(--lg-doux); margin-top: 9px; }

.lg-pied {
    text-align: center; margin-top: 22px;
    font-size: .72rem; color: rgba(234, 241, 255, .38);
}
.lg-pied a { color: rgba(234, 241, 255, .6); text-decoration: none; }
.lg-pied a:hover { color: #fff; }

/* Le bandeau des cycles, sous la carte : la promesse en un coup d'œil */
.lg-cycles {
    display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; margin-top: 20px;
}
.lg-cycle {
    font-size: .7rem; font-weight: 700; letter-spacing: .03em;
    padding: 5px 11px; border-radius: 999px;
    background: rgba(255, 255, 255, .06); border: 1px solid var(--lg-bord); color: var(--lg-doux);
}

/* --------------------------------------------- confort et accessibilité */
@media (prefers-reduced-motion: reduce) {
    .lg-fond::before, .lg-halo { animation: none !important; }
    .lg-entrer, .lg-entrer::after, .lg-appli button { transition: none; }
}

@media (max-width: 420px) {
    .lg-carte { padding: 26px 20px 22px; border-radius: 22px; }
    .lg-ecran { padding: 20px 12px; }
}

/* La modale d'installation, sur fond sombre */
.lg-modale .modal-content {
    background: #0C1738; color: var(--lg-texte);
    border: 1px solid var(--lg-bord); border-radius: 20px;
}
.lg-modale .modal-header, .lg-modale .modal-footer { border-color: rgba(255,255,255,.1); }
.lg-modale .btn-close { filter: invert(1) grayscale(1) brightness(2); }
.lg-etape { display: flex; gap: 13px; align-items: flex-start; margin-bottom: 14px; text-align: left; }
.lg-etape-num {
    width: 28px; height: 28px; border-radius: 9px; flex: none; background: var(--lg-bleu);
    color: #fff; font-weight: 800; font-size: .78rem;
    display: flex; align-items: center; justify-content: center;
}
.lg-etape .lg-tx { font-size: .86rem; line-height: 1.55; color: var(--lg-doux); }
.lg-etape .lg-tx b { color: #fff; }
