/* Casa Outeiro 99 — App limpeza — charte maison : violet #3B1261, or #C9A96E, noir #0C0810 */
:root {
  --violet: #3B1261;
  --violet-d: #2A0C47;
  --violet-card: #1C1132;
  --gold: #C9A96E;
  --gold-soft: #E3CFA6;
  --ink: #F4EFE6;
  --bg: #0C0810;
  --card: #171025;
  --line: #372A4F;
  --muted: #A79BBE;
  --ok: #4CBF8B;
  --warn: #E0A458;
  --bad: #E06565;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
html { font-size: 17px; }
body {
  font-family: 'Poppins', system-ui, sans-serif;
  background: var(--bg); color: var(--ink);
  min-height: 100dvh;
  padding-bottom: calc(86px + env(safe-area-inset-bottom));
}
h1, h2, h3, .brand { font-family: 'Fjalla One', sans-serif; text-transform: uppercase; letter-spacing: .05em; font-weight: 400; }

#topbar {
  background: linear-gradient(180deg, var(--violet-d), var(--violet));
  color: #fff; border-bottom: 1px solid var(--gold);
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; position: sticky; top: 0; z-index: 10;
}
.brand { font-size: 1.05rem; }
.brand span { color: var(--gold); }
.brand em { font-style: normal; font-size: .85rem; opacity: .8; }
.hdr-right { display: flex; gap: 8px; }
button.ghost {
  background: rgba(201,169,110,.12); color: var(--gold-soft); border: 1px solid var(--gold);
  border-radius: 8px; padding: 6px 12px; font-family: 'Poppins'; font-weight: 600; font-size: .85rem;
}

main { max-width: 560px; margin: 0 auto; padding: 16px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px; margin-bottom: 14px;
}
.card h2 { font-size: 1.05rem; color: var(--gold); margin-bottom: 10px; }
.muted { color: var(--muted); font-size: .88rem; }

/* Barre de navigation basse — style app native */
#bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  display: grid; grid-auto-flow: column; gap: 4px;
  background: rgba(18, 11, 30, .96); backdrop-filter: blur(12px);
  border-top: 1px solid var(--gold);
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
}
#bottomnav button {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-family: 'Poppins'; font-weight: 600;
  padding: 6px 4px; border-radius: 12px; min-height: 54px;
}
#bottomnav button i { font-style: normal; font-size: 1.45rem; line-height: 1.2; }
#bottomnav button span { font-size: .68rem; letter-spacing: .02em; }
#bottomnav button.on { color: var(--gold); background: rgba(201,169,110,.12); }
#bottomnav[hidden] { display: none; }

.btn.big-photo { font-size: 1.15rem; padding: 20px; margin-top: 12px; }

/* Boutons */
.btn {
  display: block; width: 100%; text-align: center; border: none; border-radius: 12px;
  padding: 15px; font-family: 'Poppins'; font-size: 1rem; font-weight: 600; cursor: pointer;
  background: var(--violet); color: #fff; margin-top: 10px; border: 1px solid transparent;
}
.btn.gold { background: var(--gold); color: var(--violet-d); }
.btn.outline { background: transparent; color: var(--gold-soft); border: 1.5px solid var(--gold); }
.btn.danger { background: var(--bad); color: #fff; }
.btn:disabled { opacity: .4; }
.btn.small { padding: 9px; font-size: .88rem; margin-top: 6px; }

/* Login */
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.pinpad button {
  font-size: 1.5rem; padding: 16px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--violet-card); color: var(--ink); font-family: 'Poppins'; font-weight: 600;
}
.pin-dots { text-align: center; font-size: 1.8rem; letter-spacing: .4em; min-height: 44px; color: var(--gold); }

/* Arrivées */
.arr {
  border-left: 4px solid var(--gold); background: var(--violet-card); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 10px;
  border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.arr { padding: 13px 14px; }
.arr .d { font-weight: 700; color: var(--gold-soft); font-size: 1rem; }
.arr .people { margin-top: 5px; font-size: 1rem; }
.arr .badges { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 7px; }
.badge {
  font-size: .8rem; font-weight: 600; border-radius: 999px; padding: 5px 12px;
  background: rgba(201,169,110,.15); color: var(--gold-soft); border: 1px solid rgba(201,169,110,.35);
}
.badge.warn { background: rgba(224,164,88,.15); color: var(--warn); border-color: rgba(224,164,88,.45); }
.badge.alert { background: rgba(224,101,101,.15); color: var(--bad); border-color: rgba(224,101,101,.45); }
.badge.ok { background: rgba(76,191,139,.15); color: var(--ok); border-color: rgba(76,191,139,.45); }

/* Cartes maison (accueil) */
.house-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.house-head h2 { margin-bottom: 0; color: var(--gold); }
.btn.play {
  font-size: 1.25rem; padding: 20px; background: var(--gold); color: var(--violet-d);
  letter-spacing: .02em; box-shadow: 0 3px 14px rgba(201,169,110,.25);
}

/* Boutons "vraie app" : grosses tuiles icône + libellé */
.app-actions { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; margin-top: 12px; }
.abtn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 18px 10px; border-radius: 18px; border: none; cursor: pointer;
  font-family: 'Poppins'; font-weight: 700; font-size: .95rem;
  transition: transform .08s ease;
}
.abtn:active { transform: scale(.96); }
.abtn i { font-style: normal; font-size: 1.9rem; line-height: 1; }
.abtn.play {
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  color: var(--violet-d); box-shadow: 0 4px 16px rgba(201,169,110,.3);
}
.abtn.photo {
  background: var(--violet); color: #fff; border: 1.5px solid var(--line);
  box-shadow: 0 4px 16px rgba(59,18,97,.35);
}
.btn.stop {
  font-size: 1.25rem; padding: 20px; background: var(--bad); color: #fff;
  box-shadow: 0 3px 14px rgba(224,101,101,.25);
}

