:root {
  --bg: #F0E7DE;
  --ink: #4E3B30;
  --accent: #C17529;
  --muted: #A5644E;
  --line: #D9C3AE;
  --card: #F7F0E9;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Avenir Next", "Avenir", "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: clamp(12px, 2.4dvh, 22px);
  padding: max(28px, env(safe-area-inset-top)) 16px 12px;
}

.eyebrow {
  margin: 0;
  font-size: clamp(12px, 3.2vw, 14px);
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before, .eyebrow::after {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--line);
}

.logo {
  display: block;
  width: min(62vw, 280px, 32dvh);
  height: auto;
  aspect-ratio: 520 / 548;
  opacity: 0;
  transform: scale(.94);
  animation: logo-in .7s cubic-bezier(.2, .8, .2, 1) .1s forwards;
}

h1 {
  margin: 0;
  font-size: clamp(26px, 7.4vw, 44px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -.01em;
  text-wrap: balance;
}

.teaser {
  margin: 0;
  max-width: 32ch;
  font-size: clamp(16px, 4.4vw, 19px);
  line-height: 1.45;
  font-weight: 500;
  color: var(--muted);
  text-wrap: balance;
}
.teaser strong { color: var(--ink); font-weight: 700; }

.stage {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  line-height: 0;
  /* coupe uniquement le bas : le rebond peut dépasser vers le haut sans être rogné */
  clip-path: inset(-30% -20% 0 -20%);
}
.mole {
  display: block;
  width: min(78vw, 420px, 40dvh);
  height: auto;
  aspect-ratio: 960 / 611;
  transform: translateY(105%);
  animation: peek 1s .65s forwards;
  cursor: pointer;
  user-select: none;
  -webkit-user-drag: none;
}

@keyframes logo-in { to { opacity: 1; transform: none; } }
@keyframes peek {
  0%   { transform: translateY(105%); animation-timing-function: cubic-bezier(.2, .7, .3, 1); }
  70%  { transform: translateY(-3%);  animation-timing-function: ease-in-out; }
  100% { transform: translateY(0); }
}

/* -- Page ouverte : la régie et les outils ------------------------------------------- */

.open .logo { width: min(44vw, 200px, 24dvh); }
.open .mole { width: min(60vw, 320px, 30dvh); }

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  padding: 16px 28px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: clamp(16px, 4.4vw, 19px);
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(78, 59, 48, .25);
  transition: transform .15s ease, box-shadow .15s ease;
}
.cta:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(78, 59, 48, .3); }
.cta:focus-visible, .tool:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #6FA85A;
  box-shadow: 0 0 0 0 rgba(111, 168, 90, .6);
  animation: pulse 1.6s infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(111, 168, 90, 0); } 100% { box-shadow: 0 0 0 0 rgba(111, 168, 90, 0); } }

.backstage {
  width: min(100%, 860px);
  margin-top: clamp(12px, 3dvh, 28px);
  text-align: left;
}
.backstage h2 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: center;
}
.tools {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 640px) { .tools { grid-template-columns: 1fr 1fr; } }
.tool {
  display: block;
  height: 100%;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  transition: border-color .15s ease, transform .15s ease;
}
.tool:hover { border-color: var(--accent); transform: translateY(-2px); }
.tool strong { display: block; font-size: 17px; font-weight: 800; }
.tool span { display: block; margin-top: 4px; font-size: 15px; line-height: 1.4; color: var(--muted); }
.tool em { font-style: normal; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }

.note {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .logo, .mole { animation: none; opacity: 1; transform: none; }
  .live-dot { animation: none; }
}

/* Écrans très bas (paysage mobile) : on garde tout visible */
@media (max-height: 480px) {
  main { padding-top: 12px; gap: 8px; }
  .logo { width: min(24dvh, 150px); }
  h1 { font-size: 24px; }
  .teaser { font-size: 15px; }
  .mole { width: min(55vw, 38dvh); }
}
