/* Planificateur — feuille de style unique. Jetons de couleur en haut, thèmes clair/sombre. */
:root {
  --bg: #f6f7f8; --surface: #ffffff; --surface-2: #f1f3f4; --surface-3: #e8ebed;
  --texte: #16191c; --texte-2: #5b646b; --texte-3: #8a939a;
  --bord: #e2e6e9; --bord-fort: #cfd5d9;
  --accent: #0f766e; --accent-fort: #0b5a54; --accent-doux: #d9f0ed; --accent-texte: #ffffff;
  --ok: #15803d; --ok-doux: #dcf3e3; --attention: #b45309; --attention-doux: #fdeccc; --erreur: #b91c1c; --erreur-doux: #fbe0e0;
  --info: #1d4ed8; --info-doux: #dbe7fd; --violet: #6d28d9; --violet-doux: #e9defa;
  --ombre: 0 1px 2px rgba(16,24,32,.06), 0 4px 14px rgba(16,24,32,.07); --ombre-forte: 0 12px 40px rgba(16,24,32,.22);
  --rayon: 10px; --rayon-s: 7px; --police: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
  --barre-h: 56px; --lateral-l: 216px;
}
:root[data-theme="dark"] {
  --bg: #0f1214; --surface: #171b1e; --surface-2: #1e2327; --surface-3: #272d32;
  --texte: #eceff1; --texte-2: #a3adb4; --texte-3: #75808a; --bord: #2a3036; --bord-fort: #3a424a;
  --accent: #2dd4bf; --accent-fort: #5eead4; --accent-doux: #12332f; --accent-texte: #06201d;
  --ok: #4ade80; --ok-doux: #12301d; --attention: #fbbf24; --attention-doux: #3a2a0c; --erreur: #f87171; --erreur-doux: #3b1717;
  --info: #7aa2ff; --info-doux: #14264d; --violet: #b69cff; --violet-doux: #2a1d4d;
  --ombre: 0 1px 2px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.35); --ombre-forte: 0 12px 40px rgba(0,0,0,.6);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1214; --surface: #171b1e; --surface-2: #1e2327; --surface-3: #272d32;
    --texte: #eceff1; --texte-2: #a3adb4; --texte-3: #75808a; --bord: #2a3036; --bord-fort: #3a424a;
    --accent: #2dd4bf; --accent-fort: #5eead4; --accent-doux: #12332f; --accent-texte: #06201d;
    --ok: #4ade80; --ok-doux: #12301d; --attention: #fbbf24; --attention-doux: #3a2a0c; --erreur: #f87171; --erreur-doux: #3b1717;
    --info: #7aa2ff; --info-doux: #14264d; --violet: #b69cff; --violet-doux: #2a1d4d;
    --ombre: 0 1px 2px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.35); --ombre-forte: 0 12px 40px rgba(0,0,0,.6);
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 14px/1.45 var(--police); color: var(--texte); background: var(--bg); -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
svg.ic { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.ic.s { width: 15px; height: 15px; } svg.ic.l { width: 22px; height: 22px; }
.cache { display: none !important; }
.muet { color: var(--texte-2); } .discret { color: var(--texte-3); font-size: 12px; }
.grow { flex: 1; min-width: 0; } .rang { display: flex; align-items: center; gap: 8px; } .rang.wrap { flex-wrap: wrap; }
.colonne { display: flex; flex-direction: column; gap: 8px; }
.tronque { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
kbd { font: 11px var(--police); padding: 1px 6px; border: 1px solid var(--bord-fort); border-bottom-width: 2px; border-radius: 5px; background: var(--surface-2); color: var(--texte-2); }

/* ---------- structure ---------- */
#app { display: grid; grid-template-columns: var(--lateral-l) 1fr; grid-template-rows: var(--barre-h) 1fr; height: 100vh; }
#lateral { grid-row: 1 / 3; background: var(--surface); border-right: 1px solid var(--bord); display: flex; flex-direction: column; padding: 14px 10px; gap: 2px; min-height: 0; }
.marque { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.marque i { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; color: var(--accent-texte); font-style: normal; font-size: 15px; }
.nav { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: var(--rayon-s); border: 0; background: none; color: var(--texte-2); text-align: left; width: 100%; font-weight: 500; position: relative; }
.nav:hover { background: var(--surface-2); color: var(--texte); }
.nav.actif { background: var(--accent-doux); color: var(--accent); }
.nav .pastille { margin-left: auto; background: var(--erreur); color: #fff; font-size: 11px; font-weight: 700; border-radius: 9px; padding: 0 6px; min-width: 18px; text-align: center; line-height: 18px; }
.nav .pastille.neutre { background: var(--accent); color: var(--accent-texte); }
.sep { height: 1px; background: var(--bord); margin: 8px 6px; }
.espace { flex: 1; }
#mode-banniere { margin: 6px 4px; padding: 8px 10px; border-radius: var(--rayon-s); font-size: 12px; line-height: 1.35; }
#mode-banniere.simu { background: var(--attention-doux); color: var(--attention); } #mode-banniere.reel { background: var(--ok-doux); color: var(--ok); }
#barre { grid-column: 2; display: flex; align-items: center; gap: 10px; padding: 0 18px; background: var(--surface); border-bottom: 1px solid var(--bord); min-width: 0; }
#recherche-boite { position: relative; width: min(340px, 30vw); }
#recherche-boite input { width: 100%; padding: 7px 12px 7px 34px; border: 1px solid var(--bord); border-radius: 999px; background: var(--surface-2); outline: none; }
#recherche-boite input:focus { border-color: var(--accent); background: var(--surface); }
#recherche-boite svg { position: absolute; left: 11px; top: 8px; color: var(--texte-3); }
#resultats-recherche { position: absolute; top: 40px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre-forte); max-height: 70vh; overflow: auto; z-index: 40; padding: 6px; }
#resultats-recherche .res { display: flex; gap: 10px; padding: 6px; border-radius: 7px; align-items: center; cursor: pointer; }
#resultats-recherche .res:hover { background: var(--surface-2); }
#principal { grid-column: 2; grid-row: 2; overflow: auto; min-height: 0; position: relative; }
.page { padding: 22px 26px 60px; max-width: 1240px; margin: 0 auto; }
.page.large { max-width: none; }
h1 { font-size: 22px; letter-spacing: -.02em; margin: 0 0 4px; } h2 { font-size: 16px; margin: 0 0 10px; letter-spacing: -.01em; } h3 { font-size: 13px; margin: 0 0 8px; color: var(--texte-2); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }

/* ---------- boutons & champs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 7px 14px; border-radius: var(--rayon-s); border: 1px solid var(--bord-fort); background: var(--surface); font-weight: 500; white-space: nowrap; }
.btn:hover { background: var(--surface-2); } .btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primaire { background: var(--accent); border-color: var(--accent); color: var(--accent-texte); } .btn.primaire:hover { background: var(--accent-fort); border-color: var(--accent-fort); }
.btn.danger { color: var(--erreur); } .btn.danger:hover { background: var(--erreur-doux); }
.btn.doux { border-color: transparent; background: var(--surface-2); } .btn.doux:hover { background: var(--surface-3); }
.btn.nu { border-color: transparent; background: none; } .btn.nu:hover { background: var(--surface-2); }
.btn.petit { padding: 4px 9px; font-size: 12.5px; } .btn.icone { padding: 7px; }
.btn.actif { background: var(--accent-doux); color: var(--accent); border-color: var(--accent-doux); }
.groupe { display: inline-flex; } .groupe .btn { border-radius: 0; margin-left: -1px; } .groupe .btn:first-child { border-radius: var(--rayon-s) 0 0 var(--rayon-s); margin: 0; } .groupe .btn:last-child { border-radius: 0 var(--rayon-s) var(--rayon-s) 0; }
.groupe .btn.actif { position: relative; z-index: 1; }
input[type=text], input[type=search], input[type=date], input[type=time], input[type=number], input[type=url], input[type=password], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--bord-fort); border-radius: var(--rayon-s); background: var(--surface); outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-doux); }
textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
label.champ { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--texte-2); }
label.champ > span.aide { font-weight: 400; color: var(--texte-3); }
.case { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; } .case input { margin-top: 3px; accent-color: var(--accent); }
.puce { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--texte-2); }
.puce.ok { background: var(--ok-doux); color: var(--ok); } .puce.att { background: var(--attention-doux); color: var(--attention); } .puce.err { background: var(--erreur-doux); color: var(--erreur); }
.puce.info { background: var(--info-doux); color: var(--info); } .puce.violet { background: var(--violet-doux); color: var(--violet); } .puce.accent { background: var(--accent-doux); color: var(--accent); }
.carte { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 16px; }
.carte + .carte { margin-top: 14px; } .deux > .carte, .trois > .carte { margin-top: 0; }
.grille-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.vide { text-align: center; color: var(--texte-3); padding: 40px 20px; }
.vide svg { width: 36px; height: 36px; margin-bottom: 8px; opacity: .6; }
.avertissement { padding: 9px 12px; border-radius: var(--rayon-s); background: var(--attention-doux); color: var(--attention); font-size: 13px; }
.avertissement.err { background: var(--erreur-doux); color: var(--erreur); } .avertissement.info { background: var(--info-doux); color: var(--info); } .avertissement.ok { background: var(--ok-doux); color: var(--ok); }

/* ---------- calendrier ---------- */
.cal-entete { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--bord); background: var(--surface); flex-wrap: wrap; }
.cal-entete h1 { margin: 0; font-size: 18px; min-width: 190px; }
.cal-corps { display: flex; height: calc(100% - 59px); min-height: 0; }
.cal-zone { flex: 1; overflow: auto; min-width: 0; position: relative; }
.semaine { display: grid; grid-template-columns: 52px repeat(7, minmax(118px, 1fr)); min-width: 900px; }
.semaine .jour-tete { position: sticky; top: 0; z-index: 5; background: var(--surface); border-bottom: 1px solid var(--bord); padding: 8px 6px; text-align: center; font-size: 12px; color: var(--texte-2); }
.semaine .jour-tete b { display: block; font-size: 18px; color: var(--texte); font-weight: 600; }
.semaine .jour-tete.aujourdhui b { color: var(--accent-texte); background: var(--accent); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto; }
.semaine .jour-tete.bloque { background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 6px, var(--surface) 6px, var(--surface) 12px); }
.semaine .heure { font-size: 11px; color: var(--texte-3); text-align: right; padding: 4px 8px 0 0; border-top: 1px solid var(--bord); height: 64px; }
.semaine .case-h { border-top: 1px solid var(--bord); border-left: 1px solid var(--bord); min-height: 64px; padding: 2px; position: relative; display: flex; flex-direction: column; gap: 2px; }
.semaine .case-h.passe { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.semaine .case-h.bloque { background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 6px, transparent 6px, transparent 12px); }
.semaine .case-h.survol, .mois .jour-m.survol { background: var(--accent-doux); outline: 2px dashed var(--accent); outline-offset: -2px; }
.semaine .case-h.actuel::before { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: var(--erreur); top: var(--minute, 0); z-index: 3; }
.fantome { border: 1.5px dashed var(--bord-fort); border-radius: 7px; color: var(--texte-3); font-size: 11px; display: flex; align-items: center; gap: 4px; padding: 3px 7px; cursor: pointer; background: transparent; width: 100%; text-align: left; }
.fantome:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-doux); }
.mini-post { display: flex; gap: 6px; align-items: stretch; background: var(--surface); border: 1px solid var(--bord); border-left: 4px solid var(--c, var(--bord-fort)); border-radius: 7px; padding: 4px; cursor: grab; box-shadow: 0 1px 2px rgba(0,0,0,.05); overflow: hidden; position: relative; }
.mini-post:hover { box-shadow: var(--ombre); border-color: var(--bord-fort); border-left-color: var(--c, var(--bord-fort)); }
.mini-post.deplace { opacity: .35; }
.mini-post .vignette { width: 38px; height: 38px; border-radius: 5px; object-fit: cover; background: var(--surface-3); flex: none; display: grid; place-items: center; color: var(--texte-3); overflow: hidden; }
.mini-post .vignette img { width: 100%; height: 100%; object-fit: cover; }
.mini-post .t { font-size: 11px; font-weight: 700; display: flex; gap: 4px; align-items: center; } .mini-post .l { font-size: 11px; color: var(--texte-2); line-height: 1.25; max-height: 2.5em; overflow: hidden; }
.mini-post.s-brouillon { --c: var(--texte-3); } .mini-post.s-planifie { --c: var(--accent); } .mini-post.s-a_valider { --c: var(--violet); }
.mini-post.s-publie, .mini-post.s-simule { --c: var(--ok); } .mini-post.s-erreur, .mini-post.s-manque { --c: var(--erreur); } .mini-post.s-en_cours { --c: var(--info); }
.mini-post .etiq { position: absolute; top: 3px; right: 3px; width: 8px; height: 8px; border-radius: 50%; }
.mini-post .signal { position: absolute; right: 3px; bottom: 3px; }
.mois { display: grid; grid-template-columns: repeat(7, 1fr); min-width: 760px; }
.mois .entete { padding: 8px; font-size: 12px; font-weight: 600; color: var(--texte-2); border-bottom: 1px solid var(--bord); position: sticky; top: 0; background: var(--surface); z-index: 3; }
.mois .jour-m { min-height: 118px; border-right: 1px solid var(--bord); border-bottom: 1px solid var(--bord); padding: 4px; display: flex; flex-direction: column; gap: 3px; }
.mois .jour-m .num { font-size: 12px; color: var(--texte-2); display: flex; justify-content: space-between; align-items: center; padding: 0 3px; }
.mois .jour-m.autre { background: color-mix(in srgb, var(--surface-2) 70%, transparent); } .mois .jour-m.autre .num { opacity: .5; }
.mois .jour-m.aujourdhui .num b { background: var(--accent); color: var(--accent-texte); border-radius: 50%; width: 22px; height: 22px; display: grid; place-items: center; }
.mois .jour-m.bloque { background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 6px, transparent 6px, transparent 12px); }
.mois .jour-m .mini-post .l { display: none; } .mois .jour-m .mini-post { padding: 2px 4px 2px 2px; } .mois .jour-m .mini-post .vignette { width: 24px; height: 24px; }
.evt { font-size: 11px; background: var(--info-doux); color: var(--info); border-radius: 5px; padding: 1px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evt.bloque { background: var(--erreur-doux); color: var(--erreur); }
.lateral-idees { width: 290px; border-left: 1px solid var(--bord); background: var(--surface); overflow: auto; padding: 14px; flex: none; }
.lateral-idees .mini-post { margin-bottom: 6px; }
table.liste { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); overflow: hidden; }
table.liste th { text-align: left; font-size: 12px; color: var(--texte-2); padding: 9px 12px; background: var(--surface-2); border-bottom: 1px solid var(--bord); position: sticky; top: 0; }
table.liste td { padding: 8px 12px; border-bottom: 1px solid var(--bord); vertical-align: middle; }
table.liste tr:hover td { background: var(--surface-2); cursor: pointer; } table.liste tr:last-child td { border-bottom: 0; }
.grille-profil { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; max-width: 520px; margin: 0 auto; background: var(--bord); border: 3px solid var(--bord); border-radius: 8px; overflow: hidden; }
.grille-profil .case-g { aspect-ratio: 4/5; background: var(--surface-3); position: relative; cursor: pointer; overflow: hidden; }
.grille-profil .case-g img { width: 100%; height: 100%; object-fit: cover; display: block; }
.grille-profil .case-g .badge { position: absolute; top: 5px; left: 5px; }
.grille-profil .case-g.planifie img { opacity: .72; } .grille-profil .case-g.survol { outline: 3px solid var(--accent); outline-offset: -3px; }

