/* Socle commun du gym CareLab (home, fiche d'app) : tokens, base, en-tête, pied, curseur, panneau du gym. */
/* Tokens : 00-brand/design-tokens.json */
:root {
  --primary: #3D39F4; --secondary: #A78BFA; --accent: #C1D3EF; --coral: #FF6B9A;
  --sunshine: #FFD23F; --leaf: #1DB9B2; --ink: #1F1F3B; --neutral: #F2F2F7; --white: #FFFFFF;
  --page: var(--white); /* fond blanc (2026-11-04) ; --neutral reste pour les pastilles */ --muted: #55557a;
  --ease-spring: cubic-bezier(.3, 1.6, .5, 1); --ease-out: cubic-bezier(.2, .8, .2, 1);
  --r: 24px;
}
/* Rubrique : --t couleur, --on texte sur la couleur, --edge bord quand la couleur se perd sur le fond.
   --tile : version fade du token (18 % du token dans du blanc) pour poser la mascotte ; texte et membres en encre dessus.
   Contraste mascotte/tuile mesuré : encre 11,1, indigo 5,1, lavande 2,3, corail 2,3, vert 2,1, jaune 1,35, lilas 1,2
   Privacy : sa couleur alternative est le blanc (décidé 2026-11-01). Une ombre légère détache la mascotte de sa tuile. */
[data-t="trust"]   { --t: var(--ink);       --on: var(--white); --edge: var(--ink); }
[data-t="time"]    { --t: var(--primary);   --on: var(--white); --edge: var(--primary); }
[data-t="health"]  { --t: var(--secondary); --on: var(--ink);   --edge: var(--secondary); }
[data-t="planet"]  { --t: var(--leaf);      --on: var(--ink);   --edge: var(--leaf); }
[data-t="culture"] { --t: var(--sunshine);  --on: var(--ink);   --edge: var(--sunshine); }
[data-t="privacy"] { --t: var(--accent);    --on: var(--ink);   --edge: var(--secondary); }
[data-t="social"]  { --t: var(--coral);     --on: var(--ink);   --edge: var(--coral); }
[data-t] { --tile: color-mix(in srgb, var(--t) 18%, var(--white)); }
[data-t="privacy"] { --tile: var(--white); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body { margin: 0; font: 400 16px/1.55 Poppins, system-ui, sans-serif; color: var(--ink); background: var(--page); transition: background-color .6s var(--ease-out); overflow-x: clip; } /* clip et non hidden : hidden casse les éléments collants (sommaire, beans) */
a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
/* --gutter : marge latérale de tout le site. padding-inline seulement : une section .wrap peut régler son padding vertical sans écraser les marges */
:root { --gutter: 28px; }
.wrap { max-width: 1240px; margin: 0 auto; padding-inline: var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Grain riso, comme la planche */
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 90; opacity: .07; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
body.no-grain::after { display: none; }

/* ---------- En-tête ---------- */
.top { position: sticky; top: 0; z-index: 50; transition: background-color .3s, box-shadow .3s; }
.top.scrolled { background: color-mix(in srgb, var(--page) 86%, transparent); backdrop-filter: blur(12px); box-shadow: 0 1px 0 rgba(31,31,59,.06); }
.top .wrap { display: flex; align-items: center; gap: 24px; height: 72px; }
.minilogo { width: 132px; height: 30px; flex: none; opacity: 0; pointer-events: none; transition: opacity .2s; background: none; border: 0; padding: 0; cursor: pointer; }
.minilogo.on { opacity: 1; pointer-events: auto; }
.minilogo svg { width: 100%; height: 100%; display: block; overflow: visible; }
.nav { position: relative; display: flex; gap: 4px; margin: 0 auto; }
.nav a { position: relative; z-index: 1; padding: 9px 16px; text-decoration: none; font-weight: 500; font-size: 15px; border-radius: 999px; transition: color .25s; }
.nav .bean { position: absolute; z-index: 0; top: 0; height: 100%; border-radius: 999px; background: var(--ink); opacity: 0; transition: left .45s var(--ease-spring), width .45s var(--ease-spring), opacity .2s, background-color .3s; }
.cta { display: inline-flex; align-items: center; gap: 8px; background: var(--primary); color: var(--white); border: 0; border-radius: 999px; padding: 12px 20px; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; transition: transform .35s var(--ease-spring), box-shadow .3s; white-space: nowrap; }
.cta:hover { box-shadow: 0 10px 24px rgba(61,57,244,.35); }
.cta .arr { display: inline-block; transition: transform .35s var(--ease-spring); }
.cta:hover .arr { transform: translateX(4px) rotate(-12deg); }

/* ---------- Pied ---------- */
footer { margin-top: 120px; background: var(--ink); color: var(--white); padding: 72px 0 36px; }
footer .biglogo { width: min(820px, 100%); aspect-ratio: 1272 / 225; margin-bottom: 48px; }
footer .biglogo svg { width: 100%; height: 100%; overflow: visible; display: block; }
footer .cols3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; font-size: 14px; }
footer h4 { margin: 0 0 10px; font: 600 13px/1 Poppins; letter-spacing: .06em; text-transform: uppercase; opacity: .6; }
footer a { display: block; text-decoration: none; opacity: .85; padding: 3px 0; }
footer a:hover { opacity: 1; }
footer small { display: block; margin-top: 48px; opacity: .5; }

/* ---------- Curseur ---------- */
.cursor { position: fixed; z-index: 100; left: 0; top: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--ink); pointer-events: none;
  transition: width .3s var(--ease-spring), height .3s var(--ease-spring), margin .3s var(--ease-spring), background-color .25s, opacity .2s; opacity: 0; }
.cursor.on { opacity: 1; }
.cursor.big { width: 46px; height: 46px; margin: -23px 0 0 -23px; background: color-mix(in srgb, var(--c, var(--ink)) 55%, transparent); }
body.no-cursor .cursor { display: none; }
@media (pointer: coarse) { .cursor { display: none; } }

/* ---------- Panneau du gym ---------- */
.gympanel { position: fixed; z-index: 95; right: 16px; bottom: 16px; display: flex; gap: 6px; padding: 6px; border-radius: 999px; background: var(--ink); box-shadow: 0 12px 30px rgba(31,31,59,.3); }
.gympanel button { border: 0; border-radius: 999px; padding: 8px 12px; background: transparent; color: var(--white); font: 600 12px/1 Poppins; cursor: pointer; }
.gympanel button:hover { background: rgba(255,255,255,.12); }
.gympanel button[aria-pressed="false"] { opacity: .5; }

@media (max-width: 900px) {
  :root { --gutter: 22px; }
  .nav { display: none; }
  .top .wrap { justify-content: space-between; }
  .minilogo { opacity: 1; pointer-events: auto; }
  .top .wrap { gap: 12px; }
  .top .cta { padding: 10px 14px; font-size: 14px; white-space: nowrap; }
  footer .cols3 { grid-template-columns: 1fr; }
  .gympanel { left: 16px; right: 16px; justify-content: center; flex-wrap: wrap; border-radius: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Panneau de réglages du gym : outil de travail, visible seulement avec ?gym dans l'adresse */
.gympanel { display: none; }
html.is-gym .gympanel { display: flex; }
