:root {
  --lemon: #ff6b6b;
}

/* =========================
   PAGE RÉCAP
   ========================= */

/* fond de la page checkout */
.checkout-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 16px 60px;
  background: #fff8fb; /* ton rose de fond */
}

/* titres au-dessus du bloc */
.checkout-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 4px;
  text-align: center;
}
.checkout-subtitle {
  margin-bottom: 18px;
  color: #6b7280;
  text-align: center;
}

/* le bloc blanc */
.checkout-panel {
  background: #ffffff;
  border-radius: 24px;
  padding: 18px 20px 26px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.03);
}

/* bandeau livraison */
.free-shipping-banner {
  display: none;
  background: rgba(255, 224, 102, .25);
  border: 1px solid rgba(255, 224, 102, .9);
  border-radius: 16px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-weight: 600;
  color: #1f2937;
}
.free-shipping-banner.ok {
  background: rgba(68, 214, 117, .18);
  border-color: rgba(68, 214, 117, .45);
}

/* liste articles */
.checkout-items {
  list-style: none;
  margin: 0 0 16px 0;
  padding: 0;
}
.checkout-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0,0,0,0.03);
}
.checkout-item:last-child {
  border-bottom: none;
}
.checkout-item-info {
  display: flex;
  flex-direction: column;
}
.checkout-item-name { font-weight: 600; }
.checkout-item-qtytext { font-size: .78rem; color: #666; }

.qty-controls {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  align-items: center;
}
.qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 9999px;
  border: 1px solid rgba(0,0,0,0.04);
  background: #fff8fb;
  cursor: pointer;
  font-weight: 700;
}
.qty-value {
  min-width: 26px;
  text-align: center;
  font-weight: 600;
}

.checkout-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.checkout-item-price { font-weight: 600; }
.checkout-item-remove {
  background: none;
  border: none;
  color: #b91c1c;
  font-size: .7rem;
  text-decoration: underline;
  cursor: pointer;
}

/* totaux */
.checkout-totals {
  border-top: 1px solid rgba(0,0,0,0.03);
  padding-top: 12px;
  margin-top: 6px;
}
.checkout-totals .line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}
.checkout-totals .line.total {
  border-top: 1px solid rgba(0,0,0,0.03);
  padding-top: 8px;
  font-weight: 700;
}

.small-note {
  font-size: .72rem;
  color: #777;
  margin-top: 8px;
}

/* message “livraison offerte” */
#remaining-free {
  text-align: center;
}

/* bouton valider */
.checkout-btn {
  margin-top: 18px;
  width: 100%;
  background: #ff6b6b;
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
}
.checkout-btn:hover {
  filter: brightness(1.03);
}

@media (max-width: 680px) {
  .checkout-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .checkout-item-right {
    flex-direction: row;
    gap: 10px;
  }
}

/* =========================
   ÉTAPE “FINALISER MA COMMANDE”
   ========================= */
.checkout-auth-wrapper {
  max-width: 1100px;
  margin: 40px auto 80px;
  padding: 0 16px;
}

.checkout-auth-card {
  background: #fff;
  border-radius: 20px;
  padding: 22px 20px 26px;
  box-shadow: 0 14px 30px rgba(0,0,0,0.03);
  text-align: center; /* titre + sous-texte au centre */
}

.checkout-auth-card h2 {
  margin-bottom: 4px;
  font-size: 1.4rem;
  font-weight: 800;
}

.checkout-auth-card .muted {
  color: #6b7280;
  margin-bottom: 20px;
}

.checkout-auth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.auth-box {
  background: #fff8fb;
  border: 1px solid rgba(0,0,0,0.02);
  border-radius: 16px;
  padding: 14px 14px 16px;
  text-align: center;          /* 👉 centre le contenu de chaque box */
}

.auth-box h3 {
  margin-bottom: 6px;
  font-size: 1rem;
  font-weight: 700;
}

.auth-box .small {
  font-size: .78rem;
  color: #6b7280;
  margin-bottom: 10px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;         /* 👉 centre les labels */
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: .75rem;
  color: #1f2937;
  align-items: center;
  width: 100%;
}

.auth-form input {
  border: 1px solid #f1e6ef;
  border-radius: 10px;
  padding: 6px 8px;
  font-size: .85rem;
  background: #fff;
  width: 100%;
  max-width: 280px;            /* 👉 formulaires pas trop larges */
  text-align: center;
}

