/* ============================================================
   CEN V138 — CONNEXION ÉPURÉE + BARRES PUBLIQUES FIXES
   ============================================================ */
:root{
  --cen138-blue:#0b5fa8;
  --cen138-blue-dark:#052f57;
  --cen138-blue-deep:#041f38;
  --cen138-gold:#f2c230;
  --cen138-line:#d9e4ec;
  --cen138-bg:#f4f8fc;
}

/* Les deux barres publiques sont réellement FIXED sur ordinateur.
   Leur hauteur ne change jamais pendant le scroll. */
@media (min-width:981px){
  body.public-layout:not(.page-login) .site-header.public-header.cen-institutional-header{
    position:fixed!important;top:0!important;left:0!important;right:0!important;
    width:100%!important;height:var(--public-header-h)!important;min-height:var(--public-header-h)!important;max-height:var(--public-header-h)!important;
    z-index:3000!important;transform:none!important;transition:none!important;animation:none!important;
  }
  body.public-layout:not(.page-login) .top-nav.public-nav.cen-public-nav{
    position:fixed!important;top:var(--public-header-h)!important;left:0!important;right:0!important;
    width:100%!important;height:var(--public-nav-h)!important;min-height:var(--public-nav-h)!important;max-height:var(--public-nav-h)!important;
    z-index:2990!important;transform:none!important;transition:none!important;animation:none!important;
  }
  body.public-layout:not(.page-login) .main-content.public-content{
    padding-top:calc(var(--public-header-h) + var(--public-nav-h) + 24px)!important;
  }
}

/* Sur téléphone, seule la barre compacte reste fixe. Le tiroir reste indépendant. */
@media (max-width:980px){
  body.public-layout:not(.page-login) .public-mobile-bar{
    position:fixed!important;top:0!important;left:0!important;right:0!important;z-index:3000!important;
    height:64px!important;min-height:64px!important;max-height:64px!important;transform:none!important;transition:none!important;
  }
  body.public-layout:not(.page-login) .main-content.public-content{padding-top:78px!important}
}

/* Le copyright du footer doit rester DANS le footer et ne jamais traverser le contenu. */
body.public-layout .cen-footer-v137{position:relative!important;overflow:visible!important}
body.public-layout .cen-footer-v137 .footer-bottom{
  position:static!important;inset:auto!important;left:auto!important;right:auto!important;bottom:auto!important;top:auto!important;
  display:block!important;width:min(100%,1440px)!important;max-width:1440px!important;
  margin:26px auto 0!important;transform:none!important;z-index:auto!important;
}
body.public-layout .login-minimal-footer{position:static!important;inset:auto!important}

/* ----------------------------------------------------------------
   Connexion V138 : volontairement simple, centrée et sans décor lourd.
   ---------------------------------------------------------------- */
