/* =========================
   Pastel UI – Dames de Pique
   Public + Admin
   ========================= */

* { box-sizing: border-box; }
html, body { height: 100%; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:#1f2937;
  background:
    radial-gradient(1200px 500px at 12% 8%, rgba(139,92,246,.14), rgba(255,255,255,0)),
    radial-gradient(900px 420px at 88% 14%, rgba(236,72,153,.12), rgba(255,255,255,0)),
    radial-gradient(900px 420px at 50% 90%, rgba(6,182,212,.10), rgba(255,255,255,0)),
    #f7f5fb;
  line-height:1.55;
}

a{ color:inherit; text-decoration:none; }
a:hover{ text-decoration:underline; }

.wrap{
  max-width:1100px;
  margin:0 auto;
  padding:24px 16px 40px;
}

.brand{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:16px;
}

.title{
  margin:0;
  font-size: clamp(26px, 3vw, 34px);
  letter-spacing:-0.02em;
  color:#312e81;
  font-weight:900;
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  border-radius:999px;
  background: rgba(255,255,255,.72);
  border:1px solid rgba(99,102,241,.18);
  box-shadow: 0 10px 30px rgba(17,24,39,.06);
  color:#4338ca;
  font-weight:800;
  font-size:13px;
  white-space:nowrap;
}

