/* Page de connexion Jack Board — Étape Login chantier rénovation visuelle Phase 1 — source modèle Designer jackboard_login_final.html — utilise les design tokens v45 — pour modifier voir Master + Designer */

/* Reset + globals (page standalone, pas de base.css inclus) */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%;
  width: 100%;
  background: var(--cream-veryclear);
  font-family: var(--font-sans);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* ============================================================
   PAGE DE CONNEXION JACK BOARD · Direction A · Layout split
   ============================================================ */

.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 900px) {
  .login-page {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    min-height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }
  .login-brand {
    padding: 20px 24px;
    flex-direction: row;
    align-items: center;
    min-height: auto;
  }
  .login-brand-logo {
    margin-bottom: 0;
  }
  .picto-onde {
    width: 32px;
    height: 32px;
  }
  .picto-onde::after {
    width: 15px;
    height: 15px;
  }
  .login-brand-logo-name {
    font-size: 18px;
  }
  .brand-content,
  .brand-footer,
  .floating-badge {
    display: none !important;
  }
  .login-form-side {
    padding: 24px 24px 32px;
    justify-content: flex-start;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .login-form-wrap {
    max-width: 100%;
    padding-top: 16px;
  }
  .login-form-title {
    font-size: 26px;
  }
  .login-form-subtitle {
    margin-bottom: 20px;
  }
  .login-bottom-signature {
    margin-top: 16px;
    padding-bottom: 0;
  }
}

/* ============================================================
   PANNEAU GAUCHE — MARQUE + MOCKUP PRODUIT
   ============================================================ */

.login-brand {
  background: var(--ink);
  color: var(--cream-veryclear);
  padding: 56px 56px 48px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.login-brand-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 5;
  margin-bottom: 36px;
}
.picto-onde {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(151, 136, 194, 0.32);
  position: relative;
  flex-shrink: 0;
}
.picto-onde::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 20px; height: 20px;
  background: var(--green);
  border-radius: 50%;
}
.login-brand-logo-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--cream-veryclear);
  letter-spacing: -0.025em;
}

.brand-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
  position: relative;
  z-index: 5;
}
.brand-text-block { max-width: 420px; flex-shrink: 0; }
.brand-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--lavande);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 14px;
}
.brand-headline {
  font-size: 32px;
  font-weight: 600;
  color: var(--cream-veryclear);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 14px;
}
.brand-headline em {
  color: var(--green);
  font-style: italic;
  font-weight: 500;
}
.brand-text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.65;
}

/* Mockup wrapper — pattern 2 wrappers (V2 itération 4) :
   .mockup-stage centre horizontalement le mockup dans la zone disponible ;
   .mockup-wrap (inline-block) prend la taille naturelle du mockup
   = contexte parfait pour les badges absolutely-positioned. */
.mockup-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 32px;
}
.mockup-wrap {
  position: relative;
  display: inline-block;
  margin: 0 auto;
}

