/* ============================================================
   SchoolSafe — lot D1b : les deux premiers écrans.
   Maquette validée : docs/maquettes/connexion-v1.html.
   Écran 1 : accueil bleu. Écran 2 : authentification en relief
   (« 3D UI × Neumorphism »), aux couleurs SchoolSafe.
   Polices système uniquement ; aucune ressource externe.
   Remplace schoolsafe-access.css sur la page de connexion.
   ============================================================ */

#ss-blue {
  --b1: #0b2a6f; --b2: #123d9c; --b3: #1d5fd1; --cy: #5ad1ff; --or: #f5b700;
  --ne: #e9eef3; --ne-d: #c9d3de; --ne-l: #ffffff;
  --txt: #1b2533; --sec: #5b6878; --bleu: #2357d6;
  --vert: #0f9d6b; --vert-txt: #0b7a53; --err: #b02a1e;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- Habillage Rosario masqué : les écrans couvrent la page ---------- */
html:has(#ss-blue), body:has(#ss-blue), html.ss-entree-page, html.ss-entree-page body {
  overflow: hidden !important;
  background: var(--ne, #e9eef3) !important;
}
body:has(#ss-blue) :is(#menu, #footer, .ss-splash) { display: none !important; }

#ss-blue {
  position: fixed; inset: 0; z-index: 10000;
  margin: 0; padding: 0; overflow: hidden;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--txt); background: var(--ne); text-align: left;
  -webkit-text-size-adjust: 100%;
}
#ss-blue, #ss-blue *, #ss-blue *::before, #ss-blue *::after { box-sizing: border-box; }
#ss-blue :is(h1, p) { margin: 0; }
#ss-blue svg { display: inline-block; vertical-align: middle; }
#ss-blue :is(a, button, input, summary):focus-visible { outline: 3px solid var(--bleu); outline-offset: 3px; }
#ss-blue .ss-e-sr {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Écrans et glissement de l'un à l'autre ---------- */
#ss-blue .ss-e-screen {
  position: absolute; inset: 0; overflow-x: hidden; overflow-y: auto;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  visibility: hidden; opacity: 0; pointer-events: none;
  transition: opacity .6s var(--ease), transform .7s var(--ease), visibility 0s linear .7s;
}
#ss-blue .ss-e-splash { transform: translateY(-28px) scale(1.02); }
#ss-blue .ss-e-auth { transform: translateX(36px); }
#ss-blue .ss-e-screen.is-on {
  visibility: visible; opacity: 1; transform: none; pointer-events: auto;
  transition: opacity .6s var(--ease), transform .7s var(--ease), visibility 0s;
}

/* ============================================================
   ÉCRAN 1 — ACCUEIL BLEU
   ============================================================ */
#ss-blue .ss-e-splash {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 100%; padding: 64px 24px 32px; text-align: center; color: #fff;
  background: radial-gradient(120% 80% at 50% 0%, var(--b3) 0%, var(--b2) 40%, var(--b1) 100%);
}
#ss-blue .ss-e-bub {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.28), rgba(255,255,255,.04) 60%);
  border: 1px solid rgba(255,255,255,.14);
  animation: ss-e-flot 9s ease-in-out infinite alternate;
}
#ss-blue .ss-e-bub--1 { width: 150px; height: 150px; left: -40px; top: 12%; }
#ss-blue .ss-e-bub--2 { width: 90px; height: 90px; right: -20px; bottom: 18%; animation-delay: -3s; }
#ss-blue .ss-e-bub--3 { width: 60px; height: 60px; left: 10%; bottom: 8%; animation-delay: -6s; }
@keyframes ss-e-flot { to { transform: translate(14px, -22px); } }

#ss-blue .ss-e-note {
  position: absolute; top: 18px; right: 18px; display: flex; gap: 8px; align-items: flex-start;
  font-size: 12px; font-style: italic; text-align: right; color: #d6e5ff; line-height: 1.35;
}
#ss-blue .ss-e-note svg { width: 18px; height: 18px; color: var(--cy); flex-shrink: 0; }

#ss-blue .ss-e-splash-center { position: relative; display: flex; flex-direction: column; align-items: center; max-width: 560px; }
#ss-blue .ss-e-logo {
  width: 118px; height: auto; filter: drop-shadow(0 10px 24px rgba(0,0,0,.35));
  animation: ss-e-pose 1s var(--ease) both;
}
@keyframes ss-e-pose { from { opacity: 0; transform: translateY(16px) scale(.92); } }

