/* ===========================================================
   Akta Landing — styles.css
   Charte stricte : amber #e8a33c, bleu profond #1a3a6b,
   off-white #fefcf7. Une seule typo (system-ui), 4 tailles,
   border-radius 8px partout, espacement généreux.
   Pas de gradient, pas de drop-shadow agressif.
   =========================================================== */

:root {
  --c-amber: #e8a33c;
  --c-amber-hover: #d68e22;
  --c-blue: #1a3a6b;
  --c-bg: #fefcf7;
  --c-text: #2d3748;
  --c-text-muted: #6b7280;
  --c-border: #e5e7eb;
  --c-error: #dc2626;
  --c-success: #16a34a;

  --r: 8px;
  --container-max: 560px;
  --pad: 32px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Layout ---------- */

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 16px;
}

.brand {
  margin-bottom: 32px;
  text-align: center;
}

.brand-name {
  font-size: 32px;
  font-weight: 600;
  color: var(--c-blue);
  letter-spacing: -0.5px;
  margin: 0;
}

.brand-tag {
  font-size: 14px;
  color: var(--c-text-muted);
  margin-top: 4px;
}

.card {
  width: 100%;
  max-width: var(--container-max);
  background: #ffffff;
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  padding: var(--pad);
}

/* ---------- Progress ---------- */

.progress {
  margin-bottom: 32px;
}

.progress-label {
  font-size: 14px;
  color: var(--c-text-muted);
  margin-bottom: 8px;
}

.progress-bar {
  height: 4px;
  background: var(--c-border);
  border-radius: var(--r);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--c-amber);
  width: 25%;
  transition: width 200ms ease-out;
}

/* ---------- Slides ---------- */

.slides {
  position: relative;
}

.slide {
  display: none;
  animation: fadeSlide 200ms ease-out;
}

.slide.active {
  display: block;
}

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

.slide-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--c-blue);
  margin: 0 0 8px 0;
}

.slide-subtitle {
  font-size: 14px;
  color: var(--c-text-muted);
  margin: 0 0 24px 0;
}

/* ---------- Form fields ---------- */

.field {
  margin-bottom: 20px;
}

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

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

label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text);
  margin-bottom: 6px;
}

label .req {
  color: var(--c-amber);
  margin-left: 2px;
}

input[type="text"],
input[type="email"],
input[type="password"],
select {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  color: var(--c-text);
  background: #ffffff;
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  padding: 10px 12px;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input:focus,
select:focus {
  border-color: var(--c-amber);
  box-shadow: 0 0 0 3px rgba(232, 163, 60, 0.18);
}

input.invalid,
select.invalid {
  border-color: var(--c-error);
}

input.invalid:focus,
select.invalid:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.help {
  font-size: 14px;
  color: var(--c-text-muted);
  margin-top: 4px;
}

.error {
  display: none;
  font-size: 14px;
  color: var(--c-error);
  margin-top: 4px;
}

.field.has-error .error {
  display: block;
}

.field.has-error label {
  color: var(--c-error);
}

/* ---------- Password strength ---------- */

.pw-strength {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.pw-bar {
  flex: 1;
  height: 4px;
  background: var(--c-border);
  border-radius: var(--r);
  overflow: hidden;
}

.pw-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--c-error);
  transition: width 150ms ease, background-color 150ms ease;
}

.pw-bar-fill.weak   { width: 33%;  background: var(--c-error); }
.pw-bar-fill.medium { width: 66%;  background: var(--c-amber); }
.pw-bar-fill.strong { width: 100%; background: var(--c-success); }

.pw-label {
  width: 64px;
  text-align: right;
  color: var(--c-text-muted);
  font-size: 14px;
}

/* ---------- Radio (régime TVA) ---------- */

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.radio-card:hover {
  background: #fbfaf6;
}

.radio-card input {
  margin-top: 4px;
  accent-color: var(--c-amber);
}

.radio-card-title {
  font-weight: 500;
  font-size: 16px;
  color: var(--c-text);
}

.radio-card-desc {
  font-size: 14px;
  color: var(--c-text-muted);
}

.radio-card.selected {
  border-color: var(--c-amber);
  background: #fff8ec;
}

/* ---------- Notes / callouts ---------- */

.note {
  font-size: 14px;
  color: var(--c-text);
  background: #fff8ec;
  border: 1px solid #f3d99c;
  border-radius: var(--r);
  padding: 12px 14px;
  margin-top: 12px;
}

/* ---------- Recap (slide 4) ---------- */

.recap-section {
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  padding: 16px;
  margin-bottom: 16px;
}

.recap-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-blue);
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.recap-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  font-size: 14px;
  padding: 4px 0;
}