/* ---------- fenêtres ---------- */
#couche { position: fixed; inset: 0; z-index: 100; display: none; } #couche.ouverte { display: block; }
.voile { position: fixed; inset: 0; background: rgba(8, 12, 16, .55); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; padding: 20px; animation: fondu .12s; z-index: 100; }
.fenetre { background: var(--surface); border-radius: 14px; box-shadow: var(--ombre-forte); width: min(560px, 100%); max-height: 92vh; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--bord); }
.fenetre.large { width: min(1180px, 100%); height: min(860px, 92vh); } .fenetre.moyenne { width: min(820px, 100%); }
.fenetre-tete { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--bord); } .fenetre-tete h2 { margin: 0; flex: 1; }
.fenetre-corps { padding: 18px; overflow: auto; flex: 1; min-height: 0; } .fenetre-pied { display: flex; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--bord); align-items: center; background: var(--surface); flex-wrap: wrap; }
@keyframes fondu { from { opacity: 0; } to { opacity: 1; } }
#toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 300; align-items: center; pointer-events: none; }
.toast { background: #1b2125; color: #f0f3f5; padding: 10px 14px; border-radius: 10px; box-shadow: var(--ombre-forte); display: flex; gap: 14px; align-items: center; pointer-events: auto; animation: monte .18s; max-width: 90vw; font-size: 13.5px; }
.toast.err { background: #8c1d1d; } .toast button { background: none; border: 0; color: #7dd3c8; font-weight: 700; padding: 0; }
@keyframes monte { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.menu { position: fixed; background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre-forte); padding: 5px; z-index: 250; min-width: 190px; max-height: 60vh; overflow: auto; }
.menu button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 7px 10px; border: 0; background: none; text-align: left; border-radius: 6px; } .menu button:hover, .menu button.sel { background: var(--surface-2); }
.menu .titre { font-size: 11px; color: var(--texte-3); padding: 6px 10px 2px; text-transform: uppercase; letter-spacing: .05em; }
#palette { align-items: flex-start; padding-top: 14vh; }
#palette .fenetre { width: min(620px, 100%); } #palette input { border: 0; border-bottom: 1px solid var(--bord); border-radius: 0; padding: 16px 18px; font-size: 16px; box-shadow: none; }
#palette .liste-p { max-height: 50vh; overflow: auto; padding: 6px; } #palette button { width: 100%; display: flex; gap: 10px; align-items: center; padding: 9px 12px; border: 0; background: none; text-align: left; border-radius: 8px; } #palette button.sel { background: var(--accent-doux); }
.cloche-panneau { position: fixed; top: 54px; right: 16px; width: 380px; max-height: 70vh; overflow: auto; z-index: 90; background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre-forte); padding: 6px; }
.alerte { display: flex; gap: 10px; padding: 9px 10px; border-radius: 8px; } .alerte:hover { background: var(--surface-2); } .alerte.non-lue { background: var(--accent-doux); }

