/* Fenêtre de paiement Sentinel (par-dessus la page) + sélecteur de langue */

body.co-open { overflow: hidden; }

.co-backdrop {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center; padding: 20px;
  background: radial-gradient(800px 500px at 50% 0%, rgba(var(--sx-accent-rgb), .12), transparent 70%), rgba(2, 2, 3, .78);
  backdrop-filter: blur(8px);
  animation: co-fade .2s ease;
}
.co-backdrop[hidden] { display: none; }
@keyframes co-fade { from { opacity: 0; } }
@keyframes co-rise { from { opacity: 0; transform: translateY(14px) scale(.98); } }

.co-modal {
  position: relative; overflow: hidden;
  width: min(560px, 100%); max-height: calc(100vh - 40px);
  display: flex; flex-direction: column;
  border-radius: 14px; border: 1px solid rgba(var(--sx-accent-rgb), .28);
  background: linear-gradient(180deg, #111114 0%, #0b0b0d 100%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .03) inset, 0 0 40px rgba(var(--sx-accent-rgb), .12);
  color: var(--sx-text); font-family: var(--sx-font);
  animation: co-rise .25s ease;
}
.co-glow {
  position: absolute; top: -120px; left: 50%; width: 420px; height: 220px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(var(--sx-accent-rgb), .25), transparent); pointer-events: none;
}
.co-modal [hidden] { display: none !important; }

