/* ===== Pages compte client ===== */

.compte-main {
  padding: 48px 0 72px;
}

.compte-card {
  max-width: 480px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  padding: 32px 28px;
}

.compte-card--wide {
  max-width: 720px;
}

.compte-card__title {
  font-family: 'Baloo 2', cursive;
  font-size: 1.5rem;
  color: var(--grey-title);
  margin: 0 0 8px;
  text-align: center;
}

.compte-card__subtitle {
  text-align: center;
  color: #888;
  font-size: 0.9rem;
  margin: 0 0 24px;
}

.compte-field {
  margin-bottom: 16px;
}

.compte-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--grey-title);
  margin-bottom: 6px;
}

.compte-field input,
.compte-field select,
.compte-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  box-sizing: border-box;
}

.compte-btn {
  display: block;
  width: 100%;
  padding: 14px 20px;
  background: var(--blue-main);
  color: var(--grey-title);
  border: none;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
}

.compte-btn:hover {
  background: var(--blue-secondary);
}

.compte-error {
  background: #fee2e2;
  color: #b91c1c;
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.compte-link {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9rem;
}

.compte-link a {
  color: var(--blue-secondary);
  font-weight: 600;
}

.compte-orders {
  list-style: none;
  margin: 0;
  padding: 0;
}

.compte-order {
  border: 1px solid #eee;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.compte-order__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.compte-order__head strong {
  color: var(--grey-title);
}

.compte-order__meta {
  font-size: 0.85rem;
  color: #666;
}

.compte-order__badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--blue-main);
  color: var(--grey-title);
}

.compte-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 768px) {
  .compte-main {
    padding: 32px 0 56px;
  }

  .compte-card {
    padding: 24px 20px;
  }

  .compte-card--wide {
    max-width: 100%;
  }

  .compte-order__head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .compte-grid-2 {
    grid-template-columns: 1fr;
  }

  .compte-main {
    padding: 24px 0 48px;
  }
}

/* ===== Popup connexion / inscription ===== */
.popup-auth {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.popup-auth.is-open {
  opacity: 1;
  visibility: visible;
}

.popup-auth__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.popup-auth__box {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  padding: 28px 24px 24px;
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.popup-auth.is-open .popup-auth__box {
  transform: scale(1);
}

.popup-auth__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--grey-title);
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
}

.popup-auth__close:hover {
  background: #f0f0f0;
}

.popup-auth__title {
  font-family: 'Baloo 2', cursive;
  font-size: 1.4rem;
  color: var(--grey-title);
  margin: 0 0 16px;
  text-align: center;
  padding-right: 28px;
}

.popup-auth__subtitle {
  text-align: center;
  color: #888;
  font-size: 0.88rem;
  margin: 0 0 20px;
}

.popup-auth__tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  background: #f5f5f5;
  border-radius: 999px;
  padding: 4px;
}

.popup-auth__tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.popup-auth__tab.is-active {
  background: var(--white);
  color: var(--grey-title);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.popup-auth__panel[hidden] {
  display: none !important;
}

.popup-auth__error {
  margin-bottom: 16px;
}

.popup-auth__form .compte-btn {
  margin-top: 4px;
}

@media (max-width: 640px) {
  .popup-auth {
    padding: 0;
    align-items: flex-end;
  }

  .popup-auth__box {
    max-height: 92vh;
    border-radius: var(--radius) var(--radius) 0 0;
  }

  .popup-auth__tab {
    min-height: 44px;
  }
}
