/* Login premium — plein écran sans navbar */

body.cn-auth-body {
  background: #060d18;
  position: relative;
}

body.cn-auth-body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 15% 20%, rgba(29, 78, 216, 0.35), transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 75%, rgba(249, 115, 22, 0.28), transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(16, 185, 129, 0.15), transparent 45%),
    linear-gradient(165deg, #060d18 0%, #0a1628 40%, #0f172a 100%);
  z-index: 0;
  pointer-events: none;
}

.cn-login-scene {
  position: relative;
  min-height: 100vh;
  z-index: 1;
}

.cn-login-orbs {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.cn-login-orbs span {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.45;
  animation: cn-login-float 18s ease-in-out infinite;
}

.cn-login-orbs span:nth-child(1) {
  width: 420px;
  height: 420px;
  background: rgba(29, 78, 216, 0.35);
  top: -8%;
  left: -5%;
  animation-delay: 0s;
}

.cn-login-orbs span:nth-child(2) {
  width: 320px;
  height: 320px;
  background: rgba(249, 115, 22, 0.3);
  bottom: 10%;
  right: -4%;
  animation-delay: -6s;
}

.cn-login-orbs span:nth-child(3) {
  width: 260px;
  height: 260px;
  background: rgba(59, 130, 246, 0.25);
  top: 45%;
  left: 35%;
  animation-delay: -12s;
}

@keyframes cn-login-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(24px, -20px) scale(1.05); }
  66% { transform: translate(-16px, 14px) scale(0.96); }
}

.cn-login-scene .cn-auth-fullpage {
  position: relative;
  z-index: 1;
}

/* Panneau visuel */
.cn-login-visual {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 3rem 2.5rem;
  position: relative;
  overflow: hidden;
}

.cn-login-visual .cn-login-visual-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cn-auth-visual-footer {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding-top: 1.5rem;
  width: 100%;
}

.cn-auth-visual-footer .cn-auth-credit {
  margin: 0;
  padding-top: 0;
  border-top: none;
  text-align: left;
  color: rgba(226, 232, 240, 0.62);
  font-size: 0.7rem;
}

.cn-auth-visual-footer .cn-auth-credit a {
  color: rgba(226, 232, 240, 0.82);
}

.cn-auth-visual-footer .cn-auth-credit a:hover {
  color: #fff;
}

.cn-portal-visual-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
  text-decoration: none;
  color: #fff;
  transition: opacity 0.2s;
}

.cn-portal-visual-brand:hover {
  opacity: 0.92;
}

.cn-portal-visual-brand img,
.cn-portal-visual-brand-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.85rem;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.cn-portal-visual-brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--cn-blue), var(--cn-orange));
  font-size: 1.1rem;
  font-weight: 800;
}

.cn-portal-visual-brand-name {
  font-family: var(--cn-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.cn-portal-visual-lead {
  color: rgba(226, 232, 240, 0.88);
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 0.25rem;
}

.cn-login-scene--portal .cn-login-card::before {
  background: linear-gradient(90deg, var(--cn-blue), var(--cn-orange), var(--cn-blue));
  background-size: 200% 100%;
}

.cn-login-avatar--client {
  background: linear-gradient(135deg, var(--cn-blue), var(--cn-navy));
  color: #fff;
  font-size: 1.25rem;
}

.cn-login-avatar--client img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cn-login-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(10, 22, 40, 0.92) 0%, rgba(29, 78, 216, 0.55) 100%);
  z-index: 0;
}

.cn-login-visual.has-bg-image::before {
  background:
    linear-gradient(145deg, rgba(10, 22, 40, 0.88) 0%, rgba(30, 58, 95, 0.82) 45%, rgba(29, 78, 216, 0.72) 100%);
}

.cn-login-visual-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, #000 20%, transparent 75%);
  z-index: 0;
  pointer-events: none;
}

.cn-login-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fed7aa;
  margin-bottom: 1.25rem;
  width: fit-content;
}

.cn-login-visual-inner {
  position: relative;
  z-index: 2;
  max-width: 26rem;
}

.cn-login-visual h2 {
  font-family: var(--cn-display);
  font-size: clamp(1.85rem, 4vw, 2.65rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.cn-login-visual h2 em {
  font-style: normal;
  background: linear-gradient(90deg, #fdba74, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cn-login-perks {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cn-login-perk {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.875rem;
  color: rgba(226, 232, 240, 0.9);
}

.cn-login-perk i {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 0.5rem;
  background: rgba(249, 115, 22, 0.2);
  color: #fdba74;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  flex-shrink: 0;
}

/* Panneau formulaire */
.cn-login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  background: transparent;
  min-height: 100vh;
  position: relative;
}

.cn-login-back {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  transition: color 0.2s, background 0.2s, border-color 0.2s;
  z-index: 2;
}

.cn-login-back:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.cn-login-card {
  width: 100%;
  max-width: 26rem;
  padding: 2rem 1.75rem 1.5rem;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.04),
    0 25px 60px rgba(6, 13, 24, 0.45),
    0 0 80px rgba(29, 78, 216, 0.08);
  position: relative;
  overflow: hidden;
  animation: cn-login-card-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cn-login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cn-blue), var(--cn-orange), var(--cn-blue));
  background-size: 200% 100%;
  animation: cn-login-shimmer 4s linear infinite;
}

