/* AutoPosting X — thème sombre premium (OLED, accent bleu X). */

:root {
  --bg: #05070c;
  --surface: #0b0f16;
  --surface-2: #10151e;
  --surface-3: #161c27;
  --bord: #1c2431;
  --bord-doux: #141a24;
  --texte: #e9edf3;
  --texte-2: #96a0b0;
  --texte-3: #5c6675;
  --accent: #1d9bf0;
  --accent-fort: #3aabf5;
  --accent-doux: rgba(29, 155, 240, 0.12);
  --ok: #22c55e;
  --ok-doux: rgba(34, 197, 94, 0.12);
  --violet: #a78bfa;
  --violet-doux: rgba(167, 139, 250, 0.12);
  --cyan: #22d3ee;
  --cyan-doux: rgba(34, 211, 238, 0.12);
  --danger: #f0506e;
  --danger-doux: rgba(240, 80, 110, 0.12);
  --rayon: 14px;
  --rayon-s: 9px;
  --sidebar: 264px;
  --police: "DM Sans", -apple-system, "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { color-scheme: dark; }

body {
  font-family: var(--police);
  background: var(--bg);
  color: var(--texte);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100dvh;
}

::selection { background: rgba(29, 155, 240, 0.35); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #232c3a; border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; flex: none; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

a { color: inherit; text-decoration: none; }

/* ------------------------------------------------------------------ */
/* Sidebar                                                             */
/* ------------------------------------------------------------------ */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #090d14 0%, #06080d 100%);
  border-right: 1px solid var(--bord-doux);
  padding: 20px 14px;
  z-index: 40;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px 22px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, #1d9bf0 0%, #0b6cc4 100%);
  color: #fff;
  box-shadow: 0 4px 18px rgba(29, 155, 240, 0.35);
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-mark svg path { fill: currentColor; stroke: none; }

.brand-name { font-weight: 700; font-size: 16.5px; letter-spacing: -0.01em; }
.brand-name em { font-style: normal; color: var(--accent); }

.nav { flex: 1; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }

.nav-section {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--texte-3);
  padding: 16px 12px 7px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: var(--rayon-s);
  color: var(--texte-2);
  font-weight: 500;
  font-size: 14px;
  transition: background 160ms ease, color 160ms ease;
  width: 100%;
  text-align: left;
}
.nav-item:hover { background: var(--surface-2); color: var(--texte); }
.nav-item.actif { background: var(--accent-doux); color: var(--accent-fort); }
.nav-item.inactif { color: var(--texte-3); cursor: default; }
.nav-item.inactif:hover { background: none; color: var(--texte-3); }
.nav-item svg { width: 17px; height: 17px; opacity: 0.9; }

.nav-compte {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--texte-3);
  background: var(--surface-3);
  border-radius: 20px;
  padding: 1px 8px;
}
.nav-item.actif .nav-compte { background: rgba(29, 155, 240, 0.18); color: var(--accent-fort); }

.pastille {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--surface-3);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--texte-2);
}

.nav-ajout { color: var(--accent); }
.nav-ajout:hover { background: var(--accent-doux); color: var(--accent-fort); }

.badge-soon {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--texte-3);
  border: 1px solid var(--bord);
  border-radius: 6px;
  padding: 1px 6px;
}

.sidebar-pied {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 12px 4px;
  border-top: 1px solid var(--bord-doux);
  color: var(--texte-3);
  font-size: 12px;
}

.statut-point {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.7);
}

/* ------------------------------------------------------------------ */
/* Structure principale                                                */
/* ------------------------------------------------------------------ */
.principal { margin-left: var(--sidebar); min-height: 100dvh; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 36px 18px;
  background: linear-gradient(180deg, rgba(5, 7, 12, 0.96) 75%, rgba(5, 7, 12, 0));
  backdrop-filter: blur(8px);
}

.topbar h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.sous-titre { color: var(--texte-2); font-size: 13.5px; margin-top: 2px; }

.fil { display: flex; gap: 8px; font-size: 12.5px; color: var(--texte-3); margin-bottom: 4px; }
.fil a:hover { color: var(--accent); }
.fil strong { color: var(--texte-2); font-weight: 500; }

