/* ============================================
   CHECKOUT.CSS — SHOP.SN
   Ultra Premium · Mobile First · Trust & Security
   Base = 320px, enrichi progressivement
   Breakpoints : 480px → 768px → 1025px → 1280px → 1440px
   Préfixes : ck- (checkout)
   ============================================ */

/* ============================================================
   1. LAYOUT CHECKOUT
   Mobile : colonne unique
   Desktop 1025px+ : 2 colonnes (formulaire + récapitulatif sticky)
   ============================================================ */
.ck-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
@media (min-width: 1025px) {
  .ck-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: start;
  }
}
@media (min-width: 1280px) {
  .ck-layout { grid-template-columns: 1fr 400px; gap: 28px; }
}
@media (min-width: 1440px) {
  .ck-layout { grid-template-columns: 1fr 420px; gap: 32px; }
}

/* ============================================================
   2. STEPPER (étapes)
   ============================================================ */
.ck-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 16px;
  padding: 12px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.ck-stepper::-webkit-scrollbar { display: none; }

.ck-step {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex: 0 0 auto;
}
.ck-step__number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e8e8e8;
  color: #888;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}
.ck-step__label {
  font-size: 11px;
  font-weight: 600;
  color: #888;
  transition: color 0.3s;
}
.ck-step__connector {
  width: 24px;
  height: 2px;
  background: #e0e0e0;
  margin: 0 6px;
  border-radius: 1px;
  transition: background 0.3s;
}

