/* ==========================================================================
   Tech Builders Companion
   Charte reprise de l'affiche : bleu marine, rouge, blanc, fond rosé.
   ========================================================================== */

:root {
  --navy: #1b2766;
  --navy-deep: #111a4a;
  --navy-soft: #3b4683;
  --red: #d0202e;
  --red-deep: #a8141f;
  --blush: #fbeef0;
  --blush-strong: #f4d9de;
  --paper: #ffffff;
  --ink: #1a1f3d;
  --muted: #5f6488;
  --line: #ead7dc;

  --bg: var(--blush);
  --surface: var(--paper);
  --surface-alt: #fdf6f7;
  --text: var(--ink);
  --accent: var(--red);
  --brand: var(--navy);

  --pillar-code: #1b2766;
  --pillar-cloud: #2f6fb3;
  --pillar-create: #d0202e;

  --font-display: 'Abril Fatface', 'Georgia', serif;
  --font-script: 'Sacramento', 'Brush Script MT', cursive;
  --font-body: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgb(27 39 102 / 6%), 0 6px 18px rgb(27 39 102 / 7%);
  --shadow-lift: 0 2px 4px rgb(27 39 102 / 8%), 0 14px 30px rgb(27 39 102 / 12%);

  --tabbar-h: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --page: 760px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1334;
    --surface: #161e48;
    --surface-alt: #1b2455;
    --text: #f3f1f6;
    --muted: #a6abcf;
    --line: #29336a;
    --accent: #ff4f5c;
    --brand: #e9ecff;
    --pillar-code: #9aa7ff;
    --pillar-cloud: #6fb4ff;
    --pillar-create: #ff6b76;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%);
    --shadow-lift: 0 10px 28px rgb(0 0 0 / 35%);
  }
}

/* ---------- Base ---------- */

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom));
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 50;
  padding: 10px 14px;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; }

.icon { display: inline-flex; width: 22px; height: 22px; flex: none; }
.icon svg { width: 100%; height: 100%; }
.icon--xs { width: 14px; height: 14px; }

.muted { color: var(--muted); }

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- En-tête ---------- */

.masthead {
  position: relative;
  overflow: hidden;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 20px 16px;
  background:
    radial-gradient(120% 90% at 0% 0%, #ffffff 0%, transparent 60%),
    linear-gradient(180deg, #fdf3f5 0%, #f8e3e7 100%);
  color: var(--navy);
  border-bottom: 1px solid var(--blush-strong);
}

.masthead__stripes {
  position: absolute;
  inset: 0 0 0 auto;
  width: 48%;
  background: repeating-linear-gradient(90deg, var(--navy) 0 2px, transparent 2px 13px, var(--red) 13px 15px, transparent 15px 26px);
  opacity: 0.18;
  mask-image: linear-gradient(90deg, transparent, #000 60%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%);
}

.masthead__circuit {
  position: absolute;
  right: -10px;
  top: 6px;
  width: 220px;
  fill: none;
  stroke: var(--red);
  stroke-width: 1.2;
  opacity: 0.35;
}
.masthead__circuit circle { fill: var(--red); stroke: none; }

.masthead__inner {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  max-width: var(--page);
  margin: 0 auto;
}

.brand {
  display: grid;
  margin: 0;
  font-weight: 400;
  line-height: 0.9;
}

.brand__row {
  display: flex;
  align-items: center;
}

.brand__tech {
  font-family: var(--font-display);
  font-size: clamp(42px, 12vw, 64px);
  letter-spacing: -0.01em;
}

.brand__script {
  position: relative;
  z-index: 1;
  margin-left: 10px;
  padding: 0 14px 2px;
  font-family: var(--font-script);
  font-size: clamp(30px, 8.6vw, 44px);
  line-height: 1.15;
  color: #fff;
  background: var(--red);
  transform: rotate(-4deg) translateY(-4px);
  text-shadow: 0 0 6px rgb(255 255 255 / 85%), 0 0 16px rgb(255 190 196 / 70%);
  box-shadow: 0 6px 16px rgb(168 20 31 / 30%);
  white-space: nowrap;
}

.brand__builders {
  font-family: var(--font-display);
  font-size: clamp(22px, 6.4vw, 30px);
  border-bottom: 2px solid var(--navy);
  padding: 2px 0 6px;
  width: max-content;
}

.masthead__bottom {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px 16px;
  max-width: var(--page);
  margin: 14px auto 0;
}

.lang-toggle {
  min-width: 44px;
  min-height: 36px;
  padding: 0 12px;
  border: 1.5px solid var(--navy);
  border-radius: 999px;
  background: rgb(255 255 255 / 80%);
  font-weight: 700;
  font-size: 14px;
  color: var(--navy);
  cursor: pointer;
}

.masthead__dates {
  display: inline-flex;
  align-items: stretch;
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  border: 1.5px solid var(--navy);
  background: rgb(255 255 255 / 75%);
}
.masthead__dates span { padding: 6px 8px; }
.masthead__dates span + span {
  background: var(--red);
  color: #fff;
  font-weight: 600;
}

.pillars {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 700;
  font-size: 14px;
}
.pillars__kicker {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy-soft);
}
.pillars__item { display: inline-flex; align-items: center; gap: 6px; }
.pillars__item::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
}

/* ---------- Navigation ---------- */

.tabbar {
  position: fixed;
  z-index: 20;
  inset: auto 0 0 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--navy-deep);
  border-top: 3px solid var(--red);
}