.topbar-actions { display: flex; gap: 10px; align-items: center; }

.contenu { padding: 10px 36px 60px; max-width: 1180px; }

/* ------------------------------------------------------------------ */
/* Boutons                                                             */
/* ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13.5px;
  transition: background 160ms ease, border-color 160ms ease, transform 100ms ease, box-shadow 160ms ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 15px; height: 15px; }

.btn.primaire {
  background: linear-gradient(135deg, #1d9bf0 0%, #0d7dd6 100%);
  color: #fff;
  box-shadow: 0 3px 14px rgba(29, 155, 240, 0.3);
}
.btn.primaire:hover { box-shadow: 0 5px 22px rgba(29, 155, 240, 0.45); background: linear-gradient(135deg, #35a7f2 0%, #1489e2 100%); }

.btn.fantome {
  background: var(--surface-2);
  border-color: var(--bord);
  color: var(--texte-2);
}
.btn.fantome:hover { background: var(--surface-3); color: var(--texte); }

.btn.danger { background: var(--danger); color: #fff; }
.btn.danger:hover { background: #ff6482; }

.btn.danger-fantome { background: transparent; border-color: transparent; color: var(--texte-3); }
.btn.danger-fantome:hover { background: var(--danger-doux); color: var(--danger); }

.btn.petit { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ------------------------------------------------------------------ */
/* Tuiles de stats                                                     */
/* ------------------------------------------------------------------ */
.tuiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.tuile {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--bord-doux);
  border-radius: var(--rayon);
  padding: 18px 20px;
  transition: border-color 200ms ease, transform 200ms ease;
}
.tuile:hover { border-color: var(--bord); transform: translateY(-1px); }

.tuile-icone {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
}
.tuile-icone svg { width: 20px; height: 20px; }
.t-bleu { background: var(--accent-doux); color: var(--accent-fort); }
.t-violet { background: var(--violet-doux); color: var(--violet); }
.t-cyan { background: var(--cyan-doux); color: var(--cyan); }
.t-vert { background: var(--ok-doux); color: var(--ok); }

.tuile-corps { display: flex; flex-direction: column; }
.tuile-valeur { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.tuile-libelle { color: var(--texte-2); font-size: 12.5px; }

/* ------------------------------------------------------------------ */
/* Cartes modèles                                                      */
/* ------------------------------------------------------------------ */
.grille-modeles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.carte-modele {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--bord-doux);
  border-radius: var(--rayon);
  padding: 20px;
  transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}
.carte-modele:hover {
  border-color: rgba(29, 155, 240, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.carte-modele-haut { display: flex; align-items: center; gap: 13px; }
.carte-modele-haut h3 { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.carte-modele-haut .chevron { margin-left: auto; width: 17px; height: 17px; color: var(--texte-3); transition: transform 200ms ease, color 200ms ease; }
.carte-modele:hover .chevron { transform: translateX(3px); color: var(--accent); }

.avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--surface-3), var(--surface-2));
  border: 1px solid var(--bord);
  font-weight: 700;
  font-size: 17px;
  color: var(--accent-fort);
}

.carte-sous { color: var(--texte-3); font-size: 12px; }
.carte-vide-note { color: var(--texte-2); }

