/* Espace formation — style de la maquette Profemeli validée le 05/11/2026 (docs/profemeli/maquette). */
:root {
  --bg: #F2F4F1;
  --card: #FFFFFF;
  --ink: #0F2422;
  --muted: #5E6B67;
  --line: #E4E7E3;
  --line-soft: #EEF1ED;
  --soft: #F6F8F5;
  --hover: #EEF2EE;
  --pine: #0B2B2D;
  --accent: #146C5F;
  --live: #2E9E6A;
  --coral: #E0533D;
  --mint: #A9DCCF;
  --salmon: #F5C8C0;
  --blue: #C0D4F4;
  --butter: #F2E19B;
  --green: #C5E5BA;
  --ok-bg: #E1F3EE; --ok-fg: #14574C;
  --bad-bg: #FBE6E2; --bad-fg: #9A3A2C;
  --warn-bg: #FAF2CF; --warn-fg: #7A5B0C;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.fm {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.fm a { color: var(--accent); }
.fm a:hover { color: var(--pine); }
.fm h1, .fm h2, .fm h3 { margin: 0; font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* Animations douces, coupées si l'utilisateur réduit les animations. */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.rise { animation: rise .6s cubic-bezier(.2, .8, .2, 1) both; }
.live { animation: pulse 1.6s ease-in-out infinite; }
.lift { transition: transform .2s ease, box-shadow .2s ease; }
.lift:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(15, 36, 34, .08); }
@media (prefers-reduced-motion: reduce) { .rise, .live, .fm-toast { animation: none !important; } .lift:hover { transform: none; } }

/* Page */
.fm-page { min-height: 100vh; padding: 18px 32px 56px 96px; display: flex; flex-direction: column; gap: 22px; }

/* Barre du haut (maquette Barre.dc.html) */
.fm-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.fm-brand { display: flex; align-items: center; gap: 10px; margin-right: 12px; color: var(--ink); text-decoration: none; }
.fm a.fm-brand, .fm a.fm-brand:hover { color: var(--ink); }
.fm-logo { width: 38px; height: 38px; border-radius: 11px; background: var(--pine); display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.fm-logo img { width: 100%; height: 100%; object-fit: contain; background: #FFFFFF; }
.fm-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.fm-brand-text strong { font-size: 18px; font-weight: 600; }
.fm-brand-text small { font-size: 12px; color: var(--muted); }
.fm-nav { display: flex; flex-wrap: wrap; gap: 2px; background: var(--card); border-radius: 99px; padding: 4px; box-shadow: 0 1px 2px rgba(15, 36, 34, .05); }
.fm-nav a { height: 34px; padding: 0 13px; border-radius: 99px; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 6px; transition: background .2s ease, color .2s ease; }
.fm-nav a:hover { background: var(--hover); color: var(--ink); }
.fm-nav a[aria-current="page"], .fm-nav a[aria-current="page"]:hover { background: var(--pine); color: #FFFFFF; font-weight: 500; }
.fm-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--coral); }
.fm-grow { flex-grow: 1; }
.fm-chip { height: 38px; padding: 0 14px; border-radius: 99px; background: var(--card); display: flex; align-items: center; gap: 8px; font-weight: 500; }
.fm-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); }
.fm-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--mint); color: var(--ink); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; text-decoration: none; }
.fm a.fm-avatar, .fm a.fm-avatar:hover { color: var(--ink); }
.fm-round { width: 38px; height: 38px; border-radius: 50%; border: none; background: var(--card); color: var(--ink); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .2s ease; }
.fm-round:hover { background: var(--hover); }
.inline { display: inline; margin: 0; }

