/* =====================================================
   KEL'ONGLES Studio — Prestations & Photos
   ===================================================== */

/* ---- Menu de prestations (Réglages) ---- */
.sv-list { display: flex; flex-direction: column; gap: .5rem; margin: .5rem 0 .2rem; }
.sv-row {
  display: flex; align-items: center; gap: .8rem;
  background: var(--ivory); border: 1px solid var(--line);
  border-radius: 11px; padding: .55rem .8rem;
}
.sv-row.off { opacity: .55; }
.sv-main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.sv-main b { font-size: .95rem; color: var(--charcoal); }
.sv-main span { font-size: .84rem; color: var(--gold-deep); font-weight: 600; }
.sv-btns { display: flex; gap: .35rem; flex: none; }

/* ---- Galerie photos (fiche cliente) ---- */
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: .6rem; }
.ph { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--ivory); }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.ph-lbl {
  position: absolute; left: .4rem; bottom: .4rem;
  background: rgba(43, 37, 33, .72); color: #fff;
  font-size: .66rem; font-weight: 600; letter-spacing: .02em;
  padding: .13rem .5rem; border-radius: 20px;
}
.ph-del {
  position: absolute; top: .35rem; right: .35rem;
  width: 26px; height: 26px; border: none; border-radius: 50%;
  background: rgba(43, 37, 33, .58); display: grid; place-items: center; cursor: pointer;
}
.ph-del svg { width: 14px; height: 14px; stroke: #fff; }
.ph-del:hover { background: var(--alert, #c56a5c); }

/* Aperçu dans la modale */
.ph-prev { margin-bottom: 1rem; }
.ph-prev img { width: 100%; max-height: 300px; object-fit: cover; border-radius: 12px; display: block; }
.ph-full { max-width: 520px; }
.ph-full img { width: 100%; border-radius: 12px; display: block; }
.ph-note { text-align: center; margin-top: .6rem; font-style: italic; }

/* Lien "Ajouter" avec icône dans l'en-tête de carte */
.card-h a svg { width: 15px; height: 15px; vertical-align: -2px; margin-right: .1rem; }

/* ---- Demandes de cartes cadeaux (suivi) ---- */
.hbadge { display: inline-block; font-size: .62rem; font-weight: 700; background: var(--rose-deep); color: #fff; padding: .12rem .55rem; border-radius: 20px; vertical-align: .18em; margin-left: .45rem; }
.req-card .card-b { display: flex; flex-direction: column; gap: .9rem; }
.req { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1.05rem; display: flex; flex-direction: column; gap: .5rem; }
.req-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.req-date { font-size: .78rem; color: var(--text-muted); }
.req-main { font-size: 1rem; color: var(--charcoal); }
.req-main b { color: var(--charcoal); }
.req-msg { font-family: var(--font-serif); font-style: italic; color: var(--rose-deep); font-size: .98rem; }
.req-contact { display: flex; align-items: center; gap: .45rem; font-size: .86rem; color: var(--charcoal-soft); }
.req-contact svg { width: 15px; height: 15px; flex: none; stroke: var(--gold-deep); }
.req-flow { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; font-size: .72rem; margin-top: .1rem; }
.req-flow .rf { padding: .15rem .55rem; border-radius: 20px; background: var(--ivory); border: 1px solid var(--line); color: var(--text-muted); }
.req-flow .rf.on { background: linear-gradient(135deg, var(--gold-light), var(--gold-deep)); color: var(--ivory); border-color: transparent; font-weight: 600; }
.req-flow i { color: var(--text-muted); font-style: normal; }
.req-act { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .25rem; }

/* ---- Variantes de badge + onglets vides (Cartes cadeaux) ---- */
.hbadge.warn { background: var(--gold-deep); }
.hbadge.ok { background: #5f9d76; }
.empty-tab { text-align: center; padding: 2.6rem 1.4rem; color: var(--text-muted); }
.empty-tab svg { width: 30px; height: 30px; stroke: var(--gold-deep); fill: none; opacity: .75; }
.empty-tab p { font-size: 1.05rem; color: var(--charcoal-soft); font-weight: 600; margin: .55rem 0 .25rem; }
.empty-tab span { font-size: .86rem; display: block; max-width: 30rem; margin: 0 auto; line-height: 1.5; }

/* ---- Fidélité : code de carte ---- */
.fidcode { display: inline-flex; align-self: flex-start; width: fit-content; align-items: center; gap: .3rem; font-size: .74rem; font-weight: 700; letter-spacing: .06em; color: var(--gold-deep); background: var(--ivory); border: 1px solid var(--line); border-radius: 20px; padding: .12rem .55rem; margin: .25rem 0; }
.fidcode svg { width: 12px; height: 12px; fill: var(--gold-deep); stroke: none; }
.fidcode.none { color: var(--text-muted); background: transparent; border-style: dashed; font-weight: 600; letter-spacing: normal; }
.hint-box .rdy { color: var(--gold-deep); }

/* ---- Tableau de bord enrichi ---- */
.hello-tag { font-size: .76rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-deep); background: var(--ivory); border: 1px solid var(--line); border-radius: 20px; padding: .35rem .9rem; align-self: center; }
.k-trend .trend { font-weight: 700; }
.k-trend .trend.up { color: #4e9c6e; }
.k-trend .trend.down { color: var(--alert, #c56a5c); }
.cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-top: 1.2rem; }
@media (max-width: 1080px) { .cols3 { grid-template-columns: 1fr; } }
.top-cli { display: flex; align-items: center; gap: .7rem; padding: .55rem .15rem; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.top-cli:last-child { border-bottom: none; }
.top-cli .rk { font-size: 1.15rem; width: 1.5rem; text-align: center; flex: none; }
.top-cli .tc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top-cli .tc-main b { color: var(--charcoal); }
.top-cli .tc-main small { color: var(--text-muted); font-size: .78rem; }
.top-cli .tc-tot { color: var(--gold-deep); font-weight: 700; flex: none; }
.top-cli:hover .tc-main b { color: var(--gold-deep); }
.loyal-row { display: flex; align-items: center; gap: .6rem; padding: .42rem 0; }
.loyal-row b { flex: none; min-width: 6.5rem; max-width: 6.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--charcoal); font-size: .9rem; }
.loyal-row .loyal-bar { flex: 1; }
.loyal-row span { flex: none; font-size: .82rem; color: var(--text-muted); font-weight: 600; }
.fid-alert { background: linear-gradient(135deg, rgba(227,200,140,.28), rgba(166,129,63,.12)); border: 1px solid var(--gold-light); border-radius: 11px; padding: .55rem .8rem; font-size: .88rem; color: var(--charcoal-soft); margin-bottom: .7rem; }
.fid-alert b { color: var(--gold-deep); }
.muted.small { font-size: .82rem; margin-bottom: .6rem; }

/* ===== Lot 1 — Relation cliente & relances ===== */
/* Encadré récap auto de la fiche + alerte contre-indication */
.recap-fiche { margin: 0 0 1.2rem; display: flex; flex-direction: column; gap: .6rem; }
.alert-allergy { display: flex; align-items: flex-start; gap: .6rem; background: #fff2ee; border: 1px solid #f0c3b4; border-left: 4px solid #d0755f; border-radius: 12px; padding: .7rem .9rem; color: #9c4f3d; }
.alert-allergy svg { width: 18px; height: 18px; flex: none; stroke: #d0755f; fill: none; margin-top: .1rem; }
.alert-allergy > div { display: flex; flex-direction: column; gap: .1rem; }
.alert-allergy b { color: #9c4f3d; }
.alert-allergy span { font-size: .86rem; }
.recap-lines { display: flex; flex-wrap: wrap; gap: .5rem .9rem; background: #fbf5ea; border: 1px solid #f0e4cf; border-radius: 12px; padding: .7rem .95rem; }
.recap-lines span { display: inline-flex; align-items: center; gap: .35rem; font-size: .88rem; color: var(--charcoal-soft); }
.recap-lines svg { width: 15px; height: 15px; stroke: var(--gold-deep); fill: none; flex: none; }
.recap-lines b { color: var(--charcoal); }
.recap-lines .due { color: #a15b48; font-weight: 600; }
.recap-lines .due svg { stroke: #c56a5c; }

/* Carte « Contacter » (deep-links) */
.comm-card .comm-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.comm-sel { flex: 1; min-width: 9rem; font-family: inherit; font-size: .9rem; color: var(--charcoal); background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: .5rem .7rem; }
.comm-hint { margin-top: .55rem; font-size: .8rem; }
.comm-foot { margin-top: .7rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.btn.wa { background: #25d366; color: #fff; }
.btn.wa:hover { filter: brightness(1.04); }
.avis-print { display: inline-flex; margin: -.2rem 0 .3rem; }
.ps-actions { display: flex; flex-direction: column; gap: .5rem; margin: .8rem 0; }
.ps-actions .btn { justify-content: center; }

/* ===== Lot 2 — Compta (Caisse & CA) ===== */
.z-card .card-h { display: flex; justify-content: space-between; align-items: center; }
.z-total { color: var(--gold-deep); font-family: var(--font-display, serif); font-size: 1.25rem; }
.z-row { display: flex; justify-content: space-between; padding: .35rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; color: var(--charcoal-soft); }
.z-row:last-of-type { border-bottom: none; }
.z-row b { color: var(--charcoal); }
.z-count { margin-top: .5rem; font-size: .82rem; color: var(--text-muted); }
.amount.neg { color: #a15b48; }
.row.cancelled { opacity: .58; }
.row.cancelled .amount { text-decoration: line-through; }
.gauge { margin-bottom: 1rem; }
.gauge-h { display: flex; justify-content: space-between; gap: .5rem; font-size: .88rem; margin-bottom: .35rem; }
.gauge-h span { color: var(--charcoal-soft); }
.gauge-h b { color: var(--gold-deep); font-variant-numeric: tabular-nums; white-space: nowrap; }
.gauge-h b.over { color: #c56a5c; }
.gauge-bar { height: 12px; background: #efe3d2; border-radius: 20px; overflow: hidden; }
.gauge-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-light), var(--gold-deep)); border-radius: 20px; }
.gauge-bar i.hot { background: linear-gradient(90deg, #e0a15b, #c56a5c); }
.bilan-row { display: flex; justify-content: space-between; padding: .45rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; color: var(--charcoal-soft); }
.bilan-row:last-child { border-bottom: none; }
.bilan-row b { color: var(--charcoal); font-variant-numeric: tabular-nums; }
.bilan-row b.neg { color: #a15b48; }
.bilan-row.total { border-top: 2px solid var(--gold); border-bottom: none; margin-top: .2rem; padding-top: .6rem; font-weight: 600; }
.bilan-row.total b { color: var(--gold-deep); font-size: 1.1rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--paper, #fff); }
.ledger { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 560px; }
.ledger th, .ledger td { padding: .55rem .8rem; text-align: left; border-bottom: 1px solid var(--line); }
.ledger th { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-deep); background: #faf4ea; }
.ledger td.r, .ledger th.r { text-align: right; font-variant-numeric: tabular-nums; }
.ledger tr.cx td { color: var(--text-muted); text-decoration: line-through; }
.ledger tfoot td { font-weight: 700; border-top: 2px solid var(--gold); border-bottom: none; color: var(--charcoal); }
.ledger tfoot td.r { color: var(--gold-deep); }

/* ===== Lot 3 — Spécial ongles ===== */
/* Paliers & badges */
.badges { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.1rem; }
.tier { display: inline-flex; align-items: center; gap: .25rem; font-size: .72rem; font-weight: 700; padding: .2rem .6rem; border-radius: 20px; white-space: nowrap; }
.tier-nouvelle { background: #ece4d6; color: #8b7e71; }
.tier-habituee { background: #f4e3d6; color: #a5665a; }
.tier-fidele { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: #5a441c; }
.tier-vip { background: linear-gradient(135deg, #3a2f28, #6b5647); color: #f0d9a8; }
.badge { display: inline-flex; align-items: center; font-size: .72rem; font-weight: 600; padding: .2rem .6rem; border-radius: 20px; background: var(--ivory); border: 1px solid var(--line); color: var(--charcoal-soft); }
.row-side .tier { flex: none; }

/* Historique enrichi */
.hrow-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.hrow-main small { color: var(--text-muted); font-size: .78rem; }
.hrow-date { flex: none; font-size: .82rem; color: var(--text-muted); min-width: 5.4rem; }
.hrow.cancelled { opacity: .55; }
.hrow.cancelled b { text-decoration: line-through; }
.card-h-acts { display: inline-flex; gap: .9rem; }

/* Forfait prépayé */
.forfait-card .card-h { display: flex; justify-content: space-between; align-items: center; }
.forfait-card .left-ok { color: var(--gold-deep); }
.forfait-card .loyal-bar { margin-bottom: .7rem; }

/* Détails de pose (encaissement) */
.pose-det { border: 1px solid var(--line); border-radius: 11px; padding: .1rem .8rem; margin-bottom: .2rem; }
.pose-det summary { cursor: pointer; font-size: .88rem; font-weight: 600; color: var(--gold-deep); padding: .5rem 0; list-style: revert; }
.pose-det-b { margin: .2rem 0 .5rem; }

/* Comparateur avant / après (slider) */
.cmp-selects { display: flex; gap: .8rem; }
.cmp-selects .fld { flex: 1; }
.compare { position: relative; width: 100%; aspect-ratio: 4/3; border-radius: 12px; overflow: hidden; margin: .8rem 0 .5rem; background: #000; user-select: none; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cmp-before { will-change: clip-path; }
.cmp-divider { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: var(--white); transform: translateX(-1px); pointer-events: none; }
.cmp-divider span { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 30px; height: 30px; border-radius: 50%; background: var(--white); box-shadow: 0 2px 8px rgba(0,0,0,.45); }
.cmp-tag { position: absolute; top: .5rem; font-size: .64rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: rgba(0,0,0,.5); padding: .15rem .5rem; border-radius: 20px; }
.cmp-tagA { left: .5rem; } .cmp-tagB { right: .5rem; }
.cmp-slider { width: 100%; accent-color: var(--gold-deep); }

/* ===== Lot 4 (gratuit) — Notifications & sauvegarde ===== */
hr.soft { border: none; border-top: 1px solid var(--line); margin: 1rem 0; }
.bk-list { display: flex; flex-direction: column; gap: .4rem; }
.bk-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; background: var(--ivory); border: 1px solid var(--line); border-radius: 10px; padding: .45rem .8rem; font-size: .9rem; }
.bk-row span { color: var(--charcoal-soft); }
.bk-row a { color: var(--gold-deep); font-weight: 600; }

/* ===== Lot 5 — catalogue récompenses + lookbook ===== */
.rewards-menu { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: -.3rem 0 1rem; font-size: .88rem; color: var(--charcoal-soft); }
.reward-chip { display: inline-flex; font-size: .78rem; font-weight: 600; padding: .18rem .6rem; border-radius: 20px; background: var(--ivory); border: 1px solid var(--line); color: var(--gold-deep); }
.look-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.card-h a svg[data-i] { }
