/* ═══════════════════════════════════════════════════════════════════════════
   In'Tech Connect — identité visuelle

   Charte du Forum In'Tech (assets/css/style.css, « camaïeu prune du logo ») :
     violet #2B0057 · survol #3F0A7A · prune #7E2464 · mauve #B380B7
     lilas #EEE7F2 / #F7F3F9 · trait #EBE3F1 · encre #2A2030 · rose #DB61A4
   Titres : Space Grotesk. Texte : Inter. Des aplats, aucune lueur.

   Règles d'usage
   - Le violet est la marque : héros, badge, navigation, actions principales.
   - Le rose signe ce qui « connecte » (point du logo, anneau des intervenants,
     nœuds du motif réseau, cadre du scanner) : décor seulement, jamais un
     texte sur fond clair (3,4:1).
   - Les puces « score » et « table » : violet sur lilas (14:1).
   - Contrastes vérifiés AA, en clair comme en sombre.

   Les composants n'utilisent que les jetons sémantiques (--action, --relief,
   --accent…) : le mode sombre ne redéfinit que les jetons, pas les règles.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Palette de la charte (constante) */
  --violet: #2B0057;
  --violet-survol: #3F0A7A;
  --prune: #7E2464;
  --mauve: #B380B7;
  --lilas: #EEE7F2;
  --lilas-pale: #F7F3F9;
  --trait: #EBE3F1;
  --encre: #2A2030;
  --rose: #DB61A4;
  --rose-clair: #F0A6CF;
  --texte-sur-violet: #D9C8E6;   /* texte secondaire posé sur le violet (10,8:1) */

  /* États */
  --ok: #14632F;       --ok-fond: #DFF5E6;
  --attente: #8A4B00;  --attente-fond: #FFF1DC;
  --alerte: #A3242F;   --alerte-fond: #FCE4E6;
  --pastille: #C2185B; /* compteurs non lus */

  /* Jetons sémantiques — thème clair */
  --fond: var(--lilas-pale);
  --surface: #FFFFFF;
  --surface-2: var(--lilas-pale);
  --ligne: var(--trait);
  --texte: var(--encre);
  --texte-2: #5E5268;
  --texte-3: #716579;
  --accent: var(--violet);            /* liens, icônes actives */
  --action: var(--violet);            /* bouton principal */
  --action-survol: var(--violet-survol);
  --sur-action: #FFFFFF;
  --relief: var(--lilas);             /* puces de score, table, notification non lue */
  --sur-relief: var(--violet);
  --focus: var(--prune);

  --rayon: 16px;
  --rayon-s: 12px;
  --ombre: 0 1px 2px rgba(43, 0, 87, .04), 0 6px 20px -8px rgba(43, 0, 87, .12);
  --ombre-forte: 0 18px 44px -14px rgba(43, 0, 87, .35);
  --titres: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --corps: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --barre-h: 72px;
  --sur-haut: env(safe-area-inset-top, 0px);
  --sur-bas: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

/* Thème sombre : violets profonds de la même famille. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fond: #120420; --surface: #1D0A33; --surface-2: #26113F; --ligne: #36204F;
    --texte: #F4EFF8; --texte-2: #C8B9D6; --texte-3: #9C8AAE;
    --accent: #E2C6F0; --action: var(--lilas); --action-survol: #FFFFFF; --sur-action: var(--violet);
    --relief: #3A1D5C; --sur-relief: #F4EFF8; --focus: var(--rose-clair);
    --ok: #8BE0A8; --ok-fond: rgba(34, 197, 94, .16);
    --attente: #FFC981; --attente-fond: rgba(245, 158, 11, .16);
    --alerte: #FF9AA5; --alerte-fond: rgba(220, 38, 38, .18);
    --ombre: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -10px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --fond: #120420; --surface: #1D0A33; --surface-2: #26113F; --ligne: #36204F;
  --texte: #F4EFF8; --texte-2: #C8B9D6; --texte-3: #9C8AAE;
  --accent: #E2C6F0; --action: var(--lilas); --action-survol: #FFFFFF; --sur-action: var(--violet);
  --relief: #3A1D5C; --sur-relief: #F4EFF8; --focus: var(--rose-clair);
  --ok: #8BE0A8; --ok-fond: rgba(34, 197, 94, .16);
  --attente: #FFC981; --attente-fond: rgba(245, 158, 11, .16);
  --alerte: #FF9AA5; --alerte-fond: rgba(220, 38, 38, .18);
  --ombre: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -10px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

/* En sombre, un aplat #2B0057 se confondrait avec le fond : les éléments
   violets « posés » (boutons, puces, encadrés) prennent un violet éclairci. */
