/* Ma bonne AItoile — skeleton stylesheet (mobile-first).
   Palette = charte Fuushia (branding/CHARTE.md). When real screens land we may
   swap to a built Tailwind artifact; for the skeleton a hand-written sheet keeps
   the app self-contained and deployable with zero build step. */

:root {
  --magenta: #BF267D;
  --purple: #450E45;
  --cream: #F5F4F2;
  --cyan: #89E6EB;
  --brown: #63584D;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--purple);
  background-image: radial-gradient(120% 80% at 50% -10%, #5a1857 0%, var(--purple) 60%);
  color: var(--cream);
  -webkit-font-smoothing: antialiased;
}

.screen {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px calc(32px + env(safe-area-inset-bottom));
}

.hero {
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: var(--cyan);
  margin: 0 0 16px;
}

.wordmark {
  font-size: clamp(40px, 13vw, 60px);
  line-height: 1.0;
  font-weight: 800;
  margin: 0 0 24px;
}

.accent { color: var(--magenta); }

.intro {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(245, 244, 242, 0.85);
  margin: 0 0 32px;
}

.cta {
  display: inline-block;
  background: var(--magenta);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  padding: 16px 36px;
  border-radius: 999px;
  min-width: 200px;
  transition: transform 0.08s ease;
}

.cta:active { transform: scale(0.97); }

.cta.ghost {
  background: transparent;
  border: 1.5px solid rgba(245, 244, 242, 0.4);
  color: var(--cream);
}

.footnote {
  margin: 24px 0 0;
  font-size: 13px;
  color: rgba(137, 230, 235, 0.7);
}

/* --- cards / forms --- */
.card {
  width: 100%;
  max-width: 460px;
  background: rgba(245, 244, 242, 0.04);
  border: 1px solid rgba(245, 244, 242, 0.12);
  border-radius: 20px;
  padding: 28px 22px calc(28px + env(safe-area-inset-bottom));
}

.card-title {
  font-size: 26px;
  font-weight: 800;
  margin: 4px 0 20px;
}

.field, .question {
  display: block;
  border: 0;
  padding: 0;
  margin: 0 0 20px;
}

.field > span, .question > legend {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--cyan);
  margin-bottom: 8px;
  padding: 0;
}

.field input[type="text"],
.field input[type="email"] {
  width: 100%;
  font-size: 16px;            /* >=16px stops iOS zoom-on-focus */
  padding: 14px 14px;
  border-radius: 12px;
  border: 1px solid rgba(245, 244, 242, 0.2);
  background: rgba(0, 0, 0, 0.2);
  color: var(--cream);
}

.field input::placeholder { color: rgba(245, 244, 242, 0.4); }

.radio {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  padding: 12px 14px;
  margin-top: 8px;
  border-radius: 12px;
  border: 1px solid rgba(245, 244, 242, 0.15);
  background: rgba(0, 0, 0, 0.15);
  cursor: pointer;
}

.radio input { width: 20px; height: 20px; accent-color: var(--magenta); }

.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(245, 244, 242, 0.8);
  margin: 0 0 24px;
}

.consent input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--magenta); }

.card .cta { width: 100%; }

.error {
  background: rgba(191, 38, 125, 0.18);
  border: 1px solid var(--magenta);
  color: #ffd9ec;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  margin: 0 0 18px;
}

/* --- reveal --- */
.codename {
  font-size: clamp(36px, 12vw, 56px);
  font-weight: 800;
  color: var(--magenta);
  margin: 8px 0 24px;
  line-height: 1.05;
}

.secret {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(245, 244, 242, 0.9);
}

.resume {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(245, 244, 242, 0.12);
  font-size: 13px;
  color: rgba(245, 244, 242, 0.6);
}

.resume-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--cyan);
  word-break: break-all;
  font-size: 13px;
}

