/* ETPOS-PROMO — style commun des pages commerçant (refonte 2026-07-23).
   Palette BRL (design system) — jamais d'orange comme accent décoratif. */
:root {
  --primary: #005B94;
  --primary-deep: #003263;
  --accent: #2B92CE;
  --ink: #14082E;
  --success: #10B981;
  --error: #DC2626;
  --bg: #F7F8FA;
  --card: #FFFFFF;
  --border: #E2E5EA;
  --muted: #6B7280;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}
header { background: var(--primary-deep); color: #fff; padding: 0.9rem 1.2rem; }
header h1 { margin: 0; font-size: 1.15rem; }
nav { background: var(--primary); display: flex; flex-wrap: wrap; }
nav a {
  color: #fff;
  text-decoration: none;
  padding: 0.7rem 1rem;
  font-size: 0.95rem;
  min-height: 44px;              /* cible tactile : le commerçant est au téléphone */
  display: flex;
  align-items: center;
}
nav a:hover { background: var(--primary-deep); }
nav a[aria-current="page"] { background: var(--primary-deep); font-weight: 600; }
nav .deconnexion { margin-left: auto; opacity: 0.85; }
main { max-width: 760px; margin: 0 auto; padding: 1.2rem; }
section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.1rem 1.3rem;
  margin-bottom: 1.2rem;
}
section h2 { margin-top: 0; color: var(--primary-deep); font-size: 1.05rem; }
.tableau-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; margin-top: 0.5rem; }
th, td { text-align: left; padding: 0.5rem; border-bottom: 1px solid var(--border); }
label { display: block; font-size: 0.88rem; color: var(--muted); margin-bottom: 0.2rem; }
textarea, input, select {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 1rem;               /* ≥16px : pas de zoom forcé iOS */
  font-family: inherit;
  margin-bottom: 0.75rem;
}
button {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.6rem 1rem;
  cursor: pointer;
  font-size: 0.95rem;
  min-height: 44px;
  margin: 0 0.5rem 0.5rem 0;
}
button:hover:not(:disabled) { background: var(--primary-deep); }
button:disabled { background: #B9C0C9; cursor: not-allowed; }
button.secondaire { background: var(--accent); }
button.secondaire:disabled { background: #B9C0C9; }
button.discret { background: none; color: var(--primary); text-decoration: underline; padding: 0.3rem; min-height: 0; }
.hint { color: var(--muted); font-style: italic; }
.erreur { color: var(--error); font-weight: 600; }
.succes { color: var(--success); font-weight: 600; }
.offenders { color: var(--error); }
.barre { text-decoration: line-through; color: var(--muted); }

/* ---- écran d'envoi : l'assemblage visible en-tête / corps / pied ---- */
.liste-promos { list-style: none; padding: 0; margin: 0 0 0.75rem 0; }
.liste-promos li { padding: 0.35rem 0; border-bottom: 1px solid var(--border); }
.liste-promos li:last-child { border-bottom: none; }
.cadre-sms { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-bottom: 0.5rem; }
.cadre-sms .fixe {
  background: var(--bg);
  color: var(--muted);
  padding: 0.5rem 0.7rem;
  font-size: 0.92rem;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: baseline;
}
.cadre-sms .fixe .texte-fixe { white-space: pre-wrap; }
.cadre-sms .fixe a { color: var(--primary); font-size: 0.8rem; text-decoration: none; flex-shrink: 0; }
.cadre-sms .fixe a:hover { text-decoration: underline; }
.cadre-sms textarea { border: none; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); border-radius: 0; margin: 0; min-height: 7rem; }
.btn-envoyer {
  display: block;
  width: 100%;
  font-size: 1.15rem;
  padding: 0.9rem 1rem;
  min-height: 52px;
  background: var(--success);
}
.btn-envoyer:hover:not(:disabled) { background: var(--success); filter: brightness(0.9); }
.apercu-chiffres { font-size: 1.05rem; margin: 0.5rem 0; }
.apercu-sms {
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  white-space: pre-wrap;
  font-size: 0.95rem;
  margin: 0.5rem 0;
}

/* ---- page Clients : un STOP reste VISIBLE, grisé — jamais caché ---- */
tr.client-stop td { opacity: 0.55; }
tr.client-stop td.cellule-statut { opacity: 1; }
td input[type="checkbox"] { width: 22px; height: 22px; margin: 0; }
.badge-stop {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  background: #FBE9E9;
  color: var(--error);
  font-weight: 600;
  font-size: 0.85rem;
}

/* ---- login ---- */
.carte-login { max-width: 380px; margin: 8vh auto 0 auto; }
.carte-login h1 { color: var(--primary-deep); font-size: 1.2rem; margin-top: 0; }
.carte-login button { width: 100%; font-size: 1.05rem; }

@media (max-width: 480px) {
  main { padding: 0.8rem; }
  section { padding: 0.9rem 1rem; }
  th, td { padding: 0.4rem 0.35rem; font-size: 0.88rem; }
}
