/* Ellipsite Unlock — mêmes couleurs, polices et formes que ellipsite.com, sans la 3D (pages légères) */
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 400 800; font-display: swap; src: url(fonts/bricolage-grotesque-latin.woff2) format('woff2'); }
@font-face { font-family: 'Geist'; font-weight: 400 700; font-display: swap; src: url(fonts/geist-latin.woff2) format('woff2'); }
@font-face { font-family: 'Geist Mono'; font-weight: 400 600; font-display: swap; src: url(fonts/geist-mono-latin.woff2) format('woff2'); }

:root {
  --paper: #F7F5F0;
  --paper-2: #ECE8E1;
  --card: #FFFFFF;
  --ink: #171B20;
  --ink-2: #4C5260;
  --night-2: #21262D;
  --night-ink: #F2F1EE;
  --night-ink-2: #B3B8C1;
  --line: rgba(23, 27, 32, .12);
  --line-strong: rgba(23, 27, 32, .22);
  --orange: #FF650A;
  --orange-btn: #CC4D00;
  --orange-text: #B34000;
  --orange-soft: #FFE6D4;
  --live: #1F9D5A;
  --danger: #B42318;
  --f-display: 'Bricolage Grotesque', 'Arial Narrow', Arial, sans-serif;
  --f-body: 'Geist', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-mono: 'Geist Mono', ui-monospace, Consolas, monospace;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--f-body); -webkit-text-size-adjust: 100%; }
