/* ============================================================
   MSY DESIGN SYSTEM v2.0 (26/10/2026 : thème clair au choix, lisibilité, jetons du Workspace)
   MONDIASYSTEM — Un seul fichier, toute la cohérence visuelle
   Charger dans index.html : <link rel="stylesheet" href="/msy-design.css">
   ============================================================ */

/* ── 1. TOKENS ─────────────────────────────────────────────── */
:root {
  /* Couleurs */
  --gold:        #C9A84C;
  --gold-lt:     #E8C96A;
  --gold-dk:     #9A7A2E;
  --gold-10:     rgba(201,168,76,.10);
  --gold-20:     rgba(201,168,76,.20);
  --teal:        #00D4B4;
  --teal-10:     rgba(0,212,180,.10);
  --red:         #E8553E;
  --green:       #2ECC71;
  --purple:      #7C5CBF;

  /* Fonds */
  --bg:          #04070E;
  --bg-2:        #080D1A;
  --bg-3:        #0C1220;
  --bg-card:     #0A0F1E;
  --bg-hover:    #111827;

  /* Texte */
  --text:        #E8EDF5;
  --text-muted:  rgba(232,237,245,.66);   /* 4.5:1 au moins (était .50) */
  --text-dim:    rgba(232,237,245,.46);   /* décor seulement (était .30) */

  /* Bordures */
  --border:      rgba(201,168,76,.15);
  --border-2:    rgba(255,255,255,.06);
  --border-card: rgba(201,168,76,.12);

  /* Polices */
  --ff-h:  'Syne', sans-serif;
  --ff-b:  'Outfit', sans-serif;

  /* Espacement */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px;
  --s-4: 16px; --s-5: 20px; --s-6: 24px;
  --s-8: 32px; --s-10: 40px; --s-12: 48px;
  --s-16: 64px; --s-20: 80px;

  /* Rayons */
  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  16px;
  --r-xl:  24px;
  --r-full: 999px;

  /* Ombres */
  --shadow-card: 0 4px 24px rgba(0,0,0,.40);
  --shadow-gold: 0 0 24px rgba(201,168,76,.20);
  --shadow-hover:0 8px 40px rgba(0,0,0,.60);

  /* Transitions */
  --t-fast:  150ms ease;
  --t-base:  250ms ease;
  --t-slow:  400ms ease;
}

/* ── 2. RESET CIBLÉ ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

/* ── 3. TYPOGRAPHIE ────────────────────────────────────────── */

/* Display — grands titres */
.msy-display {
  font-family: var(--ff-h);
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.03em;
  color: var(--text);
}

/* Titre section */
.msy-h1 {
  font-family: var(--ff-h);
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--text);
}

.msy-h2 {
  font-family: var(--ff-h);
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

.msy-h3 {
  font-family: var(--ff-b);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.msy-body {
  font-family: var(--ff-b);
  font-size: .95rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--text-muted);
}

.msy-small {
  font-family: var(--ff-b);
  font-size: .8rem;
  font-weight: 400;
  color: var(--text-dim);
}

.msy-label {
  font-family: var(--ff-b);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.msy-price {
  font-family: var(--ff-h);
  font-weight: 700;
  color: var(--gold);
  letter-spacing: -.01em;
}

/* ── 4. BOUTONS ────────────────────────────────────────────── */

.msy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  font-family: var(--ff-b);
  font-size: .9rem;
  font-weight: 600;
  border-radius: var(--r-full);
  border: none;
  cursor: pointer;
  transition: all var(--t-base);
  white-space: nowrap;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

/* Ripple effect */
.msy-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.08);
  opacity: 0;
  transition: opacity var(--t-fast);
}
.msy-btn:hover::after  { opacity: 1; }
.msy-btn:active::after { opacity: .3; }

/* Tailles */
.msy-btn-sm  { padding: var(--s-2) var(--s-4); font-size: .8rem; }
.msy-btn-md  { padding: var(--s-3) var(--s-6); }
.msy-btn-lg  { padding: var(--s-4) var(--s-8); font-size: 1rem; }
.msy-btn-xl  { padding: var(--s-5) var(--s-10); font-size: 1.05rem; }
.msy-btn-full{ width: 100%; }

