/* ============================================
   BlockWall — style_auth.css
   Styles spécifiques à la page inscription/connexion
   Aligné sur le nouveau design "œuvre collective"
   ============================================ */


/* === VARIABLES LOCALES === */
:root {
  --bg:       #0c0c0e;
  --bg2:      #111115;
  --bg3:      #17171d;
  --card:     #1a1a22;
  --border:   rgba(255,255,255,0.07);
  --border2:  rgba(255,255,255,0.12);
  --txt:      #f0ede8;
  --txt2:     #9997a0;
  --txt3:     #5e5c67;
  --accent:   #c8a97e;
  --accent2:  #8ecfc8;
  --accent3:  #d98fa0;
  --glow:     rgba(200, 169, 126, 0.15);
  --mono:     'DM Mono', monospace;
  --serif:    'Fraunces', Georgia, serif;
  --sans:     'Outfit', sans-serif;
  --trans:    0.25s ease;
  --r-sm:     8px;
  --r-md:     12px;
  --r-lg:     16px;
  --r-xl:     20px;

  /* legacy compat — référencé dans certains composants */
  --color-green:      #c8a97e;
  --color-cyan:       #8ecfc8;
  --color-red:        #e07070;
  --color-orange:     #d4a45a;
  --color-green-soft: rgba(200,169,126,0.08);
  --color-red-dim:    rgba(224,112,112,0.08);
  --bg-primary:       #0c0c0e;
  --bg-secondary:     #111115;
  --bg-card:          #1a1a22;
  --bg-input:         #17171d;
  --border-default:   rgba(255,255,255,0.07);
  --text-primary:     #f0ede8;
  --text-secondary:   #9997a0;
  --text-dim:         #5e5c67;
  --text-inverse:     #0c0c0e;
  --shadow-sm:        0 2px 8px rgba(0,0,0,0.4);
  --shadow-green:     0 8px 32px rgba(200,169,126,0.2);
  --shadow-green-lg:  0 12px 40px rgba(200,169,126,0.3);
  --font-display:     'Outfit', sans-serif;
  --font-mono:        'DM Mono', monospace;
  --weight-semibold:  600;
  --weight-bold:      700;
  --weight-extrabold: 800;
  --weight-black:     900;
  --text-xs:          0.72rem;
  --text-sm:          0.82rem;
  --text-base:        0.92rem;
  --text-md:          1rem;
  --text-lg:          1.1rem;
  --text-xl:          1.25rem;
  --text-2xl:         1.5rem;
  --text-5xl:         3rem;
  --radius-sm:        6px;
  --radius-md:        12px;
  --radius-lg:        16px;
  --transition-fast:  0.15s ease;
  --transition-base:  0.25s ease;
  --max-width-form:   400px;
  --z-base:           1;
}


/* === PAGE BODY === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--txt);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Noise overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
  opacity: 0.4;
}

/* Ambient glow */
body::after {
  content: '';
  position: fixed;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 900px;
  background: radial-gradient(circle, rgba(200, 169, 126, 0.06) 0%, transparent 65%);
  pointer-events: none;
}


/* === LAYOUT === */
.auth-wrapper {
  display: flex;
  width: 100%;
  max-width: 1100px;
  min-height: 100vh;
  position: relative;
  z-index: var(--z-base);
}


/* === LEFT PANEL === */
.auth-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 3rem;
  position: relative;
  overflow: hidden;
}

/* Soft gradient wash */
.auth-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(200,169,126,0.04) 0%, transparent 55%);
  pointer-events: none;
}

/* Decorative orb */
.auth-left::after {
  content: '';
  position: absolute;
  top: -80px;
  left: -80px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(200,169,126,0.08) 0%, transparent 65%);
  pointer-events: none;
  filter: blur(40px);
}

.auth-logo {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--txt);
  margin-bottom: 2.5rem;
  position: relative;
  z-index: 1;
  letter-spacing: -0.02em;
}

.auth-logo span {
  color: var(--accent);
  font-style: italic;
}

/* Small label above the title */
.auth-left-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.8rem;
  position: relative;
  z-index: 1;
}

.auth-left h1 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 1.2rem;
  color: var(--txt);
  position: relative;
  z-index: 1;
}

.auth-left h1 .highlight {
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
  /* override any background-clip gradient from index */
  background: none;
  -webkit-text-fill-color: var(--accent);
}