:root[data-theme="dark"] :is(.btn-nuit, .tag-nuit, .avatar, .pourquoi) { background: #4A1F7A; border-color: #4A1F7A; }
:root[data-theme="dark"] .btn-nuit:hover { background: #5B2A92; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) :is(.btn-nuit, .tag-nuit, .avatar, .pourquoi) { background: #4A1F7A; border-color: #4A1F7A; }
  :root:not([data-theme="light"]) .btn-nuit:hover { background: #5B2A92; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--fond); color: var(--texte);
  font: 400 15px/1.55 var(--corps); -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--titres); font-weight: 700; letter-spacing: -.02em; margin: 0; line-height: 1.15; }
h1 { font-size: 1.55rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: 1rem; }
p { margin: 0; }
.cache { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.ico { width: 22px; height: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico-s { width: 18px; height: 18px; }

/* Sur-titre de la charte : petites capitales espacées précédées d'un filet. */
.sur-titre { display: inline-flex; gap: 10px; align-items: center; font-size: .74rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.sur-titre::before { content: ''; width: 3px; height: 14px; border-radius: 2px; background: var(--rose); }

/* ── Écran de démarrage ─────────────────────────────────────────────────── */
.ecran-demarrage { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 18px; background: var(--violet); }
.ecran-demarrage img { animation: pouls 1.4s ease-in-out infinite; border-radius: 20px; }
.marque { font-family: var(--titres); font-weight: 700; color: #fff; letter-spacing: -.01em; }
.marque span { color: var(--rose-clair); }
@keyframes pouls { 50% { transform: scale(.92); opacity: .75; } }

/* ── Boutons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 12px; border: 1.5px solid transparent;
  font-weight: 600; font-size: .95rem; white-space: nowrap; transition: transform .12s, background .15s, border-color .15s, color .15s;
  text-decoration: none;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; pointer-events: none; }
/* Action principale : violet plein (clair), lilas plein (sombre). */
.btn-action { background: var(--action); color: var(--sur-action); }
.btn-action:hover { background: var(--action-survol); }
/* Action secondaire pleine, toujours violette (sur fonds clairs). */
.btn-nuit { background: var(--violet); color: #fff; }
.btn-nuit:hover { background: var(--violet-survol); }
.btn-ligne { background: transparent; border-color: var(--ligne); color: var(--texte); }
.btn-ligne:hover { border-color: var(--mauve); }
.btn-fantome { background: transparent; color: var(--texte-2); padding: 0 12px; }
.btn-fantome:hover { color: var(--texte); }
.btn-danger { background: transparent; border-color: color-mix(in srgb, var(--alerte) 45%, transparent); color: var(--alerte); }
.btn-danger:hover { background: var(--alerte-fond); }
.btn-plein { width: 100%; }
.btn-s { min-height: 36px; padding: 0 14px; font-size: .85rem; border-radius: 10px; }
/* Sur fond violet (héros, badge) : bouton blanc comme sur le site du forum. */
.sur-violet .btn-action, .heros .btn-action { background: #fff; color: var(--violet); }
.sur-violet .btn-action:hover, .heros .btn-action:hover { background: var(--lilas); }
.btn-icone { width: 44px; height: 44px; min-height: 0; padding: 0; border-radius: 12px; background: var(--surface-2); color: var(--texte); border: 1px solid var(--ligne); display: inline-grid; place-items: center; position: relative; }
.btn-icone:hover { border-color: var(--mauve); }
.btn-icone.actif { background: var(--action); border-color: var(--action); color: var(--sur-action); }

/* ── Champs ─────────────────────────────────────────────────────────────── */
.champ { display: grid; gap: 6px; margin-bottom: 14px; }
.champ > span, .etiquette { font-size: .8rem; font-weight: 600; color: var(--texte-2); letter-spacing: .01em; }
.champ small { color: var(--texte-3); font-size: .78rem; }
.saisie, .champ input, .champ select, .champ textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: var(--rayon-s);
  border: 1.5px solid var(--ligne); background: var(--surface); color: var(--texte); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.champ textarea { min-height: 96px; resize: vertical; }
.saisie:focus, .champ input:focus, .champ select:focus, .champ textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--mauve) 22%, transparent);
}
.case { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; cursor: pointer; }
.case input { width: 20px; height: 20px; accent-color: var(--violet); margin-top: 2px; flex: none; }
.case b { display: block; font-weight: 600; }
.case small { color: var(--texte-3); }
.grille-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 520px) { .grille-2 { grid-template-columns: 1fr; } }

/* Puces sélectionnables (intérêts, objectifs, filtres) */
.puces { display: flex; flex-wrap: wrap; gap: 8px; }
.puce {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px;
  border-radius: 999px; border: 1.5px solid var(--ligne); background: var(--surface);
  font-size: .85rem; font-weight: 500; color: var(--texte-2); white-space: nowrap;
}
.puce:hover { border-color: var(--mauve); }
.puce[aria-pressed="true"], .puce.actif { background: var(--action); border-color: var(--action); color: var(--sur-action); }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--ligne); color: var(--texte-2); font-size: .74rem; font-weight: 600; }
.tag-marque { background: var(--relief); border-color: transparent; color: var(--sur-relief); }
.tag-nuit { background: var(--violet); border-color: var(--violet); color: #fff; }
.tag-ambre { background: var(--attente-fond); border-color: transparent; color: var(--attente); }
.tag-vert { background: var(--ok-fond); border-color: transparent; color: var(--ok); }
.tag-corail { background: var(--alerte-fond); border-color: transparent; color: var(--alerte); }

/* ═══ Écrans d'accès (connexion, activation) ════════════════════════════════ */
.acces { min-height: 100dvh; display: grid; grid-template-columns: 1fr; background: var(--violet); color: #fff; }
.acces-visuel { position: relative; overflow: hidden; padding: calc(28px + var(--sur-haut)) 24px 40px; background: var(--violet); }
.acces-visuel .reseau { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; pointer-events: none; }
.acces-logo { display: flex; align-items: center; gap: 12px; position: relative; }
.acces-logo img { width: 44px; height: 44px; border-radius: 13px; box-shadow: 0 0 0 1px rgba(255,255,255,.14); }
.acces-logo .marque { font-size: 1.08rem; }
.acces-accroche { position: relative; margin-top: 44px; max-width: 540px; }
.acces-accroche .sur-titre { color: var(--texte-sur-violet); }
.acces-accroche h1 { font-size: clamp(1.9rem, 6.4vw, 3.1rem); line-height: 1.04; letter-spacing: -.03em; margin-top: 16px; color: #fff; }
.acces-accroche h1 em { font-style: normal; color: var(--rose-clair); }
.acces-accroche p { margin-top: 16px; color: var(--texte-sur-violet); max-width: 450px; }
.acces-chiffres { display: flex; gap: 10px; margin-top: 28px; position: relative; flex-wrap: wrap; }
.acces-chiffres div { font-size: .74rem; color: var(--texte-sur-violet); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 14px; padding: 10px 14px; }
.acces-chiffres b { display: block; font-family: var(--titres); font-size: 1.15rem; color: #fff; font-weight: 700; }

.acces-panneau {
  background: var(--surface); color: var(--texte); border-radius: 24px 24px 0 0; margin-top: -22px;
  position: relative; padding: 28px 22px calc(28px + var(--sur-bas));
}
.acces-panneau h2 { font-size: 1.45rem; }
.acces-panneau .sous { color: var(--texte-2); margin: 6px 0 22px; }
.acces-lien { text-align: center; margin-top: 18px; color: var(--texte-2); font-size: .9rem; }
.acces-lien button { background: none; border: 0; color: var(--accent); font-weight: 600; padding: 4px; }
.acces-lien a { font-weight: 600; }
.onglets-acces { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border: 1px solid var(--ligne); border-radius: 12px; padding: 4px; margin-bottom: 22px; }
.onglets-acces button { border: 0; background: transparent; min-height: 40px; border-radius: 9px; font-weight: 600; color: var(--texte-2); }
.onglets-acces button[aria-selected="true"] { background: var(--surface); color: var(--texte); box-shadow: var(--ombre); }
.code-saisie { letter-spacing: .5em; text-align: center; font-size: 1.4rem !important; font-weight: 700; font-family: Consolas, Menlo, monospace; }
.mdp-oeil { position: relative; }
.mdp-oeil button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--texte-3); padding: 8px; }
.alerte { padding: 12px 14px; border-radius: var(--rayon-s); font-size: .88rem; margin-bottom: 14px; display: flex; gap: 10px; align-items: flex-start; border: 1px solid transparent; }
.alerte-info { background: var(--relief); color: var(--texte); }
.alerte-info .ico { color: var(--accent); }
.alerte-erreur { background: var(--alerte-fond); color: var(--texte); }
.alerte-erreur .ico { color: var(--alerte); }
.alerte-ok { background: var(--ok-fond); color: var(--texte); }
.alerte-ok .ico { color: var(--ok); }

@media (min-width: 900px) {
  .acces { grid-template-columns: 1.15fr 1fr; }
  .acces-visuel { padding: 48px 56px; display: flex; flex-direction: column; }
  .acces-accroche { margin-top: auto; margin-bottom: auto; }
  .acces-panneau { border-radius: 0; margin: 0; display: grid; align-content: center; padding: 48px clamp(32px, 6vw, 88px); }
  .acces-panneau > div { width: 100%; max-width: 420px; margin: 0 auto; }
}

/* ═══ Coquille connectée ═══════════════════════════════════════════════════ */
.coquille { min-height: 100dvh; }
.entete {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px;
  padding: calc(10px + var(--sur-haut)) 16px 10px; background: color-mix(in srgb, var(--fond) 88%, transparent);
  border-bottom: 1px solid transparent;
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.entete .logo { display: flex; align-items: center; gap: 10px; margin-right: auto; color: var(--texte); }
.entete .logo img { width: 34px; height: 34px; border-radius: 10px; }
.entete .logo .marque { color: var(--texte); font-size: .95rem; }
.entete .logo .marque span { color: var(--prune); }
:root[data-theme="dark"] .entete .logo .marque span { color: var(--rose-clair); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .entete .logo .marque span { color: var(--rose-clair); } }
.entete .retour { margin-right: 4px; }
.entete .titre-ecran { font-family: var(--titres); font-weight: 700; font-size: 1.02rem; margin-right: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entete .btn-icone { background: var(--surface); }
.pastille { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--pastille); color: #fff; font-size: .68rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--fond); }
.pastille-nav { top: 2px; right: calc(50% - 22px); }

.contenu { padding: 6px 16px calc(var(--barre-h) + 28px + var(--sur-bas)); max-width: 1120px; margin: 0 auto; }

/* Barre d'onglets mobile ; bouton central « badge » en violet plein. */
.barre {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: calc(var(--barre-h) + var(--sur-bas));
  padding: 0 6px var(--sur-bas); display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  background: color-mix(in srgb, var(--surface) 94%, transparent); border-top: 1px solid var(--ligne);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.barre a { position: relative; display: grid; justify-items: center; gap: 3px; font-size: .68rem; font-weight: 600; color: var(--texte-3); padding: 8px 0; }
.barre a[aria-current="page"] { color: var(--accent); }
.barre a[aria-current="page"] .ico { stroke-width: 2.2; }
.barre a[aria-current="page"]::before { content: ''; position: absolute; top: -1px; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--rose); }
.barre .centre { margin-top: -26px; }
.barre .centre span.rond { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; background: var(--violet); color: #fff; box-shadow: 0 10px 22px -8px rgba(43, 0, 87, .55), 0 0 0 5px var(--fond); position: relative; }
.barre .centre span.rond::after { content: ''; position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--rose); }
.barre .centre .ico { width: 26px; height: 26px; stroke-width: 2.1; }
.barre .centre::before { display: none; }

/* Navigation latérale (grand écran), aplat violet comme la barre du site. */
.lateral { display: none; }
@media (min-width: 1024px) {
  .barre { display: none; }
  .coquille { display: grid; grid-template-columns: 264px 1fr; }
  .lateral {
    display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100dvh; padding: 22px 14px;
    background: var(--violet); color: #fff;
  }
  .lateral .logo { display: flex; align-items: center; gap: 12px; padding: 4px 10px 24px; color: #fff; }
  .lateral .logo img { width: 38px; height: 38px; border-radius: 11px; box-shadow: 0 0 0 1px rgba(255,255,255,.14); }
  .lateral a.lien { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; color: var(--texte-sur-violet); font-weight: 500; position: relative; }
  .lateral a.lien:hover { background: rgba(255,255,255,.07); color: #fff; }
  .lateral a.lien[aria-current="page"] { background: rgba(255,255,255,.12); color: #fff; font-weight: 600; }
  .lateral a.lien[aria-current="page"]::before { content: ''; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--rose); }
  .lateral .pastille { position: static; margin-left: auto; border: 0; }
  .lateral .sep { height: 1px; background: rgba(255,255,255,.12); margin: 12px 10px; }
  .lateral .badge-cta { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 14px; background: #fff; color: var(--violet); font-weight: 700; }
  .lateral .badge-cta:hover { background: var(--lilas); }
  .principal { min-width: 0; }
  .entete .logo { visibility: hidden; }
  .contenu { padding: 10px 32px 48px; }
}

/* ── Cartes et sections ─────────────────────────────────────────────────── */
.carte { background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 18px; box-shadow: var(--ombre); }
.section { margin-top: 28px; }
.section-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-tete h2 { font-size: 1.12rem; }
.section-tete a, .section-tete button { font-size: .85rem; font-weight: 600; background: none; border: 0; color: var(--accent); }
.vide { text-align: center; padding: 38px 20px; color: var(--texte-2); }
.vide .ico { width: 30px; height: 30px; color: var(--accent); margin: 0 auto 14px; stroke-width: 1.6; box-sizing: content-box; padding: 15px; border-radius: 16px; background: var(--relief); }
.vide h3 { margin-bottom: 6px; color: var(--texte); font-size: 1.05rem; }
.vide p { max-width: 380px; margin: 0 auto; }
.vide .btn { margin-top: 18px; }

/* Héros de l'accueil : aplat violet, motif réseau, bouton blanc. */
.heros { position: relative; overflow: hidden; border-radius: 22px; padding: 24px 22px; color: #fff; background: var(--violet); }
.heros .reseau { position: absolute; right: -30px; top: -20px; width: 260px; opacity: .55; pointer-events: none; }
.heros .bonjour { font-size: .74rem; color: var(--texte-sur-violet); }
.heros h1 { color: #fff; font-size: 1.6rem; letter-spacing: -.03em; margin-top: 10px; position: relative; max-width: 560px; }
.heros .compte-a-rebours { display: flex; gap: 8px; margin-top: 18px; position: relative; flex-wrap: wrap; }
.heros .compte-a-rebours div { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 12px; padding: 10px 12px; min-width: 66px; text-align: center; }
.heros .compte-a-rebours b { display: block; font-family: var(--titres); font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.heros .compte-a-rebours small { font-size: .64rem; color: var(--texte-sur-violet); text-transform: uppercase; letter-spacing: .1em; }
.heros .prochain { text-align: left !important; flex: 1; min-width: 220px !important; border-left: 3px solid var(--rose) !important; }
.heros .actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; position: relative; }
.heros .btn-ligne { color: #fff; border-color: rgba(255,255,255,.3); }
.heros .btn-ligne:hover { border-color: #fff; background: rgba(255,255,255,.08); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.stat { background: var(--surface); border: 1px solid var(--ligne); border-radius: 14px; padding: 14px; color: var(--texte); transition: border-color .15s; }
.stat:hover { border-color: var(--mauve); }
.stat b { display: block; font-family: var(--titres); font-size: 1.45rem; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.stat span { font-size: .74rem; color: var(--texte-2); }
@media (max-width: 520px) { .stats { grid-template-columns: repeat(2, 1fr); } }

.progression { display: flex; gap: 14px; align-items: center; }
.anneau { --p: 0; width: 56px; height: 56px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--ligne) 0); }
.anneau::before { content: attr(data-pct) '%'; width: 44px; height: 44px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-weight: 700; font-size: .78rem; }

/* Carrousel horizontal (suggestions) */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 78%); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
@media (min-width: 700px) { .rail { grid-auto-columns: 280px; } }

/* ── Avatar ─────────────────────────────────────────────────────────────── */
.avatar { --t: 48px; width: var(--t); height: var(--t); border-radius: 50%; flex: none; overflow: hidden; display: grid; place-items: center;
  background: var(--violet); color: #fff; font-family: var(--titres); font-weight: 700; font-size: calc(var(--t) * .34); position: relative; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
/* L'avatar est un <span> : les règles « .qui span » ou « .tete span » des cartes
   ne doivent pas lui imposer leur gris ni leur petite taille (initiales à 2,3:1). */
:is(.qui, .tete, .conv, .orateur) .avatar.avatar { color: #fff; font-size: calc(var(--t) * .34); }
/* Anneau rose : la signature des intervenants. */
.avatar.intervenant { box-shadow: 0 0 0 2.5px var(--surface), 0 0 0 4.5px var(--rose); }
.avatar-xl { --t: 104px; }
.avatar-l { --t: 64px; }
.avatar-s { --t: 38px; }

/* Carte de membre */
.membre { display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 16px; box-shadow: var(--ombre); color: var(--texte); position: relative; transition: transform .15s, box-shadow .15s, border-color .15s; }
.membre:hover { transform: translateY(-2px); box-shadow: var(--ombre-forte); border-color: var(--mauve); }
.membre .haut { display: flex; gap: 12px; align-items: center; min-width: 0; padding-right: 26px; }
.membre .qui { min-width: 0; }
.membre .qui b { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.membre .qui span { display: block; font-size: .82rem; color: var(--texte-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.membre .raisons { font-size: .8rem; color: var(--texte-2); display: grid; gap: 4px; padding-top: 10px; border-top: 1px dashed var(--ligne); }
.membre .raisons div { display: flex; gap: 6px; align-items: center; }
.membre .raisons .ico { width: 14px; height: 14px; color: var(--prune); stroke-width: 2.4; }
:root[data-theme="dark"] .membre .raisons .ico { color: var(--rose-clair); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .membre .raisons .ico { color: var(--rose-clair); } }
.membre .pied { display: flex; gap: 8px; align-items: center; margin-top: auto; flex-wrap: wrap; }
.score { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px 4px 8px; border-radius: 999px; background: var(--relief); color: var(--sur-relief); font-weight: 700; font-size: .78rem; font-variant-numeric: tabular-nums; }
.score .ico { width: 14px; height: 14px; stroke-width: 2.4; color: var(--rose); }
.membre .favori-btn { position: absolute; top: 12px; right: 12px; background: none; border: 0; color: var(--texte-3); padding: 6px; }
.favori-btn[aria-pressed="true"] { color: var(--rose) !important; }
.favori-btn[aria-pressed="true"] .ico { fill: currentColor; }

/* Liste de membres (annuaire) */
.liste-membres { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.liste-membres > *, .rail > * { min-width: 0; }
@media (min-width: 640px) { .liste-membres { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .liste-membres { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.recherche { position: relative; }
.recherche .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--texte-3); }
.recherche input { padding-left: 44px; border-radius: 12px; }
.filtres { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px 4px; margin: 0 -16px; scrollbar-width: none; }
.filtres::-webkit-scrollbar { display: none; }
.filtres select.puce { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23716579' stroke-width='2.4'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 14px; }
.filtres select.puce.actif { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B380B7' stroke-width='2.4'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.compte-resultats { font-size: .82rem; color: var(--texte-2); margin: 10px 0; }

/* ── Fiche profil ───────────────────────────────────────────────────────── */
.fiche-tete { position: relative; border-radius: 22px; overflow: hidden; background: var(--surface); border: 1px solid var(--ligne); box-shadow: var(--ombre); }
.fiche-tete .bandeau { height: 96px; background: var(--violet); position: relative; overflow: hidden; }
.fiche-tete .bandeau::after { content: ''; position: absolute; right: 22px; top: 22px; width: 10px; height: 10px; border-radius: 50%; background: var(--rose); box-shadow: -28px 30px 0 -2px rgba(255,255,255,.35), -64px 6px 0 -3px rgba(255,255,255,.25); }
.fiche-tete .corps { padding: 0 18px 18px; margin-top: -52px; position: relative; }
.fiche-tete .avatar { box-shadow: 0 0 0 4px var(--surface); }
.fiche-tete .avatar.intervenant { box-shadow: 0 0 0 4px var(--surface), 0 0 0 6.5px var(--rose); }
.fiche-tete h1 { margin-top: 12px; font-size: 1.45rem; }
.fiche-tete .poste { color: var(--texte-2); margin-top: 4px; }
.fiche-tete .meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.fiche-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 8px; margin-top: 16px; }
.fiche-actions > .btn { min-width: 0; padding: 0 14px; }
.fiche-actions > .btn span { overflow: hidden; text-overflow: ellipsis; }
.fiche-bloc { margin-top: 14px; }
.fiche-bloc h2 { font-size: .74rem; font-family: var(--corps); font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--texte-3); margin-bottom: 10px; }
.fiche-bloc .texte { white-space: pre-line; }
.duo { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .duo { grid-template-columns: 1fr 1fr; } }
.duo .carte h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: .95rem; }
.duo .carte h3 .ico { color: var(--accent); }
.pourquoi { background: var(--violet); color: #fff; border: 0; }
.pourquoi h2 { color: var(--rose-clair) !important; }
.pourquoi li { margin: 4px 0; }
.pourquoi ul { margin: 0; padding-left: 18px; color: var(--texte-sur-violet); }
.pourquoi li::marker { color: var(--rose); }
.coordonnees a, .coordonnees div { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--ligne); color: var(--texte); }
.coordonnees .ico { color: var(--accent); }
.coordonnees a:last-child, .coordonnees div:last-child { border-bottom: 0; }

/* ── Rendez-vous / agenda ───────────────────────────────────────────────── */
.segments { display: flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--ligne); border-radius: 12px; padding: 4px; overflow-x: auto; scrollbar-width: none; }
.segments button { flex: 1; border: 0; background: none; min-height: 38px; padding: 0 14px; border-radius: 9px; font-weight: 600; font-size: .85rem; color: var(--texte-2); white-space: nowrap; position: relative; }
.segments button[aria-selected="true"] { background: var(--surface); color: var(--accent); box-shadow: var(--ombre); }
.segments .compteur { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 6px; border-radius: 9px; background: var(--pastille); color: #fff; font-size: .68rem; padding: 0 5px; }

.jour-titre { font-family: var(--titres); font-size: .9rem; font-weight: 700; margin: 24px 0 10px; color: var(--texte); display: flex; align-items: center; gap: 10px; text-transform: capitalize; }
.jour-titre::before { content: ''; width: 3px; height: 14px; border-radius: 2px; background: var(--rose); }
.jour-titre::after { content: ''; flex: 1; height: 1px; background: var(--ligne); }
.rdv { display: grid; grid-template-columns: 62px 1fr; gap: 12px; background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 14px; box-shadow: var(--ombre); margin-bottom: 10px; position: relative; overflow: hidden; }
.rdv.statut-accepte::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--violet); }
:root[data-theme="dark"] .rdv.statut-accepte::before { background: var(--rose-clair); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rdv.statut-accepte::before { background: var(--rose-clair); } }
.rdv .heure { text-align: center; border-right: 1px dashed var(--ligne); padding-right: 10px; }
.rdv .heure b { display: block; font-family: var(--titres); font-size: 1.05rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.rdv .heure small { color: var(--texte-3); font-size: .72rem; }
.rdv .qui { display: flex; gap: 10px; align-items: center; color: var(--texte); }
.rdv .qui b { display: block; }
.rdv .qui span { font-size: .8rem; color: var(--texte-2); }
.rdv .lieu { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-top: 10px; font-size: .85rem; }
.rdv .lieu .tag, .rdv .table { white-space: nowrap; }
.rdv > div { min-width: 0; }
.badge .haut .annee { max-width: 55%; text-align: right; line-height: 1.3; }
.rdv .table { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; background: var(--action); color: var(--sur-action); font-weight: 700; font-size: .8rem; }
.rdv .objet { margin-top: 8px; font-size: .88rem; color: var(--texte-2); }
.rdv .actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.rdv.statut-refuse, .rdv.statut-annule { opacity: .62; }

.creneaux-jours { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 14px; scrollbar-width: none; }
.creneaux-jours button { flex: none; border: 1.5px solid var(--ligne); background: var(--surface); border-radius: 12px; padding: 8px 14px; text-align: center; min-width: 74px; }
.creneaux-jours button b { display: block; font-family: var(--titres); font-size: 1.15rem; font-weight: 700; }
.creneaux-jours button small { font-size: .68rem; color: var(--texte-3); text-transform: uppercase; letter-spacing: .06em; }
.creneaux-jours button[aria-pressed="true"] { background: var(--action); border-color: var(--action); color: var(--sur-action); }
.creneaux-jours button[aria-pressed="true"] small { color: inherit; opacity: .8; }
.creneaux { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.creneaux button { min-height: 44px; border-radius: 10px; border: 1.5px solid var(--ligne); background: var(--surface); font-weight: 600; font-variant-numeric: tabular-nums; }
.creneaux button:hover { border-color: var(--mauve); }
.creneaux button[aria-pressed="true"] { background: var(--relief); border-color: var(--accent); color: var(--sur-relief); box-shadow: inset 0 0 0 1px var(--accent); }

/* Programme */
.session { display: grid; grid-template-columns: 58px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--ligne); }
.session:last-child { border-bottom: 0; }
.session .heure b { font-family: var(--titres); font-weight: 700; font-size: .98rem; display: block; font-variant-numeric: tabular-nums; }
.session .heure small { color: var(--texte-3); font-size: .72rem; }
.session .titre { font-weight: 700; }
.session .infos { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 6px; font-size: .8rem; color: var(--texte-2); }
.session .orateurs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.session .orateur { display: flex; gap: 8px; align-items: center; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--ligne); font-size: .8rem; color: var(--texte); }
.session .orateur small { color: var(--texte-3); display: block; font-size: .7rem; line-height: 1.2; }
.session.format-pause, .session.format-accueil { opacity: .72; }
/* Les temps forts se repèrent d'un coup d'œil : panels en violet, In'Tech Challenge en rose. */
.session.format-panel .titre { color: var(--accent); }
.session.format-panel .tag { background: var(--relief); border-color: transparent; color: var(--sur-relief); }
.session.format-challenge .tag { background: #F6DCEB; border-color: transparent; color: #7A1E52; }
.session .favori-btn { background: var(--surface-2); }
.session .favori-btn[aria-pressed="true"] { color: var(--accent) !important; }

/* ── Messagerie ─────────────────────────────────────────────────────────── */
.conv { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; color: var(--texte); }
.conv:hover { background: var(--surface); }
.conv .milieu { flex: 1; min-width: 0; }
.conv .milieu b { display: block; }
.conv .milieu span { display: block; font-size: .85rem; color: var(--texte-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv.non-lu .milieu span { color: var(--texte); font-weight: 600; }
.conv .droite { display: grid; justify-items: end; gap: 6px; font-size: .72rem; color: var(--texte-3); }
.conv .point { width: 10px; height: 10px; border-radius: 50%; background: var(--rose); }
.fil { display: flex; flex-direction: column; gap: 6px; padding: 10px 0 110px; }
.bulle { max-width: 80%; padding: 10px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--ligne); align-self: flex-start; white-space: pre-wrap; word-wrap: break-word; }
.bulle.moi { align-self: flex-end; background: var(--violet); color: #fff; border-color: var(--violet); border-bottom-right-radius: 5px; }
:root[data-theme="dark"] .bulle.moi { background: #4A1F7A; border-color: #4A1F7A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bulle.moi { background: #4A1F7A; border-color: #4A1F7A; } }
.bulle:not(.moi) { border-bottom-left-radius: 5px; }
.bulle time { display: block; font-size: .68rem; opacity: .65; margin-top: 4px; text-align: right; }
.fil .date-sep { align-self: center; font-size: .72rem; color: var(--texte-3); margin: 10px 0; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); }
.composer { position: fixed; left: 0; right: 0; bottom: calc(var(--barre-h) + var(--sur-bas)); z-index: 35; padding: 10px 16px; background: color-mix(in srgb, var(--fond) 92%, transparent); backdrop-filter: blur(12px); display: flex; gap: 10px; align-items: flex-end; border-top: 1px solid var(--ligne); }
.composer textarea { flex: 1; min-height: 46px; max-height: 140px; resize: none; border-radius: 14px; padding: 12px 16px; border: 1.5px solid var(--ligne); background: var(--surface); outline: none; }
.composer textarea:focus { border-color: var(--accent); }
.composer .btn-icone { background: var(--action); border-color: var(--action); color: var(--sur-action); width: 46px; height: 46px; }
@media (min-width: 1024px) { .composer { left: 264px; bottom: 0; padding: 14px 32px; } .fil { padding-bottom: 90px; } }

/* ── Badge et scanner ───────────────────────────────────────────────────── */
.badge { max-width: 360px; margin: 10px auto 0; border-radius: 26px; overflow: hidden; color: #fff; position: relative; background: var(--violet); box-shadow: var(--ombre-forte); }
.badge::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--rose); }
.badge .reseau { position: absolute; inset: 0 0 auto; width: 100%; height: 220px; opacity: .45; pointer-events: none; }
.badge .haut { display: flex; justify-content: space-between; align-items: center; padding: 22px 20px 0; position: relative; }
.badge .haut .marque { font-size: .82rem; }
.badge .haut .annee { font-size: .72rem; color: var(--texte-sur-violet); }
.badge .identite { text-align: center; padding: 22px 20px 0; position: relative; }
.badge .identite .avatar { margin: 0 auto 12px; box-shadow: 0 0 0 3px rgba(255,255,255,.9); }
.badge .identite .avatar.intervenant { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--rose); }
.badge .identite h2 { font-size: 1.3rem; color: #fff; }
.badge .identite p { color: var(--texte-sur-violet); font-size: .88rem; margin-top: 4px; }
.badge .qr { margin: 20px auto 0; width: 220px; background: #fff; border-radius: 18px; padding: 14px; position: relative; }
.badge .qr svg { width: 100%; height: auto; display: block; }
.badge .bas { padding: 16px 20px 22px; text-align: center; font-size: .8rem; color: var(--texte-sur-violet); position: relative; }
.badge .role { display: inline-block; margin-top: 10px; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); color: #fff; }
.badge .role.tag-marque { background: var(--rose); border-color: var(--rose); color: var(--violet); }
.scanner { position: relative; border-radius: 22px; overflow: hidden; background: #000; aspect-ratio: 3 / 4; max-width: 420px; margin: 0 auto; }
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.scanner .viseur { position: absolute; inset: 18%; border-radius: 22px; box-shadow: 0 0 0 999px rgba(18, 4, 32, .6); }
.scanner .viseur::before, .scanner .viseur::after { content: ''; position: absolute; inset: 0; border-radius: 22px; border: 3px solid var(--rose-clair); clip-path: polygon(0 0, 30% 0, 30% 4px, 4px 4px, 4px 30%, 0 30%, 0 0, 100% 0, 100% 30%, calc(100% - 4px) 30%, calc(100% - 4px) 4px, 70% 4px, 70% 0, 100% 0, 100% 100%, 70% 100%, 70% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 70%, 100% 70%, 100% 100%, 0 100%, 0 70%, 4px 70%, 4px calc(100% - 4px), 30% calc(100% - 4px), 30% 100%, 0 100%); }
.scanner .ligne-scan { position: absolute; left: 20%; right: 20%; height: 2px; background: var(--rose-clair); top: 20%; animation: balayage 2.2s ease-in-out infinite; }
@keyframes balayage { 50% { top: 78%; } }

/* ── Opportunités ───────────────────────────────────────────────────────── */
.pub { background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 16px; box-shadow: var(--ombre); margin-bottom: 12px; }
.pub .tete { display: flex; gap: 10px; align-items: center; }
.pub .tete .qui { flex: 1; min-width: 0; color: var(--texte); }
.pub .tete b { display: block; font-size: .9rem; }
.pub .tete span { font-size: .78rem; color: var(--texte-2); }
.pub h3 { margin: 12px 0 6px; font-size: 1.05rem; }
.pub .texte { color: var(--texte-2); white-space: pre-line; font-size: .92rem; }
.pub .pied { display: flex; gap: 8px; margin-top: 14px; align-items: center; flex-wrap: wrap; }
/* Types de publication : camaïeu de la charte, lisible en clair comme en sombre. */
.tag.type-offre { background: var(--violet); border-color: var(--violet); color: #fff; }
.tag.type-demande { background: var(--prune); border-color: var(--prune); color: #fff; }
.tag.type-partenariat { background: var(--lilas); border-color: var(--lilas); color: var(--violet); }
.tag.type-investissement { background: #F6DCEB; border-color: #F6DCEB; color: #7A1E52; }
.tag.type-annonce { background: var(--surface-2); color: var(--texte-2); }

/* Notifications */
.notif { display: flex; gap: 12px; padding: 14px; border-radius: 14px; color: var(--texte); align-items: flex-start; }
.notif:hover { background: var(--surface); }
.notif.non-lu { background: var(--surface); box-shadow: var(--ombre); border-left: 3px solid var(--rose); }
.notif .rond { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--texte-2); flex: none; }
.notif.non-lu .rond { background: var(--relief); color: var(--sur-relief); }
.notif b { display: block; font-size: .9rem; }
.notif span { font-size: .82rem; color: var(--texte-2); }
.notif time { display: block; font-size: .72rem; color: var(--texte-3); margin-top: 4px; }

/* Menu « Plus » */
.menu-liste { display: grid; gap: 2px; }
.menu-liste a, .menu-liste button { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 12px; color: var(--texte); background: none; border: 0; text-align: left; width: 100%; font-weight: 500; }
.menu-liste a:hover, .menu-liste button:hover { background: var(--surface); }
.menu-liste .rond { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--relief); color: var(--sur-relief); }
.menu-liste .fleche { margin-left: auto; color: var(--texte-3); }

/* ── Feuille modale (bas d'écran sur mobile) ────────────────────────────── */
.voile { position: fixed; inset: 0; z-index: 80; background: rgba(18, 4, 32, .6); display: flex; align-items: flex-end; justify-content: center; animation: apparait .18s ease; }
.feuille { width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; background: var(--surface); border-radius: 24px 24px 0 0; padding: 10px 20px calc(24px + var(--sur-bas)); animation: monte .24s cubic-bezier(.2, .8, .2, 1); }
.feuille .poignee { width: 40px; height: 4px; border-radius: 2px; background: var(--ligne); margin: 4px auto 14px; }
.feuille .tete { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.feuille .tete h2 { flex: 1; font-size: 1.2rem; }
@media (min-width: 700px) { .voile { align-items: center; } .feuille { border-radius: 24px; padding-bottom: 24px; } .feuille .poignee { display: none; } }
@keyframes apparait { from { opacity: 0; } }
@keyframes monte { from { transform: translateY(40px); opacity: 0; } }

/* ── Toasts ─────────────────────────────────────────────────────────────── */
#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--barre-h) + 18px + var(--sur-bas)); z-index: 100; display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: var(--violet); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--ombre-forte); display: flex; gap: 10px; align-items: center; font-size: .9rem; animation: monte .2s ease; pointer-events: auto; border-left: 4px solid var(--rose); }
.toast .ico { color: var(--rose-clair); }
.toast.erreur { border-left-color: #FF8A95; }
.toast.erreur .ico { color: #FF8A95; }
@media (min-width: 1024px) { #toasts { bottom: 24px; } }

/* Squelettes de chargement */
.squelette { background: linear-gradient(90deg, var(--surface-2), var(--ligne), var(--surface-2)); background-size: 200% 100%; animation: luit 1.2s linear infinite; border-radius: var(--rayon); }
@keyframes luit { to { background-position: -200% 0; } }

.bandeau-install { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 16px; background: var(--surface); border: 1.5px dashed var(--mauve); margin-top: 14px; }
.bandeau-install img { width: 42px; height: 42px; border-radius: 12px; }
.bandeau-install div { flex: 1; font-size: .85rem; color: var(--texte-2); }
.bandeau-install b { color: var(--texte); display: block; }
.hors-ligne { position: fixed; top: calc(8px + var(--sur-haut)); left: 50%; transform: translateX(-50%); z-index: 90; background: var(--attente-fond); color: var(--attente); border: 1px solid currentColor; font-size: .8rem; font-weight: 700; padding: 6px 14px; border-radius: 999px; }

.onboarding-etapes { display: flex; gap: 6px; margin-bottom: 18px; }
.onboarding-etapes span { flex: 1; height: 4px; border-radius: 2px; background: var(--ligne); }
.onboarding-etapes span.fait { background: var(--accent); }
.photo-choix { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.photo-choix label { cursor: pointer; }
.pied-fixe { position: sticky; bottom: calc(var(--barre-h) + var(--sur-bas) + 8px); display: flex; gap: 10px; padding-top: 12px; }
.ecran-onboarding .pied-fixe { bottom: calc(12px + var(--sur-bas)); }
.ecran-onboarding { max-width: 620px; margin: 0 auto; padding: calc(20px + var(--sur-haut)) 18px 24px; }

/* ── Installation et notifications push ─────────────────────────────────── */
.carte-push { display: flex; gap: 14px; align-items: flex-start; border-left: 4px solid var(--rose); }
.carte-push .rond { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--relief); color: var(--sur-relief); flex: none; }
.carte-push b { display: block; font-family: var(--titres); font-size: 1rem; }
.carte-push p { color: var(--texte-2); font-size: .88rem; margin-top: 4px; }
.carte-push .actions { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.menu-liste .etat { margin-left: auto; font-size: .78rem; color: var(--texte-3); font-weight: 600; }
.etat-push { display: grid; gap: 10px; justify-items: start; margin-bottom: 18px; }
.etat-push p { color: var(--texte-2); font-size: .92rem; }
.pile-boutons { display: grid; gap: 10px; }
.install-tete { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--ligne); }
.install-tete img { width: 52px; height: 52px; border-radius: 14px; }
.install-tete b { display: block; font-family: var(--titres); font-size: 1.05rem; }
.install-tete span { font-size: .82rem; color: var(--texte-2); }
.avantages { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 8px; }
.avantages li { display: flex; gap: 10px; align-items: center; font-size: .9rem; }
.avantages .ico { color: var(--accent); }
.etapes { list-style: none; padding: 0; margin: 8px 0 12px; display: grid; gap: 12px; }
.etapes li { display: flex; gap: 12px; align-items: flex-start; font-size: .92rem; }
.etapes .num { width: 26px; height: 26px; border-radius: 8px; flex: none; display: grid; place-items: center; background: var(--action); color: var(--sur-action); font-weight: 700; font-size: .8rem; }
.etapes .kbd { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--ligne); background: var(--surface-2); vertical-align: middle; }
.etapes .kbd .ico { width: 15px; height: 15px; }
.feuille .alerte { margin-bottom: 12px; }

/* ═══ Design novembre 2026 : accueil en trois temps, Rencontrer, agenda unifié ═══
   Lisibilité : aucun texte utile sous 12 px, cibles tactiles de 44 px. */
.barre a { font-size: .75rem; }
.btn-s { min-height: 40px; }
.tag { font-size: .78rem; }
.aide { font-size: .85rem; color: var(--texte-2); }
.sous-feuille { color: var(--texte-2); margin-bottom: 14px; }
.section-s { margin-top: 14px; }
.titre-page { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 8px 0 14px; }
.titre-page .aide { font-weight: 600; }
.lien-avatar { display: contents; }
.lien-avatar .avatar { --t: 44px; }
/* Titre focalisé après un changement d'écran (lecteurs d'écran) : pas de contour à la souris. */
h1[tabindex="-1"]:focus, .titre-ecran[tabindex="-1"]:focus { outline: none; }
.lien-retour { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; font-size: .9rem; }

/* En-tête du jour J : « Jour 1 · NOOM Hôtel » et l'heure, à la place du logo. */
.entete .logo-jour { visibility: visible !important; min-width: 0; }
.logo-jour > span { display: grid; min-width: 0; }
.logo-jour b { font-family: var(--titres); color: var(--accent); font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo-jour small { font-size: .8rem; color: var(--texte-3); white-space: nowrap; }

/* Héros : trois tuiles chiffrées et un bouton blanc pleine largeur. */
.heros .tuiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 18px 0; position: relative; }
.heros .tuiles a { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 12px; padding: 10px; color: #fff; }
.heros .tuiles a:hover { background: rgba(255,255,255,.14); }
.heros .tuiles b { display: block; font-family: var(--titres); font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.heros .tuiles span { font-size: .8rem; color: var(--texte-sur-violet); }
.heros > .btn { position: relative; }
.heros .bonjour { font-size: .78rem; }

/* Ligne d'action (demandes à traiter, profil à compléter…) */
.ligne-action { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--ligne); border-radius: 14px; padding: 12px 14px; color: var(--texte); margin-top: 10px; }
.ligne-action:hover { border-color: var(--mauve); }
.ligne-action > span:not(.nombre):not(.anneau):not(.rond) { flex: 1; display: grid; min-width: 0; }
.ligne-action b { font-size: .95rem; }
.ligne-action small { font-size: .85rem; color: var(--texte-2); }
.ligne-action > .ico { color: var(--texte-3); }
.ligne-action .anneau { width: 44px; height: 44px; }
.ligne-action .anneau::before { width: 34px; height: 34px; font-size: .72rem; }
.ligne-action .rond { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--relief); color: var(--sur-relief); flex: none; }
.nombre { min-width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--pastille); color: #fff; font-family: var(--titres); font-weight: 700; font-size: 1.1rem; flex: none; }

/* « En ce moment » : la séquence en cours, sa progression, la suivante. */
.maintenant { background: var(--violet); color: #fff; border-radius: 20px; padding: 18px; display: grid; gap: 10px; }
.maintenant .vif { display: flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--rose-clair); }
.maintenant .point { width: 8px; height: 8px; border-radius: 50%; background: var(--rose); animation: pouls 1.6s ease-in-out infinite; }
.maintenant h2 { color: #fff; font-size: 1.3rem; }
.maintenant .desc { color: var(--texte-sur-violet); font-size: .9rem; }
.maintenant .jauge { height: 6px; border-radius: 3px; background: rgba(255,255,255,.16); overflow: hidden; }
.maintenant .jauge span { display: block; height: 100%; border-radius: 3px; background: var(--rose-clair); }
.maintenant .bornes { display: flex; justify-content: space-between; font-size: .82rem; color: var(--texte-sur-violet); }
.maintenant .ensuite { border-top: 1px solid rgba(255,255,255,.16); padding-top: 10px; font-size: .9rem; color: var(--texte-sur-violet); }
.maintenant .ensuite b { color: #fff; }

/* Prochain rendez-vous */
.prochain-rdv { display: grid; gap: 12px; }
.prochain-rdv .ligne-tete { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sur-titre-prune { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--prune); }
:root[data-theme="dark"] .sur-titre-prune { color: var(--rose-clair); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sur-titre-prune { color: var(--rose-clair); } }
.pilule { background: #F6DCEB; color: #7A1E52; font-weight: 700; font-size: .85rem; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.prochain-rdv .qui { display: flex; gap: 12px; align-items: center; color: var(--texte); }
.prochain-rdv .qui > div { display: grid; min-width: 0; }
.prochain-rdv .qui b { font-size: 1.05rem; }
.prochain-rdv .qui span { font-size: .88rem; color: var(--texte-2); }
.tuiles-rdv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tuiles-rdv > div { background: var(--surface-2); border-radius: 12px; padding: 10px; display: grid; align-content: start; }
.tuiles-rdv span { font-size: .8rem; color: var(--texte-3); }
.tuiles-rdv b { font-family: var(--titres); font-size: 1.15rem; color: var(--accent); }
.tuiles-rdv b.petit { font-family: var(--corps); font-size: .88rem; line-height: 1.3; }
.tuiles-rdv .fort { background: var(--violet); }
.tuiles-rdv .fort span { color: var(--texte-sur-violet); }
.tuiles-rdv .fort b { color: #fff; font-size: 1.4rem; }
.prochain-rdv .actions { display: flex; gap: 8px; }
.prochain-rdv .actions .btn:first-child { flex: 1; min-width: 0; white-space: normal; }

/* Listes compactes (libres à la pause, derniers échanges) */
.liste-mini { padding: 4px 14px; }
.mini-membre { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--ligne); color: var(--texte); min-height: 56px; }
.mini-membre:last-child { border-bottom: 0; }
.mini-membre .mini-texte { flex: 1; display: grid; min-width: 0; }
.mini-membre b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-membre small { font-size: .82rem; color: var(--texte-2); }
.mini-membre .aide { white-space: nowrap; font-weight: 600; color: var(--accent); }
.mini-membre > .ico { color: var(--texte-3); }

/* Carte de membre : identité, raisons, puis les actions sans quitter la liste. */
.membre .haut { padding-right: 0; color: var(--texte); }
.membre .qui { flex: 1; }
.membre .haut .score { flex: none; }
.membre .raisons { display: block; font-size: .88rem; border-top: 0; padding-top: 0; }
.membre .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.membre .tags:empty { display: none; }
.membre .actions { display: flex; gap: 8px; margin-top: auto; }
.membre .actions .btn { flex: 1; min-width: 0; padding: 0 10px; min-height: 44px; }
.membre .actions .btn-icone { flex: none; }
.membre .favori-btn { position: static; background: var(--surface-2); border: 1px solid var(--ligne); color: var(--texte-2); padding: 0; }
.membre:hover { transform: none; }

/* Rencontrer : segments, bouton Filtres, filtres actifs retirables */
.segments a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 9px; font-weight: 600; font-size: .88rem; color: var(--texte-2); white-space: nowrap; }
.segments a[aria-selected="true"] { background: var(--surface); color: var(--accent); box-shadow: var(--ombre); }
.segments button { font-size: .88rem; min-height: 40px; }
.segments-reseau { margin-top: 12px; }
.puces-actives { margin-top: 10px; }
.puce-filtres { color: var(--texte); font-weight: 600; }
.puces-actives .puce { min-height: 40px; }
.duo-boutons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }

/* Fiche : barre d'action collée en bas, au-dessus des onglets */
.fiche-actions-sec { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.fiche-actions-sec .btn.actif { background: var(--relief); border-color: transparent; color: var(--sur-relief); }
.titre-bloc { font-family: var(--corps); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--texte-3); margin: 18px 0 10px; }
.fiche-tete .bandeau .reseau { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; }
.barre-fiche { position: sticky; bottom: calc(var(--barre-h) + var(--sur-bas) + 10px); z-index: 20; display: flex; gap: 8px; margin-top: 18px; padding: 10px; border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 94%, transparent); border: 1px solid var(--ligne); box-shadow: var(--ombre-forte); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.barre-fiche .btn { flex: 1; min-width: 0; min-height: 48px; }
.barre-fiche .btn span { overflow: hidden; text-overflow: ellipsis; }
.barre-fiche .btn-icone { width: 48px; height: 48px; }
@media (min-width: 1024px) { .barre-fiche { bottom: 16px; } }

/* Demande de rendez-vous : jours avec lieu, créneaux par plage */
.demande-tete { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: var(--surface-2); margin-bottom: 14px; }
.demande-tete > div { display: grid; min-width: 0; }
.demande-tete span { font-size: .85rem; color: var(--texte-2); }
.jours-onglets { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 14px; scrollbar-width: none; }
.jours-onglets::-webkit-scrollbar { display: none; }
.jours-onglets > * { flex: 1 0 auto; min-width: 128px; border: 1.5px solid var(--ligne); background: var(--surface); border-radius: 12px; padding: 9px 12px; text-align: left; color: var(--texte); display: grid; }
.jours-onglets b { font-family: var(--titres); font-size: .98rem; }
.jours-onglets small { font-size: .8rem; color: var(--texte-3); }
.jours-onglets [aria-selected="true"] { background: var(--action); border-color: var(--action); color: var(--sur-action); }
.jours-onglets [aria-selected="true"] small { color: inherit; opacity: .85; }
.jours-onglets button[disabled] { opacity: .5; }
.groupe-plage { margin: 10px 0 16px; }
.plage-tete { display: grid; margin-bottom: 8px; }
.plage-tete b { font-size: .95rem; }
.plage-tete span { font-size: .82rem; color: var(--texte-2); }
.creneaux button[disabled] { opacity: .55; text-decoration: line-through; cursor: not-allowed; background: var(--surface-2); }

/* Agenda : ligne de temps */
.bandeau-demandes { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--relief); color: var(--texte); margin-bottom: 12px; }
.bandeau-demandes > span:nth-child(2) { flex: 1; font-size: .92rem; }
.agenda-outils { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 8px; padding: 0 16px 4px; scrollbar-width: none; }
.agenda-outils .puce { min-height: 40px; }
.ligne-temps { list-style: none; margin: 8px 0 0; padding: 0; position: relative; }
.ligne-temps::before { content: ''; position: absolute; left: 53px; top: 6px; bottom: 6px; width: 2px; background: var(--ligne); }
.tl { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 20px; margin-bottom: 10px; position: relative; }
.tl > time { font-family: var(--titres); font-weight: 700; font-size: .92rem; padding-top: 14px; text-align: right; font-variant-numeric: tabular-nums; }
.tl::after { content: ''; position: absolute; left: 49px; top: 18px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--mauve); }
.tl-rdv::after { background: var(--violet); border-color: var(--violet); }
.tl-plage::after { border-style: dashed; }
.tl-carte { background: var(--surface); border: 1px solid var(--ligne); border-radius: 14px; padding: 12px 14px; box-shadow: var(--ombre); min-width: 0; }
.tl-ligne { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
.tl-ligne > div { display: grid; gap: 2px; min-width: 0; }
.tl-lib { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--texte-3); }
.tl-titre { font-size: .98rem; }
.tl-info { font-size: .85rem; color: var(--texte-2); }
.tl-rdv .tl-carte { border-left: 4px solid var(--violet); }
.tl-rdv .tl-lib { color: var(--prune); }
.tl-rdv-corps { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-top: 8px; }
.tl-rdv-corps .qui { display: flex; gap: 10px; align-items: center; min-width: 0; color: var(--texte); }
.tl-rdv-corps .qui > div { display: grid; min-width: 0; }
.tl-rdv-corps .qui span { font-size: .85rem; color: var(--texte-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tuile-table { flex: none; display: grid; place-items: center; min-width: 58px; min-height: 58px; border-radius: 12px; border: 0; background: var(--violet); color: #fff; padding: 6px 8px; }
.tuile-table span { font-size: .75rem; color: var(--texte-sur-violet); }
.tuile-table b { font-family: var(--titres); font-size: 1.35rem; line-height: 1; }
.tl .objet { margin-top: 8px; font-size: .88rem; color: var(--texte-2); }
.tl .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.tl-rdv.attente .tl-carte { border-left-color: var(--mauve); border-left-style: dashed; }
.tl-plage .tl-carte { background: var(--surface-2); border-style: dashed; box-shadow: none; }
.tl-plage .tl-lib { color: var(--accent); }
.tl.passe { opacity: .62; }
.tl.en-cours .tl-carte { box-shadow: 0 0 0 2px var(--rose), var(--ombre); }
.tl-session.format-pause .tl-carte, .tl-session.format-accueil .tl-carte { background: transparent; box-shadow: none; }
.tl .favori-btn { width: 44px; height: 44px; flex: none; }
.tl .favori-btn[aria-pressed="true"] { color: var(--accent) !important; }
.tl .favori-btn[aria-pressed="true"] .ico { fill: currentColor; }
.tl-maintenant { position: relative; height: 26px; margin: 4px 0 12px; }
.tl-maintenant::before { content: ''; position: absolute; left: 46px; right: 0; top: 12px; height: 2px; background: var(--rose); }
.tl-maintenant::after { content: ''; position: absolute; left: 48px; top: 7px; width: 12px; height: 12px; border-radius: 50%; background: var(--rose); }
.tl-maintenant time { position: absolute; right: 0; top: 0; background: var(--rose); color: var(--violet); font-weight: 700; font-size: .78rem; padding: 3px 8px; border-radius: 999px; }
:root[data-theme="dark"] :is(.tuiles-rdv .fort, .tuile-table, .maintenant) { background: #4A1F7A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :is(.tuiles-rdv .fort, .tuile-table, .maintenant) { background: #4A1F7A; } }

/* Plan des tables (schéma) et retard */
.plan-info { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; }
.plan-info .ico { color: var(--accent); margin-top: 2px; }
.plan-tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px; padding: 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--ligne); margin-bottom: 12px; }
.plan-tables span { aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px; background: var(--surface); border: 1px solid var(--ligne); font-weight: 600; font-size: .85rem; color: var(--texte-3); }
.plan-tables .ici { background: var(--violet); border-color: var(--violet); color: #fff; font-size: 1rem; box-shadow: 0 0 0 3px var(--rose); }
.choix-retard { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.choix-retard .btn { min-height: 56px; font-size: 1.05rem; }

/* Badge */
.segments-badge { margin-bottom: 4px; }
.badge-aide { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 14px; font-size: .88rem; color: var(--texte-2); text-align: center; }
.badge-aide .ico { color: var(--accent); }
