/* ========================================
   MathLamb — Page de configuration (Figma)
   ======================================== */

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

body {
  font-family: 'Nunito', sans-serif;
  background-color: #f7f3ef;
  color: #522b09;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ============================
   Layout
   ============================ */

.setup {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================
   Header
   ============================ */

.setup__header {
  background: #fff;
  border: 1px solid #ebdac4;
  border-top: none;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
}

.setup__header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.setup__logo-icon {
  height: 48px;
  width: auto;
}

.setup__logo-text {
  display: flex;
  flex-direction: column;
}

.setup__logo-name {
  font-family: 'Baloo 2', cursive;
  font-weight: 700;
  font-size: 20px;
  line-height: 1.1;
  color: #522b09;
}

.setup__logo-tagline {
  font-family: 'Baloo 2', cursive;
  font-weight: 500;
  font-size: 12px;
  line-height: 1.2;
  color: #a1510a;
}

/* ============================
   Main
   ============================ */

.setup__main {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 27px 20px 48px;
}

.setup__content {
  width: 100%;
  max-width: 731px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 27px;
}

/* ============================
   Title Bar
   ============================ */

.setup__title-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 40px;
  padding: 10px;
  border: 1px solid #ebdac4;
  border-radius: 10px;
  font-family: 'Baloo 2', cursive;
  font-weight: 600;
  font-size: 18px;
  line-height: 30px;
  color: #a1510a;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
  animation: setupIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 0.05s;
}

.setup__title-bar:hover {
  background: rgba(161, 81, 10, 0.05);
  border-color: #a1510a;
}

/* ============================
   Form
   ============================ */

.setup__form {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 39px;
}

/* ============================
   Player Avatars
   ============================ */

.setup__avatars {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 619px;
  animation: setupIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 0.15s;
}

.setup__avatar-group {
  display: flex;
  gap: 12px;
}

.setup__avatar-card {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 138px;
  padding: 13px 23px;
  border: 1px solid #ebdac4;
  border-radius: 15px;
  overflow: hidden;
}

.setup__avatar-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* ============================
   Teams
   ============================ */

.setup__teams {
  display: flex;
  align-items: flex-end;
  gap: 33px;
  width: 100%;
  animation: setupIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 0.25s;
}

.setup__team {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.setup__team-label {
  font-family: 'Baloo 2', cursive;
  font-weight: 700;
  font-size: 16px;
  line-height: 12px;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.setup__team-label--red {
  background-image: linear-gradient(161deg, #ff6b6b 0%, #f73139 106%);
}

.setup__team-label--blue {
  background-image: linear-gradient(161deg, #6bcfff 8%, #0093d9 97%);
}

.setup__team-input {
  width: 100%;
  height: 50px;
  padding: 16px 20px;
  background: #fff;
  border: 1px solid #ebdac4;
  border-radius: 15px;
  font-family: 'Baloo 2', cursive;
  font-weight: 600;
  font-size: 16px;
  line-height: 22px;
  color: #522b09;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.setup__team-input::placeholder {
  color: #d4bfa0;
}

.setup__team-input:focus {
  border-color: #a1510a;
  box-shadow: 0 0 0 3px rgba(161, 81, 10, 0.12);
}

/* --- VS Badge --- */
.setup__vs {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 4px;
}

.setup__vs-img {
  width: 50px;
  height: 50px;
}

/* ============================
   Level Selection
   ============================ */

.setup__levels {
  width: 100%;
  animation: setupIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 0.35s;
}

.setup__levels-title {
  font-family: 'Baloo 2', cursive;
  font-weight: 600;
  font-size: 20px;
  line-height: 30px;
  color: #522b09;
  text-align: center;
  margin-bottom: 17px;
}

.setup__level-buttons {
  display: flex;
  gap: 16px;
  width: 100%;
}

.setup__level-btn {
  flex: 1;
  cursor: pointer;
}

.setup__level-btn input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.setup__level-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 80px;
  padding: 16px;
  border: 1px solid #ebdac4;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.25s ease;
}

.setup__level-name {
  font-family: 'Baloo 2', cursive;
  font-weight: 500;
  font-size: 18px;
  line-height: 12px;
  color: #d4bfa0;
  transition: color 0.25s ease;
}

.setup__level-desc {
  font-family: 'Nunito', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: #c4a882;
  text-align: center;
  line-height: 1.3;
}

.setup__level-btn:hover .setup__level-content {
  border-color: #d4bfa0;
}

/* Active/checked state */
.setup__level-btn input:checked + .setup__level-content {
  border-color: #a1510a;
  background: linear-gradient(90deg, rgba(161, 81, 10, 0.1) 0%, rgba(161, 81, 10, 0.1) 100%), #fff;
}

.setup__level-btn input:checked + .setup__level-content .setup__level-name {
  color: #a1510a;
}

.setup__level-btn input:checked + .setup__level-content .setup__level-desc {
  color: #a1510a;
}

/* ============================
   CTA Button
   ============================ */

.setup__cta {
  width: 430px;
  max-width: 100%;
  height: 48px;
  padding: 16px 36px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(174deg, #e07b20 0%, #dd983c 100%);
  font-family: 'Baloo 2', cursive;
  font-weight: 700;
  font-size: 18px;
  line-height: 20px;
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 16px rgba(224, 123, 32, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: setupIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 0.45s;
}

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

.setup__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(224, 123, 32, 0.4);
}

.setup__cta:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(224, 123, 32, 0.3);
}

/* ============================
   Responsive
   ============================ */

@media (max-width: 768px) {
  .setup__header {
    min-height: 64px;
    padding: 12px 16px;
  }

  .setup__logo-icon {
    height: 38px;
  }

  .setup__main {
    padding: 20px 16px 36px;
  }

  .setup__content {
    gap: 20px;
  }

  .setup__form {
    gap: 28px;
  }

  .setup__avatars {
    justify-content: center;
    gap: 24px;
  }

  .setup__avatar-card {
    width: 72px;
    height: 108px;
    padding: 10px 14px;
  }

  .setup__teams {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .setup__team {
    width: 100%;
  }

  .setup__vs {
    padding-bottom: 0;
  }

  .setup__vs-img {
    width: 40px;
    height: 40px;
  }

  .setup__level-buttons {
    flex-direction: column;
  }

  .setup__level-content {
    height: auto;
    min-height: 60px;
  }

  .setup__cta {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .setup__avatar-group {
    gap: 8px;
  }

  .setup__avatar-card {
    width: 60px;
    height: 90px;
    padding: 8px 10px;
  }

  .setup__title-bar {
    font-size: 16px;
  }

  .setup__levels-title {
    font-size: 18px;
  }
}