.carte-modele-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  border-top: 1px solid var(--bord-doux);
  padding-top: 13px;
}
.carte-modele-stats div { display: flex; flex-direction: column; }
.carte-modele-stats strong { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.carte-modele-stats span { color: var(--texte-3); font-size: 11.5px; }

.jauge {
  height: 5px;
  background: var(--surface-3);
  border-radius: 4px;
  overflow: hidden;
}
.jauge-remplie {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #1d9bf0, #22d3ee);
  transition: width 400ms ease;
}

/* ------------------------------------------------------------------ */
/* Liste de posts                                                      */
/* ------------------------------------------------------------------ */
.barre-outils {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.recherche {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--bord-doux);
  border-radius: 10px;
  padding: 8px 13px;
  color: var(--texte-3);
  transition: border-color 160ms ease;
}
.recherche:focus-within { border-color: var(--accent); }
.recherche svg { width: 15px; height: 15px; }
.recherche input {
  flex: 1;
  background: none;
  border: 0;
  color: var(--texte);
  font: inherit;
  font-size: 13.5px;
}
.recherche input:focus { outline: none; }
.recherche input::placeholder { color: var(--texte-3); }

.barre-info { color: var(--texte-3); font-size: 12.5px; font-variant-numeric: tabular-nums; }

.liste-posts { display: flex; flex-direction: column; gap: 10px; }

.post {
  background: var(--surface);
  border: 1px solid var(--bord-doux);
  border-radius: var(--rayon-s);
  transition: border-color 160ms ease;
}
.post:hover { border-color: var(--bord); }
.post.en-pause { opacity: 0.55; }

.post summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.post summary::-webkit-details-marker { display: none; }

.post-etat {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 7px rgba(34, 197, 94, 0.6);
  flex: none;
}
.post.en-pause .post-etat { background: var(--texte-3); box-shadow: none; }

.post-apercu {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.post-meta { display: flex; align-items: center; gap: 8px; }
.post-meta .chevron { width: 15px; height: 15px; color: var(--texte-3); transition: transform 200ms ease; }
.post details[open] .chevron, details[open] > summary .chevron { transform: rotate(180deg); }

.puce {
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 20px;
  padding: 2px 9px;
  white-space: nowrap;
}
.puce-variantes { background: var(--accent-doux); color: var(--accent-fort); }
.puce-pubs { background: var(--ok-doux); color: var(--ok); }

.post-corps { border-top: 1px solid var(--bord-doux); padding: 14px 16px 13px; }

.variantes {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0 0 14px 0;
  padding: 0;
  counter-reset: var-num;
  list-style: none;
}
.variantes li {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--bord-doux);
  border-radius: 8px;
  padding: 9px 13px 9px 42px;
  font-size: 13.5px;
  color: var(--texte);
}
.variantes li::before {
  counter-increment: var-num;
  content: counter(var-num);
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--texte-3);
}

.post-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.zone-danger {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px dashed var(--bord);
  display: flex;
  justify-content: flex-end;
}

/* ------------------------------------------------------------------ */
/* État vide                                                           */
/* ------------------------------------------------------------------ */
.etat-vide {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 70px 20px;
  border: 1px dashed var(--bord);
  border-radius: var(--rayon);
  background: radial-gradient(ellipse 60% 80% at 50% 0%, rgba(29, 155, 240, 0.05), transparent);
}
.etat-vide-icone {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--bord);
  color: var(--texte-3);
  margin-bottom: 6px;
}
.etat-vide-icone svg { width: 26px; height: 26px; }
.etat-vide h2 { font-size: 18px; font-weight: 700; }
.etat-vide p { color: var(--texte-2); font-size: 14px; max-width: 440px; }
.etat-vide .btn, .etat-vide-boutons { margin-top: 10px; }
.etat-vide-boutons { display: flex; gap: 10px; }

/* ------------------------------------------------------------------ */
/* Modales                                                             */
/* ------------------------------------------------------------------ */
.modal {
  margin: auto;
  background: var(--surface);
  color: var(--texte);
  border: 1px solid var(--bord);
  border-radius: 16px;
  padding: 26px;
  width: min(440px, calc(100vw - 40px));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}
.modal-large { width: min(560px, calc(100vw - 40px)); }
.modal::backdrop { background: rgba(2, 4, 8, 0.65); backdrop-filter: blur(3px); }

.modal h2 { font-size: 17px; font-weight: 700; margin-bottom: 6px; letter-spacing: -0.01em; }
.modal-aide { color: var(--texte-2); font-size: 13px; margin-bottom: 18px; }
.modal-aide code {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--surface-3);
  border-radius: 5px;
  padding: 1px 6px;
}

