/* =====================================================================
   GS-COM-SCHOOL — Page de connexion
   Deux colonnes sur grand écran, formulaire seul sur mobile.
   ===================================================================== */

.gs-connexion {
  min-height: 100dvh;
  margin: 0;
  background: linear-gradient(160deg, var(--gs-bleu-900) 0%, var(--gs-bleu) 55%, #0E4A91 100%);
  color: #fff;
  overflow-x: hidden;
}

/* ---------------------------------------------------------------------
   Décor
   Animations lentes et peu nombreuses : sur un téléphone d'entrée de
   gamme, un décor chargé retarderait l'affichage du formulaire.
   --------------------------------------------------------------------- */
.gs-connexion__decor {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.gs-orbe {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .5;
}

.gs-orbe--1 {
  width: 26rem; height: 26rem;
  top: -8rem; right: -6rem;
  background: var(--gs-bleu-400);
  animation: gs-derive 22s ease-in-out infinite alternate;
}
.gs-orbe--2 {
  width: 20rem; height: 20rem;
  bottom: -6rem; left: -5rem;
  background: var(--gs-jaune);
  opacity: .22;
  animation: gs-derive 28s ease-in-out infinite alternate-reverse;
}
.gs-orbe--3 {
  width: 14rem; height: 14rem;
  top: 45%; left: 55%;
  background: #2E7BD6;
  opacity: .3;
  animation: gs-derive 34s ease-in-out infinite alternate;
}

@keyframes gs-derive {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(2.5rem, -2rem, 0) scale(1.12); }
}

/* Trame discrète, rappel du quadrillage d'un cahier */
.gs-grille {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 3rem 3rem;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 25%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 25%, transparent 72%);
}

/* ---------------------------------------------------------------------
   Scène
   --------------------------------------------------------------------- */
.gs-connexion__scene {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  padding: 1.5rem 1rem calc(1.5rem + env(safe-area-inset-bottom));
}

/* Présentation réservée aux grands écrans : sur mobile, l'usager veut
   se connecter, pas lire un argumentaire. */
.gs-connexion__presentation { display: none; }

@media (min-width: 992px) {
  .gs-connexion__presentation {
    display: block;
    flex: 1 1 28rem;
    max-width: 34rem;
  }
}

.gs-connexion__accroche {
  font-size: clamp(1.9rem, 2.6vw, 2.6rem);
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  margin: 0 0 1.25rem;
}

/* Surlignage jaune tracé derrière le texte */
.gs-surligne {
  position: relative;
  display: inline-block;
}
.gs-surligne::after {
  content: "";
  position: absolute;
  left: -.1em;
  right: -.1em;
  bottom: .08em;
  height: .38em;
  background: var(--gs-jaune);
  opacity: .32;
  border-radius: .2em;
  z-index: -1;
}

.gs-connexion__texte {
  font-size: 1.02rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, .84);
  margin-bottom: 1.75rem;
}

.gs-connexion__atouts {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .9rem;
}
.gs-connexion__atouts li {
  display: flex;
  gap: .8rem;
  align-items: flex-start;
  font-size: .95rem;
  color: rgba(255, 255, 255, .8);
  line-height: 1.5;
}
.gs-connexion__atouts i {
  flex: 0 0 auto;
  font-size: 1.1rem;
  color: var(--gs-jaune);
  margin-top: .15rem;
}
.gs-connexion__atouts strong { color: #fff; font-weight: 600; }

/* ---------------------------------------------------------------------
   Panneau du formulaire
   --------------------------------------------------------------------- */
.gs-connexion__panneau {
  flex: 0 1 26rem;
  width: 100%;
  max-width: 26rem;
}

.gs-connexion__carte {
  background: var(--gs-surface);
  color: var(--gs-texte);
  border-radius: var(--gs-rayon-lg);
  padding: 2rem 1.5rem 1.75rem;
  box-shadow: var(--gs-ombre-3);
  /* Liseré clair : détache la carte du dégradé sans trait dur */
  border: 1px solid rgba(255, 255, 255, .18);
}

.gs-connexion__logo { display: block; margin: 0 auto .9rem; }

.gs-connexion__titre {
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  margin: 0 0 .25rem;
  color: var(--gs-texte);
}

.gs-connexion__sous-titre {
  text-align: center;
  color: var(--gs-texte-doux);
  font-size: .92rem;
  margin: 0 0 1.25rem;
}

.gs-connexion__etablissement {
  text-align: center;
  font-size: .85rem;
  color: var(--gs-bleu);
  background: var(--gs-bleu-50);
  border-radius: var(--gs-rayon-sm);
  padding: .5rem .75rem;
  margin: 0 0 1.25rem;
}
[data-theme="sombre"] .gs-connexion__etablissement { color: var(--gs-bleu-400); }

/* Champ avec icône en amorce */
.gs-champ-icone { position: relative; }
.gs-champ-icone > i {
  position: absolute;
  left: .85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gs-texte-doux);
  font-size: 1rem;
  pointer-events: none;
  z-index: 2;
}
.gs-champ-icone .form-control { padding-left: 2.6rem; }

.gs-connexion__aide {
  font-size: .82rem;
  color: var(--gs-texte-doux);
  text-align: center;
  margin: 1.25rem 0 0;
  line-height: 1.5;
}

/* ---------------------------------------------------------------------
   Bloc d'installation
   --------------------------------------------------------------------- */
.gs-installation {
  margin-top: 1rem;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--gs-rayon);
  padding: .9rem 1rem;
  backdrop-filter: blur(8px);
}

.gs-installation summary {
  cursor: pointer;
  font-size: .9rem;
  font-weight: 600;
  color: #fff;
  min-height: var(--gs-tactile);
  display: flex;
  align-items: center;
}

.gs-installation__etapes {
  margin: .75rem 0 0;
  padding-left: 1.25rem;
  font-size: .86rem;
  color: rgba(255, 255, 255, .85);
  line-height: 1.6;
}
.gs-installation__etapes strong { color: #fff; }

.gs-installation__note {
  font-size: .8rem;
  color: rgba(255, 255, 255, .7);
  margin: .7rem 0 0;
  line-height: 1.5;
}

/* ---------------------------------------------------------------------
   Pied
   --------------------------------------------------------------------- */
.gs-connexion__pied {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-top: 1.25rem;
  font-size: .78rem;
  color: rgba(255, 255, 255, .6);
}
.gs-connexion__pied a { color: rgba(255, 255, 255, .8); text-decoration: none; }
.gs-connexion__pied a:hover { color: #fff; text-decoration: underline; }

/* ---------------------------------------------------------------------
   Apparition
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .gs-connexion__carte,
  .gs-connexion__presentation {
    animation: gs-apparition .5s cubic-bezier(.22, .61, .36, 1) both;
  }
  .gs-connexion__presentation { animation-delay: .08s; }
}

@keyframes gs-apparition {
  from { opacity: 0; transform: translateY(1rem); }
  to   { opacity: 1; transform: none; }
}
