/* ====== Tableau de bord (créateur + super admin) : complète admin.css ====== */
.a-header nav { display: flex; gap: 4px; flex-wrap: wrap; }
.a-header nav a { color: #fff; text-decoration: none; font-weight: 500; font-size: .92rem; padding: 7px 14px; border-radius: 999px; }
@media (hover: hover) { .a-header nav a.on, .a-header nav a:hover { background: rgba(255, 255, 255, .16); } }
.a-header .brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: #fbeef2; color: var(--burgundy); white-space: nowrap; }
.pill.gold { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: var(--burgundy-dark); }
.pill.green { background: #e3f4ea; color: #24734a; }
.pill.grey { background: #f1eaec; color: #7a5a64; }
.pill.red { background: #fde3e7; color: #b3203d; }
.a-header .pill { background: rgba(255, 255, 255, .18); color: #fff; }
.a-header .pill.gold { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: var(--burgundy-dark); }

.page-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 6px 0 18px; }
.page-title h2 { font: 400 2.4rem var(--font-title); color: var(--burgundy); margin: 0; }
.muted { color: #8a5a68; font-size: .9rem; }
.stack { display: grid; gap: 14px; }

/* Cartes calendriers */
.cals { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.cal-card { background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 4px 14px rgba(120, 10, 40, .1); display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
@media (hover: hover) { .cal-card:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(120, 10, 40, .18); } }
.cal-card .top { padding: 18px; background: linear-gradient(135deg, var(--burgundy), var(--wine)); color: #fff; position: relative; min-height: 96px; }
.cal-card .top h3 { font: 400 1.9rem var(--font-title); margin: 0; line-height: 1.1; }
.cal-card .top .pill { position: absolute; top: 12px; right: 12px; }
.cal-card .body { padding: 14px 18px; display: grid; gap: 8px; font-size: .88rem; }
.bar { height: 8px; border-radius: 8px; background: #f6dde5; overflow: hidden; }
.bar > div { height: 100%; background: linear-gradient(90deg, var(--wine), var(--gold)); }
.cal-new { display: grid; place-items: center; text-align: center; min-height: 190px; border: 2px dashed #e7b3c3; background: rgba(255, 255, 255, .6); border-radius: 18px; cursor: pointer; color: var(--burgundy); font-weight: 600; font-family: var(--font-ui); font-size: 1rem; }
@media (hover: hover) { .cal-new:hover { background: #fff; } }

/* Statistiques */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: #fff; border-radius: 16px; padding: 14px 16px; box-shadow: 0 4px 14px rgba(120, 10, 40, .08); }
.stat .v { font: 700 1.7rem var(--font-num); color: var(--burgundy); }
.stat .l { font-size: .8rem; color: #8a5a68; }
.stat.alert { box-shadow: 0 0 0 2px var(--gold), 0 4px 14px rgba(120, 10, 40, .08); }

/* Tableaux */
.table-wrap { overflow-x: auto; background: #fff; border-radius: 16px; box-shadow: 0 4px 14px rgba(120, 10, 40, .08); }
table.list { width: 100%; border-collapse: collapse; min-width: 640px; }
table.list th, table.list td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #f6e1e8; font-size: .88rem; vertical-align: middle; }
table.list th { background: #fbeef2; color: var(--burgundy-dark); font-weight: 600; position: sticky; top: 0; }
table.list tr.click { cursor: pointer; }
@media (hover: hover) { table.list tr.click:hover td { background: #fff7f9; } }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar input, .toolbar select { max-width: 320px; }

/* Destinataires */
.rec { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; background: #fff; border-radius: 14px; padding: 12px 14px; box-shadow: 0 2px 10px rgba(120, 10, 40, .08); }
.rec .ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #fbeef2; font-size: 1.3rem; }
.rec .info b { display: block; }
.rec .link { font-size: .8rem; color: #8a5a68; word-break: break-all; }
.rec .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.rec.off { opacity: .55; }

/* Modale */
.modal-bg { position: fixed; inset: 0; z-index: 200; background: rgba(40, 4, 16, .5); display: grid; place-items: center; padding: 16px; animation: v-fade .2s; }
.modal { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: #fffaf8; border-radius: 22px; padding: 22px; box-shadow: 0 30px 80px rgba(20, 0, 8, .4); }
.modal h3 { margin: 0 0 14px; font: 400 2rem var(--font-title); color: var(--burgundy); }
.modal .acts { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 8px; }
.seg { display: flex; gap: 6px; background: #fbeef2; padding: 4px; border-radius: 999px; margin-bottom: 14px; }
.seg button { flex: 1; border: none; background: none; padding: 8px; border-radius: 999px; font: 600 .88rem var(--font-ui); color: var(--burgundy); cursor: pointer; }
.seg button.on { background: #fff; box-shadow: 0 2px 6px rgba(120, 10, 40, .12); }

/* Premium */
.premium-hero { background: linear-gradient(135deg, var(--burgundy-dark), var(--wine)); color: #fff; border-radius: 22px; padding: 26px; display: grid; gap: 10px; margin-bottom: 18px; }
.premium-hero h3 { font: 400 2.4rem var(--font-title); margin: 0; }
.premium-hero .price { font: 700 2.2rem var(--font-num); color: var(--gold-light); }
.premium-hero ul { margin: 0; padding-left: 20px; line-height: 1.8; }
.lock-banner { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: linear-gradient(90deg, #fff4d6, #fde6b0); border: 1px solid var(--gold); color: var(--burgundy-dark); border-radius: 14px; padding: 12px 16px; margin-bottom: 16px; font-size: .9rem; }
.choice .c .pm { position: absolute; top: 8px; right: 8px; font-size: .65rem; font-weight: 700; background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: var(--burgundy-dark); padding: 2px 7px; border-radius: 999px; font-style: normal; }
.points-big { font: 700 3rem var(--font-num); color: var(--burgundy); line-height: 1; }
.copy { display: flex; gap: 8px; }
.copy input { flex: 1; }
.empty-state { text-align: center; padding: 40px 16px; color: #8a5a68; }
.empty-state b { display: block; font: 400 2rem var(--font-title); color: var(--burgundy); margin-bottom: 4px; }

@media (max-width: 640px) {
  .rec { grid-template-columns: auto 1fr; }
  .rec .acts { grid-column: 1 / -1; justify-content: flex-start; }
  .a-header { padding: 10px 14px; }
}
body.admin { min-height: 100vh; }

/* Choix du thème */
.theme-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.theme-pick .c { text-align: center; padding: 8px; }
.theme-pick .c b { font-size: .82rem; margin-top: 6px; }
.swatch { position: relative; display: flex; gap: 4px; justify-content: center; align-items: flex-end; height: 62px; border-radius: 10px; padding: 0 6px 8px; }
.swatch i { width: 18px; height: 18px; border-radius: 5px; box-shadow: 0 2px 4px rgba(0,0,0,.25), inset 0 0 0 1px rgba(255,255,255,.35); }
.swatch b { position: absolute; top: 4px; right: 6px; font-size: 1rem !important; margin: 0 !important; }

/* ---- Téléphone : en-tête compact, menus défilants ---- */
@media (max-width: 640px) {
  .a-header { position: sticky; gap: 6px; padding: 8px 12px; }
  .a-header h1 { font-size: 1.45rem; }
  .a-header .actions { gap: 6px; }
  .a-header nav { order: 3; width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin: 0 -4px; }
  .a-header nav::-webkit-scrollbar { display: none; }
  .a-header nav a { white-space: nowrap; padding: 6px 12px; font-size: .85rem; }
  .a-header nav a.on { background: rgba(255, 255, 255, .2); }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 16px; padding: 2px 16px; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { white-space: nowrap; flex: none; }
  .drawer .d-head h2 { font-size: 1.5rem; line-height: 1.15; }
  .drawer .d-foot { padding: 10px 12px; }
  .drawer .d-foot .btn { flex: 1; justify-content: center; }
  .drawer .d-foot #apply-all { flex-basis: 100%; }
  .page-title h2 { font-size: 2rem; }
  .page-title .actions { width: 100%; }
  .page-title .actions .btn { flex: 1; justify-content: center; }
  .premium-hero { padding: 20px; }
  .premium-hero h3 { font-size: 2rem; }
}
@media (max-width: 640px) {
  .page-title .actions { flex-direction: column; }
  .page-title .actions .btn, .drawer .d-foot .btn { white-space: nowrap; }
}