/* Variantes */
.msy-btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dk));
  color: #000;
  box-shadow: 0 4px 20px rgba(201,168,76,.35);
}
.msy-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(201,168,76,.50);
}
.msy-btn-primary:active { transform: translateY(0); }

.msy-btn-teal {
  background: linear-gradient(135deg, var(--teal), #00A88F);
  color: #000;
  box-shadow: 0 4px 20px rgba(0,212,180,.25);
}
.msy-btn-teal:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(0,212,180,.40);
}

.msy-btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1.5px solid var(--border);
}
.msy-btn-outline:hover {
  border-color: var(--gold);
  background: var(--gold-10);
}

.msy-btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.msy-btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.msy-btn-danger {
  background: linear-gradient(135deg, var(--red), #C0392B);
  color: #fff;
}

/* ── 5. BADGES & SCORES ────────────────────────────────────── */

.msy-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-family: var(--ff-b);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
}

.msy-badge-gold   { background: var(--gold-20); color: var(--gold-lt); border: 1px solid var(--gold-20); }
.msy-badge-teal   { background: var(--teal-10); color: var(--teal);    border: 1px solid rgba(0,212,180,.25); }
.msy-badge-red    { background: rgba(232,85,62,.15); color: var(--red); border: 1px solid rgba(232,85,62,.25); }
.msy-badge-green  { background: rgba(46,204,113,.12); color: var(--green); border: 1px solid rgba(46,204,113,.20); }
.msy-badge-muted  { background: var(--bg-3); color: var(--text-dim);   border: 1px solid var(--border-2); }

/* Score IA — le badge différencié */
.msy-score {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px 4px 8px;
  border-radius: var(--r-full);
  font-family: var(--ff-b);
  font-size: .8rem;
  font-weight: 700;
  border: 1.5px solid;
}

.msy-score[data-level="vip"],
.msy-score[data-level="9"],
.msy-score[data-level="10"] {
  background: rgba(201,168,76,.15);
  color: var(--gold-lt);
  border-color: rgba(201,168,76,.40);
}
.msy-score[data-level="high"],
.msy-score[data-level="7"],
.msy-score[data-level="8"] {
  background: rgba(0,212,180,.12);
  color: var(--teal);
  border-color: rgba(0,212,180,.30);
}
.msy-score[data-level="mid"],
.msy-score[data-level="5"],
.msy-score[data-level="6"] {
  background: rgba(255,255,255,.06);
  color: var(--text-muted);
  border-color: var(--border-2);
}
.msy-score[data-level="low"],
.msy-score[data-level="1"],
.msy-score[data-level="2"],
.msy-score[data-level="3"],
.msy-score[data-level="4"] {
  background: rgba(232,85,62,.10);
  color: var(--red);
  border-color: rgba(232,85,62,.25);
}

.msy-score::before { content: '🤖'; font-size: .7rem; }

/* ── 6. CARTES ─────────────────────────────────────────────── */

/* Carte de base */
.msy-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: all var(--t-base);
  position: relative;
}

.msy-card:hover {
  border-color: rgba(201,168,76,.30);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

/* Image de carte */
.msy-card-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--bg-3);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Placeholder quand pas d'image */
.msy-card-image-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--bg-3), var(--bg-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  position: relative;
}

.msy-card-image-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.60) 100%);
}

/* Badge score sur l'image */
.msy-card-score {
  position: absolute;
  top: var(--s-3);
  right: var(--s-3);
  z-index: 2;
}

/* Corps carte */
.msy-card-body { padding: var(--s-4) var(--s-5); }
.msy-card-footer {
  padding: var(--s-3) var(--s-5);
  border-top: 1px solid var(--border-2);
}

/* Méta-infos */
.msy-card-category {
  font-family: var(--ff-b);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--s-2);
}

.msy-card-title {
  font-family: var(--ff-b);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: var(--s-2);
  /* Clamp à 2 lignes */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.msy-card-desc {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--s-3);
}