.champ { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.champ > span { font-size: 13px; font-weight: 600; color: var(--texte-2); display: flex; justify-content: space-between; }
.champ em { font-style: normal; color: var(--texte-3); font-weight: 500; font-size: 12px; }

.champ input, .champ textarea {
  background: var(--surface-2);
  border: 1px solid var(--bord);
  border-radius: 10px;
  color: var(--texte);
  font: inherit;
  font-size: 14px;
  padding: 10px 13px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
  resize: vertical;
}
.champ textarea { line-height: 1.6; }
.champ input:focus, .champ textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(29, 155, 240, 0.15);
}
.champ input::placeholder, .champ textarea::placeholder { color: var(--texte-3); }

.modal-boutons { display: flex; justify-content: flex-end; gap: 10px; }

.tirage-resultat {
  background: var(--surface-2);
  border: 1px solid var(--bord);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 14.5px;
  margin-bottom: 10px;
}
.tirage-detail { color: var(--texte-3); font-size: 12px; font-family: var(--mono); margin-bottom: 16px; }

/* ------------------------------------------------------------------ */
/* Toasts                                                              */
/* ------------------------------------------------------------------ */
.toasts {
  position: fixed;
  right: 22px;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  z-index: 100;
}

.toast {
  background: var(--surface-2);
  border: 1px solid var(--bord);
  border-radius: 11px;
  padding: 11px 16px 11px 14px;
  font-size: 13.5px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.5);
  animation: toast-in 240ms cubic-bezier(0.21, 1.02, 0.73, 1);
  display: flex;
  align-items: center;
  gap: 9px;
}
.toast::before { content: ""; width: 7px; height: 7px; border-radius: 50%; flex: none; }
.toast-ok::before { background: var(--ok); box-shadow: 0 0 8px rgba(34, 197, 94, 0.7); }
.toast-erreur::before { background: var(--danger); box-shadow: 0 0 8px rgba(240, 80, 110, 0.7); }
.toast.toast-sortie { animation: toast-out 220ms ease forwards; }

@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ------------------------------------------------------------------ */
/* Banques : titres de section, postes à plat, boutons-icônes          */
/* ------------------------------------------------------------------ */
.section-titre {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 26px 0 14px;
}
.section-titre h2 { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }

.avatar-banque { color: var(--accent-fort); }
.avatar-banque svg { width: 20px; height: 20px; }

.liste-postes { display: flex; flex-direction: column; gap: 9px; }

.poste {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--bord-doux);
  border-radius: var(--rayon-s);
  padding: 13px 15px;
  transition: border-color 160ms ease;
}
.poste:hover { border-color: var(--bord); }
.poste.en-pause { opacity: 0.55; }
.poste-texte { flex: 1; font-size: 14px; line-height: 1.45; word-break: break-word; }
.poste-actions { display: flex; align-items: center; gap: 4px; flex: none; }

.btn-icone {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--texte-3);
  background: transparent;
  transition: background 150ms ease, color 150ms ease;
}
.btn-icone:hover { background: var(--surface-3); color: var(--texte); }
.btn-icone svg { width: 16px; height: 16px; }
.btn-icone.danger:hover { background: var(--danger-doux); color: var(--danger); }

.form-inline-rename { display: flex; gap: 8px; align-items: center; }
.form-inline-rename input {
  background: var(--surface-2);
  border: 1px solid var(--bord);
  border-radius: 9px;
  color: var(--texte);
  font: inherit;
  font-size: 13.5px;
  padding: 7px 12px;
  min-width: 200px;
}
.form-inline-rename input:focus { outline: none; border-color: var(--accent); }
.zone-danger { justify-content: space-between; }

/* Page modèle : choix de banque */
.form-choix-banque { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.form-choix-banque select {
  flex: 1;
  min-width: 220px;
  background: var(--surface-2);
  border: 1px solid var(--bord);
  border-radius: 10px;
  color: var(--texte);
  font: inherit;
  font-size: 14px;
  padding: 10px 13px;
  cursor: pointer;
}
.form-choix-banque select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(29,155,240,0.15); }

