/* CRM LoirePixel : refonte visuelle alignée sur loirepixel.fr. Mode clair, desktop uniquement (largeur mini 1280 px), unités en px. */
@font-face { font-family: 'Figtree'; font-weight: 400; font-display: swap; src: url(/fonts/figtree-400.woff2) format('woff2'); }
@font-face { font-family: 'Figtree'; font-weight: 500; font-display: swap; src: url(/fonts/figtree-500.woff2) format('woff2'); }
@font-face { font-family: 'Figtree'; font-weight: 600; font-display: swap; src: url(/fonts/figtree-600.woff2) format('woff2'); }
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 200 800; font-display: swap; src: url(/fonts/bricolage-grotesque.woff2) format('woff2'); }

:root {
  --marine: #14264a;
  --rouge: #e33b26;
  --rouge-fonce: #c7301d;
  --corail: #ff9a8a;
  --texte: #3d4a63;
  --discret: #5f6b82;
  --fond: #edf2f9;
  --fond-clair: #f7f9fc;
  --carte: #ffffff;
  --bord: #edf2f9;
  --bord-fort: #c9d3e6;
  --ligne: #dde5f0;
  --jaune: #ffc83d;
  --vert: #1f8f5f;
  --vert-clair: #e3f5ec;
  --alerte-clair: #fff1ee;
  --titre: 'Bricolage Grotesque', 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-width: 320px;
  background: var(--fond);
  color: var(--marine);
  font-family: 'Figtree', system-ui, 'Segoe UI', Arial, sans-serif;
  font-size: 15px;
  line-height: 22px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--rouge-fonce); text-decoration: none; }
a:hover { color: var(--marine); text-decoration: none; }
:focus-visible { outline: 2px solid var(--rouge); outline-offset: 3px; }
h1, h2, h3, h4 { color: var(--marine); margin: 0; line-height: 1.15; font-family: var(--titre); }
h1 { font-size: 48px; font-weight: 750; line-height: 1; letter-spacing: -0.04em; }
h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 14px; }
h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 8px; }
.discret { color: var(--discret); }
.petit { font-size: 13px; line-height: 18px; }
.droite { text-align: right; }
p { margin: 0 0 8px; }