.msy-card-location {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .78rem;
  color: var(--text-dim);
  margin-bottom: var(--s-3);
}

/* Carte Marketplace */
.msy-card-mp .msy-card-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--s-2);
}

.msy-card-price {
  font-family: var(--ff-h);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold);
}

.msy-card-price sup {
  font-size: .65em;
  font-weight: 600;
  margin-left: 4px;
  color: var(--gold-dk);
}

.msy-card-urgency {
  font-size: .75rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Carte Store / Module */
.msy-card-module {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  transition: all var(--t-base);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.msy-card-module:hover {
  border-color: var(--gold-20);
  box-shadow: 0 8px 32px rgba(0,0,0,.50);
  transform: translateY(-2px);
}

.msy-card-module-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  background: var(--gold-10);
  border: 1px solid var(--gold-20);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.msy-card-module-title {
  font-family: var(--ff-b);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.msy-card-module-desc {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

.msy-card-module-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding-top: var(--s-3);
  border-top: 1px solid var(--border-2);
}

/* ── 7. GRILLES ────────────────────────────────────────────── */

.msy-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-4); }
.msy-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); }
.msy-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-4); }

/* Responsive auto */
.msy-grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--s-4);
}

.msy-grid-auto-sm {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--s-3);
}

@media (max-width: 768px) {
  .msy-grid-3, .msy-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .msy-grid-2, .msy-grid-3, .msy-grid-4 { grid-template-columns: 1fr; }
}

/* ── 8. LAYOUT ─────────────────────────────────────────────── */

.msy-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--s-5);
}

.msy-section { padding: var(--s-16) 0; }
.msy-section-sm { padding: var(--s-10) 0; }

.msy-flex { display: flex; }
.msy-flex-center { display: flex; align-items: center; justify-content: center; }
.msy-flex-between { display: flex; align-items: center; justify-content: space-between; }
.msy-flex-col { display: flex; flex-direction: column; }
.msy-gap-2 { gap: var(--s-2); }
.msy-gap-3 { gap: var(--s-3); }
.msy-gap-4 { gap: var(--s-4); }
.msy-gap-6 { gap: var(--s-6); }

/* ── 9. FORMULAIRES ────────────────────────────────────────── */

.msy-input {
  width: 100%;
  background: var(--bg-3);
  border: 1.5px solid var(--border-2);
  border-radius: var(--r-full);
  padding: var(--s-3) var(--s-5);
  font-family: var(--ff-b);
  font-size: .9rem;
  color: var(--text);
  outline: none;
  transition: border-color var(--t-fast);
}

.msy-input::placeholder { color: var(--text-dim); }

.msy-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-10);
}

/* Barre de recherche spéciale */
.msy-search-bar {
  display: flex;
  align-items: center;
  background: var(--bg-3);
  border: 1.5px solid var(--border);
  border-radius: var(--r-full);
  padding: var(--s-2) var(--s-3) var(--s-2) var(--s-5);
  gap: var(--s-3);
  transition: all var(--t-base);
}

.msy-search-bar:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-10);
}

.msy-search-bar input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: var(--ff-b);
  font-size: .95rem;
  color: var(--text);
}

.msy-search-bar input::placeholder { color: var(--text-dim); }

/* ── 10. STATISTIQUES ──────────────────────────────────────── */

.msy-stats-row {
  display: flex;
  align-items: center;
  gap: var(--s-8);
  flex-wrap: wrap;
}

.msy-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.msy-stat-value {
  font-family: var(--ff-h);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
  letter-spacing: -.02em;
}

.msy-stat-label {
  font-family: var(--ff-b);
  font-size: .75rem;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* Séparateur entre stats */
.msy-stats-row .msy-stat:not(:last-child) {
  padding-right: var(--s-8);
  border-right: 1px solid var(--border-2);
}

/* ── 11. SIDEBAR ───────────────────────────────────────────── */

.msy-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  min-width: 200px;
}

.msy-sidebar-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-md);
  font-family: var(--ff-b);
  font-size: .88rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--t-fast);
  border: 1px solid transparent;
}

