/* Onboarding — première expérience du produit. Mêmes tokens de marque que
   caisse/backoffice (indigo/violet), mais présentation plus "landing page"
   pour le carrousel : grand, aéré, une idée à la fois. */

:root {
  --bg-canvas: #ECE9FB;
  --bg-panel: #ffffff;
  --bg-panel-alt: #F5F3FC;
  --border: #E2DEF6;
  --border-strong: #CCC5EF;

  --text-primary: #191335;
  --text-secondary: #6B6690;
  --text-inverse: #ffffff;

  --brand: #4F46E5;
  --brand-strong: #3B32B8;
  --brand-darker: #241D6B;
  --brand-soft: #E7E4FB;

  --success: #16A34A;
  --success-strong: #0F7C38;

  --danger: #E11D48;
  --danger-soft: #FFE1E9;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-md: 0 8px 24px rgba(36, 29, 107, 0.10);
  --shadow-lg: 0 24px 60px rgba(36, 29, 107, 0.18);

  color-scheme: light;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(circle at 20% 0%, #F3F1FD 0%, var(--bg-canvas) 55%);
  color: var(--text-primary);
}

button, input, select {
  font-family: inherit;
}

.btn {
  height: 50px;
  padding: 0 22px;
  border-radius: var(--radius-md);
  border: none;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .08s ease, box-shadow .15s ease, background-color .15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-block {
  width: 100%;
}

.btn-brand {
  background: var(--brand);
  color: var(--text-inverse);
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.32);
}

.btn-brand:hover {
  background: var(--brand-strong);
}

.btn-success {
  background: var(--success);
  color: var(--text-inverse);
  box-shadow: 0 10px 24px rgba(22, 163, 74, 0.3);
}

.btn-success:disabled {
  opacity: .5;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--text-primary);
}

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

.error-banner {
  background: var(--danger-soft);
  color: var(--danger);
  font-weight: 600;
  font-size: 13.5px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
}

.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.field input, .field select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong);
  font-size: 14.5px;
  color: var(--text-primary);
  background: var(--bg-panel);
}

.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.rooms-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 4px;
}

.room-row {
  display: grid;
  grid-template-columns: 1fr 110px 40px;
  gap: 10px;
  align-items: end;
}

.room-row .field {
  margin: 0;
}

.room-row__remove {
  height: 46px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong);
  background: var(--bg-panel);
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
}

.room-row__remove:hover {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: var(--danger);
}

/* ---------- Écran carrousel de bienvenue ---------- */

.screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.welcome-shell {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.welcome-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--brand);
  font-weight: 800;
  font-size: 18px;
}

.welcome-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.wizard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.lang-switcher {
  display: flex;
  gap: 4px;
}

.lang-switcher__flag {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1.5px solid transparent;
  background: none;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  opacity: .45;
  transition: all .12s ease;
}

.lang-switcher__flag:hover {
  opacity: .8;
}

.lang-switcher__flag.is-active {
  opacity: 1;
  border-color: var(--border-strong);
  background: var(--bg-panel-alt);
}

.slides {
  width: 100%;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  animation: slide-in .35s ease;
}

.slide.is-active {
  display: flex;
}

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

.slide__icon {
  width: 96px;
  height: 96px;
  padding: 22px;
  color: var(--brand);
  background: var(--bg-panel);
  border-radius: 999px;
  box-shadow: var(--shadow-md);
}

.slide h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
}

.slide p {
  font-size: 15.5px;
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 400px;
  margin: 0;
}

.dots {
  display: flex;
  gap: 8px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--border-strong);
  transition: all .2s ease;
}

.dot.is-active {
  width: 24px;
  background: var(--brand);
}

.welcome-actions {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.welcome-actions--final {
  flex-direction: column;
  align-items: stretch;
}

.welcome-login-link {
  text-align: center;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px;
}

.welcome-login-link:hover {
  color: var(--brand);
}

/* ---------- Écrans auth / wizard (carte centrée) ---------- */

.auth-card, .wizard-shell {
  width: 100%;
  max-width: 440px;
  background: var(--bg-panel);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wizard-shell--wide {
  max-width: 680px;
}

.auth-card__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--brand);
  font-weight: 800;
  font-size: 18px;
  margin-bottom: -6px;
}

.auth-card h1, .wizard-shell h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0;
}

.auth-card__subtitle, .wizard-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin: -10px 0 4px;
}

.wizard-progress {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--brand);
}

/* ---------- Upload logo ---------- */

.logo-upload {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-upload__preview {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: var(--bg-panel-alt);
}

.logo-upload__placeholder {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background: var(--bg-panel-alt);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Grille des métiers ---------- */

.business-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.business-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 12px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-strong);
  background: var(--bg-panel);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: border-color .12s ease, background-color .12s ease, transform .08s ease;
}

.business-card:hover {
  border-color: var(--brand);
  transform: translateY(-1px);
}

.business-card svg {
  width: 30px;
  height: 30px;
  color: var(--brand);
}

.business-card.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--text-inverse);
}

.business-card.is-active svg {
  color: var(--text-inverse);
}

@media (max-width: 560px) {
  .field-row {
    grid-template-columns: 1fr;
  }

  .auth-card, .wizard-shell {
    padding: 28px 22px;
  }

  .slide__icon {
    width: 76px;
    height: 76px;
    padding: 18px;
  }

  .slide h1 {
    font-size: 22px;
  }
}