/* ---- En-tête du site (menu horizontal) ---- */
.site-entete { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--ligne); }
.site-entete .barre { max-width: 1400px; margin: 0 auto; padding: 0 24px; height: 72px; display: flex; align-items: center; gap: 16px; }
.site-entete .marque { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.site-entete .marque img { height: 32px; width: auto; display: block; }
.site-entete .pastille-crm { font-family: var(--titre); font-weight: 700; font-size: 14px; color: var(--rouge-fonce); background: var(--alerte-clair); border-radius: 999px; padding: 2px 10px; }
.site-entete nav { display: flex; align-items: center; gap: 0; flex: 1; min-width: 0; }
.site-entete nav a { white-space: nowrap; color: var(--marine); font-size: 14px; padding: 8px 10px; border-radius: 999px; }
.site-entete nav a:hover { color: var(--rouge-fonce); }
.site-entete nav a.actif { background: var(--alerte-clair); color: var(--rouge-fonce); font-weight: 600; }
.site-entete .droite-barre { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.bouton-rond { width: 38px; height: 38px; border-radius: 999px; background: var(--fond); display: flex; align-items: center; justify-content: center; color: var(--discret); }
.bouton-rond:hover { background: var(--ligne); color: var(--marine); }
.loupe { width: 12px; height: 12px; border: 2px solid currentColor; border-radius: 999px; position: relative; display: block; }
.loupe::after { content: ''; position: absolute; width: 2px; height: 6px; background: currentColor; right: -4px; bottom: -6px; transform: rotate(-45deg); border-radius: 2px; }
details.profil { position: relative; }
details.profil > summary { list-style: none; cursor: pointer; width: 38px; height: 38px; border-radius: 999px; background: var(--marine); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; }
details.profil > summary::-webkit-details-marker { display: none; }
details.profil .menu-profil { position: absolute; right: 0; top: 48px; width: 240px; background: #fff; border-radius: 16px; padding: 14px 16px; box-shadow: 0 12px 32px rgba(20, 38, 74, .18); font-size: 13px; color: var(--discret); }
details.profil .menu-profil button { margin-top: 10px; }
.bandeau-chrono { background: var(--marine); color: #fff; }
.bandeau-chrono .corps { max-width: 1400px; margin: 0 auto; padding: 8px 24px; display: flex; align-items: center; gap: 14px; font-size: 14px; }
.bandeau-chrono .point { width: 9px; height: 9px; border-radius: 999px; background: var(--rouge); animation: pulse 1.4s infinite; }
.bandeau-chrono .heure { font-variant-numeric: tabular-nums; font-weight: 600; }
.bandeau-chrono a { color: #fff; text-decoration: underline; }
.bandeau-chrono form { margin-left: auto; }
.bandeau-chrono button { background: var(--rouge); color: #fff; border: 0; border-radius: 999px; padding: 4px 14px; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.bandeau-chrono button:hover { background: var(--rouge-fonce); }

/* ---- Structure ---- */
.contenu { max-width: 1400px; margin: 0 auto; padding: 40px 32px 80px; }
.entete { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; gap: 24px; }
.entete .actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.surtitre { font-size: 16px; color: var(--rouge-fonce); font-weight: 500; margin: 0 0 8px; }
.sous-titre { font-size: 17px; color: var(--texte); margin: 8px 0 0; }

/* ---- Cartes et grilles ---- */
.carte { background: var(--carte); border-radius: 24px; padding: 28px; margin-bottom: 24px; }
.carte[style*="padding:0"] { overflow: hidden; }
.carte > h2:first-child, .carte > h3:first-child { margin-top: 0; }
.carte.marine { background: var(--marine); color: #fff; }
.carte.marine h2, .carte.marine h3, .carte.marine .chiffre { color: #fff; }
.carte.marine .discret { color: #c9d3e6; }
.carte.marine a { color: var(--corail); }
.grille { display: grid; gap: 24px; align-items: start; }
.grille > .carte { margin-bottom: 0; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: 1fr 1fr 1fr; }
.g23 { grid-template-columns: 2fr 1fr; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.chiffre { font-family: var(--titre); font-size: 40px; font-weight: 750; letter-spacing: -0.04em; color: var(--marine); line-height: 44px; font-variant-numeric: tabular-nums; }
.vide { color: var(--discret); font-style: italic; padding: 8px 0; }
.rubrique { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.rubrique h2 { margin: 0; }

/* ---- Tableaux ---- */
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 14px 16px; border-top: 1px solid var(--bord); vertical-align: top; }
thead tr:first-child th { border-top: 0; }
th { font-size: 13px; color: var(--discret); font-weight: 500; white-space: nowrap; background: var(--fond-clair); }
th a { color: inherit; }
tr:hover td { background: var(--fond-clair); }
td.nowrap { white-space: nowrap; }
.table-scroll { overflow-x: auto; }
.carte table td:first-child, .carte table th:first-child { padding-left: 24px; }
.carte table td:last-child, .carte table th:last-child { padding-right: 24px; }

/* ---- Boutons ---- */
.btn, button.btn {
  display: inline-block; background: var(--rouge); color: #fff; border: 1.5px solid var(--rouge); border-radius: 999px; padding: 10px 20px;
  font: inherit; font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap; line-height: 20px;
}
.btn:hover { background: var(--rouge-fonce); border-color: var(--rouge-fonce); text-decoration: none; color: #fff; }
.btn.sec { background: #fff; color: var(--marine); border: 1.5px solid var(--marine); }
.btn.sec:hover { background: var(--marine); color: #fff; }
.btn.danger { background: #fff; color: var(--rouge-fonce); border: 1.5px solid #f5c3ba; }
.btn.danger:hover { background: var(--alerte-clair); border-color: var(--rouge); color: var(--rouge-fonce); }
.btn.mini { padding: 3px 12px; font-size: 13px; line-height: 18px; border-width: 1px; }
.btn.vert { background: var(--vert); border-color: var(--vert); }
.btn.vert:hover { background: #17724b; border-color: #17724b; }

/* ---- Sélecteurs de vue (liste / kanban / calendrier) ---- */
.segment { display: flex; background: #fff; border-radius: 999px; padding: 4px; gap: 2px; }
.segment a { padding: 8px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--marine); }
.segment a:hover { color: var(--rouge-fonce); }
.segment a.actif { background: var(--marine); color: #fff; }
.puces { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.puce { border: 1px solid var(--ligne); background: #fff; color: var(--marine); border-radius: 999px; padding: 6px 14px; font-size: 14px; }
.puce:hover { border-color: var(--rouge); color: var(--rouge-fonce); }
.puce.actif { background: var(--marine); border-color: var(--marine); color: #fff; }

/* ---- Formulaires ---- */
label { display: block; font-size: 14px; font-weight: 500; color: var(--marine); margin-bottom: 6px; }
input[type=text], input[type=number], input[type=date], input[type=datetime-local], input[type=time], input[type=email], input[type=file], select, textarea {
  width: 100%; border: 1.5px solid var(--bord-fort); border-radius: 14px; padding: 9px 14px; font: inherit; color: var(--marine); background: #fff;
}
select { padding-right: 10px; }
textarea { min-height: 84px; resize: vertical; }
textarea.markdown, textarea.grand { min-height: 360px; font-family: Consolas, 'Courier New', monospace; font-size: 13px; line-height: 20px; background: var(--fond-clair); border: 0; border-radius: 16px; padding: 18px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--rouge); outline-offset: 0; border-color: var(--rouge); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; vertical-align: middle; accent-color: var(--rouge); }
.champs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 20px; }
.champs .large { grid-column: span 3; }
.champs .moitie { grid-column: span 2; }
.champs.c2 { grid-template-columns: repeat(2, 1fr); }
.champs.c2 .large { grid-column: span 2; }
.barre-form { margin-top: 18px; display: flex; gap: 10px; align-items: center; }
.filtres { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 20px; background: #fff; border-radius: 20px; padding: 16px 20px; }
.filtres > div { min-width: 150px; }
.filtres label { font-size: 13px; color: var(--discret); margin-bottom: 4px; }

/* ---- Étiquettes ---- */
.badge { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; background: var(--fond); color: var(--marine); white-space: nowrap; line-height: 18px; }
.badge.rouge { background: var(--alerte-clair); color: var(--rouge-fonce); }
.badge.vert { background: var(--vert-clair); color: var(--vert); }
.badge.jaune { background: #fff6dc; color: #8a6200; }
.badge.marine { background: var(--marine); color: #fff; }
/* Petits logos des réseaux sociaux */
.liens-rs { display: inline-flex; gap: 8px; align-items: center; vertical-align: middle; }
.liens-rs a { display: inline-flex; line-height: 0; border-radius: 6px; transition: transform .12s; }
.liens-rs a:hover { transform: translateY(-2px); }
.liens-rs img { display: block; }
/* Liste déroulante en forme de pastille : on clique sur le statut et on choisit le suivant */
select.select-inline { width: auto; min-width: 0; border: 0; border-radius: 999px; padding: 3px 26px 3px 12px; font-size: 12px; font-weight: 600; line-height: 18px; cursor: pointer; background-color: var(--fond); color: var(--marine); }
select.select-inline.jaune { background-color: #fff6dc; color: #8a6200; }
select.select-inline.vert { background-color: var(--vert-clair); color: var(--vert); }
select.select-inline.discret-pastille { background-color: transparent; font-weight: 400; color: inherit; border: 1px dashed transparent; }
select.select-inline.discret-pastille:hover { border-color: #c9d3e6; }
select.select-inline.suivi { min-width: 56px; text-align: center; }
select.select-inline.suivi[data-v="site"], select.select-inline.suivi[data-v="maps"] { background-color: #ffa500; color: #fff; }
select.select-inline.suivi[data-v="tout"] { background-color: var(--vert); color: #fff; }
tr.tranche td { background: var(--fond); font-style: italic; font-weight: 600; color: var(--marine); text-align: center; }
select.select-inline.enregistre { box-shadow: 0 0 0 2px var(--vert); }
select.select-inline:disabled { opacity: .6; cursor: wait; }

/* ---- Messages ---- */
/* Notification : pastille fixe en haut à droite, visible même sous une fenêtre ou en bas de page ; disparaît seule (app.js), un clic la ferme */
.flash { position: fixed; top: 88px; right: 24px; z-index: 3000; max-width: 460px; background: var(--vert-clair); color: var(--vert); padding: 16px 22px; border-radius: 16px; font-weight: 600; box-shadow: 0 8px 28px rgba(20, 38, 74, .22); border: 1px solid var(--vert); cursor: pointer; transition: opacity .4s, transform .4s; }
.flash.rouge { background: var(--alerte-clair); color: var(--rouge-fonce); border-color: var(--rouge-fonce); }
.flash.masque { opacity: 0; transform: translateY(-8px); pointer-events: none; }
.flash span { font-weight: 800; margin-right: 4px; }
.erreur { background: var(--alerte-clair); color: var(--rouge-fonce); padding: 14px 20px; border-radius: 16px; margin-bottom: 24px; }

/* ---- Onglets (pastilles) ---- */
.onglets { display: flex; gap: 4px; margin-bottom: 24px; flex-wrap: wrap; }
.onglets a { padding: 8px 16px; border-radius: 999px; color: var(--marine); font-weight: 500; }
.onglets a:hover { color: var(--rouge-fonce); }
.onglets a.actif { background: var(--alerte-clair); color: var(--rouge-fonce); font-weight: 600; }
.carte .onglets, .fiche-entete .onglets { border-top: 1px solid var(--bord); padding-top: 18px; margin-bottom: 0; margin-top: 4px; }

/* ---- Détails repliables (modifier / ajouter) ---- */
details.ajout { border: 1.5px dashed var(--bord-fort); border-radius: 18px; padding: 12px 20px; margin: 14px 0 20px; background: rgba(255, 255, 255, .6); }
details.ajout > summary { cursor: pointer; font-weight: 600; color: var(--rouge-fonce); }
details.ajout[open] { background: #fff; }
details.ajout[open] > summary { margin-bottom: 16px; }
details.section { border-radius: 24px; background: #fff; margin-bottom: 16px; }
details.section > summary { cursor: pointer; padding: 18px 28px; font-weight: 700; color: var(--marine); font-size: 18px; font-family: var(--titre); letter-spacing: -0.02em; }
details.section > .corps { padding: 0 28px 24px; }

/* ---- Kanban ---- */
.kanban { display: grid; gap: 14px; align-items: start; }
.kanban.k5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kanban.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.colonne { background: #e4ebf6; border-radius: 20px; padding: 14px; min-height: 360px; }
.colonne.survol { outline: 2px dashed var(--rouge); background: #f8dfdb; }
.colonne h3 { display: flex; justify-content: space-between; align-items: center; margin: 0 0 12px; padding: 2px 4px; font-size: 15px; font-weight: 600; }
.colonne h3 .badge { background: transparent; color: var(--discret); font-weight: 500; font-size: 13px; padding: 0; }
.fiche-kb { background: #fff; border-radius: 14px; padding: 14px; margin-bottom: 10px; cursor: grab; box-shadow: 0 1px 0 var(--ligne); display: flex; flex-direction: column; gap: 4px; }
.fiche-kb:active { cursor: grabbing; }
.fiche-kb .titre { font-weight: 600; color: var(--marine); display: block; line-height: 1.3; }
.fiche-kb .titre:hover { color: var(--rouge-fonce); }
.fiche-kb.fait { opacity: .6; }
.fiche-kb br { display: none; }

/* ---- Calendrier ---- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; background: transparent; }
.cal .tete { font-weight: 500; font-size: 13px; padding: 0 8px; color: var(--discret); }
.cal .jour { min-height: 120px; padding: 8px; border-radius: 14px; background: #fff; }
.cal.semaine .jour { min-height: 260px; }
.cal .jour.autre { background: var(--fond-clair); color: var(--bord-fort); }
.cal .jour.auj { background: var(--alerte-clair); }
.cal .num { font-weight: 600; font-size: 13px; margin-bottom: 4px; color: var(--marine); }
.cal .jour.auj .num { color: var(--rouge-fonce); }
.cal .t { display: block; font-size: 12px; line-height: 16px; padding: 3px 7px; margin-bottom: 4px; border-radius: 7px; background: var(--fond); color: var(--marine); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal .t.p0, .cal .t.p1 { background: var(--alerte-clair); color: var(--rouge-fonce); }
.cal .t.fait { text-decoration: line-through; opacity: .6; }
.cal-contenant { background: #fff; border-radius: 24px; padding: 20px; }

/* ---- Divers ---- */
.mono, pre.mono { font-family: Consolas, 'Courier New', monospace; font-size: 13px; }
pre.pack { background: var(--fond-clair); border-radius: 16px; padding: 20px; max-height: 520px; overflow: auto; white-space: pre-wrap; margin: 0; font-family: Consolas, 'Courier New', monospace; font-size: 13px; line-height: 20px; color: var(--texte); }
.apercu-md { background: #fff; border-radius: 16px; padding: 16px 20px; max-height: 520px; overflow: auto; }
.apercu-md h1, .apercu-md h2, .apercu-md h3 { margin: 16px 0 8px; }
.apercu-md h1 { font-size: 26px; letter-spacing: -0.03em; font-weight: 700; line-height: 1.2; }
.apercu-md table { margin: 8px 0; }
.apercu-md code { background: var(--fond); padding: 1px 5px; border-radius: 4px; }
.diff { font-family: Consolas, 'Courier New', monospace; font-size: 13px; line-height: 19px; border-radius: 12px; background: var(--fond-clair); max-height: 420px; overflow: auto; }
.diff div { padding: 0 10px; white-space: pre-wrap; }
.diff .plus { background: var(--vert-clair); color: var(--vert); }
.diff .moins { background: var(--alerte-clair); color: var(--rouge-fonce); }
.secret { font-family: Consolas, 'Courier New', monospace; background: #fff6dc; padding: 1px 8px; border-radius: 6px; }
.puce-rouge { color: var(--rouge-fonce); font-weight: 600; }
.graphique { width: 100%; height: 220px; }

/* ---- Tableau de bord ---- */
.accueil { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.accueil .colonne-a, .accueil .colonne-b { display: flex; flex-direction: column; gap: 24px; }
.accueil .carte { margin-bottom: 0; }
.tache-ligne { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--bord); }
.tache-ligne:first-of-type { border-top: 0; }
.tache-ligne .corps { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tache-ligne .titre { font-weight: 500; font-size: 16px; }
.tache-ligne .meta { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--discret); flex-wrap: wrap; }
.tache-ligne .temps { font-size: 13px; color: var(--discret); width: 56px; text-align: right; }
.case { width: 22px; height: 22px; border-radius: 7px; border: 2px solid #b9c6da; background: #fff; color: #fff; font-size: 13px; line-height: 18px; cursor: pointer; padding: 0; flex-shrink: 0; margin-top: 1px; }
.case.fait { background: var(--vert); border-color: var(--vert); }
.prio { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--discret); white-space: nowrap; }
.prio i { width: 10px; height: 10px; border-radius: 3px; display: block; background: #9fb0cc; }
.prio.p0 i { background: var(--vert); } .prio.p1 i { background: var(--rouge); } .prio.p2 i { background: var(--corail); } .prio.p4 i { background: var(--ligne); }
.bloc-retard { margin-top: 8px; padding: 16px 18px; background: var(--alerte-clair); border-radius: 16px; display: flex; flex-direction: column; gap: 10px; }
.bloc-retard > p { font-weight: 600; color: var(--rouge-fonce); font-size: 14px; margin: 0; }
.bloc-retard .ligne { display: flex; gap: 12px; align-items: center; }
.bloc-retard .ligne span.titre { flex: 1; }
.relances { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.relance { background: var(--fond); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.relance .tete { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.relance .nom { font-weight: 600; font-size: 16px; line-height: 1.3; color: var(--marine); }
.relance .info { font-size: 13px; color: var(--texte); line-height: 1.45; margin: 0; }
.relance .boutons { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: auto; }
.relance .tete { flex-wrap: wrap; }
.relance .nom { min-width: 0; overflow-wrap: anywhere; }
.pixels { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; }
.pixels div { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.pixels .carre { display: block; width: 100%; aspect-ratio: 1; border-radius: 5px; background: rgba(255, 255, 255, .16); }
.pixels .carre.signe { background: var(--rouge); }
.pixels .carre.courant { background: transparent; border: 2px dashed var(--corail); }
.pixels .carre.futur { background: rgba(255, 255, 255, .08); }
.pixels span.mois { font-size: 11px; color: #9fb0cc; }
.leviers-cases { display: flex; gap: 3px; flex-wrap: wrap; }
.leviers-cases i { width: 12px; height: 12px; border-radius: 3px; background: var(--fond); display: block; }
.leviers-cases i.fait { background: var(--rouge); }
.liste-fine > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--bord); }
.liste-fine > div:first-child { border-top: 0; }

/* ---- Fiche entreprise ---- */
.fiche-entete { background: #fff; border-radius: 28px; padding: 32px; margin-bottom: 24px; }
.fiche-entete .haut { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; }
.fiche-entete h1 { font-size: 44px; margin: 6px 0 12px; }
.fiche-entete .formules { display: flex; gap: 8px; flex-wrap: wrap; }
.fiche-entete .formules span { background: var(--fond); border-radius: 999px; padding: 4px 12px; font-size: 14px; }
.fiche-entete .actions { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.fiche-entete .btn { padding: 8px 18px; font-size: 14px; }

/* ---- Tiroir « Noter un échange » ---- */
.tiroir-fond { position: fixed; inset: 0; background: rgba(20, 38, 74, .45); z-index: 100; display: none; justify-content: flex-end; }
.tiroir-fond.ouvert { display: flex; }
.tiroir { width: 520px; max-width: 100%; height: 100%; background: #fff; padding: 36px; display: flex; flex-direction: column; gap: 20px; overflow: auto; }
.tiroir .titre-tiroir { display: flex; justify-content: space-between; align-items: center; }
.tiroir .titre-tiroir h2 { font-size: 30px; font-weight: 750; letter-spacing: -0.04em; margin: 0; }
.tiroir .fermer { border: 0; background: var(--fond); border-radius: 999px; width: 36px; height: 36px; cursor: pointer; font-size: 18px; color: var(--marine); }
.tiroir .canaux { display: flex; gap: 6px; flex-wrap: wrap; }
.tiroir .canaux label { display: inline-block; margin: 0; cursor: pointer; }
.tiroir .canaux input { position: absolute; opacity: 0; pointer-events: none; }
.tiroir .canaux span { display: inline-block; border: 1px solid var(--ligne); background: #fff; color: var(--marine); border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 400; }
.tiroir .canaux input:checked + span { background: var(--marine); border-color: var(--marine); color: #fff; }
.tiroir .canaux input:focus-visible + span { outline: 2px solid var(--rouge); outline-offset: 2px; }
.tiroir .bas { display: flex; gap: 10px; margin-top: auto; }

/* ---- Page de connexion ---- */
.connexion { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--marine); }
.connexion .boite { background: #fff; border-radius: 28px; padding: 44px 48px; width: 440px; text-align: center; }
.connexion .boite img { height: 44px; margin-bottom: 8px; }
.connexion .boite .logo { font-family: var(--titre); font-size: 28px; font-weight: 750; letter-spacing: -0.03em; color: var(--marine); margin-bottom: 8px; }
.connexion .boite .logo span { color: var(--rouge); }

/* ---- Comptabilité ---- */
.m-entree { color: var(--vert); }
.m-sortie { color: var(--rouge-fonce); }
.nombre { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr.total td { font-weight: 700; background: var(--fond-clair); }
tr.ligne-active td { background: #fff6dc; }
.jauge { height: 10px; background: var(--fond); border-radius: 999px; overflow: hidden; margin: 4px 0; }
.jauge span { display: block; height: 100%; border-radius: 999px; background: var(--vert); }
.jauge span.jaune { background: #e0a800; }
.jauge span.rouge { background: var(--rouge); }
tr.ligne-ignoree td { color: var(--discret); background: #fafafa; }
tr.groupe th { background: var(--fond); color: var(--marine); border-top: 2px solid var(--bord-fort); }
.import-table select, .import-table input[type=text] { padding: 4px 8px; font-size: 13px; border-radius: 10px; }
.import-table td { vertical-align: top; }
tr.imp-passer td { opacity: 0.55; }

/* ---- Suivi du temps ---- */
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.3; } 100% { opacity: 1; } }
.chrono-barre { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.chrono-barre > div { min-width: 180px; }
.chrono-barre .grand { flex: 1; min-width: 260px; }
.chrono-actif { font-family: var(--titre); font-size: 44px; font-weight: 750; letter-spacing: -0.03em; color: var(--rouge-fonce); font-variant-numeric: tabular-nums; line-height: 48px; }
.jour-titre { display: flex; justify-content: space-between; padding: 12px 24px; background: var(--fond-clair); font-weight: 600; color: var(--marine); border-top: 1px solid var(--bord); }

/* ---- Réseaux sociaux : calendriers éditoriaux (couleurs des étiquettes reprises de Notion) ---- */
.nc { display: inline-block; border-radius: 999px; padding: 1px 9px; font-size: 12px; font-weight: 600; line-height: 18px; white-space: nowrap; margin: 0 4px 4px 0; }
.nc-red { background: #fde1de; color: #b4281a; } .nc-pink { background: #fbdcef; color: #a1226c; } .nc-orange { background: #fde4cc; color: #9a4d00; }
.nc-brown { background: #eadbd0; color: #6b4226; } .nc-gray { background: #e8eaee; color: #4b5467; } .nc-purple { background: #e9dcf7; color: #5b2a9a; }
.nc-blue { background: #d9e8fb; color: #1b4f9c; } .nc-green { background: #dcf3e4; color: #1f6b45; }
.rs-calendrier:hover { box-shadow: 0 0 0 2px var(--rouge) inset; }
.rs-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.rs-cal .tete { font-size: 13px; color: var(--discret); padding: 0 8px; }
.rs-jour { min-height: 150px; background: var(--fond-clair); border-radius: 14px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.rs-jour.autre { background: transparent; border: 1px dashed var(--ligne); }
.rs-jour.auj { background: var(--alerte-clair); }
.rs-jour.survol { outline: 2px dashed var(--rouge); }
.rs-jour .entete-jour { display: flex; justify-content: space-between; align-items: center; }
.rs-jour .num { font-size: 13px; font-weight: 600; color: var(--marine); }
.rs-jour.autre .num { color: var(--bord-fort); }
.rs-jour .plus { opacity: 0; font-size: 16px; line-height: 16px; width: 20px; height: 20px; text-align: center; border-radius: 999px; background: #fff; color: var(--rouge-fonce); }
.rs-jour:hover .plus { opacity: 1; }
.rs-carte { background: #fff; border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 1px 0 var(--ligne); }
.rs-carte.calendrier { cursor: grab; }
.rs-carte .vignette { display: block; border-radius: 8px; overflow: hidden; background: var(--fond); }
.rs-carte .vignette img { display: block; width: 100%; height: 76px; object-fit: cover; }
.rs-carte.galerie .vignette img { height: 200px; }
.rs-carte .vignette.fichier, .rs-carte .vignette.vide-vignette { height: 76px; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--discret); }
.rs-carte.galerie .vignette.fichier, .rs-carte.galerie .vignette.vide-vignette { height: 200px; }
.rs-carte .titre { font-weight: 600; font-size: 13px; line-height: 17px; color: var(--marine); overflow-wrap: anywhere; }
.rs-carte.galerie .titre { font-size: 15px; line-height: 20px; }
.rs-carte .etiquettes { display: flex; flex-wrap: wrap; }
.rs-carte .etiquettes .nc { font-size: 11px; padding: 0 7px; line-height: 16px; }
.rs-carte .verifs { display: flex; gap: 10px; font-size: 11px; color: var(--discret); }
.rs-carte .verifs .ok { color: var(--vert); font-weight: 600; }
.rs-galerie { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.rs-galerie .rs-carte { padding: 10px; border-radius: 16px; }
.rs-formats { display: flex; flex-wrap: wrap; gap: 4px; }
.rs-formats label.nc { margin: 0; cursor: pointer; font-size: 13px; padding: 4px 12px; opacity: 0.55; }
.rs-formats label.nc:has(input:checked) { opacity: 1; box-shadow: 0 0 0 2px var(--marine) inset; }
.rs-formats input { width: 14px; height: 14px; }
.rs-visuel { margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.rs-visuel img { width: 100%; border-radius: 14px; display: block; }
.site-entete nav .deroulant { position: relative; }
.site-entete nav .deroulant .sous-menu { display: none; position: absolute; left: 0; top: 100%; min-width: 260px; background: #fff; border-radius: 16px; box-shadow: 0 12px 32px rgba(20, 38, 74, .18); padding: 8px; z-index: 60; }
.site-entete nav .deroulant:hover .sous-menu, .site-entete nav .deroulant:focus-within .sous-menu { display: block; }
.site-entete nav .deroulant .sous-menu a { display: block; border-radius: 10px; padding: 8px 12px; }
.site-entete nav .deroulant .sous-menu a:hover { background: var(--fond); }
.site-entete nav .deroulant .sous-menu hr { border: 0; border-top: 1px solid var(--bord); margin: 6px 0; }

/* ---- Tablette et mobile ---- */
@media (max-width: 1279px) {
  .site-entete .barre { flex-wrap: wrap; height: auto; padding: 10px 16px 0; gap: 8px 12px; }
  .site-entete .marque { order: 1; }
  .site-entete .droite-barre { order: 2; margin-left: auto; }
  .site-entete nav { order: 3; flex: 0 0 100%; overflow-x: auto; padding-bottom: 8px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .site-entete nav::-webkit-scrollbar { display: none; }
  .site-entete nav .deroulant .sous-menu { display: none !important; }
  .contenu { padding: 24px 16px 64px; }
  h1 { font-size: 34px; }
  .fiche-entete h1 { font-size: 32px; }
  .g3, .g4, .rs-galerie { grid-template-columns: 1fr 1fr; }
  .relances { grid-template-columns: 1fr 1fr; }
  .accueil { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  body { font-size: 16px; }
  .site-entete .droite-barre .btn { padding: 8px 14px; font-size: 14px; }
  .bandeau-chrono .corps { padding: 8px 16px; flex-wrap: wrap; gap: 6px 12px; }
  .entete { flex-direction: column; align-items: stretch; gap: 14px; margin-bottom: 20px; }
  .carte { padding: 18px; border-radius: 20px; margin-bottom: 16px; }
  .fiche-entete { padding: 20px; border-radius: 22px; }
  .fiche-entete .haut { flex-direction: column; gap: 14px; }
  .fiche-entete .actions { justify-content: flex-start; }
  .grille, .g2, .g3, .g4, .g23, .relances, .champs, .champs.c2, .kanban.k3 { grid-template-columns: 1fr; }
  .champs .large, .champs .moitie, .champs.c2 .large { grid-column: auto; }
  .kanban.k5 { grid-template-columns: repeat(5, 260px); overflow-x: auto; padding-bottom: 8px; }
  .colonne { min-height: 0; }
  .chiffre { font-size: 32px; line-height: 36px; }
  .chrono-actif { font-size: 34px; line-height: 38px; }
  input[type=text], input[type=number], input[type=date], input[type=datetime-local], input[type=time], input[type=email], input[type=file], select, textarea { font-size: 16px; }
  .filtres { padding: 14px; }
  .filtres > div { min-width: 0; flex: 1 1 140px; }
  .segment { overflow-x: auto; max-width: 100%; }
  .segment a { white-space: nowrap; padding: 8px 14px; }
  .onglets { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .onglets a { white-space: nowrap; }
  /* Tableaux : défilement horizontal dans leur carte */
  .carte:has(> table), .carte:has(table) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .carte table { min-width: 640px; }
  th, td { padding: 12px; }
  .carte table td:first-child, .carte table th:first-child { padding-left: 16px; }
  .carte table td:last-child, .carte table th:last-child { padding-right: 16px; }
  .apercu-md table { min-width: 0; }
  /* Calendriers : une colonne par jour, liste verticale */
  .cal { grid-template-columns: repeat(7, 130px); overflow-x: auto; }
  .cal-contenant { overflow-x: auto; padding: 12px; }
  .rs-cal { grid-template-columns: 1fr; }
  .rs-cal .tete, .rs-jour.autre:not(:has(.rs-carte)) { display: none; }
  .rs-jour { min-height: 0; }
  .rs-jour:not(:has(.rs-carte)) { padding: 6px 8px; }
  .rs-jour .plus { opacity: 1; }
  .rs-galerie { grid-template-columns: 1fr; }
  .pixels { gap: 4px; }
  /* Tiroir en plein écran */
  .tiroir { width: 100%; padding: 22px 18px; }
  .tiroir .titre-tiroir h2 { font-size: 24px; }
  .connexion .boite { width: calc(100% - 32px); padding: 32px 24px; }
  details.section > summary { padding: 16px 18px; }
  details.section > .corps { padding: 0 18px 18px; }
  .tache-ligne .temps { width: auto; }
  .tache-ligne { flex-wrap: wrap; }
  .barre-form { flex-wrap: wrap; }
  [style*="min-width:3"], [style*="min-width:2"] { min-width: 0 !important; }
  [style*="width:1"], [style*="width:2"], [style*="width:3"] { max-width: 100%; }
}
@media (max-width: 800px) { [style*="grid-template-columns"] { grid-template-columns: 1fr !important; } }

/* ---- Logos des entreprises ---- */
.logo-e { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; flex-shrink: 0; overflow: hidden; background: var(--fond); color: var(--marine); font-family: var(--titre); font-weight: 700; vertical-align: middle; box-shadow: inset 0 0 0 1px var(--ligne); }
.logo-e img { width: 100%; height: 100%; object-fit: contain; background: #fff; display: block; }
.logo-e.c0 { background: #e3ecfb; } .logo-e.c1 { background: #fde8e4; } .logo-e.c2 { background: #e3f5ec; } .logo-e.c3 { background: #fff1d6; } .logo-e.c4 { background: #ece4f7; } .logo-e.c5 { background: #e4f1f4; }
.nom-logo { display: inline-flex; align-items: center; gap: 10px; }
.fiche-entete .haut .identite { display: flex; gap: 20px; align-items: center; }
.fiche-entete .logo-e { box-shadow: 0 0 0 1px var(--ligne); }
details.logo-modif { display: inline-block; position: relative; }
details.logo-modif > summary { cursor: pointer; font-size: 13px; color: var(--discret); list-style: none; }
details.logo-modif > summary::-webkit-details-marker { display: none; }
details.logo-modif form { margin-top: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---- Refonte de l'ergonomie (octobre 2026) : voyant de santé, accueil en alertes + agenda + solde, menu « Plus » ---- */
.site-entete nav .deroulant .sous-menu a.actif { background: var(--alerte-clair); color: var(--rouge-fonce); font-weight: 600; }
.site-entete nav .deroulant .sous-menu a.sous-lien { padding-left: 28px; font-size: 13px; color: var(--discret); }
details.voyant { position: relative; }
details.voyant > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; border: 1px solid var(--ligne); background: #fff; color: var(--marine); border-radius: 999px; padding: 6px 14px 6px 10px; font-size: 14px; font-weight: 500; white-space: nowrap; }
details.voyant > summary::-webkit-details-marker { display: none; }
details.voyant > summary i { width: 11px; height: 11px; border-radius: 50%; background: var(--vert); box-shadow: 0 0 0 4px var(--vert-clair); }
details.voyant.ko > summary { border-color: var(--rouge); }
details.voyant.ko > summary i { background: var(--rouge); box-shadow: 0 0 0 4px var(--alerte-clair); }
details.voyant .voyant-panneau { position: absolute; right: 0; top: 46px; width: 380px; max-width: 90vw; background: #fff; border-radius: 16px; padding: 14px 16px; box-shadow: 0 12px 32px rgba(20, 38, 74, .18); font-size: 13px; color: var(--texte); z-index: 70; }
details.voyant .voyant-panneau p { margin: 0 0 10px; line-height: 20px; }
details.voyant .voyant-panneau p:last-child { margin-bottom: 0; }
.alertes { border: 1px solid var(--rouge); background: var(--alerte-clair); }
.accueil + .alertes, .alertes { margin-bottom: 24px; }
.alertes h2 { color: var(--rouge-fonce); margin: 0 0 12px; font-size: 20px; }
.alertes ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.alertes li { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.alertes li .texte { flex: 1; min-width: 200px; }
p.rien { display: flex; align-items: center; gap: 10px; margin: 0 0 24px; color: var(--vert); font-weight: 500; }
p.rien .point-vert { width: 10px; height: 10px; border-radius: 50%; background: var(--vert); flex-shrink: 0; }
.actions-rapides { display: flex; gap: 8px; margin: -4px 0 8px; }
#nouvelle-tache { margin: 0 0 8px; }
.type-ligne { align-self: flex-start; min-width: 64px; text-align: center; margin-top: 2px; }
.boutons-ligne { display: flex; gap: 6px; flex-shrink: 0; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.boutons-ligne form { margin: 0; }
.jour-titre { margin: 18px 0 0; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--discret); font-weight: 600; }
.jour-titre:first-of-type { margin-top: 0; }
.solde-mois .valeur { font-family: var(--titre); font-size: 40px; line-height: 1.1; font-weight: 700; margin: 4px 0 0; color: var(--vert); font-variant-numeric: tabular-nums; }
.solde-mois .valeur.neg { color: var(--rouge-fonce); }
.barre-solde { height: 8px; border-radius: 4px; background: var(--ligne); margin-top: 14px; overflow: hidden; display: flex; }
.barre-solde b { background: var(--vert); display: block; }
.barre-solde em { background: var(--rouge); display: block; }
.detail-solde { display: flex; gap: 18px; margin-top: 10px; font-size: 14px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
details.plus-det { background: transparent; border: 1px dashed var(--bord-fort); border-radius: 24px; padding: 14px 22px; }
details.plus-det > summary { cursor: pointer; font-weight: 600; color: var(--marine); }
details.plus-det .plus-contenu { display: flex; flex-direction: column; gap: 24px; margin-top: 18px; }
details.plus-det .plus-contenu .carte { margin-bottom: 0; }

/* ---- Fiche client : résumé permanent et repères « dernière fois » ---- */
.resume-fiche { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 22px 0 14px; }
.resume-carte { display: flex; flex-direction: column; gap: 2px; background: var(--fond-clair); border-radius: 16px; padding: 12px 16px; color: var(--texte); min-width: 0; }
.resume-carte:hover { background: var(--fond); color: var(--texte); }
.resume-carte .lib, .repere .lib { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; color: var(--discret); }
.resume-carte .val { font-weight: 600; color: var(--marine); display: flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.resume-carte .sous { font-size: 13px; color: var(--discret); overflow-wrap: anywhere; }
.pastille { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; background: var(--bord-fort); }
.pastille.vert { background: var(--vert); } .pastille.rouge { background: var(--rouge); } .pastille.gris { background: var(--bord-fort); }
.reperes { margin: 0 0 18px; }
.reperes-titre { margin: 0 0 8px; font-weight: 600; color: var(--marine); font-size: 14px; }
.reperes-titre .discret { font-weight: 400; margin-left: 6px; }
.reperes-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.repere { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--ligne); border-left-width: 5px; border-radius: 14px; padding: 12px 16px; background: #fff; min-width: 0; }
.repere.recent { border-left-color: var(--vert); }
.repere.ancien { border-left-color: var(--jaune); background: #fffaf0; }
.repere.inconnu { border-left-color: var(--bord-fort); }
.repere .val { font-size: 18px; font-weight: 600; color: var(--marine); font-family: var(--titre); }
.repere .sous { font-size: 13px; color: var(--discret); overflow-wrap: anywhere; }
.repere .repere-form { margin: 8px 0 0; }
.repere-autre { margin-top: 6px; font-size: 13px; }
.repere-autre summary { cursor: pointer; color: var(--discret); }
.repere-autre form { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.repere-autre input[type=date] { width: auto; padding: 4px 8px; }
.repere-autre input[type=text] { flex: 1; min-width: 160px; padding: 4px 10px; }

/* ---- Listes : lignes cliquables, colonnes triables ; Réglages en sections repliables ---- */
table.lignes-cliquables tbody tr[data-href] { cursor: pointer; }
table.lignes-cliquables tbody tr[data-href]:hover td { background: var(--fond-clair); }
th a.tri { color: inherit; white-space: nowrap; }
th a.tri:hover, th a.tri.actif { color: var(--rouge-fonce); }
details.reglage { background: var(--carte); border-radius: 24px; margin-bottom: 16px; }
details.reglage > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 20px 28px; flex-wrap: wrap; }
details.reglage > summary::-webkit-details-marker { display: none; }
details.reglage > summary h2 { margin: 0; font-size: 20px; }
details.reglage > summary h2::before { content: '▸'; display: inline-block; width: 22px; color: var(--discret); }
details.reglage[open] > summary h2::before { content: '▾'; }
details.reglage > summary .resume-reglage { color: var(--discret); font-size: 14px; }
details.reglage > .reglage-corps { padding: 0 28px 24px; }

/* ---- Suivi mensuel (fiche client) et factures ---- */
.suivi-mensuel .nav-mois { display: flex; gap: 6px; }
.grille-suivi th.mois-courant { color: var(--rouge-fonce); }
.grille-suivi td { vertical-align: top; }
.livrable-nom { font-weight: 600; color: var(--marine); display: block; }
.case-suivi { border: 1px solid var(--ligne); border-left-width: 5px; border-radius: 12px; padding: 8px 12px; min-width: 170px; background: var(--fond-clair); }
.case-suivi.fait { border-left-color: var(--vert); background: var(--vert-clair); }
.case-suivi.cours { border-left-color: var(--jaune); background: #fff9e8; }
.case-suivi.retard { border-left-color: var(--rouge); background: var(--alerte-clair); }
.case-suivi .compteur { display: flex; align-items: center; gap: 6px; margin: 0; }
.case-suivi .compteur b { min-width: 46px; text-align: center; font-variant-numeric: tabular-nums; color: var(--marine); }
.case-suivi .compteur button { width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 1px solid var(--bord-fort); background: #fff; color: var(--marine); cursor: pointer; line-height: 1; }
.case-suivi .compteur button:disabled { opacity: .35; cursor: default; }
.case-suivi .coche { color: var(--vert); font-weight: 700; margin-left: auto; }
.barre-suivi { height: 5px; background: var(--ligne); border-radius: 3px; margin-top: 6px; overflow: hidden; }
.barre-suivi i { display: block; height: 100%; background: var(--vert); }
.case-suivi.cours .barre-suivi i { background: var(--jaune); }
.detail-suivi { font-size: 12px; color: var(--discret); margin-top: 3px; }
.titre-facture { font-weight: 600; color: var(--marine); }
.obj-suivi { margin-top: 4px; font-size: 12px; }
.obj-suivi summary { cursor: pointer; color: var(--discret); }
.obj-suivi form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.obj-suivi label { display: flex; gap: 4px; align-items: center; margin: 0; font-weight: 400; }
.obj-suivi input[type=number] { width: 64px; padding: 3px 6px; }
.badge.periode { background: var(--fond); color: var(--marine); }
.resume-suivi { display: flex; gap: 8px 18px; flex-wrap: wrap; margin: 0 0 14px; font-size: 14px; }
.resume-suivi .mois { background: var(--fond-clair); border-radius: 12px; padding: 6px 12px; }
.resume-suivi .mois b { color: var(--marine); text-transform: capitalize; }
.resume-suivi .ok { color: var(--vert); font-weight: 600; }
.resume-suivi .retard { color: var(--rouge-fonce); font-weight: 600; }
.synchro-indy { display: flex; gap: 10px 16px; flex-wrap: wrap; align-items: center; justify-content: space-between; background: var(--fond-clair); border-radius: 16px; padding: 12px 18px; margin-bottom: 16px; }
.totaux-factures { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 16px; }
.totaux-factures div { background: var(--fond-clair); border-radius: 14px; padding: 10px 14px; }
.totaux-factures span { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--discret); font-weight: 600; }
.totaux-factures strong { font-family: var(--titre); font-size: 22px; color: var(--marine); }
.totaux-factures .alerte strong { color: var(--rouge-fonce); }

/* ---- Réseaux sociaux : planification (toutes les marques, semaine heure par heure, éditeur avec aperçu par réseau) ---- */
.nc-yellow { background: #fff4d6; color: #7a5600; } .nc-alerte { background: var(--rouge); color: #fff; }
.pl-banniere { background: #fff4d6; border-radius: 20px; padding: 14px 22px; margin-bottom: 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pl-banniere .n { width: 34px; height: 34px; border-radius: 999px; background: var(--jaune); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.pl-banniere p { margin: 0; flex: 1; min-width: 220px; }
.pl-point { width: 10px; height: 10px; border-radius: 999px; display: inline-block; flex-shrink: 0; box-shadow: 0 0 0 2px #fff; }
.puce .pl-point { margin-right: 4px; }
.pl-pastille { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 4px; color: #fff; font-size: 9px; font-weight: 700; line-height: 1; }
.pl-pastille.m { min-width: 22px; height: 22px; border-radius: 6px; font-size: 11px; padding: 0 4px; }
.pl-pastille.g { min-width: 28px; height: 28px; border-radius: 999px; font-size: 12px; padding: 0 4px; }
.pl-barre { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.pl-barre h2 { margin: 0; min-width: 210px; text-align: center; }
.pl-legende { display: flex; flex-wrap: wrap; margin-left: auto; }
.pl-defile { overflow-x: auto; }
.pl-grille { display: grid; grid-template-columns: 56px repeat(7, minmax(130px, 1fr)); min-width: 980px; }
.pl-tete { text-align: center; font-size: 14px; font-weight: 600; padding: 9px 4px; margin: 0 2px; border-radius: 12px 12px 0 0; background: var(--fond-clair); }
.pl-tete.passe { background: #e4e9f2; color: var(--discret); }
.pl-tete.auj { background: var(--marine); color: #fff; }
.pl-journee-lib, .pl-heures div { font-size: 12px; color: var(--discret); text-align: right; padding-right: 10px; }
.pl-journee-lib { padding-top: 6px; }
.pl-journee { border-left: 1px solid var(--ligne); border-bottom: 2px solid var(--ligne); min-height: 34px; padding: 4px; display: flex; flex-direction: column; gap: 4px; }
.pl-journee.survol, .pl-creneau.survol { box-shadow: inset 0 0 0 2px var(--rouge); }
.pl-heures div { height: 52px; line-height: 16px; }
.pl-jour { position: relative; border-left: 1px solid var(--ligne); }
.pl-creneau { display: block; width: 100%; height: 52px; border: 0; border-top: 1px solid var(--bord); background: #fff; margin: 0; padding: 0; cursor: pointer; }
.pl-creneau:hover { box-shadow: inset 0 0 0 2px var(--corail); }
.pl-creneau.passe { background: #f3f5f9; cursor: default; }
.pl-creneau.passe:hover { box-shadow: none; }
.pl-maintenant { position: absolute; left: 0; right: 0; height: 2px; background: var(--rouge); pointer-events: none; z-index: 3; }
.pl-carte { display: block; width: 100%; border: 0; border-radius: 10px; padding: 5px 8px; text-align: left; cursor: pointer; overflow: hidden; color: var(--marine); font: inherit; box-shadow: 0 1px 2px rgba(20, 38, 74, .14); }
.pl-jour .pl-carte { position: absolute; left: 4px; width: calc(100% - 8px); height: 48px; z-index: 2; }
.pl-carte:hover { box-shadow: 0 6px 14px rgba(20, 38, 74, .25); }
.pl-carte[draggable=true] { cursor: grab; }
.pl-carte .l1 { display: flex; align-items: center; gap: 4px; font-size: 12px; line-height: 16px; font-weight: 600; }
.pl-carte .l1 .nc { margin: 0 0 0 auto; font-size: 10px; padding: 0 6px; line-height: 15px; }
.pl-carte .l2 { display: block; font-size: 12px; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--texte); margin-top: 4px; }
.pl-table tr.ligne { cursor: pointer; }
.pl-table .lien-titre { border: 0; background: none; padding: 0; font: inherit; color: var(--marine); text-align: left; cursor: pointer; }
.pl-table .lien-titre:hover { color: var(--rouge-fonce); }
.pl-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.pl-stats .carte { margin: 0; }
.pl-chiffres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 10px 0 16px; }
.pl-chiffres .chiffre { font-size: 30px; line-height: 34px; }
.pl-barres { display: flex; align-items: flex-end; gap: 8px; height: 110px; border-bottom: 1px solid var(--ligne); }
.pl-barres div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; font-size: 11px; color: var(--texte); }
.pl-barres i { display: block; width: 100%; max-width: 32px; border-radius: 6px 6px 0 0; min-height: 2px; }
.pl-barres-lib { display: flex; gap: 8px; padding-top: 4px; }
.pl-barres-lib span { flex: 1; text-align: center; font-size: 11px; color: var(--discret); }
.pl-compte { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--bord); }
.pl-compte .txt { flex: 1; min-width: 0; }
.pl-compte .txt a { overflow-wrap: anywhere; }
/* Éditeur */
.pl-fond { position: fixed; inset: 0; background: rgba(20, 38, 74, .5); z-index: 100; overflow-y: auto; padding: 24px 16px; }
.pl-fond[hidden] { display: none; }
.pl-editeur { max-width: 1240px; margin: 0 auto; background: #fff; border-radius: 24px; padding: 24px 28px; display: flex; flex-direction: column; gap: 18px; }
.pl-ed-tete { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pl-ed-tete h2 { margin: 0; font-size: 26px; }
.pl-ed-marque { display: flex; align-items: center; gap: 6px; border: 1.5px solid var(--ligne); border-radius: 999px; padding: 3px 4px; }
.pl-ed-marque .logo-m { width: 28px; height: 28px; border-radius: 999px; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11px; }
.pl-ed-marque select { width: auto; border: 0; padding: 4px 8px; font-weight: 600; border-radius: 999px; }
.pl-bandeau { border-radius: 16px; padding: 12px 18px; font-size: 14px; }
.pl-bandeau.jaune { background: #fff4d6; }
.pl-bandeau.rouge { background: var(--alerte-clair); color: var(--rouge-fonce); }
.pl-bandeau.bleu { background: #e6eef8; }
.pl-bandeau p { margin: 0 0 4px; }
.pl-bandeau[hidden] { display: none; }
.pl-ed-corps { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.pl-ed-gauche { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.pl-ed-apercu { flex: 1 1 380px; min-width: 0; background: var(--fond); border-radius: 20px; padding: 18px; }
.pl-ed-lib { margin: 0 0 8px; font-size: 13px; color: var(--discret); font-weight: 500; }
.pl-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.pl-chip-bloc { display: flex; align-items: center; gap: 6px; }
.pl-chip { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--ligne); background: #fff; border-radius: 999px; padding: 5px 12px 5px 5px; cursor: pointer; color: var(--marine); font: inherit; font-weight: 500; font-size: 14px; }
.pl-chip.on { border-color: var(--marine); background: var(--fond-clair); }
.pl-chip.off { opacity: .5; cursor: not-allowed; }
.pl-chip .ok { color: var(--vert); font-weight: 700; }
.pl-chip-bloc select { width: auto; padding: 5px 10px; font-size: 13px; border-radius: 999px; }
.pl-texte { border: 1.5px solid var(--bord-fort); border-radius: 16px; overflow: hidden; }
.pl-onglets { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 8px 10px; background: var(--fond-clair); border-bottom: 1px solid var(--ligne); }
.pl-onglet { border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 500; color: var(--texte); cursor: pointer; }
.pl-onglet:hover { color: var(--rouge-fonce); }
.pl-onglet.on { background: var(--marine); color: #fff; }
.pl-onglets .aide { margin-left: auto; font-size: 12px; color: var(--discret); }
.pl-texte textarea { display: block; width: 100%; min-height: 220px; border: 0; border-radius: 0; padding: 16px 18px; line-height: 23px; }
.pl-texte textarea:focus { outline: none; }
.pl-texte:focus-within { box-shadow: 0 0 0 2px var(--rouge); border-color: var(--rouge); }
.pl-visuels { display: flex; gap: 10px; flex-wrap: wrap; padding: 0 18px; }
.pl-visuels:empty { display: none; }
.pl-visuels .v { width: 88px; height: 88px; border-radius: 12px; background: var(--fond); overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--texte); text-align: center; margin-bottom: 12px; }
.pl-visuels .v img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pl-outils { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-top: 1px solid var(--bord); }
.pl-outils label.btn { margin: 0; }
.pl-outils .compteurs { margin-left: auto; display: flex; gap: 12px; flex-wrap: wrap; }
.pl-outils .compteurs span { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--discret); font-variant-numeric: tabular-nums; }
.pl-outils .compteurs .trop { color: var(--rouge-fonce); font-weight: 600; }
.pl-lien { border: 0; background: none; color: var(--rouge-fonce); cursor: pointer; padding: 0; font: inherit; font-size: 13px; text-decoration: underline; }
.pl-quand { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.pl-quand > div { display: flex; flex-direction: column; }
.pl-quand input { width: auto; }
.pl-ed-apercu .onglets-ap { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.pl-ap { background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(20, 38, 74, .15); max-width: 420px; margin: 0 auto; overflow: hidden; }
.pl-ap .haut { display: flex; gap: 10px; align-items: center; padding: 12px 14px; }
.pl-ap .av { width: 38px; height: 38px; border-radius: 999px; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.pl-ap .nom { font-weight: 600; font-size: 14px; }
.pl-ap .sous { font-size: 12px; color: var(--discret); }
.pl-ap .txt { margin: 0; padding: 0 14px 12px; font-size: 14px; white-space: pre-wrap; max-height: 180px; overflow: hidden; overflow-wrap: anywhere; }
.pl-ap .media { height: 220px; background: linear-gradient(135deg, var(--bord-fort), var(--fond)); display: flex; align-items: center; justify-content: center; color: var(--texte); font-size: 13px; }
.pl-ap .media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pl-ap.ig { max-width: 360px; }
.pl-ap.ig .media { height: auto; aspect-ratio: 1 / 1; }
.pl-ap .media.manque { background: var(--alerte-clair); color: var(--rouge-fonce); padding: 20px; text-align: center; }
.pl-ap .actions { display: flex; justify-content: space-around; padding: 8px; border-top: 1px solid var(--bord); font-size: 13px; color: var(--discret); }
.pl-ap .cta { display: inline-block; margin: 0 14px 14px; border: 1px solid var(--bord-fort); border-radius: 999px; padding: 6px 16px; font-size: 13px; color: #1a56c4; font-weight: 500; }
.pl-ap .note-page { background: #fff4d6; color: #7a5600; font-size: 12px; padding: 6px 14px; }
.pl-ed-pied { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--bord); padding-top: 16px; }
.pl-ed-pied .resume { margin-left: auto; font-size: 14px; color: var(--texte); }
.pl-split { position: relative; display: flex; }
.pl-split > .btn:first-child { border-radius: 999px 0 0 999px; }
.pl-split > .btn.fleche { border-radius: 0 999px 999px 0; padding: 10px 14px; border-left-color: var(--rouge-fonce); }
.pl-split .btn[disabled] { background: var(--bord-fort); border-color: var(--bord-fort); color: var(--texte); cursor: not-allowed; }
.pl-menu { position: absolute; right: 0; bottom: 52px; width: 310px; background: #fff; border-radius: 16px; padding: 6px; box-shadow: 0 12px 32px rgba(20, 38, 74, .22); z-index: 5; }
.pl-menu[hidden] { display: none; }
.pl-menu button { display: block; width: 100%; text-align: left; border: 0; background: #fff; padding: 10px 14px; cursor: pointer; border-radius: 10px; font: inherit; color: var(--marine); }
.pl-menu button:hover { background: var(--fond); }
.pl-menu small { display: block; font-size: 12px; color: var(--discret); }
@media (max-width: 800px) {
  .pl-editeur { padding: 18px 16px; }
  .pl-ed-pied .resume { margin-left: 0; width: 100%; }
  .pl-chiffres { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
