/* ═══════════════════════════════════════════════════════════════
   BULLE RESPIRE — design system
   Identité OFFICIELLE La Bulle d'Équilibre (logo_final.html) :
   navy #162035 + or #C9A84C + bleu ciel #7BAFD4 + bleu acier #4891b5.
   Cormorant Garamond (display) + Outfit (UI). Jamais de violet/rose.
   3 espaces théматisés via body[data-space], différenciés par nuance
   et fond (jamais par une teinte hors charte).
   Règle projet : pas d'animation infinie au-dessus de la ligne de
   flottaison (blocage screenshot) → itérations finies partout.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --navy: #162035;
  --navy-2: #1d2a44;
  --navy-3: #26365a;
  --gold: #c9a84c;
  --gold-soft: #e3cd8a;
  --gold-ink: #8a6d22;   /* or lisible sur blanc (AA) */
  --sky: #7bafd4;        /* bleu ciel officiel */
  --steel: #4891b5;      /* bleu acier officiel */
  --steel-dark: #1f5f80; /* liens sur blanc (AA) */
  --cream: #faf7ef;
  --card: #FFFFFF;
  --ink: #162035;
  --ink-soft: #4a5e7a;
  --ink-mute: #7c8aa3;
  --line: #e5e9f1;
  --ok: #4CAF7D;
  --warn: #D98E32;
  --bad: #C75C5C;
  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 9px;
  --shadow: 0 10px 34px rgba(22, 32, 53, .10);
  --shadow-soft: 0 4px 14px rgba(22, 32, 53, .07);
  --accent: var(--steel);
  --accent-soft: rgba(72, 145, 181, .13);
  /* Alias de compatibilité (anciens noms utilisés dans les vues JS) → couleurs officielles */
  --aqua: var(--sky);
  --aqua-deep: var(--steel);
  --lav: var(--gold-soft);
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-ui: 'Outfit', 'Segoe UI', sans-serif;
}
body[data-space="org"] { --accent: var(--gold-ink); --accent-soft: rgba(201, 168, 76, .16); }
body[data-space="super"] { --accent: var(--gold-soft); --accent-soft: rgba(227, 205, 138, .18); }

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-ui);
  background: var(--cream);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

#app { position: relative; z-index: 1; }

/* ── Écrans auth ── */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card {
  width: 100%; max-width: 430px; background: var(--card); border-radius: var(--r-lg);
  box-shadow: var(--shadow); padding: 40px 38px; animation: rise .55s cubic-bezier(.2,.9,.3,1) both;
}
.brand { text-align: center; margin-bottom: 26px; }
.brand h1 { font-family: var(--font-display); font-size: 34px; font-weight: 600; color: var(--navy); letter-spacing: .01em; }
.brand h1 em { color: var(--steel); font-style: normal; }
.brand .tag { font-size: 12.5px; color: var(--ink-mute); letter-spacing: .14em; text-transform: uppercase; margin-top: 3px; }

/* ── Label de section (eyebrow) — vocabulaire visuel de la marque ── */
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-ink); text-align: center; margin-bottom: 10px; }
body[data-space="super"] .eyebrow { color: var(--gold-soft); }

/* ══════════════════ MINI-SITE VITRINE (page d'accueil / connexion) ══════════════════ */
.landing { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 0 24px 10px; }
.l-nav { display: flex; align-items: center; justify-content: space-between; padding: 22px 0; }
.l-brand { display: flex; align-items: center; gap: 10px; color: var(--navy); text-decoration: none; }
.l-brand svg:last-child { color: var(--navy); }

.l-hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 52px; align-items: start; padding: 20px 0 56px; }
.l-hero-copy { padding-top: 18px; }
.l-h1 { font-family: var(--font-display); font-size: clamp(34px, 4.4vw, 52px); line-height: 1.08; color: var(--navy); font-weight: 600; margin: 6px 0 18px; }
.l-h1 span { color: var(--steel); font-style: italic; }
.l-lead { font-size: 16.5px; color: var(--ink-soft); max-width: 480px; margin-bottom: 26px; }
.l-lead b { color: var(--navy); }
.l-proof { display: flex; gap: 30px; margin-bottom: 4px; flex-wrap: wrap; }
.l-proof-item { display: flex; flex-direction: column; }
.l-proof-item b { font-family: var(--font-display); font-size: 30px; font-weight: 700; color: var(--gold-ink); line-height: 1; }
.l-proof-item span { font-size: 12px; color: var(--ink-mute); max-width: 140px; margin-top: 4px; }
.l-cta-row { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }

.l-auth { position: sticky; top: 24px; max-width: 420px; margin-left: auto; animation: rise .6s cubic-bezier(.16,1,.3,1) both; }
.l-auth-tabs { display: flex; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 22px; }
.l-tab { flex: 1; border: none; background: transparent; font-family: var(--font-ui); font-weight: 600; font-size: 13.5px; padding: 10px 0; cursor: pointer; color: var(--ink-soft); transition: background .18s, color .18s; }
.l-tab.on { background: var(--navy); color: #fff; }

.l-section { padding: 54px 0; text-align: center; }
.l-section--tint { background: var(--cream); border-radius: var(--r-lg); margin: 0 -24px; padding: 54px 24px; width: calc(100% + 48px); }
.l-h2 { font-family: var(--font-display); font-size: clamp(26px, 3vw, 34px); color: var(--navy); font-weight: 600; margin-bottom: 34px; }

.l-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; text-align: left; }
.l-step { background: var(--card); border-radius: var(--r-md); padding: 26px 22px; box-shadow: var(--shadow-soft); }
.l-step-ic { font-size: 30px; margin-bottom: 12px; }
.l-step h3 { font-family: var(--font-display); font-size: 19px; color: var(--navy); margin-bottom: 6px; }
.l-step p { font-size: 13.5px; color: var(--ink-soft); }

