/* Oblik — mobile first, light theme by default (palette of demo/index.html) */
:root {
  --bg: #f7f5f2; --panel: #ffffff; --panel2: #f2efea; --text: #1f1c19; --muted: #6d665e; --line: #e6e1da;
  --accent: #1f5f7a; --accent-ink: #ffffff; --accent-soft: #e6f0f4; --ok: #1f7a4a; --ok-soft: #e6f4ec;
  --info: #285ea8; --info-soft: #e8effa; --warn: #a15c07; --warn-soft: #fbf1df; --bad: #b42318; --bad-soft: #fdecea;
  --shadow: 0 1px 2px rgba(31,28,25,.05), 0 2px 6px rgba(31,28,25,.06);
  --radius: 14px; --menu-h: 64px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #141210; --panel: #1d1a17; --panel2: #26221e; --text: #efe9e2; --muted: #a79e94; --line: #332e28;
  --accent: #6cc3dd; --accent-ink: #062330; --accent-soft: #12303a; --ok: #5fd39a; --ok-soft: #15301f;
  --info: #93bdf5; --info-soft: #172840; --warn: #f2b155; --warn-soft: #36270f; --bad: #ff8b80; --bad-soft: #3b1715; --shadow: none;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-text-size-adjust: 100%; }
a { color: var(--accent); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1 { font-size: 24px; margin: 0; letter-spacing: -.01em; line-height: 1.25; }
h2 { font-size: 16px; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
h2 .r, .r { margin-left: auto; }
code { background: var(--panel2); padding: 1px 6px; border-radius: 6px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); font-size: 14px; }
.sub { color: var(--muted); margin: 4px 0 0; }
.ok { color: var(--ok); }
.vide { color: var(--muted); }

/* Shell */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--panel); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; color: var(--text); text-decoration: none; }
/* Oblik mark: DataPet violet, lighter on dark backgrounds (the interface accent is petrol blue) */
.logo-oblik { flex: none; display: block; color: #3b2272; }
:root[data-theme="dark"] .logo-oblik { color: #b9a3f2; }
.commerce { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.topbar-actions form { margin: 0; }
.theme-btn { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; width: 40px; height: 40px; display: grid; place-items: center; color: var(--text); }
.theme-btn .ico-soleil { display: none; }
:root[data-theme="dark"] .theme-btn .ico-soleil { display: block; }
:root[data-theme="dark"] .theme-btn .ico-lune { display: none; }

.menu { position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; display: flex; background: var(--panel); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.menu-item { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: var(--menu-h); color: var(--muted); text-decoration: none; font-size: 11.5px; }
.menu-item.on { color: var(--accent); font-weight: 650; }
.menu-item .badge { position: absolute; top: 6px; left: calc(50% + 6px); background: var(--text); color: var(--panel); border-radius: 20px; font-size: 11px; font-weight: 700; padding: 0 6px; line-height: 18px; }
.contenu { padding: 18px 14px calc(var(--menu-h) + 30px); max-width: 1100px; margin: 0 auto; }

@media (min-width: 900px) {
  .app { display: grid; grid-template-columns: 220px minmax(0, 1fr); grid-template-rows: auto 1fr; min-height: 100vh; }
  .topbar { grid-column: 1 / -1; padding: 12px 22px; }
  .menu { position: sticky; top: 65px; bottom: auto; align-self: start; flex-direction: column; gap: 3px; border-top: 0; border-right: 1px solid var(--line); height: calc(100vh - 65px); padding: 16px 12px; }
  .menu-item { flex: none; flex-direction: row; justify-content: flex-start; gap: 10px; min-height: 0; padding: 9px 10px; border-radius: 9px; font-size: 15px; color: var(--text); }
  .menu-item:hover { background: var(--panel2); }
  .menu-item.on { background: var(--accent-soft); }
  .menu-item .badge { position: static; margin-left: auto; }
  .contenu { padding: 26px 32px 60px; margin: 0; width: 100%; }
}

/* Blocks */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.titre-long { font-size: 20px; overflow-wrap: anywhere; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); min-width: 0; margin: 0 0 14px; }
.grille { display: grid; gap: 14px; }
.grille .card { margin: 0; }
@media (min-width: 700px) { .grille { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.liste { list-style: none; margin: 0 0 10px; padding: 0; }
.liste li { padding: 9px 0; border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.liste li:last-child { border-bottom: 0; }
ul.card.liste { padding: 4px 16px; }
.pastille { display: inline-block; background: var(--panel2); color: var(--muted); border-radius: 20px; font-size: 12px; font-weight: 650; padding: 1px 9px; }
.pastille.tu { background: var(--accent-soft); color: var(--accent); }
.liste-contacts .pastille { margin-left: auto; }
.statut { font-size: 12px; font-weight: 650; border-radius: 6px; padding: 1px 7px; background: var(--panel2); color: var(--muted); }
.statut-appliquee { background: var(--ok-soft); color: var(--ok); }
.statut-echec { background: var(--bad-soft); color: var(--bad); }
.niveau-warning { color: var(--warn); }
.niveau-error { color: var(--bad); }

/* Buttons */
.btn, .ghost { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 9px 18px; border-radius: 11px; font-weight: 650; text-decoration: none; }
.btn { border: 0; background: var(--accent); color: var(--accent-ink); }
.btn:hover { filter: brightness(1.05); }
.ghost { border: 1px solid var(--line); background: var(--panel); color: var(--text); font-weight: 550; }
.ghost:hover { background: var(--panel2); }
.btn.ghost { border: 1px solid var(--line); background: var(--panel); color: var(--text); }
.petit { min-height: 36px; padding: 5px 12px; font-size: 14px; }
.lien { border: 0; background: none; color: var(--accent); padding: 4px 0; text-decoration: underline; text-underline-offset: 3px; }
.lien.danger { color: var(--bad); }
.petit-lien { font-size: 13px; font-weight: 500; }
.en-ligne { display: inline; margin: 0; }
.bloc-bouton { margin: 0 0 16px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.zone-danger { margin-top: 8px; }
.mail-classer { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; }

/* Forms */
.form { display: grid; gap: 14px; }
.form > div { display: grid; gap: 14px; }
.form label, .champ label { font-weight: 600; font-size: 15px; }
.form input[type=text], .form input[type=email], .form input[type=password], .form input[type=search], .form input[type=url], .form input[type=date], .tache-mini-form input[type=date], .form textarea, .form select,
.recherche input { width: 100%; border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 11px 12px; min-height: 46px; }
.form textarea { resize: vertical; line-height: 1.5; }
.form .help-text, .form [id$="_help"] { color: var(--muted); font-size: 13.5px; margin-top: -8px; }
.form fieldset, .form [id] > div:has(input[type=radio]) { border: 0; padding: 0; margin: 0; }
.form input[type=radio], .form input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); vertical-align: -4px; margin-right: 6px; }
.form input[type=radio] + label { font-weight: 450; }
.form ul { color: var(--bad); margin: 0; padding-left: 18px; font-size: 14px; }
.case { font-weight: 450 !important; display: flex; align-items: center; gap: 4px; }
.champ { display: grid; gap: 6px; }
.code { font-size: 24px !important; letter-spacing: .25em; text-align: center; font-variant-numeric: tabular-nums; }
.recherche { display: flex; gap: 8px; margin-bottom: 14px; }

/* Flashes */
.flash { border-radius: 10px; padding: 10px 14px; margin: 0 0 14px; }
.flash-succes { background: var(--ok-soft); color: var(--ok); }
.flash-erreur { background: var(--bad-soft); color: var(--bad); }
.flash-info { background: var(--info-soft); color: var(--info); }
.flash-avertissement { background: var(--warn-soft); color: var(--warn); }

/* Simple pages (login, setup) */
.simple { max-width: 520px; margin: 0 auto; padding: 16px 14px 40px; }
.simple-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.simple-card { padding: 22px 18px; }
.simple-card h1 { margin-bottom: 6px; }
.simple-card .form { margin-top: 18px; }
.by { text-align: center; color: var(--muted); font-size: 13px; }
.etapes { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 18px; counter-reset: e; font-size: 12.5px; }
.etapes li { flex: 1; counter-increment: e; color: var(--muted); border-top: 4px solid var(--line); padding-top: 6px; }
.etapes li::before { content: counter(e) ". "; }
.etapes li.fait { border-color: var(--ok); }
.etapes li.en-cours { border-color: var(--accent); color: var(--text); font-weight: 650; }
.liste-etapes { padding-left: 20px; }
.liste-etapes li { margin-bottom: 8px; }
.qr { display: grid; place-items: center; margin: 10px 0; }
.qr img { background: #fff; border-radius: 12px; padding: 6px; max-width: 100%; height: auto; }
.details summary { cursor: pointer; color: var(--accent); }
.secret { font-size: 15px; word-spacing: .2em; overflow-wrap: anywhere; }

/* AI job */
.job-attente { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.spinner { width: 18px; height: 18px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: tourne .9s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
.job-reponse { white-space: pre-wrap; overflow-wrap: anywhere; }
.job .btn { margin-top: 12px; }

/* Discussion */
.fil { display: grid; gap: 10px; margin-bottom: 14px; }
.bulle { max-width: 92%; padding: 11px 14px; border-radius: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.bulle.moi { justify-self: end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 5px; }
.bulle.ia { justify-self: start; background: var(--panel); border: 1px solid var(--line); border-bottom-left-radius: 5px; white-space: normal; }
.bulle-actions { display: flex; gap: 14px; margin-top: 8px; font-size: 14px; flex-wrap: wrap; }

/* Validation */
.avant-apres { display: grid; gap: 12px; }
@media (min-width: 700px) { .avant-apres { grid-template-columns: 1fr 1fr; } }
.etiquette { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 4px; }
.avant { white-space: pre-wrap; background: var(--panel2); border-radius: 10px; padding: 11px 12px; min-height: 46px; }
.statut-refusee, .statut-annulee { background: var(--panel2); color: var(--muted); }
.pastille.revenue { background: var(--warn-soft); color: var(--warn); }
.deja-traite { list-style: none; margin: 0; padding: 0; }
.deja-traite > li { border-bottom: 1px solid var(--line); }
.deja-traite > li:last-child { border-bottom: 0; }
.deja-traite summary { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; padding: 10px 0; cursor: pointer; list-style: none; }
.deja-traite summary::-webkit-details-marker { display: none; }
.deja-traite summary::before { content: "▸"; color: var(--muted); }
.deja-traite details[open] > summary::before { content: "▾"; }
.deja-traite-corps { padding: 0 0 12px 18px; display: grid; gap: 8px; }
.deja-traite-corps .avant { max-height: 40vh; overflow-y: auto; overflow-wrap: anywhere; }

/* Mes textes */
.textes-gardes { list-style: none; margin: 0; padding: 0; }
.texte-garde { padding: 14px 0; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.texte-garde:last-child { border-bottom: 0; }
.texte-garde-titre { font-size: 16px; margin: 0; overflow-wrap: anywhere; }
.texte-garde .muted.petit { margin: 0; }
.texte-garde-corps { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--panel2); border-radius: 10px; padding: 11px 12px; max-height: 50vh; overflow-y: auto; }
.texte-garde-titre a { color: inherit; text-decoration: none; }
.texte-garde-titre a:hover, .texte-garde-titre a:focus-visible { text-decoration: underline; }
.texte-garde-extrait { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.texte-garde-seul .texte-garde-corps { max-height: none; }
.texte-garde-titre-page { overflow-wrap: anywhere; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }

/* Fixes after the first render check */
[hidden] { display: none !important; }
.form div:has(> input[type=radio]) { display: grid; grid-template-columns: auto 1fr; gap: 10px 4px; align-items: center; }
.form div:has(> input[type=radio]) > input { margin: 0 6px 0 0; }
.form > .actions { display: flex; }
@media (min-width: 700px) {
  .form > .btn, .form > .ghost { justify-self: start; min-width: 200px; }
}

/* Discussion side panel (full screen on mobile, right column on desktop) */
.bouton-panneau[aria-expanded="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
@media (max-width: 519px) { .bouton-panneau span { display: none; } .bouton-panneau { padding: 5px 9px; } }
.panneau { display: none; position: fixed; inset: 0; z-index: 30; flex-direction: column; background: var(--bg); padding-bottom: env(safe-area-inset-bottom); }
:root[data-panneau="ouvert"] .panneau { display: flex; }
.panneau-poignee { display: none; }
.panneau-tete { display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: var(--panel); border-bottom: 1px solid var(--line); }
.panneau-choix { flex: 1; min-width: 0; min-height: 38px; border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 6px 10px; text-overflow: ellipsis; }
.icone { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--panel); border-radius: 10px; color: var(--text); }
.icone:hover { background: var(--panel2); }
.icone[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.panneau-fil { flex: 1; min-height: 0; overflow-y: auto; display: grid; align-content: start; gap: 10px; padding: 14px 12px; overscroll-behavior: contain; }
.panneau-vide { margin: 8px 0; }
.panneau-erreur { margin: 0; }
.panneau-saisie { display: grid; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--line); background: var(--panel); }
.panneau-saisie textarea { width: 100%; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 10px 12px; resize: none; line-height: 1.45;
  field-sizing: content; min-height: calc(3 * 1.45em + 22px); max-height: calc(8 * 1.45em + 22px); overflow-y: auto; }
.panneau-saisie .btn { justify-self: end; }
.panneau-saisie .btn:disabled { opacity: .6; cursor: wait; }

/* Collapsible side menu button (desktop only) */
.menu-replier { display: none; }
/* Bottom group (installation, Guide, Réglages, fold): on mobile its links simply end the bar */
.menu-bas { display: contents; }

@media (min-width: 900px) {
  .app { grid-template-columns: var(--menu-col, 220px) minmax(0, 1fr) var(--panneau-col, 0px); }
  :root[data-menu="replie"] { --menu-col: 68px; }
  :root[data-panneau="ouvert"] { --panneau-col: var(--panneau-l, 380px); }
  :root[data-panneau="ouvert"][data-panneau-large="1"] { --panneau-col: 50vw; }
  .menu { grid-column: 1; grid-row: 2; }
  .contenu { grid-column: 2; grid-row: 2; }
  .panneau { position: sticky; inset: auto; top: 65px; grid-column: 3; grid-row: 2; align-self: start; height: calc(100vh - 65px); z-index: 5; border-left: 1px solid var(--line); background: var(--bg); padding-bottom: 0; }
  .panneau-poignee { display: block; position: absolute; left: -5px; top: 0; bottom: 0; width: 10px; cursor: col-resize; touch-action: none; z-index: 2; }
  .panneau-poignee:hover, .panneau-poignee:active { background: linear-gradient(to right, transparent 4px, var(--accent) 4px, var(--accent) 6px, transparent 6px); }
  .panneau .bulle { max-width: 96%; }

  .menu-bas { display: flex; flex-direction: column; gap: 3px; margin-top: auto; padding-top: 12px; }
  .menu-replier { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 9px; background: none; color: var(--muted); font-size: 14px; text-align: left; }
  .menu-replier:hover { background: var(--panel2); color: var(--text); }
  .menu-replier svg { flex: none; transition: transform .15s; }
  :root[data-menu="replie"] .menu { padding: 16px 8px; }
  :root[data-menu="replie"] .menu-libelle { display: none; }
  :root[data-menu="replie"] .menu-item, :root[data-menu="replie"] .menu-replier { justify-content: center; padding: 10px 0; position: relative; }
  :root[data-menu="replie"] .menu-item .badge { position: absolute; top: 2px; right: 4px; margin: 0; font-size: 10px; padding: 0 5px; line-height: 16px; }
  :root[data-menu="replie"] .menu-replier svg { transform: rotate(180deg); }
}

/* Installation progress */
.avancement-barre { height: 8px; border-radius: 8px; background: var(--panel2); overflow: hidden; margin: 2px 0 10px; }
.avancement-barre span { display: block; height: 100%; background: var(--accent); border-radius: 8px; }
.avancement .liste { margin: 0; }

/* Error right under a question box; busy send button */
.champ-erreur { margin: -6px 0 0; }
.btn:disabled { opacity: .6; cursor: wait; }

/* Conversations list */
.recherche input[type=search] { flex: 1; min-width: 0; }
.conversations { list-style: none; margin: 0; padding: 0; }
.conversation { padding: 12px 0; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.conversation:last-child { border-bottom: 0; }
.conversation-tete { display: flex; align-items: center; gap: 8px; min-width: 0; }
.conversation-titre { font-weight: 650; overflow-wrap: anywhere; }
.conversation-edition { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.conversation-edition input[type=text] { flex: 1; min-width: 180px; border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 8px 10px; min-height: 40px; }
.conversation-resume { margin: 0; color: var(--text); font-size: 14.5px; }
.conversation-pied { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.icone.petite { width: 30px; height: 30px; border-radius: 8px; }

/* Foldable page introductions */
.intro-aide { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-weight: 700; font-size: 14px; line-height: 1; vertical-align: 4px; margin-left: 8px; }
.intro-aide:hover, .intro-aide[aria-expanded="true"] { color: var(--accent); border-color: var(--accent); }
.intro { display: flex; gap: 10px; align-items: flex-start; background: var(--accent-soft); border-radius: 12px; padding: 10px 10px 10px 14px; margin: -4px 0 16px; }
.intro p { margin: 0; flex: 1; font-size: 14.5px; }
.intro .icone.petite { width: 26px; height: 26px; background: transparent; border-color: transparent; color: var(--muted); }
.intro .icone.petite:hover { color: var(--text); background: var(--panel); }

/* Attachments (question box and thread) */
.saisie-bas, .form > .saisie-bas { display: flex; align-items: flex-start; gap: 10px; }
.saisie-bas .btn { margin-left: auto; flex: none; }
.form.saisie-question .saisie-bas .btn { justify-self: auto; }
.pieces-saisie { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.trombone { width: 40px; height: 40px; }
.pieces-apercu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; flex: 1 1 100%; order: 2; }
.piece-apercu { display: flex; align-items: center; gap: 6px; max-width: 220px; border: 1px solid var(--line); background: var(--panel2); border-radius: 10px; padding: 3px 4px 3px 3px; font-size: 13px; }
.piece-apercu img { width: 34px; height: 34px; object-fit: cover; border-radius: 7px; flex: none; }
.piece-type { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 7px; background: var(--panel); color: var(--muted); font-size: 10px; font-weight: 700; flex: none; }
.piece-nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.piece-retirer { flex: none; width: 26px; height: 26px; border: 0; border-radius: 7px; background: none; color: var(--muted); font-size: 18px; line-height: 1; }
.piece-retirer:hover { background: var(--panel); color: var(--text); }
.pieces-erreur { flex-basis: 100%; margin: 0; }
.depot { outline: 2px dashed var(--accent); outline-offset: 2px; }
.pieces-envoyees { list-style: none; margin: -4px 0 0; padding: 0; justify-self: end; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 92%; }
.piece-image img { display: block; width: 96px; height: 96px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); }
.piece-fichier { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 6px 10px; font-size: 13.5px; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.piece-fichier:hover { background: var(--panel2); }

/* Installation progress in the menu (desktop) and dot on Settings (mobile) */
.menu-avancement { display: none; }
.pastille-avancement { position: absolute; top: 9px; left: calc(50% + 8px); width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--panel); }
@media (min-width: 900px) {
  .pastille-avancement { display: none; }
  .menu-avancement { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; padding: 10px; border-radius: 10px; color: var(--text); text-decoration: none; font-size: 13.5px; background: var(--panel2); }
  .menu-avancement:hover { background: var(--accent-soft); }
  .menu-avancement .anneau { display: none; flex: none; }
  .avancement-menu { display: grid; gap: 4px; min-width: 0; flex: 1; }
  .avancement-menu-titre { font-weight: 650; }
  .avancement-menu .avancement-barre { height: 6px; margin: 0; }
  .avancement-menu-suite { color: var(--accent); overflow-wrap: anywhere; }
  :root[data-menu="replie"] .menu-avancement { justify-content: center; padding: 8px 0; background: none; }
  :root[data-menu="replie"] .menu-avancement .anneau { display: block; }
}

/* To-do list and shared memory */
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.onglets { display: flex; gap: 6px; margin-bottom: 10px; }
.onglets a { padding: 6px 12px; border-radius: 20px; text-decoration: none; color: var(--muted); border: 1px solid var(--line); font-size: 14px; }
.onglets a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); font-weight: 650; }
.onglets a .compte { font-size: 12px; opacity: .75; margin-left: 2px; }
/* Many tabs on a phone: one scrolling row instead of wrapping */
.onglets-defile { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.onglets-defile a { flex: none; white-space: nowrap; }
.texte-garde .pastille { margin-right: 4px; }
.saisie-memoire { margin: 2px 0 0; font-size: 12.5px; line-height: 1.4; }
.saisie-memoire .lien { font-size: inherit; white-space: nowrap; }
.tache-ajout-ligne { display: flex; gap: 8px; flex-wrap: wrap; }
.tache-ajout-ligne input[type=text] { flex: 1 1 220px; }
.taches, .souvenirs { list-style: none; margin: 0; padding: 0; }
.tache { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tache:last-child, .souvenir:last-child { border-bottom: 0; }
.tache-case { flex: none; padding-top: 2px; }
.tache-case input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--accent); cursor: pointer; }
.tache-corps { flex: 1; min-width: 0; display: grid; gap: 4px; }
.tache-titre { font-weight: 600; margin: 0; overflow-wrap: anywhere; }
.tache { scroll-margin-top: 84px; }
.tache-aide { flex-basis: 100%; margin: 0; }
.tache.faite .tache-titre { text-decoration: line-through; color: var(--muted); font-weight: 500; }
.tache-infos { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 13.5px; }
.pastille.retard { background: var(--warn-soft); color: var(--warn); }
.tache-note { margin: 0; white-space: pre-wrap; color: var(--muted); font-size: 14px; max-height: 7.5em; overflow: hidden; }
.tache-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-start; font-size: 14px; }
.tache-detail summary { list-style: none; cursor: pointer; }
.tache-detail summary::-webkit-details-marker { display: none; }
.tache-detail[open] { flex-basis: 100%; }
.tache-mini-form { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tache-mini-form.form { display: grid; }
.souvenir { padding: 10px 0; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.souvenir.inactif .souvenir-texte { color: var(--muted); }
.souvenir-pied { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-start; font-size: 14px; }
.tache-ajout-ligne input[type=date] { flex: 0 0 auto; width: auto; }
:root[data-theme="dark"] input[type=date] { color-scheme: dark; }
.tache-mini-form.en-ligne input[type=date] { width: auto; min-height: 40px; padding: 7px 10px; }
/* "À faire" board: columns by due date + week calendar */
.tache-ajout-carte { max-width: 760px; }
.form > .tache-ajout-ligne, .form > .tache-ajout-options { display: flex; }
.tache-ajout-options { gap: 10px 14px; flex-wrap: wrap; align-items: center; }
.tache-actions { row-gap: 2px; }
.barre-vue .vue-choix { max-width: 100%; overflow-x: auto; }
.barre-vue .vue-choix a { white-space: nowrap; }
.tache-ajout-options label[for] { margin: 0; }
.tache-ajout-options select { width: auto; min-width: 0; }
.case-ligne { display: inline-flex !important; gap: 8px; align-items: center; font-weight: 500; cursor: pointer; }
.case-ligne input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }
.pastille.prio { background: var(--accent-soft); color: var(--accent); }
.tache.prioritaire { box-shadow: inset 3px 0 0 var(--accent); padding-left: 10px; }
.tache-agenda .muted { flex-basis: 100%; margin: 0; }
.taches-page { display: grid; gap: 14px; align-items: start; }
.tableau-taches { display: grid; gap: 14px; align-items: start; }
.colonne-taches { margin: 0; }
.colonne-taches h2 .compte { font-size: 12px; font-weight: 650; color: var(--muted); background: var(--panel2); border-radius: 20px; padding: 0 8px; }
.colonne-retard h2 { color: var(--warn); }
.colonne-aujourdhui h2 { color: var(--accent); }
.colonne-taches .tache:first-child { padding-top: 4px; }
.semaine-taches { margin: 0; }
.jours { list-style: none; margin: 0; padding: 0; }
.jour { padding: 8px 0; border-bottom: 1px solid var(--line); }
.jour:last-child { border-bottom: 0; }
.jour-date { font-weight: 650; font-size: 14px; }
.jour.aujourdhui .jour-date { color: var(--accent); }
.jour ul { margin: 3px 0 0; padding-left: 18px; font-size: 14px; }
.jour li.prioritaire::marker { color: var(--accent); }
.jour a { color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.jour a:hover { color: var(--accent); text-decoration: underline; }
.jour-vide { margin: 0; color: var(--muted); font-size: 14px; }
@media (min-width: 700px) {
  .tableau-taches { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
}
@media (min-width: 1100px) {
  .taches-page { grid-template-columns: minmax(0, 1fr) 270px; }
  .semaine-taches { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow: auto; }
  .lien-calendrier { display: none; }
}
/* Message after a check without reload: stays in view while scrolled */
.flash-case { position: sticky; top: 72px; z-index: 5; box-shadow: 0 4px 14px rgba(0, 0, 0, .12); }
/* Side calendar: titles cut at three lines, late items on top */
.jour a { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.jour.retards .jour-date { color: var(--warn); }
.lien-calendrier { font-size: 14px; }
/* Add form: folds on small screens (the first item comes up) */
.tache-ajout-pli > summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; align-items: center; gap: 8px; min-height: 44px; }
.tache-ajout-pli > summary::-webkit-details-marker { display: none; }
.tache-ajout-pli > summary::before { content: "+"; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.tache-ajout-pli[open] > summary::before { content: "−"; }
.tache-ajout-pli[open] > summary { margin-bottom: 6px; }
/* Touch targets: at least 44 px on phones */
@media (max-width: 699px) {
  .tache-case { padding: 0; margin: -11px -11px -11px -11px; }
  .tache-case input[type=checkbox] { margin: 11px; }
  .tache-actions { gap: 0 4px; }
  .tache-actions > .lien, .tache-detail > summary { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; }
  .tache-actions > .lien:first-child { padding-left: 0; }
  .jour a { padding: 6px 0; }
  .tache-mini-form .lien { min-height: 44px; }
}

/* Publications */
.pub-apercu { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 12px; }
.pub-image { flex: none; display: block; width: 160px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--panel2); }
.pub-image img { display: block; width: 100%; height: auto; }
.pub-image.pub-story { width: 110px; }
.pub-infos { flex: 1 1 220px; min-width: 0; }
.pub-infos p { margin: 0 0 6px; }
.pub-comptes .pastille, .pubs .pastille, .comptes .pastille, .pub-choix-comptes .pastille { margin-right: 2px; }
.reseau-facebook { background: #e7efff; color: #1b4fb8; }
.reseau-instagram { background: #fde8f1; color: #a3195b; }
.reseau-linkedin_page, .reseau-linkedin_profil { background: #e3f1fa; color: #0a5c8f; }
:root[data-theme="dark"] .reseau-facebook { background: #1a2740; color: #9dbcff; }
:root[data-theme="dark"] .reseau-instagram { background: #3a1a2a; color: #ff9cc9; }
:root[data-theme="dark"] .reseau-linkedin_page, :root[data-theme="dark"] .reseau-linkedin_profil { background: #13293a; color: #8fcdf5; }
.pub-texte { white-space: pre-wrap; background: var(--panel2); border-radius: 10px; padding: 12px 14px; margin: 0 0 12px; }
.pub-ligne { align-items: center !important; cursor: pointer; }
.pub-lien { display: grid; gap: 2px; flex: 1 1 240px; min-width: 0; text-decoration: none; color: inherit; }
.pub-date { font-size: 13px; color: var(--muted); }
.pub-sujet { overflow-wrap: anywhere; }
.pub-reseaux { display: flex; gap: 4px; flex-wrap: wrap; }
.statut-programmee { background: var(--accent-soft); color: var(--accent); }
.saisons { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.saison { display: grid; gap: 1px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: inherit; }
.saison:hover { border-color: var(--accent); }
.pub-form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.pub-form legend { font-weight: 600; font-size: 15px; margin-bottom: 6px; padding: 0; }
.pub-radios, .pub-choix-comptes { display: flex; gap: 8px 18px; flex-wrap: wrap; }
.pub-radios label, .case-compte { font-weight: 450 !important; display: inline-flex; align-items: center; gap: 4px; }
.pub-form input[type=file], .pub-form input[type=datetime-local], .pub-form input[type=color] { font: inherit; }
.pub-form input[type=datetime-local] { width: auto; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); }
:root[data-theme="dark"] input[type=datetime-local] { color-scheme: dark; }
.pub-image-choix:not(:has(input[value=photo]:checked)) .pub-source-photo,
.pub-image-choix:not(:has(input[value=unsplash]:checked)) .pub-source-unsplash { display: none; }
.pub-source { display: grid; gap: 6px; }
.pub-form .pub-source .help-text, .pub-form fieldset .help-text { margin-top: 0; }
.unsplash-resultats { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.unsplash-photo { display: grid; gap: 2px; padding: 0 0 4px; border: 2px solid transparent; border-radius: 10px; background: var(--panel2); cursor: pointer; overflow: hidden; font-size: 12px; color: var(--muted); text-align: left; }
.unsplash-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.unsplash-photo span { padding: 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.unsplash-photo[aria-pressed="true"] { border-color: var(--accent); }
.variantes .variante { border-top: 1px solid var(--line); padding: 8px 0; }
.variantes .variante p { white-space: pre-wrap; margin: 0 0 4px; }
.connecteurs li, .comptes li { align-items: center; }
.indisponible { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 4px; max-width: 380px; text-align: right; font-size: 13.5px; }
.logo-apercu { width: 140px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: repeating-conic-gradient(var(--panel2) 0 25%, var(--panel) 0 50%) 0 0 / 16px 16px; }
.logo-apercu img { display: block; max-width: 100%; height: auto; }

/* Mails */
.mail-ligne { align-items: stretch !important; }
.mail-lien { display: grid; gap: 2px; flex: 1 1 260px; min-width: 0; text-decoration: none; color: inherit; }
.mail-tete { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.mail-date { margin-left: auto; font-size: 13px; }
.mail-sujet { font-weight: 600; overflow-wrap: anywhere; }
.mail-extrait { font-size: 14px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mail-ligne.non-lu .mail-de::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: middle; }
.mail-entete { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; margin: 0 0 4px; }
.mail-texte { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--panel2); border-radius: 10px; padding: 12px 14px; margin: 8px 0 0; max-height: 60vh; overflow-y: auto; }
.mail-resume { font-weight: 600; margin: 6px 0; }
.mail-fil summary { color: var(--muted); }
.fiche-contact { gap: 10px; }
.lot { border-color: var(--accent); }
.lot .actions { margin-top: 8px; }
.pastille.categorie { background: var(--panel2); }

/* Prospects */
.fiche-prospect { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 10px 0; }
.fiche-prospect dt { color: var(--muted); }
.fiche-prospect dd { margin: 0; overflow-wrap: anywhere; }
.liste-simple { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
@media (max-width: 520px) { .fiche-prospect { grid-template-columns: 1fr; } .fiche-prospect dd { margin-bottom: 6px; } }

/* Mobile bottom bar: up to 9 entries (Prospects), scrolls sideways instead of squeezing labels */
@media (max-width: 899.98px) {
  .menu { overflow-x: auto; scrollbar-width: none; }
  .menu::-webkit-scrollbar { display: none; }
  .menu-item { flex: 1 0 58px; }
  .menu-libelle { max-width: 100%; padding: 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* Chiffres: key figures, bar charts per day, rankings */
.tuiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 8px 0 14px; }
@media (min-width: 700px) { .tuiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tuile { background: var(--panel2); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tuile-libelle { font-size: 13px; color: var(--muted); }
.tuile-valeur { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tuile-pied { font-size: 12px; display: flex; flex-wrap: wrap; gap: 2px 8px; }
.evol { font-weight: 650; white-space: nowrap; }
.evol-bon { color: var(--ok); }
.evol-mauvais { color: var(--bad); }
/* Chiffres page (design validated 26/11/2026: docs/maquettes/chiffres-maquette.html).
   Series colours checked with the dataviz validator, light and dark: bars = period, dashed blue = period before. */
:root { --serie: #c9472b; --avant: #3f6fc4; }
:root[data-theme="dark"] { --serie: #e8775a; --avant: #6f95e0; }
.ch-barre { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.ch-periodes { display: inline-flex; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: var(--panel); }
.ch-periodes a { padding: 8px 14px; font-size: 14px; color: var(--muted); text-decoration: none; min-height: 38px; display: inline-flex; align-items: center; }
.ch-periodes a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.ch-releve { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.ch-essentiel { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom: 14px; }
.ch-tuile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 10px; display: grid; gap: 2px; box-shadow: var(--shadow); min-width: 0; align-content: start; }
.ch-lib { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.ch-src { margin-left: auto; font-size: 11px; background: var(--panel2); border-radius: 6px; padding: 0 6px; white-space: nowrap; }
.ch-val { font-size: 26px; font-weight: 750; letter-spacing: -.01em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.ch-evo { font-size: 13px; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.ch-tuile svg { width: 100%; height: 34px; display: block; margin-top: 4px; }
.ch-tuile polyline { fill: none; stroke: var(--serie); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.ch-bref h2 { margin-bottom: 10px; }
.ch-bref-saisie { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.ch-bref-saisie input[type=text] { flex: 1 1 280px; min-height: 44px; border: 1px solid var(--line); border-radius: 11px; padding: 8px 12px; background: var(--panel); }
.ch-bref-reponse { background: var(--panel2); border-radius: 12px; padding: 12px 14px; }
.ch-bref-reponse .bulle, .ch-bref-reponse p, .ch-bref-reponse ul { max-width: 80ch; }
.ch-graphes { display: grid; gap: 14px; margin-bottom: 14px; }
@media (min-width: 1200px) { .ch-graphes { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); } }
.ch-graphes .card, .ch-cartes .card { margin: 0; }
.ch-fin { font-weight: 400; }
.ch-legende { display: flex; gap: 14px; font-size: 13px; color: var(--muted); margin: -4px 0 6px; flex-wrap: wrap; }
.ch-legende span { display: inline-flex; align-items: center; gap: 6px; }
.ch-pastille { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--serie); }
.ch-trait { display: inline-block; width: 18px; height: 0; border-top: 2px dashed var(--avant); }
.ch-graphe { position: relative; min-height: 200px; }
.ch-graphe svg { display: block; width: 100%; height: 240px; overflow: visible; }
.ch-axe { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.ch-grille { stroke: var(--line); stroke-width: 1; }
.ch-baton { fill: var(--serie); }
.ch-avant { fill: none; stroke: var(--avant); stroke-width: 2; stroke-dasharray: 5 4; }
.ch-survol { fill: transparent; cursor: crosshair; }
.ch-repere { stroke: var(--muted); stroke-width: 1; }
.ch-bulle { position: absolute; top: 0; pointer-events: none; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(0,0,0,.12); border-radius: 10px; padding: 7px 10px; font-size: 13px; white-space: nowrap; z-index: 5; }
.ch-bulle-d { font-weight: 650; margin-bottom: 2px; }
.ch-bulle-l { display: flex; align-items: center; gap: 6px; }
.ch-detail { margin-top: 8px; }
.ch-detail summary { cursor: pointer; font-size: 13px; color: var(--accent); }
.ch-defile { max-height: 220px; overflow: auto; }
.ch-tableau { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.ch-tableau th, .ch-tableau td { padding: 4px 6px; border-bottom: 1px solid var(--line); text-align: right; }
.ch-tableau th:first-child, .ch-tableau td:first-child { text-align: left; }
.ch-cartes { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); align-items: start; }
.ch-rang { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.ch-rang:last-of-type { border-bottom: 0; }
.ch-nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-chiffre { text-align: right; color: var(--muted); font-size: 13px; }
.ch-jauge { grid-column: 1 / -1; height: 8px; background: var(--panel2); border-radius: 4px; overflow: hidden; }
.ch-jauge span { display: block; height: 100%; background: var(--serie); border-radius: 0 4px 4px 0; }
.ch-code { font-family: ui-monospace, monospace; font-size: 12px; background: var(--panel2); border-radius: 5px; padding: 0 5px; margin-left: 4px; }
.ch-etat { font-size: 12px; font-weight: 650; }
.ch-note { font-size: 13px; margin: 8px 0 0; }
.ch-barre .ch-note { margin: 0; }
.ch-ok { color: var(--ok); }
.ch-attn { color: var(--warn); }
.ch-audience { display: flex; gap: 8px 18px; flex-wrap: wrap; margin: 4px 0 10px; }
.ch-audience label { display: inline-flex; gap: 6px; align-items: center; font-weight: 450; }
@media (max-width: 899px) {
  .ch-releve { margin-left: 0; width: 100%; }
  .ch-essentiel { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ch-val { font-size: 21px; }
  .ch-graphe svg { height: 200px; }
}

/* Shop (Boutique) */
.texte-boutique { white-space: pre-line; overflow-wrap: anywhere; margin-bottom: 10px; }
.petit-titre { font-size: 14px; color: var(--muted); margin: 12px 0 4px; font-weight: 650; }
.champ-court { width: 7em; border: 1px solid var(--line); background: var(--panel); color: inherit; border-radius: 8px; padding: 6px 8px; min-height: 36px; }
.confirmation { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--bad-soft); margin: 8px 0; }
.confirmation input { margin-top: 3px; }
.ecart-fort { color: var(--warn); font-weight: 650; }

/* Prospects: CSV import (column matching, preview) */
.import-colonnes { display: grid; gap: 10px 16px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.import-colonnes select { width: 100%; min-height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; background: var(--panel); }
.tableau-defile { overflow-x: auto; }
.tableau { border-collapse: collapse; font-size: 13.5px; width: 100%; }
.tableau th, .tableau td { text-align: left; padding: 6px 12px 6px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tableau th { color: var(--muted); font-weight: 600; }

/* Full width for pages in columns (Publications, Chiffres, Mails); other pages keep 1100px */
.contenu.contenu-large { max-width: none; }

/* Publications (validated mock docs/maquettes/publications-maquette.html) */
.vue-choix { display: inline-flex; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: var(--panel); }
.vue-choix a, .vue-choix button { border: 0; background: none; padding: 8px 14px; font-size: 14px; color: var(--muted); min-height: 38px; text-decoration: none; display: inline-flex; align-items: center; }
.vue-choix [aria-current="page"], .vue-choix [aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.barre-vue { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.barre-vue form { margin-left: auto; }
.deux-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.planning-col, .fil-col { min-width: 0; }
.deux-col > div > .card:last-child { margin-bottom: 0; }
/* Width of the page itself, not of the window: the Discussion panel takes room when open */
.deux-col-boite { container-type: inline-size; }
@container (min-width: 800px) {
  .deux-col { grid-template-columns: minmax(0, 800px) minmax(360px, 1fr); }
  .fil-col { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow: auto; }
}
@container (min-width: 1300px) {
  .fil-col { position: static; max-height: none; overflow: visible; }
  .fil-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; align-items: start; }
  .fil-posts > .post { margin-bottom: 0; }
  .fil-col .ig-grille { grid-template-columns: repeat(5, 1fr); }
}
.bascule-mobile { display: none; }
@container (max-width: 799px) {
  .bascule-mobile { display: inline-flex; }
  .deux-col[data-mobile="planning"] .fil-col, .deux-col[data-mobile="fil"] .planning-col { display: none; }
}
.pub-vignette { flex: none; width: 52px; height: 52px; border-radius: 9px; overflow: hidden; background: var(--panel2); display: grid; place-items: center; color: var(--muted); font-weight: 700; }
.pub-vignette img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pubs .pub-ligne { display: grid !important; grid-template-columns: 52px minmax(0, 1fr) auto; grid-template-areas: "v t r" "v t s"; gap: 4px 12px !important; }
.pub-ligne .pub-vignette { grid-area: v; } .pub-ligne .pub-lien { grid-area: t; } .pub-ligne .pub-reseaux { grid-area: r; justify-content: flex-end; } .pub-ligne > .statut { grid-area: s; justify-self: end; align-self: start; white-space: nowrap; }
.pub-ligne:hover .pub-sujet { color: var(--accent); }
@media (max-width: 699px) {
  .pubs .pub-ligne { grid-template-columns: 52px minmax(0, 1fr); grid-template-areas: "v t" "v r" "v s"; }
  .pub-ligne .pub-reseaux { justify-content: flex-start; }
  .pub-ligne > .statut { justify-self: start; }
  .saisons { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory; }
  .saisons li { flex: none; }
  .saison { white-space: nowrap; scroll-snap-align: start; }
}
.statut-a_valider { background: var(--warn-soft); color: var(--warn); }
.fil-tete { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.fil-tete h2 { margin: 0; }
.post { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 12px; background: var(--panel); min-width: 0; }
.post-tete { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: #3b2272; flex: none; font-size: 13px; }
.post-tete .qui { display: grid; line-height: 1.3; min-width: 0; } .post-tete .qui strong { font-size: 14px; } .post-tete .qui span { font-size: 12px; color: var(--muted); }
.post-texte { font-size: 14px; margin: 0 0 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.post-image { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; margin-bottom: 8px; background: var(--panel2); }
.post-sans-image { display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: 10px; margin-bottom: 8px; background: linear-gradient(135deg, var(--accent-soft), var(--panel2)); color: var(--muted); font-size: 13px; }
.post-stats { display: flex; gap: 14px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; flex-wrap: wrap; align-items: center; }
.post-stats .nouveau { color: var(--accent); font-weight: 650; }
.post details > summary { cursor: pointer; color: var(--accent); font-size: 13px; margin-top: 8px; }
.coms { margin-top: 10px; display: grid; gap: 8px; }
.com { background: var(--panel2); border-radius: 10px; padding: 8px 10px; font-size: 14px; overflow-wrap: anywhere; }
.com strong { font-size: 13px; } .com .quand { font-size: 12px; color: var(--muted); margin-left: 6px; }
.com.reponse { margin-left: 22px; background: var(--accent-soft); }
.com form { display: grid; gap: 6px; margin-top: 6px; }
.com input[type=text] { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; background: var(--panel); font-size: 14px; }
.com form .btn { justify-self: start; }
.hors-oblik { font-size: 11px; background: var(--panel2); color: var(--muted); border-radius: 6px; padding: 0 6px; margin-left: auto; white-space: nowrap; }
.reseau-onglets { display: flex; gap: 6px; flex-wrap: wrap; }
.reseau-onglets a { border: 1px solid var(--line); background: var(--panel); border-radius: 20px; padding: 6px 14px; font-size: 14px; color: var(--muted); text-decoration: none; }
.reseau-onglets a[aria-current="page"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.compte-tete { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.compte-tete .avatar { width: 48px; height: 48px; font-size: 17px; }
.kpis { display: flex; gap: 18px; flex-wrap: wrap; margin-left: auto; align-items: center; }
.kpi { display: grid; line-height: 1.2; } .kpi strong { font-size: 18px; } .kpi span { font-size: 12px; color: var(--muted); }
.ig-grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin-bottom: 10px; }
.ig-grille a { display: block; aspect-ratio: 1; background: var(--panel2); overflow: hidden; text-decoration: none; }
.ig-grille img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ig-grille .ig-vide { display: grid; place-items: center; width: 100%; height: 100%; font-size: 12px; color: var(--muted); padding: 6px; text-align: center; }
.pub-texte-edit { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--panel); min-height: 160px; margin-bottom: 12px; resize: vertical; font: inherit; color: inherit; }
.prog-champ { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.prog-champ input { min-height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; background: var(--panel); color: var(--text); }
.suivi-compte { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.suivi-compte .chiffres { margin-left: auto; font-size: 13px; color: var(--muted); }
.pub-boutons { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- Assistant pilote (lot B): quota, conversation menu, action cards, preview layer ---- */
.quota-ia { margin: 0 auto; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.quota-ia:not([hidden]) + .topbar-actions { margin-left: 0; }
/* Compact copy next to the Discussion "Envoyer" button, visible on mobile too */
.quota-ia.quota-saisie { margin: 0; align-self: center; flex: none; font-size: 12.5px; max-width: 45%; }
.quota-ok { color: var(--text); }
.quota-attention { color: var(--warn); font-weight: 650; }
.quota-alerte { color: var(--bad); font-weight: 700; }
@media (max-width: 699px) { .quota-ia:not(.quota-saisie) { display: none; } }

.conv-menu { position: relative; flex: 1; min-width: 0; }
.conv-bouton { width: 100%; display: flex; align-items: center; gap: 6px; text-align: left; color: var(--text); }
.conv-titre { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-liste { position: absolute; z-index: 40; top: calc(100% + 4px); left: 0; right: -96px; max-height: 60vh; overflow-y: auto; list-style: none; margin: 0; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.conv-liste li { display: flex; align-items: center; gap: 4px; border-radius: 8px; }
.conv-liste li[aria-current="true"] { background: var(--accent-soft); }
.conv-liste li:hover { background: var(--panel2); }
.conv-choix { flex: 1; min-width: 0; display: grid; gap: 1px; text-align: left; border: 0; background: none; padding: 7px 9px; color: var(--text); }
.conv-choix span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-supprimer { opacity: .55; }
.conv-liste li:hover .conv-supprimer, .conv-supprimer:focus-visible { opacity: 1; color: var(--bad); }

.lu-outil { justify-self: start; margin: 0 0 -4px; font-size: 12.5px; color: var(--ok); }
.lu-outil::before { content: "● "; }
.carte-action { justify-self: start; max-width: 92%; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; border: 1px dashed var(--accent); border-radius: 12px; background: var(--accent-soft); font-size: 14px; }
.carte-action.carte-appliquee { border-style: solid; border-color: var(--line); background: var(--panel2); }
.carte-action.carte-refusee { opacity: .7; border-color: var(--line); background: none; }
.carte-action.carte-echec { border-color: var(--bad); background: var(--bad-soft); }
.carte-texte { min-width: 0; overflow-wrap: anywhere; }
.carte-mail { flex-basis: 100%; min-width: 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.carte-boutons { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.carte-etat { color: var(--muted); }
.fil .carte-action, .fil .lu-outil { margin-left: 0; }

.calque-apercu { position: fixed; inset: 0; z-index: 35; display: flex; flex-direction: column; background: var(--bg); }
.calque-apercu[hidden] { display: none; }
.apercu-tete { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.apercu-titre { color: var(--muted); }
.apercu-titre strong { color: var(--text); }
.apercu-pastilles { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.apercu-fermer { margin-left: 0; }
.apercu-pastilles:empty + .apercu-fermer { margin-left: auto; }
.pastille-action { border: 1px solid var(--line); background: var(--panel); border-radius: 20px; padding: 3px 11px; font-size: 13px; color: var(--muted); }
.pastille-action[aria-current="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.apercu-contenu { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.apercu-contenu > .job-attente, .apercu-contenu > .flash { margin: 20px; }
.apercu-corps { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.apercu-defile { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 16px 24px; display: grid; gap: 14px; align-content: start; }
.apercu-defile > * { max-width: 860px; width: 100%; margin-left: auto; margin-right: auto; }
.apercu-pied { display: flex; align-items: center; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--panel); }
.apercu-astuce { margin-right: auto; }
.apercu-etat { margin-right: auto; font-weight: 600; }
.apercu-modifie { margin-block: 0; }
.apercu-texte { white-space: pre-wrap; overflow-wrap: anywhere; }
.apercu-texte ins, .apercu-modifie ins { background: #fff1a8; color: #3d3300; text-decoration: none; border-radius: 3px; padding: 0 1px; }
.apercu-texte del, .apercu-modifie del { color: var(--bad); text-decoration: line-through; }
:root[data-theme="dark"] .apercu-texte ins, :root[data-theme="dark"] .apercu-modifie ins { background: #5a4d00; color: #fff6c2; }
.apercu-posts { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.apercu-post { margin: 0; }
.apercu-post .post-image { width: 100%; border-radius: 10px; display: block; margin: 8px 0; }
.trop-long { color: var(--bad); font-weight: 650; }
.apercu-champs { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--panel); margin-block: 0; }
.apercu-champs legend { font-weight: 600; padding: 0 4px; }
.apercu-grille { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 12px; align-items: center; }
.apercu-grille label, .apercu-grille > span { font-weight: 600; font-size: 14px; }
.apercu-grille input, .apercu-grille select, .apercu-champs input[type=datetime-local] { min-height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; background: var(--bg); color: var(--text); width: 100%; }
.apercu-champs input[type=datetime-local] { width: auto; }
.apercu-fiche { margin-block: 0; }
.mail-recu { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.mail-recu h3 { margin: 0 0 6px; font-size: 18px; }
.mail-recu p.muted { margin: 0; }
.mail-corps { margin-top: 14px; line-height: 1.6; }
.apercu-tache { margin-block: 0; }
.apercu-retour { display: inline-flex; }

@media (min-width: 900px) {
  /* Over the central area only: the side menu and the Discussion panel stay visible */
  .calque-apercu { inset: 65px var(--panneau-col, 0px) 0 var(--menu-col, 220px); z-index: 6; border-left: 1px solid var(--line); box-shadow: 0 0 0 1px var(--line); }
  .apercu-retour { display: none; }
  /* Full Discussion page: conversation on the left, preview on the right */
  .page-discussion .calque-apercu { left: calc(var(--menu-col, 220px) + (100vw - var(--menu-col, 220px) - var(--panneau-col, 0px)) / 2); }
  :root[data-apercu="ouvert"] .page-discussion .contenu { padding-right: calc((100vw - var(--menu-col, 220px) - var(--panneau-col, 0px)) / 2 + 24px); }
}

/* Mails: list + reading pane (lot C) */
.mails-cadre { display: grid; gap: 14px; align-items: start; }
.mails-liste > .card, .mails-liste > details.card { margin-bottom: 12px; }
.mails-volet { min-width: 0; }
.mails-liste .onglets { flex-wrap: wrap; }
.mails-liste .onglets a { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.mails-vide { display: none; }
.mails-charge .mails-volet { opacity: .6; transition: opacity .15s; }
.mail-ligne.courant { background: var(--accent-soft); border-radius: 10px; margin: 0 -8px; padding-left: 8px !important; padding-right: 8px !important; }
.volet-tete { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.volet-tete h2 { margin: 0; font-size: 20px; }
.mail-ouvert .mail-texte { max-height: none; }
.mail-ligne.non-lu .mail-sujet { font-weight: 700; }
.mail-html { display: block; width: 100%; min-height: 120px; height: 60vh; border: 0; border-radius: 10px; background: #fff; margin: 8px 0 0; }
.mail-images { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 8px 0 0; }
.mail-version-texte { margin-top: 8px; }
.mail-version-texte summary { color: var(--muted); font-size: 14px; }
.mail-reponse h2 { flex-wrap: wrap; }
@media (max-width: 899.98px) {
  .mails-cadre.mails-ouvert .mails-liste, .mails-cadre.mails-ouvert ~ * { display: none; }
  .mails-cadre:not(.mails-ouvert) .mails-volet { display: none; }
  .contenu-mails:has(.mails-ouvert) .mails-head, .contenu-mails:has(.mails-ouvert) > .intro { display: none; }
}
@media (min-width: 900px) {
  .mails-cadre { grid-template-columns: clamp(340px, 30vw, 440px) minmax(0, 1fr); }
  .mails-liste { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow-y: auto; overflow-x: hidden; padding-right: 4px; }
  .volet-retour { display: none; }
  .mails-vide { display: grid; place-content: center; text-align: center; min-height: 40vh; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); padding: 24px; }
  .mails-volet > * { max-width: 1100px; }
}

/* Mail editor (Quill 2) */
.apercu-mail .mail-recu { display: grid; gap: 4px; }
.editeur { position: relative; margin-top: 12px; }
.editeur .ql-toolbar.ql-snow { border: 1px solid var(--line); border-radius: 10px 10px 0 0; background: var(--panel2); font-family: inherit; }
.editeur .ql-container.ql-snow { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 10px 10px; font: inherit; font-size: 15px; background: var(--panel); color: var(--text); }
.editeur .ql-container.ql-snow { height: auto; }
.editeur .ql-editor { height: auto; min-height: 180px; max-height: 60vh; overflow-y: auto; line-height: 1.6; }
@media (max-width: 699px) { .editeur .ql-editor { max-height: 50vh; } }
.editeur .ql-editor img { max-width: 100%; height: auto; border-radius: 6px; }
.editeur .ql-editor.ql-blank::before { color: var(--muted); font-style: normal; }
.editeur-signature .ql-editor { min-height: 110px; }
:root[data-theme="dark"] .editeur .ql-snow .ql-stroke { stroke: var(--text); }
:root[data-theme="dark"] .editeur .ql-snow .ql-fill { fill: var(--text); }
:root[data-theme="dark"] .editeur .ql-snow .ql-picker { color: var(--text); }
:root[data-theme="dark"] .editeur .ql-snow .ql-picker-options, :root[data-theme="dark"] .editeur .ql-snow .ql-tooltip { background: var(--panel); color: var(--text); border-color: var(--line); box-shadow: none; }
.editeur-occupe .ql-container { opacity: .55; }
.editeur-verrou { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); margin: 0; padding: 8px 14px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; gap: 8px; align-items: center; font-weight: 600; }
.editeur-verrou[hidden] { display: none; }
.editeur-modif { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; background: var(--warn-soft); color: var(--text); border-radius: 10px; padding: 8px 12px; margin-top: 10px; font-size: 14px; }
.editeur-modif details { flex-basis: 100%; }
.apercu-diff { white-space: pre-wrap; background: var(--panel); border-radius: 8px; padding: 8px 10px; margin-top: 6px; font-size: 14px; }
.editeur-outils { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 10px; }
.editeur-joindre { cursor: pointer; }
.mail-signature { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 14px; color: var(--muted); }
.mail-signature p { margin: 0 0 4px; }
.mail-signature img, .signature-logo { max-height: 70px; width: auto; }
.mail-corps p { margin: 0 0 12px; }
.mail-corps img { max-width: 100%; height: auto; }
.mail-corps-cadre { background: var(--panel2); border-radius: 10px; padding: 12px 14px; margin: 0 0 10px; }
.pieces-mail { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pieces-mail:empty { display: none; }
.pieces-mail li { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel2); border-radius: 10px; padding: 3px 4px 3px 10px; font-size: 13px; }
.apercu-signature-choix { display: flex; gap: 10px; align-items: center; }
.apercu-envoi { font-weight: 650; margin-right: auto; }
/* "Reply" block (mail, prospect follow-up, comment): two clear choices, the assistant panel on demand */
.reponse-choix .choix-reponse { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 10px; }
.choix-reponse .choix { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); font-weight: 650; text-align: center; }
.choix-reponse .choix:hover { background: var(--panel2); border-color: var(--accent); }
.choix-reponse .choix[aria-expanded="true"] { border-color: var(--accent); background: var(--accent-soft); }
.reponse-choix .panneau-consigne { display: grid; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--panel2); }
.reponse-choix .panneau-consigne[hidden] { display: none; }
.reponse-choix textarea { width: 100%; border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 10px 12px; line-height: 1.5; resize: vertical; }
.reponse-choix .pieces-consigne { display: grid; gap: 6px; }
.reponse-choix .pieces-consigne p { margin: 0; }
.puces-consigne { display: flex; flex-wrap: wrap; gap: 6px; }
.puces-consigne .puce { border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 20px; padding: 6px 12px; min-height: 36px; font-size: 14px; }
.puces-consigne .puce:hover { border-color: var(--accent); }
.reponse-choix.compacte { display: grid; gap: 8px; margin-top: 8px; }
.reponse-choix.compacte .choix { min-height: 44px; font-size: 14px; padding: 8px 10px; }
.reponse-choix.compacte .champ { display: grid; gap: 4px; }
.reponse-choix.compacte label { font-weight: 600; font-size: 13.5px; }

/* Online setup guide (/aide) */
.guide-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 900px) { .guide-liste { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.guide-carte { display: flex; gap: 14px; align-items: flex-start; margin: 0; text-decoration: none; color: inherit; height: 100%; }
.guide-carte:hover { border-color: var(--accent); }
.guide-carte > span:last-child { display: grid; gap: 2px; }
.guide-num { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.guide-fil { margin: 0 0 4px; }
.guide-texte { max-width: 760px; }
.guide-texte h2 { margin-top: 18px; }
.guide-texte p, .guide-texte li { line-height: 1.6; }
.guide-nav { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; max-width: 760px; margin-top: 14px; }

/* Mails being sent: countdown tiles side by side, centred at the bottom of every page */
.envois { position: fixed; z-index: 32; left: 50%; transform: translateX(-50%); bottom: calc(var(--menu-h) + env(safe-area-inset-bottom) + 8px); display: flex; gap: 8px; max-width: calc(100vw - 16px); overflow-x: auto; scrollbar-width: none; padding: 2px; pointer-events: none; }
.envois:empty { display: none; }
.calque-apercu:not([hidden]) ~ .envois { display: none; }
.envoi { pointer-events: auto; flex: none; display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 12px; border: 1px solid var(--accent); border-radius: 999px; background: var(--panel); color: var(--text); box-shadow: 0 2px 10px rgba(0,0,0,.14); font-size: 14px; white-space: nowrap; }
.envoi-reste { font-variant-numeric: tabular-nums; color: var(--muted); }
.envoi-bouton { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--panel2); color: var(--text); font-size: 14px; line-height: 1; }
.envoi-bouton:hover { background: var(--accent-soft); }
.envoi-bouton:disabled { opacity: .6; cursor: wait; }
.envoi-ok { border-color: var(--ok); background: var(--ok-soft); }
.envoi-ok .envoi-reste { color: var(--ok); font-weight: 600; }
.envoi-echec { border-color: var(--bad); background: var(--bad-soft); }
.envoi-echec .envoi-reste a { color: var(--bad); font-weight: 600; }
.envoi-ok .envoi-bouton { display: none; }
@media (max-width: 899px) { :root[data-panneau="ouvert"] .envois { top: 62px; bottom: auto; } }
@media (min-width: 900px) { .envois { bottom: 16px; left: calc(50% + var(--menu-col, 220px) / 2 - var(--panneau-col, 0px) / 2); max-width: calc(100vw - var(--menu-col, 220px) - var(--panneau-col, 0px) - 24px); } }

/* Module "Site": changes of the customer's site (preview layer and Site page) */
.apercu-site .site-changement { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.apercu-site details summary { cursor: pointer; color: var(--muted); }
.site-code { white-space: pre-wrap; word-break: break-word; font-size: .8rem; max-height: 260px; overflow: auto; background: var(--panel2); padding: 8px; border-radius: 8px; }
.site-cadre { width: 100%; height: 420px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.liste-site { list-style: none; margin: 0; padding: 0; }
.liste-site li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.liste-site li:first-child { border-top: 0; }
.liste-site li > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.liste-site a { word-break: break-all; }
@media (max-width: 640px) { .site-cadre { height: 320px; } .liste-site li { flex-direction: column; align-items: flex-start; } }

/* Choice of the accounts found at the end of a connection */
.choix-liste { list-style: none; margin: 6px 0 12px; padding: 0; }
.choix-liste > li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.choix-liste > li:last-child { border-bottom: 0; }
.choix-lies { list-style: none; margin: 6px 0 0; padding: 0 0 0 30px; }
.choix-lies li { padding: 4px 0; }
.choix-compte { align-items: flex-start !important; flex-wrap: nowrap; min-height: 32px; }
.choix-texte { line-height: 1.5; }
.choix-compte input[type=checkbox] { margin-top: 2px; flex: none; }
.choix-comptes .petit-texte { font-size: 13px; }

/* "Agence" module: brands */
.marque-logo { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--marque-couleur, var(--accent)); color: #fff; font-size: 13px; font-weight: 700; overflow: hidden; vertical-align: middle; }
.marque-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.marque-logo.grand { width: 56px; height: 56px; font-size: 18px; border-radius: 14px; }
.marque-logo.toutes { background: var(--muted); }
/* Brand switcher (<details>): one compact control at the top of the publication screens */
.selecteur-marque { position: relative; margin: 0 0 14px; max-width: 560px; }
.selecteur-marque > summary { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 12px; border: 1px solid var(--line); border-left: 6px solid var(--marque-couleur, var(--accent)); border-radius: 12px; background: var(--panel); cursor: pointer; list-style: none; }
.selecteur-marque > summary::-webkit-details-marker { display: none; }
.selecteur-marque > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.selecteur-marque .sm-titre { flex: 1; min-width: 0; line-height: 1.35; }
.selecteur-marque .sm-libelle { color: var(--muted); font-size: 14px; }
.selecteur-marque .sm-fleche { margin-left: auto; font-size: 14px; color: var(--muted); transition: transform .15s; }
.selecteur-marque[open] .sm-fleche { transform: rotate(180deg); }
.selecteur-marque.a-choisir > summary { border-color: var(--accent); border-left-color: var(--accent); background: var(--accent-soft); }
.selecteur-marque.a-choisir .sm-nom { color: var(--accent); }
.sm-liste { margin-top: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: 0 8px 24px rgba(0, 0, 0, .12); }
.sm-liste ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.sm-liste form { margin: 0; }
.sm-choix { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 8px 10px; border: 1px solid transparent; border-radius: 10px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.sm-choix:hover:not([disabled]), .sm-choix:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.sm-choix.actif { border-color: var(--line); background: var(--panel2); }
.sm-choix[disabled] { cursor: not-allowed; opacity: .6; }
.sm-texte, .marque-ligne { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sm-nom { font-weight: 650; }
.sm-sous { font-size: 12px; color: var(--muted); }
.sm-comptes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.sm-pied { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 6px 4px 2px; font-size: 14px; }
.btn.desactive { opacity: .5; cursor: not-allowed; filter: none; }
.recap-marque { margin: 8px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); }
.recap-marque.sans-marque { background: var(--panel2); color: var(--warn); }
.liste.marques li, .liste.sans-marque li { align-items: center; }
.liste.marques li .r { margin-left: auto; }
.liste.sans-marque .actions { margin-left: auto; align-items: center; }
.liste.sans-marque select { width: auto; max-width: 180px; }
.nouvelle-marque { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.nouvelle-marque input[type=text] { flex: 1 1 200px; width: auto; }
.nouvelle-marque label { margin: 0; font-weight: 650; flex-basis: 100%; }
h1 .marque-logo { margin-right: 6px; }
.connecteurs .aide-meta { flex-basis: 100%; margin: 4px 0 0; font-size: 13px; }