a { color: var(--orange-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2 { font-family: var(--f-display); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
h1 { font-size: 1.9rem; margin: .3em 0 .5em; }
h2 { font-size: 1.3rem; margin: 1.4em 0 .6em; }
.card h2:first-child, .card h1:first-child { margin-top: 0; }
.wrap { max-width: 600px; margin: 0 auto; padding: 0 16px; }
body.admin .wrap { max-width: 1120px; }
.muted { color: var(--ink-2); }
.center { text-align: center; }
.neg, .danger { color: var(--danger); }
.pos { color: var(--live); }
.dim { opacity: .5; }
.mono { font-family: var(--f-mono); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --- Arrière-plan : grille de points et contour du logo parcouru par un trait, comme ellipsite.com */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background-image: radial-gradient(circle, rgba(128, 128, 128, .22) 1.1px, transparent 1.7px); background-size: 32px 32px; background-position: 16px 16px; }
.bg-orbit { position: absolute; aspect-ratio: 312 / 296; overflow: visible; }
.bg-orbit-a { width: min(110vw, 760px); right: -38%; top: -6%; transform: rotate(-8deg); opacity: .55; }
.bg-orbit-b { width: min(90vw, 620px); left: -42%; bottom: -14%; transform: rotate(14deg); opacity: .35; }
.mod-base { fill: none; stroke: var(--orange); stroke-opacity: .38; stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.mod-run { fill: none; stroke: var(--orange); stroke-width: 3; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 7 93; animation: run 12s linear infinite; }
@keyframes run { to { stroke-dashoffset: -100; } }
@media (min-width: 900px) { .bg-orbit-a { right: -6%; } .bg-orbit-b { left: -8%; } }
@media (prefers-reduced-motion: reduce) { .mod-run { animation: none; } }
body { background-color: var(--paper); }

/* --- En-tête */
.topbar { position: sticky; top: 0; z-index: 5; padding: 10px 0; background: rgba(247, 245, 240, .85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-name { font-family: var(--f-display); font-weight: 800; font-size: 21px; letter-spacing: -0.03em; }
.brand-tag { font-family: var(--f-mono); font-size: 11px; font-weight: 600; letter-spacing: .08em; background: var(--orange-soft); color: var(--orange-text); border-radius: 999px; padding: 4px 8px; }
nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
nav a { color: var(--ink); font-weight: 600; font-size: 15px; }
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: 14px; }
.pill:hover { text-decoration: none; border-color: var(--line-strong); }
.pill-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.icon-btn { width: 44px; height: 44px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: var(--card); border: 1px solid var(--line); color: var(--ink); flex-shrink: 0; }
.icon-btn:hover { text-decoration: none; }
.footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--ink-2); font-size: 14px; padding-top: 28px; padding-bottom: 28px; }

/* --- Boutons et formulaires */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; background: var(--orange-btn); color: #fff; border: 0; border-radius: 999px; padding: 0 20px; font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; text-align: center; }
.btn:hover { filter: brightness(1.06); text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-big { width: 100%; min-height: 58px; font-size: 18px; }
.btn-small { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn .arrow { width: 32px; height: 32px; border-radius: 999px; background: #fff; color: var(--orange-btn); display: inline-flex; align-items: center; justify-content: center; }
button.link { background: none; border: 0; color: var(--orange-text); cursor: pointer; padding: 0; font: inherit; font-weight: 600; }
form.inline { display: inline; }

.card { background: var(--card); border: 1px solid rgba(23, 27, 32, .08); border-radius: 24px; padding: 20px; margin-bottom: 16px; }
.narrow { max-width: 460px; margin: 24px auto; }
.narrow-wide { max-width: 760px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form.grow { flex: 1; }
.card.inline-form { justify-content: space-between; }

label { display: flex; flex-direction: column; gap: 6px; font-size: 15px; font-weight: 600; color: var(--ink); }
label.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 500; }
input, select, textarea { width: 100%; min-height: 48px; background: var(--card); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 16px; padding: 10px 14px; font: inherit; font-size: 16px; font-weight: 400; }
textarea { min-height: 0; }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; accent-color: var(--orange-btn); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.inline-form input { width: auto; flex: 1; min-width: 140px; }
.w-small { max-width: 110px; min-width: 70px !important; }

.alert { border-radius: 16px; padding: 12px 16px; margin: 12px 0; font-size: 15px; }
.alert-success { background: #E3F4EA; color: #14532D; }
.alert-error { background: #FDE7E5; color: #7A1A12; }
.alert-info { background: var(--orange-soft); color: #5C2200; }

/* --- Catalogue (accueil) */
.search { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 0 18px; height: 52px; margin: 6px 0 14px; }
.search input { border: 0; min-height: 0; padding: 0; background: transparent; }
.search input:focus { outline: none; }
/* filtres : une seule ligne qui défile au doigt, bord à bord sur téléphone */
.chips { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 14px; padding: 2px 16px; scroll-padding-inline: 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; flex-shrink: 0; white-space: nowrap; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: 14px; }
.chip:hover { text-decoration: none; border-color: var(--line-strong); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.rows { background: var(--card); border: 1px solid rgba(23, 27, 32, .08); border-radius: 24px; padding: 0 14px; margin-bottom: 16px; }
.prow { display: flex; align-items: center; gap: 12px; padding: 14px 0; color: var(--ink); }
.prow + .prow { border-top: 1px solid rgba(23, 27, 32, .08); }
.prow:hover { text-decoration: none; }
.prow-body { display: flex; flex-direction: column; gap: 7px; flex-grow: 1; min-width: 0; }
.prow-name { font-weight: 600; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { border-radius: 8px; padding: 3px 8px; font-size: 13px; font-weight: 600; background: var(--paper-2); color: var(--ink-2); }
.badge-price { background: var(--orange-soft); color: var(--orange-text); font-size: 14px; font-weight: 700; }
.go { width: 40px; height: 40px; flex-shrink: 0; border-radius: 999px; background: var(--orange-btn); color: #fff; display: flex; align-items: center; justify-content: center; }
.prow.off { color: var(--ink-2); }
.tile { width: 56px; height: 56px; flex-shrink: 0; border-radius: 14px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; font-family: var(--f-mono); font-weight: 600; font-size: 15px; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile-2 { background: var(--orange-soft); color: var(--orange-text); }
.tile-3 { background: var(--paper-2); color: var(--ink); }
.tile-4 { background: var(--night-2); color: #FF8A4C; }
.prow.off .tile { background: var(--paper-2); color: var(--ink-2); }
.pro-link { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 18px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; font-size: 15px; }
.pro-link:hover { text-decoration: none; }
.pro-link b { color: #FF8A4C; font-weight: 600; }

/* --- Achat */
.buy-head { display: flex; align-items: center; gap: 12px; margin: 6px 0 22px; }
.buy-head h1 { margin: 0; font-size: 26px; }
.live { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.live::before { content: ''; width: 7px; height: 7px; border-radius: 999px; background: var(--live); }
.live.off::before { background: #70757F; }
.field-title { font-size: 15px; font-weight: 700; margin: 0 0 10px; }
.choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 22px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 52px; justify-content: center; padding: 12px; border-radius: 18px; background: var(--card); border: 2px solid rgba(23, 27, 32, .1); cursor: pointer; font-weight: 700; font-size: 15px; }
.choice b { font-family: var(--f-display); font-size: 24px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.choice small { font-size: 14px; font-weight: 700; }
.choice input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.choice input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 2px; }
.choice input:disabled + span { opacity: .4; cursor: not-allowed; }
.choices.nets span { align-items: center; }
.phone { display: flex; align-items: center; background: var(--card); border: 2px solid var(--ink); border-radius: 18px; height: 58px; overflow: hidden; margin-bottom: 22px; }
.phone span { padding: 0 14px; height: 100%; display: flex; align-items: center; background: var(--paper-2); font-family: var(--f-mono); font-weight: 600; }
.phone input { border: 0; border-radius: 0; min-height: 0; height: 100%; font-family: var(--f-mono); font-size: 18px; }
.phone input:focus { outline: none; }
.pay-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.text-btn { background: none; border: 0; font: inherit; font-weight: 600; color: var(--orange-text); min-height: 44px; cursor: pointer; }

/* --- Suivi : code PIN, livraison */
.state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 40px 0 10px; }
.state h1 { font-size: 36px; margin: 0; }
.ring { position: relative; width: 120px; height: 120px; display: flex; align-items: center; justify-content: center; }
.ring::before { content: ''; position: absolute; inset: 0; border-radius: 999px; background: var(--orange-soft); animation: ring 1.8s ease-out infinite; }
.ring span { position: relative; width: 96px; height: 96px; border-radius: 999px; background: var(--orange-soft); color: var(--orange-text); display: flex; align-items: center; justify-content: center; }
@keyframes ring { 0% { transform: scale(.8); opacity: .6 } 100% { transform: scale(1.5); opacity: 0 } }
.amount { font-family: var(--f-display); font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.spinner { width: 28px; height: 28px; border-radius: 999px; border: 3px solid var(--orange-soft); border-top-color: var(--orange-btn); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) } }
@media (prefers-reduced-motion: reduce) { .ring::before, .spinner { animation: none; } }
.done-head { display: flex; align-items: center; gap: 10px; margin: 6px 0 16px; }
.done-head h1 { margin: 0; font-size: 30px; }
.check-dot { width: 40px; height: 40px; border-radius: 999px; background: var(--live); color: #fff; display: flex; align-items: center; justify-content: center; }
.creds { background: var(--ink); color: var(--night-ink); border-radius: 28px; padding: 18px; display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }
.creds-head { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.creds-head span { color: var(--night-ink-2); }
.cred { display: flex; flex-direction: column; gap: 6px; }
.cred-label { font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; color: var(--night-ink-2); text-transform: uppercase; }
.cred-box { display: flex; align-items: center; gap: 10px; background: var(--night-2); border-radius: 16px; padding: 6px 6px 6px 16px; }
.cred-value { flex-grow: 1; min-width: 0; font-family: var(--f-mono); font-size: 17px; font-weight: 600; overflow-wrap: anywhere; white-space: pre-wrap; }
.copy-btn { min-width: 84px; min-height: 44px; border-radius: 12px; border: 0; background: var(--night-ink); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.linkbox { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 6px 6px 6px 14px; margin: 14px 0; }
.linkbox span { flex-grow: 1; min-width: 0; font-family: var(--f-mono); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linkbox button { min-height: 44px; padding: 0 14px; border-radius: 12px; border: 0; background: var(--ink); color: #fff; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.receipt { text-align: center; font-family: var(--f-mono); font-size: 13px; color: var(--ink-2); }
.instructions { background: var(--paper-2); border-radius: 16px; padding: 12px 14px; font-size: 15px; }

/* --- Commandes, tableaux (compte client et admin) */
pre.delivery { background: var(--paper); border: 1px dashed var(--line-strong); border-radius: 16px; padding: 14px; white-space: pre-wrap; word-break: break-all; font: 15px/1.5 var(--f-mono); }
pre.mini { margin: 0; white-space: pre-wrap; word-break: break-all; font-size: 13px; }
.preview { max-width: 160px; border-radius: 14px; }
.price { color: var(--orange-text); font-weight: 800; }
.price.big { font-family: var(--f-display); font-size: 1.8rem; margin: 0; }
.tag { display: inline-block; font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); align-self: flex-start; }
.tag-ok { color: var(--live); }
.tag-off { color: var(--danger); }
details.gateway { border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin-bottom: 10px; }
details.gateway summary { cursor: pointer; font-weight: 700; }
details.gateway[open] summary { margin-bottom: 12px; }

.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid rgba(23, 27, 32, .08); border-radius: 20px; margin-bottom: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--ink-2); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.actions { white-space: nowrap; }
td.actions > * { margin-right: 8px; }
.status { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--paper-2); }
.status-pending { color: #8A4B00; }
.status-completed, .status-paid { color: #14653A; }
.status-rejected, .status-failed { color: var(--danger); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); background: var(--card); font-weight: 600; font-size: 14px; }
.tabs a.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.list li:last-child { border-bottom: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 8px; }
.stat { background: var(--card); border: 1px solid rgba(23, 27, 32, .08); border-radius: 20px; padding: 14px 16px; color: var(--ink); display: flex; flex-direction: column; gap: 4px; }
.stat:hover { text-decoration: none; }
.stat span { color: var(--ink-2); font-size: 13px; }
.stat strong { font-family: var(--f-display); font-size: 1.5rem; }
.stat-alert { border-color: var(--orange); }
.stat-alert strong { color: var(--orange-text); }
code { font-family: var(--f-mono); font-size: .9em; }

@media (max-width: 420px) {
  .brand-name { font-size: 19px; }
  .choice b { font-size: 21px; }
}