/* États */
.ck-step.is-active .ck-step__number {
  background: rgb(253,98,5);
  color: #fff;
}
.ck-step.is-active .ck-step__label { color: rgb(253,98,5); font-weight: 700; }
.ck-step.is-done .ck-step__number {
  background: #2e7d32;
  color: #fff;
}
.ck-step.is-done .ck-step__label { color: #2e7d32; }
.ck-step.is-done + .ck-step__connector,
.ck-step.is-done ~ .ck-step__connector { background: #2e7d32; }

@media (min-width: 480px) {
  .ck-step__number { width: 32px; height: 32px; font-size: 13px; }
  .ck-step__label { font-size: 12px; }
  .ck-step__connector { width: 32px; }
}
@media (min-width: 768px) {
  .ck-step__connector { width: 48px; }
  .ck-step__label { font-size: 13px; }
}

/* ============================================================
   3. SECTIONS FORMULAIRE
   ============================================================ */
.ck-section {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
.ck-section__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.ck-section__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.ck-section__icon--address { background: #fff3e0; color: rgb(253,98,5); }
.ck-section__icon--delivery { background: #e8f5e9; color: #2e7d32; }
.ck-section__icon--payment { background: #e3f2fd; color: rgb(0,139,255); }
.ck-section__title {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
  font-family: 'Manrope', sans-serif;
}
.ck-section__subtitle {
  font-size: 11px;
  color: #888;
}

@media (min-width: 768px) {
  .ck-section { padding: 18px; }
  .ck-section__title { font-size: 16px; }
}
@media (min-width: 1025px) {
  .ck-section { padding: 20px; border-radius: 14px; }
}

/* ============================================================
   4. FORMULAIRE — INPUTS
   ============================================================ */
.ck-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 480px) {
  .ck-form-grid { grid-template-columns: 1fr 1fr; }
}
.ck-form-grid .ck-field--full { grid-column: 1 / -1; }

.ck-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ck-field__label {
  font-size: 12px;
  font-weight: 600;
  color: #555;
}
.ck-field__label .ck-required {
  color: #e63946;
}
.ck-field__input,
.ck-field__select,
.ck-field__textarea {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  color: #333;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
.ck-field__input:focus,
.ck-field__select:focus,
.ck-field__textarea:focus {
  border-color: rgb(253,98,5);
  box-shadow: 0 0 0 3px rgba(253,98,5,0.08);
  outline: none;
}
.ck-field__input::placeholder { color: #bbb; }
.ck-field__textarea { min-height: 60px; resize: vertical; }
.ck-field__hint {
  font-size: 10px;
  color: #aaa;
  display: flex;
  align-items: center;
  gap: 3px;
}
.ck-field__hint i { font-size: 12px; }

/* Phone input avec indicatif */
.ck-phone-group {
  display: flex;
  gap: 0;
}
.ck-phone-group__prefix {
  padding: 10px 10px;
  border: 1px solid #ddd;
  border-right: none;
  border-radius: 8px 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  background: #f9f9f9;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.ck-phone-group__prefix img {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
}
.ck-phone-group .ck-field__input {
  border-radius: 0 8px 8px 0;
}

/* ============================================================
   5. ADRESSES SAUVEGARDÉES
   ============================================================ */
.ck-saved-addresses {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.ck-saved-address {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 2px solid #e8e8e8;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.ck-saved-address:hover { border-color: #ccc; }
.ck-saved-address.is-selected {
  border-color: rgb(253,98,5);
  background: #fff9f5;
}
.ck-saved-address__radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #ccc;
  flex-shrink: 0;
  margin-top: 2px;
  position: relative;
  transition: border-color 0.2s;
}
.ck-saved-address.is-selected .ck-saved-address__radio {
  border-color: rgb(253,98,5);
}
.ck-saved-address.is-selected .ck-saved-address__radio::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  right: 3px;
  bottom: 3px;
  border-radius: 50%;
  background: rgb(253,98,5);
}
.ck-saved-address__info {
  flex: 1;
  min-width: 0;
}
.ck-saved-address__name {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
}
.ck-saved-address__detail {
  font-size: 12px;
  color: #666;
  line-height: 1.5;
}
.ck-saved-address__badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  background: #e8f5e9;
  color: #2e7d32;
  text-transform: uppercase;
}

/* ============================================================
   6. OPTIONS LIVRAISON
   ============================================================ */
.ck-delivery-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ck-delivery-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 2px solid #e8e8e8;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.ck-delivery-option:hover { border-color: #ccc; }
.ck-delivery-option.is-selected {
  border-color: rgb(253,98,5);
  background: #fff9f5;
}
.ck-delivery-option__radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #ccc;
  flex-shrink: 0;
  position: relative;
  transition: border-color 0.2s;
}
.ck-delivery-option.is-selected .ck-delivery-option__radio {
  border-color: rgb(253,98,5);
}
.ck-delivery-option.is-selected .ck-delivery-option__radio::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px; right: 3px; bottom: 3px;
  border-radius: 50%;
  background: rgb(253,98,5);
}
.ck-delivery-option__icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.ck-delivery-option__icon--express { background: #fff3e0; color: rgb(253,98,5); }
.ck-delivery-option__icon--standard { background: #e3f2fd; color: rgb(0,139,255); }
.ck-delivery-option__icon--point { background: #f3e5f5; color: #7b1fa2; }
.ck-delivery-option__info { flex: 1; min-width: 0; }
.ck-delivery-option__name {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
}
.ck-delivery-option__desc {
  font-size: 11px;
  color: #888;
}
.ck-delivery-option__price {
  font-size: 13px;
  font-weight: 700;
  color: rgb(253,98,5);
  white-space: nowrap;
}
.ck-delivery-option__price--free {
  color: #2e7d32;
  background: #e8f5e9;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
}

/* ============================================================
   7. MÉTHODES PAIEMENT
   ============================================================ */
.ck-payment-methods {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ck-payment-method {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 2px solid #e8e8e8;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.ck-payment-method:hover { border-color: #ccc; }
.ck-payment-method.is-selected {
  border-color: rgb(253,98,5);
  background: #fff9f5;
}
.ck-payment-method__radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #ccc;
  flex-shrink: 0;
  position: relative;
  transition: border-color 0.2s;
}
.ck-payment-method.is-selected .ck-payment-method__radio {
  border-color: rgb(253,98,5);
}
.ck-payment-method.is-selected .ck-payment-method__radio::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px; right: 3px; bottom: 3px;
  border-radius: 50%;
  background: rgb(253,98,5);
}
.ck-payment-method__logo {
  width: 40px;
  height: 28px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.ck-payment-method__logo--wave { background: #e3f7fa; color: #0097a7; }
.ck-payment-method__logo--om { background: #fff3e0; color: #e65100; }
.ck-payment-method__logo--cb { background: #e3f2fd; color: rgb(0,139,255); }
.ck-payment-method__logo--cod { background: #f5f5f5; color: #555; }
.ck-payment-method__info { flex: 1; min-width: 0; }
.ck-payment-method__name {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
}
.ck-payment-method__desc {
  font-size: 11px;
  color: #888;
}
.ck-payment-method__badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
}
.ck-payment-method__badge--popular {
  background: #fff3e0;
  color: rgb(253,98,5);
}
.ck-payment-method__badge--secure {
  background: #e8f5e9;
  color: #2e7d32;
}

/* Détails carte bancaire */
.ck-card-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  background: #f9f9f9;
  border-radius: 8px;
  border: 1px solid #eee;
}
@media (min-width: 480px) {
  .ck-card-form { grid-template-columns: 1fr 1fr; }
  .ck-card-form .ck-field--full { grid-column: 1 / -1; }
}

/* ============================================================
   8. RÉCAPITULATIF (colonne droite)
   ============================================================ */
.ck-recap {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
@media (min-width: 1025px) {
  .ck-recap {
    position: sticky;
    top: 100px;
    padding: 20px;
  }
}

.ck-recap__title {
  font-size: 15px;
  font-weight: 800;
  color: #0a0a0a;
  font-family: 'Manrope', sans-serif;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ck-recap__title i { color: rgb(253,98,5); font-size: 18px; }

/* Mini articles */
.ck-recap__items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 12px;
  max-height: 260px;
  overflow-y: auto;
}
.ck-recap__item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ck-recap__item-img {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid #eee;
}
.ck-recap__item-img img { width: 100%; height: 100%; object-fit: cover; }
.ck-recap__item-info { flex: 1; min-width: 0; }
.ck-recap__item-name {
  font-size: 12px;
  font-weight: 500;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ck-recap__item-qty { font-size: 11px; color: #888; }
.ck-recap__item-price {
  font-size: 12px;
  font-weight: 700;
  color: rgb(253,98,5);
  white-space: nowrap;
}

/* Lignes prix */
.ck-recap__lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 10px;
  border-bottom: 1px dashed #e8e8e8;
  margin-bottom: 10px;
}
.ck-recap__line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #555;
}
.ck-recap__line-value { font-weight: 600; color: #333; }
.ck-recap__line--green .ck-recap__line-value { color: #2e7d32; }

/* Total */
.ck-recap__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
}
.ck-recap__total-label {
  font-size: 14px;
  font-weight: 700;
  color: #0a0a0a;
}
.ck-recap__total-value {
  font-size: 20px;
  font-weight: 800;
  color: rgb(253,98,5);
  font-family: 'Manrope', sans-serif;
}

/* Bouton confirmer */
.ck-recap__confirm-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  margin-top: 14px;
  background: rgb(253,98,5);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}
.ck-recap__confirm-btn:hover {
  background: rgb(230,85,0);
  box-shadow: 0 4px 16px rgba(253,98,5,0.3);
}
.ck-recap__confirm-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  box-shadow: none;
}
.ck-recap__confirm-btn i { font-size: 18px; }

/* Sécurité */
.ck-recap__secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 10px;
  font-size: 11px;
  color: #2e7d32;
  font-weight: 500;
}
.ck-recap__secure i { font-size: 14px; }

/* Logos paiement */
.ck-recap__logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f0f0f0;
}
.ck-recap__logo {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  background: #f5f5f5;
  color: #555;
  border: 1px solid #e8e8e8;
}

/* ============================================================
   9. TRUST CHECKOUT (sous le récap)
   ============================================================ */
.ck-trust {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  background: #f9fafb;
  border: 1px solid #f0f0f0;
  border-radius: 10px;
}
.ck-trust__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #555;
}
.ck-trust__item i {
  font-size: 16px;
  color: #2e7d32;
  flex-shrink: 0;
}
.ck-trust__item strong { color: #333; }

/* ============================================================
   10. BARRE MOBILE STICKY
   ============================================================ */
.ck-mobile-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: fixed;
  bottom: 56px;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #e8e8e8;
  padding: 10px 12px;
  z-index: 90;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
}
.ck-mobile-bar__total {
  display: flex;
  flex-direction: column;
}
.ck-mobile-bar__total-label {
  font-size: 10px;
  color: #888;
  text-transform: uppercase;
}
.ck-mobile-bar__total-value {
  font-size: 18px;
  font-weight: 800;
  color: rgb(253,98,5);
  font-family: 'Manrope', sans-serif;
}
.ck-mobile-bar__btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  background: rgb(253,98,5);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.ck-mobile-bar__btn:hover { background: rgb(230,85,0); }
@media (min-width: 1025px) {
  .ck-mobile-bar { display: none; }
}

/* ============================================================
   11. PAGE CONFIRMATION
   ============================================================ */
.ck-confirmation {
  text-align: center;
  padding: 32px 16px;
}
.ck-confirmation__icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #e8f5e9;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.ck-confirmation__icon i { font-size: 40px; color: #2e7d32; }
.ck-confirmation__title {
  font-size: 22px;
  font-weight: 800;
  color: #1a1a1a;
  font-family: 'Manrope', sans-serif;
  margin-bottom: 6px;
}
.ck-confirmation__subtitle {
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
}
.ck-confirmation__order-id {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #f9f9f9;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #333;
  margin-bottom: 20px;
}
.ck-confirmation__order-id i { color: rgb(253,98,5); }

/* Résumé confirmation */
.ck-confirmation__summary {
  max-width: 500px;
  margin: 0 auto 24px;
  text-align: left;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 16px;
}
.ck-confirmation__summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 13px;
}
.ck-confirmation__summary-row:last-child { border-bottom: none; }
.ck-confirmation__summary-label { color: #888; }
.ck-confirmation__summary-value { color: #333; font-weight: 600; }

/* Timeline livraison */
.ck-confirmation__timeline {
  max-width: 500px;
  margin: 0 auto 24px;
  text-align: left;
}
.ck-confirmation__timeline-title {
  font-size: 14px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ck-confirmation__timeline-title i { color: rgb(253,98,5); }
.ck-timeline-step {
  display: flex;
  gap: 12px;
  position: relative;
  padding-bottom: 16px;
}
.ck-timeline-step:last-child { padding-bottom: 0; }
.ck-timeline-step::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 24px;
  bottom: 0;
  width: 2px;
  background: #e0e0e0;
}
.ck-timeline-step:last-child::before { display: none; }
.ck-timeline-step__dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  z-index: 1;
}
.ck-timeline-step__dot--done { background: #2e7d32; color: #fff; }
.ck-timeline-step__dot--active { background: rgb(253,98,5); color: #fff; }
.ck-timeline-step__dot--pending { background: #e8e8e8; color: #888; }
.ck-timeline-step__info { flex: 1; }
.ck-timeline-step__label { font-size: 13px; font-weight: 600; color: #333; }
.ck-timeline-step__date { font-size: 11px; color: #888; }

/* Actions confirmation */
.ck-confirmation__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.ck-confirmation__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
}
.ck-confirmation__btn--primary {
  background: rgb(253,98,5);
  color: #fff;
}
.ck-confirmation__btn--primary:hover { background: rgb(230,85,0); }
.ck-confirmation__btn--outline {
  background: #fff;
  color: #555;
  border: 1px solid #ddd;
}
.ck-confirmation__btn--outline:hover { border-color: rgb(253,98,5); color: rgb(253,98,5); }

/* ============================================================
   12. RESPONSIVE
   ============================================================ */
@media (min-width: 480px) {
  .ck-recap__total-value { font-size: 22px; }
  .ck-confirmation__title { font-size: 26px; }
}
@media (min-width: 768px) {
  .ck-recap { padding: 16px; }
  .ck-recap__title { font-size: 16px; }
  .ck-confirmation { padding: 48px 24px; }
}
@media (min-width: 1025px) {
  .ck-recap { border-radius: 14px; }
  .ck-recap__total-value { font-size: 24px; }
}