/* ===================== dashboard chrome ===================== */
body.app {
  background: #2c0a2c;
  background-image: radial-gradient(120% 60% at 50% -10%, #4a1148 0%, #2c0a2c 60%);
  color: var(--cream);
  min-height: 100dvh;
}

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px calc(14px); gap: 12px;
  background: rgba(20, 4, 20, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(245, 244, 242, 0.1);
  padding-top: calc(14px + env(safe-area-inset-top));
}
.topbar .brand { font-weight: 800; color: var(--magenta); letter-spacing: 0.02em; }
.topbar .me { font-size: 13px; color: rgba(245, 244, 242, 0.85); text-align: right; }

.content {
  max-width: 560px; margin: 0 auto;
  padding: 18px 16px 110px;   /* bottom room for the tabbar */
}

.tab-title { font-size: 26px; font-weight: 800; margin: 6px 0 6px; }
.tab-subtitle { font-size: 15px; font-weight: 700; color: var(--cyan); margin: 4px 0 12px; }
.muted { color: rgba(245, 244, 242, 0.55); font-size: 14px; line-height: 1.5; }

.flashes { max-width: 560px; margin: 10px auto 0; padding: 0 16px; }
.flash { padding: 12px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 8px; }
.flash-success { background: rgba(137, 230, 235, 0.16); border: 1px solid var(--cyan); color: #d9fbfd; }
.flash-error { background: rgba(191, 38, 125, 0.18); border: 1px solid var(--magenta); color: #ffd9ec; }

/* bottom tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; justify-content: space-around;
  background: rgba(20, 4, 20, 0.92);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(245, 244, 242, 0.1);
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
}
.tabbar a {
  flex: 1; text-align: center; text-decoration: none;
  color: rgba(245, 244, 242, 0.55); font-size: 22px; line-height: 1.1;
}
.tabbar a span { display: block; font-size: 11px; margin-top: 2px; }
.tabbar a.on { color: var(--magenta); }

/* mission cards */
.mission {
  background: rgba(245, 244, 242, 0.05);
  border: 1px solid rgba(245, 244, 242, 0.12);
  border-radius: 16px; padding: 16px; margin-bottom: 14px;
}
.mission.done { display: flex; justify-content: space-between; align-items: center; opacity: 0.65; }
.mission-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mission-title { font-weight: 700; font-size: 16px; }
.mission-desc { color: rgba(245, 244, 242, 0.7); font-size: 14px; margin: 8px 0 12px; }
.pts { color: var(--cyan); font-weight: 800; white-space: nowrap; }

.btn {
  display: inline-block; width: 100%; margin-top: 10px;
  background: var(--magenta); color: #fff; border: 0;
  font-weight: 700; font-size: 16px; padding: 13px 18px; border-radius: 12px; cursor: pointer;
}
.btn:active { transform: scale(0.98); }
.btn.tiny { width: auto; padding: 7px 12px; font-size: 13px; margin: 0; }
.btn.ghost-btn { background: transparent; border: 1.5px solid rgba(245, 244, 242, 0.35); color: var(--cream); }
.file, .text {
  width: 100%; margin-top: 10px; font-size: 16px; padding: 12px;
  border-radius: 12px; border: 1px solid rgba(245, 244, 242, 0.2);
  background: rgba(0, 0, 0, 0.2); color: var(--cream);
}
.text.mini { width: 90px; }
select {
  width: 100%; font-size: 16px; padding: 12px; border-radius: 12px;
  border: 1px solid rgba(245, 244, 242, 0.2); background: #2c0a2c; color: var(--cream);
}
.card-form .field { margin-bottom: 14px; }
.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form .text { margin-top: 0; }
.leave { margin-top: 28px; }

/* ranking */
.ranking { list-style: none; padding: 0; margin: 12px 0 0; counter-reset: r; }
.ranking li {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; margin-bottom: 8px; border-radius: 12px;
  background: rgba(245, 244, 242, 0.05); border: 1px solid rgba(245, 244, 242, 0.1);
}
.ranking li.out { opacity: 0.5; }
.ranking .rank { width: 26px; font-weight: 800; color: var(--cyan); }
.ranking .who { flex: 1; font-weight: 600; }
.ranking .score { font-weight: 800; color: var(--magenta); }

/* feed */
.feed { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.feed-item { margin: 0; background: rgba(0,0,0,0.25); border-radius: 12px; overflow: hidden; }
.feed-item img, .feed-item video { width: 100%; display: block; aspect-ratio: 1; object-fit: cover; }
.feed-item figcaption { padding: 8px; font-size: 12px; color: rgba(245, 244, 242, 0.7); }

/* panels / tables (star + admin) */
.panel {
  background: rgba(245, 244, 242, 0.04); border: 1px solid rgba(245, 244, 242, 0.1);
  border-radius: 16px; padding: 16px; margin-bottom: 16px;
}
.roster { width: 100%; border-collapse: collapse; font-size: 14px; }
.roster th, .roster td { text-align: left; padding: 8px 6px; border-bottom: 1px solid rgba(245, 244, 242, 0.08); }
.roster th { color: var(--cyan); font-weight: 700; }
.roster tr.out { opacity: 0.5; }
.sub-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; font-size: 14px; }
.unmask { font-size: 14px; margin: 6px 0; }
