/* =============================================================
   webedio : styles de l'application
   --navy = couleur de l'espace client actif (posée par l'interface)
   ============================================================= */
:root {
  --navy: #4f46e5; --navy-2: color-mix(in srgb, var(--navy) 80%, #fff); --navy-pale: color-mix(in srgb, var(--navy) 9%, #fff);
  --webedio: #15171f; --blue: #2fa3dc; --green: #6ab04c; --violet: #8e7bff; --orange: #e67e22; --red: #dc2626;
  --ink: #1b1d3f; --text: #3b4057; --muted: #7a8196; --line: #e7eaf2; --line-2: #f0f2f8; --bg: #f5f7fb; --card: #ffffff;
  --radius: 14px; --shadow: 0 1px 2px rgba(20, 22, 60, .05), 0 6px 24px rgba(20, 22, 60, .05);
  --menu: 248px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text);
  font-size: 14.5px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3 { color: var(--ink); margin: 0; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; font-weight: 800; }
h2 { font-size: 1.05rem; font-weight: 700; }
h3 { font-size: .95rem; font-weight: 700; margin-bottom: 10px; }
code { background: var(--line-2); padding: 1px 6px; border-radius: 6px; font-size: .85em; }
input, select, textarea { font: inherit; color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 12px;
  transition: border-color .15s, box-shadow .15s; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(47, 163, 220, .12); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--navy); cursor: pointer; }