.card{
  background: rgba(255,255,255,.80);
  border: 1px solid rgba(148,163,184,.28);
  box-shadow: 0 18px 50px rgba(17,24,39,.06);
  border-radius:18px;
  padding:18px;
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.card h2{
  margin:0 0 10px;
  font-size:18px;
  font-weight:900;
  color:#312e81;
}

.card p{ margin:10px 0; }
.card small{ color:#6b7280; }

.grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:16px;
}

@media (max-width: 860px){
  .grid{ grid-template-columns: 1fr; }
  .badge{ white-space: normal; }
}

/* ----- Forms ----- */
label{
  display:block;
  font-weight:800;
  color:#374151;
  font-size:13px;
  margin-bottom:6px;
}

input, select, textarea{
  width:100%;
  padding:12px 12px;
  border-radius:12px;
  border:1px solid rgba(148,163,184,.5);
  background: rgba(255,255,255,.85);
  outline:none;
  font-size:15px;
  transition: box-shadow .15s ease, border-color .15s ease;
}

input:focus, select:focus, textarea:focus{
  border-color: rgba(99,102,241,.65);
  box-shadow: 0 0 0 4px rgba(99,102,241,.14);
}

input::placeholder{ color:#9ca3af; }

.form-grid{
  display:grid;
  gap:10px;
}

.menu-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:12px;
}

.filter-note{
  margin-top:10px;
}

/* ----- Buttons ----- */
.btn, button.btn{
  display:inline-flex;
  justify-content:center;
  align-items:center;
  gap:10px;
  width:100%;
  padding:12px 14px;
  border-radius:14px;
  border:0;
  cursor:pointer;
  font-weight:900;
  font-size:15px;
  color:#ffffff;
  background: linear-gradient(135deg,#8b5cf6,#ec4899);
  box-shadow: 0 18px 40px rgba(139,92,246,.18);
  transition: transform .08s ease, filter .15s ease, box-shadow .2s ease;
}

.btn:hover{
  filter: brightness(1.03);
  box-shadow: 0 22px 50px rgba(139,92,246,.22);
}

.btn:active{ transform: translateY(1px); }

.btn-ghost{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  width:100%;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(99,102,241,.25);
  background: rgba(255,255,255,.72);
  color:#4338ca;
  font-weight:900;
  font-size:15px;
  box-shadow: 0 12px 30px rgba(17,24,39,.05);
  transition: transform .08s ease, box-shadow .2s ease, border-color .15s ease;
}

.btn-ghost:hover{
  border-color: rgba(99,102,241,.5);
  box-shadow: 0 16px 40px rgba(17,24,39,.06);
  text-decoration:none;
}

.btn-ghost:active{ transform: translateY(1px); }

/* admin action buttons small */
.btn-mini{
  width:auto;
  padding:10px 12px;
  font-size:14px;
  border-radius:12px;
}

.actions-row{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

/* ----- Total + comm + QR (public) ----- */
.total{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  border-radius:14px;
  margin:12px 0;
  background: rgba(99,102,241,.08);
  border: 1px solid rgba(99,102,241,.14);
}

.total span{ font-weight:800; color:#374151; }
.total strong{ font-weight:900; color:#312e81; font-size:18px; }

.comm{
  display:block;
  text-align:center;
  padding:12px 12px;
  border-radius:14px;
  background: rgba(236,72,153,.08);
  border: 1px dashed rgba(236,72,153,.30);
  font-weight:1000;
  letter-spacing:.8px;
  color:#7c3aed;
  overflow-wrap:anywhere;
}

.qr{
  margin-top:12px;
  display:flex;
  justify-content:center;
  align-items:center;
  padding:14px;
  border-radius:14px;
  background: rgba(6,182,212,.07);
  border: 1px solid rgba(6,182,212,.18);
}

#qrcode img, #qrcode canvas{ border-radius:12px; }

/* ----- Notices ----- */
.notice{
  margin-top:12px;
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(148,163,184,.28);
  background: rgba(255,255,255,.78);
}

.notice.info{
  border-left:6px solid #3b82f6;
  background:#eff6ff;
}

.notice.hint{
  border-left:6px solid #a78bfa;
  background:#f5f3ff;
}

/* ----- Pills (statut) ----- */
.pill{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  font-weight:900;
  font-size:12px;
  border:1px solid rgba(148,163,184,.28);
  background: rgba(255,255,255,.7);
  color:#374151;
}

.pill.pending{
  background: rgba(245,158,11,.12);
  border-color: rgba(245,158,11,.25);
  color:#92400e;
}

.pill.paid{
  background: rgba(34,197,94,.12);
  border-color: rgba(34,197,94,.25);
  color:#166534;
}

.pill.cancel{
  background: rgba(239,68,68,.10);
  border-color: rgba(239,68,68,.20);
  color:#991b1b;
}

/* ----- Table (desktop) ----- */
.table{
  width:100%;
  border-collapse: separate;
  border-spacing:0;
}

.table thead th{
  text-align:left;
  font-size:12px;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:#4b5563;
  padding:12px 10px;
  background: rgba(99,102,241,.08);
  border-bottom: 1px solid rgba(148,163,184,.28);
  white-space: nowrap;
}

.table tbody td{
  padding:12px 10px;
  border-bottom:1px solid rgba(148,163,184,.22);
  vertical-align: top;
}

.table tbody tr:hover td{
  background: rgba(255,255,255,.62);
}

.table small{ color:#6b7280; }

/* =========================
   IMPORTANT : mobile scroll horizontal
   ========================= */
.table-scroll{
  width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling: touch;
  border-radius:18px;
}

/* la table ne se compresse pas, on swipe pour voir */
.table{
  min-width: 980px;
}

/* sur mobile, laisse respirer le scroll */
@media (max-width: 980px){
  .table-scroll{
    margin-left:-16px;
    margin-right:-16px;
    padding-left:16px;
    padding-right:16px;
  }
}

/* ----- Petits utilitaires ----- */
hr{
  border:0;
  border-top:1px solid rgba(148,163,184,.22);
  margin:14px 0;
}

strong{ font-weight:900; }

p, li{ overflow-wrap:anywhere; }

/* =========================
   Checkbox confirmation (mobile-friendly)
   ========================= */
.ack{
  margin-top: 12px;
}

.ack__label{
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(148,163,184,.25);
  cursor: pointer;
}

.ack__check{
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex: 0 0 auto;
}

.ack__text{
  display: block;
  line-height: 1.55;
  font-size: 14px;
  color: #1f2937;
  overflow-wrap: anywhere;
}

/* Mobile: le texte respire + taille lisible */
@media (max-width: 480px){
  .ack__label{ gap: 10px; }
  .ack__text{ font-size: 15px; }
}