/* ============================================================
   remind-r.eu -- Espace Employe -- Page de connexion (lien magique)
   2 colonnes : showcase navy (gauche) + panneau (droite). Mobile-first.
   Ombres portees, jamais de bordures de couleur. Dark mode + responsive.
   ============================================================ */

.emp-auth { min-height: 100vh; display: grid; grid-template-columns: 1fr; background: var(--bg); }
@media (min-width: 1024px) { .emp-auth { grid-template-columns: 1.05fr 1fr; } }

/* ---- Showcase (cache en mobile, 2 colonnes des 1024px -- echelle canonique) ---- */
.emp-showcase { display: none; }
@media (min-width: 1024px) {
  .emp-showcase {
    position: relative; overflow: hidden; isolation: isolate;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 3rem; color: #fff;
    background: radial-gradient(120% 120% at 0% 0%, var(--navy-500) 0%, var(--navy-700) 55%, var(--navy-800) 100%);
  }
}
.emp-showcase::after { content: ''; position: absolute; width: 460px; height: 460px; right: -140px; bottom: -160px; border-radius: var(--radius-full); background: radial-gradient(circle, rgba(245,166,35,0.22) 0%, rgba(245,166,35,0) 70%); z-index: -1; }
/* Conteneur de marque showcase : porte le lockup co-brand (cobrand_lockup).
   On laisse les SVG du lockup garder leurs proportions (pas de taille fixe). */
.emp-showcase-brand { display: flex; align-items: center; }
.emp-showcase-badge { display: inline-flex; align-items: center; gap: 0.4rem; align-self: flex-start; margin-top: 1.25rem; padding: 0.3rem 0.75rem; border-radius: var(--radius-full); background: rgba(255,255,255,0.10); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.emp-showcase-badge svg { width: 13px; height: 13px; }
.emp-showcase-body { max-width: 30rem; }
.emp-showcase-body h2 { font-family: var(--font-heading); font-size: 2rem; line-height: 1.18; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 2rem; }
.emp-features { display: flex; flex-direction: column; gap: 1.1rem; }
.emp-feature { display: flex; gap: 0.875rem; align-items: flex-start; }
.emp-feature-icon { flex: 0 0 auto; width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--radius-md); background: rgba(255,255,255,0.10); box-shadow: var(--shadow-sm); }
.emp-feature-icon svg { width: 19px; height: 19px; color: var(--amber-300); }
.emp-feature-text h3 { font-size: 0.9375rem; font-weight: 600; margin-bottom: 0.15rem; }
.emp-feature-text p { font-size: 0.8125rem; color: rgba(255,255,255,0.72); line-height: 1.45; }
.emp-showcase-footer { font-size: 0.6875rem; color: rgba(255,255,255,0.55); }

/* ---- Panneau formulaire ---- */
.emp-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 1.25rem; }
.emp-auth-card { width: 100%; max-width: 420px; background: var(--surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); padding: 2.25rem 1.75rem; }
/* Conteneur de marque mobile : porte le lockup co-brand (cobrand_lockup).
   Proportions des SVG preservees ; couleurs gerees par .emp-cobrand-mobile. */
.emp-auth-mobile-brand { display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem; }
@media (min-width: 1024px) { .emp-auth-mobile-brand { display: none; } }

.emp-auth-head { text-align: center; margin-bottom: 1.5rem; }
.emp-auth-head .eyebrow { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--amber-500); font-weight: 700; }
.emp-auth-head h1 { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; color: var(--text-primary); margin: 0.3rem 0; }
.emp-auth-head p { font-size: 0.9rem; color: var(--text-secondary); }

.emp-alert { display: none; gap: 0.5rem; align-items: flex-start; padding: 0.75rem 0.85rem; border-radius: var(--radius-md); background: var(--danger-light); color: var(--danger-dark); font-size: 0.8125rem; margin-bottom: 1rem; box-shadow: var(--shadow-xs); }
.emp-alert.is-visible { display: flex; }
.emp-alert svg { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 1px; }