#ss-blue .ss-e-tag {
  display: flex; align-items: center; gap: 10px; margin: 18px 0 14px;
  font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: #c8daff;
}
#ss-blue .ss-e-tag i { display: block; width: 26px; height: 1px; background: #7fa6ee; }

#ss-blue .ss-e-slogan {
  font-size: clamp(22px, 6.9vw, 40px); line-height: 1.18; font-weight: 800;
  letter-spacing: -.01em; color: #fff; outline: none;
}
#ss-blue .ss-e-slogan span { display: block; white-space: nowrap; animation: ss-e-pose .9s var(--ease) both; }
#ss-blue .ss-e-slogan span + span { animation-delay: .12s; }
#ss-blue .ss-e-slogan em { font-style: normal; color: var(--cy); }

#ss-blue .ss-e-desc {
  max-width: 340px; margin: 14px auto 0; font-size: 15px; line-height: 1.55; color: #dce8ff;
  animation: ss-e-pose .9s .24s var(--ease) both;
}

#ss-blue .ss-e-go {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 26px;
  min-height: 52px; padding: 11px 12px 11px 26px; border: 0; border-radius: 40px;
  background: linear-gradient(135deg, #2a62dc, #1747b8); color: #fff;
  font-family: inherit; font-size: 16px; font-weight: 700; line-height: 1.2; cursor: pointer;
  box-shadow: 0 0 0 1px rgba(255,255,255,.18), 0 10px 26px rgba(10,40,120,.55), 0 0 30px rgba(90,209,255,.25);
  animation: ss-e-pose .9s .36s var(--ease) both, ss-e-glow 2.8s 1.4s ease-in-out infinite;
}
#ss-blue .ss-e-go b {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--bleu);
  transition: transform .3s var(--ease);
}
#ss-blue .ss-e-go b svg { width: 18px; height: 18px; }
#ss-blue .ss-e-go:hover b { transform: translateX(3px); }
#ss-blue .ss-e-go:focus-visible { outline-color: #fff; }
@keyframes ss-e-glow {
  50% { box-shadow: 0 0 0 1px rgba(255,255,255,.18), 0 10px 26px rgba(10,40,120,.55), 0 0 46px rgba(90,209,255,.45); }
}

#ss-blue .ss-e-pays {
  display: flex; align-items: center; gap: 8px; margin-top: 22px; white-space: nowrap;
  font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #b9cff7;
}
#ss-blue .ss-e-pays svg { width: 14px; height: 14px; }
#ss-blue .ss-e-line { display: block; width: 30px; height: 1px; background: #5f86d6; }

/* ============================================================
   ÉCRAN 2 — AUTHENTIFICATION EN RELIEF
   ============================================================ */
#ss-blue .ss-e-auth { display: flex; flex-direction: column; min-height: 100%; background: var(--ne); }

#ss-blue .ss-e-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; }
#ss-blue .ss-e-brand {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 8px 4px 4px;
  border: 0; border-radius: 14px; background: transparent; cursor: pointer;
  font-family: inherit; font-size: 19px; font-weight: 800; line-height: 1; color: var(--b1);
}
#ss-blue .ss-e-brand img { width: 30px; height: auto; }
#ss-blue .ss-e-brand b { color: #8a5d00; font-weight: 800; } /* or SchoolSafe assombri : contraste ≥ 4,5:1 */
#ss-blue .ss-e-lang { display: flex; gap: 8px; }
#ss-blue .ss-e-lang a {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 36px;
  padding: 6px 10px; border-radius: 12px; background: var(--ne); color: var(--sec);
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-decoration: none;
  box-shadow: 3px 3px 6px var(--ne-d), -3px -3px 6px var(--ne-l);
  transition: box-shadow .2s, color .2s;
}
#ss-blue .ss-e-lang a.is-on { color: var(--bleu); box-shadow: inset 2px 2px 5px var(--ne-d), inset -2px -2px 5px var(--ne-l); }

#ss-blue .ss-e-wrap {
  flex: 1 0 auto; display: flex; flex-direction: column; gap: 22px;
  width: 100%; max-width: 1040px; margin: 0 auto; padding: 4px 18px 18px;
}