.msy-sidebar-item:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.msy-sidebar-item.active {
  background: var(--gold-10);
  color: var(--gold);
  border-color: var(--gold-20);
  font-weight: 600;
}

.msy-sidebar-count {
  font-size: .75rem;
  font-weight: 600;
  background: var(--bg-3);
  padding: 1px 7px;
  border-radius: var(--r-full);
  color: var(--text-dim);
}

.msy-sidebar-item.active .msy-sidebar-count {
  background: var(--gold-20);
  color: var(--gold);
}

/* ── 12. TAGS ──────────────────────────────────────────────── */

.msy-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}

.msy-tag {
  padding: 3px 10px;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--r-full);
  font-size: .75rem;
  font-weight: 500;
  color: var(--text-dim);
  cursor: pointer;
  transition: all var(--t-fast);
}

.msy-tag:hover {
  border-color: var(--gold-20);
  color: var(--text-muted);
}

.msy-tag.active {
  background: var(--gold-10);
  border-color: var(--gold-20);
  color: var(--gold);
}

/* ── 13. SECTION HEADERS ───────────────────────────────────── */

.msy-section-header {
  margin-bottom: var(--s-8);
}

.msy-section-eyebrow {
  font-family: var(--ff-b);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--s-3);
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.msy-section-eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gold);
  border-radius: 1px;
}

/* ── 14. LIVE INDICATOR ────────────────────────────────────── */

.msy-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--green);
}

.msy-live::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: msy-pulse 2s ease infinite;
}

@keyframes msy-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .6; transform: scale(.8); }
}

/* ── 15. EMPTY STATE ───────────────────────────────────────── */

.msy-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--s-20) var(--s-8);
  text-align: center;
  gap: var(--s-4);
}

.msy-empty-icon {
  font-size: 3rem;
  opacity: .4;
}

.msy-empty-title {
  font-family: var(--ff-b);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
}

.msy-empty-desc {
  font-size: .88rem;
  color: var(--text-dim);
  max-width: 320px;
  line-height: 1.6;
}

/* ── 16. LOADING SKELETON ──────────────────────────────────── */

.msy-skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-3) 25%,
    var(--bg-hover) 50%,
    var(--bg-3) 75%
  );
  background-size: 200% 100%;
  animation: msy-shimmer 1.5s ease infinite;
  border-radius: var(--r-sm);
}

@keyframes msy-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.msy-skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.msy-skeleton-img  { height: 160px; }
.msy-skeleton-text { height: 14px; margin: var(--s-2) 0; }
.msy-skeleton-text.w-80 { width: 80%; }
.msy-skeleton-text.w-60 { width: 60%; }
.msy-skeleton-text.w-40 { width: 40%; }

/* ── 17. TOAST / NOTIFICATION ──────────────────────────────── */

.msy-toast-container {
  position: fixed;
  bottom: var(--s-5);
  right: var(--s-5);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  pointer-events: none;
}

.msy-toast {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-5);
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-family: var(--ff-b);
  font-size: .88rem;
  color: var(--text);
  box-shadow: var(--shadow-card);
  pointer-events: all;
  animation: msy-toast-in var(--t-base) ease;
}

@keyframes msy-toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.msy-toast-success { border-color: rgba(46,204,113,.30); }
.msy-toast-error   { border-color: rgba(232,85,62,.30); }
.msy-toast-gold    { border-color: var(--gold-20); }

/* ── 18. DIVIDER ───────────────────────────────────────────── */

.msy-divider {
  height: 1px;
  background: var(--border-2);
  margin: var(--s-6) 0;
}

/* ── 19. HERO SECTION ──────────────────────────────────────── */

.msy-hero {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--s-20) var(--s-5);
  position: relative;
  overflow: hidden;
}

/* Fond dégradé radial subtil */
.msy-hero::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(201,168,76,.08) 0%, transparent 65%);
  pointer-events: none;
}

.msy-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 5px 14px;
  background: var(--gold-10);
  border: 1px solid var(--gold-20);
  border-radius: var(--r-full);
  font-family: var(--ff-b);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--gold);
  margin-bottom: var(--s-6);
}