.l-families { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: left; }
.l-fam { background: var(--card); border-radius: var(--r-md); padding: 22px 20px; box-shadow: var(--shadow-soft); }
.l-fam-ic { font-size: 26px; margin-bottom: 10px; }
.l-fam h3 { font-family: var(--font-display); font-size: 17px; color: var(--navy); margin-bottom: 6px; }
.l-fam p { font-size: 12.5px; color: var(--ink-mute); line-height: 1.5; }

.l-audience { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; text-align: left; }
.l-aud-card { background: var(--card); border-radius: var(--r-lg); padding: 30px 28px; box-shadow: var(--shadow-soft); border: 1.5px solid var(--line); }
.l-aud-card--gold { border-color: var(--gold-soft); background: linear-gradient(160deg, #fff, #FBF6E8); }
.l-aud-ic { font-size: 34px; margin-bottom: 12px; }
.l-aud-card h3 { font-family: var(--font-display); font-size: 22px; color: var(--navy); margin-bottom: 8px; }
.l-aud-card p { font-size: 14px; color: var(--ink-soft); }

.l-footer { text-align: center; padding: 50px 0 30px; border-top: 1px solid var(--line); margin-top: 20px; }
.l-footer-brand { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--navy); margin-bottom: 14px; }
.l-footer p { font-size: 14px; color: var(--ink-soft); margin-bottom: 4px; }

/* Révélation douce au scroll — une seule fois, transition finie (pas d'animation en boucle) */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .l-hero { grid-template-columns: 1fr; gap: 34px; }
  .l-auth { position: static; }
  .l-steps, .l-families { grid-template-columns: 1fr 1fr; }
  .l-audience { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .l-steps, .l-families { grid-template-columns: 1fr; }
  .l-proof { gap: 20px; }
  .l-cta-row .btn { flex: 1; }
}

/* ── Formulaires ── */
label.f { display: block; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); margin: 15px 0 5px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=url], select, textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: #FCFBF8;
  padding: 11px 13px; font-family: var(--font-ui); font-size: 14.5px; color: var(--ink);
  transition: border-color .18s, box-shadow .18s, background .18s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px var(--accent-soft); }
