/* Bloom Lab Software - feuille de style commune.
   Polices auto-hébergées : aucune requête vers un tiers. */
@font-face { font-family: 'Bricolage Grotesque'; src: url('fonts/bricolage.woff') format('woff'); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('fonts/dmsans.woff') format('woff'); font-weight: 100 1000; font-style: normal; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('fonts/jetbrainsmono.woff') format('woff'); font-weight: 100 800; font-style: normal; font-display: swap; }

:root {
  --bg: #F1F6EF;
  --surface: #FFFFFF;
  --fg: #0F2A22;
  --muted: #4A6359;
  --line: #D3E0D3;
  --accent: #C2255C;
  --accent-fg: #FFFFFF;
  --lime: #C8F26B;
  --lime-fg: #0F2A22;
  --band-bg: #0F2A22;
  --band-fg: #EAF3EA;
  --band-muted: #A9C2B2;
  --card-open: #F7FBF4;
  --font-display: 'Bricolage Grotesque', 'Trebuchet MS', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B1612; --surface: #12231D; --fg: #E7F1E9; --muted: #9DB5A8; --line: #223A30;
    --accent: #FF7BA8; --accent-fg: #0B1612; --lime: #C8F26B; --lime-fg: #0B1612;
    --band-bg: #14291F; --band-fg: #EAF3EA; --band-muted: #A9C2B2;
    color-scheme: dark;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.6;
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0; text-wrap: balance; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; }
img, svg { max-width: 100%; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip { position: absolute; left: -999px; top: 0; background: var(--fg); color: var(--bg); padding: 10px 16px; z-index: 50; border-radius: 0 0 8px 0; }
.skip:focus { left: 0; }

.wrap {
  max-width: 1120px; margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.eyebrow {
  font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--accent);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 1rem var(--font-body); text-decoration: none; cursor: pointer;
  padding: 14px 22px; border-radius: 999px; border: 2px solid transparent;
  min-height: 48px; transition: transform .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: var(--accent-fg); }
.btn-ghost { border-color: var(--fg); color: var(--fg); background: transparent; }

/* En-tête */
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-block: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; }
.brand svg { color: var(--accent); flex: none; }
.brand small { font-family: var(--font-mono); font-weight: 500; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-left: 2px; }
.nav { display: flex; align-items: center; gap: 6px 22px; flex-wrap: wrap; }
.nav a:not(.btn) { text-decoration: none; font-weight: 500; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:not(.btn):hover { color: var(--accent); }
.nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.nav .btn { padding: 9px 18px; min-height: 44px; }
.lang { display: flex; gap: 4px; font-family: var(--font-mono); font-size: 0.8rem; margin-left: 4px; }
.lang a { text-decoration: none; padding: 6px 9px; border-radius: 8px; letter-spacing: 0.06em; }
.lang a[aria-current="true"] { background: var(--fg); color: var(--bg); }
.lang a:not([aria-current]):hover { background: var(--line); }
@media (max-width: 860px) {
  .top .wrap { flex-direction: column; align-items: flex-start; }
  .brand small { display: none; }
  .nav { font-size: 0.95rem; }
}

/* Hero */
.hero .wrap { display: grid; gap: 40px; padding-block: 40px 72px; align-items: center; }
.hero.hero-page .wrap { padding-block: 40px 56px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: 1.15fr 0.85fr; gap: 56px; padding-block: 64px 96px; } .hero.hero-page .wrap { padding-block: 56px 64px; } }
.pill {
  display: inline-flex; align-items: center; gap: 8px; width: fit-content;
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--lime); color: var(--lime-fg); padding: 6px 12px; border-radius: 999px;
}
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--lime-fg); display: inline-block; }
.hero-copy { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.hero h1 { font-size: clamp(2.3rem, 6.4vw, 4.4rem); font-weight: 800; }
.hero.hero-page h1 { font-size: clamp(2.1rem, 5.4vw, 3.6rem); max-width: 22ch; }
.hero h1 mark { background: linear-gradient(transparent 62%, var(--lime) 62% 92%, transparent 92%); color: inherit; padding: 0 2px; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 60ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.crumbs { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.06em; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--accent); }

.flow {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: 22px; display: flex; flex-direction: column; gap: 20px; min-width: 0;
  box-shadow: 0 18px 40px -24px rgba(15, 42, 34, 0.35);
}
.flow-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.flow-head .eyebrow { color: var(--muted); }
.steps { list-style: none; margin: 0; padding: 0; position: relative; display: flex; flex-direction: column; gap: 22px; }
.steps::before { content: ""; position: absolute; left: 11px; top: 12px; bottom: 12px; width: 2px; background: var(--line); }
.steps li { position: relative; display: flex; gap: 16px; align-items: flex-start; }
.node { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); position: relative; z-index: 1; margin-top: 2px; }
.steps b { display: block; font-weight: 700; line-height: 1.3; }
.steps small { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); letter-spacing: 0.04em; }
.steps::after { content: ""; position: absolute; left: 5px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--lime); border: 2px solid var(--fg); z-index: 2; animation: travel 4.5s ease-in-out infinite; pointer-events: none; }
@keyframes travel { 0% { top: 6px; } 50% { top: calc(100% - 20px); } 100% { top: 6px; } }
.flow-foot { border-top: 1px dashed var(--line); padding-top: 16px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.flow-foot strong { font-family: var(--font-display); font-size: 2.2rem; font-weight: 800; color: var(--accent); line-height: 1; font-variant-numeric: tabular-nums; }
.flow-foot span { color: var(--muted); font-size: 0.95rem; flex: 1 1 180px; }

/* Sections */
section { scroll-margin-top: 16px; }
.block .wrap { padding-block: 64px; }
.block.alt { border-block: 1px solid var(--line); }
.section-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 36px; max-width: 62ch; }
.section-head h2 { font-size: clamp(1.8rem, 4.2vw, 2.8rem); font-weight: 800; }
.section-head p { color: var(--muted); }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.fiche {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 26px; display: flex; flex-direction: column; gap: 14px; min-width: 0;
  transition: transform .2s ease;
}
.fiche:hover { transform: translateY(-4px); }
.fiche .ico { width: 44px; height: 44px; color: var(--accent); }
.fiche h3 { font-size: 1.4rem; font-weight: 700; }
.fiche h3 a { text-decoration: none; }
.fiche h3 a::after { content: ""; position: absolute; inset: 0; }
.fiche { position: relative; }
.fiche p { color: var(--muted); font-size: 1rem; }
.fiche ul { list-style: none; padding: 0; margin: auto 0 0; display: flex; flex-direction: column; gap: 8px; font-size: 0.95rem; }
.fiche li { display: flex; gap: 10px; align-items: baseline; }
.fiche li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50% 0 50% 0; background: var(--accent); transform: translateY(-1px); }
.fiche .more { font-weight: 700; color: var(--accent); font-size: 0.95rem; }
.fiche-jeu { background: var(--lime); color: var(--lime-fg); border-color: transparent; }
.fiche-jeu p { color: var(--lime-fg); opacity: 0.85; }
.fiche-jeu .ico, .fiche-jeu .more, .fiche-jeu .eyebrow { color: var(--lime-fg); }
.fiche-jeu li::before { background: var(--lime-fg); }