.msy-hero-title {
  font-family: var(--ff-h);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.04em;
  color: var(--text);
  max-width: 900px;
  margin-bottom: var(--s-5);
}

.msy-hero-title .msy-accent {
  color: var(--gold);
  position: relative;
}

.msy-hero-sub {
  font-family: var(--ff-b);
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.65;
  margin-bottom: var(--s-8);
}

.msy-hero-ctas {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  flex-wrap: wrap;
  justify-content: center;
}

/* ── 20. MICRO-ANIMATIONS ──────────────────────────────────── */

/* Entrée progressive */
.msy-fade-up {
  opacity: 0;
  transform: translateY(16px);
  animation: msy-fade-up var(--t-slow) ease forwards;
}

@keyframes msy-fade-up {
  to { opacity: 1; transform: translateY(0); }
}

/* Délais en cascade */
.msy-fade-up:nth-child(1) { animation-delay:  0ms; }
.msy-fade-up:nth-child(2) { animation-delay: 80ms; }
.msy-fade-up:nth-child(3) { animation-delay:160ms; }
.msy-fade-up:nth-child(4) { animation-delay:240ms; }
.msy-fade-up:nth-child(5) { animation-delay:320ms; }
.msy-fade-up:nth-child(6) { animation-delay:400ms; }

/* Hover lift */
.msy-lift { transition: transform var(--t-base); }
.msy-lift:hover { transform: translateY(-3px); }

/* ── 21. UTILITAIRES ───────────────────────────────────────── */

.msy-text-gold  { color: var(--gold); }
.msy-text-teal  { color: var(--teal); }
.msy-text-muted { color: var(--text-muted); }
.msy-text-dim   { color: var(--text-dim); }
.msy-text-center{ text-align: center; }

.msy-mt-2  { margin-top: var(--s-2); }
.msy-mt-4  { margin-top: var(--s-4); }
.msy-mt-6  { margin-top: var(--s-6); }
.msy-mt-8  { margin-top: var(--s-8); }
.msy-mb-4  { margin-bottom: var(--s-4); }
.msy-mb-6  { margin-bottom: var(--s-6); }

.msy-w-full { width: 100%; }
.msy-hidden  { display: none; }

/* Séparateur vertical */
.msy-vdivider {
  width: 1px;
  height: 20px;
  background: var(--border-2);
}


/* ── 21. JETONS DU WORKSPACE ET DES PAGES PRÊTES AU THÈME ─────────
   Une page qui suit le thème lit ces jetons et porte data-theme-pret sur sa racine.
   Les accents « ink » servent au TEXTE ; gold et teal restent pour les aplats. */
:root {
  --msy-bg:      #04070E;
  --msy-bg-2:    #080D1A;
  --msy-bg-3:    #0C1220;
  --msy-text:    #E8EDF5;
  --msy-muted:   rgba(232,237,245,.68);
  --msy-line:    rgba(255,255,255,.08);
  --msy-line-or: rgba(201,168,76,.18);
  --msy-ink-gold: #E8C96A;
  --msy-ink-teal: #00D4B4;
  /* encres d'état (09/11/2026) : textes verts, rouges, violets, bleus ; les aplats gardent leurs couleurs */
  --msy-ink-green: #2ECC71;
  --msy-ink-red: #E8553E;
  --msy-ink-purple: #A78BFA;
  --msy-ink-blue: #3B9BF5;
  --msy-on-accent: #04070E;
  --fs-min:      .8125rem;   /* 13 px : plus petit texte autorisé */
  --fs-body:     .9375rem;   /* 15 px */
}

/* ── 22. THÈME CLAIR — au choix du visiteur ──────────────────────
   Sombre par défaut. Le clair ne s'applique que si le visiteur l'a choisi
   (html[data-theme-choisi], posé par la coquille) ET si la page affichée est prête
   (#msy-app-content [data-theme-pret]) : jamais une page à moitié claire.
   Contrastes vérifiés : texte 16:1, secondaire ≥ 5:1, accents ink ≥ 4.5:1. */