/* Petit dock flottant à gauche */
.fm-dock { position: fixed; left: 18px; top: 280px; width: 50px; padding: 12px 0; border-radius: 26px; background: var(--pine); display: flex; flex-direction: column; align-items: center; gap: 14px; z-index: 5; }
.fm-dock a { width: 36px; height: 36px; border-radius: 50%; color: #FFFFFF; display: flex; align-items: center; justify-content: center; transition: background .2s ease; }
.fm-dock a:hover, .fm-dock a[aria-current="page"] { background: rgba(255, 255, 255, .12); color: #FFFFFF; }

/* Boutons */
.fm-btn { height: 40px; padding: 0 18px; border-radius: 99px; border: none; background: var(--pine); color: #FFFFFF; font: inherit; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; cursor: pointer; transition: filter .2s ease; }
.fm a.fm-btn, .fm a.fm-btn:hover { color: #FFFFFF; }
.fm-btn:hover { filter: brightness(1.15); }
.fm-btn-lg { height: 50px; font-size: 16px; }
.fm-ghost { height: 40px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; cursor: pointer; transition: background .2s ease; }
.fm a.fm-ghost { color: var(--ink); }
.fm-ghost:hover { background: var(--hover); }

/* En-tête de page */
.fm-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.fm-head-text { flex: 1 1 360px; display: flex; flex-direction: column; gap: 2px; }
.fm-head-text .crumb { font-size: 13px; color: var(--muted); }
.fm-head-text .crumb strong { color: var(--ink); font-weight: 500; }
.fm-head h1 { font-size: 42px; letter-spacing: -1px; }

/* Cartes */
.fm-card { background: var(--card); border-radius: 22px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.fm-card h2 { font-size: 17px; }
.fm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.fm-stat { border-radius: 20px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.fm-stat .value { font-size: 30px; font-weight: 600; letter-spacing: -.5px; }
.bg-mint { background: var(--mint); } .bg-salmon { background: var(--salmon); } .bg-blue { background: var(--blue); }
.bg-butter { background: var(--butter); } .bg-green { background: var(--green); }
.fm-empty { border: 1px dashed #C9D0CB; border-radius: 16px; padding: 18px; color: var(--muted); }

/* Pastilles de statut : fond clair + texte foncé de la même couleur */
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; border-radius: 99px; padding: 4px 10px; }
.tag-ok { background: var(--ok-bg); color: var(--ok-fg); }
.tag-bad { background: var(--bad-bg); color: var(--bad-fg); }
.tag-warn { background: var(--warn-bg); color: var(--warn-fg); }
.tag-soft { background: var(--soft); color: var(--muted); }

/* Formulaires */
.fm-field { display: flex; flex-direction: column; gap: 6px; }
.fm-field > span, .fm-field > label { font-size: 13px; font-weight: 500; }
.fm-input { height: 42px; border-radius: 12px; border: 1px solid var(--line); background: #FFFFFF; padding: 0 12px; font: inherit; color: var(--ink); width: 100%; }
.fm-input:focus, .fm-btn:focus-visible, .fm-ghost:focus-visible, .fm-nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fm-input-lg { height: 48px; border-radius: 14px; padding: 0 14px; }
.fm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.fm-help { font-size: 12px; color: var(--muted); }
.errorlist { list-style: none; margin: 0; padding: 0; color: var(--bad-fg); font-size: 12px; }
.fm-error { background: var(--bad-bg); color: var(--bad-fg); border-radius: 14px; padding: 12px 14px; }

/* Réglages : menu de gauche + sections */
.fm-settings { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.fm-side { flex: 1 1 200px; max-width: 240px; background: var(--card); border-radius: 22px; padding: 10px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 18px; }
.fm-side a { padding: 10px 14px; border-radius: 12px; color: var(--ink); text-decoration: none; }
.fm-side a:hover { background: var(--hover); color: var(--ink); }
.fm-side a.on { background: var(--soft); font-weight: 500; }
.fm-side .later { padding: 10px 14px; color: var(--muted); font-size: 13px; }
.fm-sections { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.fm-logo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.fm-logo-lg { width: 56px; height: 56px; border-radius: 14px; }

/* Messages en bas de l'écran, avec « Annuler » */
.fm-toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; display: flex; flex-direction: column; gap: 8px; width: max-content; max-width: calc(100vw - 32px); }
.fm-toast { display: flex; align-items: center; gap: 14px; background: var(--pine); color: #FFFFFF; border-radius: 99px; padding: 10px 10px 10px 20px; box-shadow: 0 12px 30px rgba(15, 36, 34, .25); animation: rise .35s cubic-bezier(.2, .8, .2, 1) both; }
.fm-toast form { margin: 0; }
.fm-toast-error { background: var(--bad-fg); }
.fm-undo { height: 32px; padding: 0 14px; border-radius: 99px; border: none; background: var(--mint); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.fm-toast-close { width: 32px; height: 32px; border-radius: 50%; border: none; background: transparent; color: #FFFFFF; font-size: 18px; cursor: pointer; }

/* Connexion (maquette Connexion.dc.html) */
.fm-auth { min-height: 100vh; padding: 20px; display: flex; flex-wrap: wrap; gap: 20px; font-size: 15px; }
.fm-auth main { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; padding: 20px 4%; }
.fm-auth-center { flex-grow: 1; display: flex; align-items: center; justify-content: center; padding: 40px 0; }
.fm-auth-form { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 18px; }
.fm-auth-form h1 { font-size: 36px; letter-spacing: -1px; }
.fm-auth-form p { margin: 0; }
.fm-auth-side { flex: 1 1 520px; min-width: 0; min-height: 640px; border-radius: 32px; background: var(--pine); color: #FFFFFF; padding: 48px 44px; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; overflow: hidden; }
.fm-auth-side .kicker { font-size: 13px; color: var(--mint); font-weight: 500; }
.fm-auth-side p { margin: 0; font-size: 34px; font-weight: 600; line-height: 1.15; letter-spacing: -.5px; max-width: 480px; }
.fm-auth-foot { font-size: 12px; color: var(--muted); }

/* Téléphone et petites tablettes */
@media (max-width: 900px) {
  .fm-page { padding: 16px 16px 96px; }
  .fm-dock { top: auto; bottom: 16px; left: 16px; flex-direction: row; width: auto; padding: 0 12px; height: 50px; }
  .fm-nav { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .fm-nav a { white-space: nowrap; }
  .fm-head h1 { font-size: 32px; }
  .fm-side { max-width: none; position: static; }
  .fm-auth-side { display: none; }
}

/* Connexion : éléments communs */
.fm-note { background: var(--ok-bg); color: var(--ok-fg); border-radius: 14px; padding: 12px 14px; }
.fm-label-row { display: flex; justify-content: space-between; gap: 8px; }
.fm-label-row a { font-weight: 400; text-decoration: none; }
.fm-shield { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.fm-back { align-self: flex-start; height: 34px; padding: 0 12px; font-size: 13px; }
.fm-check { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.fm-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.fm-link { border: none; background: transparent; color: var(--accent); font: inherit; padding: 6px 0; cursor: pointer; text-decoration: none; }
.fm-link:disabled { color: var(--muted); cursor: default; }
.fm-digits { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.fm-digits input { height: 58px; min-width: 0; border-radius: 14px; border: 1px solid var(--line); background: #FFFFFF; text-align: center; font: inherit; font-size: 24px; font-weight: 600; color: var(--ink); }
.fm-digits input:focus { outline: none; border: 2px solid var(--accent); }
.fm-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 14px; }
.fm-steps li { display: flex; flex-direction: column; gap: 8px; }
.fm-qr { background: #FFFFFF; border-radius: 16px; padding: 10px; align-self: flex-start; line-height: 0; }
.fm-secret { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--soft); border-radius: 6px; padding: 2px 6px; color: var(--ink); word-break: break-all; }

/* Espace des personnes suivies : pensé pour le téléphone (maquette EspaceConnexion, 390 px) */
.fm-phone { min-height: 100vh; max-width: 440px; margin: 0 auto; padding: 22px 20px 28px; display: flex; flex-direction: column; gap: 18px; font-size: 15px; }
.fm-phone-top { display: flex; align-items: center; gap: 10px; }
.fm-phone-top .fm-logo { width: 34px; height: 34px; border-radius: 10px; }
.fm-phone-brand { font-weight: 600; flex-grow: 1; }
.fm-lang { height: 32px; padding: 0 12px; border-radius: 99px; border: none; background: #FFFFFF; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.fm-lang .on { color: var(--ink); font-weight: 600; }
.fm-hero { border-radius: 26px; background: var(--pine); padding: 20px; display: flex; flex-direction: column; gap: 12px; color: #FFFFFF; }
.fm-hero .kicker { font-size: 13px; color: var(--mint); font-weight: 500; }
.fm-hero-text { font-size: 24px; font-weight: 600; line-height: 1.2; }
.fm-hero-tiles { display: flex; gap: 8px; }
.fm-hero-tiles span { flex: 1 1 0; height: 54px; border-radius: 14px; }
.fm-phone-form { display: flex; flex-direction: column; gap: 14px; }
.fm-phone-form h1 { font-size: 28px; letter-spacing: -.5px; }
.fm-phone-form p { margin: 0; font-size: 14px; }
.fm-segmented { display: flex; gap: 4px; background: #FFFFFF; border-radius: 99px; padding: 4px; }
.fm-segmented > * { flex: 1 1 0; height: 38px; border-radius: 99px; display: flex; align-items: center; justify-content: center; font-weight: 500; }
.fm-segmented .on { background: var(--pine); color: #FFFFFF; }
.fm-input-xl { height: 50px; border-radius: 14px; padding: 0 14px; }
.fm-btn-xl { height: 52px; font-size: 16px; }
.fm-phone .fm-digits { gap: 6px; }
.fm-phone .fm-digits input { height: 56px; font-size: 22px; }
.fm-phone-links { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.fm-phone-links a { text-decoration: none; }
.fm-phone-foot { font-size: 11px; color: var(--muted); text-align: center; }

/* Réglages › Sécurité et données */
.fm-rows { display: flex; flex-direction: column; }
.fm-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.fm-row > div { display: flex; flex-direction: column; flex: 1 1 260px; }
.fm-row .fm-value { height: 38px; padding: 0 14px; border-radius: 12px; background: var(--soft); display: flex; align-items: center; font-weight: 600; white-space: nowrap; }
.fm-log { width: 100%; border-collapse: collapse; font-size: 13px; }
.fm-log th { text-align: left; font-weight: 500; color: var(--muted); padding: 8px 6px; border-bottom: 1px solid var(--line); }
.fm-log td { padding: 8px 6px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.fm-table-wrap { overflow-x: auto; }

/* Recherche de la barre du haut */
.fm-search { color: var(--muted); font-weight: 400; padding: 0 12px; margin: 0; }
.fm-search input { width: 72px; border: none; outline: none; background: transparent; font: inherit; color: var(--ink); }
.fm-search kbd { font: inherit; font-size: 11px; background: var(--bg); border-radius: 6px; padding: 2px 6px; }

/* Pastilles de couleur */
.tag-blue { background: #EAF1FC; color: #2F4E86; }
.tag-grey { background: #EEF1ED; color: #3E4A46; }
.tag-mint { background: var(--ok-bg); color: var(--ok-fg); }
.tag-ok { background: #E5F3E0; color: #2F6B24; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot-ink { background: var(--ink); } .dot-accent { background: var(--accent); } .dot-coral { background: var(--coral); }
.dot-amber { background: #E0A92B; } .dot-grey { background: #9AA6A1; } .dot-ok { background: #2F6B24; }

/* Avatars aux initiales */
.fm-av { width: 38px; height: 38px; border-radius: 50%; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--ink); }
.fm-av-sm { width: 28px; height: 28px; font-size: 11px; }
.fm-av-xl { width: 72px; height: 72px; font-size: 26px; }
.fm-av-salmon { background: var(--salmon); } .fm-av-mint { background: var(--mint); } .fm-av-butter { background: var(--butter); }
.fm-av-blue { background: var(--blue); } .fm-av-green { background: var(--green); }

/* Filtres de la liste */
.fm-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fm-searchbox { height: 42px; flex: 0 1 320px; padding: 0 14px; border-radius: 99px; background: var(--card); display: flex; align-items: center; gap: 8px; color: var(--muted); margin: 0; }
.fm-searchbox input { flex-grow: 1; min-width: 0; border: none; outline: none; background: transparent; font: inherit; color: var(--ink); }
.fm-filter { height: 42px; padding: 0 16px; border-radius: 99px; border: none; background: var(--card); color: var(--ink); font-weight: 500; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; cursor: pointer; list-style: none; }
.fm a.fm-filter { color: var(--ink); }
.fm-filter .count { font-size: 12px; opacity: .75; }
.fm a.fm-filter.on, .fm-filter.on { background: var(--pine); color: #FFFFFF; }
.fm-filter.on .dot { background: #FFFFFF; }
.fm-filter-dashed { background: transparent; border: 1px dashed #C9D0CB; color: var(--muted); font-weight: 400; }
.fm-filter-saved { padding: 0 6px 0 16px; }
.fm-filter-saved a { color: var(--ink); text-decoration: none; }
.fm-filter-saved button { width: 26px; height: 26px; border-radius: 50%; border: none; background: transparent; color: var(--muted); cursor: pointer; font-size: 16px; }
summary.fm-filter::-webkit-details-marker, .fm-pop summary::-webkit-details-marker { display: none; }

/* Petites fenêtres qui s'ouvrent sous un bouton */
.fm-pop { position: relative; display: inline-block; }
.fm-pop > summary { list-style: none; cursor: pointer; }
.fm-pop-body { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; min-width: 260px; background: var(--card); border-radius: 16px; padding: 14px; box-shadow: 0 16px 40px rgba(15, 36, 34, .16); display: flex; flex-direction: column; gap: 10px; }
.fm-pop-body.fm-grid { min-width: min(560px, 90vw); }
.fm-pop-right .fm-pop-body { left: auto; right: 0; }
.fm-right { text-align: right; }

/* Tableaux */
.fm-table-card { padding: 8px 8px 12px; }
.fm-table { width: 100%; min-width: 900px; border-collapse: collapse; }
.fm-table-compact { min-width: 560px; }
.fm-table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 500; padding: 12px 14px; }
.fm-table td { padding: 12px 14px; border-top: 1px solid var(--line-soft); vertical-align: middle; }
.fm-table tbody tr { transition: background .15s ease; }
.fm-table tbody tr:hover { background: #FAFBFA; }
.fm-who { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.fm a.fm-who, .fm a.fm-who:hover { color: var(--ink); }
.fm-who > span { display: flex; flex-direction: column; }
.fm-sub, .fm-who small { display: block; font-size: 12px; color: var(--muted); }
.fm-sub.late { color: var(--bad-fg); }
.fm-pack-cell { min-width: 170px; }
.fm-pack-cell > * { display: block; margin-bottom: 6px; }
.fm-bar { display: block; height: 6px; border-radius: 99px; background: var(--line-soft); overflow: hidden; }
.fm-bar > span { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.fm-bar > span.warn, .fm-bar > .tone-amber { background: #E0A92B; }
.fm-bar > .tone-coral { background: var(--coral); } .fm-bar > .tone-grey { background: #9AA6A1; } .fm-bar > .tone-ok { background: #2F6B24; }
.fm-bar-lg { height: 8px; }
.fm-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.fm-tags .tag { font-size: 11px; padding: 3px 8px; white-space: nowrap; }
.fm-table-foot { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; padding: 12px 14px 0; font-size: 13px; color: var(--muted); }
.fm-cancelled td { color: var(--muted); text-decoration: line-through; }
.fm-cancelled td:last-child, .fm-cancelled td:nth-child(4) { text-decoration: none; }

/* Fiche */
.fm-person-head { align-items: center; gap: 16px; }
.fm-person-head h1 { font-size: 38px; }
.fm-person-sub { color: #3E4A46; }
.fm-badgebar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: var(--card); border-radius: 16px; padding: 10px 14px; }
.fm-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.fm-tabs a { height: 36px; padding: 0 14px; border-radius: 99px; color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.fm-tabs a:hover { color: var(--ink); background: var(--hover); }
.fm-tabs a[aria-current="page"] { background: var(--card); color: var(--ink); font-weight: 500; box-shadow: 0 1px 3px rgba(15, 36, 34, .08); }
.fm-stat .value small { font-size: 15px; font-weight: 400; }
.fm-split { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.fm-main-col { flex: 999 1 560px; min-width: 0; }
.fm-side-col { flex: 1 1 300px; min-width: 0; }
.fm-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.fm-card-head > div { display: flex; flex-direction: column; }
.fm-legend { display: flex; gap: 12px; font-size: 13px; }
.fm-legend span { display: flex; align-items: center; gap: 5px; }
.fm-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.lg-done { background: var(--mint); } .lg-next { background: #FFFFFF; border: 2px solid var(--accent); } .lg-out { border: 1px dashed #9AA6A1; }
.fm-cells { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 10px; }
.fm-cell { height: 72px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.fm-cell-done { background: var(--mint); }
.fm-cell-next { background: #FFFFFF; border: 2px solid var(--accent); color: var(--accent); }
.fm-cell-out { border: 1px dashed #C9D0CB; color: #9AA6A1; }
.fm-task { display: flex; align-items: flex-start; gap: 10px; margin: 0; }
.fm-task.done span { color: var(--muted); text-decoration: line-through; }
.fm-tick { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid #C9D0CB; background: #FFFFFF; color: var(--accent); font-weight: 700; cursor: pointer; flex-shrink: 0; line-height: 1; }
.fm-inline-form { display: flex; flex-wrap: wrap; gap: 8px; }
.fm-inline-form .fm-input { flex: 1 1 140px; width: auto; }
.fm-step { display: flex; gap: 12px; }
.fm-step-rail { display: flex; flex-direction: column; align-items: center; }
.fm-step-dot { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; border: 2px dashed #C9D0CB; }
.fm-step-done .fm-step-dot { background: var(--mint); border: none; }
.fm-step-current .fm-step-dot { border: 2px solid var(--accent); }
.fm-step-current .fm-step-dot i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); display: block; }
.fm-step-line { width: 2px; flex-grow: 1; min-height: 20px; background: var(--line); }
.fm-step-done .fm-step-line { background: var(--mint); }
.fm-step-body { display: flex; flex-direction: column; gap: 4px; padding-bottom: 14px; flex-grow: 1; }
.fm-step-todo strong { font-weight: 400; }
.fm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.fm-feed { display: flex; flex-direction: column; }
.fm-feed-item { display: flex; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-soft); }
.fm-feed-chip { font-size: 11px; font-weight: 600; border-radius: 99px; padding: 4px 8px; height: fit-content; width: 78px; text-align: center; flex-shrink: 0; background: var(--soft); color: var(--muted); }
.kind-payment { background: #E5F3E0; color: #2F6B24; } .kind-pack { background: var(--ok-bg); color: var(--ok-fg); }
.kind-step { background: #EAF1FC; color: #2F4E86; } .kind-note { background: var(--warn-bg); color: var(--warn-fg); }
.kind-access { background: #F3EAFB; color: #5B3A86; }
.fm-money-row { display: flex; flex-wrap: wrap; gap: 18px; align-items: baseline; }
.fm-note-card p { margin: 0; line-height: 1.5; }
.fm-fieldset { border: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.fm-fieldset legend { font-size: 13px; font-weight: 500; padding: 0; margin-bottom: 8px; }
.fm-checks { display: flex; flex-wrap: wrap; gap: 14px; }
.fm-btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }

/* Forfaits par étape */
.fm-columns { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: 12px; min-width: 1040px; }
.fm-column { border-radius: 18px; background: var(--soft); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.fm-column-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 4px; }
.fm-column-head strong { flex-grow: 1; }
.fm-column-head .count { font-size: 12px; font-weight: 600; background: #FFFFFF; border-radius: 99px; padding: 2px 8px; }
.fm-mini { border-radius: 14px; background: #FFFFFF; padding: 12px; display: flex; flex-direction: column; gap: 8px; color: var(--ink); text-decoration: none; }
.fm a.fm-mini, .fm a.fm-mini:hover { color: var(--ink); }
.fm-mini .fm-who strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.fm-mini small { font-size: 12px; }

@media (max-width: 900px) {
  .fm-cells { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .fm-person-head h1 { font-size: 30px; }
  .fm-search { display: none; }
}
.fm-row-details > summary { list-style: none; cursor: pointer; }
.fm-row-details > summary::-webkit-details-marker { display: none; }
.fm-row-details[open] > form { padding: 6px 0 14px; }
.fm-textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.4; }
textarea.fm-input { height: auto; padding: 10px 12px; }
.fm-tag-x { border: none; background: transparent; color: inherit; cursor: pointer; padding: 0 0 0 4px; font-size: 14px; line-height: 1; }
.fm-account > summary { cursor: pointer; }
.fm-account .fm-pop-body { min-width: 200px; }
.fm-account .fm-pop-body a { color: var(--ink); text-decoration: none; }
@media (max-width: 1500px) { .fm-search kbd { display: none; } }
.fm-pop-body { text-align: left; }

/* Planning : une ligne par jour (maquette Planning.dc.html) */
.fm-nav-group { display: flex; gap: 6px; align-items: center; }
.fm-segmented-sm { background: var(--soft); }
.fm-segmented-sm > a { height: 32px; padding: 0 12px; color: var(--muted); text-decoration: none; font-size: 13px; }
.fm-segmented-sm > a.on { background: #FFFFFF; color: var(--ink); box-shadow: 0 1px 3px rgba(15, 36, 34, .08); }
.fm-timeline { min-width: 820px; display: flex; flex-direction: column; gap: 6px; }
.fm-tl-row { display: grid; grid-template-columns: 116px 1fr; gap: 10px; align-items: stretch; }
.fm-tl-row.today .fm-tl-day strong { background: var(--pine); color: #FFFFFF; }
.fm-tl-day { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.fm a.fm-tl-day { color: var(--ink); }
.fm-tl-day strong { width: 34px; height: 34px; border-radius: 50%; background: var(--soft); display: flex; align-items: center; justify-content: center; font-weight: 600; flex-shrink: 0; }
.fm-tl-day span { display: flex; flex-direction: column; font-weight: 500; }
.fm-tl-day small { font-size: 12px; color: var(--muted); font-weight: 400; }
.fm-tl-track { position: relative; height: 58px; border-radius: 14px; background: var(--soft); }
.fm-tl-track.drop-over { outline: 2px dashed var(--accent); }
.fm-tl-ticks .fm-tl-track, .fm-tl-ticks.fm-tl-track { height: 18px; background: transparent; }
.fm-tl-ticks span { position: absolute; top: 0; transform: translateX(-50%); font-size: 11px; color: var(--muted); }
.fm-ev { position: absolute; top: 5px; bottom: 5px; border-radius: 10px; padding: 4px 8px; overflow: hidden; display: flex; flex-direction: column; justify-content: center; font-size: 12px; text-decoration: none; border: 1px solid transparent; cursor: pointer; }
.fm-ev span { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fm-ev small { font-size: 11px; opacity: .85; white-space: nowrap; }
.fm-ev.selected { outline: 2px solid var(--ink); outline-offset: 1px; }
.fm-ev.dragging { opacity: .4; }
.fm-ev[draggable="true"] { cursor: grab; }
.look-done, .fm a.look-done { background: var(--ok-bg); border-color: var(--mint); color: var(--ok-fg); }
.look-next, .look-live, .fm a.look-next, .fm a.look-live { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.look-confirmed, .fm a.look-confirmed { background: #EAF1FC; border-color: var(--blue); color: #2F4E86; }
.look-tbc, .fm a.look-tbc { background: #FFFFFF; border: 1px dashed var(--accent); color: var(--ok-fg); }
.look-unpaid, .fm a.look-unpaid { background: var(--bad-bg); border-color: var(--salmon); color: var(--bad-fg); }
.look-absent, .look-cancelled, .fm a.look-absent { background: #EEF1ED; border-color: #EEF1ED; color: #3E4A46; }
.fm-ev-slot, .fm a.fm-ev-slot { background: repeating-linear-gradient(135deg, #DDEEEA 0 5px, #FFFFFF 5px 11px); border: 1px dashed var(--mint); color: var(--ok-fg); }
.fm-ev-closed { background: #EEF1ED; color: var(--muted); border-color: #EEF1ED; cursor: default; }
.fm-now { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--coral); border-radius: 2px; z-index: 3; }
.fm-now::before { content: ""; position: absolute; top: -3px; left: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--coral); }
.fm-legend-wide { flex-wrap: wrap; color: var(--muted); padding-top: 4px; }
.fm-legend-wide i { width: 12px; height: 12px; border-radius: 4px; border: 1px solid transparent; }
.fm-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.fm-month-head { font-size: 12px; color: var(--muted); text-align: center; }
.fm-month-day { min-height: 92px; border-radius: 12px; background: var(--soft); padding: 8px; display: flex; flex-direction: column; gap: 2px; color: var(--ink); text-decoration: none; font-size: 12px; }
.fm a.fm-month-day { color: var(--ink); }
.fm-month-day.out { opacity: .45; }
.fm-month-day.today strong { color: var(--accent); }
.fm-month-day.closed { background: #EEF1ED; }
.fm-month-day small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-done { color: var(--ok-fg); } .status-planned { color: var(--muted); }
.fm-detail { display: flex; flex-direction: column; gap: 12px; }
.fm-detail-when { display: flex; flex-direction: column; gap: 2px; background: var(--soft); border-radius: 14px; padding: 12px; }
.fm-btn-block { width: 100%; }
.fm-facts { margin: 0; display: grid; gap: 8px; }
.fm-facts div { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.fm-facts dt { color: var(--muted); }
.fm-facts dd { margin: 0; font-weight: 500; text-align: right; }
.fm-detail .fm-row-details > summary.fm-btn { display: flex; }

/* Aujourd'hui */
.fm-summary { margin: -6px 0 0; color: var(--muted); }
.fm-session-card { display: grid; grid-template-columns: 96px 48px 1fr auto; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: #FFFFFF; }
.look-card-next, .look-card-live { border-color: var(--accent); background: #F3FAF7; }
.fm-session-time { display: flex; flex-direction: column; }
.fm-session-time strong { font-size: 18px; }
.fm-session-time small, .fm-session-who small { font-size: 12px; color: var(--muted); }
.fm-ring { position: relative; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.fm-ring svg { position: absolute; inset: 0; }
.fm-ring span { font-size: 12px; font-weight: 600; }
@keyframes ring { from { stroke-dasharray: 0 100.5; } }
.ring-anim { animation: ring 1.2s cubic-bezier(.2, .8, .2, 1) both; }
.fm-session-who { display: flex; flex-direction: column; color: var(--ink); text-decoration: none; min-width: 0; }
.fm a.fm-session-who { color: var(--ink); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #FFFFFF; display: inline-block; }
.fm-day-strip { display: flex; flex-direction: column; gap: 4px; }
.fm-day-strip .fm-tl-track { height: 46px; }
.fm-day-strip .fm-tl-ticks { height: 16px; }
.fm-watch { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-soft); color: var(--ink); text-decoration: none; }
.fm a.fm-watch { color: var(--ink); }
.fm-watch > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.fm-watch small { font-size: 12px; color: var(--muted); }
.fm-weeks { position: relative; height: 170px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px; align-items: end; padding-top: 10px; }
.fm-week { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.fm-week .bar { width: 100%; max-width: 46px; height: calc(var(--h) / var(--cap) * 130px); min-height: 3px; border-radius: 10px 10px 4px 4px; background: var(--mint); transform-origin: bottom; animation: grow .9s cubic-bezier(.2, .8, .2, 1) both; }
.fm-week small { font-size: 11px; color: var(--muted); height: 14px; }
.fm-cap-line { position: absolute; left: 0; right: 0; bottom: 150px; border-top: 1px dashed var(--coral); }
@keyframes grow { from { transform: scaleY(0); } }
@media (prefers-reduced-motion: reduce) { .ring-anim, .fm-week .bar { animation: none; } }
@media (max-width: 900px) {
  .fm-session-card { grid-template-columns: 70px 44px 1fr; }
  .fm-session-end { grid-column: 1 / -1; }
}
.fm-cell { flex-direction: column; gap: 2px; text-decoration: none; }
.fm-cell small { font-size: 11px; opacity: .8; }
.fm-cell-today, .fm a.fm-cell-today { background: var(--accent); color: #FFFFFF; }
.fm-cell-planned, .fm a.fm-cell-planned { background: #EAF1FC; color: #2F4E86; border: 1px solid var(--blue); }
.fm a.fm-cell-done { color: var(--ink); }
.lg-today { background: var(--accent); } .lg-planned { background: #EAF1FC; border: 1px solid var(--blue); }
.fm-week-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.fm-week-day { border-radius: 16px; background: var(--soft); padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.fm-slot-chip { font-size: 13px; font-weight: 500; color: var(--ok-fg); background: var(--ok-bg); border-radius: 10px; padding: 6px 8px; display: flex; justify-content: space-between; align-items: center; }
.fm-today-split > .fm-side-col { flex: 1 1 400px; }
.fm-detail > .tag { align-self: flex-start; }

/* Programme et supports (maquette Programme.dc.html) */
.fm-program-list { max-width: 420px; }
.fm-program { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.fm-program li.dragging { opacity: .4; }
.fm-program-item { display: grid; grid-template-columns: 14px 30px 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; color: var(--ink); text-decoration: none; }
.fm a.fm-program-item { color: var(--ink); }
.fm-program-item:hover { background: var(--hover); }
.fm-program-item.on, .fm a.fm-program-item.on { background: var(--pine); color: #FFFFFF; }
.fm-program-item .num { width: 30px; height: 30px; border-radius: 9px; background: var(--bg); color: var(--ink); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; }
.fm-program-item.on .num { background: var(--mint); }
.fm-program-item .title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fm-program-item small { font-size: 11px; opacity: .7; }
.fm-grip { color: #C9D0CB; cursor: grab; font-size: 10px; letter-spacing: -2px; }
.fm-program-item.on .fm-grip { color: #5E8C84; }
.fm-divider { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; padding: 6px 4px; }
.fm-divider::before, .fm-divider::after { content: ""; flex: 1; border-top: 1px dashed #C9D0CB; }
.fm-num-badge { width: 44px; height: 44px; border-radius: 13px; background: var(--mint); font-size: 18px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.fm-material { display: grid; grid-template-columns: 40px 1fr auto auto auto auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--soft); }
.fm-material > div { display: flex; flex-direction: column; min-width: 0; }
.fm-material small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fm-file-icon { width: 40px; height: 40px; border-radius: 10px; background: #FFFFFF; color: var(--bad-fg); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.fm-page-preview { position: relative; overflow: hidden; border-radius: 14px; border: 1px solid var(--line); background: #FFFFFF; padding: 22px; min-height: 220px; display: flex; flex-direction: column; gap: 10px; }
.fm-page-preview .head { font-size: 11px; letter-spacing: 1px; font-weight: 600; color: var(--accent); }
.fm-page-preview .line { height: 8px; border-radius: 4px; background: #EEF1ED; }
.fm-page-preview .line.short { width: 60%; }
.fm-page-preview .mark { position: absolute; left: -10%; right: -10%; top: 55%; transform: rotate(-30deg); text-align: center; font-size: 20px; font-weight: 600; color: rgba(15, 36, 34, .13); white-space: nowrap; }
@media (max-width: 900px) { .fm-program-list { max-width: none; } .fm-material { grid-template-columns: 40px 1fr; } }
.fm-card-head > .fm-who, .fm-card-head > .fm-actions { flex-direction: row; }
.fm-card-head > .fm-who > span:last-child { display: flex; flex-direction: column; }
.fm-card .fm-sections, .fm-card form.fm-sections, .fm-detail .fm-sections { flex: none; }

/* Espace de la personne suivie (maquettes Espace*.dc.html, téléphone d'abord) */
.fm-phone-app { padding-bottom: 104px; }
.fm-phone-top .fm-avatar { width: 34px; height: 34px; font-size: 12px; list-style: none; cursor: pointer; }
.fm-phone-head { display: flex; flex-direction: column; gap: 6px; }
.fm-phone-head h1 { font-size: 30px; letter-spacing: -.5px; }
.fm-phone-head p { margin: 0; }
.fm-tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 12px; width: min(420px, calc(100vw - 24px)); display: grid; grid-template-columns: repeat(5, 1fr); background: var(--pine); border-radius: 24px; padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); z-index: 30; box-shadow: 0 12px 30px rgba(15, 36, 34, .25); }
.fm-tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: #C9D6D2; text-decoration: none; padding: 4px 0; border-radius: 14px; }
.fm-tabbar a svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fm-tabbar a[aria-current="page"], .fm .fm-tabbar a[aria-current="page"] { color: #FFFFFF; background: rgba(255, 255, 255, .1); }
.fm .fm-tabbar a:hover { color: #FFFFFF; }
.fm-badge { position: absolute; top: 0; right: 18%; min-width: 16px; height: 16px; border-radius: 8px; background: var(--coral); color: #FFFFFF; font-size: 10px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.fm-toasts-phone { bottom: 100px; }
.fm-next { border-radius: 24px; background: var(--pine); color: #FFFFFF; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.fm-next .kicker { font-size: 13px; color: var(--mint); font-weight: 500; }
.fm-next-head { display: flex; justify-content: space-between; align-items: center; }
.fm-next-when { font-size: 26px; font-weight: 600; letter-spacing: -.5px; }
.fm-next .small { color: #C9D6D2; }
.fm-next-topic { display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, .06); border-radius: 16px; padding: 10px; }
.fm-next-topic span:last-child { display: flex; flex-direction: column; }
.fm-next-topic small { color: #C9D6D2; font-size: 12px; }
.fm-next-topic .fm-num-badge { width: 38px; height: 38px; font-size: 16px; background: var(--butter); color: var(--ink); }
.fm-btn-light, .fm a.fm-btn-light { background: var(--mint); color: var(--ink); }
.fm-next-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.fm-ghost-dark, .fm a.fm-ghost-dark { background: transparent; border-color: rgba(255, 255, 255, .25); color: #FFFFFF; height: 36px; font-size: 13px; }
.fm-ghost-dark:hover { background: rgba(255, 255, 255, .08); }
.fm-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fm-tile { border-radius: 20px; padding: 14px; display: flex; flex-direction: column; gap: 4px; min-height: 104px; }
.fm-tile strong { font-size: 22px; font-weight: 600; }
.fm-quote p { margin: 0; line-height: 1.5; font-style: italic; }
.fm-dots { display: flex; gap: 4px; flex-wrap: wrap; }
.fm-dots span { width: 10px; height: 10px; border-radius: 50%; background: #E1E5E1; }
.fm-dots .dot-open { background: var(--mint); } .fm-dots .dot-today { background: var(--accent); }
.fm-plist { display: flex; flex-direction: column; gap: 8px; }
.fm-pitem { border-radius: 18px; background: #FFFFFF; border: 1px solid transparent; }
.fm-pitem-locked { background: transparent; border: 1px dashed #D3D9D5; }
.fm-pitem-today { background: var(--pine); color: #FFFFFF; }
.fm-pitem > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px; cursor: pointer; }
.fm-pitem > summary::-webkit-details-marker { display: none; }
.fm-pnum { width: 36px; height: 36px; border-radius: 11px; background: var(--mint); display: flex; align-items: center; justify-content: center; font-weight: 600; flex-shrink: 0; color: var(--ink); }
.fm-pitem-today .fm-pnum { background: var(--butter); }
.fm-pitem-locked .fm-pnum { background: transparent; border: 1px dashed #C9D0CB; color: var(--muted); }
.fm-ptext { display: flex; flex-direction: column; min-width: 0; }
.fm-ptext small { font-size: 12px; color: var(--muted); }
.fm-pitem-today .fm-ptext small { color: #C9D6D2; }
.fm-pitem-locked .fm-ptext strong { color: var(--muted); font-weight: 500; }
.fm-pbody { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.fm-doc { display: grid; grid-template-columns: 40px 1fr auto auto; gap: 10px; align-items: center; background: var(--soft); border-radius: 14px; padding: 8px 10px; }
.fm-doc > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.fm-doc small { font-size: 12px; color: var(--muted); }
.fm-note-box { background: var(--ok-bg); color: var(--ok-fg); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.fm-section-label { font-size: 11px; letter-spacing: 1px; font-weight: 600; color: var(--muted); }
.fm-date-card { display: flex; gap: 12px; background: #FFFFFF; border-radius: 20px; padding: 12px; }
.fm-date-card.first { background: var(--pine); color: #FFFFFF; }
.fm-date-card.first small, .fm-date-card.first .muted { color: #C9D6D2; }
.fm-date-card.first .fm-ghost { background: transparent; color: #FFFFFF; border-color: rgba(255, 255, 255, .25); }
.fm-date-card.first .fm-link { color: var(--mint); }
.fm-date-badge { width: 52px; border-radius: 14px; background: var(--soft); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px 0; flex-shrink: 0; color: var(--ink); }
.fm-date-card.first .fm-date-badge { background: rgba(255, 255, 255, .1); color: #FFFFFF; }
.fm-date-badge strong { font-size: 20px; }
.fm-date-badge small { font-size: 11px; }
.fm-date-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.fm-date-body .tag { align-self: flex-start; }
.fm-slot-day { display: flex; flex-direction: column; gap: 6px; }
.fm-slot-times { display: flex; flex-wrap: wrap; gap: 6px; }
.fm-slot-btn { height: 38px; padding: 0 14px; border-radius: 12px; border: 1px dashed var(--mint); background: repeating-linear-gradient(135deg, #E1F3EE 0 5px, #FFFFFF 5px 11px); color: var(--ok-fg); font: inherit; font-weight: 600; cursor: pointer; }
.fm-slot-btn:hover { background: var(--accent); color: #FFFFFF; border-style: solid; }
.fm-history > summary { cursor: pointer; list-style: none; }
.fm-history-row { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line-soft); font-size: 13px; }
.fm-docrow { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.fm-docrow:first-child { border-top: none; }
.fm-docrow > span:nth-child(2) { display: flex; flex-direction: column; }
.fm-docrow small { font-size: 12px; color: var(--muted); }
.fm-docdot { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; border: 2px dashed #C9D0CB; }
.doc-validated { background: var(--mint); border: none; }
.doc-declared { background: var(--warn-bg); border: 2px solid #E0A92B; }
.fm-chat { display: flex; flex-direction: column; gap: 8px; }
.fm-chat-day { align-self: center; font-size: 12px; color: var(--muted); padding: 6px 0; }
.fm-bubble { max-width: 85%; border-radius: 18px 18px 18px 6px; padding: 10px 14px; background: #FFFFFF; display: flex; flex-direction: column; gap: 4px; }
.fm-bubble p { margin: 0; line-height: 1.45; }
.fm-bubble small { font-size: 11px; font-weight: 600; }
.fm-bubble small.muted { font-weight: 400; }
.fm-bubble.who-me { align-self: flex-end; background: var(--pine); color: #FFFFFF; border-radius: 18px 18px 6px 18px; }
.fm-bubble.who-me .muted { color: #C9D6D2; }
.fm-bubble.who-teacher { background: var(--warn-bg); }
.fm-bubble.who-platform { background: var(--ok-bg); }
.fm-chat-form { display: flex; gap: 8px; align-items: flex-end; }
.fm-chat-form textarea { flex: 1; }
.fm-segmented > a { text-decoration: none; color: var(--ink); font-size: 14px; }
.fm-segmented > a.on { color: #FFFFFF; }

/* Messages (maquette Messages.dc.html) */
.fm-threads { max-width: 380px; gap: 4px; }
.fm-thread { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 10px; border-radius: 14px; color: var(--ink); text-decoration: none; }
.fm a.fm-thread { color: var(--ink); }
.fm-thread:hover, .fm-thread.on { background: var(--soft); }
.fm-thread > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.fm-thread small { font-size: 12px; color: var(--muted); }
.fm-unread { min-width: 20px; height: 20px; border-radius: 10px; background: var(--coral); color: #FFFFFF; font-size: 11px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.fm-tpl-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 12px 10px; border-top: 1px solid var(--line-soft); border-radius: 12px; }
.fm-tpl-row.on { background: var(--soft); }
.fm-tpl-row a { display: flex; flex-direction: column; color: var(--ink); text-decoration: none; }
.fm-tpl-row small { font-size: 12px; color: var(--muted); }
.fm-switch { width: 46px; height: 26px; border-radius: 13px; border: none; background: #C9D0CB; position: relative; cursor: pointer; transition: background .2s ease; }
.fm-switch span { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #FFFFFF; transition: left .2s ease; }
.fm-switch.on { background: var(--accent); }
.fm-switch.on span { left: 23px; }
.fm-tpl-edit { flex: 1 1 420px; }
.fm-mail-preview { background: var(--soft); border-radius: 14px; padding: 12px 14px; font-size: 13px; }
.fm-mail-preview p { margin: 6px 0 0; line-height: 1.45; }
.fm-bubble details p { margin: 6px 0 0; }
.fm-nav .fm-dot { display: inline-block; }
.fm-segmented.fm-segmented-sm > a.on { background: #FFFFFF; color: var(--ink); }
.fm-legal-text p { line-height: 1.55; } .fm-auth-foot a, .fm-phone-foot a { color: inherit; }

/* Espace de la personne suivie sur ordinateur : menu en haut, mise en page en colonnes */
.fm-topnav { display: none; }
.fm-two-cols, .fm-col { display: flex; flex-direction: column; gap: 18px; }
@media (min-width: 900px) {
  .fm-phone-app { max-width: 1120px; padding: 24px 32px 48px; gap: 22px; }
  .fm-phone-app .fm-phone-top { flex-wrap: nowrap; }
  .fm-phone-app .fm-phone-brand { flex-grow: 0; margin-right: 8px; font-size: 18px; }
  .fm-phone-app .fm-phone-top .fm-logo { width: 38px; height: 38px; border-radius: 11px; }
  .fm-tabbar { display: none; }
  .fm-topnav { display: flex; gap: 2px; background: var(--card); border-radius: 99px; padding: 4px; margin: 0 auto; box-shadow: 0 1px 2px rgba(15, 36, 34, .05); }
  .fm-topnav a { position: relative; height: 36px; padding: 0 14px; border-radius: 99px; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 7px; font-size: 14px; }
  .fm-topnav a svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .fm-topnav a:hover { background: var(--hover); color: var(--ink); }
  .fm .fm-topnav a[aria-current="page"] { background: var(--pine); color: #FFFFFF; font-weight: 500; }
  .fm-topnav .fm-badge { position: static; margin-left: 2px; }
  .fm-phone-head h1 { font-size: 38px; letter-spacing: -1px; }
  .fm-home-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
  .fm-home-grid > .fm-tiles { align-content: stretch; }
  .fm-next { padding: 24px; }
  .fm-next-when { font-size: 32px; }
  .fm-plist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .fm-two-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 16px; }
  .fm-chat, .fm-chat-form, .fm-phone-app .fm-segmented { max-width: 760px; }
  .fm-date-card { padding: 16px; }
  .fm-toasts-phone { bottom: 24px; }
  /* Pages de connexion et d'accord : colonne centrée, plus aérée */
  .fm-phone:not(.fm-phone-app) { max-width: 520px; padding-top: 48px; }
}
.fm-login-split, .fm-login-side { display: flex; flex-direction: column; gap: 18px; }
@media (min-width: 900px) {
  .fm-phone:not(.fm-phone-app) { max-width: 1040px; padding: 32px 32px 28px; }
  .fm-login-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; min-height: 70vh; }
  .fm-login-split .fm-hero { min-height: 420px; justify-content: space-between; padding: 36px; border-radius: 32px; }
  .fm-login-split .fm-hero-text { font-size: 34px; }
  .fm-login-side { max-width: 420px; }
}

/* Espace formatrice sur téléphone : menu repliable, tableaux en cartes, agenda à la place de la frise */
.fm-menu-toggle { position: absolute; opacity: 0; pointer-events: none; }
.fm-menu-btn { display: none; }
.fm-agenda { display: none; }
@media (max-width: 900px) {
  .fm-page { padding: 14px 14px 40px; gap: 16px; }
  .fm-top { gap: 8px; flex-wrap: wrap; }
  .fm-brand { margin-right: auto; order: 1; }
  .fm-brand-text small { display: none; }
  .fm-menu-btn { order: 2; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 99px; background: var(--card); font-weight: 500; cursor: pointer; }
  .fm-top > .fm-btn { order: 3; width: 38px; padding: 0; }
  .fm-top > .fm-account { order: 4; }
  .fm-top > .fm-grow, .fm-top > .fm-chip:not(.fm-search) { display: none; }
  .fm-nav { order: 5; display: none; width: 100%; flex-direction: column; border-radius: 20px; padding: 6px; }
  .fm-nav a { height: 44px; white-space: normal; }
  .fm-menu-toggle:checked ~ .fm-nav { display: flex; }
  .fm-menu-toggle:checked ~ .fm-search { display: flex; order: 6; width: 100%; }
  .fm-menu-toggle:checked ~ .fm-search input { width: 100%; }
  .fm-hide-sm { display: none; }
  .fm-dock { display: none; }
  .fm-head { gap: 10px; }
  .fm-head h1 { font-size: 30px; }
  .fm-head-text { flex-basis: 100%; }
  .fm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .fm-stat { padding: 12px 14px; }
  .fm-stat .value { font-size: 24px; }
  .fm-card { padding: 16px; border-radius: 18px; }
  .fm-main-col, .fm-side-col { flex-basis: 100%; max-width: none; }
  /* Tableaux → cartes */
  table.fm-table-cards { min-width: 0; }
  table.fm-table-cards thead { display: none; }
  table.fm-table-cards, table.fm-table-cards tbody, table.fm-table-cards tr, table.fm-table-cards td { display: block; width: 100%; }
  table.fm-table-cards tr { border-top: 1px solid var(--line-soft); padding: 10px 4px; }
  table.fm-table-cards td { border: none; padding: 4px 6px; display: flex; gap: 10px; align-items: baseline; }
  table.fm-table-cards td[data-label]::before { content: attr(data-label); flex: 0 0 38%; font-size: 12px; color: var(--muted); }
  table.fm-table-cards td:first-child::before { display: none; }
  table.fm-table-cards td:empty { display: none; }
  table.fm-table-cards td.fm-right { justify-content: flex-start; }
  .fm-pack-cell > * { margin: 0; }
  /* Planning : agenda par jour */
  .fm-timeline, .fm-timeline + * { }
  .fm-card .fm-table-wrap:has(.fm-timeline) { display: none; }
  .fm-agenda { display: flex; flex-direction: column; gap: 12px; }
  .fm-agenda-day { display: flex; flex-direction: column; gap: 6px; }
  .fm-agenda-head { display: flex; justify-content: space-between; align-items: baseline; color: var(--ink); text-decoration: none; }
  .fm a.fm-agenda-head { color: var(--ink); }
  .fm-agenda-day.today .fm-agenda-head strong { color: var(--accent); }
  .fm-agenda-head small { color: var(--muted); font-size: 12px; }
  .fm-agenda-item { display: grid; grid-template-columns: 52px 1fr auto; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid transparent; text-decoration: none; font-size: 14px; }
  .fm-agenda-item .time { font-weight: 600; }
  .fm-agenda-item small { font-size: 12px; opacity: .8; }
  .fm-legend-wide { display: none; }
  .fm-segmented-sm { flex-wrap: wrap; }
  /* Forfaits par étape : colonnes empilées */
  .fm-columns { grid-template-columns: 1fr; min-width: 0; }
  /* Fiche */
  .fm-person-head .fm-av-xl { width: 52px; height: 52px; font-size: 18px; }
  .fm-person-head h1 { font-size: 26px; }
  .fm-badgebar { padding: 10px; }
  .fm-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .fm-tabs a { white-space: nowrap; }
  .fm-session-card { grid-template-columns: 64px 44px 1fr; gap: 10px; }
  .fm-material { grid-template-columns: 40px 1fr; }
  .fm-threads { max-width: none; }
  .fm-tpl-edit { flex-basis: 100%; }
  .fm-pop-body { position: fixed; left: 12px; right: 12px; top: auto; bottom: 12px; min-width: 0; max-height: 80vh; overflow: auto; }
  .fm-pop-body.fm-grid { min-width: 0; }
  .fm-toasts { bottom: 12px; }
}
@supports not selector(:has(*)) {
  @media (max-width: 900px) { .fm-timeline { display: none; } }
}
.fm-pack-cell .fm-bar { flex: 1; min-width: 60px; }
.fm-legend { flex-wrap: wrap; }
.fm-btn svg, .fm-ghost svg { flex-shrink: 0; } @media (max-width: 900px) { .fm-top > .fm-btn { gap: 0; } }

/* Réglages › Tâches automatiques */
.fm-taskrule-form input[type="number"] { width: 84px; }
.fm-taskrule-form input[name="title"] { flex: 1 1 220px; }
.fm-close-journey .fm-pop-body { width: min(380px, calc(100vw - 32px)); gap: 10px; }
.fm-head:has(> details[open]) { position: relative; z-index: 40; }
