/* Sélecteur de pays — carte flottante compacte, nuit + or */
.cp-trigger { flex: 0 0 auto; min-width: 100px; display: inline-flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 11px; min-height: 44px; align-self: stretch; box-sizing: border-box; border-radius: 12px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.05); color: var(--text); font: inherit; font-size: .86rem; font-weight: 700; cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .12s ease; }
.cp-trigger:hover, .cp-trigger[aria-expanded="true"] { border-color: rgba(232,184,75,.55); background: rgba(232,184,75,.07); }
.cp-trigger:active { transform: scale(.97); }
.cp-trigger:focus-visible { outline: 2px solid rgba(232,184,75,.7); outline-offset: 2px; }
.cp-trigger svg { color: var(--text-muted); flex-shrink: 0; }
.cp-flag { display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem; line-height: 1; min-width: 22px; color: var(--gold-soft); }
.cp-code { white-space: nowrap; }

.cp-ov { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: flex-end; justify-content: center; padding: 14px; background: rgba(8,6,24,.0); backdrop-filter: blur(0); -webkit-backdrop-filter: blur(0); transition: background .22s ease, backdrop-filter .22s ease; }
.cp-ov[hidden] { display: none; }
.cp-ov.show { background: rgba(8,6,24,.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.cp-card { width: 100%; max-width: 380px; max-height: min(72vh, 540px); display: flex; flex-direction: column; border-radius: 22px; background: linear-gradient(165deg, var(--panel, #1c1842), #141033); border: 1px solid rgba(232,184,75,.28); box-shadow: 0 30px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.04) inset; padding: 8px 12px 12px; transform: translateY(22px) scale(.97); opacity: 0; transition: transform .26s cubic-bezier(.2,.9,.25,1), opacity .2s ease; }
.cp-ov.show .cp-card { transform: none; opacity: 1; }
.cp-grip { width: 38px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.18); margin: 2px auto 8px; }
.cp-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 8px; font-family: var(--font-display, inherit); font-size: 1rem; color: var(--text); }
.cp-x { width: 32px; height: 32px; border-radius: 50%; border: none; background: rgba(255,255,255,.07); color: var(--text-muted); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.cp-x:active { transform: scale(.92); }
.cp-search { display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 42px; border-radius: 12px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.05); color: var(--text-muted); margin-bottom: 8px; }
.cp-search:focus-within { border-color: rgba(232,184,75,.6); background: rgba(255,255,255,.07); }
.cp-search input { flex: 1; min-width: 0; border: none; outline: none; background: none; color: var(--text); font: inherit; font-size: 16px; }
.cp-search input::-webkit-search-cancel-button { display: none; }
.cp-list { position: relative; overflow-y: auto; overscroll-behavior: contain; margin: 0 -4px; padding: 0 4px; scrollbar-width: thin; scrollbar-color: rgba(232,184,75,.4) transparent; }
.cp-row { width: 100%; display: grid; grid-template-columns: 28px 1fr auto 20px; align-items: center; gap: 10px; padding: 10px 10px; margin: 2px 0; border: none; border-radius: 12px; background: none; color: var(--text); font: inherit; font-size: .9rem; text-align: left; cursor: pointer; }
.cp-row[hidden] { display: none; }
.cp-row:hover, .cp-row:focus-visible { background: rgba(255,255,255,.06); outline: none; }
.cp-row:active { background: rgba(232,184,75,.12); }
.cp-name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.cp-rc { color: var(--text-muted); font-size: .8rem; font-weight: 600; }
.cp-ck { color: var(--gold); opacity: 0; display: flex; }
.cp-row.on { background: rgba(232,184,75,.11); }
.cp-row.on .cp-ck { opacity: 1; }
.cp-row.on .cp-name { color: var(--gold-soft); }
.cp-none { text-align: center; color: var(--text-muted); font-size: .85rem; padding: 22px 0 14px; margin: 0; }
html.cp-lock { overflow: hidden; }
@media (min-width: 640px) { .cp-ov { align-items: center; } }
@media (prefers-reduced-motion: reduce) { .cp-ov, .cp-card, .cp-trigger { transition: none; } }
html[data-themeable][data-theme="light"] .cp-trigger { border-color: rgba(20,18,43,.18); background: rgba(20,18,43,.05); }
html[data-themeable][data-theme="light"] .cp-card { background: linear-gradient(165deg, #fff, #F4F5F9); border-color: rgba(185,135,38,.4); box-shadow: 0 30px 80px rgba(40,30,90,.25); }
html[data-themeable][data-theme="light"] .cp-search, html[data-themeable][data-theme="light"] .cp-x { background: rgba(20,18,43,.05); border-color: rgba(20,18,43,.14); }
html[data-themeable][data-theme="light"] .cp-row:hover { background: rgba(20,18,43,.05); }
html[data-themeable][data-theme="light"] .cp-row.on .cp-name { color: var(--gold-ink, #8a5c15); }

/* drapeaux dessinés : pastille ronde avec un fin liseré */
.cp-fimg { width: 20px; height: 20px; border-radius: 50%; display: block; object-fit: cover; box-shadow: 0 0 0 1px rgba(255,255,255,.22), 0 1px 3px rgba(0,0,0,.35); }
html[data-theme="light"] .cp-fimg { box-shadow: 0 0 0 1px rgba(28,24,50,.15), 0 1px 2px rgba(0,0,0,.15); }
.cp-row .cp-fimg { width: 24px; height: 24px; }