/* Rappel photos finales */
.reminder {
  background: rgba(224,164,88,.12); border: 1.5px solid var(--warn); color: var(--warn);
  border-radius: 12px; padding: 12px 14px; margin-top: 10px; font-weight: 600; text-align: center;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.02); } }

/* Actions rapides en session */
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qbtn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 14px 8px; border-radius: 12px; border: 1.5px solid var(--gold);
  background: var(--violet-card); color: var(--gold-soft); font-family: 'Poppins'; font-weight: 600; font-size: 1.4rem;
}
.qbtn span { font-size: .78rem; }
.qbtn b { font-size: .85rem; background: var(--gold); color: var(--violet-d); border-radius: 999px; padding: 1px 9px; }
.qbtn.alert { border-color: var(--warn); color: var(--warn); }
.qbtn.alert b { background: var(--warn); color: #fff; }

/* Sélecteur nombre de personnes */
.helpers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 8px 0 4px; }
.helpers button {
  padding: 14px; font-size: 1.2rem; font-weight: 700; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--violet-card); color: var(--ink); font-family: 'Poppins';
}
.helpers button.on { border-color: var(--gold); background: var(--gold); color: var(--violet-d); }

/* Checklist */
.chk { list-style: none; }
.chk li {
  display: flex; align-items: center; gap: 14px; padding: 14px 4px;
  border-bottom: 1px solid var(--line); font-size: 1rem;
}
.chk li:last-child { border-bottom: none; }
.chk input { width: 28px; height: 28px; accent-color: var(--gold); flex-shrink: 0; }
.chk li.done { color: #6d6383; text-decoration: line-through; }

/* Photos */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.phase-tag { font-size: .7rem; text-align: center; margin-top: 2px; }

/* Timer */
.timer { font-family: 'Fjalla One'; font-size: 2.6rem; text-align: center; color: var(--gold); margin: 6px 0; }
.geo-status { text-align: center; font-size: .8rem; font-weight: 600; }
.geo-status.in { color: var(--ok); }
.geo-status.out { color: var(--bad); }

/* Admin */
.sess-row { padding: 12px 4px; border-bottom: 1px solid var(--line); font-size: .95rem; }
.sess-row b { color: var(--gold-soft); }
.tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tabs button {
  flex: 1; padding: 10px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font-family: 'Poppins'; font-weight: 600; font-size: .85rem;
}
.tabs button.on { background: var(--gold); color: var(--violet-d); border-color: var(--gold); }

select, input[type=text], input[type=number], textarea {
  width: 100%; padding: 11px; border: 1px solid var(--line); border-radius: 10px;
  font-family: 'Poppins'; font-size: .95rem; background: var(--violet-card); color: var(--ink); margin-top: 6px;
}

#toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: var(--violet-d); padding: 12px 20px; border-radius: 10px;
  font-size: .9rem; font-weight: 600; z-index: 100; max-width: 90%; text-align: center;
}
.center { text-align: center; }
.mt { margin-top: 12px; }

/* Icônes SVG inline */
svg.ic { vertical-align: -0.18em; flex-shrink: 0; }
h2 svg.ic { color: var(--gold); margin-right: 2px; }
.badge svg.ic { vertical-align: -0.22em; }
#bottomnav button i { display: flex; }
.done-ic { color: var(--ok); margin: 10px 0; }
.btn svg.ic { vertical-align: -0.22em; }

/* Rapport mensuel */
.report-head h2 { font-size: 1.25rem; }
.rep-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.rep-grid div {
  background: var(--violet-card); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 10px; text-align: center; display: flex; flex-direction: column; gap: 3px;
}
.rep-grid b { font-family: 'Fjalla One'; font-size: 1.5rem; color: var(--gold); font-weight: 400; }
.rep-grid span { font-size: .78rem; color: var(--muted); }

/* Impression : fond blanc, texte noir, sans navigation */
@media print {
  body { background: #fff; color: #111; padding-bottom: 0; }
  #topbar, #bottomnav, .no-print, #toast { display: none !important; }
  .card { background: #fff; border-color: #ccc; box-shadow: none; break-inside: avoid; }
  .card h2, .rep-grid b, .arr .d, .sess-row b { color: #3B1261; }
  .muted, .rep-grid span { color: #555; }
  .rep-grid div { background: #f7f4fb; border-color: #ddd; }
  .sess-row { border-color: #ddd; }
}
