* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

.stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

/* ---------- Etape 1 : ecran CGU ---------- */
.card {
  width: min(480px, 92vw);
  padding: 2.75rem 2.5rem;
  border-radius: 20px;
}
.cgu-card {
  text-align: left;
}
.cgu-title {
  font-size: 2.1rem;
  line-height: 1.15;
  margin: 0 0 1.25rem;
  font-weight: 400;
  display: flex;
  flex-direction: column;
}
.cgu-title strong {
  font-weight: 700;
}
.cgu-text {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 2rem;
}
.cgu-text a {
  text-decoration: underline;
  cursor: pointer;
  font-weight: 600;
}

.btn-primary {
  display: block;
  width: 100%;
  padding: .95rem;
  border: 0;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s ease, opacity .15s ease;
}
.btn-primary:hover { opacity: .92; }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .6; cursor: default; transform: none; }

/* ---------- Etape 2 : bouton central ---------- */
.launch-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
}
.launch-bubble {
  padding: .55rem 1.1rem;
  border-radius: 999px;
  background: #fff;
  color: #2a2622;
  font-size: .9rem;
  font-weight: 500;
  box-shadow: 0 6px 24px rgba(0,0,0,.12);
  position: relative;
}
.launch-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 12px;
  height: 12px;
  background: #fff;
  transform: translateX(-50%) rotate(45deg);
  box-shadow: 2px 2px 4px rgba(0,0,0,.04);
}

.launch-btn {
  position: relative;
  width: 168px;
  height: 168px;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
.launch-halo {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  transform: scale(1);
  opacity: .35;
  transition: transform .35s ease, opacity .35s ease;
}
.launch-btn:hover .launch-halo,
.launch-btn:focus-visible .launch-halo {
  transform: scale(1.14);
  opacity: .5;
}
.launch-circle {
  position: relative;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: transform .15s ease;
  box-shadow: 0 12px 32px rgba(0,0,0,.16);
}
.launch-btn:hover .launch-circle {
  transform: scale(1.03);
}
.launch-btn:active .launch-circle {
  transform: scale(.97);
}

/* ---------- Etape 3 : popup de depot ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,10,12,.55);
  display: grid;
  place-items: center;
  padding: 1.5rem;
  z-index: 50;
}
.popup {
  position: relative;
  width: min(460px, 94vw);
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.25rem 2rem;
  border-radius: 18px;
  background: #fff;
  color: #222;
}
.popup h2 {
  font-size: 1.3rem;
  margin: 0 0 1.25rem;
}
.popup-close {
  position: absolute;
  top: .9rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border: 0;
  background: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  opacity: .5;
  border-radius: 50%;
}
.popup-close:hover { opacity: 1; background: rgba(0,0,0,.06); }

input {
  display: block;
  width: 100%;
  padding: .8rem 1rem;
  margin-bottom: .7rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
  font-family: inherit;
}
.popup-fields { margin-top: 1rem; }
.popup-fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
}
.popup-fields-row input { margin-bottom: 0; }

.dropzone {
  border: 2px dashed #bbb;
  border-radius: 12px;
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  margin: 0 0 1rem;
  transition: border-color .15s;
  font-size: .95rem;
}
.dropzone.over { border-color: currentColor; }

#file-list { list-style: none; padding: 0; margin: 0 0 .5rem; }
#file-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .6rem;
  padding: .4rem 0;
  font-size: .85rem;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.file-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { opacity: .6; flex-shrink: 0; }
#file-list button {
  background: none;
  border: 0;
  cursor: pointer;
  color: inherit;
  opacity: .5;
  font-size: 1.1rem;
  flex-shrink: 0;
}
#file-list button:hover { opacity: 1; }

.form-error {
  font-size: .85rem;
  margin: 0 0 .8rem;
  color: #b3261e;
}

#progress {
  height: 8px;
  background: rgba(128,128,128,.2);
  border-radius: 4px;
  overflow: hidden;
  margin: .75rem 0;
}
#bar { height: 100%; width: 0; transition: width .2s; }
#progress-detail { font-size: .85rem; opacity: .75; margin: 0; }

.note { font-size: .8rem; opacity: .7; margin-top: 1rem; text-align: center; }

.cgu-modal-body { font-size: .92rem; line-height: 1.6; }
.cgu-modal-body ol { padding-left: 1.2rem; margin: 0 0 1rem; }
.cgu-modal-body li { margin-bottom: .7rem; }
.cgu-modal-footer { font-weight: 600; }
.cgu-modal-accept-btn { margin-top: 1.5rem; }

.lang-switch {
  position: fixed;
  bottom: 1rem;
  right: 1.25rem;
  z-index: 10;
}
.lang-switch button {
  background: none;
  border: 0;
  cursor: pointer;
  opacity: .55;
  color: inherit;
  padding: .2rem .4rem;
  font-size: .85rem;
}
.lang-switch button:hover { opacity: 1; }

@media (max-width: 480px) {
  .card { padding: 2rem 1.5rem; }
  .cgu-title { font-size: 1.7rem; }
  .launch-btn { width: 140px; height: 140px; }
  .launch-circle { width: 96px; height: 96px; }
  .popup-fields-row { grid-template-columns: 1fr; gap: 0; }
  .popup { padding: 1.75rem 1.25rem; }
}