.auth-left p {
  color: var(--txt2);
  font-size: 0.95rem;
  line-height: 1.75;
  max-width: 380px;
  margin-bottom: 2.5rem;
  position: relative;
  z-index: 1;
  font-weight: 300;
}


/* === STATS === */
.auth-stats {
  display: flex;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
  position: relative;
  z-index: 1;
}

.auth-stat-value {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--txt);
  font-style: italic;
  line-height: 1;
  margin-bottom: 0.3rem;
}

.auth-stat-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--txt3);
}


/* === FEATURE LIST === */
.auth-features {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  position: relative;
  z-index: 1;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.88rem;
  color: var(--txt2);
  line-height: 1.4;
}

.auth-feature-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: rgba(200,169,126,0.08);
  border: 1px solid rgba(200,169,126,0.15);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}


/* === MINI WALL DECORATION === */
.mini-wall {
  position: absolute;
  bottom: 2.5rem;
  left: 3rem;
  right: 3rem;
  height: 60px;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  opacity: 0.1;
  overflow: hidden;
  pointer-events: none;
}

.mini-wall-block {
  width: 8px;
  height: 8px;
  border-radius: 1px;
}


/* === RIGHT PANEL === */
.auth-right {
  width: 480px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  border-left: 1px solid var(--border);
  background: var(--bg2);
  position: relative;
}

.auth-card {
  width: 100%;
  max-width: var(--max-width-form);
}


/* === TABS === */
.auth-tabs {
  display: flex;
  background: var(--bg3);
  border-radius: var(--r-lg);
  padding: 4px;
  margin-bottom: 1.75rem;
  border: 1px solid var(--border);
}

.auth-tab {
  flex: 1;
  padding: 0.65rem 1rem;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--txt3);
  border-radius: 11px;
  cursor: pointer;
  transition: all var(--trans);
  border: none;
  background: none;
  font-family: var(--sans);
}

.auth-tab:hover { color: var(--txt2); }

.auth-tab.active {
  background: var(--card);
  color: var(--txt);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}


/* === FORMS === */
.auth-form { display: none; }

.auth-form.active {
  display: block;
  animation: formIn 0.4s ease;
}

@keyframes formIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.form-title {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  letter-spacing: -0.02em;
  color: var(--txt);
}

.form-subtitle {
  color: var(--txt2);
  font-size: 0.88rem;
  margin-bottom: 1.5rem;
  font-weight: 300;
}


/* === SOCIAL BUTTONS === */
.social-btns {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.btn-social {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--bg3);
  border: 1px solid var(--border2);
  color: var(--txt);
  padding: 0.7rem 1rem;
  border-radius: var(--r-md);
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--trans);
}

.btn-social svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn-social:hover {
  border-color: rgba(200,169,126,0.3);
  background: rgba(200,169,126,0.05);
}


/* === DIVIDER === */
.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.divider-text {
  font-size: 0.72rem;
  color: var(--txt3);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}


/* === INPUT GROUP === */
.input-group {
  margin-bottom: 1.1rem;
}

.input-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--txt2);
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}

.input-wrap {
  display: flex;
  align-items: center;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: all var(--trans);
  overflow: hidden;
}

.input-wrap:focus-within {
  border-color: rgba(200,169,126,0.4);
  box-shadow: 0 0 0 3px rgba(200,169,126,0.08);
}

.input-icon {
  padding: 0 0.75rem;
  color: var(--txt3);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.input-icon .material-icons-outlined { font-size: 18px; }

.input-wrap input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  padding: 0.75rem 0;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--txt);
  min-width: 0;
}

.input-wrap input::placeholder { color: var(--txt3); }


/* === VALIDATION ICONS === */
.input-check {
  padding: 0 0.75rem 0 0;
  display: none;
  flex-shrink: 0;
}

.input-check.visible { display: flex; align-items: center; }

.input-check.ok .material-icons-outlined   { font-size: 17px; color: var(--accent2); }
.input-check.fail .material-icons-outlined { font-size: 17px; color: var(--color-red); }


/* === PASSWORD STRENGTH === */
.pw-strength {
  display: flex;
  gap: 4px;
  margin-top: 0.5rem;
  height: 3px;
}

.pw-bar {
  flex: 1;
  background: var(--border);
  border-radius: 2px;
  transition: all 0.4s;
}

.pw-bar.active-1 { background: var(--color-red); }
.pw-bar.active-2 { background: var(--color-orange); }
.pw-bar.active-3 { background: var(--color-orange); }
.pw-bar.active-4 { background: var(--accent2); }

