/* Le Pacha — Styles PWA (mobile-first, couleurs : noir / rouge / blanc) */
:root {
  --noir: #111111;
  --rouge: #e63946;
  --rouge-fonce: #c1121f;
  --blanc: #ffffff;
  --gris: #f4f4f4;
  --gris-bord: #e0e0e0;
  --texte: #222222;
  --texte-doux: #666666;
  --vert: #2a9d48;
  --radius: 10px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--gris);
  color: var(--texte);
  -webkit-text-size-adjust: 100%;
}
.topbar {
  background: var(--noir);
  color: var(--blanc);
  padding: 14px 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar .logo { color: var(--rouge); font-weight: 800; font-size: 22px; letter-spacing: 1px; }
.topbar .soustitre { font-size: 12px; color: #ccc; margin-top: 2px; }
.topbar .actions { float: right; }
.wrap { max-width: 560px; margin: 0 auto; padding: 16px; }
.wrap.large { max-width: 1024px; }
.carte {
  background: var(--blanc);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.carte h2, .carte h3 { margin-top: 0; }
/* Section mise en avant (ex : « Déjà membre ? ») */
.carte.mise-en-avant {
  border: 2px solid var(--rouge);
  background: #fff8f8;
  box-shadow: 0 2px 10px rgba(230,57,70,.15);
}
.carte.mise-en-avant h2 {
  color: var(--rouge-fonce);
  font-size: 22px;
}
.carte.mise-en-avant p { font-size: 15px; }
/* Promos */
#bloc-promos {
  border: 2px solid var(--rouge);
  background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
  position: relative;
  overflow: hidden;
}
#bloc-promos h2 {
  color: var(--rouge-fonce);
  font-size: 22px;
  animation: promo-pulse 2s ease-in-out infinite;
}
#bloc-promos::before {
  content: '❗';
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 32px;
  animation: promo-bounce 1.5s ease-in-out infinite;
}
@keyframes promo-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}
@keyframes promo-bounce {
  0%, 100% { transform: translateY(0) rotate(-10deg); }
  50% { transform: translateY(-8px) rotate(10deg); }
}
.promo {
  border: 2px solid var(--rouge);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(230,57,70,.2);
  position: relative;
  animation: promo-appear .5s ease-out;
}
.promo:last-child { margin-bottom: 0; }
.promo h3 {
  margin: 0 0 6px;
  color: var(--rouge-fonce);
  font-size: 19px;
  font-weight: 800;
}
.promo h3::before { content: '🔥 '; }
.promo p { margin: 6px 0; font-size: 15px; }
.promo .dates {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--rouge);
  padding: 4px 12px;
  border-radius: 999px;
  margin-top: 6px;
}
.promo img { width: 100%; border-radius: 8px; margin-bottom: 8px; }
@keyframes promo-appear {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
h1 { font-size: 24px; }
h2 { font-size: 19px; }
.muted { color: var(--texte-doux); font-size: 13px; }
label { display: block; font-weight: 600; margin: 12px 0 4px; font-size: 14px; }
input, select, textarea {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border: 1px solid var(--gris-bord);
  border-radius: 8px;
  background: #fff;
}
input:focus, select:focus { outline: 2px solid var(--rouge); border-color: var(--rouge); }
.btn {
  display: inline-block;
  background: var(--rouge);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 13px 22px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  margin-top: 14px;
  text-align: center;
  text-decoration: none;
}
.btn:hover { background: var(--rouge-fonce); }
.btn.secondaire { background: var(--noir); }
.btn.fantome { background: #fff; color: var(--noir); border: 1px solid var(--gris-bord); }
.btn.petit { width: auto; padding: 8px 14px; font-size: 14px; margin-top: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.alerte { border-radius: 8px; padding: 12px; margin: 12px 0; font-size: 14px; }
.alerte.erreur { background: #fde8e8; color: #a10f0f; border: 1px solid #f5c2c2; }
.alerte.succes { background: #e6f6ea; color: #1c6b32; border: 1px solid #bfe6c9; }
.alerte.info { background: #e8f0fe; color: #1a3fa0; border: 1px solid #c2d4f5; }
/* Carte de fidélité */
.carte-membre {
  background: linear-gradient(135deg, #111 60%, #2a2a2a);
  color: #fff;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
}
.carte-membre .qr { background: #fff; display: inline-block; padding: 10px; border-radius: 8px; }
.carte-membre .qr img { width: 200px; height: 200px; display: block; }
.progression { background: #333; border-radius: 999px; height: 14px; margin: 12px 0 4px; overflow: hidden; }
.progression > div { background: var(--rouge); height: 100%; border-radius: 999px; transition: width .4s; }
.tampons-liste { font-size: 26px; letter-spacing: 4px; margin: 8px 0; }
/* Commande */
.grille-commande { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-commande {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 8px; border-radius: 10px; font-weight: 700; text-decoration: none;
  color: #fff; font-size: 15px;
}
.btn-commande.uber { background: #06c167; }
.btn-commande.doordash { background: #eb1700; }
.resto-bloc { margin-bottom: 6px; }
.resto-bloc h3 { margin: 14px 0 8px; font-size: 16px; }
/* Staff */
.scan-zone { position: relative; }
#video { width: 100%; border-radius: 10px; background: #000; }
.clavier-nip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.clavier-nip button { font-size: 24px; padding: 16px; border-radius: 10px; border: 1px solid var(--gris-bord); background: #fff; cursor: pointer; }
.nip-affiche { font-size: 32px; letter-spacing: 12px; text-align: center; margin: 10px 0; min-height: 44px; }
/* Admin */
.onglets { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 14px; position: sticky; top: 57px; background: var(--gris); padding: 8px 0; z-index: 5; }
.onglets button { white-space: nowrap; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--gris-bord); background: #fff; cursor: pointer; font-size: 14px; }
.onglets button.actif { background: var(--noir); color: #fff; border-color: var(--noir); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--gris-bord); }
th { font-size: 12px; text-transform: uppercase; color: var(--texte-doux); }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { background: #fff; border-radius: 10px; padding: 14px; }
.stat .valeur { font-size: 26px; font-weight: 800; }
.stat .etiquette { font-size: 12px; color: var(--texte-doux); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge.issued { background: #e8f0fe; color: #1a3fa0; }
.badge.redeemed { background: #e6f6ea; color: #1c6b32; }
.badge.expired, .badge.revoked { background: #fde8e8; color: #a10f0f; }
.pastille { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: #ddd; margin-right: 2px; }
.pastille.pleine { background: var(--rouge); }
.pied { text-align: center; color: var(--texte-doux); font-size: 12px; padding: 24px 16px; }
@media (min-width: 700px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
}
/* Guide d'installation PWA */
.modale { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex;
  align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.modale-contenu { background: #fff; border-radius: 14px; padding: 24px; max-width: 420px;
  width: 100%; box-shadow: 0 10px 40px rgba(0,0,0,.3); }
.modale-contenu h2 { margin-top: 0; }
.modale-contenu ol { padding-left: 22px; }
.modale-contenu li { margin-bottom: 8px; }