/* --- Visuel : cadenas flottant --- */
#ss-blue .ss-e-vis {
  position: relative; flex: 0 0 auto; height: 210px; border-radius: 28px; overflow: hidden;
  display: flex; align-items: center; justify-content: center; background: var(--ne);
  box-shadow: inset 8px 8px 18px var(--ne-d), inset -8px -8px 18px var(--ne-l);
}
#ss-blue .ss-e-ring {
  position: absolute; border-radius: 50%; border: 1px solid rgba(160,175,195,.38);
  animation: ss-e-onde 4s ease-in-out infinite;
}
#ss-blue .ss-e-ring--1 { width: 190px; height: 190px; }
#ss-blue .ss-e-ring--2 { width: 260px; height: 260px; animation-delay: -2s; }
@keyframes ss-e-onde { 0%, 100% { transform: scale(1); opacity: .55; } 50% { transform: scale(1.05); opacity: 1; } }

#ss-blue .ss-e-lock {
  position: relative; width: 118px; height: 150px; transform: scale(.82);
  transition: opacity .35s, transform .45s var(--ease);
  animation: ss-e-flotte 3.2s ease-in-out infinite;
}
@keyframes ss-e-flotte { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
#ss-blue .ss-e-shackle {
  position: absolute; left: 24px; top: 0; width: 70px; height: 80px;
  border: 14px solid #dbe2ea; border-bottom: 0; border-radius: 36px 36px 0 0;
  box-shadow: inset 3px 3px 6px #b9c4d0, 3px -2px 6px #fff;
  transform-origin: 56px 80px; transition: transform .55s var(--ease);
}
#ss-blue .ss-e-body {
  position: absolute; left: 0; bottom: 0; width: 118px; height: 86px; border-radius: 24px;
  background: linear-gradient(145deg, #f4f7fa, #d6dee7);
  box-shadow: 10px 10px 22px #b7c2ce, -8px -8px 18px #fff;
}
#ss-blue .ss-e-key { position: absolute; left: 50%; top: 50%; width: 18px; height: 30px; margin: -15px 0 0 -9px; }
#ss-blue .ss-e-key::before { content: ""; position: absolute; top: 0; left: 0; width: 18px; height: 18px; border-radius: 50%; background: #2b3442; }
#ss-blue .ss-e-key::after { content: ""; position: absolute; top: 12px; left: 6px; width: 6px; height: 16px; border-radius: 3px; background: #2b3442; }
#ss-blue .ss-e-dot {
  position: absolute; right: 14px; top: 12px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--bleu); box-shadow: 0 0 8px var(--bleu); animation: ss-e-blink 2s infinite;
}
@keyframes ss-e-blink { 50% { opacity: .3; } }

#ss-blue .ss-e-spin, #ss-blue .ss-e-ok {
  position: absolute; display: none; align-items: center; justify-content: center;
  width: 110px; height: 110px; border-radius: 50%; background: var(--ne);
  box-shadow: 10px 10px 22px var(--ne-d), -10px -10px 22px var(--ne-l);
}
#ss-blue .ss-e-spin::after {
  content: ""; width: 62px; height: 62px; border-radius: 50%;
  border: 5px solid #d3dbe4; border-top-color: var(--bleu); animation: ss-e-rot .8s linear infinite;
}
@keyframes ss-e-rot { to { transform: rotate(360deg); } }
#ss-blue .ss-e-ok svg { width: 58px; height: 58px; }
#ss-blue .ss-e-ok path {
  fill: none; stroke: var(--vert); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 60; stroke-dashoffset: 60;
}