.pw-label {
  font-size: 0.7rem;
  color: var(--txt3);
  margin-top: 0.3rem;
  text-align: right;
  transition: color var(--trans);
  font-family: var(--mono);
}

.pw-label.c1 { color: var(--color-red); }
.pw-label.c2 { color: var(--color-orange); }
.pw-label.c3 { color: var(--color-orange); }
.pw-label.c4 { color: var(--accent2); }


/* === TOGGLE PASSWORD === */
.toggle-pw {
  padding: 0 0.75rem 0 0;
  color: var(--txt3);
  cursor: pointer;
  background: none;
  border: none;
  transition: color var(--trans);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.toggle-pw .material-icons-outlined { font-size: 18px; }
.toggle-pw:hover { color: var(--txt2); }


/* === CHECKBOX === */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
  cursor: pointer;
}

.checkbox-group input { display: none; }

.custom-check {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 6px;
  border: 1px solid var(--border2);
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--trans);
  margin-top: 1px;
  color: transparent;
}

.custom-check .material-icons-outlined { font-size: 13px; }

.checkbox-group input:checked + .custom-check {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.checkbox-label {
  font-size: 0.82rem;
  color: var(--txt2);
  line-height: 1.45;
}

.checkbox-label a {
  color: var(--accent);
  text-decoration: none;
}

.checkbox-label a:hover { text-decoration: underline; }


/* === SUBMIT BUTTON === */
.btn-submit {
  width: 100%;
  padding: 0.9rem;
  border: none;
  border-radius: var(--r-md);
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--trans);
  position: relative;
  overflow: hidden;
  background: var(--accent);
  color: var(--bg);
  letter-spacing: 0.01em;
}

.btn-submit:hover:not(:disabled) {
  box-shadow: var(--shadow-green-lg);
  transform: translateY(-1px);
  background: #d4b98e;
}

.btn-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-submit .btn-text { transition: opacity var(--trans); }
.btn-submit.loading .btn-text { opacity: 0; }

.btn-submit .spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  opacity: 0;
  transition: opacity var(--trans);
}

.btn-submit.loading .spinner { opacity: 1; }

.spinner-dot {
  width: 6px;
  height: 6px;
  background: var(--bg);
  border-radius: 50%;
  animation: dotBounce 1.2s ease-in-out infinite;
}

.spinner-dot:nth-child(2) { animation-delay: 0.2s; }
.spinner-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBounce {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.5; }
  40%           { transform: scale(1); opacity: 1; }
}


/* === MESSAGES === */
.form-message {
  padding: 0.75rem 1rem;
  border-radius: var(--r-sm);
  font-size: 0.82rem;
  margin-bottom: 1.1rem;
  display: none;
  animation: formIn 0.3s ease;
  line-height: 1.5;
}

.form-message.error {
  display: block;
  background: var(--color-red-dim);
  border: 1px solid rgba(224,112,112,0.2);
  color: var(--color-red);
}

.form-message.success {
  display: block;
  background: var(--color-green-soft);
  border: 1px solid rgba(200,169,126,0.2);
  color: var(--accent);
}


/* === SWITCH LINK === */
.auth-switch {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.82rem;
  color: var(--txt2);
}

.auth-switch a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

.auth-switch a:hover { text-decoration: underline; }


/* === FORGOT PASSWORD === */
.forgot-link {
  text-align: right;
  margin-bottom: 1.25rem;
}

.forgot-link a {
  color: var(--accent2);
  font-size: 0.8rem;
  text-decoration: none;
  font-family: var(--mono);
}

.forgot-link a:hover { text-decoration: underline; }


/* === RESPONSIVE === */
@media (max-width: 900px) {
  .auth-wrapper {
    flex-direction: column;
  }

  .auth-left {
    padding: 3rem 2rem 2.5rem;
    text-align: center;
    align-items: center;
  }

  .auth-left h1 { font-size: 2.2rem; }

  .auth-left p { max-width: none; }

  .auth-stats { justify-content: center; }

  .auth-features { align-items: flex-start; max-width: 340px; }

  .mini-wall { display: none; }

  .auth-right {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 500px) {
  .auth-right { padding: 1.5rem; }
  .social-btns { flex-direction: column; }
  .auth-left { padding: 2.5rem 1.5rem 2rem; }
}