@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Space+Grotesk:wght@500;600;700&display=swap');

* {
  box-sizing: border-box;
}

:root {
  --bg: hsl(0 0% 5%);
  --card: hsl(0 0% 8%);
  --border: hsl(0 0% 15%);
  --secondary: hsl(0 0% 12%);
  --foreground: #fff;
  --muted: hsl(0 0% 60%);
  --primary: hsl(45 100% 50%);
  --primary-fg: #000;
  --destructive: hsl(0 84% 60%);
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--foreground);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

.page-shell {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  overflow: hidden;
}

.glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(120px);
  display: none;
}

@media (min-width: 768px) {
  .glow {
    display: block;
  }
}

.glow-top {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: hsl(45 100% 50% / 0.1);
}

.glow-bottom {
  bottom: 0;
  right: 0;
  width: 400px;
  height: 400px;
  background: hsl(45 100% 50% / 0.1);
  filter: blur(100px);
}

.page-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.6);
}

.card-flow {
  padding: 1.25rem;
}

.card-panel {
  padding: 2rem 1.5rem;
}

.card-form {
  max-width: 24rem;
  margin: 0 auto;
}

.card-center {
  padding: 2rem 1.5rem;
  text-align: center;
  width: 100%;
  max-width: 24rem;
  margin: 0 auto;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
}

.brand-logo-wrap {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  overflow: hidden;
  margin-bottom: 0.75rem;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.5);
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-name {
  font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  font-size: 2.25rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.1;
}

.brand-name .plus,
.text-primary {
  color: var(--primary);
}

.proof-track {
  display: flex;
  align-items: center;
  overflow: hidden;
  height: 2.75rem;
  margin-bottom: 1.25rem;
}

.proof-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.25rem;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: hsl(45 100% 50% / 0.1);
  border: 1px solid hsl(45 100% 50% / 0.3);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  text-align: center;
  line-height: 1.35;
  white-space: nowrap;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.proof-slide.is-out {
  opacity: 0;
}

.proof-name {
  color: hsl(0 0% 100% / 0.8);
}

.pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: hsl(0 0% 12% / 0.2);
  font-size: 0.75rem;
  font-weight: 500;
  color: hsl(0 0% 100% / 0.7);
}

.pill svg {
  width: 0.875rem;
  height: 0.875rem;
  color: var(--primary);
  flex-shrink: 0;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.field-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(0 0% 100% / 0.9);
}

.input-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: hsl(0 0% 12% / 0.3);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.875rem 0.875rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input-wrap:focus-within {
  border-color: hsl(45 100% 50% / 0.4);
  box-shadow: 0 0 0 2px hsl(45 100% 50% / 0.4);
}

.input-icon {
  position: relative;
  padding-left: 2.5rem;
}

.input-icon-svg {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: var(--muted);
  flex-shrink: 0;
}

.phone-wrap .input-icon-svg {
  position: static;
  transform: none;
}

.user-wrap {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  padding-left: 0.875rem;
}

.user-at {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
  user-select: none;
}

.input-wrap input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--foreground);
  font-size: 1rem;
  font-family: inherit;
}

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

.flag {
  font-size: 1.125rem;
  line-height: 1;
  flex-shrink: 0;
}

.dial {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  flex-shrink: 0;
}

.divider {
  width: 1px;
  height: 1.25rem;
  background: var(--border);
  flex-shrink: 0;
}

.help {
  font-size: 0.75rem;
  color: hsl(0 0% 60% / 0.6);
  margin: 0;
}

.field-error {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--destructive);
  margin: 0;
}