/* États : open → load (chargement) → done (coche) ; err (tremblement). */
#ss-blue .ss-e-vis.is-open .ss-e-shackle { transform: translateY(-14px) rotate(-28deg); }
#ss-blue .ss-e-vis:is(.is-load, .is-done) .ss-e-lock { opacity: 0; transform: scale(.6); }
#ss-blue .ss-e-vis.is-load .ss-e-spin { display: flex; animation: ss-e-fondu .35s both; }
#ss-blue .ss-e-vis.is-done .ss-e-ok { display: flex; animation: ss-e-gonfle .55s var(--ease) both; }
#ss-blue .ss-e-vis.is-done .ss-e-ok path { animation: ss-e-trace .55s .2s var(--ease) forwards; }
@keyframes ss-e-fondu { from { opacity: 0; transform: scale(.85); } }
@keyframes ss-e-gonfle { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
@keyframes ss-e-trace { to { stroke-dashoffset: 0; } }
#ss-blue .is-shake { animation: ss-e-shake .45s; }
@keyframes ss-e-shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

/* --- Formulaire natif Rosario --- */
#ss-blue #loginform.ss-e-form {
  flex: 1 1 0; min-width: 0; width: 100%; max-width: 460px; margin: 0 auto; padding: 0;
  display: flex; flex-direction: column; justify-content: center;
  background: transparent; border: 0; box-shadow: none;
}
#ss-blue .ss-e-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .24em; color: var(--bleu); }
#ss-blue .ss-e-title { margin: 6px 0; font-size: clamp(24px, 6.4vw, 30px); line-height: 1.12; font-weight: 800; color: #1f2a38; outline: none; }
#ss-blue .ss-e-help { margin-bottom: 14px; font-size: 14px; line-height: 1.5; color: var(--sec); }

#ss-blue .ss-e-msg { min-height: 0; margin: 0 0 4px; font-size: 14px; line-height: 1.45; }
#ss-blue .ss-e-msg:empty { margin: 0; }
#ss-blue .ss-e-msg :is(.error, .updated, .ss-e-msg-text) {
  margin: 0 0 12px; padding: 10px 14px; border-radius: 14px; background: var(--ne);
  box-shadow: inset 3px 3px 7px var(--ne-d), inset -3px -3px 7px var(--ne-l);
  overflow-wrap: anywhere;
}
#ss-blue .ss-e-msg :is(.error, .is-error) { color: var(--err); }
#ss-blue .ss-e-msg :is(.updated, .is-note) { color: #1d4fbf; }
#ss-blue .ss-e-msg .is-success { color: var(--vert-txt); }
#ss-blue .ss-e-msg :is(p, ul) { margin: 0; }
#ss-blue .ss-e-msg ul { padding-left: 18px; }
#ss-blue .ss-e-msg img { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }

#ss-blue .ss-e-field { margin-bottom: 14px; }
#ss-blue .ss-e-field label {
  display: block; margin-bottom: 7px; font-size: 12px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--sec);
}
#ss-blue .ss-e-inp {
  display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 6px 0 14px;
  border-radius: 16px; background: var(--ne);
  box-shadow: inset 5px 5px 10px var(--ne-d), inset -5px -5px 10px var(--ne-l);
  transition: box-shadow .25s;
}
#ss-blue .ss-e-inp:focus-within {
  box-shadow: inset 5px 5px 10px var(--ne-d), inset -5px -5px 10px var(--ne-l), 0 0 0 2px rgba(35,87,214,.55);
}
#ss-blue .ss-e-inp > svg { width: 20px; height: 20px; color: #5b6878; flex-shrink: 0; }
#ss-blue #loginform .ss-e-inp input {
  flex: 1; min-width: 0; width: auto; height: 100%; min-height: 0; margin: 0; padding: 0;
  border: 0; border-radius: 0; background: transparent; box-shadow: none; outline: 0;
  font-family: inherit; font-size: 16px; font-weight: 400; line-height: 1.2; letter-spacing: .02em; color: var(--txt);
  -webkit-appearance: none; appearance: none;
}
#ss-blue #loginform .ss-e-inp input::placeholder { color: #6b7787; opacity: 1; }
#ss-blue #loginform .ss-e-inp input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 40px var(--ne) inset; -webkit-text-fill-color: var(--txt);
}
#ss-blue .ss-e-eye {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px;
  background: transparent; color: #4e5b6b; cursor: pointer;
}
#ss-blue .ss-e-eye svg { width: 20px; height: 20px; }
#ss-blue .ss-e-eye .ss-e-eye-hide, #ss-blue .ss-e-eye[aria-pressed="true"] .ss-e-eye-show { display: none; }
#ss-blue .ss-e-eye[aria-pressed="true"] .ss-e-eye-hide { display: inline-flex; }