.timeline { display: grid; gap: 28px; grid-template-columns: 1fr; list-style: none; margin: 0; padding: 0; counter-reset: step; }
@media (min-width: 800px) { .timeline { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
.timeline li { display: flex; flex-direction: column; gap: 10px; border-top: 3px solid var(--fg); padding-top: 16px; min-width: 0; }
.timeline li::before { counter-increment: step; content: attr(data-step) " " counter(step); font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); }
.timeline h3 { font-size: 1.35rem; font-weight: 700; }
.timeline p { color: var(--muted); }

.points { display: grid; gap: 28px 40px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); list-style: none; margin: 0; padding: 0; }
.points li { display: flex; flex-direction: column; gap: 8px; border-left: 3px solid var(--accent); padding-left: 18px; min-width: 0; }
.points h3 { font-size: 1.25rem; font-weight: 700; }
.points p { color: var(--muted); }

.faq { display: flex; flex-direction: column; gap: 12px; max-width: 78ch; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px 20px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style-position: outside; }
.faq details p { color: var(--muted); padding-bottom: 16px; }

.soon-list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.soon-card { border: 2px dashed var(--line); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.soon-card .eyebrow { color: var(--muted); }
.soon-card p { color: var(--muted); }

/* Jeu */
.game { background: var(--band-bg); color: var(--band-fg); }
.game .wrap { padding-block: 64px; display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .game .wrap { grid-template-columns: 0.9fr 1.1fr; gap: 64px; } }
.game .section-head { margin-bottom: 0; }
.game .section-head p, .game .note { color: var(--band-muted); }
.game .eyebrow { color: var(--lime); }
.note { font-size: 0.95rem; margin-top: 16px; }
.play { display: flex; flex-direction: column; gap: 16px; min-width: 0; max-width: 540px; width: 100%; margin-inline: auto; }
.board { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(8px, 2vw, 14px); }
.card {
  aspect-ratio: 1; min-height: 64px; border: 0; border-radius: 16px; cursor: pointer; padding: 0;
  background: var(--lime); color: var(--lime-fg); display: grid; place-items: center;
  font-size: clamp(1.9rem, 9vw, 3.2rem); transition: transform .15s ease, background .15s ease;
}
.card:hover { transform: scale(1.04); }
.card .mk { width: 46%; height: 46%; color: var(--lime-fg); opacity: 0.55; }
.card .emo { display: none; line-height: 1; }
.card.open, .card.done { background: var(--card-open); }
.card.open .emo, .card.done .emo { display: block; animation: pop .25s ease; }
.card.open .mk, .card.done .mk { display: none; }
.card.done { box-shadow: 0 0 0 4px var(--lime); cursor: default; }
@keyframes pop { from { transform: scale(0.5); } to { transform: scale(1); } }
.status { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.status p { font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.04em; }
.win { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: var(--lime); }
.game .btn { background: var(--lime); color: var(--lime-fg); min-height: 44px; padding: 10px 20px; }
.game .btn-ghost { background: transparent; color: var(--band-fg); border-color: var(--band-muted); }

/* Contact */
.contact .wrap { padding-block: 72px; display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.contact h1, .contact h2 { font-size: clamp(2rem, 5.6vw, 3.6rem); font-weight: 800; max-width: 20ch; }
.mail {
  font-family: var(--font-mono); font-size: 1.05rem; padding: 14px 18px; border-radius: 12px;
  border: 2px solid var(--accent); color: var(--accent); overflow-wrap: anywhere; text-decoration: none; font-weight: 500;
}
.mail:hover { background: var(--accent); color: var(--accent-fg); }
.facts { display: grid; gap: 14px 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); margin: 0; }
.facts div { border-top: 1px solid var(--line); padding-top: 12px; }
.facts dt { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-weight: 500; }

/* Pied de page */
.foot { border-top: 1px solid var(--line); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; align-items: flex-start; padding-block: 32px; color: var(--muted); font-size: 0.92rem; }
.foot .brand { font-size: 1rem; color: var(--fg); }
.foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--accent); }
.foot .legal { flex-basis: 100%; font-size: 0.85rem; }

/* Page de choix de langue */
.choose { min-height: 100vh; display: grid; place-items: center; padding: 24px; text-align: center; }
.choose .box { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.choose .brand { font-size: 1.6rem; }
.choose .cta-row { justify-content: center; }

/* DactyShoot : réservé aux appareils avec clavier */
.fiche-dacty .pc-badge { align-self: flex-start; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; border: 1.5px solid var(--lime-fg); border-radius: 999px; padding: 3px 10px; }
.fiche-dacty .touch-note { display: none; font-weight: 700; }
@media (hover: none) and (pointer: coarse) {
  .fiche-dacty h3 a { pointer-events: none; }
  .fiche-dacty .more { display: none; }
  .fiche-dacty .touch-note { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .steps::after, .card.open .emo, .card.done .emo { animation: none; }
  .btn, .fiche, .card { transition: none; }
}
