/* ============================================================
   Vericompt Landing — CSS autonome (pas de build requis)
   Palette : teal brand (#14b8a6 / #0d9488), Inter, dark mode
   ============================================================ */

/* ---------- Variables ---------- */
:root {
  --brand-400:  #2dd4bf;
  --brand-500:  #14b8a6;
  --brand-600:  #0d9488;
  --brand-700:  #0f766e;

  --bg:         #f8fafc; /* slate-50 */
  --bg-card:    #ffffff;
  --border:     #e2e8f0; /* slate-200 */
  --text:       #0f172a; /* slate-900 */
  --text-muted: #64748b; /* slate-500 */
  --input-bg:   #ffffff;

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  16px;

  --shadow-sm:  0 1px 3px 0 rgb(0 0 0 / .07), 0 1px 2px -1px rgb(0 0 0 / .07);
  --shadow-md:  0 4px 16px 0 rgb(0 0 0 / .08), 0 2px 6px -2px rgb(0 0 0 / .06);
}

.dark {
  --bg:         #020617; /* slate-950 */
  --bg-card:    #0f172a; /* slate-900 */
  --border:     #1e293b; /* slate-800 */
  --text:       #f1f5f9; /* slate-100 */
  --text-muted: #94a3b8; /* slate-400 */
  --input-bg:   #1e293b;
}

/* ---------- Reset minimal ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ---------- Base ---------- */
html {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: background-color .2s, color .2s;
}

/* ---------- Bouton thème ---------- */
#btn-theme {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, color .2s, border-color .2s;
  z-index: 10;
}
#btn-theme:hover { color: var(--brand-500); border-color: var(--brand-500); }
#btn-theme svg { width: 1rem; height: 1rem; }

/* ---------- Main ---------- */
main {
  flex: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 5rem 1.25rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

/* ---------- Header / logo ---------- */
header {
  display: flex;
  align-items: center;
  gap: .625rem;
  margin-bottom: .5rem;
}

.logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-name {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text);
}

/* ---------- Badge ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand-600);
  background: color-mix(in srgb, var(--brand-500) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand-500) 25%, transparent);
  padding: .25rem .75rem;
  border-radius: 999px;
}
.dark .badge { color: var(--brand-400); }

/* ---------- Titre h1 ---------- */
h1 {
  font-size: clamp(1.875rem, 5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.03em;
  color: var(--text);
}
h1 .accent {
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-700) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- Pitch ---------- */
.pitch {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.7;
}

/* ---------- Features list ---------- */
.features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  width: 100%;
  max-width: 400px;
  text-align: left;
}
.features li {
  display: flex;
  align-items: center;
  gap: .625rem;
  font-size: .875rem;
  color: var(--text-muted);
}
.features li svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: var(--brand-500);
}

/* ---------- Section waitlist ---------- */
.waitlist-section {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.waitlist-label {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: -.25rem;
}

/* ---------- Input group ---------- */
.input-group {
  display: flex;
  gap: .5rem;
  width: 100%;
}

#email {
  flex: 1;
  min-width: 0;
  padding: .625rem 1rem;
  font-size: .9375rem;
  font-family: inherit;
  background: var(--input-bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
#email::placeholder { color: var(--text-muted); opacity: .7; }
#email:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-500) 20%, transparent);
}
#email[aria-invalid="true"] {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgb(239 68 68 / .15);
}

#btn-submit {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .375rem;
  padding: .625rem 1.25rem;
  font-size: .875rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: var(--brand-500);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s, transform .1s;
  white-space: nowrap;
}
#btn-submit:hover:not(:disabled) { background: var(--brand-600); }
#btn-submit:active:not(:disabled) { transform: scale(.98); }
#btn-submit:disabled { opacity: .6; cursor: not-allowed; }
#btn-submit svg { width: 1.125rem; height: 1.125rem; display: none; }

/* Spinner rotatif */
@keyframes spin { to { transform: rotate(360deg); } }
.spinning { animation: spin .75s linear infinite; }

/* ---------- Messages ---------- */
.msg-erreur {
  display: none;
  font-size: .8125rem;
  color: #ef4444;
  text-align: left;
  margin-top: -.25rem;
}

.confirmation {
  display: none;
  align-items: center;
  gap: .625rem;
  font-size: .9375rem;
  font-weight: 500;
  color: #22a86b;
  background: rgb(34 168 107 / .08);
  border: 1px solid rgb(34 168 107 / .25);
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
  text-align: left;
}
.confirmation svg { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }

/* ---------- Footer ---------- */
footer {
  width: 100%;
  padding: 1.5rem 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: .375rem;
}
footer p { font-size: .8125rem; color: var(--text-muted); }
footer a { color: var(--brand-500); text-decoration: none; }
footer a:hover { text-decoration: underline; }
.copyright { font-size: .75rem; opacity: .6; }

/* ---------- Screen-reader only ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Responsive : mobile étroit ---------- */
@media (max-width: 440px) {
  .input-group {
    flex-direction: column;
  }
  #btn-submit {
    width: 100%;
    padding: .75rem;
  }
  main { padding-top: 3.5rem; }
}
