/* Onima V5 : pages de connexion (onima.ch/login). Identité de l'ancien site (onima.css et portal.css de /home/onima,
   repris en lecture) : mêmes verts, même marine, même pile de polices système, même coquille en deux colonnes.
   Clair seulement, quels que soient les réglages du navigateur (opérateur, 03.11.2026). Aucun style en ligne (CSP). */

:root {
  --green: #4fae37;
  --green-hover: #449930;
  --green-deep: #259204;
  --green-soft: #8cce88;
  --green-tint: #e8f5e4;
  --navy: #000a16;
  --navy-2: #0a1628;
  --ink: #101828;
  --ink-soft: #475467;
  --ink-faint: #6b7684;
  --line: #e5e7eb;
  --bg: #f7f8f7;
  --card: #ffffff;
  --champ: #f7f8f7;
  --champ-focus: #ffffff;
  --titre: #0a1628;
  --lien: #259204;
  --erreur: #b42318;
  --erreur-fond: #fef2f2;
  --erreur-bord: rgba(180, 35, 24, .16);
  --succes: #259204;
  --succes-fond: #e8f5e4;
  --succes-bord: rgba(37, 146, 4, .16);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-pill: 999px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px rgba(16, 24, 40, .08);
  --gradient-navy: linear-gradient(135deg, #000a16 0%, #0a1628 100%);
  --halo-green: radial-gradient(circle, rgba(79, 174, 55, .30) 0%, rgba(79, 174, 55, 0) 68%);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color-scheme: light;
}


* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* 1. Coquille en deux colonnes */
.auth-split { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; min-height: 100dvh; }
@media (max-width: 880px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-brandside { display: none; }
}
.auth-formside {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 40px 24px; background: var(--bg);
  min-height: 100vh; min-height: 100dvh;
}
.auth-formside-inner { width: 100%; max-width: 420px; margin: auto; }
.auth-head { text-align: center; margin-bottom: 24px; }
.auth-logo-link { display: inline-block; text-decoration: none; }
.auth-logo-icon { height: 52px; width: 52px; display: block; margin: 0 auto; }
.auth-h1 { font-size: 28px; line-height: 1.2; font-weight: 800; letter-spacing: -0.015em; color: var(--titre); margin: 18px 0 6px; }
.auth-sub { font-size: 15px; color: var(--ink-soft); margin: 0; }
.auth-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow);
}
.auth-foot { font-size: 13px; color: var(--ink-faint); text-align: center; padding-top: 28px; }
.auth-foot a { color: inherit; text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; }

/* Sélecteur de langue, comme l'en-tête de l'ancien site (FR DE IT) */
.site-lang { position: absolute; top: 20px; right: 24px; display: flex; align-items: center; gap: 10px; }
.site-lang__cur, .site-lang__link { font-size: 13px; letter-spacing: .05em; font-weight: 600; color: var(--ink); }
.site-lang__cur { opacity: .95; text-decoration: underline; text-underline-offset: 3px; }
.site-lang__link { opacity: .55; text-decoration: none; }
.site-lang__link:hover, .site-lang__link:focus-visible { opacity: 1; }

/* 2. Formulaire */
.login-msg {
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 13.5px; line-height: 1.5; margin: 0 0 16px;
}
.login-msg--erreur { background: var(--erreur-fond); color: var(--erreur); border: 1px solid var(--erreur-bord); }
.login-msg--succes { background: var(--succes-fond); color: var(--succes); border: 1px solid var(--succes-bord); }
.login-msg--info { background: transparent; color: var(--ink-soft); border: 1px solid var(--line); }