.tabbar__link {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  color: #b9bfe6;
}
.tabbar__link svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tabbar__link[aria-current='page'] { color: #fff; }
.tabbar__link[aria-current='page'] svg { stroke: #ff7a84; }

@media (min-width: 760px) {
  body { padding-bottom: 0; }
  .tabbar {
    position: sticky;
    top: 0;
    inset: auto;
    height: auto;
    padding: 0 max(20px, calc((100vw - var(--page)) / 2));
    grid-template-columns: repeat(5, auto);
    justify-content: start;
    gap: 4px;
    border-top: 0;
    border-bottom: 3px solid var(--red);
  }
  .tabbar__link {
    grid-auto-flow: column;
    gap: 8px;
    padding: 14px 14px;
    font-size: 14px;
  }
  .tabbar__link svg { width: 18px; height: 18px; }
  .tabbar__link[aria-current='page'] { box-shadow: inset 0 -3px 0 #fff; }
}

/* ---------- Mise en page ---------- */

.main {
  max-width: var(--page);
  margin: 0 auto;
  padding: 20px 16px 32px;
}

.view { display: grid; gap: 16px; animation: fade 0.25s ease; }

@keyframes fade { from { opacity: 0; transform: translateY(4px); } }

.card {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card h3 { font-size: 18px; line-height: 1.3; }
.card p + p { margin-top: 6px; }

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-top: 6px;
}
.section-title h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  color: var(--brand);
}
.card .section-title { margin: 0 0 12px; }

.view-intro h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px;
  color: var(--brand);
}
.view-intro p { margin-top: 6px; color: var(--muted); }

.hint { margin-top: 10px; font-size: 13px; color: var(--muted); }
.empty { padding: 20px; text-align: center; color: var(--muted); }

/* ---------- Badges ---------- */

.badges { display: flex; flex-wrap: wrap; gap: 6px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  color: var(--muted);
}

.badge--pillar { color: #fff; border-color: transparent; }
.badge--code { background: var(--pillar-code); }
.badge--cloud { background: var(--pillar-cloud); }
.badge--create { background: var(--pillar-create); }
@media (prefers-color-scheme: dark) {
  .badge--pillar { color: var(--bg); }
}

.badge--key {
  color: #8a5a00;
  background: #fff4d6;
  border-color: #f2d48a;
}
@media (prefers-color-scheme: dark) {
  .badge--key { color: #ffd77a; background: #3a3015; border-color: #6b5520; }
}

/* ---------- En direct ---------- */

.clock-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.clock-line span { margin-right: auto; }
.clock-line strong {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  letter-spacing: 0;
  color: var(--brand);
}

.now-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 10px;
  padding: 22px 20px 18px;
  border-radius: calc(var(--radius) + 4px);
  color: #fff;
  background:
    repeating-linear-gradient(90deg, rgb(255 255 255 / 5%) 0 2px, transparent 2px 18px),
    linear-gradient(140deg, var(--navy) 0%, var(--navy-deep) 100%);
  box-shadow: var(--shadow-lift);
}
.now-card > * { position: relative; z-index: 1; }
.now-card::after {
  content: '';
  pointer-events: none;
  position: absolute;
  right: -40px;
  top: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(208 32 46 / 55%), transparent 70%);
}

.now-card--hackathon,
.now-card--ceremony {
  background:
    repeating-linear-gradient(90deg, rgb(255 255 255 / 6%) 0 2px, transparent 2px 18px),
    linear-gradient(140deg, var(--red) 0%, var(--red-deep) 100%);
}
.now-card--break {
  background: linear-gradient(140deg, var(--navy-soft) 0%, var(--navy) 100%);
}

.now-card__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffd2d6;
}

.pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff5c68;
  box-shadow: 0 0 0 0 rgb(255 92 104 / 70%);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgb(255 92 104 / 0%); }
  100% { box-shadow: 0 0 0 0 rgb(255 92 104 / 0%); }
}

.now-card__title {
  position: relative;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(24px, 6.6vw, 32px);
  line-height: 1.12;
}
.now-card__lead { position: relative; color: #dfe2ff; }
.now-card .badge { background: rgb(255 255 255 / 12%); border-color: rgb(255 255 255 / 20%); color: #fff; }
.now-card .badge--pillar { background: #fff; color: var(--navy); }
.now-card .badge--key { background: #ffe9b0; color: #6b4400; border-color: transparent; }

.now-card--state { color: #fff; }
.now-card--state .now-card__title { font-size: 26px; }

.progress {
  position: relative;
  height: 8px;
  margin-top: 4px;
  border-radius: 999px;
  background: rgb(255 255 255 / 18%);
  overflow: hidden;
}
.progress__bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff6b76, #ffffff);
  transition: width 0.6s ease;
}
.progress--thin { height: 6px; margin: 0 0 12px; background: var(--blush-strong); }
.progress--thin .progress__bar { background: var(--accent); }
@media (prefers-color-scheme: dark) {
  .progress--thin { background: var(--line); }
}

.now-card__times {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #c7cbf0;
  font-variant-numeric: tabular-nums;
}
.now-card__times strong { color: #fff; font-size: 14px; }

.next-card {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 16px 64px 16px 18px;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.next-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.next-card__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.next-card__in {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.next-card__title { font-size: 18px; line-height: 1.3; }
.next-card__meta { font-size: 14px; color: var(--muted); }
.next-card__go {
  position: absolute;
  right: 16px;
  top: 50%;
  translate: 0 -50%;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  transition: transform 0.15s ease;
}
.next-card:hover .next-card__go { transform: translateX(2px); }

.pitch-banner {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  text-decoration: none;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.pitch-banner__label {
  font-family: var(--font-script);
  font-size: 30px;
  line-height: 1;
  color: var(--accent);
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.countdown__block {
  display: grid;
  justify-items: center;
  padding: 10px 4px 8px;
  border-radius: var(--radius-sm);
  background: var(--navy);
  color: #fff;
}
.countdown__value {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.countdown__unit {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffb3b9;
}

.today {
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.today__title { font-size: 14px; font-weight: 700; color: var(--muted); margin-bottom: 10px; }
.today__list { display: grid; }
.today__item {
  position: relative;
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 10px;
  align-items: baseline;
  padding: 7px 0 7px 14px;
  border-left: 2px solid var(--line);
  font-size: 14px;
}
.today__item::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 13px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--line);
}
.today__time { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); }
.today__item.is-past { opacity: 0.55; }
.today__item.is-past::before { background: var(--line); }
.today__item.is-current { font-weight: 700; }
.today__item.is-current::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px rgb(208 32 46 / 18%); }
.today__item.is-current .today__time { color: var(--accent); }
.today__item--break .today__name { color: var(--muted); }
.today__done { color: var(--muted); }

/* ---------- Programme ---------- */

.day-tabs {
  position: sticky;
  top: 8px;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
@media (min-width: 760px) { .day-tabs { top: 64px; } }

.day-tabs__tab {
  display: grid;
  padding: 8px 6px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  line-height: 1.15;
}
.day-tabs__num { font-weight: 700; font-size: 15px; }
.day-tabs__date { font-size: 12px; color: var(--muted); }
.day-tabs__tab[aria-selected='true'] { background: var(--navy); color: #fff; }
.day-tabs__tab[aria-selected='true'] .day-tabs__date { color: #c9cdf2; }
@media (prefers-color-scheme: dark) {
  .day-tabs__tab[aria-selected='true'] { background: var(--accent); }
  .day-tabs__tab[aria-selected='true'] .day-tabs__date { color: #ffe1e4; }
}

.day { display: grid; gap: 14px; }
.day__header { padding: 6px 2px 0; }
.day__theme {
  margin-top: 4px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.15;
  color: var(--brand);
}

.sessions { display: grid; gap: 10px; }

.session {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  padding: 16px 16px 16px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  scroll-margin: 90px;
}

.session__time { display: grid; align-content: start; font-variant-numeric: tabular-nums; }
.session__start { font-weight: 700; font-size: 17px; color: var(--brand); }
.session__end { font-size: 13px; color: var(--muted); }

.session__body { display: grid; gap: 6px; min-width: 0; }
.session__title { font-size: 17px; line-height: 1.3; }
.session__lead { font-size: 14px; color: var(--muted); }
.session__points { display: grid; gap: 4px; margin-top: 2px; font-size: 14px; }
.session__points li { position: relative; padding-left: 14px; }
.session__points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 2px;
  background: var(--accent);
}

.session--break {
  background: transparent;
  box-shadow: none;
  border-style: dashed;
  padding-block: 10px;
}
.session--break .session__title { font-size: 15px; font-weight: 600; color: var(--muted); }
.session--break .session__start { color: var(--muted); font-size: 15px; }

.session--key .session__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 20px;
  color: var(--brand);
}
.session.is-past { opacity: 0.6; }
.session.is-current {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(208 32 46 / 15%), var(--shadow-lift);
}
.session.is-current .session__start { color: var(--accent); }

.notes { margin-top: 6px; }
.notes summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
  cursor: pointer;
  list-style: none;
}
.notes summary::-webkit-details-marker { display: none; }
.notes summary::before { content: '+'; font-size: 16px; line-height: 1; color: var(--accent); }
.notes[open] summary::before { content: '\2212'; }
.notes__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.notes__input {
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  resize: vertical;
  font-size: 15px;
}
.notes__status { display: block; min-height: 18px; font-size: 12px; color: var(--muted); }

/* ---------- Hackathon ---------- */

.hero-count {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 22px 18px;
  border-radius: calc(var(--radius) + 4px);
  background:
    repeating-linear-gradient(90deg, rgb(255 255 255 / 6%) 0 2px, transparent 2px 16px),
    linear-gradient(140deg, var(--red) 0%, var(--red-deep) 100%);
  color: #fff;
  box-shadow: var(--shadow-lift);
}
.eyebrow--light { color: #ffe1e4; }
.hero-count .countdown__block { background: rgb(17 26 74 / 85%); }
.hero-count__meta { font-weight: 600; color: #ffe1e4; }

.format {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.format__item {
  display: grid;
  gap: 2px;
  padding: 12px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.3;
}
.format__item strong {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  color: var(--brand);
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
}
.segmented__btn {
  padding: 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.segmented__btn[aria-pressed='true'] { background: var(--navy); color: #fff; }

.timer__digits {
  margin: 14px 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(64px, 22vw, 96px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--brand);
}
.timer[data-state='warning'] .timer__digits,
.timer[data-state='over'] .timer__digits { color: var(--accent); }
.timer__actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-deep); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--brand); }
.btn--ghost:hover { background: var(--surface-alt); }
.btn--icon { width: 44px; padding: 0; }
.btn--block { width: 100%; }
.btn--light { background: #fff; color: var(--navy); min-width: 140px; }
.btn--ghost-light { background: transparent; color: #fff; border-color: rgb(255 255 255 / 45%); }

.stage {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  padding: 24px;
  background:
    repeating-linear-gradient(90deg, rgb(255 255 255 / 4%) 0 2px, transparent 2px 22px),
    var(--navy-deep);
  color: #fff;
}
.stage[data-state='warning'],
.stage[data-state='over'] { background: var(--red-deep); }
.stage__label { font-family: var(--font-script); font-size: clamp(36px, 8vw, 64px); line-height: 1; }
.stage__digits {
  font-family: var(--font-display);
  font-size: clamp(120px, 34vw, 340px);
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
}
.stage__actions { display: flex; gap: 12px; }
.stage__close {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top, 0px));
  right: 16px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 12%);
  color: #fff;
  cursor: pointer;
}

.guide { display: grid; gap: 12px; }
.guide__step { display: grid; grid-template-columns: 32px 1fr; gap: 12px; }
.guide__num {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
}
@media (prefers-color-scheme: dark) { .guide__num { background: var(--accent); } }
.guide__head { display: flex; justify-content: space-between; gap: 8px; }
.guide__time { font-size: 13px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.guide p { font-size: 14px; color: var(--muted); }

.checklist__count { font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.checklist { display: grid; gap: 2px; }

.check {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  align-items: center;
  padding: 9px 4px;
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.check:hover { background: var(--surface-alt); }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check__box {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 2px solid var(--line);
  color: transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.check input:checked + .check__box { background: var(--accent); border-color: var(--accent); color: #fff; }
.check input:checked ~ .check__label { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--accent); }
.check input:focus-visible + .check__box { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- Réseau ---------- */

.form { display: grid; gap: 12px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.field { display: grid; gap: 5px; }
.field__label { font-size: 13px; font-weight: 700; color: var(--brand); }
.field input,
.field select,
.search {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  font-size: 16px;
}
.field input:focus,
.field select:focus,
.search:focus,
.notes__input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }

.trap { position: absolute; left: -9999px; width: 1px; height: 1px; }

.form-status { min-height: 20px; font-size: 14px; color: var(--muted); }
.form-status.is-error { color: var(--accent); font-weight: 600; }

.card--mine { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mine { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--brand); }
.mine .icon { color: #1f9d55; }

.filters { display: grid; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.chip[aria-pressed='true'] { background: var(--navy); border-color: var(--navy); color: #fff; }
@media (prefers-color-scheme: dark) {
  .chip[aria-pressed='true'] { background: var(--accent); border-color: var(--accent); }
}

.people { display: grid; gap: 8px; }
@media (min-width: 620px) { .people { grid-template-columns: 1fr 1fr; } }

.person {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.person--mine { border-color: var(--accent); }
.person__avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-weight: 700;
  color: #fff;
  background: var(--navy-soft);
}
.person--bj .person__avatar { background: #138a4b; }
.person--tg .person__avatar { background: #c99a00; }
.person--us .person__avatar { background: var(--red); }
.person__body { display: grid; min-width: 0; line-height: 1.3; }
.person__name { overflow-wrap: anywhere; }
.person__role { font-size: 14px; }
.person__meta { font-size: 12px; color: var(--muted); }
.person__link { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #0a66c2; }
.person__link:hover { background: var(--surface-alt); }

.skeleton {
  height: 68px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--surface) 0%, var(--surface-alt) 50%, var(--surface) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite linear;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.share {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 16px;
  align-items: center;
  margin-top: 6px;
}
.qr { width: 132px; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: #fff; border: 1px solid var(--line); }
.qr svg { display: block; width: 100%; height: 100%; }
.share__body { display: grid; gap: 6px; justify-items: start; }
.share__body p { font-size: 14px; color: var(--muted); }
.share__url {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 13px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface-alt);
}

/* ---------- Infos ---------- */

.venue { display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: start; }
.venue__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--red);
  color: #fff;
}
.venue h3 { margin-top: 2px; }

.notice {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  align-items: start;
  background: var(--blush-strong);
  border-color: transparent;
  box-shadow: none;
}
.notice__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
}
@media (prefers-color-scheme: dark) {
  .notice { background: var(--surface-alt); border-color: var(--line); }
  .notice__icon { background: var(--accent); }
}

.resources { display: grid; gap: 8px; }
.resource {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.resource:hover { border-color: var(--accent); }
.resource div { display: grid; }
.resource span { font-size: 14px; color: var(--muted); }
.resource .icon { color: var(--accent); width: 18px; height: 18px; }

.disclaimer {
  padding: 4px 4px 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------- Pied de page ---------- */

.footer {
  max-width: var(--page);
  margin: 0 auto;
  padding: 8px 16px 28px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.footer a { font-weight: 700; color: var(--brand); text-decoration-color: var(--accent); text-underline-offset: 3px; }

/* Bandeau visible uniquement en mode horloge simulée (?at=...) */
.is-simulated .clock-line::after {
  content: 'SIM';
  margin-left: 8px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  background: #ffe9b0;
  color: #6b4400;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