:root[data-theme="light"][data-theme-choisi]:has(#msy-app-content [data-theme-pret], #msy-landing [data-theme-pret]) {
  color-scheme: light;
  --msy-bg:      #F5F6F8;
  --msy-bg-2:    #FFFFFF;
  --msy-bg-3:    #EBEEF3;
  --msy-text:    #111827;
  --msy-muted:   rgba(17,24,39,.68);
  --msy-line:    rgba(17,24,39,.12);
  --msy-line-or: rgba(122,92,18,.30);
  --msy-ink-gold: #7A5C12;
  --msy-ink-teal: #00796B;
  --msy-ink-green: #1B7A43;
  --msy-ink-red: #B42318;
  --msy-ink-purple: #6D28D9;
  --msy-ink-blue: #1D5FB4;
  --msy-on-accent: #111827;
  /* coquille (index.html) */
  --bg: #F5F6F8; --bg2: #FFFFFF; --bg3: #EBEEF3;
  --txt: #111827; --txt2: rgba(17,24,39,.85); --txt3: rgba(17,24,39,.72); --muted: rgba(17,24,39,.64);
  --bdr: rgba(122,92,18,.28); --bdr2: rgba(17,24,39,.12);
  --gold: #9A7A2E; --gold-lt: #7A5C12; --teal: #00796B;
  --shadow: 0 12px 32px rgba(17,24,39,.12);
  /* pages en .msy-* */
  --bg-2: #FFFFFF; --bg-3: #EBEEF3; --bg-card: #FFFFFF; --bg-hover: #E4E8EF;
  --text: #111827; --text-muted: rgba(17,24,39,.68); --text-dim: rgba(17,24,39,.46);
  --border: rgba(122,92,18,.28); --border-2: rgba(17,24,39,.12); --border-card: rgba(122,92,18,.22);
  --shadow-card: 0 4px 18px rgba(17,24,39,.10);
}

/* ── 23. LISIBILITÉ DE LA COQUILLE ───────────────────────────────
   Plaintes en ligne : textes trop petits (9,6 à 12 px) et trop pâles. Chargé après les
   styles d'index.html : mêmes sélecteurs, valeurs relevées, 13 px au moins. */
body { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.nav-link { font-size: .875rem; }
.nav-cta { font-size: .8125rem; }
.nav-ia-dot, .mob-ia { font-size: var(--fs-min); }
.mob-greet, .mob-sub, .mob-ft-txt, .mob-viewmode-btn { font-size: var(--fs-min); }
.mob-sec-t, .disc-cat-lbl { font-size: .75rem; letter-spacing: .06em; }
.disc-sub, .disc-card-name { font-size: var(--fs-min); }
.ft-lnk, .ft-col-t, .ft-desc, .ft-legal-link, .ft-legal-title, .ft-philo, .ft-bottom { font-size: var(--fs-min); }
.ft-stat-l, .ld-sub { font-size: .75rem; }

/* Bouton de thème de la coquille */
.msy-theme-btn { font-size: 1rem; }
.msy-theme-btn { display: none; }
:root:has(#msy-app-content [data-theme-pret], #msy-landing [data-theme-pret]) .msy-theme-btn { display: flex; }
:root[data-theme="light"][data-theme-choisi]:has(#msy-app-content [data-theme-pret], #msy-landing [data-theme-pret]) .msy-nav {
  background: rgba(255,255,255,.92);
  border-bottom-color: rgba(17,24,39,.10);
}

/* ── 24. « MON ESPACE SUR CETTE PAGE » ───────────────────────────
   Les rubriques personnelles (suivi CRM, documents privés des offres, pièces
   des dossiers) ne s'affichent qu'aux membres connectés, regroupées dans un
   seul panneau repliable en bas de la page, aux couleurs du thème. */
.msy-espace {
  box-sizing: border-box; width: calc(100% - 32px); max-width: 1000px;
  margin: 28px auto; border: 1px solid var(--msy-line-or); border-radius: 14px;
  background: var(--msy-bg-2); color: var(--msy-text); font-size: var(--fs-body);
}
.msy-espace > summary {
  cursor: pointer; list-style: none; padding: 14px 18px; font-weight: 700;
  color: var(--msy-ink-gold); display: flex; align-items: center; gap: 10px;
}
.msy-espace > summary::-webkit-details-marker { display: none; }
.msy-espace > summary::after { content: "▾"; margin-left: auto; transition: transform .2s; }
.msy-espace[open] > summary::after { transform: rotate(180deg); }
.msy-espace > summary:focus-visible { outline: 2px solid var(--msy-ink-gold); outline-offset: -2px; border-radius: 14px; }
.msy-espace-bloc { padding: 16px 18px 20px; border-top: 1px solid var(--msy-line); display: grid; gap: 10px; min-width: 0; }
.msy-espace-bloc h2 { font-size: 1.05rem; margin: 0; color: var(--msy-text); }
.msy-espace-bloc h3 { font-size: .95rem; margin: 6px 0 0; color: var(--msy-text); }
.msy-espace-bloc p { margin: 0; color: var(--msy-muted); line-height: 1.5; }
.msy-espace-bloc a { color: var(--msy-ink-teal); }
.msy-espace-bloc label { display: grid; gap: 6px; font-size: var(--fs-min); color: var(--msy-muted); }
.msy-espace-bloc input:not([type=checkbox]):not([type=radio]),
.msy-espace-bloc select, .msy-espace-bloc textarea {
  box-sizing: border-box; width: 100%; max-width: 100%; padding: 10px 12px; font: inherit;
  color: var(--msy-text); background: var(--msy-bg-3); border: 1px solid var(--msy-line); border-radius: 10px;
}
.msy-espace-bloc input[type=file]::file-selector-button,
.msy-espace-bloc button {
  font: inherit; font-weight: 600; cursor: pointer; padding: 9px 14px; margin: 2px 6px 2px 0;
  color: var(--msy-ink-gold); background: transparent; border: 1px solid var(--msy-line-or); border-radius: 999px;
}
.msy-espace-bloc button[type=submit] { background: #C9A84C; color: var(--msy-on-accent); border-color: #C9A84C; }
.msy-espace-bloc button:disabled { opacity: .45; cursor: not-allowed; }
.msy-espace-bloc [role=status]:empty { display: none; }

/* ── 25. DICTÉE ET IMAGE POUR MSY TIA ─────────────────────────────
   Même forme que le micro de l'accueil : icônes rondes sous le champ,
   affichées seulement aux comptes qui ont accès aux médias. */
.msy-tia-media { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 2px; font-size: var(--fs-min); color: var(--msy-muted); }
.msy-tia-ico {
  width: 38px; height: 38px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1px solid var(--msy-line-or); background: transparent; color: var(--msy-ink-teal); cursor: pointer;
}
.msy-tia-ico:hover:not(:disabled) { background: var(--msy-bg-3); }
.msy-tia-ico:focus-visible, .msy-tia-txt:focus-visible { outline: 2px solid var(--msy-ink-teal); outline-offset: 2px; }
.msy-tia-ico:disabled { opacity: .4; cursor: not-allowed; }
.msy-tia-ico.rec { color: #E8553E; border-color: #E8553E; animation: msy-tia-rec 1.2s ease-in-out infinite; }
/* 17/11/2026 : « Réponse vocale » allumée (bouton bascule de la barre d'outils de MSY TIA) */
.msy-tia-ico.on { background: var(--msy-ink-teal); color: var(--msy-bg, #04070E); border-color: var(--msy-ink-teal); }
@keyframes msy-tia-rec { 50% { box-shadow: 0 0 0 6px rgba(232,85,62,.18); } }
@media (prefers-reduced-motion: reduce) { .msy-tia-ico.rec { animation: none; } }
.msy-tia-txt { font: inherit; font-weight: 600; padding: 8px 14px; border-radius: 999px; cursor: pointer; color: var(--msy-ink-gold); background: transparent; border: 1px solid var(--msy-line-or); }
.msy-tia-apercu { max-width: 120px; max-height: 90px; border-radius: 8px; }
.msy-tia-media [role=status] { flex-basis: 100%; }
.msy-tia-media [role=status]:empty { display: none; }
