/* ==========================================================================
   Anima — page publique senioria-factory.com
   Charte : logo carré noir à quatre pastilles, GeneralSans, bleu #1F27FF.
   ========================================================================== */

@font-face {
  font-family: 'GeneralSans';
  src: url('/anima/fonts/GeneralSans-Variable.woff2') format('woff2');
  font-weight: 200 700;
  font-display: swap;
}

:root {
  --encre:      #14131A;
  --encre-doux: #55545F;
  --papier:     #FFFFFF;
  --pale:       #F4F4F8;
  --craie:      #E2E2EC;
  --bleu:       #1F27FF;
  --bleu-vif:   #454BFF;
  --bleu-pale:  #EEEFFF;

  --shell: 1180px;
  --r: 10px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: 'GeneralSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 420;
  font-size: 17px;
  line-height: 1.62;
  color: var(--encre);
  background: var(--papier);
  -webkit-font-smoothing: antialiased;
  /* Page courte : le pied reste en bas et le héros se centre sur les grands écrans. */
  min-height: 100dvh;
  display: flex; flex-direction: column;
}

main { flex: 1; display: flex; align-items: center; }
.hero { width: 100%; }

img { max-width: 100%; display: block; }
a { color: inherit; }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 40px);
}

.skip {
  position: absolute; left: -9999px;
  background: var(--encre); color: #fff;
  padding: 12px 18px; border-radius: var(--r); z-index: 99;
}
.skip:focus { left: 16px; top: 16px; }

:focus-visible { outline: 2.5px solid var(--bleu); outline-offset: 3px; border-radius: 4px; }

/* ---------- Typographie commune ---------- */

h1, h2, h3 { font-weight: 620; letter-spacing: -0.028em; line-height: 1.08; }
h1, h2 { text-wrap: balance; }

h1 { font-size: clamp(2.35rem, 5.1vw, 4rem); letter-spacing: -0.038em; }
h2 { font-size: clamp(1.7rem, 3.1vw, 2.5rem); }
h3 { font-size: 1.08rem; letter-spacing: -0.015em; }

.eyebrow {
  display: flex; align-items: center; gap: 9px;
  font-size: 0.71rem; font-weight: 620; text-transform: uppercase;
  letter-spacing: 0.15em; color: var(--encre-doux);
  margin-bottom: 22px;
}
.eyebrow::before {
  content: ''; width: 9px; height: 9px; border-radius: 2px;
  background: var(--bleu); flex: none;
}
.eyebrow--clair { color: #A3A2B4; }

.lead { font-size: clamp(1.06rem, 1.5vw, 1.22rem); color: var(--encre-doux); }

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-weight: 560; font-size: 0.97rem;
  padding: 13px 24px; border-radius: var(--r);
  border: 1.5px solid transparent; cursor: pointer;
  text-decoration: none; white-space: nowrap;
  transition: transform .16s ease, background-color .16s ease, border-color .16s ease, color .16s ease;
}
.btn:active { transform: translateY(1px); }

.btn--blue { background: var(--bleu); color: #fff; }
.btn--blue:hover { background: var(--bleu-vif); }

.btn--ink { background: var(--encre); color: #fff; }
.btn--ink:hover { background: #2C2B38; }

.btn--ghost { background: transparent; color: var(--encre); border-color: var(--craie); }
.btn--ghost:hover { border-color: var(--encre); }

/* ---------- Barre supérieure ---------- */

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--craie);
}
.topbar__inner { display: flex; align-items: center; gap: 24px; height: 68px; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand span { font-size: 1.22rem; font-weight: 600; letter-spacing: -0.03em; }
.brand img { width: 34px; height: 34px; }

.topbar__cta { margin-left: auto; padding: 10px 20px; font-size: 0.92rem; }

/* ---------- Hero ---------- */

.hero { padding: clamp(52px, 7vw, 92px) 0 clamp(40px, 5vw, 68px); }

.hero__inner {
  display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(32px, 4vw, 56px); align-items: center;
}

/* Les largeurs sont en `ch` : relatives à la taille du texte de l'élément,
   donc bien plus larges sur le titre que sur le paragraphe. */
.hero h1 { max-width: 15ch; }
.hero .lead { margin-top: 22px; max-width: 42ch; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hero__note { margin-top: 18px; font-size: 0.87rem; color: var(--encre-doux); }

@media (max-width: 1080px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero h1 { max-width: 100%; }
  .hero .lead { max-width: 52ch; }
}

@media (max-width: 460px) {
  .hero__actions { display: grid; grid-template-columns: 1fr; }
}

/* ---------- Signature : la grille ---------- */

.grille { --cell: clamp(30px, 4.6vw, 52px); }

.grille__board {
  display: grid;
  grid-template-columns: repeat(10, var(--cell));
  grid-auto-rows: var(--cell);
  gap: 3px;
  justify-content: center;
}

.cel {
  position: relative;
  border-radius: 3px;
  display: grid; place-items: center;
  font-size: calc(var(--cell) * 0.46);
  font-weight: 560; letter-spacing: 0;
  background: transparent;
}
.cel--vide { background: transparent; }

.cel--pleine {
  background: var(--papier);
  border: 1.5px solid var(--craie);
  color: var(--encre);
  opacity: 0;
  transform: scale(.82);
  animation: pose .42s cubic-bezier(.2,.8,.3,1) forwards;
  animation-delay: var(--retard, 0s);
}

.cel--axe { color: #fff; border-color: var(--bleu); background: var(--bleu); }

.cel__num {
  position: absolute; top: 2px; left: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: calc(var(--cell) * 0.24); font-weight: 500;
  color: var(--encre-doux); line-height: 1;
}
.cel--axe .cel__num { color: rgba(255,255,255,.72); }

@keyframes pose { to { opacity: 1; transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  .cel--pleine { animation: none; opacity: 1; transform: none; }
}

.grille__legende {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  justify-content: center;
  margin-top: 20px;
  font-size: 0.8rem; color: var(--encre-doux);
}
.grille__legende b { font-weight: 600; color: var(--encre); }

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

.pied { border-top: 1px solid var(--craie); padding: clamp(40px, 5vw, 64px) 0 32px; }
.pied__inner { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; }

.pied__marque { display: flex; gap: 14px; align-items: flex-start; }
.pied__marque p { font-size: 0.9rem; color: var(--encre-doux); }

.pied__liens { display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: flex-start; font-size: 0.92rem; }
.pied__liens a, .pied__liens button {
  font: inherit; color: var(--encre-doux); background: none; border: 0;
  padding: 0; cursor: pointer; text-decoration: none;
}
.pied__liens a:hover, .pied__liens button:hover { color: var(--encre); box-shadow: inset 0 -1.5px 0 var(--bleu); }

.pied__bas {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--craie);
  font-size: 0.8rem; color: var(--encre-doux);
}
.pied__bas a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