@keyframes cn-login-card-in {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes cn-login-shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.cn-login-card .cn-auth-title {
  font-size: 1.65rem;
  letter-spacing: -0.02em;
}

.cn-login-card .cn-auth-lead {
  margin-bottom: 1.5rem;
}

.cn-login-card .cn-auth-form {
  max-width: none;
  width: 100%;
}

.cn-login-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.cn-login-avatar {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.15);
}

.cn-login-avatar--client {
  background: linear-gradient(135deg, var(--cn-blue), var(--cn-navy));
  color: #fff;
  font-size: 1.25rem;
}

.cn-login-avatar--admin {
  background: linear-gradient(135deg, #1e293b, #1d4ed8);
  color: #fff;
  font-size: 1.25rem;
}

.cn-login-avatar--seller,
.cn-login-avatar--deliverer {
  background: linear-gradient(135deg, var(--cn-blue), var(--cn-orange));
  color: #fff;
  font-size: 1.25rem;
}

.cn-login-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cn-login-card .cn-input-wrap:focus-within > i.field-icon {
  color: var(--cn-orange);
}

.cn-login-card .cn-input:focus {
  border-color: var(--cn-orange);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

.cn-login-card .cn-btn-primary {
  position: relative;
  overflow: hidden;
  margin-top: 0.25rem;
}

.cn-login-card .cn-btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.25) 50%, transparent 60%);
  transform: translateX(-120%);
  transition: transform 0.55s ease;
}

.cn-login-card .cn-btn-primary:hover::after {
  transform: translateX(120%);
}

.cn-login-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
  margin-top: 1.25rem;
  font-size: 0.8125rem;
}

.cn-login-links a {
  color: var(--cn-blue);
  font-weight: 600;
  text-decoration: none;
}

.cn-login-links a:hover {
  text-decoration: underline;
}

.cn-login-links a.cn-link-accent {
  color: var(--cn-orange-dark);
}

.cn-auth-credit {
  margin: 1.5rem 0 0;
  padding-top: 1.15rem;
  border-top: 1px solid var(--cn-border);
  text-align: center;
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.5;
}

.cn-auth-credit a {
  color: #64748b;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.cn-auth-credit a:hover {
  color: var(--cn-blue);
}