.banque-apercu { margin-top: 16px; }
.banque-lien {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--bord-doux);
  border-radius: 10px;
  padding: 12px 15px;
  font-size: 14px;
  font-weight: 600;
  transition: border-color 160ms ease;
}
.banque-lien:hover { border-color: rgba(29,155,240,0.4); }
.banque-lien svg { width: 17px; height: 17px; color: var(--accent-fort); }
.banque-lien .chevron { margin-left: auto; color: var(--texte-3); }

/* ------------------------------------------------------------------ */
/* Sélecteur de mode (création modèle)                                 */
/* ------------------------------------------------------------------ */
.choix-mode { display: flex; flex-direction: column; gap: 9px; }
.mode-option { cursor: pointer; }
.mode-option input { position: absolute; opacity: 0; }
.mode-carte {
  display: block;
  border: 1px solid var(--bord);
  background: var(--surface-2);
  border-radius: 10px;
  padding: 11px 14px;
  transition: border-color 160ms ease, background 160ms ease;
}
.mode-carte strong { display: block; font-size: 14px; margin-bottom: 2px; }
.mode-carte em { font-style: normal; color: var(--texte-3); font-size: 12px; line-height: 1.45; }
.mode-option input:checked + .mode-carte {
  border-color: var(--accent);
  background: var(--accent-doux);
}
.mode-option input:focus-visible + .mode-carte { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Barre de mode (page modèle) */
.mode-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--bord-doux);
  border-radius: var(--rayon-s);
  padding: 12px 16px;
  margin-bottom: 18px;
}
.mode-actuel { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mode-label { font-size: 12px; color: var(--texte-3); text-transform: uppercase; letter-spacing: 0.07em; font-weight: 600; }
.mode-pill {
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 20px;
  padding: 2px 11px;
}
.pill-variantes { background: var(--accent-doux); color: var(--accent-fort); }
.pill-simple { background: var(--violet-doux); color: var(--violet); }
.mode-aide { color: var(--texte-2); font-size: 12.5px; }

/* ------------------------------------------------------------------ */
/* Reposting                                                           */
/* ------------------------------------------------------------------ */
.explication {
  background: var(--surface);
  border: 1px solid var(--bord-doux);
  border-left: 3px solid var(--accent);
  border-radius: var(--rayon-s);
  padding: 14px 18px;
  margin-bottom: 22px;
  color: var(--texte-2);
  font-size: 13.5px;
  max-width: 760px;
}
.explication strong { color: var(--texte); }

.alerte {
  background: var(--danger-doux);
  border: 1px solid rgba(240, 80, 110, 0.35);
  border-radius: var(--rayon-s);
  padding: 12px 16px;
  margin-bottom: 20px;
  color: #ffb3c1;
  font-size: 13px;
}

.carte-form {
  background: var(--surface);
  border: 1px solid var(--bord-doux);
  border-radius: var(--rayon);
  padding: 22px;
  margin-bottom: 28px;
  max-width: 900px;
}
.carte-form h2, .bloc-liste h2 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-ligne {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}
.form-ligne .champ { flex: 1; min-width: 170px; margin-bottom: 0; }

.champ select {
  background: var(--surface-2);
  border: 1px solid var(--bord);
  border-radius: 10px;
  color: var(--texte);
  font: inherit;
  font-size: 14px;
  padding: 10px 13px;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.champ select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(29, 155, 240, 0.15);
}

.fleche-alloc { padding-bottom: 10px; color: var(--texte-3); }
.fleche-alloc svg { width: 22px; height: 22px; }

.form-actions { margin-top: 18px; }

.compteur-pastille {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-fort);
  background: var(--accent-doux);
  border-radius: 20px;
  padding: 1px 9px;
}

.liste-assign { display: flex; flex-direction: column; gap: 12px; }

