/* RAFFINSTOCK — écrans de connexion (connexion, Accès Formation, mot de passe oublié, codes…).
   Grand écran : photo des opérateurs à gauche, ciel et carte vitrée à droite, bandeau des engagements en bas.
   Mobile : photo en tête, carte qui la chevauche, engagements en 2 × 2. Chargée en dernier dans auth.html. */
html body.auth-lg{
  --rs-navy:#0b2a5b;--rs-navy-2:#0a3a7a;--rs-blue:#1559b3;--rs-orange:#f39200;
  --rs-ink:#0b1f3a;--rs-ink-2:#33496b;--rs-ink-3:#5f7290;--rs-line:rgba(11,42,91,.14);
  --bg:#eaf2fc;--surface:rgba(255,255,255,.78);--el:#fff;--border:var(--rs-line);--border-strong:rgba(11,42,91,.22);
  --text:var(--rs-ink);--soft:var(--rs-ink-2);--dim:var(--rs-ink-3);--mute:var(--rs-ink-3);--cyan:var(--rs-blue);
  color-scheme:light;margin:0;min-height:100vh;min-height:100dvh;color:var(--rs-ink);
  font:15px/1.5 'Inter',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
  background:linear-gradient(180deg,#5b9ad8 0%,#9cc3ea 34%,#dbe9f8 70%,#eef4fb 100%)!important;
}
html:has(body.auth-lg){background:#eaf2fc!important}
html body.auth-lg::before,html body.auth-lg::after{display:none!important;content:none!important}
.auth-op-art{display:none!important}

/* ── Photo ── */
.ac-hero{background:#0b2a5b url(/img/connexion-hero.jpg) left top/cover no-repeat}

/* ── Colonne de la carte ── */
html body.auth-lg .auth{position:relative;z-index:1;max-width:none;margin:0;box-sizing:border-box;gap:16px;background:none!important;
  padding:max(26px,env(safe-area-inset-top)) clamp(18px,3.4vw,44px) 30px;justify-content:center}
html body.auth-lg .auth>*{width:100%;max-width:430px;margin-inline:auto;box-sizing:border-box}
html body.auth-lg .brand{display:none!important}
.ac-tagline{margin:0 auto 4px!important;text-align:center;color:#0b2a5b;font:600 clamp(22px,2.3vw,30px)/1.18 'Segoe Script','Brush Script MT','Snell Roundhand','Dancing Script',cursive;
  transform:rotate(-3deg);text-shadow:0 1px 0 rgba(255,255,255,.6)}
.ac-tagline::after{content:'';display:block;width:62%;height:4px;margin:8px auto 0;border-radius:999px;background:linear-gradient(90deg,transparent,var(--rs-orange) 30%,var(--rs-orange));transform:rotate(-2deg)}

/* ── Carte vitrée (tous les écrans) ── */
html body.auth-lg .panel{position:relative;background:rgba(255,255,255,.80)!important;border:1px solid rgba(255,255,255,.9)!important;border-radius:26px!important;
  padding:26px 26px 24px!important;gap:14px;color:var(--rs-ink);
  box-shadow:0 30px 60px -30px rgba(11,42,91,.55),inset 0 1px 0 #fff!important;
  backdrop-filter:blur(14px) saturate(140%)!important;-webkit-backdrop-filter:blur(14px) saturate(140%)!important}
html body.auth-lg .panel::before{-webkit-mask:none!important;mask:none!important;padding:0!important;border:0!important;margin:0!important;width:72px!important;height:72px!important;border-radius:50%!important;content:''!important;display:block!important;position:static!important;inset:auto!important;opacity:1!important;animation:none!important;transform:none!important;align-self:center;width:72px;height:72px;border-radius:50%;flex:0 0 auto;
  background:var(--rs-blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8' r='4' fill='%23fff'/%3E%3Cpath d='M4 20c0-4.4 3.6-7 8-7s8 2.6 8 7z' fill='%23fff'/%3E%3C/svg%3E") center/38px no-repeat!important;box-shadow:0 0 0 6px rgba(21,89,179,.12),0 12px 24px -10px rgba(11,42,91,.7)}
html body.auth-lg #p-signup::before{background-color:var(--rs-blue)!important;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 4 1 9l11 5 9-4.1V16h2V9z' fill='%23fff'/%3E%3Cpath d='M6 12.2V16c0 1.7 2.7 3 6 3s6-1.3 6-3v-3.8l-6 2.7z' fill='%23fff'/%3E%3C/svg%3E")!important}
html body.auth-lg .panel h1,html body.auth-lg .panel .auth-h1{margin:0;text-align:center;font:700 30px/1.15 'Inter',sans-serif;letter-spacing:-.02em;color:var(--rs-navy);background:none!important;-webkit-text-fill-color:currentColor!important}
.ac-sub{margin:-8px 0 4px;text-align:center;color:var(--rs-ink-2);font-size:15px}
html body.auth-lg .panel .help{color:var(--rs-ink-3)!important;font-size:13px}

/* ── Champs avec icône ── */
html body.auth-lg .field{position:relative}
html body.auth-lg [class*="ac-ic-"] label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
html body.auth-lg input:not([type=checkbox]):not([type=radio]){min-height:54px;background-color:rgba(255,255,255,.95)!important;border:1px solid var(--rs-line)!important;
  border-radius:16px!important;color:var(--rs-ink)!important;box-shadow:0 1px 2px rgba(11,42,91,.06)!important;font-size:16px}
html body.auth-lg [class*="ac-ic-"] input{padding-left:50px!important;background-repeat:no-repeat!important;background-position:16px center!important;background-size:22px!important}
html body.auth-lg .ac-ic-user input{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8' r='4' fill='%230b2a5b'/%3E%3Cpath d='M4 21c0-4.4 3.6-7 8-7s8 2.6 8 7z' fill='%230b2a5b'/%3E%3C/svg%3E")!important}
html body.auth-lg .ac-ic-mail input{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='5' width='18' height='14' rx='2' fill='%230b2a5b'/%3E%3Cpath d='M4 7l8 6 8-6' fill='none' stroke='%23fff' stroke-width='1.8'/%3E%3C/svg%3E")!important}
html body.auth-lg .ac-ic-lock input{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='5' y='10' width='14' height='11' rx='2' fill='%230b2a5b'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3' fill='none' stroke='%230b2a5b' stroke-width='2'/%3E%3Ccircle cx='12' cy='15' r='1.6' fill='%23fff'/%3E%3C/svg%3E")!important}
html body.auth-lg input:focus{outline:none;border-color:var(--rs-blue)!important;box-shadow:0 0 0 4px rgba(21,89,179,.16)!important}
html body.auth-lg input::placeholder{color:#6c7f9c}

/* ── Se souvenir / oublié ── */
.ac-row{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-top:-2px}
.ac-row .check{display:flex;align-items:center;gap:8px;font-size:14px;color:var(--rs-ink-2)}
.ac-row .check input{width:20px;height:20px;accent-color:var(--rs-blue)}
.ac-row .ac-forgot{margin-left:auto;font-size:14px;font-weight:700;color:var(--rs-blue)!important;text-decoration:underline}

/* ── Boutons ── */
html body.auth-lg .btn{min-height:52px;border-radius:999px!important;font-weight:700;font-size:16px;background:#fff!important;border:1.5px solid rgba(21,89,179,.45)!important;color:var(--rs-navy)!important;box-shadow:none!important}
html body.auth-lg .btn.primary{background:linear-gradient(180deg,#1e66c4 0%,#0a3a7a 100%)!important;border-color:#0a3a7a!important;color:#fff!important;
  box-shadow:0 14px 26px -14px rgba(10,58,122,.95),inset 0 1px 0 rgba(255,255,255,.3)!important}
html body.auth-lg .btn.primary:hover{filter:brightness(1.08)}
.ac-go::before{-webkit-mask:none!important;mask:none!important;margin:0!important;border:0!important;padding:0!important;content:''!important;display:block!important;position:static!important;inset:auto!important;opacity:1!important;transform:none!important;animation:none!important;width:26px!important;height:26px!important;border-radius:50%!important;flex:0 0 auto;
  background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h12M12 6l6 6-6 6' fill='none' stroke='%230a3a7a' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat!important}
.ac-or{display:flex;align-items:center;gap:12px;color:var(--rs-ink-2);font-size:15px}
.ac-or::before,.ac-or::after{content:'';flex:1;height:1px;background:var(--rs-line)}
html body.auth-lg .ac-formation{text-decoration:none!important;border-color:var(--rs-blue)!important}
.ac-formation::before{-webkit-mask:none!important;mask:none!important;margin:0!important;border:0!important;padding:0!important;content:''!important;display:block!important;position:static!important;inset:auto!important;opacity:1!important;transform:none!important;animation:none!important;width:28px!important;height:28px!important;border-radius:0!important;flex:0 0 auto;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 4 1 9l11 5 9-4.1V16h2V9z' fill='%230b2a5b'/%3E%3Cpath d='M6 12.2V16c0 1.7 2.7 3 6 3s6-1.3 6-3v-3.8l-6 2.7z' fill='%230b2a5b'/%3E%3C/svg%3E") center/contain no-repeat!important}
.ac-alt{text-align:center;font-size:12.5px!important;color:var(--rs-ink-3)!important;margin:-4px 0 0!important}
.ac-home-wrap{text-align:center;margin-bottom:-4px}
.ac-home-link{display:inline-flex;align-items:center;gap:6px;padding:7px 14px;border-radius:999px;background:rgba(255,255,255,.78);border:1px solid rgba(11,42,91,.16);color:var(--rs-navy)!important;font-size:13px;font-weight:700;text-decoration:none!important;box-shadow:0 8px 20px -14px rgba(11,42,91,.5)}
.ac-home-link:hover{background:#fff}
.ac-trial-card{padding:12px 14px;border-radius:16px;background:linear-gradient(135deg,rgba(14,165,233,.13),rgba(243,146,0,.11));border:1.5px solid rgba(21,89,179,.28);color:var(--rs-ink);font-size:12.5px;line-height:1.45}
.ac-trial-hd{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:6px}
.ac-trial-hd span{display:inline-flex;align-items:center;padding:3px 9px;border-radius:999px;background:var(--rs-navy);color:#fff;font-size:11px;font-weight:800;letter-spacing:.04em}
.ac-trial-hd b{color:#b45309;font-size:11.5px;font-weight:800}
.ac-trial-card p{margin:0;color:var(--rs-ink-2)}
html body.auth-lg a,html body.auth-lg .link{color:var(--rs-blue)!important}
html body.auth-lg .sep{color:var(--rs-ink-3)!important}
html body.auth-lg .sep::before,html body.auth-lg .sep::after{background:var(--rs-line)!important}
html body.auth-lg .err{color:#b42318}

/* ── Messages (bienvenue, mode appareil…) ── */
html body.auth-lg .notice{background:rgba(255,255,255,.72)!important;border:1px solid rgba(255,255,255,.9)!important;border-radius:18px!important;color:var(--rs-ink)!important;
  backdrop-filter:blur(10px)!important;-webkit-backdrop-filter:blur(10px)!important;box-shadow:0 14px 30px -24px rgba(11,42,91,.6)!important;font-size:14px}
html body.auth-lg .notice.local,html body.auth-lg .first-use{background:rgba(255,246,232,.9)!important;border-color:#f8d3a0!important;color:#6b3b00!important}
html body.auth-lg :focus-visible{outline:3px solid var(--rs-orange);outline-offset:2px}

/* ── Bandeau des engagements ── */
.ac-values{position:relative;z-index:2;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:center;gap:0;overflow:hidden;
  padding:18px clamp(16px,4vw,48px) calc(18px + env(safe-area-inset-bottom,0px));color:#fff;
  background:linear-gradient(180deg,#0d3270 0%,#0a2654 100%)}
.ac-values::after{content:'';position:absolute;right:-8%;bottom:-74px;width:60%;height:90px;border-radius:50%;border-top:10px solid var(--rs-orange);transform:rotate(-6deg);opacity:.95;pointer-events:none}
.ac-values>div{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;padding:4px 10px}
.ac-values>div+div{border-left:1px solid rgba(255,255,255,.35)}
.ac-values svg{width:34px;height:34px;fill:none;stroke:#fff;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ac-values span{font-size:14.5px;font-weight:600;line-height:1.2}

/* ── Mise en page ── */
@media (min-width:900px){
  html body.auth-lg{display:grid;grid-template-columns:clamp(380px,calc(100dvh * .627),56vw) minmax(440px,1fr);grid-template-rows:1fr auto;min-height:100vh;min-height:100dvh}
  .ac-hero{background-size:cover;background-position:left top}
  .ac-hero{grid-row:1;grid-column:1;position:sticky;top:0;align-self:start;height:100vh;height:100dvh}
  html body.auth-lg .auth{grid-row:1;grid-column:2}
  .ac-values{grid-row:2;grid-column:1 / -1}
}
@media (max-width:899px){
  .ac-hero{height:min(58vh,480px);min-height:300px;background-size:100% auto;background-position:center top}
  html body.auth-lg .auth{margin-top:-64px;padding-top:0}
  .ac-tagline{display:none}
  html body.auth-lg .panel{padding:22px 18px 20px!important}
  .ac-values{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:16px}
  .ac-values>div:nth-child(3){border-left:0}
  .ac-values::after{width:110%;right:-30%;bottom:-74px;opacity:.85}
}
@media (prefers-reduced-motion:reduce){html body.auth-lg *{animation:none!important;transition:none!important}}