input[type=color] { width: 34px; height: 30px; padding: 2px; cursor: pointer; }
input[type=range] { padding: 0; accent-color: var(--navy); border: 0; }
textarea { resize: vertical; }
.muted { color: var(--muted); }
.petit { font-size: .82rem; }
.droite { text-align: right; }
.nowrap { white-space: nowrap; }
.coupe { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
.texte-rouge { color: var(--red); }
.texte-vert { color: #3f8a2a; font-weight: 600; }
.lien { color: var(--blue); text-decoration: none; font-weight: 600; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-weight: 600; }
.lien:hover { text-decoration: underline; }
.lien-retour { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .85rem; margin-bottom: 6px; }
.lien-retour:hover { color: var(--navy); }

/* ---------- Structure ---------- */
.app { display: flex; min-height: 100vh; }
.menu { position: fixed; inset: 0 auto 0 0; width: var(--menu); background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 40; }
.menu-logo { display: flex; align-items: center; gap: 10px; padding: 20px 20px 14px; }
.menu-logo img { height: 34px; }
.menu-logo span { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #fff; background: var(--navy); padding: 3px 8px; border-radius: 6px; }
.menu nav { flex: 1; overflow-y: auto; padding: 6px 12px; }
.menu-groupe { margin-bottom: 14px; }
.menu-titre { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding: 8px 10px 6px; }
.menu-lien { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 10px; text-decoration: none; color: var(--text); font-weight: 600; margin-bottom: 2px; }
.menu-lien:hover { background: var(--line-2); color: var(--ink); }
.menu-lien.actif { background: var(--navy-pale); color: var(--navy); }
.menu-lien.actif .icone { color: var(--navy); }
.menu-lien .icone { color: var(--muted); flex: 0 0 auto; }
.menu-bas { border-top: 1px solid var(--line); padding: 12px; }

.contenu { margin-left: var(--menu); flex: 1; padding: 30px 36px 60px; max-width: 1320px; width: 100%; min-width: 0; }
.contenu-plein { max-width: none; padding: 20px 24px 30px; }
.icone-btn.bouton-menu { display: none; }
.voile-menu { display: none; }
@media (max-width: 960px) {
  .menu { transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.15); }
  .menu-ouvert .menu { transform: none; }
  .menu-ouvert .voile-menu { display: block; position: fixed; inset: 0; background: rgba(20,22,60,.3); z-index: 30; }
  .contenu { margin-left: 0; padding: 60px 16px 40px; }
  .contenu-plein { padding: 60px 12px 20px; }
  .icone-btn.bouton-menu { display: inline-flex; position: fixed; top: 12px; left: 12px; z-index: 20; background: #fff; box-shadow: var(--shadow); }
}

.page-tete { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-tete p { margin: 4px 0 0; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.chargement-initial { display: grid; place-items: center; height: 100vh; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px solid transparent; border-radius: 11px; padding: 9px 16px;
  font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, transform .08s; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-principal { background: var(--navy); color: #fff; }
.btn-principal:hover:not(:disabled) { background: var(--navy-2); }
.btn-secondaire { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-secondaire:hover:not(:disabled) { border-color: #cfd4e3; background: #fafbfe; }
.btn-fantome { background: transparent; color: var(--text); }
.btn-fantome:hover:not(:disabled) { background: var(--line-2); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #b91c1c; }
.btn-danger-fantome { background: transparent; color: var(--red); }
.btn-danger-fantome:hover:not(:disabled) { background: #fef2f2; }
.btn-petit { padding: 6px 11px; font-size: .82rem; border-radius: 9px; }
.icone-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 9px; border: 0; background: transparent;
  color: var(--muted); cursor: pointer; text-decoration: none; flex: 0 0 auto; }
.icone-btn:hover:not(:disabled) { background: var(--line-2); color: var(--ink); }
.icone-btn:disabled { opacity: .35; cursor: not-allowed; }

/* ---------- Badges, tags, avatars ---------- */
.badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: .75rem; font-weight: 700; white-space: nowrap; background: #eef0f5; color: #5b6275; }
.badge-vert { background: #eaf6e4; color: #3f8a2a; } .badge-bleu { background: #e6f3fb; color: #1f7fb2; } .badge-orange { background: #fdf0e3; color: #b85f10; }
.badge-rouge { background: #fdecec; color: #c02626; } .badge-violet { background: #efedff; color: #5b4bd6; }
.ligne-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.tags { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.tag-pill { --c: var(--blue); display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: .76rem; font-weight: 600;
  background: color-mix(in srgb, var(--c) 12%, white); color: color-mix(in srgb, var(--c) 75%, black); white-space: nowrap; }
.tag-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--blue)); flex: 0 0 auto; display: inline-block; }
.tag-x { border: 0; background: none; cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 0 0 2px; color: inherit; opacity: .6; }
.tag-x:hover { opacity: 1; }
.avatar { display: inline-grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 800; flex: 0 0 auto; letter-spacing: .02em; }
.avatar-petit { width: 26px; height: 26px; font-size: .75rem; background: var(--navy); }

/* ---------- Cartes, stats ---------- */
.carte { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.carte-tete { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; }
.carte-table { padding: 0; overflow-x: auto; }
.carte-etroite { max-width: 760px; }
.grille-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 18px; }
.grille-stats-6 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; gap: 13px; align-items: flex-start; box-shadow: var(--shadow); }
.stat-icone { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: 0 0 auto; }
.ton-bleu { background: #e6f3fb; color: #1f7fb2; } .ton-vert { background: #eaf6e4; color: #3f8a2a; } .ton-violet { background: #efedff; color: #5b4bd6; }
.ton-orange { background: #fdf0e3; color: #b85f10; } .ton-rouge { background: #fdecec; color: #c02626; } .ton-gris { background: #eef0f5; color: #5b6275; }
.stat-valeur { font-size: 1.55rem; font-weight: 800; color: var(--ink); line-height: 1.1; }
.stat-libelle { font-weight: 600; color: var(--text); font-size: .85rem; margin-top: 2px; }
.stat-detail { color: var(--muted); font-size: .78rem; margin-top: 2px; }
.grille-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grille-2 > .carte { margin-bottom: 18px; }
.grille-2-serre { gap: 20px; }
@media (max-width: 1100px) { .grille-2 { grid-template-columns: 1fr; } }
.grille-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.carte-liste { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.carte-liste h3 { margin: 8px 0 0; font-size: 1.05rem; }
.carte-liste-tete { display: flex; justify-content: space-between; align-items: center; }
.pastille { width: 40px; height: 40px; border-radius: 12px; background: var(--navy-pale); color: var(--navy); display: grid; place-items: center; }
.pastille-verte { background: #eaf6e4; color: #3f8a2a; }
.menu-actions { display: flex; }
.carte-liste-chiffres { display: flex; gap: 22px; margin: 10px 0 12px; }
.carte-liste-chiffres div { display: flex; flex-direction: column; }
.carte-liste-chiffres strong { font-size: 1.3rem; color: var(--ink); }
.carte-liste-chiffres span { font-size: .78rem; color: var(--muted); }
.carte-liste .btn { align-self: flex-start; margin-top: auto; }
.carte-auto { margin: 0; }
.carte-auto h3 { margin: 10px 0 2px; font-size: 1.05rem; }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 12px 16px;
  border-bottom: 1px solid var(--line); background: #fbfcfe; white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table th.droite, .table td.droite { text-align: right; }
.table-compacte td, .table-compacte th { padding: 9px 10px; }
.cliquable { cursor: pointer; }
tr.cliquable:hover td { background: #fafbff; }
.col-case { width: 44px; }
.cellule-contact { display: flex; align-items: center; gap: 11px; }
.kpi { font-weight: 800; color: var(--ink); }

/* ---------- Filtres, sélection, pagination ---------- */
.barre-filtres { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.barre-filtres select { width: auto; min-width: 150px; }
.recherche { position: relative; flex: 1 1 280px; }
.recherche .icone { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.recherche input { padding-left: 38px; }
.barre-selection { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; background: var(--navy); color: #fff; border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; }
.barre-selection .lien { color: #9fd6f2; }
.barre-selection-actions { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.barre-selection select { width: auto; padding: 6px 10px; }
.barre-selection .btn-fantome { color: #fff; }
.barre-selection .btn-fantome:hover { background: rgba(255,255,255,.12); }
.pagination { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line-2); color: var(--muted); font-size: .85rem; gap: 10px; }
.pagination > div { display: flex; gap: 6px; }

/* ---------- Onglets ---------- */
.onglets { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.onglet { display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; border: 0; background: none; font: inherit; font-weight: 600; color: var(--muted);
  cursor: pointer; border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.onglet:hover { color: var(--ink); }
.onglet.actif { color: var(--navy); border-bottom-color: var(--navy); }
.compte { background: var(--line-2); color: var(--muted); border-radius: 999px; padding: 0 7px; font-size: .74rem; font-weight: 700; }
.onglet.actif .compte { background: var(--navy-pale); color: var(--navy); }
.aide-onglet { margin: -8px 0 16px; }

/* ---------- Formulaires ---------- */
.champ { display: flex; flex-direction: column; gap: 6px; }
.champ-libelle { font-weight: 700; font-size: .83rem; color: var(--ink); display: block; margin-bottom: 6px; }
.champ .champ-libelle { margin-bottom: 0; }
.champ-aide { font-size: .78rem; color: var(--muted); }
.requis { color: var(--blue); margin-left: 3px; }
.form-grille { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grille .pleine { grid-column: 1 / -1; }
.form-serre { gap: 10px 12px; }
.form-pile { display: flex; flex-direction: column; gap: 14px; }
.form-actions { display: flex; justify-content: flex-end; }
@media (max-width: 640px) { .form-grille { grid-template-columns: 1fr; } }
.interrupteur { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; color: var(--ink); user-select: none; }
.interrupteur input { position: absolute; opacity: 0; width: 0; height: 0; }
.piste { position: relative; width: 38px; height: 22px; border-radius: 999px; background: #d4d8e4; transition: background .2s; flex: 0 0 auto; }
.piste::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.interrupteur input:checked + .piste { background: var(--green); }
.interrupteur input:checked + .piste::after { transform: translateX(16px); }
.interrupteur input:focus-visible + .piste { box-shadow: 0 0 0 4px rgba(47, 163, 220, .2); }
.cases { display: flex; flex-direction: column; gap: 6px; max-height: 280px; overflow-y: auto; }
.case { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; }
.case:hover { border-color: #cfd4e3; }
.case.cochee { border-color: var(--navy); background: #f6f7fd; }
.case-nom { flex: 1; font-weight: 600; color: var(--ink); }
.case-inline { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0; color: var(--text); cursor: pointer; }
.case-inline input { margin-top: 3px; }
.palette { display: flex; gap: 8px; flex-wrap: wrap; }
.pastille-couleur { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1.5px var(--line); cursor: pointer; }
.pastille-couleur.choisie { box-shadow: 0 0 0 2.5px var(--ink); }
.avertissement { display: flex; gap: 10px; align-items: flex-start; background: #fff8ec; border: 1px solid #f6dfb4; border-radius: 10px; padding: 12px; color: #7a5210; font-size: .84rem; margin: 8px 0 0; cursor: pointer; }
.avertissement input { margin-top: 3px; }

/* ---------- Surcouches ---------- */
.voile { position: fixed; inset: 0; background: rgba(20, 22, 60, .38); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 100; animation: fondu .15s; }
@keyframes fondu { from { opacity: 0; } }
.modal { background: #fff; border-radius: 18px; width: 100%; max-width: 520px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(20,22,60,.25); animation: monte .18s; }
.modal-large { max-width: 820px; }
@keyframes monte { from { transform: translateY(10px); opacity: 0; } }
.modal-tete { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line-2); gap: 10px; }
.modal-corps { padding: 20px 22px; overflow-y: auto; }
.modal-pied { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line-2); }
.confirm-texte { margin: 0; color: var(--text); }
.voile-tiroir { justify-content: flex-end; padding: 0; }
.tiroir { background: #fff; width: 100%; max-width: 620px; height: 100vh; overflow-y: auto; box-shadow: -20px 0 60px rgba(20,22,60,.2); animation: glisse .2s; display: flex; flex-direction: column; }
@keyframes glisse { from { transform: translateX(40px); opacity: 0; } }
.tiroir-tete { display: flex; gap: 14px; align-items: flex-start; padding: 22px 22px 14px; }
.tiroir-titre { flex: 1; min-width: 0; }
.tiroir-titre h2 { font-size: 1.3rem; }
.tiroir .onglets { padding: 0 22px; margin-bottom: 0; }
.tiroir-corps { padding: 20px 22px 30px; }
.mini-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 0 22px 16px; }
.mini-stats div { background: var(--line-2); border-radius: 10px; padding: 9px 10px; display: flex; flex-direction: column; }
.mini-stats strong { color: var(--ink); font-size: .98rem; }
.mini-stats span { font-size: .72rem; color: var(--muted); }
.section-fiche { border-top: 1px solid var(--line-2); padding-top: 16px; margin-top: 18px; }
.select-ajout { width: auto; padding: 4px 8px; font-size: .8rem; border-style: dashed; color: var(--muted); }
.zone-danger { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--line-2); margin-top: 22px; padding-top: 14px; flex-wrap: wrap; }
.chronologie { list-style: none; padding: 0; margin: 0; position: relative; }
.chronologie::before { content: ""; position: absolute; left: 14px; top: 6px; bottom: 6px; width: 2px; background: var(--line-2); }
.chronologie li { display: flex; gap: 12px; padding: 7px 0; position: relative; }
.chrono-icone { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--line); color: var(--muted); flex: 0 0 auto; z-index: 1; }
.evt-ouverture .chrono-icone { border-color: #cbbffa; color: #5b4bd6; } .evt-clic .chrono-icone { border-color: #b8e0a6; color: #3f8a2a; }
.evt-desinscription .chrono-icone, .evt-rebond .chrono-icone, .evt-spam .chrono-icone { border-color: #f5c2c2; color: var(--red); }
.evt-inscription_webinaire .chrono-icone { border-color: #aad8f0; color: #1f7fb2; } .evt-note .chrono-icone { border-color: #f6dfb4; color: #b85f10; }
.toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 200; max-width: 420px; }
.toast { display: flex; gap: 10px; align-items: flex-start; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.2); animation: monte .2s; font-weight: 500; }
.toast .icone { flex: 0 0 auto; margin-top: 1px; color: #8fd97a; }
.toast-erreur { background: #7f1d1d; }
.toast-erreur .icone { color: #fecaca; }

/* ---------- États ---------- */
.chargement { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 50px 20px; color: var(--muted); }
.spinner { width: 20px; height: 20px; border: 2.5px solid var(--line); border-top-color: var(--navy); border-radius: 50%; animation: tourne .7s linear infinite; display: inline-block; flex: 0 0 auto; }
@keyframes tourne { to { transform: rotate(360deg); } }
.vide { text-align: center; padding: 40px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.vide h3 { margin: 6px 0 0; font-size: 1.1rem; }
.vide p { color: var(--muted); max-width: 460px; margin: 0 0 8px; }
.vide-icone { width: 56px; height: 56px; border-radius: 16px; background: var(--navy-pale); color: var(--navy); display: grid; place-items: center; }
.bandeau { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; font-weight: 500; }
.bandeau-info { background: #e8f4fb; color: #155e85; }
.bandeau-sante { background: #f3f0ff; color: #4a3db3; }

/* ---------- Accueil ---------- */
.fil { list-style: none; padding: 0; margin: 0; }
.fil li { display: flex; gap: 11px; padding: 9px 6px; border-radius: 10px; align-items: flex-start; }
.fil li:hover { background: #fafbff; }
.fil-icone { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto; }
.liste-contacts { list-style: none; padding: 0; margin: 0; }
.liste-contacts li { display: flex; align-items: center; gap: 11px; padding: 9px 6px; border-radius: 10px; }
.liste-contacts li > div { flex: 1; min-width: 0; }
.liste-contacts li:hover { background: #fafbff; }
.raccourcis { display: grid; gap: 10px; }
.raccourci { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; }
.raccourci:hover { border-color: var(--blue); background: #f6fbfe; }
.raccourci .icone { color: var(--blue); }
.raccourci strong { color: var(--ink); font-size: 1.1rem; }

/* ---------- Import ---------- */
.etapes-import { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.etapes-import span { padding: 5px 12px; border-radius: 999px; background: var(--line-2); color: var(--muted); font-size: .8rem; font-weight: 700; }
.etapes-import .actif { background: var(--navy); color: #fff; }
.etapes-import .fait { background: #eaf6e4; color: #3f8a2a; }
.depot { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; border: 2px dashed #cfd4e3; border-radius: 14px; padding: 34px 20px; cursor: pointer; color: var(--muted); position: relative; }
.depot:hover { border-color: var(--blue); background: #f6fbfe; }
.depot strong { color: var(--ink); }
.depot input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.depot-petit { flex-direction: row; justify-content: center; padding: 12px; }
.import-progres .barre { height: 8px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.import-progres .barre div { height: 100%; background: var(--green); transition: width .3s; }
.resultat-import { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.resultat-import .mini-stats { padding: 0; width: 100%; }

/* ---------- Graphe ---------- */
.graphe { display: flex; align-items: flex-end; gap: 3px; height: 150px; padding-top: 10px; }
.graphe-col { flex: 1; height: 100%; display: flex; align-items: flex-end; min-width: 4px; }
.graphe-barre { width: 100%; background: linear-gradient(180deg, var(--violet), var(--navy)); border-radius: 4px 4px 0 0; }
.graphe-legende { display: flex; justify-content: space-between; margin-top: 6px; }
.apercu-iframe { width: 100%; height: 70vh; border: 0; border-radius: 12px; background: #eef5fb; }

/* ---------- Éditeur ---------- */
.editeur-barre { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.editeur-barre .lien-retour { margin: 0; }
.titre-editable { border: 1.5px solid transparent; background: transparent; font-size: 1.3rem; font-weight: 800; color: var(--ink); padding: 4px 8px; width: auto; min-width: 200px; flex: 1 1 260px; }
.titre-editable:hover { border-color: var(--line); }
.titre-page { font-size: 1.6rem; margin-left: -8px; }
.etat-sauvegarde { font-size: .8rem; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.etat-sauvegarde::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.etat-modifie::before, .etat-enregistrement::before { background: var(--orange); }
.etat-erreur { color: var(--red); } .etat-erreur::before { background: var(--red); }
.editeur-barre-actions { margin-left: auto; display: flex; gap: 8px; }
.editeur-contenu { display: grid; grid-template-columns: minmax(340px, 430px) 1fr; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .editeur-contenu { grid-template-columns: 1fr; } }
.panneau-blocs { display: flex; flex-direction: column; gap: 14px; }
.panneau-section { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.couleurs { display: flex; gap: 10px; flex-wrap: wrap; }
.couleur { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); cursor: pointer; }
.ajout-blocs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; }
.ajout-bloc { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border: 1.5px dashed #cfd4e3; border-radius: 10px; background: #fff;
  font: inherit; font-size: .78rem; font-weight: 600; color: var(--text); cursor: pointer; }
.ajout-bloc:hover { border-color: var(--navy); color: var(--navy); background: #f6f7fd; }
.blocs { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-direction: column; gap: 6px; }
.bloc { border: 1.5px solid var(--line); border-radius: 11px; background: #fff; }
.bloc.ouvert { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(45,46,131,.08); }
.bloc-tete { display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 10px; cursor: pointer; color: var(--text); }
.poignee { cursor: grab; color: #b3b9c9; letter-spacing: -2px; font-size: .8rem; user-select: none; }
.bloc-resume { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .86rem; color: var(--ink); }
.bloc-actions { display: flex; }
.bloc-actions .icone-btn { width: 28px; height: 28px; }
.bloc-corps { padding: 4px 12px 14px; border-top: 1px solid var(--line-2); }
.ligne-controles { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ligne-controles label { display: flex; align-items: center; gap: 8px; }
.bascule { display: inline-flex; background: var(--line-2); border-radius: 9px; padding: 3px; gap: 2px; }
.bascule button { border: 0; background: none; font: inherit; font-size: .78rem; font-weight: 600; color: var(--muted); padding: 5px 10px; border-radius: 7px; cursor: pointer; display: inline-flex; align-items: center; }
.bascule button.actif { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.miniature { max-width: 100%; max-height: 140px; border-radius: 8px; border: 1px solid var(--line); align-self: flex-start; }
.texte-riche { border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; }
.texte-riche:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(47, 163, 220, .12); }
.texte-riche-outils { display: flex; gap: 2px; padding: 5px; background: #fafbfe; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.texte-riche-outils button { border: 0; background: none; min-width: 30px; height: 28px; border-radius: 7px; cursor: pointer; font: inherit; font-size: .8rem; color: var(--text); display: inline-flex; align-items: center; justify-content: center; padding: 0 7px; }
.texte-riche-outils button:hover { background: var(--line-2); color: var(--ink); }
.texte-riche-zone { min-height: 110px; padding: 10px 12px; outline: none; color: var(--ink); line-height: 1.55; }
.texte-riche-zone a { color: var(--blue); }
.panneau-apercu { position: sticky; top: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.apercu-barre { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line-2); }
.apercu-cadre { background: #eef1f7; padding: 14px; display: flex; justify-content: center; }
.apercu-cadre .apercu-iframe { height: calc(100vh - 190px); min-height: 520px; background: #eef5fb; max-width: 680px; transition: max-width .2s; }
.apercu-cadre .apercu-iframe.mobile { max-width: 390px; }
.boite-apercu-objet { background: var(--line-2); border-radius: 12px; padding: 12px 14px; }
.apercu-objet { background: #fff; border-radius: 10px; padding: 10px 12px; margin-top: 6px; box-shadow: var(--shadow); }
.apercu-objet > div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editeur-destinataires { display: grid; grid-template-columns: 1fr 260px; gap: 18px; align-items: start; }
@media (max-width: 900px) { .editeur-destinataires { grid-template-columns: 1fr; } }
.choix-tous { padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.exclusions { margin-top: 12px; }
.option-non-abonnes { border-top: 1px solid var(--line-2); margin-top: 16px; padding-top: 14px; }
.compteur-audience { text-align: center; position: sticky; top: 16px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.compteur { font-size: 2.6rem; font-weight: 800; color: var(--navy); line-height: 1; }
.compteur-audience .btn { margin-top: 12px; width: 100%; }
.editeur-envoi { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 900px) { .editeur-envoi { grid-template-columns: 1fr; } }
.verifs { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 8px; }
.verifs li { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.verifs li.ok .icone { color: var(--green); }
.verifs li.ko { color: var(--red); }
.verifs .lien { margin-left: auto; }
.conseil { display: flex; gap: 12px; background: #f6f7fd; border-radius: 12px; padding: 14px; }
.conseil .icone { color: var(--navy); flex: 0 0 auto; margin-top: 2px; }
.conseil .btn { margin-top: 10px; }
.choix-envoi { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 18px; }
.choix { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; }
.choix.actif { border-color: var(--navy); background: #f6f7fd; }
.choix > .icone { color: var(--navy); margin-top: 2px; }
.choix input[type=radio] { margin-top: 3px; }
.choix input[type=datetime-local] { margin-top: 10px; }
.editeur-envoi .carte > .btn { width: 100%; padding: 13px; }

/* ---------- Automatisations ---------- */
.grille-auto { display: grid; grid-template-columns: 1fr 300px; gap: 22px; align-items: start; }
@media (max-width: 1000px) { .grille-auto { grid-template-columns: 1fr; } }
.flux { display: flex; flex-direction: column; align-items: center; }
.flux-etape { width: 100%; max-width: 560px; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 16px; display: flex; gap: 14px; align-items: flex-start; box-shadow: var(--shadow); }
.flux-declencheur { border-color: var(--navy); }
.flux-icone { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: 0 0 auto; background: var(--navy-pale); color: var(--navy); }
.flux-attente .flux-icone { background: #fdf0e3; color: #b85f10; }
.flux-email .flux-icone { background: #e6f3fb; color: #1f7fb2; }
.flux-contenu { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.flux-type { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; color: var(--muted); }
.attente-champs { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.attente-champs label { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.attente-champs input { width: 70px; }
.flux-ajout { display: flex; gap: 8px; padding: 12px 0; position: relative; }
.flux-ajout::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--line); z-index: 0; }
.flux-plus { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 5px; border: 1.5px dashed #cfd4e3; background: #fff; border-radius: 999px; padding: 5px 12px;
  font: inherit; font-size: .78rem; font-weight: 700; color: var(--muted); cursor: pointer; }
.flux-plus:hover { border-color: var(--navy); color: var(--navy); }
.flux-fin { font-size: .78rem; font-weight: 700; color: var(--muted); background: var(--line-2); border-radius: 999px; padding: 6px 14px; }
.colonne-infos .carte { margin-bottom: 16px; }
.aide-liste { padding-left: 18px; margin: 0; display: flex; flex-direction: column; gap: 8px; color: var(--text); }

/* ---------- Patients ---------- */
.infos-patient { display: flex; flex-direction: column; gap: 12px; }
.infos-patient div { display: flex; flex-direction: column; }
.infos-patient span { font-size: .78rem; }
.infos-patient strong { color: var(--ink); }
.calendrier-patient { list-style: none; padding: 0; margin: 0; max-height: 360px; overflow-y: auto; }
.calendrier-patient li { display: flex; gap: 14px; padding: 7px 10px; border-radius: 8px; font-size: .88rem; }
.calendrier-patient li:nth-child(odd) { background: #fafbfe; }
.calendrier-patient li.passe { color: var(--muted); }
.calendrier-patient li.controle { color: #1f7fb2; font-weight: 700; }
.calendrier-patient li.fin { color: #3f8a2a; font-weight: 800; }

/* ---------- Marque webedio ---------- */
.marque-webedio { font-weight: 800; letter-spacing: -.04em; color: var(--webedio); font-size: 1rem; display: inline-flex; align-items: baseline; }
.marque-point { width: .32em; height: .32em; border-radius: 50%; background: #4f46e5; margin-left: .1em; display: inline-block; }
.marque-grande { font-size: 1.9rem; }

/* ---------- Menu : espace client et utilisateur ---------- */
.menu-haut { padding: 16px 12px 10px; }
.selecteur-espace { position: relative; }
.espace-actuel { width: 100%; display: flex; align-items: center; gap: 10px; background: none; border: 1.5px solid transparent; border-radius: 12px;
  padding: 8px 10px; cursor: pointer; font: inherit; text-align: left; transition: background .15s, border-color .15s; min-height: 50px; }
.espace-actuel:hover:not(.seul) { background: var(--line-2); border-color: var(--line); }
.espace-actuel.seul { cursor: default; }
.espace-logo { max-width: 160px; display: block; }
.espace-nom { font-weight: 800; color: var(--ink); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.espace-chevron { margin-left: auto; color: var(--muted); flex: 0 0 auto; }
.espace-initiale { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; color: #fff; font-weight: 800; font-size: .85rem; flex: 0 0 auto; }
.menu-deroulant { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 12px 40px rgba(20, 22, 60, .14); padding: 6px; z-index: 60; }
.menu-deroulant-haut { top: auto; bottom: calc(100% + 6px); }
.menu-deroulant-titre { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding: 8px 10px 6px; }
.espace-choix { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 10px; text-decoration: none; color: var(--ink);
  font: inherit; font-weight: 600; background: none; border: 0; cursor: pointer; text-align: left; }
.espace-choix:hover { background: var(--line-2); }
.espace-choix.actif { color: var(--navy); }
.espace-choix .icone:last-child:not(:first-child) { margin-left: auto; }
.menu-utilisateur-bloc { position: relative; margin-top: 8px; }
.menu-utilisateur { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border-radius: 12px; background: none; border: 0; cursor: pointer;
  font: inherit; text-align: left; color: var(--muted); }
.menu-utilisateur:hover { background: var(--line-2); }
.menu-utilisateur-texte { display: flex; flex-direction: column; min-width: 0; flex: 1; font-size: .78rem; line-height: 1.3; }
.menu-utilisateur-texte strong { color: var(--ink); font-size: .85rem; }
.menu-utilisateur-texte .coupe { max-width: 100%; }
.menu-signature { padding: 10px 10px 2px; opacity: .55; }
.menu-signature .marque-webedio { font-size: .85rem; }

/* ---------- Écrans de connexion ---------- */
body.corps-auth { background: radial-gradient(1200px 600px at 50% -10%, #ecebff 0%, rgba(236,235,255,0) 60%), #f6f6f9; }
.ecran-auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; }
.auth-carte { width: 100%; max-width: 410px; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 36px 32px 30px;
  box-shadow: 0 1px 2px rgba(20,22,60,.04), 0 20px 60px rgba(20,22,60,.08); }
.auth-marque { margin-bottom: 26px; }
.auth-carte h1 { font-size: 1.45rem; margin-bottom: 6px; }
.auth-sous-titre { margin: 0 0 22px; }
.auth-carte .form-pile { gap: 14px; }
.auth-carte .btn-principal { background: var(--webedio); }
.auth-carte .btn-principal:hover:not(:disabled) { background: #2a2d3a; }
.auth-carte input:focus { border-color: #4f46e5; box-shadow: 0 0 0 4px rgba(79, 70, 229, .12); }
.btn-large { width: 100%; padding: 12px 18px; font-size: .95rem; border-radius: 12px; }
.auth-lien { color: var(--muted); font-size: .85rem; justify-self: center; align-self: center; }
.auth-erreur { margin: 0; padding: 10px 12px; border-radius: 10px; background: #fdecec; color: #b42318; font-size: .87rem; font-weight: 600; }
.auth-info { margin: 0 0 16px; padding: 12px 14px; border-radius: 12px; background: var(--line-2); color: var(--text); }
.auth-pied { margin-top: 18px; }
.champ-mdp { position: relative; }
.champ-mdp input { padding-right: 44px; }
.champ-mdp .icone-btn { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); }
.regles-mdp { list-style: none; margin: -2px 0 0; padding: 0; display: grid; gap: 4px; font-size: .82rem; color: var(--muted); }
.regles-mdp li { display: flex; align-items: center; gap: 7px; }
.regles-mdp li.ok { color: #3f8a2a; }

/* ---------- Équipe ---------- */
.choix-roles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choix-role { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; }
.choix-role.actif { border-color: var(--navy); background: var(--navy-pale); }
.choix-role.desactive { opacity: .6; cursor: not-allowed; }
.choix-role input { margin-top: 3px; }
.lien-copie { display: flex; gap: 8px; }
.lien-copie input { font-size: .82rem; color: var(--muted); }
.puce-espace { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; font-weight: 700; color: var(--ink); }
.puce-espace:hover { border-color: var(--navy); }
@media (max-width: 640px) { .choix-roles { grid-template-columns: 1fr; } .auth-carte { padding: 28px 22px 24px; } }