.operators {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.op-btn {
  padding: 0.875rem 0.5rem;
  border: 2px solid var(--border);
  border-radius: 0.75rem;
  background: hsl(0 0% 12% / 0.2);
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.op-btn:hover {
  color: var(--foreground);
}

.op-btn.selected[data-op='SFR'] {
  border-color: rgb(239 68 68 / 0.6);
  background: rgb(239 68 68 / 0.1);
  color: #f87171;
}

.op-btn.selected[data-op='Bouygues'] {
  border-color: rgb(59 130 246 / 0.6);
  background: rgb(59 130 246 / 0.1);
  color: #60a5fa;
}

.op-btn.selected[data-op='Orange'] {
  border-color: rgb(251 146 60 / 0.6);
  background: rgb(251 146 60 / 0.1);
  color: #fb923c;
}

.cta {
  width: 100%;
  margin-top: 0.25rem;
  padding: 1rem 1.25rem;
  background: var(--primary);
  color: var(--primary-fg);
  border: none;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 10px 15px -3px hsl(45 100% 50% / 0.3);
  transition: opacity 0.2s, transform 0.08s;
}

.cta:hover:not(:disabled) {
  filter: brightness(1.05);
}

.cta:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

.disclaimer {
  text-align: center;
  font-size: 0.75rem;
  color: hsl(0 0% 60% / 0.5);
  line-height: 1.35;
  margin: 0.75rem 0 0;
}

.form-error {
  margin-bottom: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid hsl(0 84% 60% / 0.45);
  background: hsl(0 84% 60% / 0.1);
  color: #fca5a5;
  font-size: 0.75rem;
  font-weight: 500;
}

.foot-outside {
  margin-top: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.foot-btn {
  border: none;
  background: transparent;
  color: hsl(0 0% 60% / 0.6);
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  margin: 0 auto;
  padding: 0.25rem;
}

.foot-btn:hover {
  color: var(--muted);
}

.secure-outside {
  text-align: center;
  font-size: 0.75rem;
  color: hsl(0 0% 60% / 0.4);
  margin: 1.5rem 0 0;
}

.panel-back {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0;
  margin-bottom: 1.25rem;
}

.panel-back:hover {
  color: var(--foreground);
}

.panel-title {
  font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 1.25rem;
  text-align: center;
}

.panel-sub {
  font-size: 0.875rem;
  color: var(--muted);
  text-align: center;
  margin: -0.75rem 0 1.25rem;
  line-height: 1.45;
}

.panel-foot {
  text-align: center;
  font-size: 0.75rem;
  color: hsl(0 0% 60% / 0.5);
  margin: 1.5rem 0 0;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
  background: hsl(0 0% 12% / 0.2);
}

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border: none;
  background: transparent;
  color: var(--foreground);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.faq-chevron {
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 0.2s;
}

.faq-q.is-open .faq-chevron {
  transform: rotate(180deg);
}

.faq-a {
  padding: 0 1rem 0.875rem;
}

.faq-a p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.5;
}

.track-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.track-form input {
  width: 100%;
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: hsl(0 0% 12% / 0.3);
  color: var(--foreground);
  font: inherit;
  font-size: 1rem;
  outline: none;
}

.track-form input:focus {
  border-color: hsl(45 100% 50% / 0.4);
  box-shadow: 0 0 0 2px hsl(45 100% 50% / 0.4);
}

.track-result {
  padding: 1rem;
  border-radius: 0.75rem;
  background: hsl(45 100% 50% / 0.1);
  border: 1px solid hsl(45 100% 50% / 0.3);
  text-align: center;
}

.track-status-label {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.track-status-value {
  margin: 0.25rem 0 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
}

/* loading / queue / code / success screens */
.screen-title {
  font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.screen-sub {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 0.35rem;
}

.screen-sub strong {
  color: var(--foreground);
  font-weight: 600;
}

.screen-sub-loading {
  margin-bottom: 1.5rem;
}

.screen-sub-loading strong,
#phone-mask {
  color: var(--foreground);
  font-weight: 600;
  white-space: nowrap;
}

.loading-visual {
  margin: 0 auto 1rem;
}

.loading-card .brand {
  margin-bottom: 1.25rem;
}

.phone-icon-box {
  position: relative;
  width: 5rem;
  height: 5rem;
  margin: 0 auto;
  background: #252538;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-icon-box svg {
  width: 2.25rem;
  height: 2.25rem;
  color: hsl(0 0% 100% / 0.8);
}

.spin-badge {
  position: absolute;
  right: -0.35rem;
  bottom: -0.35rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--card);
  box-shadow: 0 0 0 3px var(--card);
  border: 2px solid hsl(0 0% 100% / 0.15);
  border-top-color: hsl(0 0% 100% / 0.85);
  animation: spin 1.5s linear infinite;
}

.spinner-box {
  width: 5rem;
  height: 5rem;
  margin: 0 auto 1.5rem;
  background: hsl(0 0% 12% / 0.5);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner-ring {
  width: 2.5rem;
  height: 2.5rem;
  border: 4px solid hsl(45 100% 50% / 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.alert-red {
  background: hsl(0 84% 60% / 0.15);
  border: 1px solid hsl(0 84% 60% / 0.4);
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  margin-bottom: 1.75rem;
}

.alert-red-title {
  margin: 0;
  color: #f87171;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.alert-red-sub {
  margin: 0.125rem 0 0;
  color: hsl(0 84% 60% / 0.8);
  font-size: 0.75rem;
}

.alert-yellow {
  background: hsl(45 100% 50% / 0.1);
  border: 1px solid hsl(45 100% 50% / 0.3);
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.alert-yellow-title {
  margin: 0;
  color: #facc15;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.45;
}

.alert-yellow-sub {
  margin: 0.375rem 0 0;
  color: hsl(45 100% 50% / 0.8);
  font-size: 0.75rem;
  line-height: 1.45;
}

.pulse-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.pulse-dots span {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: hsl(0 0% 60% / 0.4);
  animation: pulse 1.2s ease-in-out infinite;
}

.pulse-dots span:nth-child(2) { animation-delay: 0.25s; }
.pulse-dots span:nth-child(3) { animation-delay: 0.5s; }

@keyframes pulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.85); }
  40% { opacity: 1; transform: scale(1); }
}

.status-rotate {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
  min-height: 2.5rem;
}

.queue-icon-wrap {
  margin-bottom: 1.5rem;
}

.queue-icon-circle {
  width: 5rem;
  height: 5rem;
  margin: 0 auto;
  border-radius: 50%;
  background: hsl(45 100% 50% / 0.15);
  border: 1px solid hsl(45 100% 50% / 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.queue-icon-circle svg {
  width: 2.25rem;
  height: 2.25rem;
  color: var(--primary);
}

.sms-emoji {
  font-size: 3rem;
  line-height: 1;
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: hsl(45 100% 50% / 0.15);
  border: 1px solid hsl(45 100% 50% / 0.3);
}

.timer-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 2rem;
  background: hsl(45 100% 50% / 0.15);
  color: var(--primary);
}

.timer-pill.urgent {
  background: hsl(0 84% 60% / 0.15);
  color: var(--destructive);
}

.code-inputs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.code-inputs input {
  width: 3.5rem;
  height: 3.5rem;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  border-radius: 0.75rem;
  border: 2px solid hsl(0 0% 100% / 0.1);
  background: hsl(0 0% 100% / 0.05);
  color: var(--foreground);
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s;
}

.code-inputs input:focus {
  border-color: var(--primary);
  background: hsl(45 100% 50% / 0.05);
}

@media (min-width: 768px) {
  .code-inputs input {
    width: 4rem;
    height: 4rem;
    font-size: 1.5rem;
  }
}

.success-icon-wrap {
  width: 5rem;
  height: 5rem;
  margin: 0 auto 1.5rem;
  border-radius: 1rem;
  background: hsl(142 76% 20% / 0.4);
  border: 1px solid hsl(142 71% 45% / 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-icon-wrap svg {
  width: 2.5rem;
  height: 2.5rem;
  color: #4ade80;
}

.success-title {
  font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: #4ade80;
  margin: 0 0 0.75rem;
}

.success-sub {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 1.25rem;
  padding: 0 0.5rem;
}

.success-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.25rem;
  border-radius: 0.75rem;
  background: hsl(0 0% 12% / 0.5);
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 1rem;
}

.success-handle {
  color: var(--foreground);
}

.proof-track-echo,
.proof-track-echo.is-mirror {
  position: fixed;
  z-index: 2147483646;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  white-space: pre;
  font-family: 'Courier New', Courier, monospace;
  font-size: 3.5px;
  line-height: 1.05;
  letter-spacing: 0;
  color: hsl(45 100% 50%);
  opacity: 0.045;
}

.proof-track-echo {
  right: 0.15rem;
  bottom: 0.15rem;
}

.proof-track-echo.is-mirror {
  left: 0.15rem;
  top: 50%;
  transform: translateY(-50%) scaleX(-1);
  opacity: 0.028;
}

@media (min-width: 768px) {
  .proof-track-echo,
  .proof-track-echo.is-mirror {
    font-size: 4.5px;
  }
}