body.page-login{
  min-height:100vh!important;background:linear-gradient(180deg,#f7fafd 0%,#eef4f9 100%)!important;
  padding:0!important;margin:0!important;display:flex!important;flex-direction:column!important;
}
body.page-login::before{display:none!important}
body.page-login .page-loader{z-index:5000!important}
body.page-login .main-content.public-content{
  flex:1 0 auto!important;width:100%!important;max-width:none!important;margin:0!important;
  padding:clamp(26px,6vh,72px) 16px 28px!important;display:flex!important;align-items:center!important;justify-content:center!important;
}
body.page-login .main-content.public-content>*{width:auto!important;margin-left:0!important;margin-right:0!important}

.cen-login-v138{
  width:min(100%,470px)!important;margin:0 auto!important;display:flex!important;flex-direction:column!important;align-items:center!important;gap:16px!important;
}
.cen-login-brand{text-align:center!important;color:var(--cen138-blue-dark)!important}
.cen-login-logo{
  width:78px!important;height:78px!important;margin:0 auto 10px!important;padding:6px!important;border-radius:18px!important;
  display:grid!important;place-items:center!important;background:#fff!important;border:1px solid #d5e2ec!important;box-shadow:0 10px 28px rgba(5,47,87,.09)!important;
}
.cen-login-logo img{width:100%!important;height:100%!important;object-fit:contain!important}
.cen-login-brand strong{display:block!important;font-size:20px!important;line-height:1.2!important;letter-spacing:.015em!important}
.cen-login-brand small{display:block!important;margin-top:3px!important;color:#667b8b!important;font-size:13px!important}

.cen-login-card{
  width:100%!important;background:#fff!important;border:1px solid var(--cen138-line)!important;border-radius:18px!important;
  padding:28px 28px 24px!important;box-shadow:0 18px 48px rgba(4,43,77,.10)!important;color:#1b3142!important;
}
.cen-login-heading{text-align:center!important;margin-bottom:22px!important}
.cen-login-heading h1{margin:0!important;font-size:30px!important;line-height:1.15!important;color:var(--cen138-blue-dark)!important}
.cen-login-heading p{margin:6px 0 0!important;color:#667887!important;font-size:15px!important}
.cen-login-form{display:grid!important;gap:11px!important}
.cen-login-form>label:not(.cen-login-remember){font-size:14px!important;font-weight:800!important;color:#29465c!important;margin-top:2px!important}
.cen-login-input{
  min-height:54px!important;display:flex!important;align-items:center!important;gap:10px!important;background:#fff!important;
  border:1px solid #bfd2df!important;border-radius:12px!important;padding:0 11px!important;box-shadow:none!important;
}
.cen-login-input:focus-within{border-color:var(--cen138-blue)!important;box-shadow:0 0 0 3px rgba(11,95,168,.12)!important}
.cen-login-input>span{font-size:17px!important;flex:none!important}
.cen-login-input input{
  flex:1!important;min-width:0!important;border:0!important;background:transparent!important;outline:0!important;box-shadow:none!important;
  min-height:50px!important;padding:0!important;font-size:16px!important;color:#182d3d!important;
}
.cen-login-password-toggle{width:38px!important;height:38px!important;border:0!important;border-radius:9px!important;background:#edf5fa!important;cursor:pointer!important;flex:none!important}
.cen-login-remember{display:flex!important;align-items:center!important;gap:9px!important;font-size:14px!important;color:#465d6d!important;margin:2px 0 3px!important}
.cen-login-remember input{width:18px!important;height:18px!important;accent-color:var(--cen138-blue)!important}
.cen-login-submit{
  width:100%!important;min-height:52px!important;border:0!important;border-radius:12px!important;background:var(--cen138-blue)!important;
  color:#fff!important;font-weight:900!important;font-size:16px!important;cursor:pointer!important;box-shadow:0 8px 20px rgba(11,95,168,.18)!important;
}
.cen-login-submit:hover{background:#084f91!important}
.cen-login-links{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;margin-top:16px!important;padding-top:16px!important;border-top:1px solid #e5edf3!important}
.cen-login-links a,.cen-login-back{color:var(--cen138-blue)!important;text-decoration:none!important;font-size:14px!important;font-weight:800!important}
.cen-login-register{background:#eef6fb!important;border-radius:9px!important;padding:8px 10px!important}
.cen-login-back{display:block!important;text-align:center!important;margin-top:18px!important;color:#526a7b!important}
.login-minimal-footer{
  flex:0 0 auto!important;width:100%!important;min-height:48px!important;padding:13px 18px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:16px!important;flex-wrap:wrap!important;
  background:#fff!important;border-top:1px solid #dfe8ef!important;color:#71818e!important;font-size:12px!important;text-align:center!important;
}
.login-minimal-footer a{color:var(--cen138-blue)!important;text-decoration:none!important;font-weight:800!important}

/* Pas de footer public géant, ticker, aide flottante ou installation sur la connexion. */
body.page-login .cen-footer-v137,body.page-login .enhanced-ticker,body.page-login .install-pwa-button,body.page-login .floating-help{display:none!important}

@media(max-width:560px){
  body.page-login .main-content.public-content{padding:20px 12px!important;align-items:flex-start!important}
  .cen-login-v138{gap:13px!important}
  .cen-login-logo{width:68px!important;height:68px!important;border-radius:16px!important}
  .cen-login-brand strong{font-size:18px!important}
  .cen-login-card{padding:22px 16px 20px!important;border-radius:16px!important}
  .cen-login-heading{margin-bottom:18px!important}.cen-login-heading h1{font-size:27px!important}
  .cen-login-links{flex-direction:column!important;align-items:stretch!important;text-align:center!important}
  .cen-login-register{display:block!important}
  .login-minimal-footer{padding:12px!important}
}