/* ---------- éditeur ---------- */
.editeur { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 0; height: 100%; min-height: 0; }
.editeur-form { overflow: auto; padding: 18px 22px; display: flex; flex-direction: column; gap: 16px; }
.editeur-apercu { border-left: 1px solid var(--bord); background: var(--surface-2); overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.bloc { display: flex; flex-direction: column; gap: 8px; }
.bloc-titre { font-size: 12px; font-weight: 700; color: var(--texte-2); text-transform: uppercase; letter-spacing: .05em; display: flex; align-items: center; gap: 8px; }
.types { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.type-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border: 1.5px solid var(--bord); border-radius: var(--rayon); background: var(--surface); font-weight: 600; font-size: 13px; color: var(--texte-2); }
.type-btn:hover { border-color: var(--bord-fort); } .type-btn.actif { border-color: var(--accent); background: var(--accent-doux); color: var(--accent); }
.type-btn:disabled { opacity: .45; cursor: not-allowed; }
.medias-rang { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-start; }
.media-tuile { width: 112px; position: relative; border-radius: 9px; background: var(--surface-3); border: 1.5px solid var(--bord); cursor: grab; overflow: hidden; }
.media-tuile.glisse { opacity: .4; } .media-tuile.cible { outline: 3px solid var(--accent); }
.media-tuile .img { aspect-ratio: 4/5; background: var(--surface-3) center/cover; display: grid; place-items: center; color: var(--texte-3); position: relative; }
.media-tuile .img img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.media-tuile .n { position: absolute; top: 5px; left: 5px; background: rgba(0,0,0,.65); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 9px; z-index: 2; }
.media-tuile .retirer { position: absolute; top: 4px; right: 4px; z-index: 2; background: rgba(0,0,0,.65); color: #fff; border: 0; border-radius: 50%; width: 22px; height: 22px; display: grid; place-items: center; padding: 0; }
.media-tuile .bas { padding: 4px 6px; font-size: 11px; display: flex; gap: 4px; align-items: center; color: var(--texte-2); } .media-tuile .signal { position: absolute; bottom: 4px; right: 4px; z-index: 2; }
.media-tuile input.alt { width: 100%; border: 0; border-top: 1px solid var(--bord); border-radius: 0; font-size: 11.5px; padding: 5px 6px; box-shadow: none; }
.ajout-media { width: 112px; aspect-ratio: 4/5; border: 2px dashed var(--bord-fort); border-radius: 9px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--texte-2); font-size: 12.5px; background: transparent; text-align: center; }
.ajout-media:hover, .zone-depot.survol { border-color: var(--accent); color: var(--accent); background: var(--accent-doux); }
.zone-depot { border: 2px dashed transparent; border-radius: 12px; padding: 4px; margin: -6px; }
.legende-outils { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.compteur { margin-left: auto; font-size: 12px; color: var(--texte-3); font-variant-numeric: tabular-nums; } .compteur.alerte { color: var(--erreur); font-weight: 700; }
.controles { display: flex; flex-direction: column; gap: 6px; }
.controle { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; padding: 7px 10px; border-radius: 8px; }
.controle.ok { background: var(--ok-doux); color: var(--ok); } .controle.attention { background: var(--attention-doux); color: var(--attention); } .controle.erreur { background: var(--erreur-doux); color: var(--erreur); } .controle.info { background: var(--info-doux); color: var(--info); }
.deux { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .trois { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; padding: 5px; border: 1px solid var(--bord-fort); border-radius: var(--rayon-s); background: var(--surface); align-items: center; }
.chips input { border: 0; box-shadow: none !important; flex: 1; min-width: 100px; padding: 3px 4px; }
.chips .puce { cursor: default; } .chips .puce b { cursor: pointer; font-weight: 700; margin-left: 2px; }
.creneaux-proposes { display: flex; gap: 6px; flex-wrap: wrap; }
.tel { width: 300px; margin: 0 auto; background: var(--surface); border-radius: 22px; border: 1px solid var(--bord-fort); overflow: hidden; box-shadow: var(--ombre); font-size: 12.5px; }
.tel .entete-ig { display: flex; align-items: center; gap: 8px; padding: 9px 11px; font-weight: 600; }
.tel .avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-3) center/cover; flex: none; border: 1px solid var(--bord); }
.tel .cadre { background: #fff center/cover; width: 100%; position: relative; overflow: hidden; display: grid; place-items: center; color: #999; }
.tel .cadre img, .tel .cadre video { width: 100%; height: 100%; object-fit: cover; display: block; position: absolute; inset: 0; }
.tel .actions-ig { display: flex; gap: 12px; padding: 8px 11px 2px; } .tel .corps-ig { padding: 2px 11px 12px; line-height: 1.4; } .tel .corps-ig b { font-weight: 700; }
.tel .points { display: flex; gap: 4px; justify-content: center; padding: 6px 0 0; } .tel .points i { width: 6px; height: 6px; border-radius: 50%; background: var(--bord-fort); } .tel .points i.on { background: var(--accent); }
.tel.vertical .cadre { aspect-ratio: 9/16; border-radius: 0; } .tel.vertical { background: #111; color: #fff; border-color: #333; } .tel.vertical .superposition { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 12px 12px; background: linear-gradient(transparent, rgba(0,0,0,.7)); color: #fff; z-index: 2; text-align: left; font-size: 12.5px; }
.tel.vertical .haut { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 2; display: flex; gap: 8px; align-items: center; color: #fff; font-weight: 600; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.tel .grille-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: var(--bord); } .tel .grille-3 > div { aspect-ratio: 4/5; background: var(--surface-3) center/cover; position: relative; } .tel .grille-3 > div.moi { outline: 3px solid var(--accent); outline-offset: -3px; z-index: 1; }
.safe-zone { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.statut-ligne { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- bibliothèque ---------- */
.biblio { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.biblio-barre { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 0; }
.chemin { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; font-size: 13px; } .chemin button { background: none; border: 0; color: var(--texte-2); padding: 3px 6px; border-radius: 5px; } .chemin button:hover { background: var(--surface-2); color: var(--texte); } .chemin .courant { font-weight: 700; color: var(--texte); }
.biblio-grille { display: grid; grid-auto-rows: max-content; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; overflow: auto; align-content: start; padding: 4px 4px 40px; flex: 1; min-height: 0; }
.dossier-tuile { display: flex; gap: 9px; align-items: center; padding: 11px 12px; border: 1px solid var(--bord); border-radius: var(--rayon); background: var(--surface); cursor: pointer; font-weight: 500; } .dossier-tuile:hover { border-color: var(--accent); background: var(--accent-doux); }
.fichier-tuile { border: 2px solid transparent; border-radius: var(--rayon); background: var(--surface); position: relative; overflow: hidden; cursor: pointer; box-shadow: 0 0 0 1px var(--bord); }
.fichier-tuile:hover { box-shadow: var(--ombre); } .fichier-tuile.choisi { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-doux); }
.fichier-tuile .vign { aspect-ratio: 1; background: var(--surface-3) center/cover; position: relative; display: grid; place-items: center; }
.fichier-tuile .vign img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; } .fichier-tuile .vign img.chargement { opacity: 0; transition: opacity .2s; }
.fichier-tuile .nom { font-size: 11.5px; padding: 5px 8px; color: var(--texte-2); } .fichier-tuile .coche { position: absolute; top: 6px; left: 6px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.45); border: 2px solid #fff; display: grid; place-items: center; color: #fff; z-index: 2; opacity: 0; } .fichier-tuile:hover .coche, .fichier-tuile.choisi .coche { opacity: 1; } .fichier-tuile.choisi .coche { background: var(--accent); }
.fichier-tuile .type-badge { position: absolute; bottom: 6px; right: 6px; z-index: 2; background: rgba(0,0,0,.65); color: #fff; font-size: 10.5px; padding: 1px 6px; border-radius: 9px; display: flex; gap: 3px; align-items: center; }
.barre-selection { position: sticky; bottom: 0; background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre-forte); padding: 10px 14px; display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.88); z-index: 200; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; padding: 20px; } .lightbox img, .lightbox video { max-width: 92vw; max-height: 80vh; border-radius: 8px; } .lightbox .legende { color: #ddd; font-size: 13px; }

/* ---------- statistiques & divers ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 14px; } .kpi { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 14px 16px; } .kpi .v { font-size: 26px; font-weight: 700; letter-spacing: -.02em; display: block; margin-top: 2px; font-variant-numeric: tabular-nums; } .kpi .d { font-size: 12px; color: var(--texte-3); } .kpi .delta.pos { color: var(--ok); } .kpi .delta.neg { color: var(--erreur); }
.graphe { width: 100%; height: 190px; } .graphe text { fill: var(--texte-3); font-size: 10.5px; } .graphe .axe { stroke: var(--bord); } .graphe .ligne { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; } .graphe .aire { fill: var(--accent-doux); opacity: .8; } .graphe .barre { fill: var(--accent); } .graphe .barre2 { fill: var(--violet); }
.chaleur { display: grid; grid-template-columns: 38px repeat(24, 1fr); gap: 2px; font-size: 10px; color: var(--texte-3); } .chaleur .c { aspect-ratio: 1.3; border-radius: 3px; background: var(--surface-3); } .chaleur .lab { display: flex; align-items: center; }
.jauge { height: 8px; background: var(--surface-3); border-radius: 5px; overflow: hidden; } .jauge i { display: block; height: 100%; background: var(--accent); border-radius: 5px; }
.commentaire { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--bord); border-radius: var(--rayon); background: var(--surface); } .commentaire + .commentaire { margin-top: 10px; } .commentaire .vign-post { width: 52px; height: 52px; border-radius: 8px; background: var(--surface-3) center/cover; flex: none; } .commentaire.nouveau { border-left: 4px solid var(--accent); }
.reponse-ig { margin: 8px 0 0 12px; padding-left: 12px; border-left: 2px solid var(--bord); font-size: 13px; color: var(--texte-2); }
.conversation { display: flex; flex-direction: column; gap: 6px; } .bulle { max-width: 78%; padding: 8px 12px; border-radius: 16px; background: var(--surface-3); align-self: flex-start; } .bulle.moi { background: var(--accent); color: var(--accent-texte); align-self: flex-end; }
.interrupteur { position: relative; width: 38px; height: 22px; flex: none; } .interrupteur input { opacity: 0; width: 0; height: 0; } .interrupteur span { position: absolute; inset: 0; background: var(--bord-fort); border-radius: 12px; transition: .15s; cursor: pointer; } .interrupteur span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .15s; } .interrupteur input:checked + span { background: var(--accent); } .interrupteur input:checked + span::before { transform: translateX(16px); }
.reglages { display: grid; grid-template-columns: 190px 1fr; gap: 26px; } .reglages-nav { position: sticky; top: 0; align-self: start; display: flex; flex-direction: column; gap: 2px; }
.creneaux-grille { display: grid; grid-template-columns: 90px 1fr; gap: 8px 12px; align-items: center; }
.skeleton { background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 200% 100%; animation: brille 1.2s infinite; border-radius: 8px; } @keyframes brille { to { background-position: -200% 0; } }
.spinner { width: 18px; height: 18px; border: 2.5px solid var(--bord-fort); border-top-color: var(--accent); border-radius: 50%; animation: tourne .7s linear infinite; display: inline-block; } @keyframes tourne { to { transform: rotate(360deg); } }
.aide-raccourcis { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 26px; } .aide-raccourcis div { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px solid var(--bord); }

/* ---------- petits écrans ---------- */
@media (max-width: 1000px) { :root { --lateral-l: 62px; } .nav span.lib, .marque span, #mode-banniere, .nav .pastille { display: none; } .nav { justify-content: center; } .lateral-idees { display: none; } .editeur { grid-template-columns: 1fr; } .editeur-apercu { display: none; } .reglages { grid-template-columns: 1fr; } .reglages-nav { position: static; flex-direction: row; flex-wrap: wrap; } }
@media (max-width: 700px) {
  .sec, #barre .btn span.lib { display: none; } #barre { gap: 6px; } #barre .btn { padding: 7px 9px; }
  #app { grid-template-columns: 1fr; grid-template-rows: var(--barre-h) 1fr 58px; } #lateral { grid-row: 3; grid-column: 1; flex-direction: row; border-right: 0; border-top: 1px solid var(--bord); padding: 4px; justify-content: space-around; overflow-x: auto; } .marque, .sep, .espace { display: none; }
  #barre { grid-column: 1; padding: 0 10px; } #principal { grid-column: 1; } .page { padding: 14px 12px 40px; } .deux, .trois { grid-template-columns: 1fr; } #recherche-boite { width: auto; flex: 1; } .cloche-panneau { right: 6px; left: 6px; width: auto; }
}
@media print { #lateral, #barre, .cal-entete, .btn { display: none !important; } body { overflow: visible; } }

/* Réseaux et comptes (présentation façon Publer) */
.logo-reseau { display: block; flex: none; }
.av { position: relative; display: inline-flex; flex: none; }
.av-rond { width: 100%; height: 100%; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; overflow: hidden; position: relative; border: 1px solid var(--bord); }
.av-rond img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--surface); }
.av-badge { position: absolute; right: -6px; bottom: -5px; border-radius: 50%; background: var(--surface); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--surface); }
.av-tous { width: 24px; height: 24px; border-radius: 50%; background: var(--surface-3); color: var(--texte-2); display: inline-flex; align-items: center; justify-content: center; }
.menu button .av { margin-right: 4px; }
.reseau-bloc { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 14px 16px; margin-bottom: 12px; }
.reseau-bloc.inactif { opacity: .62; padding-top: 10px; padding-bottom: 10px; }
.reseau-tete { display: flex; align-items: center; gap: 10px; } .reseau-tete h2 { margin: 0; font-size: 17px; }
.reseau-tete .btn { margin-left: 4px; }
.comptes-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 14px; }
.compte-carte { display: flex; align-items: center; gap: 12px; padding: 12px 10px 12px 14px; border: 1px solid var(--bord); border-radius: var(--rayon); background: var(--surface); cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.compte-carte:hover { border-color: var(--bord-fort); box-shadow: var(--ombre); }
.compte-carte.desactive { opacity: .6; }
.compte-infos { min-width: 0; line-height: 1.35; }
.compte-infos .statut { font-size: 13px; font-weight: 600; } .statut.ok { color: var(--ok); } .statut.att { color: var(--attention); } .statut.err { color: var(--erreur); } .statut.muet { color: var(--texte-3); }

/* Éditeur façon Publer */
.pl-comptes { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pl-sep { width: 1px; height: 36px; background: var(--bord); }
.pl-compte { position: relative; border: 0; background: none; padding: 0; border-radius: 50%; opacity: .45; cursor: pointer; }
.pl-compte.on { opacity: 1; }
.pl-compte:disabled { cursor: default; }
.pl-coche { position: absolute; top: -4px; right: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); color: var(--accent); display: grid; place-items: center; border: 1.5px solid var(--accent); }
.pl-etiq { align-self: flex-start; width: auto; border-radius: 999px; padding: 6px 14px; font-size: 13px; }
.pl-zone { display: flex; gap: 10px; align-items: flex-start; }
.pl-rail { display: flex; flex-direction: column; gap: 10px; padding-top: 8px; width: 26px; flex: none; }
.pl-boite-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.pl-onglets { display: flex; gap: 18px; padding-left: 2px; }
.pl-onglet { border: 0; background: none; padding: 4px 0; font-weight: 600; color: var(--texte-2); border-bottom: 2px solid transparent; cursor: pointer; }
.pl-onglet.actif { color: var(--accent); border-bottom-color: var(--accent); }
.pl-boite { border: 1px solid var(--bord); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; background: var(--surface); }
.pl-boite.survol { border-color: var(--accent); }
.pl-boite textarea { border: 0; box-shadow: none; padding: 2px; min-height: 90px; resize: vertical; }
.pl-medias { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.pl-medias .medias-rang { display: flex; flex-wrap: wrap; gap: 10px; }
.pl-ajout { width: 120px; height: 120px; border: 2px dashed var(--bord-fort); border-radius: 12px; background: none; font-size: 40px; color: var(--texte-2); cursor: pointer; }
.pl-reseau { display: flex; gap: 10px; align-items: flex-start; }
.pl-reseau:empty { display: none; }
.pl-lien { border: 0; background: none; color: var(--texte-2); cursor: pointer; padding: 4px 0; text-align: left; }
.pl-commentaire { display: flex; flex-direction: column; gap: 6px; }
.pl-icones { display: flex; gap: 6px; }
.pl-icone { border: 0; background: none; padding: 6px 8px; border-radius: 8px; color: var(--accent); cursor: pointer; }
.pl-icone:hover { background: var(--accent-doux); }
.pl-panneau { display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--bord); border-radius: 10px; padding: 12px; }
.btn.contour { background: var(--surface); border: 1px solid var(--accent); color: var(--accent); }
.btn.chevron { padding: 0 10px; margin-left: -6px; }

/* Bandeau de la plateforme (36 px) au-dessus de l'application. */
.bandeau ~ #app { height: calc(100vh - 36px); height: calc(100dvh - 36px); }
