/* GeniMath — page d’accueil (index.html). Bandeau et pied de page : commun.css */
:root { font-family: var(--font); color: var(--ink); background: var(--page); font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
button { font: inherit; }
svg { flex-shrink: 0; }
a:focus-visible, button:focus-visible { outline: 3px solid #f0a400; outline-offset: 4px; border-radius: 6px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Atelier (zone principale) ---------- */
/* L'image fait 1671 × 490 ; la zone claire de l'atelier est centrée à 44,3 % de sa largeur. */
.hero { --hero-h: clamp(360px, calc(100vw * 490 / 1671), 640px); --art-w: max(100vw, calc(var(--hero-h) * 1671 / 490)); position: relative; overflow: hidden; background: #f3d3ae; height: var(--hero-h); width: 100%; display: flex; align-items: center; justify-content: center; }
.hero-art, .hero-art img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-art img { object-fit: cover; object-position: 50% 100%; }
.hero-content { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; width: min(calc(var(--art-w) * .37), 640px); margin-bottom: 2.5%; transform: translateX(calc(var(--art-w) * -0.057)); }
.hero-logo { position: relative; margin: 0; line-height: 1; padding: .34em .5em .42em; font-size: clamp(48px, calc(var(--art-w) * .058), 112px); }
.logo-swoosh { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.swoosh-gold { fill: #f2b51a; filter: drop-shadow(0 0 6px rgba(255, 214, 90, .65)); }
.swoosh-red { fill: var(--red); }
.logo-text { position: relative; display: inline-block; font-weight: 900; font-style: italic; letter-spacing: -.045em; white-space: nowrap; text-shadow: 0 2px 0 #fff, 0 0 18px rgba(255, 255, 255, .9); }
.logo-geni { color: #1e1f24; }
.logo-math { color: var(--red); }
.hero-tagline { margin: .1em 0 0; font-size: clamp(18px, calc(var(--art-w) * .021), 36px); font-weight: 700; letter-spacing: -.3px; color: #2a2b30; text-shadow: 0 0 12px rgba(255, 250, 240, .95); }
.hero-button { margin-top: clamp(12px, calc(var(--art-w) * .016), 28px); display: inline-flex; align-items: center; justify-content: center; gap: .6em; min-height: 56px; padding: .62em 1.15em; border-radius: 16px; background: linear-gradient(#dd1a22, #c20f17); color: #fff; text-decoration: none; font-size: clamp(16px, calc(var(--art-w) * .0185), 30px); font-weight: 800; letter-spacing: -.3px; box-shadow: 0 6px 0 var(--red-dark), 0 14px 26px rgba(120, 20, 10, .28); transition: transform .15s ease, box-shadow .15s ease; }
.hero-button svg { width: 1.35em; height: 1.35em; fill: none; stroke: currentColor; stroke-width: 2.3; }
.hero-button .arrow { margin-left: .25em; font-size: 1.05em; }
.hero-button:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--red-dark), 0 18px 30px rgba(120, 20, 10, .32); }
.hero-button:active { transform: translateY(3px); box-shadow: 0 3px 0 var(--red-dark), 0 8px 16px rgba(120, 20, 10, .25); }
.hero-button:focus-visible { outline-offset: 6px; }

/* ---------- Cartes des univers ---------- */
.universes { max-width: 1560px; margin: 0 auto; padding: 40px 28px 30px; }
.universe-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 1.3vw, 22px); }
.universe-card { --accent: var(--red); --tint: #fde1e1; position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: 26px; background: linear-gradient(180deg, var(--tint) 0%, #fffaf8 75%); border-bottom: 8px solid var(--accent); box-shadow: 0 2px 0 rgba(0, 0, 0, .03), 0 10px 26px rgba(70, 40, 20, .08); transition: transform .18s ease, box-shadow .18s ease; scroll-margin-top: 20px; }
.universe-card.is-teal { --accent: #12807f; --tint: #dbf2f1; }
.universe-card.is-gold { --accent: #c9850d; --tint: #fdeed5; }
.universe-card.is-violet { --accent: #6a2fd0; --tint: #ece2fc; }
.card-link { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 30px 22px 64px; text-decoration: none; color: inherit; border-radius: 26px; }
.card-icon { width: clamp(64px, 5.6vw, 92px); height: clamp(64px, 5.6vw, 92px); fill: none; stroke: var(--accent); stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; }
.card-icon .fill { fill: var(--accent); stroke: none; }
.universe-card h3 { margin: 12px 0 6px; font-size: clamp(26px, 2.6vw, 44px); font-weight: 900; letter-spacing: -.04em; line-height: 1.05; color: #26272c; }
.universe-card p { margin: 0 0 14px; max-width: 26ch; font-size: 15px; line-height: 1.4; color: var(--muted); }
.card-status { margin-top: auto; display: inline-flex; gap: 6px; align-items: center; font-size: 14px; font-weight: 800; padding: 6px 13px; border-radius: 999px; color: var(--accent); background: rgba(255, 255, 255, .85); border: 1.5px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.card-status.is-ready { color: #fff; background: var(--accent); border-color: var(--accent); }
.card-wave { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 62px; }
.card-wave path { fill: var(--accent); opacity: .16; }
.card-wave .wave-back { opacity: .2; }
.universe-card:has(a.card-link):hover { transform: translateY(-4px); box-shadow: 0 2px 0 rgba(0, 0, 0, .03), 0 16px 34px rgba(150, 20, 20, .16); }
.soon-note { margin: 22px auto 0; text-align: center; color: var(--muted); font-size: 14px; }

/* ---------- Ordinateurs moyens ---------- */
@media (max-width: 1100px) {
  .universe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .universe-card h3 { font-size: 34px; }
  .card-icon { width: 76px; height: 76px; }
}

/* ---------- Atelier : mise en page empilée ---------- */
@media (max-width: 860px) {
  .hero { height: auto; flex-direction: column; background: radial-gradient(ellipse 90% 80% at 50% 45%, #fffaf3 0%, #fbe7cf 55%, #f2cfa6 100%); }
  .hero-content { order: 1; width: 100%; min-width: 0; margin: 0; transform: none; padding: 26px 18px 18px; }
  .hero-logo { font-size: clamp(50px, 14vw, 96px); }
  .hero-tagline { font-size: clamp(21px, 5.6vw, 30px); }
  .hero-button { font-size: clamp(17px, 4.6vw, 22px); width: min(100%, 420px); }
  .hero-art { order: 2; position: relative; display: block; width: 100%; height: auto; aspect-ratio: 870 / 490; -webkit-mask-image: linear-gradient(transparent, #000 14%); mask-image: linear-gradient(transparent, #000 14%); }
  .hero-art img { position: absolute; object-position: 50% 100%; }
  .universes { padding: 28px 16px 24px; }
}
@media (max-width: 560px) {
  .universe-grid { grid-template-columns: 1fr; }
  .card-link { padding: 24px 18px 58px; }
  .universe-card h3 { font-size: 30px; }
  .card-icon { width: 64px; height: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