#ss-blue .ss-e-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 54px; margin: 6px 0 0; padding: 0 16px; border: 0; border-radius: 18px;
  background: var(--ne); color: var(--bleu); cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 800; line-height: 1; letter-spacing: .16em; text-transform: uppercase;
  box-shadow: 7px 7px 14px var(--ne-d), -7px -7px 14px var(--ne-l);
  transition: box-shadow .2s, transform .2s, color .2s;
}
#ss-blue .ss-e-btn:hover { color: #1b47b3; }
#ss-blue .ss-e-btn:active, #ss-blue .ss-e-btn.is-pressed {
  box-shadow: inset 5px 5px 10px var(--ne-d), inset -5px -5px 10px var(--ne-l); transform: scale(.99);
}
#ss-blue .ss-e-btn.is-pressed { cursor: progress; }
#ss-blue .ss-e-btn.is-success { color: var(--vert-txt); }

#ss-blue .ss-e-row {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px;
  margin-top: 10px; font-size: 14px; color: var(--sec);
}
#ss-blue .ss-e-row a, #ss-blue #loginform a {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--bleu); font-weight: 700; text-decoration: none;
}
#ss-blue .ss-e-row a:hover, #ss-blue #loginform a:hover { text-decoration: underline; text-underline-offset: 3px; }
#ss-blue .ss-e-create { margin-top: 0; }

#ss-blue .ss-e-foot {
  display: flex; justify-content: space-between; gap: 12px; padding: 4px 18px 6px;
  font-size: 12px; color: var(--sec);
}
#ss-blue .ss-e-foot span { display: inline-flex; align-items: center; gap: 6px; }
#ss-blue .ss-e-foot svg { width: 14px; height: 14px; }

#ss-blue .ss-e-legal { padding: 4px 18px 18px; font-size: 12px; line-height: 1.55; color: var(--sec); text-align: center; }
#ss-blue .ss-e-legal details { max-width: 720px; margin: 0 auto 4px; }
#ss-blue .ss-e-legal summary { display: inline-flex; align-items: center; min-height: 32px; cursor: pointer; font-weight: 700; color: #3f4b5b; }
#ss-blue .ss-e-legal details p { margin: 4px 0 8px; text-align: left; overflow-wrap: anywhere; }
#ss-blue .ss-e-legal a { color: var(--bleu); font-weight: 700; text-underline-offset: 3px; }

/* --- Petits téléphones --- */
@media (max-width: 380px) {
  #ss-blue .ss-e-splash { padding: 60px 18px 28px; }
  #ss-blue .ss-e-wrap { padding: 2px 14px 14px; gap: 18px; }
  #ss-blue .ss-e-bar { padding: 12px 14px; }
}
@media (max-height: 640px) and (max-width: 859px) {
  #ss-blue .ss-e-vis { height: 170px; }
  #ss-blue .ss-e-lock { transform: scale(.7); }
}

/* --- Ordinateur : deux colonnes, comme la maquette --- */
@media (min-width: 860px) {
  #ss-blue .ss-e-logo { width: 140px; }
  #ss-blue .ss-e-desc { max-width: 420px; font-size: 16px; }
  #ss-blue .ss-e-note { top: 26px; right: 30px; font-size: 13px; }
  #ss-blue .ss-e-bar { padding: 18px 34px; }
  #ss-blue .ss-e-wrap { flex-direction: row; align-items: stretch; gap: 40px; padding: 16px 34px 30px; }
  #ss-blue .ss-e-vis { flex: 0 0 42%; height: auto; min-height: 440px; }
  #ss-blue .ss-e-lock { transform: none; }
  #ss-blue .ss-e-ring--1 { width: 230px; height: 230px; }
  #ss-blue .ss-e-ring--2 { width: 320px; height: 320px; }
  #ss-blue #loginform.ss-e-form { margin: 0; }
  #ss-blue .ss-e-foot { padding: 0 34px 6px; }
}

/* --- Mouvement réduit : aucun déplacement, états affichés directement --- */
@media (prefers-reduced-motion: reduce) {
  #ss-blue *, #ss-blue *::before, #ss-blue *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    animation-delay: 0s !important; transition-duration: .001ms !important; transition-delay: 0s !important;
  }
  #ss-blue .ss-e-screen { transform: none !important; }
  #ss-blue .ss-e-lock { translate: none; }
  #ss-blue .ss-e-spin::after { animation: none !important; border-top-color: var(--bleu); border-right-color: var(--bleu); }
  #ss-blue .ss-e-ok path { stroke-dashoffset: 0; }
}
