/* Gabarit commun du site public zanmiyo.com — mêmes couleurs que l'app
   (apps/mobile/lib/core/theme/app_colors.dart) : fond kraft, cartes crème.
   Le site n'a qu'un thème clair, comme l'app. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --page: #E7DCCB;
  --surface: #FFFDF8;
  --cream: #F7F4EE;
  --ink: #151923;
  --muted: #565E70;
  --line: rgba(21, 25, 35, .10);
  --coral: #E85C3A;
  /* Bouton plein : texte blanc lisible (≥ 4,5:1), même ton que le billet du jour J. */
  --coral-cta: #C4452A;
  --coral-700: #A6371F;
  --coral-50: #FFF0EC;
  --green: #2E7D4F;
  --green-50: #E6F3EC;
  --blue: #3B5BA5;
  --blue-50: #E8EEF8;
  --violet: #6B3FA0;
  --violet-50: #EFEAF7;
  --gold: #8A6431;
  --gold-50: #F7EFE3;
  --danger: #C0492F;
  --radius: 20px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light;
}

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--page);
  color: var(--ink);
  line-height: 1.55;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--coral-700); }
a:hover { color: var(--coral-cta); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 6px; }

/* ---------- Barre du haut ---------- */
.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 20px;
}
.site-nav .brand img { height: 30px; width: auto; }
.site-nav a.nav-link { color: var(--ink); font-size: .9rem; font-weight: 600; text-decoration: none; }
.site-nav a.nav-link:hover { color: var(--coral-700); }

/* ---------- Boutons ---------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 0;
  background: var(--coral-cta);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--coral-700); color: #fff; }
.btn.outline { background: transparent; color: var(--ink); border: 1.5px solid rgba(21, 25, 35, .25); }
.btn.outline:hover { background: rgba(21, 25, 35, .05); color: var(--ink); }
.btn:disabled { opacity: .6; cursor: default; }

/* Boutons des stores : Google Play actif, App Store « bientôt » (pas de lien). */
.stores { display: flex; gap: 10px; flex-wrap: wrap; }
.store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  line-height: 1.15;
  font-weight: 700;
}
.store:hover { color: #fff; background: #000; }
.store small { display: block; font-size: .7rem; font-weight: 500; opacity: .85; }
.store svg { width: 22px; height: 22px; flex: none; fill: currentColor; }
.store.soon { background: transparent; color: var(--muted); border: 1.5px dashed rgba(21, 25, 35, .3); cursor: default; }

/* ---------- Pages simples : un billet centré ---------- */
.simple {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 32px 16px;
}
.simple > .brand img { height: 28px; width: auto; }
.ticket {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(21, 25, 35, .10);
}
.ticket-top {
  background: var(--blue);
  color: #fff;
  padding: 22px 22px 20px;
}
.ticket-top.ok { background: var(--green); }
.ticket-top.err { background: #6B7280; }
.ticket-top.coral { background: var(--coral-cta); }
.ticket-top small {
  display: block;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .9;
}
.ticket-top h1 { font-size: 1.4rem; line-height: 1.2; margin: 6px 0 4px; text-wrap: balance; }
.ticket-top p { font-size: .92rem; opacity: .92; }
/* Perforation : le trait pointillé et les deux demi-cercles découpés dans la carte. */
.perf { position: relative; height: 0; border-top: 2px dashed rgba(21, 25, 35, .18); margin: 0 18px; }
.perf::before, .perf::after {
  content: "";
  position: absolute;
  top: -11px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--page);
}
.perf::before { left: -28px; }
.perf::after { right: -28px; }
.ticket-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 12px; }
.ticket-body p { color: var(--muted); font-size: .95rem; }
.ticket-body .hint { font-size: .85rem; text-align: center; }
.ticket-body .or { font-size: .82rem; color: var(--muted); text-align: center; margin-top: 4px; }
.ticket-body .stores { justify-content: center; }
.ticket-body form { display: flex; flex-direction: column; gap: 12px; }
.ticket-body label { font-size: .85rem; font-weight: 700; color: var(--ink); display: flex; flex-direction: column; gap: 6px; }
.ticket-body input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1.5px solid rgba(21, 25, 35, .18);
  border-radius: 12px;
  background: var(--cream);
  color: var(--ink);
  font: inherit;
}
.ticket-body input:focus { border-color: var(--blue); outline: none; }
.form-error { color: var(--danger); font-size: .88rem; }

/* ---------- Pages de texte (confidentialité, suppression) ---------- */
.doc { max-width: 760px; margin: 0 auto; padding: 8px 16px 40px; }
.doc-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px 24px;
}
@media (min-width: 720px) { .doc-card { padding: 40px 44px; } }
.doc h1 { font-size: 1.6rem; line-height: 1.2; text-wrap: balance; margin-bottom: 6px; }
.doc .meta { color: var(--muted); font-size: .88rem; margin-bottom: 24px; }
.doc h2 { font-size: 1.1rem; margin: 28px 0 10px; text-wrap: balance; }
.doc p, .doc li { font-size: .97rem; color: #2B3140; }
.doc p { margin-bottom: 10px; }
.doc ul, .doc ol { padding-left: 1.3rem; margin-bottom: 10px; display: flex; flex-direction: column; gap: 6px; }
.doc .box { background: var(--cream); border-radius: 14px; padding: 14px 16px; margin: 10px 0; }
.lang-switch { display: flex; gap: 8px; margin-bottom: 20px; }
.lang-switch button {
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  font: inherit;
  font-size: .88rem;
  font-weight: 700;
  background: var(--cream);
  color: var(--muted);
  cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: #fff; }
[data-lang][hidden] { display: none; }

/* Tableau qui devient une liste de cartes sur téléphone. */
.rtable { width: 100%; border-collapse: collapse; margin: 10px 0 14px; font-size: .92rem; }
.rtable th { text-align: left; font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.rtable td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; color: #2B3140; }
@media (max-width: 640px) {
  .rtable thead { display: none; }
  .rtable, .rtable tbody, .rtable tr, .rtable td { display: block; width: 100%; }
  .rtable tr { background: var(--cream); border-radius: 14px; padding: 10px 14px; margin-bottom: 10px; }
  .rtable td { border: 0; padding: 4px 0; }
  .rtable td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .rtable td:first-child { font-weight: 700; color: var(--ink); }
  .rtable td:first-child::before { display: none; }
}

/* ---------- Pied de page ---------- */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  padding: 24px 16px 32px;
  font-size: .88rem;
  color: var(--muted);
}
.site-footer a { color: var(--ink); text-decoration: none; font-weight: 600; }
.site-footer a:hover { color: var(--coral-700); text-decoration: underline; }