textarea { resize: vertical; min-height: 74px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; cursor: pointer; font-family: var(--font-ui); font-weight: 600;
  font-size: 14.5px; border-radius: 12px; padding: 12px 22px;
  background: linear-gradient(135deg, var(--navy), var(--navy-3));
  color: #fff; box-shadow: 0 6px 18px rgba(22,32,53,.22);
  transition: transform .16s, box-shadow .16s, filter .16s;
}
.btn:hover { transform: translateY(-1.5px); box-shadow: 0 10px 24px rgba(22,32,53,.28); }
.btn:active { transform: translateY(0) scale(.985); }
.btn.accent { background: linear-gradient(135deg, var(--steel), var(--sky)); box-shadow: 0 6px 18px rgba(72,145,181,.3); }
.btn.gold { background: linear-gradient(135deg, #A8873B, var(--gold)); box-shadow: 0 6px 18px rgba(201,168,76,.32); }
.btn.ghost { background: transparent; color: var(--navy); box-shadow: none; border: 1.5px solid var(--line); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn.danger { background: linear-gradient(135deg, #A34848, var(--bad)); }
.btn.block { width: 100%; }
.btn.sm { padding: 7px 14px; font-size: 13px; border-radius: 9px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.linkish { background: none; border: none; color: var(--accent); font-family: var(--font-ui); cursor: pointer; font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; }

/* ── Shell app ── */
.shell { max-width: 1180px; margin: 0 auto; padding: 0 22px 90px; }
.topbar {
  position: sticky; top: 0; z-index: 40; backdrop-filter: blur(14px);
  background: rgba(247,244,238,.86); border-bottom: 1px solid var(--line);
  margin: 0 -22px 26px; padding: 13px 22px;
  display: flex; align-items: center; gap: 18px;
}
body[data-space="super"] .topbar { background: rgba(22,32,53,.92); border-bottom-color: var(--navy-3); }
.topbar .logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 21px; font-weight: 600; color: var(--navy); white-space: nowrap; }
body[data-space="super"] .topbar .logo { color: #fff; }

/* Nav principale : ≤5 entrées visibles + un menu « Plus » pour le reste (jamais de scroll
   horizontal caché — un item invisible sans indice était la cause de l'illisibilité). */
.nav { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; }
.nav a {
  padding: 8px 15px; border-radius: 24px; text-decoration: none; color: var(--ink-soft);
  font-size: 14px; font-weight: 500; white-space: nowrap; transition: background .18s, color .18s;
}
.nav a:hover, .nav a:focus-visible { background: var(--accent-soft); color: var(--accent); }
.nav a.on { background: var(--navy); color: #fff; }
body[data-space="org"] .nav a.on { background: var(--gold); color: var(--navy); }
body[data-space="super"] .nav a { color: #B9C2D4; }
body[data-space="super"] .nav a.on { background: var(--gold-soft); color: var(--navy); }

.nav-more { position: relative; }
.nav-more-btn {
  display: inline-flex; align-items: center; gap: 4px; border: none; background: transparent; cursor: pointer;
  padding: 8px 14px; border-radius: 24px; color: var(--ink-soft); font-family: var(--font-ui);
  font-size: 14px; font-weight: 500; transition: background .18s, color .18s;
}
.nav-more-btn .car { font-size: 10px; transition: transform .18s; }
.nav-more-btn[aria-expanded="true"] .car { transform: rotate(180deg); }
.nav-more-btn:hover, .nav-more-btn:focus-visible, .nav-more-btn.on { background: var(--accent-soft); color: var(--accent); }
body[data-space="super"] .nav-more-btn { color: #B9C2D4; }
.nav-more-panel {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 45; min-width: 200px;
  background: var(--card); border-radius: var(--r-md); box-shadow: var(--shadow);
  border: 1px solid var(--line); padding: 6px; display: flex; flex-direction: column; gap: 2px;
  animation: rise .16s cubic-bezier(.2,.9,.3,1) both;
}
.nav-more-panel[hidden] { display: none; }
.nav-more-panel a { padding: 9px 13px; border-radius: 9px; color: var(--ink); }
.nav-more-panel a:hover, .nav-more-panel a:focus-visible { background: var(--accent-soft); color: var(--accent); }
.nav-more-panel a.on { background: var(--navy); color: #fff; }
body[data-space="super"] .nav-more-panel { background: var(--navy-2); border-color: var(--navy-3); }
body[data-space="super"] .nav-more-panel a { color: #E8ECF4; }

.topbar-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }

.viewswitch { display: flex; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; }
.viewswitch button { border: none; background: transparent; font-family: var(--font-ui); font-size: 12.5px; font-weight: 600; padding: 7px 12px; cursor: pointer; color: var(--ink-soft); transition: background .15s, color .15s; }
.viewswitch button.on { background: var(--navy); color: #fff; }
body[data-space="super"] .viewswitch { border-color: var(--navy-3); }
body[data-space="super"] .viewswitch button { color: #B9C2D4; }
body[data-space="super"] .viewswitch button.on { background: var(--gold-soft); color: var(--navy); }
.mobile-drawer-panel .viewswitch { margin-top: 22px; align-self: flex-start; }

.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 15px; cursor: pointer; border: 2px solid var(--gold-soft); flex-shrink: 0; }

/* ── Menu mobile (hamburger + tiroir) — masqué en desktop, cf. media query ── */
.menu-toggle {
  display: none; flex-direction: column; justify-content: center; align-items: center; gap: 4px;
  width: 38px; height: 38px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card);
  cursor: pointer; flex-shrink: 0; padding: 0;
}
.menu-toggle span { width: 17px; height: 2px; border-radius: 2px; background: var(--ink-soft); transition: transform .2s, opacity .2s; }
body[data-space="super"] .menu-toggle { background: var(--navy-2); border-color: var(--navy-3); }
body[data-space="super"] .menu-toggle span { background: #D5DCEA; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-drawer { position: fixed; inset: 0; z-index: 80; }
.mobile-drawer-backdrop { position: absolute; inset: 0; background: rgba(22,32,53,.5); backdrop-filter: blur(3px); animation: fadein .2s both; }
.mobile-drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(300px, 84vw); background: var(--cream);
  box-shadow: -14px 0 34px rgba(22,32,53,.22); padding: 20px; display: flex; flex-direction: column;
  animation: slidein .22s cubic-bezier(.16,1,.3,1) both; overflow-y: auto;
}
@keyframes slidein { from { transform: translateX(100%) } to { transform: translateX(0) } }
.mobile-drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.mobile-drawer-head .txt { font-family: var(--font-display); font-size: 19px; font-weight: 600; color: var(--navy); }
.mobile-drawer-close { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card); cursor: pointer; font-size: 15px; color: var(--ink-soft); }
.mobile-drawer-links { display: flex; flex-direction: column; gap: 2px; }
.mobile-drawer-links a { padding: 12px 14px; border-radius: 10px; text-decoration: none; color: var(--ink); font-size: 15px; font-weight: 500; }
.mobile-drawer-links a:hover, .mobile-drawer-links a:focus-visible { background: var(--accent-soft); color: var(--accent); }
.mobile-drawer-links a.on { background: var(--navy); color: #fff; }

/* ── Espace super : fond sombre ── */
body[data-space="super"] { background: linear-gradient(180deg, #101828, var(--navy) 40%); color: #E8ECF4; }
body[data-space="super"] .card { background: var(--navy-2); border: 1px solid var(--navy-3); color: #E8ECF4; }
body[data-space="super"] h2.sec, body[data-space="super"] .card h3 { color: #fff; }
body[data-space="super"] input, body[data-space="super"] select, body[data-space="super"] textarea { background: #17223A; border-color: var(--navy-3); color: #E8ECF4; }
body[data-space="super"] label.f { color: #9AA6BE; }
body[data-space="super"] .muted { color: #8B97B0; }
body[data-space="super"] table.tbl th { color: #9AA6BE; border-bottom-color: var(--navy-3); }
body[data-space="super"] table.tbl td { border-bottom-color: var(--navy-3); }
body[data-space="super"] .btn.ghost { color: #D5DCEA; border-color: var(--navy-3); }

/* Les modales restent TOUJOURS claires, même ouvertes depuis le Pilotage (sombre) : sans ceci,
   les couleurs "mode sombre" ci-dessus (pensées pour le tableau de bord) fuient dans les modales
   à fond blanc et deviennent illisibles (ex: bouton ✨ Copilote IA presque invisible). */
body[data-space="super"] .modal { color: var(--ink); }
body[data-space="super"] .modal label.f { color: var(--ink-soft); }
body[data-space="super"] .modal .muted { color: var(--ink-mute); }
body[data-space="super"] .modal input,
body[data-space="super"] .modal select,
body[data-space="super"] .modal textarea { background: #FCFBF8; color: var(--ink); border-color: var(--line); }
body[data-space="super"] .modal input:focus,
body[data-space="super"] .modal select:focus,
body[data-space="super"] .modal textarea:focus { background: #fff; }
body[data-space="super"] .modal .btn.ghost { color: var(--navy); border-color: var(--line); }
body[data-space="super"] .modal .btn.ghost:hover { color: var(--accent); border-color: var(--accent); }
body[data-space="super"] .modal table.tbl th { color: var(--ink-mute); border-bottom-color: var(--line); }
body[data-space="super"] .modal table.tbl td { border-bottom-color: var(--line); }
body[data-space="super"] .modal h3 { color: var(--navy); }

/* ── Cartes & sections ── */
.card { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow-soft); padding: 24px; }
.card + .card { margin-top: 18px; }
.card h3 { font-family: var(--font-display); font-size: 21px; font-weight: 600; color: var(--navy); margin-bottom: 12px; }
h2.sec { font-family: var(--font-display); font-size: 28px; font-weight: 600; color: var(--navy); margin: 30px 0 16px; }
h2.sec small { display: block; font-family: var(--font-ui); font-size: 12.5px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 2px; }
.muted { color: var(--ink-mute); font-size: 13.5px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ── Hero dashboard ── */
.hero {
  border-radius: var(--r-lg); padding: 34px 36px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(126deg, var(--navy) 20%, var(--navy-3) 68%, var(--steel) 130%);
  box-shadow: var(--shadow); animation: rise .5s cubic-bezier(.2,.9,.3,1) both;
}
.hero::after { content: ""; position: absolute; width: 340px; height: 340px; border-radius: 50%; right: -90px; top: -130px; background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.16), transparent 68%); }
.hero h2 { font-family: var(--font-display); font-size: 31px; font-weight: 600; margin-bottom: 6px; }
.hero p { color: rgba(255,255,255,.78); max-width: 520px; }
.hero .gold { color: var(--gold-soft); }

/* ── Stat tiles ── */
.stat { background: var(--card); border-radius: var(--r-md); padding: 18px 20px; box-shadow: var(--shadow-soft); }
.stat .n { font-family: var(--font-display); font-size: 33px; font-weight: 700; color: var(--navy); line-height: 1.1; }
.stat .l { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-mute); font-weight: 600; margin-top: 2px; }
.stat.hl { background: linear-gradient(135deg, var(--navy), var(--navy-3)); }
.stat.hl .n { color: var(--gold-soft); } .stat.hl .l { color: rgba(255,255,255,.6); }
body[data-space="super"] .stat { background: var(--navy-2); border: 1px solid var(--navy-3); }
body[data-space="super"] .stat .n { color: var(--gold-soft); }

/* ── Streak flame ── */
.streak-pill { display: inline-flex; align-items: center; gap: 9px; background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.22); border-radius: 30px; padding: 8px 18px; backdrop-filter: blur(4px); }
.streak-pill .fl { font-size: 21px; animation: flick 1.1s ease-in-out 8; display: inline-block; }
@keyframes flick { 0%,100% { transform: rotate(-4deg) scale(1) } 50% { transform: rotate(5deg) scale(1.12) } }
.streak-pill b { font-size: 18px; }

/* ── Cartes programme ── */
.prog-card {
  background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow-soft); overflow: hidden;
  cursor: pointer; transition: transform .22s cubic-bezier(.2,.9,.3,1), box-shadow .22s; position: relative;
  animation: rise .5s cubic-bezier(.2,.9,.3,1) both;
}
.prog-card:hover, .prog-card:focus-visible { transform: translateY(-5px); box-shadow: var(--shadow); }
.prog-card:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.prog-card .cover { height: 116px; display: flex; align-items: center; justify-content: center; font-size: 47px; position: relative; }
.prog-card .cover.catA { background: linear-gradient(135deg, #DCEFEB, #B9E0D9); }
.prog-card .cover.catB { background: linear-gradient(135deg, #E4E3F3, #CCCAE8); }
.prog-card .cover.catC { background: linear-gradient(135deg, #F6E9CE, #EED9A8); }
.prog-card .cover.catD { background: linear-gradient(135deg, #DAE4F1, #BCCDE4); }
.prog-card .body { padding: 17px 19px 19px; }
.prog-card h4 { font-family: var(--font-display); font-size: 19.5px; font-weight: 700; color: var(--navy); }
.prog-card .meta { display: flex; gap: 8px; margin: 7px 0 10px; flex-wrap: wrap; }
.chip { font-size: 11.5px; font-weight: 600; padding: 3.5px 11px; border-radius: 20px; background: var(--accent-soft); color: var(--accent); }
.chip.n { background: #EFEDE6; color: var(--ink-soft); }
.chip.ok { background: rgba(76,175,125,.16); color: var(--ok); }
.pbar { height: 6px; border-radius: 4px; background: #EFEDE6; overflow: hidden; }
.pbar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--steel), var(--sky)); transform-origin: left; transition: transform .7s cubic-bezier(.22,.61,.36,1); }

/* ── Liste de séances ── */
.sess {
  display: flex; align-items: center; gap: 15px; padding: 14px 16px; border-radius: var(--r-md);
  background: var(--card); box-shadow: var(--shadow-soft); cursor: pointer; transition: transform .18s, box-shadow .18s;
}
.sess:hover, .sess:focus-visible { transform: translateX(4px); box-shadow: var(--shadow); }
.sess:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.sess + .sess { margin-top: 10px; }
.sess .num { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; background: var(--accent-soft); color: var(--accent); }
.sess.done .num { background: var(--ok); color: #fff; }
.sess.locked { opacity: .55; cursor: not-allowed; }
.sess .t { font-weight: 600; color: var(--navy); }
.sess .o { font-size: 12.5px; color: var(--ink-mute); }
.sess .dur { margin-left: auto; font-size: 12.5px; color: var(--ink-mute); white-space: nowrap; }

/* ── Lecteur : cercle qui respire ── */
.player-stage { display: flex; flex-direction: column; align-items: center; padding: 34px 0 10px; }
.breath {
  width: 240px; height: 240px; border-radius: 50%; position: relative;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--steel), var(--navy-3));
  box-shadow: 0 20px 50px rgba(22,32,53,.28);
}
.breath::before, .breath::after {
  content: ""; position: absolute; inset: -22px; border-radius: 50%;
  border: 1.5px solid var(--gold-soft); opacity: .4;
}
.breath::after { inset: -46px; opacity: .2; }
/* Séance au rythme connu (breath_pattern) : le scale est piloté en JS (transitionDuration par
   phase, in/hold/out réels) pour que le mouvement corresponde à l'audio — pas d'animation CSS ici. */
.breath.playing.rhythmic { transition-property: transform; transition-timing-function: ease-in-out; }
/* Séance sans rythme défini (ancrage, visualisation…) : pulsation ambiante générique, pas de mot de phase. */
.breath.playing:not(.rhythmic) { animation: breathe 8s ease-in-out 40; }
.breath.playing::before { animation: ring 8s ease-in-out 40; }
.breath.playing::after { animation: ring 8s ease-in-out 40; animation-delay: .35s; }
@keyframes breathe { 0%,100% { transform: scale(.9) } 45% { transform: scale(1.06) } 60% { transform: scale(1.06) } }
@keyframes ring { 0%,100% { transform: scale(.92); opacity: .5 } 50% { transform: scale(1.1); opacity: 1 } }
.breath .inner { text-align: center; color: #fff; text-shadow: 0 2px 8px rgba(22,32,53,.3); }
.breath .inner .ph { font-family: var(--font-display); font-size: 24px; font-weight: 600; }
.breath .inner .tm { font-size: 14px; opacity: .85; letter-spacing: .1em; }
.play-controls { display: flex; align-items: center; gap: 18px; margin-top: 30px; }
.playbtn {
  width: 64px; height: 64px; border-radius: 50%; border: none; cursor: pointer; font-size: 23px;
  background: linear-gradient(135deg, var(--navy), var(--navy-3)); color: #fff;
  box-shadow: 0 10px 26px rgba(22,32,53,.3); transition: transform .16s;
}
.playbtn:hover { transform: scale(1.06); }

/* ── « Le souffle en direct » : bouton topbar + widget respiration en overlay ── */
.breath-fab {
  border: 1.5px solid var(--line); background: var(--card); color: var(--ink-soft);
  border-radius: 30px; padding: 8px 16px; font-family: var(--font-ui); font-weight: 600;
  font-size: 13px; cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: border-color .18s, color .18s, background .18s;
}
.breath-fab:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* ── « Besoin d'aide » : accès rapide gestion de crise, toujours visible espace utilisateur ── */
.crisis-fab {
  border: 1.5px solid rgba(199,92,92,.4); background: rgba(199,92,92,.08); color: var(--bad);
  border-radius: 30px; padding: 8px 16px; font-family: var(--font-ui); font-weight: 600;
  font-size: 13px; cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: border-color .18s, background .18s;
}
.crisis-fab:hover { border-color: var(--bad); background: rgba(199,92,92,.16); }

.crisis-modal { max-width: 420px; }
.crisis-emergency {
  margin-top: 16px; padding: 14px 16px; border-radius: 12px;
  background: rgba(199,92,92,.08); border: 1px solid rgba(199,92,92,.3);
}
.crisis-emergency b { display: block; color: var(--bad); font-size: 13.5px; margin-bottom: 6px; }
.crisis-emergency p { font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; margin-bottom: 8px; }
.crisis-emergency ul { list-style: none; padding: 0; }
.crisis-emergency li { font-size: 13px; color: var(--ink); padding: 3px 0; }
.crisis-emergency li b { display: inline; color: var(--ink); margin: 0; }

.rb-modal { max-width: 380px; text-align: center; }
.rb-stage { display: flex; justify-content: center; padding: 14px 0 4px; }
.rb-circle {
  width: 210px; height: 210px; border-radius: 50%; position: relative;
  background: linear-gradient(160deg, var(--steel), var(--navy-3));
  box-shadow: 0 20px 50px rgba(22,32,53,.28);
  animation: rb-grow 10s ease-in-out infinite; /* widget ouvert volontairement et fermé à la main, pas un décor de fond : boucle tant qu'il est ouvert */
}
.rb-word {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 22px; font-weight: 600; color: #fff;
  text-shadow: 0 2px 8px rgba(22,32,53,.35);
}
.rb-word.in { animation: rb-word-in 10s ease-in-out infinite; }
.rb-word.out { animation: rb-word-out 10s ease-in-out infinite; }
@keyframes rb-grow { 0% { transform: scale(.62) } 40% { transform: scale(1) } 100% { transform: scale(.62) } }
@keyframes rb-word-in { 0%, 32% { opacity: 1 } 40%, 92% { opacity: 0 } 100% { opacity: 1 } }
@keyframes rb-word-out { 0%, 32% { opacity: 0 } 40%, 92% { opacity: 1 } 100% { opacity: 0 } }
.rb-hint { margin-top: 20px; font-size: 12.5px; color: var(--ink-mute); }

/* ── Votre journée (dashboard, check-in + rituel en 2 étapes) ── */
.today-card { border-top: 3px solid var(--gold-soft); }
.today-step { padding: 16px 0; border-top: 1px solid var(--line); }
.today-step:first-of-type { padding-top: 4px; border-top: none; }
.today-step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.today-step-head b { font-size: 14.5px; color: var(--navy); }
.today-num {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 24px; height: 24px; border-radius: 50%; font-size: 12px; font-weight: 700;
  background: var(--accent-soft); color: var(--accent);
}
.today-step.done .today-num { background: rgba(76,175,125,.16); color: var(--ok); }
.today-step.done .today-step-head b { color: var(--ink-soft); }
.today-step-body { margin-left: 34px; }
.today-step-body .sess { margin-top: 0; }

/* ── Rituel du jour (dashboard) ── */
.rituel-tip { border-radius: var(--r-md); padding: 14px 16px; margin-top: 14px; background: linear-gradient(160deg, #fff, #FBF6E8); border: 1.5px solid var(--gold-soft); }
.rituel-tip b { display: block; font-family: var(--font-display); font-size: 15px; color: var(--navy); margin-bottom: 4px; }
.rituel-tip p { font-size: 13px; color: var(--ink-soft); line-height: 1.5; }

/* ── Pause ludique (exercices) : bulle du jour, jeu, mandalas ── */
.mystery-btn { font-size: 15px; }
.mystery-shake { animation: mysteryShake .5s ease-in-out 1; }
@keyframes mysteryShake { 0%,100% { transform: translateX(0) } 20% { transform: translateX(-3px) rotate(-1deg) } 40% { transform: translateX(3px) rotate(1deg) } 60% { transform: translateX(-2px) } 80% { transform: translateX(2px) } }
.mystery-result { text-align: center; padding: 10px 6px 4px; }
.mystery-result .ic { font-size: 34px; display: block; margin-bottom: 6px; }
.mystery-result p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }
.reveal-pop { animation: pop .35s cubic-bezier(.16,1,.3,1) both; }

.bg-stage { position: relative; height: 220px; border-radius: var(--r-md); overflow: hidden; background: linear-gradient(180deg, #EAF3F8, #F6FAFC); border: 1.5px solid var(--line); }
.bg-bubble {
  position: absolute; bottom: -50px; border-radius: 50%; cursor: pointer;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.9), rgba(72,145,181,.35) 55%, rgba(72,145,181,.55));
  border: 1.5px solid rgba(72,145,181,.5);
  animation-name: bgFloat; animation-timing-function: ease-in; animation-iteration-count: 1;
}
.bg-bubble.pop { animation: bgPop .16s ease-out 1 both; cursor: default; }
@keyframes bgFloat { from { transform: translateY(0); opacity: .95 } to { transform: translateY(-260px); opacity: 0 } }
@keyframes bgPop { to { transform: scale(1.5); opacity: 0 } }

.mandala-card { text-align: center; padding: 16px 12px; border-radius: var(--r-md); background: var(--card); box-shadow: var(--shadow-soft); animation: rise .45s cubic-bezier(.2,.9,.3,1) both; }
.mandala-thumb { display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.mandala-thumb svg { width: 92px; height: 92px; }
.mandala-name { font-size: 12.5px; font-weight: 700; color: var(--navy); margin-bottom: 10px; min-height: 32px; display: flex; align-items: center; justify-content: center; }

/* ── Cartes templates imprimables ── */
.tpl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tpl-card {
  text-align: center; padding: 24px 16px 18px; border-radius: var(--r-lg);
  background: var(--card); box-shadow: var(--shadow-soft);
  animation: rise .45s cubic-bezier(.2,.9,.3,1) both;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: transform .2s, box-shadow .2s;
}
.tpl-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(22,32,53,.13); }
.tpl-card-icon { font-size: 32px; margin-bottom: 6px; }
.tpl-card-label { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--navy); line-height: 1.2; }
.tpl-card-sub { font-size: 11.5px; color: var(--ink-mute); font-weight: 400; margin-bottom: 12px; }
.tpl-card-actions { display: flex; gap: 8px; width: 100%; }
.tpl-card-btn {
  flex: 1; border: none; cursor: pointer; border-radius: var(--r-sm);
  padding: 8px 6px; font-family: var(--font-ui); font-size: 12px; font-weight: 600;
  transition: background .15s, transform .15s; letter-spacing: .03em;
}
.tpl-card-btn:hover { transform: translateY(-1px); }
.tpl-card-btn-pdf { background: var(--navy); color: #fff; }
.tpl-card-btn-pdf:hover { background: var(--navy-2); }
.tpl-card-btn-print { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--line); }
.tpl-card-btn-print:hover { background: var(--cream); }
@media (max-width: 900px) { .tpl-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .tpl-grid { grid-template-columns: 1fr; } }

/* ── Mini-quiz « Quel exercice vous correspond maintenant ? » ── */
.quiz-step { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.quiz-opt {
  display: block; width: 100%; text-align: left; padding: 13px 16px; margin-top: 10px;
  border-radius: var(--r-md); border: 1.5px solid var(--line); background: var(--card);
  font-family: var(--font-ui); font-size: 14.5px; font-weight: 600; color: var(--ink);
  cursor: pointer; transition: border-color .16s, background .16s, transform .16s;
}
.quiz-opt:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateX(3px); }

/* ── Check-in sliders ── */
.slider-row { margin: 18px 0; }
.slider-row .lab { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 8px; }
.slider-row .val { font-size: 21px; }
input[type=range] { width: 100%; appearance: none; -webkit-appearance: none; height: 10px; border-radius: 6px; background: linear-gradient(90deg, var(--sky), var(--gold-soft), var(--bad)); outline: none; }
input[type=range].mood { background: linear-gradient(90deg, var(--bad), var(--gold-soft), var(--sky)); }
input[type=range]::-webkit-slider-thumb {
  appearance: none; -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; border: 3.5px solid var(--navy); cursor: pointer; box-shadow: 0 3px 10px rgba(22,32,53,.3);
  transition: transform .12s;
}
input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.15); }

/* ── Badges ── */
.badges-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; }
.badge-tile { text-align: center; padding: 18px 10px 14px; border-radius: var(--r-md); background: var(--card); box-shadow: var(--shadow-soft); transition: transform .18s; }
.badge-tile:hover { transform: translateY(-3px); }
.badge-tile .ic { font-size: 35px; filter: grayscale(1); opacity: .32; }
.badge-tile.won .ic { filter: none; opacity: 1; }
.badge-tile .nm { font-weight: 700; font-size: 13px; color: var(--navy); margin-top: 7px; }
.badge-tile .ds { font-size: 11px; color: var(--ink-mute); margin-top: 2px; line-height: 1.35; }
.badge-tile.won { background: linear-gradient(160deg, #fff, #FBF6E8); border: 1px solid var(--gold-soft); }

/* ── Courbe bien-être (SVG) ── */
.chart-wrap { overflow-x: auto; }
.chart-wrap svg { min-width: 480px; width: 100%; }

/* ── Tableaux admin ── */
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.8px; }
table.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-mute); padding: 8px 10px; border-bottom: 2px solid var(--line); }
table.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: none; }
.tbl-scroll { overflow-x: auto; }
.pill { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 3px 11px; border-radius: 20px; }
.pill.ok { background: rgba(76,175,125,.14); color: var(--ok); }
.pill.warn { background: rgba(217,142,50,.14); color: var(--warn); }
.pill.bad { background: rgba(199,92,92,.14); color: var(--bad); }
.pill.info { background: var(--accent-soft); color: var(--accent); }

/* ── Modales / toasts ── */
.overlay { position: fixed; inset: 0; z-index: 90; background: rgba(22,32,53,.5); backdrop-filter: blur(5px); display: flex; align-items: center; justify-content: center; padding: 22px; animation: fadein .22s both; }
.modal { background: var(--card); color: var(--ink); border-radius: var(--r-lg); box-shadow: 0 30px 80px rgba(0,0,0,.35); max-width: 520px; width: 100%; max-height: 88vh; overflow-y: auto; padding: 30px; animation: pop .32s cubic-bezier(.16,1,.3,1) both; }
.modal:focus { outline: none; } /* le conteneur ne reçoit le focus que quand aucun champ/bouton n'est disponible dedans */
.modal h3 { font-family: var(--font-display); font-size: 23px; color: var(--navy); margin-bottom: 12px; }
@keyframes pop { from { transform: scale(.86); opacity: 0 } to { transform: scale(1); opacity: 1 } }
@keyframes fadein { from { opacity: 0 } to { opacity: 1 } }
@keyframes rise { from { transform: translateY(16px); opacity: 0 } to { transform: none; opacity: 1 } }

#toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 9px; align-items: center; }
.toast { background: var(--navy); color: #fff; border-radius: 30px; padding: 11px 24px; font-size: 14px; box-shadow: 0 12px 30px rgba(22,32,53,.4); animation: pop .3s both; max-width: 90vw; }
.toast.err { background: var(--bad); }

/* ── Badge débloqué (célébration) ── */
.celebrate { text-align: center; padding: 8px 0; }
.celebrate .big { font-size: 68px; display: inline-block; animation: bloomIn .7s cubic-bezier(.16,1,.3,1) both; }
@keyframes bloomIn { 0% { transform: scale(.2) rotate(-14deg); opacity: 0 } 100% { transform: scale(1) rotate(0); opacity: 1 } }
.confetti { position: relative; height: 0; }
.confetti i { position: absolute; width: 8px; height: 13px; border-radius: 2px; top: -10px; animation: conf 1.5s ease-out 2 both; }
@keyframes conf { from { transform: translateY(-8px) rotate(0); opacity: 1 } to { transform: translateY(120px) rotate(320deg); opacity: 0 } }

/* ── États vides ── */
.empty { text-align: center; padding: 46px 20px; color: var(--ink-mute); }
.empty .ic { font-size: 44px; margin-bottom: 10px; opacity: .8; }
.empty .t { font-family: var(--font-display); font-size: 20px; color: var(--ink-soft); margin-bottom: 5px; }

/* ── Skeleton loading ── */
.skel { border-radius: var(--r-md); background: linear-gradient(90deg, #EFECE4 25%, #F7F4EE 50%, #EFECE4 75%); background-size: 300% 100%; animation: shine 1.3s linear 12; }
@keyframes shine { from { background-position: 100% 0 } to { background-position: -100% 0 } }

/* ── Rapport analytique premium ── */
.report-premium { padding: 34px 36px; }
.report-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 3px solid var(--gold); padding-bottom: 16px; margin-bottom: 18px; }
.report-title { font-family: var(--font-display); font-size: 25px; font-weight: 600; color: var(--navy); }
.report-seal {
  display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, #FBF6E8, #fff);
  border: 1.5px solid var(--gold-soft); border-radius: var(--r-md); padding: 12px 18px; margin-bottom: 20px;
}
.report-seal .seal-ic { font-size: 26px; }
.report-seal b { display: block; color: var(--navy); font-size: 14px; }
.report-seal span { font-size: 12px; color: var(--ink-mute); }
.report-intro { font-size: 14.5px; color: var(--ink-soft); margin-bottom: 20px; max-width: 760px; }
.report-kpi-row { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.report-gauge { flex-shrink: 0; }
.report-legend { display: flex; flex-direction: column; min-width: 180px; }
.dotleg { width: 11px; height: 11px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.report-footer { margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.5px; }
body[data-space="super"] .report-premium { background: var(--card); color: var(--ink); }
body[data-space="super"] .report-premium .muted { color: var(--ink-mute); }
@media (max-width: 640px) {
  .report-premium { padding: 22px; }
  .report-kpi-row { flex-direction: column; align-items: stretch; }
}
@media print {
  .report-seal { break-inside: avoid; }
  .report-kpi-row { break-inside: avoid; }
}

/* ── Le Cerveau (diagnostic stratégique) ── */
.cerveau-box { animation: rise .4s cubic-bezier(.16,1,.3,1) both; }
.cv-block { margin: 14px 0; }
.cv-block > b { display: block; font-family: var(--font-display); font-size: 15px; color: var(--navy); margin-bottom: 5px; }
.cv-block p, .cv-block li { font-size: 13.5px; color: var(--ink-soft); line-height: 1.55; }
.cv-block ul, .cv-block ol { padding-left: 20px; }
.cv-block li { margin: 3px 0; }
body[data-space="super"] .cv-block > b { color: #fff; }
body[data-space="super"] .cv-block p, body[data-space="super"] .cv-block li { color: #C3CBDE; }

/* ── Idées du Cerveau (brainstorm proactif du copilote) ── */
.idea-card {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin: 10px 0;
  border-radius: var(--r-md); background: linear-gradient(135deg, #FBF6E8, #fff); border: 1.5px solid var(--gold-soft);
  animation: rise .4s cubic-bezier(.16,1,.3,1) both;
}
.idea-ic { font-size: 22px; flex-shrink: 0; }
.idea-card b { display: block; font-family: var(--font-display); font-size: 16px; color: var(--navy); margin-bottom: 3px; }
.idea-card p { font-size: 13px; color: var(--ink-soft); line-height: 1.5; margin-bottom: 8px; }

/* ── Assistant IA (chat Pilotage) ── */
.pc-thread { max-height: 420px; overflow-y: auto; padding: 4px 2px; display: flex; flex-direction: column; gap: 10px; }
.pc-msg { display: flex; }
.pc-msg.pc-user { justify-content: flex-end; }
.pc-bubble { max-width: 78%; padding: 10px 15px; border-radius: 16px; font-size: 13.5px; line-height: 1.5; }
.pc-user .pc-bubble { background: var(--navy); color: #fff; border-bottom-right-radius: 4px; }
.pc-assistant .pc-bubble { background: var(--accent-soft); color: var(--navy); border-bottom-left-radius: 4px; }
body[data-space="super"] .pc-assistant .pc-bubble { background: var(--navy-3); color: #E8ECF4; }
.pc-typing { font-weight: 700; letter-spacing: .1em; animation: pcdots 1.1s steps(3,end) 6; }
@keyframes pcdots { 0% { opacity: .3 } 50% { opacity: 1 } 100% { opacity: .3 } }

/* ── Cart drawer ── */
.cartbar { position: fixed; bottom: 18px; right: 18px; z-index: 60; }
.cartbar .btn { border-radius: 30px; box-shadow: 0 14px 34px rgba(22,32,53,.35); }

/* ── Impression (rapport PDF) ── */
.print-only { display: none; }
@media print {
  body { background: #fff !important; font-size: 12px; }
  .topbar, .nav, .mobile-drawer, .no-print, .cartbar, #toasts { display: none !important; }
  .print-only { display: block; }
  .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  .shell { max-width: none; padding: 0; }
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .grid3, .grid4 { grid-template-columns: 1fr 1fr; }
}

/* Sous 1024px, la nav + le switcher de la topbar se replient dans le tiroir mobile
   plutôt que de se serrer ou déborder : au-delà de ~5-6 entrées + switcher + avatar,
   ça ne tient plus lisiblement sur une ligne. */
@media (max-width: 1024px) {
  .nav { display: none; }
  .topbar-right .viewswitch { display: none; }
  .menu-toggle { display: flex; }
}
@media (min-width: 1025px) {
  .mobile-drawer { display: none; }
}

@media (max-width: 640px) {
  .grid2, .grid3, .grid4 { grid-template-columns: 1fr; }
  .hero { padding: 26px 22px; }
  .auth-card { padding: 30px 24px; }
  .topbar { gap: 10px; }
  .topbar .logo { font-size: 17px; }
  .breath { width: 190px; height: 190px; }
  .breath-fab, .crisis-fab { padding: 7px 11px; font-size: 12px; }
  .rb-circle { width: 170px; height: 170px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
