:root {
  --bg: #eef1f6;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: #eef2ff;
  --success: #16a34a;
  --success-soft: #dcfce7;
  --danger: #dc2626;
  --radius: 14px;
  --shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.18);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html.theme {
  background: var(--bg);
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
}

.card {
  width: 100%;
  max-width: 650px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 24px;
  overflow: hidden;
}

/* Head / progress */
.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}
.brand__name {
  font-size: 15px;
}

.progress {
  display: flex;
  gap: 6px;
}
.progress__step {
  width: 22px;
  height: 5px;
  border-radius: 999px;
  background: var(--border-strong);
  transition: background 0.25s ease;
}
.progress__step.is-done {
  background: var(--primary);
}
.progress.is-hidden {
  visibility: hidden;
}

/* Screens */
.screen {
  display: none;
  animation: fade 0.28s ease both;
}
.screen.is-active {
  display: block;
}
@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.screen__icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  margin-bottom: 16px;
}
.screen__icon--success {
  background: var(--success-soft);
  color: var(--success);
}

.screen__title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  text-wrap: balance;
}
.screen__sub {
  color: var(--muted);
  font-size: 14.5px;
  margin-bottom: 22px;
  text-wrap: pretty;
}
.screen__sub strong {
  color: var(--text);
}

/* Intro steps list */
.steps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}
.steps-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
}
.steps-list li span {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
}

/* Fields */
.field {
  margin-bottom: 16px;
}
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 7px;
}
.field input {
  width: 100%;
  font: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input::placeholder {
  color: #94a3b8;
}
.field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.field input.is-invalid {
  border-color: var(--danger);
}
.field__error {
  color: var(--danger);
  font-size: 12.5px;
  font-weight: 500;
  margin-top: 6px;
  min-height: 0;
}

/* Options */
.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}
.option {
  cursor: pointer;
}
.option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.option__box {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.option__title {
  font-weight: 600;
  font-size: 15px;
}
.option__desc {
  font-size: 12.5px;
  color: var(--muted);
}
.option input:focus-visible + .option__box {
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.option input:checked + .option__box {
  border-color: var(--primary);
  background: var(--primary-soft);
}

/* Uploads */
.uploads {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 8px;
}
@media (max-width: 400px) {
  .uploads {
    grid-template-columns: 1fr;
  }
}
.upload {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.upload__tag {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.upload__drop {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 2;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  background: #f8fafc;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.upload__drop:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.upload__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  text-align: center;
  padding: 8px;
}
.upload__preview {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.upload.has-file .upload__placeholder {
  display: none;
}
.upload.has-file .upload__preview {
  display: block;
}
.upload__reset {
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  align-self: flex-start;
}

/* Selfie */
.selfie {
  margin-bottom: 16px;
}
.selfie__stage {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto;
  border-radius: 50%;
  overflow: hidden;
  background: #0f172a;
  border: 3px solid var(--border);
}
.selfie__stage video,
.selfie__preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}
.selfie__oval {
  position: absolute;
  inset: 14px;
  border: 2px dashed rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  pointer-events: none;
}
.selfie.is-captured .selfie__oval {
  display: none;
}
.selfie__msg {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
  min-height: 18px;
}
.selfie__controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

/* Review */
.review {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 18px;
}
.review__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.review__label {
  font-size: 13.5px;
  color: var(--muted);
}
.review__value {
  font-size: 13.5px;
  font-weight: 600;
  text-align: right;
}
.review__thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 14px 16px;
}
.review__thumbs figure {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.review__thumbs img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid var(--border);
}
.review__thumbs figcaption {
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
}

/* Consent */
.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: 4px;
}
.consent input {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  flex: none;
}

/* Buttons */
.btn {
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 13px 18px;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease, opacity 0.15s ease;
}
.btn:active {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn--primary {
  background: var(--primary);
  color: #fff;
  width: 100%;
}
.btn--primary:hover:not(:disabled) {
  background: var(--primary-hover);
}
.btn--ghost {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}
.btn--ghost:hover:not(:disabled) {
  border-color: var(--border-strong);
}

.nav {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}
.nav .btn--ghost {
  flex: none;
  width: auto;
}
.nav .btn--primary {
  flex: 1;
}

/* Footnote */
.footnote {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.is-hidden {
  display: none !important;
}


/* Logo centré et responsive */
.brand {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.brand__name {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.brand__name img {
  display: block;
  width: clamp(220px, 75vw, 500px);
  height: auto;
  max-width: 60%;
  margin-bottom: 40px;
}

/* Masquer complètement les blocs upload avec l'attribut hidden */
.upload[hidden] {
  display: none !important;
}
.review__thumbs figure[hidden] {
  display: none !important;
}