.co-head { position: relative; display: flex; align-items: center; gap: 14px; padding: 20px 22px 14px; }
.co-logo { height: 34px; width: auto; filter: drop-shadow(0 0 10px rgba(var(--sx-accent-rgb), .45)); }
.co-head-txt { display: grid; gap: 2px; min-width: 0; }
.co-head-txt b { font-family: var(--sx-display); font-size: 15px; letter-spacing: .12em; text-transform: uppercase; }
.co-head-txt small { color: var(--sx-muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-x {
  margin-inline-start: auto; width: 34px; height: 34px; border-radius: 8px; flex: none;
  border: 1px solid var(--sx-line); background: rgba(255, 255, 255, .03); color: var(--sx-muted);
  font-size: 22px; line-height: 1; cursor: pointer; transition: color .2s, border-color .2s;
}
.co-x:hover { color: #fff; border-color: var(--sx-line-hi); }

.co-steps { position: relative; display: flex; gap: 8px; margin: 0; padding: 0 22px 16px; list-style: none; border-bottom: 1px solid var(--sx-line-soft); }
.co-steps li { flex: 1; display: flex; align-items: center; gap: 8px; color: var(--sx-dim); font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; }
.co-steps li::after { content: ''; flex: 1; height: 1px; background: var(--sx-line); }
.co-steps li:last-child::after { display: none; }
.co-steps span {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; flex: none;
  border: 1px solid var(--sx-line); font: 600 11.5px var(--sx-display);
}
.co-steps em { font-style: normal; }
.co-steps li.on { color: var(--sx-text); }
.co-steps li.on span { border-color: var(--sx-blue); background: rgba(var(--sx-accent-rgb), .18); color: #fff; box-shadow: 0 0 10px rgba(var(--sx-accent-rgb), .45); }
.co-steps li.ok { color: var(--sx-muted); }
.co-steps li.ok span { border-color: rgba(34, 211, 138, .6); color: var(--sx-green); }

.co-body { position: relative; padding: 20px 22px; overflow-y: auto; min-height: 140px; }
.co-foot {
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px;
  border-top: 1px solid var(--sx-line-soft); color: var(--sx-dim); font-size: 12px; text-align: center;
}
.co-lock { width: 10px; height: 8px; border-radius: 2px; background: var(--sx-dim); position: relative; margin-top: 4px; flex: none; }
.co-lock::before { content: ''; position: absolute; left: 2px; top: -5px; width: 6px; height: 6px; border: 1.5px solid var(--sx-dim); border-bottom: 0; border-radius: 4px 4px 0 0; box-sizing: border-box; }

.co-card { text-align: center; padding: 6px 4px; }
.co-card h3 { margin: 0 0 8px; font-family: var(--sx-display); font-size: 21px; text-transform: uppercase; letter-spacing: .04em; }
.co-card p { margin: 0 auto 18px; max-width: 420px; color: var(--sx-muted); line-height: 1.55; font-size: 14.5px; }
.co-actions, .co-dsteps { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.co-dsteps { flex-direction: column; max-width: 340px; margin: 0 auto; }

.co-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 20px; border-radius: 9px; border: 1px solid var(--sx-line);
  background: rgba(255, 255, 255, .04); color: var(--sx-text); font: 600 14.5px var(--sx-font);
  text-decoration: none; cursor: pointer; transition: transform .15s, border-color .2s, box-shadow .2s, opacity .2s;
}
.co-btn:hover { transform: translateY(-1px); border-color: var(--sx-line-hi); }
.co-btn:disabled { opacity: .5; cursor: wait; transform: none; }
.co-btn.primary { border-color: transparent; background: linear-gradient(135deg, #c4101f, #ff3d4c); color: #fff; box-shadow: 0 0 16px rgba(var(--sx-accent-rgb), .3); }
.co-btn.discord { border-color: transparent; background: #5865f2; color: #fff; box-shadow: 0 0 16px rgba(88, 101, 242, .3); }
.co-btn.discord:not([href]) { opacity: .5; pointer-events: none; }
.co-btn.full { width: 100%; }
.co-n { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(0, 0, 0, .25); font-size: 12px; }

.co-discord-ico {
  width: 58px; height: 58px; margin: 2px auto 14px; border-radius: 16px; background: #5865f2 center / 34px no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 127.14 96.36'%3E%3Cpath fill='%23fff' d='M107.7 8.07A105.15 105.15 0 0 0 81.47 0a72.06 72.06 0 0 0-3.36 6.83 97.68 97.68 0 0 0-29.11 0A72.37 72.37 0 0 0 45.64 0a105.89 105.89 0 0 0-26.25 8.09C2.79 32.65-1.71 56.6.54 80.21a105.73 105.73 0 0 0 32.17 16.15 77.7 77.7 0 0 0 6.89-11.11 68.42 68.42 0 0 1-10.85-5.18c.91-.66 1.8-1.34 2.66-2a75.57 75.57 0 0 0 64.32 0c.87.71 1.76 1.39 2.66 2a68.68 68.68 0 0 1-10.87 5.19 77 77 0 0 0 6.89 11.1 105.25 105.25 0 0 0 32.19-16.14c2.64-27.38-4.51-51.11-18.9-72.15ZM42.45 65.69C36.18 65.69 31 60 31 53s5-12.74 11.43-12.74S54 46 53.89 53s-5.05 12.69-11.44 12.69Zm42.24 0C78.41 65.69 73.25 60 73.25 53s5-12.74 11.44-12.74S96.23 46 96.12 53s-5.04 12.69-11.43 12.69Z'/%3E%3C/svg%3E");
  box-shadow: 0 0 24px rgba(88, 101, 242, .45);
}
.co-note { min-height: 18px; margin: 14px 0 0; color: var(--sx-muted); font-size: 13px; text-align: center; }
.co-note.err { color: var(--sx-red); }
.co-msg { padding: 16px; border-radius: 10px; border: 1px solid var(--sx-line); line-height: 1.5; font-size: 14.5px; text-align: center; }
.co-msg.warn { border-color: rgba(245, 165, 36, .35); color: var(--sx-amber); background: rgba(245, 165, 36, .06); }
.co-msg.err { border-color: rgba(255, 77, 106, .35); color: var(--sx-red); background: rgba(255, 77, 106, .06); }
.co-ok { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; color: var(--sx-green); font-size: 13px; }
.co-ok i { width: 8px; height: 8px; border-radius: 50%; background: var(--sx-green); box-shadow: 0 0 8px var(--sx-green); }

.co-form { display: grid; gap: 14px; }
.co-label { display: grid; gap: 7px; margin: 0; color: var(--sx-muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; }
.co-form select, .co-form input:not([type=radio]) {
  width: 100%; box-sizing: border-box; padding: 11px 12px; border-radius: 8px;
  border: 1px solid var(--sx-line); background: #08080a; color: var(--sx-text);
  font: 400 14.5px var(--sx-font); text-transform: none; letter-spacing: 0;
}
.co-form select:focus, .co-form input:focus { outline: none; border-color: var(--sx-line-hi); box-shadow: 0 0 0 3px rgba(var(--sx-accent-rgb), .12); }
.co-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.co-plan {
  position: relative; display: grid; gap: 4px; padding: 14px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--sx-line); background: rgba(255, 255, 255, .02); transition: border-color .2s, background .2s;
}
.co-plan input { position: absolute; opacity: 0; pointer-events: none; }
.co-plan b { font-size: 13px; color: var(--sx-muted); text-transform: uppercase; letter-spacing: .08em; }
.co-plan span { font: 700 21px var(--sx-display); }
.co-plan.on { border-color: rgba(var(--sx-accent-rgb), .7); background: rgba(var(--sx-accent-rgb), .08); box-shadow: 0 0 14px rgba(var(--sx-accent-rgb), .15) inset; }
.co-plan.on b { color: var(--sx-text); }
.co-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 2px; border-top: 1px dashed var(--sx-line); }
.co-total span { color: var(--sx-muted); text-transform: uppercase; letter-spacing: .1em; font-size: 12.5px; }
.co-total b { font: 700 26px var(--sx-display); }

.co-back { margin: 0 0 12px; padding: 0; border: 0; background: none; color: var(--sx-muted); font: 500 13.5px var(--sx-font); cursor: pointer; }
.co-back::before { content: '← '; }
.co-back:hover { color: var(--sx-text); }
.co-stripe { min-height: 320px; border-radius: 10px; overflow: hidden; }

.co-wait { display: grid; place-items: center; gap: 14px; padding: 30px 0; color: var(--sx-muted); }
.co-wait p { margin: 0; }
.co-spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .08); border-top-color: var(--sx-blue); animation: co-rot .8s linear infinite; }
@keyframes co-rot { to { transform: rotate(360deg); } }

.co-check { position: relative; width: 64px; height: 64px; margin: 4px auto 16px; border-radius: 50%; background: rgba(34, 211, 138, .12); border: 2px solid var(--sx-green); box-shadow: 0 0 24px rgba(34, 211, 138, .35); }
.co-check::after { content: ''; position: absolute; left: 21px; top: 15px; width: 13px; height: 24px; border-right: 3px solid var(--sx-green); border-bottom: 3px solid var(--sx-green); transform: rotate(45deg); }

@media (max-width: 520px) {
  .co-backdrop { padding: 0; place-items: end center; }
  .co-modal { border-radius: 14px 14px 0 0; max-height: 96vh; }
  .co-steps em { display: none; }
}

/* ---------- Sélecteur de langue ---------- */
.lang-pick { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px;
  border: 1px solid var(--sx-line); background: rgba(255, 255, 255, .03); color: var(--sx-text);
  font: 500 13.5px var(--sx-font); cursor: pointer; transition: border-color .2s;
}
.lang-btn:hover, .lang-btn[aria-expanded=true] { border-color: var(--sx-line-hi); }
.lang-flag { width: 20px; height: 20px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); }
.lang-caret { width: 6px; height: 6px; border-right: 1.5px solid var(--sx-muted); border-bottom: 1.5px solid var(--sx-muted); transform: rotate(45deg) translateY(-2px); }
.lang-menu {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 50; width: 220px;
  border-radius: 12px; border: 1px solid var(--sx-line); background: #0e0e11;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .65); overflow: hidden; animation: co-fade .15s ease;
}
.lang-title { margin: 0; padding: 10px 14px; color: var(--sx-dim); font-size: 11.5px; text-transform: uppercase; letter-spacing: .12em; border-bottom: 1px solid var(--sx-line-soft); }
.lang-list { max-height: 264px; overflow-y: auto; padding: 6px; scrollbar-width: thin; scrollbar-color: rgba(var(--sx-accent-rgb), .5) transparent; }
.lang-opt {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px;
  background: none; color: var(--sx-text); font: 400 14px var(--sx-font); text-align: start; cursor: pointer;
}
.lang-opt:hover { background: rgba(255, 255, 255, .05); }
.lang-opt[aria-selected=true] { background: rgba(var(--sx-accent-rgb), .12); color: #fff; }
.lang-opt[aria-selected=true]::after { content: ''; margin-inline-start: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--sx-blue); box-shadow: 0 0 8px var(--sx-blue); }