.login-field { margin-bottom: 16px; }
.login-label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); margin: 0 0 6px; }
.login-input {
  display: block; width: 100%; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px;
  font-size: 15px; font-family: var(--font); color: var(--ink);
  background: var(--champ); outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.login-input:focus { border-color: var(--green); background: var(--champ-focus); box-shadow: 0 0 0 4px rgba(79, 174, 55, .14); }
.login-input::placeholder { color: var(--ink-faint); }
.login-input[readonly] { color: var(--ink-soft); }

.login-btn {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; padding: 13px 18px; border: 1px solid transparent; border-radius: 12px;
  font-size: 15px; font-weight: 700; font-family: var(--font);
  cursor: pointer; text-decoration: none; line-height: 1.1;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.login-btn-primary { background: var(--green); color: #fff; box-shadow: 0 4px 14px rgba(79, 174, 55, .3); }
.login-btn-primary:hover { background: var(--green-hover); }
.login-btn-second { background: var(--card); border-color: var(--line); color: var(--ink); }
.login-btn-second:hover { background: var(--bg); border-color: var(--ink-faint); }
.login-btn[disabled] { opacity: .55; cursor: not-allowed; }
.login-btn + .login-btn { margin-top: 12px; }

.login-btn-ghost {
  display: block; margin: 14px auto 0;
  background: none; border: none; color: var(--ink-soft);
  font-size: 13.5px; font-weight: 600; font-family: var(--font);
  cursor: pointer; padding: 6px 0; transition: color .15s ease;
}
.login-btn-ghost:hover { color: var(--lien); }
a.login-btn-ghost { text-align: center; text-decoration: none; }

.login-btn:focus-visible, .login-btn-ghost:focus-visible, a:focus-visible {
  outline: 2px solid var(--green); outline-offset: 2px;
}

.auth-texte { font-size: 14.5px; color: var(--ink-soft); line-height: 1.55; margin: 0 0 18px; }
.auth-texte strong { color: var(--ink); }
.auth-lien { color: var(--lien); font-weight: 700; text-decoration: none; }
.auth-lien:hover { text-decoration: underline; }
.auth-centre { text-align: center; }
.auth-card > section > :last-child { margin-bottom: 0; }
a.login-btn { box-sizing: border-box; }

/* Compte connecté */
.compte { margin: 0 0 20px; }
.compte div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.compte div:first-child { padding-top: 0; }
.compte dt { font-size: 13.5px; color: var(--ink-faint); }
.compte dd { margin: 0; font-weight: 600; color: var(--ink); text-align: right; word-break: break-all; }
.pastille {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 3px 11px; border-radius: var(--radius-pill);
  background: var(--succes-fond); color: var(--succes); font-size: 13px; font-weight: 700;
}
.pastille::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

/* Règles du mot de passe, cochées à la saisie */
.regles { list-style: none; margin: -4px 0 16px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
.regles li { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-faint); }
.regles li::before { content: ''; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--line); transition: background .15s ease; }
.regles li:last-child { grid-column: 1 / -1; }
.regles li.ok { color: var(--succes); }
.regles li.ok::before { background: var(--green); }

.masque { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 560px) {
  .auth-card { padding: 22px 18px; }
  .auth-formside { padding: 56px 18px 28px; }
  .site-lang { top: 18px; right: 18px; }
  .login-input { font-size: 16px; }
  .login-btn { min-height: 46px; font-size: 15.5px; }
  .regles { grid-template-columns: 1fr; }
}

/* 3. Panneau de marque (colonne droite, bureau seulement) */
.brand-panel {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; min-height: 100vh; min-height: 100dvh; padding: 56px 48px;
  overflow: hidden; background: var(--gradient-navy);
}
.brand-panel::after {
  content: ''; position: absolute; right: -160px; bottom: -180px;
  width: 520px; height: 520px; border-radius: 50%;
  background: var(--halo-green);
}
.brand-inner { position: relative; z-index: 1; max-width: 440px; }
.brand-logo { height: 44px; width: auto; display: block; margin-bottom: 40px; }
.brand-title { margin: 0; color: #fff; font-size: 38px; line-height: 1.16; font-weight: 800; letter-spacing: -0.02em; }
.brand-title em { font-style: normal; color: var(--green-soft); }
.brand-lead { margin: 18px 0 0; color: rgba(255, 255, 255, .74); font-size: 16px; line-height: 1.6; }
.brand-kpis { margin-top: 40px; display: flex; gap: 10px; flex-wrap: wrap; }
.brand-kpi {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px; border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16);
  color: #fff; font-size: 13.5px; font-weight: 600;
}
.brand-kpi::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--green-soft); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