.recap-key {
  color: var(--c-text-muted);
}

.recap-val {
  color: var(--c-text);
  word-break: break-word;
}

@media (max-width: 480px) {
  .recap-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .recap-key { font-size: 14px; }
}

/* ---------- Checkboxes ---------- */

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  margin-bottom: 12px;
  cursor: pointer;
}

.check input {
  margin-top: 3px;
  accent-color: var(--c-amber);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ---------- Buttons / nav ---------- */

.actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.actions.single {
  justify-content: flex-end;
}

button {
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  border-radius: var(--r);
  cursor: pointer;
  padding: 10px 20px;
  border: 1px solid transparent;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.btn-primary {
  background: var(--c-amber);
  color: #ffffff;
  border-color: var(--c-amber);
}

.btn-primary:hover:not(:disabled) {
  background: var(--c-amber-hover);
  border-color: var(--c-amber-hover);
}

.btn-primary:disabled {
  background: #f0d9a8;
  border-color: #f0d9a8;
  cursor: not-allowed;
}

.btn-secondary {
  background: #ffffff;
  color: var(--c-text);
  border-color: var(--c-border);
}

.btn-secondary:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.btn-cta {
  width: 100%;
  font-weight: 600;
  padding: 14px 20px;
  font-size: 16px;
}

button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(232, 163, 60, 0.35);
}

.hidden {
  display: none !important;
}

/* ---------- Spinner ---------- */

.spinner-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 0;
  color: var(--c-text);
  font-size: 14px;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #f0d9a8;
  border-top-color: var(--c-amber);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

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

/* ---------- Success screen ---------- */

.success {
  text-align: center;
  padding: 16px 8px;
}

.success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #e8f5ec;
  margin-bottom: 20px;
}

.success-title {
  font-size: 32px;
  font-weight: 600;
  color: var(--c-blue);
  margin: 0 0 12px 0;
  letter-spacing: -0.5px;
}

.success-line {
  font-size: 16px;
  color: var(--c-text);
  margin: 0 0 8px 0;
}

.success-sub {
  font-size: 14px;
  color: var(--c-text-muted);
  margin-top: 16px;
}

.success-email {
  font-weight: 500;
  color: var(--c-blue);
  word-break: break-word;
}

/* ---------- Footer ---------- */

.footer {
  margin-top: 24px;
  font-size: 14px;
  color: var(--c-text-muted);
  text-align: center;
}

/* Submit error banner — shown by app.js when /api/signup fails */
.error-banner {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  font-size: 14px;
  line-height: 1.5;
}

/* Domain line on success card (shown only when API returned a domain) */
.success-domain {
  font-size: 14px;
  color: var(--c-text-muted);
}
.success-domain strong {
  color: var(--c-text);
  font-weight: 600;
}

/* ===========================================================
   Marketing landing — index.html only
   Wider container, hero + features grid + CTA.
   =========================================================== */

.marketing {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

.hero {
  text-align: center;
  padding: 24px 16px 40px;
}

.hero-title {
  font-size: 36px;
  font-weight: 600;
  color: var(--c-blue);
  margin: 0 0 16px 0;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.hero-lead {
  font-size: 18px;
  color: var(--c-text);
  margin: 0 auto 32px;
  max-width: 640px;
  line-height: 1.5;
}

.hero-cta {
  display: inline-block;
  background: var(--c-amber);
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: var(--r);
  text-decoration: none;
  border: 1px solid var(--c-amber);
  transition: background-color 150ms ease, border-color 150ms ease;
}

.hero-cta:hover {
  background: var(--c-amber-hover);
  border-color: var(--c-amber-hover);
}

.hero-cta-sub {
  margin-top: 12px;
  font-size: 14px;
  color: var(--c-text-muted);
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 24px 0 40px;
}

@media (max-width: 760px) {
  .features {
    grid-template-columns: 1fr;
  }
  .hero-title { font-size: 28px; }
}

.feature-card {
  background: #ffffff;
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  padding: 24px;
}

.feature-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--c-blue);
  margin: 0 0 8px 0;
}

.feature-body {
  font-size: 14px;
  color: var(--c-text);
  margin: 0;
  line-height: 1.5;
}

.cta-band {
  background: var(--c-blue);
  color: #ffffff;
  border-radius: var(--r);
  padding: 32px 24px;
  text-align: center;
  margin: 24px 0 32px;
}

.cta-band-title {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 16px 0;
}

.cta-band .hero-cta {
  background: var(--c-amber);
  color: #ffffff;
}

.brand-link {
  text-decoration: none;
  color: inherit;
  display: inline-block;
}

