/* Tableaux de bord : espace bijoutier + plateforme */

body { background: #f4f1ea; }
.bar { background: #13110e; color: #fff; position: sticky; top: 0; z-index: 40; }
.bar-in { max-width: 1160px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 14px; }
.bar .logo-text { color: #fff; }
.bar .logo-text small { color: var(--gold-2); }
.bar .btn { background: #26221c; border-color: #3a352d; color: #fff; margin-left: auto; }
.bar .btn:hover { background: #312c24; }
.tabs { max-width: 1160px; margin: 0 auto; padding: 0 20px; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; background: none; border: none; color: #b9b1a0; padding: 12px 14px; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; font-size: 14px; }
.tabs button:hover { color: #fff; }
.tabs button.active { color: #fff; border-bottom-color: var(--gold-2); }

main { max-width: 1160px; margin: 0 auto; padding: 24px 20px 80px; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.head h1 { font-family: var(--serif); font-size: 34px; font-weight: 600; line-height: 1.05; }
.head p { color: var(--muted); margin-top: 4px; font-size: 14px; }
.notice { display: flex; gap: 10px; align-items: flex-start; background: var(--gold-soft); color: #5d4410; border-radius: 14px; padding: 12px 14px; font-size: 13.5px; margin-bottom: 18px; }
.notice b { color: #3f2d08; }
.notice button { margin-left: auto; background: none; border: none; color: #7d5a14; cursor: pointer; font-size: 18px; line-height: 1; padding: 0 4px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.stat small { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.stat b { display: block; font-size: 22px; letter-spacing: -.01em; margin-top: 2px; }
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .input { width: auto; flex: 1; min-width: 160px; }
.toolbar select.input { flex: 0 1 220px; }

.plist { display: flex; flex-direction: column; gap: 10px; }
.prow { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px 10px 10px; display: grid; grid-template-columns: 64px 1.6fr 1fr 1fr auto auto; gap: 14px; align-items: center; transition: border-color .15s; }
.prow:hover { border-color: #d6ccb8; }
.prow.hidden-p { opacity: .6; }
.prow .ph { width: 64px; height: 64px; border-radius: 11px; overflow: hidden; background: var(--line-2); }
.prow .ph svg, .prow .ph img { width: 100%; height: 100%; display: block; object-fit: cover; }
.prow .nm b { display: block; font-size: 15px; line-height: 1.3; }
.prow .nm span { font-size: 12.5px; color: var(--muted); }
.prow .c small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.prow .c b { font-size: 14.5px; }
.prow .price b { color: var(--emerald); }

.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--ink-2); user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch i { position: relative; width: 40px; height: 23px; background: #d9d3c6; border-radius: 999px; transition: .2s; flex: none; }
.switch i::after { content: ''; position: absolute; width: 17px; height: 17px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + i { background: var(--emerald-2); }
.switch input:checked + i::after { transform: translateX(17px); }
.switch input:focus-visible + i { outline: 2px solid var(--gold); outline-offset: 2px; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.panel h2 { font-size: 16px; margin-bottom: 4px; }
.panel > p.muted { font-size: 13.5px; margin-bottom: 16px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; align-items: start; }

.rate-in { border: 1px solid #efdfb8; background: linear-gradient(160deg, #fffaf0, var(--gold-soft)); border-radius: 16px; padding: 16px; }
.rate-in label { font-weight: 700; color: #7d5a14; font-size: 13px; letter-spacing: .05em; }
.rate-in .row { margin-top: 8px; gap: 8px; }
.rate-in input { font-size: 20px; font-weight: 700; padding: 10px 12px; }
.rate-in span.u { font-weight: 600; color: var(--muted); white-space: nowrap; }
.ex { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ex td { padding: 9px 4px; border-bottom: 1px solid var(--line-2); }
.ex td:last-child { text-align: right; font-weight: 700; white-space: nowrap; }
.ex .old { color: var(--muted); text-decoration: line-through; font-weight: 500; margin-right: 6px; }

.hours-ed { display: flex; flex-direction: column; gap: 8px; }
.hrow { display: grid; grid-template-columns: 100px auto 1fr 1fr; gap: 10px; align-items: center; }
.hrow b { font-size: 14px; }
.hrow.off .input { opacity: .4; pointer-events: none; }

/* formulaire bijou */
.pform { display: grid; grid-template-columns: 1fr 280px; gap: 22px; padding: 24px; }
.pform h2 { font-family: var(--serif); font-size: 28px; font-weight: 600; }
.photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.photos .slot { aspect-ratio: 1; border-radius: 12px; overflow: hidden; position: relative; background: var(--line-2); }
.photos .slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photos .slot .x { position: absolute; top: 5px; right: 5px; width: 26px; height: 26px; border-radius: 50%; border: none; background: rgba(0,0,0,.65); color: #fff; cursor: pointer; font-size: 15px; line-height: 1; }
.photos .slot .main-b { position: absolute; left: 5px; bottom: 5px; font-size: 10.5px; font-weight: 700; background: rgba(255,255,255,.92); border-radius: 6px; padding: 2px 6px; border: none; cursor: pointer; }
.photos .add { border: 2px dashed #d6ccb8; background: #fcfaf6; display: grid; place-items: center; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 12.5px; text-align: center; padding: 8px; transition: border-color .15s, background .15s; }
.photos .add:hover, .photos .add.drag { border-color: var(--gold); background: var(--gold-soft); color: #7d5a14; }
.photos .add b { display: block; font-size: 24px; line-height: 1; margin-bottom: 4px; }
.preview { position: sticky; top: 0; display: flex; flex-direction: column; gap: 10px; }
.preview .pc { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.preview .pc .im { aspect-ratio: 1; } .preview .pc .im svg, .preview .pc .im img { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview .pc .in { padding: 12px 14px 14px; }
.bd { border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.bd div { display: flex; justify-content: space-between; padding: 2px 0; }
.bd .t { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; font-weight: 700; color: var(--emerald); font-size: 15px; }
.form-foot { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 4px; }

.usage { height: 10px; border-radius: 999px; background: var(--line-2); overflow: hidden; margin: 8px 0 6px; }
.usage i { display: block; height: 100%; background: linear-gradient(90deg, var(--emerald-2), var(--gold-2)); border-radius: 999px; }


.bar .btn { margin-left: 0; }
.who { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; color: #cfc8b8; min-width: 0; }
.who .who-mail { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.who .tag { background: #2a261f; color: #e9e2d0; }
.who .tag-gold { background: var(--gold); color: #fff; }
body.logged-out .bar .btn, body.logged-out .tabs { display: none; }
.login { min-height: calc(100vh - 160px); display: grid; place-items: center; padding: 20px 0; }
.login-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 32px 28px; width: 100%; max-width: 420px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; }
.login-card h1 { font-family: var(--serif); font-size: 32px; font-weight: 600; }
.login-card p.muted { font-size: 14px; margin: 0; }
.mrow { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.mrow:last-child { border-bottom: none; }
.mrow .av { width: 38px; height: 38px; border-radius: 50%; background: var(--emerald-soft); color: var(--emerald); display: grid; place-items: center; font-weight: 700; flex: none; }
.mrow .grow { flex: 1; min-width: 0; }
.mrow .grow b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow .grow span { font-size: 12.5px; color: var(--muted); }
@media (max-width: 760px) { .who .who-mail { display: none; } }
@media (max-width: 760px) { .hide-sm { display: none; } }
@media (max-width: 900px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .prow { grid-template-columns: 56px 1fr auto; gap: 10px 12px; }
  .prow .ph { width: 56px; height: 56px; }
  .prow .c.w, .prow .c.t { display: none; }
  .prow .price { grid-column: 2; }
  .prow .acts { grid-column: 3; grid-row: 1 / span 2; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
  .prow .sw { display: none; }
  .cols, .two { grid-template-columns: 1fr; }
  .pform { grid-template-columns: 1fr; padding: 18px; }
  .preview { position: static; order: -1; display: grid; grid-template-columns: 110px 1fr; align-items: start; }
  .preview .pc .in { display: none; }
}
@media (max-width: 560px) {
  main { padding: 18px 14px 80px; }
  .bar-in, .tabs { padding-left: 14px; padding-right: 14px; }
  .bar .btn span { display: none; }
  .head h1 { font-size: 28px; }
  .three { grid-template-columns: 1fr; }
  .panel { padding: 16px; }
  .hrow { grid-template-columns: 1fr auto; }
  .hrow .input { grid-column: span 1; }
  .hrow b { grid-column: 1; }
  .hrow .switch { grid-column: 2; grid-row: 1; }
  .photos { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .toolbar select.input { flex: 1 1 100%; }
}

/* --- SaaS --- */
.bar .btn.go { margin-left: 0; }
.banner { border-radius: 14px; padding: 12px 16px; font-size: 14px; margin-bottom: 18px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.banner b { font-weight: 700; }
.banner .btn { margin-left: auto; }
.banner.trial { background: #e4ecf8; color: #1f437a; }
.banner.soon { background: var(--gold-soft); color: #5d4410; }
.banner.expired, .banner.suspended { background: var(--red-soft); color: #7a2a1c; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.kpi small { color: var(--muted); font-size: 12.5px; font-weight: 600; display: block; }
.kpi b { display: block; font-size: 26px; letter-spacing: -.02em; margin-top: 4px; line-height: 1.1; }
.kpi span { font-size: 12.5px; color: var(--muted); }
.kpi.hl { background: linear-gradient(150deg, #0f4d3c, #1d6b55); border-color: #0f4d3c; color: #fff; }
.kpi.hl small, .kpi.hl span { color: #cfe3da; }
.kpi.warn b { color: var(--red); }
.tbl-wrap { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 760px; }
.tbl th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--line); background: #fcfaf6; white-space: nowrap; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: #fdfbf7; }
.tbl .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl .sub { display: block; font-size: 12.5px; color: var(--muted); }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 170px; padding-top: 8px; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.bars .b i { display: block; width: 100%; max-width: 46px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, var(--gold-2), var(--gold)); min-height: 3px; }
.bars .b small { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.bars .b em { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.chips2 { display: flex; gap: 6px; flex-wrap: wrap; }
.chips2 button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 13px; font-weight: 600; font-size: 13px; cursor: pointer; color: var(--ink-2); }
.chips2 button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; font-size: 14px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.plan-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.plan-card { border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: #fff; }
.plan-card.cur { border: 2px solid var(--gold); background: #fffaf0; }
.plan-card b { font-size: 16px; }
.plan-card .p { font-family: var(--serif); font-size: 30px; font-weight: 700; margin: 4px 0; }
.plan-card .p small { font-family: var(--sans); font-size: 13px; color: var(--muted); font-weight: 600; }
@media (max-width: 900px) { .kpis, .plan-cards { grid-template-columns: 1fr 1fr; } .kv { grid-template-columns: 1fr; gap: 2px 0; } .kv dd { margin-bottom: 8px; } }
@media (max-width: 480px) { .kpis { gap: 8px; } .kpi { padding: 12px; } .kpi b { font-size: 21px; } .plan-cards { grid-template-columns: 1fr; } }
