/* ============================================================
   KOUMA BANAA — Checkout Page Styles
   ============================================================ */

/* Header */
.checkout-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: #fff; border-bottom: 1px solid #EDE4D0;
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
}
.checkout-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 14px;
}
.checkout-secure {
  display: flex; align-items: center; gap: 6px;
  font-size: .78rem; color: #4A7A5A; font-weight: 600;
}

/* Progress Bar */
.checkout-progress {
  margin-top: 72px; background: #F6EFE4;
  border-bottom: 1px solid #EDE4D0; padding: 16px 0;
}
.progress-steps {
  display: flex; align-items: center; justify-content: center; gap: 0;
}
.progress-step {
  display: flex; align-items: center; gap: 10px;
  font-size: .82rem; color: #A0A0A0; font-weight: 500;
  transition: color .25s;
}
.progress-step.active { color: var(--green, #234D35); font-weight: 700; }
.progress-step.completed { color: #4A7A5A; }

.step-num {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #DDD; color: #888; font-size: .78rem; font-weight: 700;
  transition: background .25s, color .25s; flex-shrink: 0;
}
.progress-step.active .step-num {
  background: var(--green, #234D35); color: #fff;
}
.progress-step.completed .step-num {
  background: var(--gold, #C9A45C); color: #fff;
}
.progress-connector {
  width: 48px; height: 2px; background: #DDD; margin: 0 8px;
  transition: background .25s;
}
.progress-connector.completed { background: var(--gold, #C9A45C); }

/* Layout */
.checkout-main {
  background: #FAFAF7; min-height: calc(100vh - 140px);
  padding: 40px 0 80px;
}
.checkout-layout {
  display: grid; grid-template-columns: 1fr 380px; gap: 40px; align-items: start;
}

/* Step panels */
.checkout-steps { display: flex; flex-direction: column; gap: 0; }

.checkout-step-panel {
  display: none; background: #fff; border-radius: 16px;
  padding: 32px; box-shadow: 0 2px 16px rgba(0,0,0,.06);
}
.checkout-step-panel.active { display: block; }

.step-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem; font-weight: 700;
  color: #1A2E1A; margin-bottom: 24px;
  padding-bottom: 16px; border-bottom: 1px solid #EDE4D0;
}

/* Cart items in checkout */
.checkout-cart-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid #F0E8D6;
}
.checkout-cart-item:last-child { border-bottom: none; }
.checkout-item-img {
  width: 64px; height: 64px; object-fit: cover;
  border-radius: 10px; flex-shrink: 0; background: #F0E8D6;
}
.checkout-item-info { flex: 1; min-width: 0; }
.checkout-item-name {
  font-size: .88rem; font-weight: 600; color: #1A2E1A;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 4px;
}
.checkout-item-qty { font-size: .78rem; color: #7A7A7A; }
.checkout-item-price {
  font-size: .9rem; font-weight: 700; color: var(--green, #234D35);
  white-space: nowrap; flex-shrink: 0;
}

/* Customer form */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group label { font-size: .82rem; font-weight: 600; color: #3A3A3A; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid #DDD; border-radius: 8px;
  font-family: inherit; font-size: .88rem; color: #1A2E1A;
  background: #FAFAF7; outline: none;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}
.form-group input:focus, .form-group textarea:focus {
  border-color: var(--green, #234D35);
  box-shadow: 0 0 0 3px rgba(35,77,53,.1);
}
.form-group input.error { border-color: #C0392B; }
.form-group textarea { resize: vertical; min-height: 80px; }

/* Payment options */
.payment-options { display: flex; flex-direction: column; gap: 20px; }
.payment-group { display: flex; flex-direction: column; gap: 10px; }
.payment-group-title {
  font-size: .82rem; font-weight: 700; color: #7A7A7A;
  text-transform: uppercase; letter-spacing: .06em;
  padding-bottom: 4px; border-bottom: 1px solid #EDE4D0;
  margin-bottom: 4px;
}
.payment-option { display: flex; cursor: pointer; }
.payment-option input[type="radio"] { display: none; }
.payment-option-inner {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 14px 16px;
  border: 2px solid #EDE4D0; border-radius: 12px;
  background: #FAFAF7; transition: border-color .2s, background .2s;
}
.payment-option input:checked + .payment-option-inner {
  border-color: var(--green, #234D35);
  background: rgba(35,77,53,.04);
}
.payment-option:hover .payment-option-inner { border-color: #C9A45C; }
.pay-icon-badge {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.payment-option-inner > div {
  display: flex; flex-direction: column; gap: 2px;
}
.payment-option-inner strong { font-size: .88rem; color: #1A2E1A; }
.payment-option-inner span { font-size: .75rem; color: #7A7A7A; }

/* Step actions */
.step-actions {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 28px; gap: 12px; flex-wrap: wrap;
}
.step-actions .btn-primary { min-width: 200px; justify-content: center; }

.btn-lg { padding: 15px 28px; font-size: 1rem; }

/* Summary card */
.checkout-summary { position: sticky; top: 120px; }
.summary-card {
  background: #fff; border-radius: 16px; padding: 24px;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
}
.summary-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem; font-weight: 700; color: #1A2E1A;
  margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 1px solid #EDE4D0;
}
.summary-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; font-size: .82rem;
}
.summary-item-img {
  width: 44px; height: 44px; object-fit: cover;
  border-radius: 8px; background: #F0E8D6; flex-shrink: 0;
}
.summary-item-name { flex: 1; color: #3A3A3A; line-height: 1.3; }
.summary-item-price { font-weight: 700; color: var(--green, #234D35); white-space: nowrap; }
.summary-divider { height: 1px; background: #EDE4D0; margin: 12px 0; }
.summary-line {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .84rem; color: #5A5A5A; padding: 4px 0;
}
.text-green { color: var(--green, #234D35); font-weight: 600; }
.summary-total {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 1rem; padding: 8px 0;
}
.summary-total strong { font-size: 1.2rem; color: var(--green, #234D35); }
.summary-secure {
  display: flex; align-items: center; gap: 6px;
  font-size: .72rem; color: #7A7A7A; margin-top: 16px;
  padding-top: 12px; border-top: 1px solid #EDE4D0;
}

/* Confirmation step */
.confirmation-wrap { text-align: center; padding: 24px 0; }
.confirmation-icon { font-size: 3.5rem; margin-bottom: 16px; }
.confirmation-wrap h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem; color: #1A2E1A; margin-bottom: 12px;
}
.confirmation-text {
  color: #5A5A5A; line-height: 1.7; margin-bottom: 28px;
  font-size: .92rem; max-width: 480px; margin-left: auto; margin-right: auto;
}
.confirmation-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-wa-lg {
  display: flex; align-items: center; gap: 8px;
  background: #25D366; color: #fff; padding: 14px 24px;
  border-radius: 10px; font-weight: 600; font-size: .92rem;
  text-decoration: none; transition: background .2s;
}
.btn-wa-lg:hover { background: #1da852; }

/* Empty cart */
.empty-cart-msg { text-align: center; padding: 40px 0; }
.empty-cart-msg p { color: #7A7A7A; margin-bottom: 20px; }

/* footer-mini already defined in product.css */
.footer-mini {
  background: #1A2E1A; color: #B0C0B0;
  padding: 20px 0; text-align: center;
  font-size: .78rem; line-height: 1.7;
}
.footer-mini a { color: var(--gold, #C9A45C); text-decoration: none; }
.footer-mini .footer-disclaimer { color: #7A9A7A; margin-top: 4px; }

/* Step subtitle */
.step-subtitle {
  color: var(--text-light, #7A7A7A);
  font-size: .9rem;
  margin: -8px 0 24px;
  line-height: 1.5;
}

/* Operators grid */
.operators-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

/* Tuile = bouton cliquable */
.operator-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  background: var(--cream, #FFFDF8);
  border: 2px solid var(--beige-dark, #EDE3D4);
  border-radius: 12px;
  font-family: inherit;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-med, #4A4A4A);
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, transform .15s, box-shadow .2s, background .2s;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.operator-tile:hover {
  border-color: var(--green, #234D35);
  background: #EDF3EF;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(35,77,53,.13);
}
.operator-tile:active { transform: translateY(0); box-shadow: none; }
.operator-tile:focus-visible {
  border-color: var(--green, #234D35);
  box-shadow: 0 0 0 3px rgba(35,77,53,.2);
}
.operator-tile.op-loading {
  border-color: var(--green, #234D35);
  background: #EDF3EF;
  cursor: wait;
}
.operator-tile.op-disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.operator-tile:disabled { cursor: not-allowed; }

/* "Tous les moyens" tile — couleur différenciée */
.operator-tile-all { border-style: dashed; }
.operator-tile-all:hover { border-style: solid; }

.op-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-family: var(--font-sans, sans-serif);
  font-weight: 700;
  font-size: .7rem;
  flex-shrink: 0;
}
.op-label { line-height: 1.2; }
.op-sublabel {
  font-size: .68rem;
  font-weight: 400;
  color: var(--text-muted, #8A8A8A);
  line-height: 1.3;
}

@media (max-width: 480px) {
  .operators-grid-3 { grid-template-columns: 1fr; }
}

/* Country availability note */
.payment-country-note {
  margin: 0 0 20px;
  padding: 12px 16px;
  background: #FBF3E3;
  border: 1px solid #EAD9AE;
  border-radius: 10px;
  color: #7A5B00;
  font-size: .85rem;
  font-weight: 500;
  line-height: 1.5;
}

/* Secure payment note */
.payment-secure-note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #EDF3EF;
  border-radius: 10px;
  font-size: .8rem;
  color: #234D35;
  font-weight: 500;
  margin-bottom: 24px;
}

/* Payment error message */
.payment-error-msg {
  margin: 0 0 16px;
  padding: 14px 16px;
  background: #FFF3F3;
  border: 1px solid #F5C6C6;
  border-radius: 10px;
  color: #C0392B;
  font-size: .88rem;
  font-weight: 500;
  line-height: 1.5;
}

/* Button spinner */
.btn-spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Country Selector ──────────────────────────────────────── */
.country-selector { position: relative; }

.country-selector-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 11px 14px;
  background: #FAFAF7; border: 1.5px solid #DDD; border-radius: 8px;
  font-family: inherit; font-size: .88rem; color: #1A2E1A;
  cursor: pointer; text-align: left;
  transition: border-color .2s, box-shadow .2s;
}
.country-selector-btn:hover { border-color: #C9A45C; }
.country-selector-btn[aria-expanded="true"] {
  border-color: var(--green, #234D35);
  box-shadow: 0 0 0 3px rgba(35,77,53,.1);
}
.country-selector-btn.error { border-color: #C0392B; }

.cs-flag { font-size: 1.3rem; line-height: 1; flex-shrink: 0; }
.cs-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-chevron {
  flex-shrink: 0; color: #7A7A7A;
  transition: transform .2s;
}
.country-selector-btn[aria-expanded="true"] .cs-chevron { transform: rotate(180deg); }

.cs-dropdown {
  position: absolute;
  top: calc(100% + 4px); left: 0; right: 0;
  background: #fff;
  border: 1.5px solid #DDD; border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.14);
  z-index: 1000; overflow: hidden;
}

.cs-search-wrap { padding: 10px; border-bottom: 1px solid #F0E8D6; }
.cs-search {
  width: 100%; padding: 9px 12px;
  border: 1.5px solid #EDE4D0; border-radius: 8px;
  font-family: inherit; font-size: .85rem; outline: none;
  box-sizing: border-box; background: #FAFAF7;
  transition: border-color .2s;
}
.cs-search:focus { border-color: var(--green, #234D35); }

.cs-list {
  list-style: none; margin: 0; padding: 4px 0;
  max-height: 220px; overflow-y: auto;
}
.cs-empty { padding: 12px 14px; font-size: .85rem; color: #9A9A9A; }

.cs-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; cursor: pointer;
  font-size: .85rem; color: #1A2E1A;
  outline: none; transition: background .1s;
}
.cs-item:hover,
.cs-item:focus { background: #F6EFE4; }
.cs-item-selected { background: rgba(35,77,53,.06); font-weight: 600; }
.cs-item-flag { font-size: 1.1rem; flex-shrink: 0; }
.cs-item-name { flex: 1; }
.cs-item-dial { font-size: .75rem; color: #9A9A9A; white-space: nowrap; }

/* ─── Phone Input ────────────────────────────────────────────── */
.phone-input-wrap {
  display: flex;
  border: 1.5px solid #DDD; border-radius: 8px;
  overflow: hidden; background: #FAFAF7;
  transition: border-color .2s, box-shadow .2s;
}
.phone-input-wrap:focus-within {
  border-color: var(--green, #234D35);
  box-shadow: 0 0 0 3px rgba(35,77,53,.1);
}
.phone-input-wrap.error { border-color: #C0392B; }

.phone-dial-badge {
  display: flex; align-items: center; gap: 6px;
  padding: 11px 12px;
  background: #EDE4D0; border-right: 1.5px solid #DDD;
  font-family: inherit; font-size: .82rem;
  color: #3A3A3A; font-weight: 700;
  white-space: nowrap; flex-shrink: 0; user-select: none;
}
.phone-dial-badge > span:first-child { font-size: 1.1rem; }

.phone-input-wrap input[type="tel"] {
  flex: 1; padding: 11px 14px;
  border: none; background: transparent;
  font-family: inherit; font-size: .88rem; color: #1A2E1A;
  outline: none; min-width: 0;
}

/* ─── City Autocomplete ──────────────────────────────────────── */
.city-input-wrap { position: relative; }

.city-suggestions {
  position: absolute;
  top: calc(100% + 4px); left: 0; right: 0;
  background: #fff;
  border: 1.5px solid #DDD; border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,.1);
  z-index: 500; max-height: 200px; overflow-y: auto;
  list-style: none; margin: 0; padding: 4px 0;
}
.city-suggestion-item {
  padding: 9px 14px; font-size: .85rem;
  color: #1A2E1A; cursor: pointer;
  outline: none; transition: background .1s;
}
.city-suggestion-item:hover,
.city-suggestion-item:focus { background: #F6EFE4; }

/* ─── Misc form helpers ──────────────────────────────────────── */
.field-optional { font-weight: 400; color: #9A9A9A; font-size: .78rem; }
.text-muted { color: #7A7A7A; font-weight: 500; }

/* Responsive */
@media (max-width: 900px) {
  .checkout-layout { grid-template-columns: 1fr; }
  .checkout-summary { position: static; }
}
@media (max-width: 600px) {
  .checkout-main { padding: 24px 0 60px; }
  .checkout-step-panel { padding: 20px 16px; }
  .form-row { grid-template-columns: 1fr; }
  .step-actions { flex-direction: column; }
  .step-actions .btn { width: 100%; justify-content: center; }
  .progress-connector { width: 24px; }
  .step-label { display: none; }
  .confirmation-actions { flex-direction: column; }
  .btn-wa-lg, .confirmation-actions .btn { width: 100%; justify-content: center; }
}
