/* ==================================================
   GLOBAL
================================================== */
html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  min-height: 100vh;

  background-image:
    linear-gradient(rgba(10,10,10,0.6), rgba(10,10,10,0.85)),
    url("/assets/space.png");

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;

  color: #f1f1f1;
}

/* ==================================================
   HEADER
================================================== */
.header {
  text-align: center;
  padding: 50px 20px 20px;
}

.header img {
  width: 100px;
  margin-bottom: 12px;
}

.header h1 {
  margin: 0;
  letter-spacing: 4px;
  font-weight: 600;
  font-size: 28px;
}

.header p {
  margin-top: 6px;
  opacity: 0.7;
  font-size: 14px;
}

/* ==================================================
   CARD (UPLOAD / LOGIN)
================================================== */
.card {
  max-width: 640px;
  margin: 30px auto;
  padding: 40px;
  border-radius: 16px;

  background: rgba(20,20,20,0.72);
  backdrop-filter: blur(6px);

  box-shadow: 0 30px 60px rgba(0,0,0,0.75);
}

.card.login {
  background: rgba(20,20,20,0.88);
}

/* ==================================================
   TITRES / TEXTES
================================================== */
.card h2 {
  margin-top: 0;
  font-weight: 500;
}

.subtitle {
  opacity: 0.7;
  margin-bottom: 20px;
  font-size: 14px;
}

/* ==================================================
   FORMULAIRE
================================================== */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.full {
  grid-column: 1 / -1;
}

input,
textarea,
select {
  width: 100%;
  padding: 14px;
  border-radius: 8px;
  border: none;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 14px;
  box-sizing: border-box;
}

/* Checkbox alignment for toggle */
label.pw-toggle-inline {
  display: -webkit-inline-flex;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  opacity: .85;
  cursor: pointer;
  vertical-align: middle;
}
label.pw-toggle-inline input[type="checkbox"] {
  -webkit-appearance: checkbox;
  appearance: checkbox;
  width: 16px !important;
  min-width: 16px;
  height: 16px;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  flex: 0 0 16px;
}
label.pw-toggle-inline span {
  flex: 0 0 auto;
}

input::placeholder,
textarea::placeholder {
  color: #aaa;
}

textarea {
  resize: vertical;
  min-height: 90px;
}

/* ==================================================
   BOUTON
================================================== */
button {
  margin-top: 25px;
  padding: 15px;
  width: 100%;
  background: linear-gradient(90deg, #1db954, #1ed760);
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: bold;
  color: #000;
  cursor: pointer;
}

button:hover {
  opacity: 0.9;
}

/* ==================================================
   BARRE DE PROGRESSION
================================================== */
.progress-container {
  margin-top: 25px;
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  overflow: hidden;
  height: 18px;
  display: none;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #1db954, #1ed760);
  transition: width 0.2s ease;
}

/* ==================================================
   RESULTAT / LIEN
================================================== */
#result {
  margin-top: 25px;
  font-size: 14px;
  line-height: 1.6;
}

#result a {
  color: #1ed760;
  text-decoration: none;
}

#result a:hover {
  text-decoration: underline;
}

/* ==================================================
   MOBILE
================================================== */
@media (max-width: 600px) {
  .card {
    margin: 20px;
    padding: 30px 20px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .header h1 {
    font-size: 22px;
  }
}