.mockup-dashboard {
  background: var(--pure-white);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 8px 24px rgba(0, 0, 0, 0.35);
  transform: rotate(-2deg);
}
.mockup-dash-header {
  height: 30px;
  background: var(--cream-mid);
  border-bottom: 1px solid var(--gray-line);
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 5px;
}
.mockup-dash-circle {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gray-line);
}
.mockup-dash-circle.is-green { background: var(--green); }
.mockup-dash-body {
  display: grid;
  grid-template-columns: 80px 1fr;
  min-height: 240px;
}
.mockup-dash-side {
  background: var(--cream-mid);
  padding: 10px 7px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-right: 1px solid var(--gray-line);
}
.mockup-side-item {
  height: 22px;
  border-radius: 5px;
  background: rgba(44, 42, 38, 0.06);
}
.mockup-side-item.is-active {
  background: var(--lavande-pale);
  position: relative;
}
.mockup-side-item.is-active::before {
  content: '';
  position: absolute;
  left: -3px;
  top: 5px;
  width: 2.5px;
  height: 12px;
  background: var(--green);
  border-radius: 0 2px 2px 0;
}
.mockup-dash-content {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.mockup-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 4px;
}
.mockup-stat {
  background: var(--cream-veryclear);
  border: 1px solid var(--gray-line);
  border-radius: 6px;
  padding: 7px 9px;
}
.mockup-stat-label {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--gray);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}
.mockup-stat-num {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 2px;
  letter-spacing: -0.01em;
}
.mockup-stat-delta {
  font-size: 8px;
  color: var(--green-dark);
  font-weight: 600;
  margin-top: 1px;
}
.mockup-row {
  display: grid;
  grid-template-columns: 22px 1fr 56px 36px;
  gap: 7px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 5px;
  background: var(--cream-veryclear);
  border: 1px solid var(--gray-line);
}
.mockup-row-avatar {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream-veryclear);
  font-size: 7px;
  font-weight: 600;
}
.mockup-row-avatar.is-lavande { background: var(--lavande); }
.mockup-row-avatar.is-amber { background: var(--amber); }
.mockup-row-name {
  font-size: 10px;
  font-weight: 600;
  color: var(--ink);
}
.mockup-row-amount {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--green-dark);
  text-align: right;
}
.mockup-row-pill {
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 100px;
  background: var(--green-bg-strong);
  color: var(--green-dark);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.mockup-row-pill.is-info { background: var(--lavande-bg-strong); color: var(--lavande-dark); }
.mockup-row-pill.is-amber { background: var(--amber-bg-strong); color: var(--amber); }

/* Floating badges */
.floating-badge {
  position: absolute;
  background: var(--pure-white);
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), 0 4px 12px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--ink);
  font-weight: 500;
  z-index: 10;
}
.floating-badge.is-1 {
  top: -28px;
  right: -55px;
  transform: rotate(3deg);
}
.floating-badge.is-2 {
  bottom: -28px;
  left: -55px;
  transform: rotate(-2deg);
}
.fb-icon {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fb-icon.is-green { background: var(--green-bg-strong); color: var(--green-dark); }
.fb-icon.is-lavande { background: var(--lavande-bg-strong); color: var(--lavande-dark); }
.fb-icon svg {
  width: 12px; height: 12px;
  stroke: currentColor;
  stroke-width: 2.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Footer brand */
.brand-footer {
  margin-top: auto;
  padding-top: 28px;
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand-footer-left {
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.brand-footer-right {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  font-style: italic;
}

/* ============================================================
   PANNEAU DROIT — FORMULAIRE DE CONNEXION
   ============================================================ */

.login-form-side {
  background: var(--cream-veryclear);
  padding: 56px 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.login-form-wrap {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}

.login-form-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--lavande-dark);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 8px;
}
.login-form-title {
  font-size: 30px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 6px;
}
.login-form-title em {
  color: var(--green-dark);
  font-style: italic;
  font-weight: 500;
}
.login-form-subtitle {
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 32px;
  line-height: 1.55;
}

/* Formulaire */
.login-form-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.form-input {
  padding: 11px 14px;
  border: 1px solid var(--gray-line);
  border-radius: 8px;
  background: var(--pure-white);
  font-size: 14px;
  color: var(--ink);
  font-family: inherit;
  width: 100%;
  transition: all 0.18s ease;
}
.form-input::placeholder { color: var(--gray); }
.form-input:focus {
  outline: none;
  border-color: var(--lavande);
  box-shadow: 0 0 0 3px rgba(151, 136, 194, 0.15);
}

/* Checkbox + lien */
.checkbox-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  margin-top: 2px;
}
.checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--ink-soft);
  font-weight: 500;
  position: relative;
}
.checkbox-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.checkbox-square {
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--gray-line);
  background: var(--pure-white);
  border-radius: 3px;
  flex-shrink: 0;
  transition: all 0.18s ease;
  position: relative;
}
.checkbox-input:checked + .checkbox-square {
  background: var(--green);
  border-color: var(--green);
}
.checkbox-input:checked + .checkbox-square::after {
  content: '✓';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -55%);
  color: var(--cream-veryclear);
  font-size: 10px;
  font-weight: 700;
}
.checkbox-input:focus-visible + .checkbox-square {
  outline: 2px solid var(--lavande);
  outline-offset: 2px;
}

.link-lavande {
  color: var(--lavande-dark);
  text-decoration: none;
  border-bottom: 1px solid rgba(151, 136, 194, 0.3);
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: color 0.18s ease;
}
.link-lavande:hover { color: #4A4070; border-bottom-color: rgba(151, 136, 194, 0.6); }

/* Bouton primaire (vert) */
.btn-primary {
  padding: 13px 18px;
  border-radius: 8px;
  background: var(--green);
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--cream-veryclear);
  font-family: inherit;
  width: 100%;
  transition: background 0.18s ease, transform 0.08s ease;
  letter-spacing: -0.01em;
  margin-top: 6px;
}
.btn-primary:hover { background: var(--green-dark); }
.btn-primary:active { transform: translateY(1px); }

/* Zone flash errors / info / warning (ajout V2 : retours utilisateur stylés cohérents palette) */
.login-flash {
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.login-flash.is-error {
  background: var(--red-pale);
  color: var(--red);
  border: 1px solid rgba(196, 69, 69, 0.2);
}
.login-flash.is-info {
  background: var(--lavande-pale);
  color: var(--lavande-dark);
  border: 1px solid rgba(151, 136, 194, 0.2);
}
.login-flash.is-warning {
  background: var(--amber-bg-strong);
  color: var(--amber);
  border: 1px solid rgba(216, 154, 43, 0.25);
}

/* Bottom signature page */
.login-bottom-signature {
  margin-top: 32px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--gray);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* Variante Designer écrans très larges (bonus optionnel) */
@media (min-width: 1600px) {
  .mockup-dashboard { max-width: 480px; }
}