.emp-input-wrap { position: relative; }
.emp-input-wrap .ic { position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-tertiary); }
.emp-input-wrap .form-input { padding-left: 2.5rem; }

.emp-magic-intro { font-size: 0.8125rem; color: var(--text-tertiary); text-align: center; margin: 0.75rem 0 1.25rem; }
.emp-submit { width: 100%; }

.emp-divider { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0; color: var(--text-tertiary); font-size: 0.8125rem; }
.emp-divider::before, .emp-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.emp-sso-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.emp-sso { display: flex; align-items: center; justify-content: center; gap: 0.5rem; height: 42px; border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-xs); color: var(--text-primary); font-size: 0.8125rem; font-weight: 500; cursor: pointer; border: none; transition: box-shadow var(--transition-normal), background var(--transition-normal); }
.emp-sso:hover { background: var(--n50); box-shadow: var(--shadow-sm); }
.emp-sso svg { width: 16px; height: 16px; }

.emp-biometric { width: 100%; height: 44px; margin-top: 0.75rem; border-radius: var(--radius-md); background: transparent; color: var(--text-secondary); box-shadow: var(--shadow-xs); font-size: 0.875rem; font-weight: 500; cursor: pointer; border: none; display: none; align-items: center; justify-content: center; gap: 0.5rem; }
.emp-biometric.is-available { display: flex; }
.emp-biometric:hover { color: var(--navy-500); background: var(--navy-50); }
.emp-biometric svg { width: 18px; height: 18px; }

/* Etat "lien envoye" */
.emp-sent { text-align: center; padding: 0.5rem 0 0.25rem; }
.emp-sent .ok-ic { width: 56px; height: 56px; margin: 0 auto 1rem; border-radius: var(--radius-full); display: grid; place-items: center; background: var(--success-light); color: var(--success-dark); box-shadow: var(--shadow-sm); }
.emp-sent .ok-ic svg { width: 28px; height: 28px; }
.emp-sent h2 { font-family: var(--font-heading); font-size: 1.2rem; color: var(--text-primary); margin-bottom: 0.5rem; }
.emp-sent p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.5; }
.emp-sent .demolink { display: inline-block; margin-top: 1rem; font-size: 0.875rem; color: var(--navy-400); font-weight: 600; word-break: break-all; }

