/* =============================================================
   CHECKOUT EMBARQUÉ — Kit Ortho Kids
   Harmonisé avec la palette du site (bleu/rose/vert, Fredoka/Quicksand)
   ============================================================= */

.co-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  z-index: 10000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 14px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.co-overlay.open {
  display: flex;
}

.co-modal {
  position: relative;
  width: 100%;
  max-width: 440px;
  margin: auto;
  background: #fff;
  border-radius: var(--radius-l, 24px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  padding: 26px 24px 28px;
  border: 3px solid var(--blue-border, #CFE0FF);
}

.co-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #f1f1f1;
  color: #777;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  font-weight: 700;
}

.co-close:hover { background: #e6e6e6; }

.co-head {
  text-align: center;
  margin-bottom: 18px;
}

.co-title {
  font-family: 'Fredoka', system-ui, sans-serif;
  color: var(--blue, #1456C8);
  font-size: 1.3rem;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 6px;
}

.co-product {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--blue-soft, #EAF2FF);
  border: 1.5px solid var(--blue-border, #CFE0FF);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 18px;
}

.co-product img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  flex: 0 0 54px;
}

.co-product .co-p-name {
  font-family: 'Fredoka', system-ui, sans-serif;
  font-weight: 700;
  color: var(--text, #17324D);
  font-size: 0.95rem;
  line-height: 1.15;
}

.co-product .co-p-price {
  margin-left: auto;
  text-align: right;
}

.co-product .co-p-price s {
  display: block;
  color: #E63946;
  font-size: 0.8rem;
  font-weight: 700;
}

.co-product .co-p-price strong {
  display: block;
  color: var(--green, #33B269);
  font-family: 'Fredoka', system-ui, sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
}

.co-field {
  margin-bottom: 14px;
}

.co-label {
  display: block;
  font-family: 'Quicksand', system-ui, sans-serif;
  font-weight: 700;
  color: var(--text, #17324D);
  font-size: 0.86rem;
  margin-bottom: 6px;
}

.co-input {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--blue-border, #CFE0FF);
  border-radius: 12px;
  font-family: 'Quicksand', system-ui, sans-serif;
  font-size: 1rem;
  color: var(--text, #17324D);
  background: #fff;
  outline: none;
  transition: border-color .15s;
}

.co-input:focus { border-color: var(--blue, #1456C8); }

/* Conteneur des Stripe Elements (carte) */
#co-payment-element {
  padding: 4px 0;
  margin-bottom: 6px;
  min-height: 42px;
}

/* Pays + code postal côte à côte */
.co-row {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}

.co-col {
  flex: 1;
  min-width: 0;
}

select.co-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235E7187' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 34px;
  cursor: pointer;
}

.co-pay-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  margin-top: 8px;
  background: var(--green, #33B269);
  color: #fff;
  border: 3px solid rgba(255, 255, 255, .72);
  border-radius: 999px;
  font-family: 'Fredoka', system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .3px;
  cursor: pointer;
  box-shadow: 0 6px 0 var(--green-dark, #23844B), 0 12px 22px rgba(51, 178, 105, .22);
  transition: box-shadow .15s, transform .05s;
}

.co-pay-btn:hover:not(:disabled) {
  box-shadow: 0 8px 0 var(--green-dark, #23844B), 0 16px 26px rgba(51, 178, 105, .24);
}

.co-pay-btn:active:not(:disabled) { transform: translateY(2px); }

.co-pay-btn:disabled {
  background: #b7c2cc;
  box-shadow: none;
  cursor: not-allowed;
  border-color: rgba(255,255,255,.5);
}

.co-spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: co-spin .7s linear infinite;
}

@keyframes co-spin { to { transform: rotate(360deg); } }

.co-error {
  color: #C1121F;
  background: #FFF0F0;
  border: 1px solid #FFD5D5;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.86rem;
  font-weight: 600;
  margin-top: 12px;
  display: none;
}

.co-error.show { display: block; }

.co-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
  color: var(--green, #33B269);
  font-size: 0.82rem;
  font-weight: 700;
}

.co-secure span { color: var(--text-light, #5E7187); font-weight: 600; }

/* État de chargement initial du modal */
.co-loading {
  text-align: center;
  padding: 30px 0;
  color: var(--text-light, #5E7187);
  font-weight: 600;
}