/* Variantes rôle */
.cn-login-scene--admin .cn-login-badge { color: #bfdbfe; }
.cn-login-scene--admin .cn-login-card::before {
  background: linear-gradient(90deg, #1e293b, #1d4ed8, #1e293b);
  background-size: 200% 100%;
}

.cn-login-scene--seller .cn-login-badge,
.cn-login-scene--deliverer .cn-login-badge { color: #fed7aa; }

.cn-login-scene--deliverer .cn-login-card::before {
  background: linear-gradient(90deg, #0d9488, var(--cn-orange), #0d9488);
  background-size: 200% 100%;
}

/* Mobile */
@media (max-width: 1023px) {
  .cn-login-visual {
    display: flex;
    min-height: auto;
    padding: 2.5rem 1.5rem 2rem;
  }

  .cn-login-visual .tk-deco-auth {
    display: none;
  }

  .cn-login-panel {
    min-height: auto;
    padding: 0 1rem 2.5rem;
    align-items: flex-start;
  }

  .cn-login-back {
    top: 0.75rem;
    left: 0.75rem;
  }

  .cn-login-scene .cn-auth-fullpage {
    grid-template-columns: 1fr;
  }

  .cn-login-scene .cn-auth-fullpage .cn-auth-form-flat,
  .cn-login-scene .cn-auth-fullpage .cn-auth-visual {
    min-height: auto;
  }
}

@media (min-width: 1024px) {
  .cn-login-visual {
    display: flex;
  }
}

/* Boutique — variante shop (split plein écran, personnalisée par boutique) */
.cn-auth-fullpage--shop .cn-login-visual--shop::before {
  background:
    linear-gradient(145deg, rgba(10, 22, 40, 0.9) 0%, color-mix(in srgb, var(--brand-700, #065f46) 55%, transparent) 55%, color-mix(in srgb, var(--brand-600, #047857) 45%, transparent) 100%);
}
.cn-auth-fullpage--shop .cn-login-visual h2 em {
  background: linear-gradient(90deg, #fff, var(--brand-50, #ecfdf5));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cn-auth-fullpage--shop .cn-login-perk i {
  background: color-mix(in srgb, var(--brand-500, #059669) 25%, transparent);
  color: var(--brand-50, #ecfdf5);
}

@media (max-width: 1023px) {
  .cn-auth-fullpage--shop .cn-auth-form-flat,
  .cn-auth-fullpage--shop .cn-auth-visual {
    min-height: auto;
  }

  .cn-auth-fullpage--shop .cn-auth-visual .tk-deco-auth {
    display: none;
  }
}

.cn-login-scene--shop-split {
  min-height: 100vh;
  display: block;
  padding: 0;
}

.cn-login-scene--shop-split .cn-login-orbs--shop span:nth-child(1) {
  background: color-mix(in srgb, var(--brand-500, #059669) 30%, transparent);
}

.cn-login-scene--shop-split .cn-login-orbs--shop span:nth-child(2) {
  background: color-mix(in srgb, var(--brand-600, #047857) 25%, transparent);
}

.cn-login-visual--shop::before {
  background:
    linear-gradient(145deg, rgba(10, 22, 40, 0.9) 0%, color-mix(in srgb, var(--brand-700, #065f46) 55%, transparent) 55%, color-mix(in srgb, var(--brand-600, #047857) 45%, transparent) 100%);
}

.cn-shop-visual-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
  text-decoration: none;
  color: #fff;
}

.cn-shop-visual-brand img,
.cn-shop-visual-brand-icon {
  width: 2.75rem;
  height: 2.75rem;
  min-width: 2.75rem;
  border-radius: 999px;
  object-fit: cover;
  object-position: center;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand-500, #059669), var(--brand-700, #065f46));
  font-size: 1.1rem;
}

.cn-shop-visual-brand-name {
  font-family: var(--cn-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.cn-shop-verified {
  color: #93c5fd;
  font-size: 1rem;
}

.cn-login-badge--shop {
  color: color-mix(in srgb, var(--brand-50, #ecfdf5) 90%, #fff);
  border-color: rgba(255, 255, 255, 0.2);
}

.cn-shop-domain-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.75rem;
  color: rgba(226, 232, 240, 0.95);
  font-family: ui-monospace, monospace;
}

.cn-shop-visual-lead {
  color: rgba(226, 232, 240, 0.88);
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 0.25rem;
}

.cn-login-scene--shop-split .cn-login-visual h2 em {
  background: linear-gradient(90deg, #fff, var(--brand-50, #ecfdf5));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cn-login-scene--shop-split .cn-login-perk i {
  background: color-mix(in srgb, var(--brand-500, #059669) 25%, transparent);
  color: var(--brand-50, #ecfdf5);
}

.cn-login-card--shop::before {
  background: linear-gradient(90deg, var(--brand-600, #047857), var(--brand-500, #059669), var(--brand-600, #047857));
  background-size: 200% 100%;
}

.cn-login-avatar--shop {
  background: linear-gradient(135deg, var(--brand-500, #059669), var(--brand-700, #065f46));
  color: #fff;
  font-size: 1.25rem;
}

.cn-login-avatar--shop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cn-btn-shop {
  background: linear-gradient(135deg, var(--brand-500, #059669), var(--brand-700, #065f46)) !important;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--brand-500, #059669) 35%, transparent) !important;
}

.cn-btn-shop:hover {
  box-shadow: 0 16px 32px color-mix(in srgb, var(--brand-500, #059669) 45%, transparent) !important;
}

.cn-login-card--shop .cn-input:focus {
  border-color: var(--brand-500, #059669);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-500, #059669) 15%, transparent);
}

.cn-login-card--shop .cn-input-wrap:focus-within > i.field-icon {
  color: var(--brand-600, #047857);
}

.shop-themed-link {
  color: var(--brand-600, #047857);
  font-weight: 600;
  text-decoration: none;
}

.shop-themed-link:hover {
  text-decoration: underline;
}

.shop-themed-check {
  accent-color: var(--brand-500, #059669);
}

/* Legacy shop single-card (fallback) */
.cn-login-scene--shop:not(.cn-login-scene--shop-split) {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.cn-login-scene--shop:not(.cn-login-scene--shop-split) .cn-login-card {
  max-width: 28rem;
}

.cn-login-shop-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 1.5rem;
  text-decoration: none;
  color: inherit;
}

.cn-login-shop-brand img,
.cn-login-shop-brand .cn-login-shop-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  object-fit: cover;
  margin-bottom: 0.75rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
}

.cn-login-shop-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand-500, #10b981), var(--brand-700, #047857));
  color: #fff;
  font-size: 1.35rem;
}

.cn-login-shop-brand span {
  font-family: var(--cn-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--cn-navy);
}

@media (prefers-reduced-motion: reduce) {
  .cn-login-orbs span,
  .cn-login-card,
  .cn-login-card::before,
  .cn-login-card .cn-btn-primary::after {
    animation: none !important;
    transition: none !important;
  }
}