.emp-panel-footer { width: 100%; max-width: 420px; margin-top: 1.5rem; display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.emp-auth-lang { display: flex; gap: 0.25rem; }
.emp-auth-lang a { padding: 0.25rem 0.625rem; border-radius: var(--radius-sm); color: var(--text-tertiary); font-size: 0.6875rem; font-weight: 600; text-decoration: none; box-shadow: var(--shadow-xs); }
.emp-auth-lang a.active { background: var(--navy-500); color: #fff; }
.emp-auth-legal { display: flex; gap: 1rem; font-size: 0.75rem; }
.emp-auth-legal a { color: var(--text-tertiary); text-decoration: none; }
.emp-auth-legal a { transition: color var(--transition-fast); }
.emp-auth-legal a:hover { color: var(--text-primary); }
.emp-auth-lang a { transition: color var(--transition-fast), background var(--transition-fast), transform var(--dur-1, 0.12s) var(--ease-out-soft, ease); }
.emp-auth-lang a:hover { color: var(--text-secondary); }
.emp-auth-lang a:active { transform: translateY(var(--press-1, 1px)); }

/* ============================================================
   Co-branding remind-r x idewe -- lockup partage (cobrand_lockup)
   Le helper rend .cobrand / .brand-mark / .brand-word / .idewe-*.
   On adapte ses couleurs aux deux contextes (showcase navy clair,
   panneau mobile navy). Ombres/halo uniquement, jamais de bordure.
   ============================================================ */

/* --- Lockup dans le showcase navy (gauche, texte clair) --- */
.emp-cobrand-showcase .cobrand { gap: 0.7rem; }
.emp-cobrand-showcase .cobrand-rmr { gap: 0.5rem; }
.emp-cobrand-showcase .brand-mark-rmr { color: #fff; }
.emp-cobrand-showcase .brand-word-rmr { color: #fff; font-size: 1.2rem; }
.emp-cobrand-showcase .brand-word-rmr .accent { color: var(--amber-300); }
.emp-cobrand-showcase .cobrand-sep { height: 1.7rem; background: rgba(255, 255, 255, 0.24); }
.emp-cobrand-showcase .idewe-cyan { fill: #5BC4EC; }
.emp-cobrand-showcase .idewe-navy { fill: #CFE8F4; }
.emp-cobrand-showcase .brand-word-idewe { color: #EAF5FB; font-size: 1.15rem; }
.emp-cobrand-showcase .cobrand-eyebrow { color: rgba(255, 255, 255, 0.6); }

/* --- Lockup dans le panneau mobile (texte navy sur fond clair) ---
   La visibilite (none/flex) reste pilotee par .emp-auth-mobile-brand. */
.emp-cobrand-mobile .cobrand { gap: 0.6rem; justify-content: center; }
.emp-cobrand-mobile .brand-mark-rmr { color: var(--navy-500); }
.emp-cobrand-mobile .brand-word-rmr { color: var(--text-primary); font-size: 1.1rem; }
.emp-cobrand-mobile .brand-word-rmr .accent { color: var(--amber-400); }
.emp-cobrand-mobile .cobrand-sep { height: 1.4rem; }
.emp-cobrand-mobile .brand-word-idewe { font-size: 1.05rem; }

/* ============================================================
   Marketing sensoriel -- profondeur tactile specifique au login.
   (Les micro-interactions de base des .btn/.form-input viennent de
   components.css ; on enrichit ici le showcase + le CTA + l'etat envoye.)
   ============================================================ */

/* Carte formulaire : matiere plus presente, elevation au repos + entree douce */
.emp-auth-card { box-shadow: var(--shadow-xl, var(--shadow-lg)); animation: emp-rise 0.4s var(--ease-out-soft, ease) both; }

@keyframes emp-rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Cartes "feature" du showcase : reagissent au survol (toucher visuel) */
.emp-feature {
  border-radius: var(--radius-md);
  padding: 0.35rem 0.4rem;
  margin: -0.35rem -0.4rem;
  transition: transform var(--dur-2, 0.2s) var(--ease-out-soft, ease),
              background var(--dur-2, 0.2s) ease;
}
.emp-feature:hover { transform: translateY(var(--lift-1, -1px)); background: rgba(255, 255, 255, 0.05); }
.emp-feature-icon { transition: transform var(--dur-2, 0.2s) var(--ease-spring, ease), box-shadow var(--dur-2, 0.2s) ease; }
.emp-feature:hover .emp-feature-icon { transform: translateY(var(--lift-1, -1px)) scale(1.04); box-shadow: var(--shadow-md), var(--glow-idewe); }

/* Badge "espace" : reflet anime au survol (sheen) */
.emp-showcase-badge { position: relative; overflow: hidden; box-shadow: var(--shadow-sm); transition: transform var(--dur-2, 0.2s) var(--ease-out-soft, ease); }
.emp-showcase-badge::before {
  content: ''; position: absolute; inset: 0;
  background: var(--sheen);
  transform: translateX(-120%);
  transition: transform var(--dur-4, 0.5s) var(--ease-out-soft, ease);
  pointer-events: none;
}
.emp-showcase:hover .emp-showcase-badge::before { transform: translateX(120%); }

/* CTA principal "recevoir le lien" : geste evident -- halo ambre + profondeur,
   la fleche avance au survol (micro-feedback de direction). */
.emp-submit {
  position: relative;
  box-shadow: var(--shadow-md);
  transition: transform var(--dur-2, 0.2s) var(--ease-out-soft, ease),
              box-shadow var(--dur-2, 0.2s) var(--ease-out-soft, ease);
}
.emp-submit:hover { transform: translateY(var(--lift-2, -3px)); box-shadow: var(--shadow-lg), var(--glow-amber); }
.emp-submit:active { transform: translateY(var(--press-1, 1px)); box-shadow: var(--shadow-press); }
.emp-submit:focus-visible { outline: none; box-shadow: var(--shadow-md), var(--glow-amber); }
.emp-submit svg { transition: transform var(--dur-2, 0.2s) var(--ease-out-soft, ease); }
.emp-submit:hover svg { transform: translateX(2px); }

/* Etat de chargement (spinner) -- pilote par login.js (.is-loading) */
.btn.is-loading { position: relative; color: transparent; pointer-events: none; }
.btn.is-loading::after {
  content: ''; position: absolute;
  width: 18px; height: 18px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: var(--radius-full);
  animation: emp-spin 0.6s linear infinite;
}
.btn-accent.is-loading::after { border-top-color: var(--navy-800); }
@keyframes emp-spin { to { transform: rotate(360deg); } }

/* SSO / biometrie : enfoncement net au clic (retour tactile) */
.emp-sso { transition: box-shadow var(--transition-normal), background var(--transition-normal), transform var(--dur-2, 0.2s) var(--ease-out-soft, ease); }
.emp-sso:active { transform: translateY(var(--press-1, 1px)); box-shadow: var(--shadow-press); }
.emp-sso:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.emp-biometric { transition: color var(--transition-normal), background var(--transition-normal), transform var(--dur-2, 0.2s) var(--ease-out-soft, ease); }
.emp-biometric:hover { transform: translateY(var(--lift-1, -1px)); }
.emp-biometric:focus-visible { outline: none; box-shadow: var(--shadow-focus); }

/* Etat "lien envoye" : sceau chaleureux + apparition rassurante */
.emp-sent { animation: emp-rise 0.4s var(--ease-out-soft, ease) both; }
.emp-sent .ok-ic { animation: emp-pop 0.45s var(--ease-spring, ease) both; }
@keyframes emp-pop {
  from { opacity: 0; transform: scale(0.82); }
  to   { opacity: 1; transform: scale(1); }
}
.emp-sent .demolink { transition: color var(--transition-fast), transform var(--dur-1, 0.12s) var(--ease-out-soft, ease); }
.emp-sent .demolink:hover { color: var(--navy-500); }
.emp-sent .demolink:active { transform: translateY(var(--press-1, 1px)); }

/* ============================================================
   Dark mode
   ============================================================ */
[data-theme="dark"] .emp-showcase {
  background: radial-gradient(120% 120% at 0% 0%, var(--navy-600) 0%, var(--navy-800) 60%, var(--navy-900) 100%);
}
[data-theme="dark"] .emp-sso { background: var(--surface); }
[data-theme="dark"] .emp-sso:hover { background: var(--n100); }
[data-theme="dark"] .emp-biometric:hover { background: var(--navy-700); color: var(--navy-100); }
/* Lockup mobile en dark : la marque remind-r s'eclaircit pour rester lisible */
[data-theme="dark"] .emp-cobrand-mobile .brand-mark-rmr { color: var(--navy-200, #cdd7ea); }
[data-theme="dark"] .emp-cobrand-mobile .brand-word-rmr { color: var(--navy-100, #d9e0ed); }
[data-theme="dark"] .emp-cobrand-mobile .brand-word-rmr .accent { color: var(--amber-300); }
/* La carte garde une elevation perceptible sur fond sombre */
[data-theme="dark"] .emp-auth-card { box-shadow: var(--shadow-2xl, var(--shadow-xl)); }

/* ============================================================
   Responsive -- breakpoints canoniques remind-r
   480 / 768 / 1024 / 1280 / 1440 / 1920
   Strategie : fluide (clamp/%) entre les paliers ; bascule 1 colonne
   sous 1024 (showcase masque, marque mobile co-brandee).
   ============================================================ */

/* >= 1920 : grands ecrans -- on respire, on densifie la matiere */
@media (min-width: 1920px) {
  .emp-showcase { padding: 4.5rem; }
  .emp-showcase-body { max-width: 34rem; }
  .emp-showcase-body h2 { font-size: clamp(2rem, 1.4vw + 1.4rem, 2.6rem); }
  .emp-auth-card { max-width: 460px; }
  .emp-panel { padding: 3rem 2rem; }
  .emp-panel-footer { max-width: 460px; }
}

/* 1440 - 1919 : desktop large */
@media (min-width: 1440px) and (max-width: 1919.98px) {
  .emp-showcase { padding: 3.75rem; }
  .emp-showcase-body { max-width: 32rem; }
  .emp-auth-card { max-width: 440px; }
  .emp-panel-footer { max-width: 440px; }
}

/* 1280 - 1439 : desktop standard (proportions de reference) */
@media (min-width: 1280px) and (max-width: 1439.98px) {
  .emp-showcase { padding: 3.25rem; }
}

/* 1024 - 1279 : petit desktop / grande tablette paysage -- colonne resserree */
@media (min-width: 1024px) and (max-width: 1279.98px) {
  .emp-auth { grid-template-columns: 1fr 1fr; }
  .emp-showcase { display: flex; padding: 2.5rem; }
  .emp-showcase-body h2 { font-size: 1.75rem; margin-bottom: 1.5rem; }
  .emp-features { gap: 0.9rem; }
  .emp-feature-icon { width: 36px; height: 36px; }
  .emp-panel { padding: 2.25rem 1.25rem; }
}

/* < 1024 : bascule une colonne -- le showcase laisse place au formulaire.
   (Aligne le palier sur l'echelle canonique ; remplace l'ancien 960px.) */
@media (max-width: 1023.98px) {
  .emp-auth { grid-template-columns: 1fr; }
  .emp-showcase { display: none; }
  .emp-auth-mobile-brand { display: flex; }
  .emp-panel { min-height: 100vh; }
}

/* 768 - 1023 : tablette -- carte centree confortable */
@media (min-width: 768px) and (max-width: 1023.98px) {
  .emp-panel { padding: 3rem 2rem; }
  .emp-auth-card { max-width: 440px; }
  .emp-auth-head h1 { font-size: 1.75rem; }
}

/* 480 - 767 : grand mobile / petite tablette portrait */
@media (min-width: 480px) and (max-width: 767.98px) {
  .emp-panel { padding: 2.25rem 1.5rem; }
  .emp-auth-card { max-width: 100%; }
}

/* < 480 : mobile -- empilement, cibles tactiles genereuses (geste tactile prime) */
@media (max-width: 479.98px) {
  .emp-panel { padding: 1.75rem 1.15rem; }
  .emp-auth-card { max-width: 100%; padding: 1.9rem 1.35rem; }
  .emp-auth-mobile-brand { margin-bottom: 1.4rem; }
  .emp-auth-head { margin-bottom: 1.4rem; }
  .emp-auth-head h1 { font-size: 1.45rem; }
  .emp-auth-head p { font-size: 0.875rem; }
  .emp-sso-grid { grid-template-columns: 1fr; }
  .emp-panel-footer { gap: 0.85rem; margin-top: 1.5rem; }
  .emp-auth-legal { flex-wrap: wrap; justify-content: center; gap: 0.5rem 1rem; }
  /* Cibles tactiles >= 44px (lignes directrices mobiles) */
  .emp-sso { height: 46px; }
}

/* Tres petits ecrans : on garde l'accolade du wordmark mobile lisible */
@media (max-width: 360px) {
  .emp-cobrand-mobile .brand-word-rmr,
  .emp-cobrand-mobile .brand-word-idewe { font-size: 0.95rem; }
}

/* Accessibilite : respect du prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .emp-auth-card,
  .emp-sent,
  .emp-sent .ok-ic { animation: none; }
  .btn.is-loading::after { animation: none; }
  .emp-feature:hover,
  .emp-feature:hover .emp-feature-icon,
  .emp-submit:hover,
  .emp-sso:active,
  .emp-biometric:hover { transform: none; }
  .emp-submit:hover svg { transform: none; }
  .emp-showcase:hover .emp-showcase-badge::before { transition: none; }
}