.assign {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--bord-doux);
  border-radius: var(--rayon);
  padding: 16px 20px;
  transition: border-color 160ms ease;
}
.assign:hover { border-color: var(--bord); }
.assign-haut { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.assign-device { display: flex; flex-direction: column; gap: 2px; min-width: 130px; }
.assign-device strong { font-size: 15px; font-weight: 700; }
.assign-role {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.assign-device.repost .assign-role { color: var(--cyan); }
.assign-device.main .assign-role { color: var(--ok); }
.assign-handle { font-size: 12.5px; color: var(--texte-3); font-family: var(--mono); }

.assign-fleche { width: 24px; height: 24px; color: var(--texte-3); flex: none; }
.assign-boutons { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.badge-encours {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-fort);
  background: var(--accent-doux);
  border-radius: 20px;
  padding: 5px 12px;
}
.spin {
  width: 12px; height: 12px;
  border: 2px solid rgba(29,155,240,0.35);
  border-top-color: var(--accent-fort);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.assign-resultat {
  border-top: 1px solid var(--bord-doux);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.resultat-titre { font-size: 11.5px; color: var(--texte-3); font-weight: 600; }
.resultat-puces { display: flex; flex-wrap: wrap; gap: 6px; }
.puce-res {
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 7px;
  padding: 3px 9px;
  font-family: var(--mono);
}
.puce-ok { background: var(--ok-doux); color: var(--ok); }
.puce-ko { background: var(--danger-doux); color: var(--danger); }

.etat-vide.compact { padding: 40px 20px; }

/* ------------------------------------------------------------------ */
/* Posting : diffusion d'une banque, planification                     */
/* ------------------------------------------------------------------ */
.statut-point.eteint { background: var(--texte-3); box-shadow: none; }

/* Compte (sidebar), réglages, connexion / inscription */
.sidebar-compte { border-top: 1px solid var(--bord-doux); padding-top: 8px; margin-top: 8px; }
.compte-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.champ-cle {
  flex: 1;
  min-width: 240px;
  background: var(--surface-2);
  border: 1px solid var(--bord);
  border-radius: 10px;
  color: var(--texte);
  font: inherit;
  font-size: 14px;
  padding: 10px 13px;
}
.champ-cle:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(29,155,240,0.15); }

.page-auth { display: grid; place-items: center; padding: 24px 16px; }
.auth-carte {
  width: min(400px, 100%);
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: 16px;
  padding: 28px;
}
.auth-carte .brand { padding: 0 0 20px; }
.auth-carte h1 { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 4px; }
.auth-bouton { width: 100%; justify-content: center; padding: 11px 16px; }
.auth-bascule { margin-top: 18px; text-align: center; color: var(--texte-2); font-size: 13.5px; }
.auth-bascule a { color: var(--accent-fort); font-weight: 600; }

.choix-devices { display: flex; flex-wrap: wrap; gap: 8px; }
.device-option { cursor: pointer; }
.device-option input { position: absolute; opacity: 0; }
.device-carte {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--bord);
  background: var(--surface-2);
  border-radius: 9px;
  padding: 7px 13px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--texte-2);
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}
.device-carte em { font-family: var(--police); font-style: normal; font-size: 10.5px; color: var(--texte-3); }
.device-option input:checked + .device-carte {
  border-color: var(--accent);
  background: var(--accent-doux);
  color: var(--accent-fort);
}
.device-option input:focus-visible + .device-carte { outline: 2px solid var(--accent); outline-offset: 2px; }

.assign-device.large { flex: 1; min-width: 180px; gap: 6px; }
.assign-device a:hover { color: var(--accent-fort); }
.role-banque { color: var(--accent-fort); }
.role-tel { color: var(--cyan); }
.role-freq { color: var(--violet); }
.assign-boutons { flex-wrap: wrap; justify-content: flex-end; }

.puce-neutre { background: var(--surface-3); color: var(--texte-2); }
.puce-warn { background: rgba(245, 180, 60, 0.13); color: #f5b43c; }
.txt-ok { color: var(--ok); }
.txt-warn { color: #f5b43c; }
.txt-ko { color: var(--danger); }
.explication code, .alerte code { font-family: var(--mono); font-size: 12px; }

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */
@media (max-width: 900px) {
  :root { --sidebar: 0px; }
  .sidebar { display: none; }
  .topbar, .contenu { padding-left: 20px; padding-right: 20px; }
  .topbar { flex-direction: column; align-items: flex-start; }
}
