/* =====================================================================
   EASY SCHOOL — Page de connexion (reproduction fidèle de la maquette)
   Feuille autonome (préfixe .es-lg-) pour éviter tout conflit.
   ===================================================================== */
:root {
    --lg-blue: #2f7bf6;
    --lg-blue-d: #1d4ed8;
    --lg-navy: #16233f;
    --lg-ink: #1e2a44;
    --lg-muted: #7688a6;
    --lg-line: #e6ecf6;
    --lg-tint1: #eef5ff;
    --lg-tint2: #d9e8ff;
    --lg-page1: #eaf2ff;
    --lg-page2: #dbe8fd;
}

.es-lg-body {
    margin: 0; min-height: 100vh;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    color: var(--lg-ink);
    display: grid; place-items: center; padding: 26px;
    position: relative; overflow-x: hidden;
    background:
        radial-gradient(1000px 700px at 108% -8%, #cfe1ff 0%, transparent 55%),
        radial-gradient(900px 700px at -8% 108%, #d6e6ff 0%, transparent 55%),
        linear-gradient(135deg, var(--lg-page1), var(--lg-page2));
}
/* Vagues décoratives de la page */
.es-lg-body::before, .es-lg-body::after {
    content: ''; position: fixed; z-index: 0; border-radius: 46% 54% 60% 40%;
    background: linear-gradient(135deg, rgba(94,150,255,.22), rgba(59,130,246,.10));
    filter: blur(4px);
}
.es-lg-body::before { width: 520px; height: 520px; top: -190px; right: -150px; }
.es-lg-body::after  { width: 460px; height: 460px; bottom: -180px; left: -150px; border-radius: 54% 46% 40% 60%; }

/* Conteneur principal */
.es-lg-card {
    position: relative; z-index: 1;
    width: 100%; max-width: 1120px;
    background: #fff; border-radius: 30px; overflow: hidden;
    box-shadow: 0 40px 90px -30px rgba(26, 51, 105, .45), 0 0 0 1px rgba(255,255,255,.6);
    display: grid; grid-template-columns: 1.06fr .94fr; min-height: 640px;
}

/* ----------------------------------------------- Panneau gauche (branding) */
.es-lg-brand {
    position: relative; padding: 52px 54px;
    background: linear-gradient(160deg, var(--lg-tint1) 0%, var(--lg-tint2) 100%);
    display: flex; flex-direction: column; overflow: hidden;
}
.es-lg-brand-dots {
    position: absolute; top: 46px; right: 54px;
    display: grid; grid-template-columns: repeat(3, 7px); gap: 12px;
}
.es-lg-brand-dots i { width: 7px; height: 7px; border-radius: 50%; background: #2f7bf6; opacity: .5; }
/* Filigranes */
.es-lg-wm { position: absolute; color: #2f7bf6; opacity: .07; pointer-events: none; }
.es-lg-wm.w1 { font-size: 130px; top: 92px; right: 78px; }
.es-lg-wm.w2 { font-size: 92px;  top: 300px; right: 150px; opacity: .06; }
.es-lg-wm.w3 { font-size: 100px; top: 340px; left: 40px; opacity: .06; }

.es-lg-welcome { position: relative; z-index: 2; }
.es-lg-hi { font-size: 1.7rem; font-weight: 500; color: var(--lg-ink); margin: 6px 0 2px; }
.es-lg-title { font-size: 3.15rem; font-weight: 800; letter-spacing: -1px; line-height: 1.05; margin: 0; color: var(--lg-navy); }
.es-lg-title span { color: var(--lg-blue); }
.es-lg-sub { font-size: 1.32rem; font-weight: 700; color: var(--lg-ink); margin: 16px 0 0; }
.es-lg-rule { width: 90px; height: 4px; border-radius: 4px; background: var(--lg-blue); margin: 16px 0 20px; }
.es-lg-desc { font-size: .98rem; line-height: 1.7; color: #55668a; max-width: 30em; }

/* Badges de réassurance sous la description */
.es-lg-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.es-lg-badges span {
    display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700;
    color: #1d4ed8; background: #fff; border: 1px solid #d9e6ff; border-radius: 999px; padding: .38rem .8rem;
    box-shadow: 0 6px 16px -10px rgba(37,99,235,.5);
}
.es-lg-badges span i { color: #f0a91f; }

/* Illustration (livres + toque) — évocation de la maquette */
.es-lg-illus { position: relative; z-index: 2; margin-top: auto; align-self: center; width: 100%; max-width: 420px; }
.es-lg-illus svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 22px 30px rgba(30,60,120,.22)); }

/* ----------------------------------------------- Panneau droit (formulaire) */
.es-lg-form-wrap {
    padding: 44px 52px; display: flex; flex-direction: column; justify-content: center;
    background: #fff;
}
.es-lg-logo { text-align: center; margin-bottom: 14px; }
.es-lg-logo img {
    height: 132px; width: auto; max-width: 240px; object-fit: contain;
    padding: 12px 18px; background: #fff; border-radius: 20px;
    box-shadow: 0 18px 44px -18px rgba(13, 59, 138, .38), 0 2px 8px rgba(16, 24, 40, .06);
    border: 1px solid rgba(13, 59, 138, .08);
}

.es-lg-h2 { text-align: center; font-size: 1.42rem; font-weight: 800; color: var(--lg-navy); margin: 6px 0 4px; }
.es-lg-p { text-align: center; font-size: .9rem; color: var(--lg-muted); margin: 0 0 26px; }

.es-lg-field { position: relative; margin-bottom: 16px; }
.es-lg-field > .ic {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    color: #98a6c0; font-size: 1.05rem;
}
.es-lg-field input {
    width: 100%; height: 54px; border: 1.5px solid var(--lg-line); border-radius: 13px;
    padding: 0 46px; font-size: .92rem; color: var(--lg-ink); background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.es-lg-field input::placeholder { color: #9aa7bf; }
.es-lg-field input:focus { outline: none; border-color: var(--lg-blue); box-shadow: 0 0 0 4px rgba(47,123,246,.13); }
.es-lg-eye {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: #98a6c0; width: 38px; height: 38px;
    border-radius: 9px; cursor: pointer; display: grid; place-items: center;
}
.es-lg-eye:hover { color: var(--lg-blue); background: #f2f6ff; }

.es-lg-row { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 22px; }
.es-lg-check { display: flex; align-items: center; gap: 8px; font-size: .86rem; color: #55668a; cursor: pointer; user-select: none; }
.es-lg-check input { width: 17px; height: 17px; accent-color: var(--lg-blue); cursor: pointer; }
.es-lg-forgot { font-size: .86rem; color: var(--lg-blue); font-weight: 600; }
.es-lg-forgot:hover { text-decoration: underline; }

.es-lg-submit {
    width: 100%; height: 54px; border: none; border-radius: 13px; cursor: pointer;
    background: linear-gradient(100deg, #2f7bf6, #1d4ed8);
    color: #fff; font-size: 1rem; font-weight: 700; letter-spacing: .2px;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    box-shadow: 0 14px 26px -10px rgba(37,99,235,.6); transition: transform .12s, box-shadow .12s;
}
.es-lg-submit:hover { transform: translateY(-1px); box-shadow: 0 18px 30px -10px rgba(37,99,235,.7); }
.es-lg-submit:active { transform: translateY(0); }
.es-lg-submit i { font-size: 1.05rem; }

.es-lg-divider { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: #9aa7bf; font-size: .82rem; }
.es-lg-divider::before, .es-lg-divider::after { content: ''; flex: 1; height: 1px; background: var(--lg-line); }

.es-lg-social { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.es-lg-social a {
    height: 50px; border: 1.5px solid var(--lg-line); border-radius: 13px;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    font-size: .9rem; font-weight: 600; color: #3a4a66; background: #fff; transition: .15s;
}
.es-lg-social a:hover { border-color: #c4d3ee; background: #f7faff; transform: translateY(-1px); }

.es-lg-foot { text-align: center; font-size: .78rem; color: #9aa7bf; margin: 26px 0 0; }
.es-lg-demo { text-align: center; font-size: .78rem; color: var(--lg-muted); margin: 10px 0 0; }
.es-lg-demo strong { color: var(--lg-blue); }

/* Alertes flash */
.es-lg-form-wrap .alert { border-radius: 12px; font-size: .84rem; }

/* =====================================================================
   Accès rapides — Espace Professeur · Espace Parent · Médiathèque
   Cartes premium (icône en pastille dégradée, titres soignés, survol
   avec halo et flèche animée). Placées sous le formulaire de connexion.
   ===================================================================== */
.es-lg-apps { margin-top: 24px; }

/* Séparateur libellé « Vous êtes enseignant ou parent ? » */
.es-lg-apps-sep {
    display: flex; align-items: center; gap: 14px;
    font-size: .8rem; font-weight: 700; color: #7688a6; letter-spacing: .01em;
    text-align: center; white-space: nowrap; margin-bottom: 16px;
}
.es-lg-apps-sep::before, .es-lg-apps-sep::after {
    content: ''; flex: 1; height: 1px;
    background: linear-gradient(90deg, transparent, var(--lg-line) 60%, var(--lg-line));
}
.es-lg-apps-sep::after { background: linear-gradient(270deg, transparent, var(--lg-line) 60%, var(--lg-line)); }

.es-lg-apps-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Carte d'accès */
.es-lg-app {
    position: relative; display: flex; align-items: center; gap: 13px;
    padding: 15px 16px; border-radius: 16px; text-decoration: none;
    background: #fff; border: 1.5px solid var(--lg-line);
    box-shadow: 0 8px 22px -16px rgba(26, 51, 105, .5);
    overflow: hidden; isolation: isolate;
    transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .18s, border-color .18s;
}
/* Voile dégradé qui se révèle au survol (teinte propre à chaque espace) */
.es-lg-app::before {
    content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0;
    transition: opacity .2s;
}
.es-lg-app:hover { transform: translateY(-3px); box-shadow: 0 18px 34px -18px rgba(26, 51, 105, .55); }
.es-lg-app:hover::before { opacity: 1; }

/* Pastille d'icône */
.es-lg-app > i {
    flex: 0 0 auto; width: 46px; height: 46px; border-radius: 13px;
    display: grid; place-items: center; font-size: 1.35rem; color: #fff;
    box-shadow: 0 10px 20px -8px rgba(0,0,0,.4);
    transition: transform .2s;
}
.es-lg-app:hover > i { transform: scale(1.06) rotate(-3deg); }

/* Textes */
.es-lg-app > span { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.es-lg-app > span b { font-size: .92rem; font-weight: 800; color: var(--lg-navy); letter-spacing: -.01em; }
.es-lg-app > span small { font-size: .74rem; color: #7c8bab; margin-top: 2px; font-weight: 500; }

/* Petit chevron discret ancré en haut à droite */
.es-lg-app::after {
    content: '\F135'; font-family: 'bootstrap-icons'; position: absolute;
    top: 12px; right: 13px; font-size: .72rem; color: #c2cee2;
    transition: transform .2s, color .2s;
}
.es-lg-app:hover::after { transform: translateX(3px); }

/* Espace Professeur — bleu / indigo */
.es-lg-app--prof > i { background: linear-gradient(140deg, #3b82f6, #1d4ed8); }
.es-lg-app--prof:hover { border-color: #bcd4ff; }
.es-lg-app--prof::before { background: linear-gradient(140deg, rgba(59,130,246,.10), rgba(29,78,216,.05)); }
.es-lg-app--prof:hover::after { color: #2f7bf6; }

/* Espace Parent — sarcelle / émeraude */
.es-lg-app--parent > i { background: linear-gradient(140deg, #10b981, #0d9488); }
.es-lg-app--parent:hover { border-color: #a7ecd6; }
.es-lg-app--parent::before { background: linear-gradient(140deg, rgba(16,185,129,.10), rgba(13,148,136,.05)); }
.es-lg-app--parent:hover::after { color: #0d9488; }

/* Bannière Médiathèque — pleine largeur, accent doré premium */
.es-lg-media {
    position: relative; display: flex; align-items: center; gap: 14px;
    margin-top: 14px; padding: 15px 18px; border-radius: 16px; text-decoration: none;
    background: linear-gradient(105deg, #fff7e6 0%, #fffdf8 55%, #fff 100%);
    border: 1.5px solid #f6e2b8; overflow: hidden;
    box-shadow: 0 8px 22px -16px rgba(180, 120, 20, .55);
    transition: transform .18s, box-shadow .18s, border-color .18s;
}
.es-lg-media::before {
    content: ''; position: absolute; right: -40px; top: -60px; width: 180px; height: 180px;
    background: radial-gradient(circle, rgba(246,197,23,.18), transparent 70%); pointer-events: none;
}
.es-lg-media:hover { transform: translateY(-3px); border-color: #f0cd7d;
    box-shadow: 0 18px 34px -18px rgba(180, 120, 20, .6); }
.es-lg-media__ic {
    flex: 0 0 auto; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
    color: #fff; font-size: 1.35rem; background: linear-gradient(140deg, #f6b83f, #e08a1e);
    box-shadow: 0 10px 20px -8px rgba(224, 138, 30, .6); transition: transform .2s;
}
.es-lg-media:hover .es-lg-media__ic { transform: scale(1.06) rotate(-3deg); }
.es-lg-media__txt { display: flex; flex-direction: column; line-height: 1.15; flex: 1; min-width: 0; }
.es-lg-media__txt b { font-size: .92rem; font-weight: 800; color: #7a5210; letter-spacing: -.01em; }
.es-lg-media__txt small { font-size: .74rem; color: #a5813f; margin-top: 2px; font-weight: 500; }
.es-lg-media__go {
    flex: 0 0 auto; color: #d69a2a; font-size: 1.1rem;
    transition: transform .2s;
}
.es-lg-media:hover .es-lg-media__go { transform: translateX(5px); }

/* ----------------------------------------------------------- Responsive */
@media (max-width: 900px) {
    .es-lg-card { grid-template-columns: 1fr; max-width: 460px; }
    .es-lg-brand { display: none; }
    .es-lg-form-wrap { padding: 40px 34px; }
}
@media (max-width: 480px) {
    .es-lg-body { padding: 12px; }
    .es-lg-form-wrap { padding: 32px 22px; }
    .es-lg-logo img { height: 104px; padding: 10px 14px; }
}
@media (max-width: 400px) {
    .es-lg-apps-row { grid-template-columns: 1fr; }
}

/* Reflet premium sur les drapeaux du sélecteur de langue */
.lgx-flag { position: relative; }
.lgx-flag::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background: linear-gradient(160deg, rgba(255,255,255,.45), rgba(255,255,255,0) 42%, rgba(0,0,0,.12));
}
.lgx-lang a { transition: background .18s, transform .12s, box-shadow .18s; }
.lgx-lang a:hover .lgx-flag { transform: scale(1.08); }
.lgx-lang a .lgx-flag { transition: transform .18s cubic-bezier(.34,1.56,.64,1); }

/* Devise & mention affective du footer de connexion */
.lgx-foot-devise { font-style: italic; color: #f6c517 !important; font-weight: 600; margin-top: 8px !important; opacity: .95; }
.lgx-foot-love { color: rgba(234,240,251,.8); }
.lgx-foot-love i { color: #ff5a6e; animation: lgxBeat 1.6s ease-in-out infinite; }
@keyframes lgxBeat { 0%,100% { transform: scale(1); } 12% { transform: scale(1.22); } 24% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .lgx-foot-love i { animation: none; } }
@media (max-width: 680px) { .lgx-foot-love { display: none; } }