.auth-btn,
.auth-btn-outline {
  width: 100%;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}

.auth-btn {
  background: var(--lemon, #ffe066);
  border: none;
  border-radius: 12px;
  padding: 8px 10px;
  font-weight: 700;
  margin-top: 4px;
  cursor: pointer;
}

.auth-btn-outline {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.04);
  border-radius: 12px;
  padding: 7px 10px;
  font-weight: 600;
  margin-top: 8px;
  cursor: pointer;
}

.auth-message {
  margin-top: 14px;
  font-size: .8rem;
}

@media (max-width: 600px) {
  .checkout-auth-card {
    padding: 18px 14px 22px;
  }
}

/* =========================
   HEADER (fallback)
   ========================= */
.site-header {
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,0.03);
  position: sticky;
  top: 48px; /* sous la topbar */
  z-index: 50;
}
.nav-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.logo {
  font-weight: 800;
  font-size: 1.05rem;
}
.main-nav {
  display: flex;
  gap: 16px;
}
.main-nav a {
  text-decoration: none;
  color: #1f2937;
  font-weight: 600;
}
.nav-cart-btn {
  background: #ffe066;
  border-radius: 999px;
  padding: 6px 14px;
  display: flex;
  gap: 6px;
  align-items: center;
  text-decoration: none;
  color: #1f2937;
  font-weight: 600;
}
.cart-count {
  background: #ff6b6b;
  color: #fff;
  border-radius: 999px;
  padding: 0 7px;
  font-size: .7rem;
  line-height: 1.5;
}
@media (max-width: 780px) {
  .main-nav { display: none; }
}
/* le header doit passer au-dessus de tout */
.site-header {
  z-index: 9999;
}

/* on descend un peu le bloc de finalisation pour ne pas coller sous la nav */
.checkout-auth-wrapper {
  margin-top: 70px; /* avant 40px chez toi */
}
.back-to-cart-btn {
  display: inline-block;
  margin-bottom: 14px;
  color: #1f2937;
  font-weight: 600;
  text-decoration: none;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.04);
  border-radius: 9999px;
  padding: 6px 14px 7px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.02);
}
.back-to-cart-btn:hover {
  background: #fff8fb;
}


/* bloc principal */
.checkout-guest-shell {
  max-width: 1050px;
  margin: 2.5rem auto 4rem;
  padding: 0 1rem;
}

.guest-card {
  background: #fff;
  border-radius: 26px;
  box-shadow: 0 18px 45px rgba(16, 24, 40, .05);
  padding: 2.4rem 2.2rem 2.6rem;
  border: 1px solid rgba(255, 107, 107, .05);
}

/* titres */
.guest-card h2 {
  text-align: center;
  margin: 0 0 .4rem;
  font-size: 1.8rem;
  font-weight: 800;
}
.guest-card .muted {
  text-align: center;
  margin-bottom: 1.8rem;
  color: #6b7280;
}

/* grille du formulaire */
.guest-form {
  display: grid;
  gap: 1rem;
}

/* 2 colonnes pour les lignes "jumelles" */
.guest-row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.guest-form label {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  font-size: .85rem;
  color: #1f2937;
}

.guest-form input,
.guest-form textarea {
  border: 1px solid #f6dbe2;
  border-radius: 9999px;
  padding: .6rem .8rem;
  font-size: .9rem;
  background: #fff;
}

.guest-form textarea {
  border-radius: 1rem;
  min-height: 96px;
  resize: vertical;
}

/* bouton */
.guest-submit {
  margin-top: .5rem;
  background: #ff6b6b;
  color: #000;
  border: none;
  border-radius: 9999px;
  padding: .75rem 1.2rem;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  width: min(280px, 100%);
  justify-self: center;
  transition: transform .05s ease-out;
}
.guest-submit:hover {
  transform: translateY(-1px);
}

/* petit texte bas */
.guest-foot {
  text-align: center;
  margin-top: 1.3rem;
  font-size: .8rem;
  color: #6b7280;
}

/* responsive */
@media (max-width: 720px) {
  .guest-card {
    padding: 1.6rem 1.1rem 2rem;
  }
  .guest-row-2 {
    grid-template-columns: 1fr;
  }
  .guest-submit {
    width: 100%;
  }
}


.auth-box--new .auth-btn {
  margin-top: 2.4rem !important;
}
