/* ============ COCKPIT — feuille de style ============ */
:root {
  --bg: #0a0e16;
  --bg-2: #0f1420;
  --surface: #131a28;
  --surface-2: #182133;
  --border: #222c3f;
  --border-2: #2c3850;
  --text: #e8ecf4;
  --muted: #8b97ad;
  --faint: #5d6880;
  --accent: #5b8cff;
  --accent-soft: rgba(91, 140, 255, .14);
  --green: #34d399;  --green-soft: rgba(52, 211, 153, .14);
  --amber: #fbbf24;  --amber-soft: rgba(251, 191, 36, .14);
  --red: #f87171;    --red-soft: rgba(248, 113, 113, .14);
  --violet: #a78bfa; --violet-soft: rgba(167, 139, 250, .14);
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --radius: 14px;
  --pole-sites: #5b8cff; --pole-btp: #34d399; --pole-videos: #f87171; --pole-veille: #fbbf24;
  --font: "Segoe UI Variable Text", "Segoe UI", Inter, system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: dark;
}
[data-theme="clair"] {
  --bg: #f4f6fb; --bg-2: #eef1f7; --surface: #ffffff; --surface-2: #f7f9fc;
  --border: #e3e8f0; --border-2: #d3dae6; --text: #121826; --muted: #5d6a80; --faint: #95a0b4;
  --accent: #3366ee; --accent-soft: rgba(51, 102, 238, .10);
  --green: #059669; --green-soft: rgba(5, 150, 105, .10);
  --amber: #c27803; --amber-soft: rgba(217, 119, 6, .12);
  --red: #dc2626; --red-soft: rgba(220, 38, 38, .09);
  --violet: #7c3aed; --violet-soft: rgba(124, 58, 237, .09);
  --shadow: 0 10px 30px rgba(20, 30, 60, .10);
  --pole-sites: #3366ee; --pole-btp: #059669; --pole-videos: #dc2626; --pole-veille: #c27803;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font); background: var(--bg); color: var(--text);
  font-size: 14.5px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
svg.ic { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Structure ---------- */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh;
  background: linear-gradient(to right, var(--bg-2) 239px, var(--border) 239px 240px, transparent 240px); }
.sidebar {
  padding: 22px 14px; display: flex; flex-direction: column; gap: 6px;
  position: sticky; top: 0; height: 100vh;
}
.logo { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; }
.logo-mark {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: var(--text); color: var(--bg);
}
.logo-mark .logo-svg { width: 30px; height: 30px; }
.logo-mark .logo-etincelle { fill: var(--accent); }
.logo-text { font-weight: 700; font-size: 17px; letter-spacing: .2px; }
.logo-text small { display: block; font-weight: 500; font-size: 11.5px; color: var(--muted); letter-spacing: 0; }

.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px;
  color: var(--muted); cursor: pointer; border: 0; background: none; width: 100%; text-align: left;
  font-weight: 500; transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.actif { background: var(--accent-soft); color: var(--accent); }
.nav-item .compte {
  margin-left: auto; font-size: 11.5px; background: var(--amber-soft); color: var(--amber);
  padding: 1px 8px; border-radius: 99px; font-weight: 600;
}
.nav-titre { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--faint);
  padding: 16px 12px 6px; font-weight: 600; }
.sidebar-bas { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }

.contenu { padding: 28px 36px 60px; max-width: 1400px; width: 100%; position: relative; }
.contenu::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 320px; pointer-events: none; z-index: -1;
  background: radial-gradient(700px 260px at 30% 0%, var(--accent-soft), transparent 70%); }
.entete { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.entete h1 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.3px; }
.entete p { margin: 4px 0 0; color: var(--muted); }

.page { display: none; animation: apparition .25s ease; }
.page.active { display: block; }
@keyframes apparition { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Cartes ---------- */
.carte {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px;
}
.carte h2 { margin: 0 0 14px; font-size: 15.5px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.carte h2 .sous { color: var(--muted); font-weight: 400; font-size: 13px; margin-left: auto; }
.grille { display: grid; gap: 16px; }
.grille-4 { grid-template-columns: repeat(4, 1fr); }
.grille-3 { grid-template-columns: repeat(3, 1fr); }
.grille-2 { grid-template-columns: 1.4fr 1fr; }
@media (max-width: 1150px) { .grille-4 { grid-template-columns: repeat(2, 1fr); } .grille-3, .grille-2 { grid-template-columns: 1fr; } }

.kpi { position: relative; overflow: hidden; }
.kpi .kpi-ic {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 14px;
}
.kpi .valeur { font-size: 30px; font-weight: 700; letter-spacing: -.5px; line-height: 1.1; }
.kpi .libelle { color: var(--muted); font-size: 13px; margin-top: 2px; }
.t-accent { background: var(--accent-soft); color: var(--accent); }
.t-green { background: var(--green-soft); color: var(--green); }
.t-amber { background: var(--amber-soft); color: var(--amber); }
.t-red { background: var(--red-soft); color: var(--red); }
.t-violet { background: var(--violet-soft); color: var(--violet); }

/* ---------- Agents ---------- */
.agent {
  display: flex; flex-direction: column; gap: 12px; transition: border-color .2s, transform .2s;
}
.agent:hover { border-color: var(--border-2); }
.agent.bientot { opacity: .62; }
.agent-haut { display: flex; align-items: center; gap: 12px; }
.agent-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; }
.agent-ic svg { width: 21px; height: 21px; }
.agent-nom { font-weight: 650; }
.agent-role { color: var(--muted); font-size: 13.2px; min-height: 40px; }
.agent-bas { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--faint); }

.pastille {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 99px; white-space: nowrap;
}
.pastille .point { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pastille.en-cours .point { animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .25 } }

/* ---------- Boutons & champs ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 9px 16px; border-radius: 10px; border: 1px solid var(--border-2);
  background: var(--surface-2); cursor: pointer; font-weight: 600; font-size: 13.5px;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { border-color: var(--faint); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-principal { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-principal:hover { filter: brightness(1.08); border-color: var(--accent); }
.btn-vert { background: var(--green-soft); border-color: transparent; color: var(--green); }
.btn-rouge { background: var(--red-soft); border-color: transparent; color: var(--red); }
.btn-violet { background: var(--violet-soft); border-color: transparent; color: var(--violet); }
.btn-petit { padding: 6px 10px; font-size: 12.5px; border-radius: 8px; }
.btn-icone { padding: 7px; width: 34px; height: 34px; }

.champ { display: flex; flex-direction: column; gap: 6px; }
.champ label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.input, select.input, textarea.input {
  background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 10px;
  padding: 9px 12px; outline: none; transition: border-color .15s, box-shadow .15s; width: 100%;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.input { resize: vertical; min-height: 90px; }
input[type=range] { accent-color: var(--accent); width: 100%; }
.case { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; cursor: pointer; }
.case input { accent-color: var(--accent); width: 16px; height: 16px; }

/* ---------- Panneau de repérage ---------- */
.reperage { display: grid; grid-template-columns: 1.1fr 1.3fr 1.1fr auto; gap: 16px; align-items: end; }
@media (max-width: 1150px) { .reperage { grid-template-columns: 1fr 1fr; } }
.rayon-valeur { color: var(--text); font-weight: 700; }
.progression { margin-top: 18px; display: none; }
.progression.visible { display: block; }
.barre { height: 8px; background: var(--bg-2); border-radius: 99px; overflow: hidden; border: 1px solid var(--border); }
.barre > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--violet)); border-radius: 99px; transition: width .5s ease; }
.progression-texte { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 13px; color: var(--muted); }

/* ---------- Filtres & tableau ---------- */
.barre-filtres { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.onglets { display: flex; gap: 4px; background: var(--bg-2); padding: 4px; border-radius: 11px; border: 1px solid var(--border); }
.onglet { border: 0; background: none; padding: 6px 12px; border-radius: 8px; color: var(--muted); cursor: pointer; font-weight: 600; font-size: 13px; }
.onglet.actif { background: var(--surface-2); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.onglet .n { color: var(--faint); font-weight: 500; margin-left: 4px; }
.recherche { position: relative; flex: 1; min-width: 200px; max-width: 340px; }
.recherche svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.recherche .input { padding-left: 36px; }

.tableau-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .7px; color: var(--faint);
  font-weight: 650; padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; cursor: pointer; user-select: none; }
th:hover { color: var(--muted); }
td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr { cursor: pointer; transition: background .12s; }
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
.nom-cell b { display: block; font-weight: 600; }
.nom-cell span { color: var(--muted); font-size: 12.5px; }
.site-cell { color: var(--muted); font-size: 13px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resume-cell { color: var(--muted); font-size: 13px; max-width: 280px; }
.actions-cell { white-space: nowrap; text-align: right; }
.actions-cell .btn { opacity: .85; }

.note {
  display: inline-grid; place-items: center; min-width: 44px; height: 28px; padding: 0 8px; border-radius: 8px;
  font-weight: 700; font-size: 13px;
}
.vide { text-align: center; padding: 60px 20px; color: var(--muted); }
.vide svg { width: 42px; height: 42px; color: var(--faint); margin-bottom: 10px; }
.vide b { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }

/* ---------- Fiche entreprise (panneau latéral) ---------- */
.voile { position: fixed; inset: 0; background: rgba(5, 8, 15, .55); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 40; }
.voile.ouvert { opacity: 1; pointer-events: auto; }
.fiche {
  position: fixed; top: 0; right: 0; height: 100vh; width: min(560px, 100vw); background: var(--surface);
  border-left: 1px solid var(--border); box-shadow: var(--shadow); z-index: 50; transform: translateX(100%);
  transition: transform .28s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column;
}
.fiche.ouverte { transform: none; }
.fiche-haut { padding: 22px 24px 18px; border-bottom: 1px solid var(--border); display: flex; gap: 16px; align-items: flex-start; }
.fiche-haut h3 { margin: 0; font-size: 19px; }
.fiche-haut .metier { color: var(--muted); font-size: 13.5px; }
.fiche-corps { padding: 20px 24px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 22px; }
.fiche-bas { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 8px; flex-wrap: wrap; }
.jauge { width: 74px; height: 74px; flex: none; position: relative; display: grid; place-items: center; }
.jauge svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.jauge .chiffre { font-size: 21px; font-weight: 750; }
.jauge .chiffre small { font-size: 11px; color: var(--muted); font-weight: 500; }
.infos { display: grid; grid-template-columns: 22px 1fr; gap: 8px 10px; font-size: 13.5px; align-items: center; }
.infos svg { color: var(--faint); width: 16px; height: 16px; }
.section-titre { font-size: 11.5px; text-transform: uppercase; letter-spacing: .8px; color: var(--faint); font-weight: 650; margin-bottom: 10px; }
.controle { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 11px 0; border-bottom: 1px dashed var(--border); }
.controle:last-child { border-bottom: 0; }
.controle .etat { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; }
.controle .etat svg { width: 14px; height: 14px; stroke-width: 2.6; }
.controle b { font-weight: 600; font-size: 13.8px; }
.controle .detail { color: var(--muted); font-size: 13px; }
.controle .argument { margin-top: 5px; font-size: 12.8px; color: var(--violet); display: flex; gap: 6px; }
.controle .argument svg { width: 14px; height: 14px; margin-top: 2px; }
.resume-box { background: var(--bg-2); border: 1px solid var(--border); padding: 12px 14px; border-radius: 11px; font-size: 13.5px; }

/* ---------- Journal ---------- */
.journal { display: flex; flex-direction: column; max-height: 420px; overflow-y: auto; }
.ligne-journal { display: grid; grid-template-columns: 58px 10px 1fr; gap: 10px; padding: 8px 2px; font-size: 13.2px; border-bottom: 1px solid var(--border); align-items: baseline; }
.ligne-journal:last-child { border-bottom: 0; }
.ligne-journal .heure { color: var(--faint); font-variant-numeric: tabular-nums; font-size: 12px; }
.ligne-journal .puce { width: 7px; height: 7px; border-radius: 50%; margin-top: 6px; }
.lancement-ligne { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.lancement-ligne:hover, .lancement-ligne.actif { background: var(--surface-2); }
.lancement-ligne .quand { font-weight: 600; font-size: 13.5px; }
.lancement-ligne .params { color: var(--muted); font-size: 12.5px; }

/* ---------- Notification ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); opacity: 0; z-index: 90;
  background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 11px; font-weight: 600;
  box-shadow: var(--shadow); transition: all .25s; pointer-events: none; font-size: 13.5px;
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.credit { font-size: 11.5px; color: var(--faint); margin-top: 12px; }

/* ---------- Page de connexion : écran partagé ---------- */
.page-connexion { min-height: 100vh; }
.ecran-partage { display: grid; grid-template-columns: minmax(380px, 1.05fr) 1fr; min-height: 100vh; }

/* Panneau de marque : couleurs inversées par rapport au thème (clair sur sombre, sombre sur clair) */
.panneau-marque {
  --pm-fond: var(--text); --pm-texte: var(--bg); --pm-doux: color-mix(in srgb, var(--bg) 62%, var(--text));
  background: var(--pm-fond); color: var(--pm-texte); position: relative; overflow: hidden;
  padding: 44px 52px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
}
.panneau-marque::before {   /* fine grille décorative */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(color-mix(in srgb, var(--pm-texte) 7%, transparent) 1px, transparent 1px),
                    linear-gradient(90deg, color-mix(in srgb, var(--pm-texte) 7%, transparent) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%);
}
.panneau-marque::after {    /* halo de couleur */
  content: ""; position: absolute; width: 420px; height: 420px; right: -140px; bottom: -160px; border-radius: 50%;
  background: var(--accent); opacity: .16; filter: blur(70px); pointer-events: none;
}
.panneau-marque > * { position: relative; z-index: 1; }
.pm-logo { display: flex; align-items: center; gap: 12px; }
.pm-logo .logo-text { color: var(--pm-texte); font-size: 18px; }
.pm-logo .logo-text small { color: var(--pm-doux); }
.pm-mark { background: var(--pm-texte); color: var(--pm-fond); width: 42px; height: 42px; border-radius: 12px; }
.pm-mark .logo-svg { width: 34px; height: 34px; }
.pm-titre { font-size: clamp(26px, 2.6vw, 38px); line-height: 1.15; letter-spacing: -.8px; margin: 0 0 34px; font-weight: 700; max-width: 520px; }
.pm-liste { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 20px; max-width: 460px; }
.pm-liste li { display: flex; gap: 14px; align-items: flex-start; }
.pm-liste b { display: block; font-size: 15px; }
.pm-liste span:not(.pm-puce) { color: var(--pm-doux); font-size: 14px; }
.pm-puce { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; font-weight: 700; font-size: 13px;
  background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.pm-bas { color: var(--pm-doux); font-size: 12.5px; }

.cote-formulaire { display: grid; place-items: center; padding: 40px 24px; position: relative; }
.cote-formulaire::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(520px 360px at 50% 30%, var(--accent-soft), transparent 70%); }
.connexion-boite { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 18px; animation: apparition .35s ease; position: relative; }
.connexion-carte { padding: 32px 30px; box-shadow: var(--shadow); }
.connexion-carte h1 { margin: 0; font-size: 24px; letter-spacing: -.4px; }
.connexion-sous { margin: 4px 0 22px; color: var(--muted); }
.connexion-form { display: flex; flex-direction: column; gap: 16px; }
.connexion-form .input { padding: 11px 13px; }
.connexion-bouton { width: 100%; padding: 12px; font-size: 14.5px; margin-top: 4px; }
.connexion-erreur { background: var(--red-soft); color: var(--red); border-radius: 10px; padding: 10px 13px; font-size: 13.5px; font-weight: 600; margin-bottom: 16px; }
.connexion-lien { text-align: center; color: var(--muted); font-size: 13.5px; margin: 0; }

@media (max-width: 900px) {
  .ecran-partage { grid-template-columns: 1fr; }
  .panneau-marque { padding: 26px 24px; gap: 18px; }
  .pm-centre .pm-liste, .pm-bas { display: none; }
  .pm-titre { font-size: 22px; margin: 0; }
}
.mdp { position: relative; }
.mdp .input { padding-right: 44px; }
.mdp-oeil { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--faint); cursor: pointer; padding: 6px; border-radius: 8px; display: grid; }
.mdp-oeil:hover { color: var(--text); }

/* ---------- Compte dans la barre latérale ---------- */
.moi { display: flex; align-items: center; gap: 10px; padding: 10px 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); margin-top: 6px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none;
  background: linear-gradient(135deg, var(--accent), var(--violet)); color: #fff; }
.moi-nom { font-weight: 600; font-size: 13.5px; line-height: 1.2; }
.moi-nom small { display: block; color: var(--faint); font-weight: 400; font-size: 11.5px; }
.moi .btn-icone { margin-left: auto; width: 30px; height: 30px; padding: 5px; border-radius: 8px; background: none; border-color: transparent; color: var(--muted); }
.moi .btn-icone:hover { background: var(--surface-2); color: var(--text); }
.equipe { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.equipe .membre { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; }
.equipe .avatar { width: 24px; height: 24px; font-size: 11px; }

/* ---------- Fenêtre (changer de mot de passe) ---------- */
.modale { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(5,8,15,.55); backdrop-filter: blur(2px); }
.modale .carte { width: 100%; max-width: 400px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; }
.modale h3 { margin: 0; font-size: 18px; }
.code-activation { font-family: var(--font-mono, ui-monospace, Consolas, monospace); letter-spacing: 2px; text-transform: uppercase; }

/* ---------- Page Équipe ---------- */
.membre-ligne { display: grid; grid-template-columns: 40px 1fr auto auto; gap: 14px; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--border); }
.membre-ligne:last-child { border-bottom: 0; }
.membre-ligne .avatar { width: 36px; height: 36px; }
.membre-ligne .qui b { display: block; }
.membre-ligne .qui span { color: var(--muted); font-size: 12.8px; }
.membre-ligne .qui { min-width: 0; }
/* Ajouté par Noah le 2026-12-03 : poste du membre, modifiable sur place */
.membre-ligne .poste-membre { display: block; width: 100%; max-width: 300px; margin: 4px 0 3px; padding: 5px 10px; font-size: 13px; }
.code-affiche { font-family: ui-monospace, Consolas, monospace; font-size: 26px; font-weight: 700; letter-spacing: 3px; text-align: center;
  padding: 16px; border-radius: 12px; background: var(--bg-2); border: 1px dashed var(--border-2); user-select: all; }
.formulaire-membre { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: end; }
@media (max-width: 800px) { .formulaire-membre { grid-template-columns: 1fr; } }


/* ============ Intérieur v2 : menu groupé, pôles, accueil, pipeline ============ */
.sidebar { overflow-y: auto; }
.nav-titre:first-of-type { padding-top: 4px; }
.nav-item.bientot { opacity: .5; cursor: default; }
.nav-item.bientot:hover { background: none; color: var(--muted); }
.mini-bientot { margin-left: auto; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px;
  color: var(--faint); border: 1px solid var(--border-2); padding: 1px 6px; border-radius: 99px; }
.nav-item { position: relative; }
.pole-pastille { width: 6px; height: 6px; border-radius: 50%; display: inline-block; flex: none; }
.nav-item .pole-pastille { position: absolute; left: 4px; top: 50%; transform: translateY(-50%); }
.pole-sites { background: var(--pole-sites); } .pole-btp { background: var(--pole-btp); }
.pole-videos { background: var(--pole-videos); } .pole-veille { background: var(--pole-veille); }

.surtitre { display: flex; align-items: center; gap: 7px; font-size: 12px; text-transform: uppercase; letter-spacing: .9px;
  color: var(--faint); font-weight: 650; margin-bottom: 4px; }
.titre-section { font-size: 12px; text-transform: uppercase; letter-spacing: .9px; color: var(--faint); font-weight: 650; margin: 0 0 10px 2px; }
.carte h2 .sous a { color: var(--muted); }
.carte h2 .sous a:hover { color: var(--accent); }

/* À faire aujourd'hui */
.afaire { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); background:
  linear-gradient(135deg, color-mix(in srgb, var(--accent) 7%, var(--surface)), var(--surface)); }
.tache { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.tache:last-child { border-bottom: 0; padding-bottom: 2px; }
.tache-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.tache-texte { flex: 1; min-width: 0; }
.tache-texte b { display: block; font-weight: 600; }
.tache-texte span { color: var(--muted); font-size: 13px; }
.rien { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 6px 0 2px; }

/* Cartes des pôles */
.poles { grid-template-columns: 1.35fr 1fr; }
@media (max-width: 1150px) { .poles { grid-template-columns: 1fr; } }
.pole { border-top: 3px solid var(--pole); }
.pole-actif { cursor: pointer; transition: border-color .2s, transform .2s, box-shadow .2s; display: flex; flex-direction: column; gap: 18px; }
.pole-actif:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.pole-haut { display: flex; align-items: center; gap: 12px; }
.pole-haut b, .pole-mini b { display: block; font-weight: 650; font-size: 15px; }
.pole-haut span:not(.pastille):not(.point), .pole-mini > div > span { color: var(--muted); font-size: 13px; }
.pole-haut .pastille { margin-left: auto; }
.pole-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--pole) 15%, transparent); color: var(--pole); }
.pole-chiffres { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pole-chiffres b { display: block; font-size: 24px; font-weight: 700; letter-spacing: -.4px; line-height: 1.1; }
.pole-chiffres span { color: var(--muted); font-size: 12.5px; }
.entonnoir { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--border); }
.entonnoir > div { height: 100%; transition: width .5s ease; }
.pole-lien { display: flex; align-items: center; gap: 6px; color: var(--pole); font-weight: 600; font-size: 13.5px; }
.pole-lien svg { width: 16px; height: 16px; }
.poles-bientot { display: flex; flex-direction: column; gap: 10px; }
.pole-mini { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-top-width: 1px; border-left: 3px solid var(--pole); opacity: .78; }
.pole-mini .mini-bientot { margin-left: auto; }
.pole-mini .pole-ic { width: 34px; height: 34px; border-radius: 9px; }

/* Agents en lignes (accueil) */
.agent-ligne { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.agent-ligne:last-child { border-bottom: 0; }
.agent-ligne .agent-ic { width: 34px; height: 34px; border-radius: 10px; }
.agent-ligne .agent-ic svg { width: 18px; height: 18px; }
.agent-ligne .qui { flex: 1; min-width: 0; }
.agent-ligne .qui b { display: block; font-weight: 600; font-size: 14px; }
.agent-ligne .qui span { color: var(--faint); font-size: 12.5px; }
.agent-ligne.bientot { opacity: .55; }

/* Onglets de vues (Pipeline / Liste / Repérage) */
.onglets-vues { display: inline-flex; margin-bottom: 18px; }
.onglets-vues .onglet { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; }
.onglets-vues .onglet svg { width: 16px; height: 16px; }

/* Pipeline (colonnes) */
.pipeline { display: grid; grid-template-columns: repeat(6, minmax(168px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.colonne { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column;
  min-height: 320px; max-height: calc(100vh - 290px); transition: border-color .15s, background .15s; }
.colonne.survol { border-color: var(--accent); background: var(--accent-soft); }
.colonne-haut { display: flex; align-items: center; gap: 8px; padding: 12px 14px 10px; font-weight: 650; font-size: 13.5px; }
.colonne-haut .puce { width: 8px; height: 8px; border-radius: 50%; }
.colonne-haut .n { margin-left: auto; color: var(--muted); font-weight: 600; font-size: 12.5px; background: var(--surface); border: 1px solid var(--border); padding: 0 8px; border-radius: 99px; }
.colonne-corps { padding: 0 10px 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.colonne-vide { color: var(--faint); font-size: 12.5px; text-align: center; padding: 24px 8px; border: 1px dashed var(--border-2); border-radius: 10px; }
.carte-piste { background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 11px 12px; cursor: grab;
  display: flex; flex-direction: column; gap: 8px; transition: border-color .15s, box-shadow .15s, opacity .15s; }
.carte-piste:hover { border-color: var(--border-2); box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.carte-piste.en-glisse { opacity: .4; }
.carte-piste .haut { display: flex; gap: 8px; align-items: flex-start; }
.carte-piste .haut b { flex: 1; min-width: 0; font-weight: 600; font-size: 13.8px; line-height: 1.3; }
.carte-piste .note { min-width: 38px; height: 24px; font-size: 12px; }
.carte-piste .meta { color: var(--muted); font-size: 12.3px; }
.carte-piste .bas { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--faint); }
.carte-piste .bas .site { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voir-plus { text-align: center; font-size: 12.5px; color: var(--accent); cursor: pointer; padding: 6px; }
.colonne.refusees { opacity: .75; }

.journal-grand { max-height: none; }
.contenu { min-width: 0; }
.nav-item { white-space: nowrap; }
.nav-item .mini-bientot { font-size: 9.5px; padding: 0 5px; letter-spacing: .3px; }

/* =====================================================================
   AMBIANCE « A + C » — même logique que la page de connexion :
   menu aux couleurs inversées, une seule couleur vive (le bleu), le reste en gris.
   ===================================================================== */
.app { background: linear-gradient(to right, var(--text) 240px, transparent 240px); }

/* --- Menu de gauche inversé --- */
.sidebar {
  --s-fond: var(--text); --s-texte: var(--bg);
  --s-doux: color-mix(in srgb, var(--bg) 58%, var(--text));
  --s-survol: color-mix(in srgb, var(--bg) 8%, var(--text));
  --s-actif: color-mix(in srgb, var(--bg) 13%, var(--text));
  --s-bord: color-mix(in srgb, var(--bg) 16%, var(--text));
  background: var(--s-fond); color: var(--s-texte); border-right: 0;
}
.sidebar .logo-text { color: var(--s-texte); }
.sidebar .logo-text small { color: var(--s-doux); }
.sidebar .logo-mark { background: var(--s-texte); color: var(--s-fond); }
.sidebar .nav-titre { color: var(--s-doux); opacity: .8; }
.sidebar .nav-item { color: var(--s-doux); }
.sidebar .nav-item:hover { background: var(--s-survol); color: var(--s-texte); }
.sidebar .nav-item.actif { background: var(--s-actif); color: var(--s-texte); font-weight: 600; }
.sidebar .nav-item.actif svg { color: var(--accent); }
.sidebar .nav-item.bientot:hover { background: none; color: var(--s-doux); }
.sidebar .mini-bientot { color: var(--s-doux); border-color: var(--s-bord); }
.sidebar .nav-item .compte { background: var(--accent); color: #fff; }
.sidebar .moi { background: var(--s-survol); border-color: var(--s-bord); }
.sidebar .moi-nom { color: var(--s-texte); }
.sidebar .moi-nom small { color: var(--s-doux); }
.sidebar .moi .btn-icone { color: var(--s-doux); }
.sidebar .moi .btn-icone:hover { background: var(--s-actif); color: var(--s-texte); }
.avatar { background: var(--accent); }

/* --- Moins de couleurs : icônes et étiquettes neutres --- */
.t-accent { --point: var(--accent); } .t-green { --point: var(--green); } .t-amber { --point: var(--amber); }
.t-red { --point: var(--red); } .t-violet { --point: var(--violet); }
.agent-ic, .tache-ic, .kpi-ic, .pole-ic {
  background: var(--surface-2) !important; color: var(--muted) !important; border: 1px solid var(--border);
}
.pastille { background: var(--surface-2) !important; color: var(--text) !important; border: 1px solid var(--border); font-weight: 550; }
.pastille .point { background: var(--point, var(--muted)); }
.pastille:not(:has(.point))::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--point, var(--muted)); }
.pastille.en-cours { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }

/* Notes : neutres, sauf les meilleures pistes (note basse) en bleu */
.note { background: var(--surface-2) !important; color: var(--muted) !important; border: 1px solid var(--border); }
.note.t-green, .note.t-violet { color: var(--accent) !important; border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }

/* Boutons : Valider = bleu, le reste discret */
.btn-vert { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-vert:hover { filter: brightness(1.08); border-color: var(--accent); }
.btn-rouge, .btn-violet { background: var(--surface-2); border-color: var(--border-2); color: var(--muted); }
.btn-rouge:hover { color: var(--red); border-color: var(--red); }
.btn-violet:hover { color: var(--accent); border-color: var(--accent); }

/* Cartes plus aérées, bordures plus fines */
.carte { border-color: color-mix(in srgb, var(--border) 80%, transparent); }
.pole { border-top-width: 1px; border-top-color: var(--border); }
.pole-mini { border-left-width: 1px; border-left-color: var(--border); opacity: .7; }
.pole-lien { color: var(--accent); }
.pole-chiffres b { font-size: 28px; }
.afaire { background: var(--surface); border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); }
.entete h1 { font-size: 28px; letter-spacing: -.6px; }
.carte-piste .bas svg { color: var(--faint); }

/* Repérage automatique */
.reperage-auto { grid-template-columns: auto 140px 1fr 1.2fr 1fr auto; }
@media (max-width: 1150px) { .reperage-auto { grid-template-columns: 1fr 1fr; } }
.interrupteur { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: 13.5px; padding-bottom: 10px; white-space: nowrap; }
.interrupteur input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.glissiere { width: 38px; height: 22px; border-radius: 99px; background: var(--border-2); position: relative; transition: background .2s; flex: none; }
.glissiere::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.interrupteur input:checked + .glissiere { background: var(--accent); }
.interrupteur input:checked + .glissiere::after { transform: translateX(16px); }
.interrupteur input:focus-visible + .glissiere { box-shadow: 0 0 0 3px var(--accent-soft); }
.source-info { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--bg-2);
  border: 1px solid var(--border); font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.source-info b { color: var(--text); }
.source-info.alerte { border-color: color-mix(in srgb, var(--amber) 45%, var(--border)); }
.jauge-quota { flex: 1; max-width: 220px; height: 6px; border-radius: 99px; background: var(--border); overflow: hidden; margin-left: auto; }
.jauge-quota > div { height: 100%; background: var(--accent); }

/* ============ Agent Démarchage ============ */
.etapes-demarchage { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 6px; }
.etapes-demarchage > div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px; font-size: 13px; color: var(--muted); }
.etapes-demarchage span { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: 12.5px; margin-bottom: 8px; }
.etapes-demarchage b { display: block; color: var(--text); font-size: 14px; margin-bottom: 3px; }
.form-signature { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 6px; }
.apercu-signature { margin: 0; min-height: 66px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--border-2); font: 13px/1.5 inherit; white-space: pre-wrap; color: var(--text); }
@media (max-width: 1000px) { .etapes-demarchage, .form-signature { grid-template-columns: 1fr 1fr; } }

#f-demarche { border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border)); border-radius: 14px; padding: 16px;
              background: color-mix(in srgb, var(--accent) 5%, transparent); }
.demarche { display: flex; flex-direction: column; gap: 10px; }
.demarche textarea.input { min-height: 300px; font-size: 13.5px; line-height: 1.5; }
.demarche-boutons { display: flex; flex-wrap: wrap; gap: 8px; }
.demarche-boutons .btn { text-decoration: none; }
.aide-adresse { font-size: 12.5px; color: var(--muted); margin-top: -4px; }
.aide-adresse svg { width: 13px; height: 13px; vertical-align: -2px; }
.texte-rouge { color: var(--red); font-weight: 600; }
.autres-adresses { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.puce-adresse { border: 1px solid var(--border-2); background: var(--surface-2); border-radius: 99px; padding: 3px 10px; font-size: 12px; cursor: pointer; }
.puce-adresse:hover { border-color: var(--accent); color: var(--accent); }
.sauve { margin-left: auto; font-size: 11.5px; text-transform: none; letter-spacing: 0; color: var(--faint); font-weight: 500; }
.demarche-envoye { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--green); font-weight: 600; margin-bottom: 10px; }
.demarche-envoye svg { width: 15px; height: 15px; }
.demarche-attente { display: flex; gap: 12px; align-items: center; font-size: 13px; }
.demarche-attente span:not(.tourne) { display: block; color: var(--muted); }
.tourne { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--border-2); border-top-color: var(--accent); animation: tourner .8s linear infinite; }
@keyframes tourner { to { transform: rotate(360deg); } }
.btn-discret { background: transparent; border-color: transparent; color: var(--faint); }
.btn-discret:hover { color: var(--red); }
.btn.a-confirmer { background: var(--red-soft); color: var(--red); border-color: var(--red); }
.btn.clignote { animation: clignote 1.2s ease-in-out 3; }
@keyframes clignote { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 35%, transparent); } }
.consigne { display: flex; gap: 8px; font-size: 12.8px; color: var(--muted); background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.consigne svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--accent); }
.consigne b { color: var(--text); }
.demarche-texte { font-size: 13.5px; color: var(--muted); margin: 0 0 12px; }
.demarche-revoir { margin-top: 12px; font-size: 13px; }
.demarche-revoir summary { cursor: pointer; color: var(--muted); }
.demarche-revoir pre { white-space: pre-wrap; font: 12.8px/1.5 inherit; background: var(--surface-2); border-radius: 10px; padding: 12px; margin-top: 8px; color: var(--text); }
.tourne.petit { width: 14px; height: 14px; border-width: 2px; display: inline-block; vertical-align: -2px; }
.btn-grand { padding: 12px 20px; font-size: 15px; }
.petit-titre { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 600; margin-top: 4px; }
.etapes-envoi { margin: 4px 0 14px 18px; padding: 0; display: grid; gap: 8px; font-size: 13.5px; color: var(--muted); }
.etapes-envoi b { color: var(--text); }
.etapes-envoi a { color: var(--accent); }
.script-boite { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; }
.script-boite textarea { font: 11.5px/1.45 ui-monospace, Consolas, monospace; flex: 1; }
.form-envoi { display: flex; gap: 10px; }
.form-envoi .input { flex: 1; }
.pastille-ok, .pastille-attente { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; }
.pastille-ok { color: var(--green); } .pastille-attente { color: var(--amber, #d99a1a); }
.pastille-ok svg, .pastille-attente svg { width: 14px; height: 14px; }
.envoi-ligne { display: flex; gap: 8px; align-items: stretch; }
.code-envoi { width: 150px; flex: none; letter-spacing: .25em; text-align: center; }
.code-envoi::placeholder { letter-spacing: 0; }
.bloc-code { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.bloc-code h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 0; }
.bloc-code h3 svg { width: 16px; height: 16px; color: var(--accent); }
.connexion-note { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
/* Contacts trouvés (mail / téléphone) — ajouté par Noah le 2026-12-03 */
.contacts { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; margin-top: 4px; }
.contacts span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.contacts svg { width: 12px; height: 12px; }
.contacts .c-mail { color: var(--green); font-weight: 600; }
.contacts .c-tel { color: var(--text); }
.contacts .c-rien { color: var(--faint); }
.contact-cell .contacts { flex-direction: column; margin: 0; gap: 2px; }

/* Espace client (fiche) + demandes du site — ajouté par Noah le 2026-12-03 */
.code-mail { margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; }
.code-mail.ok { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); }
.code-mail.ko { background: var(--red-soft); color: var(--red); }
#f-projet { display: grid; gap: 12px; }
.projet-acces { display: flex; gap: 10px; align-items: center; font-size: 13.5px; }
.projet-acces > svg { width: 18px; height: 18px; color: var(--green); flex: none; }
.projet-acces div { flex: 1; min-width: 0; }
.projet-acces b { display: block; overflow: hidden; text-overflow: ellipsis; }
.projet-acces span { color: var(--muted); font-size: 12.5px; }
.projet-ouvrir p { margin: 0 0 10px; font-size: 13.5px; color: var(--muted); }
.projet-ouvrir-champs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.projet-ligne { display: grid; grid-template-columns: 150px 1fr; gap: 10px; align-items: center; font-size: 13.5px; }
.projet-ligne label { color: var(--muted); }
.p-fil { display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow-y: auto; }
.p-bulle { max-width: 88%; padding: 9px 12px; border-radius: 12px; background: var(--surface-2); font-size: 13.5px; white-space: pre-wrap; word-wrap: break-word; }
.p-bulle.nous { align-self: flex-end; background: color-mix(in srgb, var(--accent) 18%, var(--surface-2)); }
.p-bulle small { display: block; color: var(--faint); font-size: 11.5px; margin-top: 3px; }
.p-ecrire { display: grid; gap: 8px; }
.p-ecrire .btn { justify-self: end; }
.p-fichiers { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.p-fichiers li { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.p-fichiers img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; flex: none; }
.p-fichiers svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.p-fichiers a { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.p-fichiers span { margin-left: auto; color: var(--faint); white-space: nowrap; font-size: 12px; }
.p-deposer { justify-self: start; cursor: pointer; }
.liste-demandes { display: grid; gap: 10px; max-height: 60vh; overflow-y: auto; }
.demande { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: grid; gap: 6px; font-size: 13.5px; }
.demande.traitee { opacity: .6; }
.demande-haut { display: flex; justify-content: space-between; }
.demande-haut span, .demande-infos { color: var(--muted); }
.demande p { margin: 0; white-space: pre-wrap; }
.demande .btn { justify-self: start; }

.demande.carte { padding: 18px 20px; }
.demande-infos svg { width: 13px; height: 13px; vertical-align: -2px; margin-right: 2px; }
.demande-infos a { color: var(--text); }
.demande-bas { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
#page-liste-demandes { max-height: none; }

/* Page Espaces clients — ajouté par Noah le 2026-12-03 */
.ec-form { display: grid; gap: 14px; margin-bottom: 18px; }
.ec-champs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.espaces-grille { display: grid; grid-template-columns: 340px 1fr; gap: 18px; align-items: start; }
.espaces-liste { padding: 8px; display: grid; gap: 2px; max-height: calc(100vh - 220px); overflow-y: auto; }
.espace-ligne { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-radius: 10px;
                padding: 11px 12px; cursor: pointer; color: var(--text); font: inherit; }
.espace-ligne:hover { background: var(--surface-2); }
.espace-ligne.actif { background: color-mix(in srgb, var(--accent) 14%, var(--surface-2)); }
.espace-ligne .qui { flex: 1; min-width: 0; }
.espace-ligne .qui b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.espace-ligne .qui span { color: var(--muted); font-size: 12.5px; }
.espace-ligne .compte { background: var(--accent); color: #fff; border-radius: 99px; font-size: 11.5px; padding: 1px 7px; font-weight: 700; }
.espace-detail { min-height: 300px; }
.espace-haut { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.espace-haut h2 { margin: 0 0 2px; }
.ec-infos { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.avec-bouton { display: flex; gap: 8px; align-items: center; }
.avec-bouton .input { flex: 1; }
@media (max-width: 1100px) { .espaces-grille { grid-template-columns: 1fr; } .ec-champs, .ec-infos { grid-template-columns: 1fr 1fr; } }

/* Maintenance (Ajouté par Noah le 2026-12-03) */
.choix-maintenance { display: grid; gap: 10px; }
.choix-m { display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; border: 1px solid var(--border); border-radius: 12px;
           cursor: pointer; background: var(--surface-2); }
.choix-m input { margin-top: 3px; accent-color: var(--accent); }
.choix-m b { display: block; font-size: 14px; }
.choix-m small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.choix-m:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.bandeau-maintenance { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; padding: 11px 14px;
                       border-radius: 12px; background: var(--amber-soft); color: var(--amber); font-size: 13.5px; font-weight: 600; }
.bandeau-maintenance[hidden] { display: none; }
.bandeau-maintenance a.btn { margin-left: auto; }
.compte-alerte { background: var(--amber) !important; color: #1a1200 !important; }

/* Récap du jour (Ajouté par Noah le 2026-12-03) */
.recap-liste { list-style: none; display: grid; gap: 2px; margin: 0; padding: 0; }
.recap-liste li a { display: block; padding: 9px 12px; border-radius: 10px; color: var(--text); text-decoration: none; font-size: 14px; }
.recap-liste li a::before { content: "•"; color: var(--accent); margin-right: 10px; font-weight: 700; }
.recap-liste li a:hover { background: var(--accent-soft); }
.recap-reglage { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px;
                 border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.recap-reglage .input { max-width: 260px; padding: 7px 10px; }
.recap-reglage .credit { margin: 0; }

/* Qui fait quoi */
.sj-form { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
.sj-large { grid-column: 1 / -1; }
.sj-form .label, .re-form .label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.sj-parties { display: flex; flex-wrap: wrap; gap: 8px; }
.puce { cursor: pointer; }
.puce input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.puce span { display: inline-block; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border-2); font-size: 13px; color: var(--muted); }
.puce input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.puce input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }
.sj-bas { display: flex; align-items: center; gap: 12px; justify-content: flex-end; }
.sj-alerte { flex: 1; display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 10px;
             background: var(--amber-soft); color: var(--amber); font-size: 13px; }
.sj-alerte svg { flex: none; width: 16px; height: 16px; margin-top: 2px; }
.sj-alerte[hidden] { display: none; }
.sj-liste { display: grid; gap: 12px; }
.sj-sujet { padding: 16px 18px; }
.sj-sujet.sj-en_cours { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.sj-haut { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sj-haut b { font-size: 15px; flex: 1; min-width: 180px; }
.sj-qui { font-weight: 600; font-size: 13px; color: var(--muted); }
.sj-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.sj-tags span { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }
.sj-sujet p { margin: 10px 0 0; color: var(--muted); font-size: 13.5px; white-space: pre-line; }
.sj-actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.sj-actions .credit { margin: 0 auto 0 0; }

/* Site de l'agence : réalisations et tarifs */
.re-form { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.re-form .champ:nth-child(1) { grid-column: span 2; }
.re-form .champ:nth-child(4), .re-form .champ:nth-child(5) { grid-column: span 2; }
.re-large { grid-column: 1 / -1; }
.re-form .champ:has(.re-image) { grid-column: span 2; }
.re-image { position: relative; display: grid; place-items: center; height: 130px; border: 1.5px dashed var(--border-2); border-radius: 12px;
            cursor: pointer; background: var(--surface-2) center / cover no-repeat; color: var(--muted); font-size: 13px; }
.re-image input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.re-image.remplie span { background: rgba(0,0,0,.55); color: #fff; padding: 5px 10px; border-radius: 999px; }
.re-image:focus-within { border-color: var(--accent); }
.re-bas { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.re-bas .case { margin-right: auto; }
.re-liste { display: grid; gap: 12px; }
.re-carte { display: grid; grid-template-columns: 240px 1fr auto; gap: 18px; align-items: center; padding: 14px; }
.re-carte.re-cachee { opacity: .65; }
.re-images { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.re-images img, .re-sans { width: 100%; height: 72px; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.re-sans { display: grid; place-items: center; font-size: 11px; color: var(--faint); border: 1px dashed var(--border); }
.re-infos b { display: block; font-size: 15px; }
.re-infos span { color: var(--muted); font-size: 13px; }
.re-infos p { margin: 6px 0; color: var(--muted); font-size: 13.5px; }
.re-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ta-liste { display: grid; gap: 10px; }
.ta-ligne { display: grid; grid-template-columns: 1fr auto 1.4fr auto; gap: 10px; align-items: center; padding: 10px;
            border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.ta-prix { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.ta-prix input[data-k=prix] { width: 80px; text-align: right; }
.ta-prix input[data-k=suffixe] { width: 120px; }
@media (max-width: 1000px) {
  .ta-ligne { grid-template-columns: 1fr auto; }
  .ta-ligne .ta-detail { grid-column: 1 / -1; }
  .re-form { grid-template-columns: 1fr 1fr; }
  .re-form .champ:nth-child(1), .re-form .champ:nth-child(4), .re-form .champ:nth-child(5), .re-form .champ:has(.re-image) { grid-column: span 1; }
  .re-carte { grid-template-columns: 1fr; }
  .sj-form { grid-template-columns: 1fr; }
}

/* Message vert sur la page de connexion (mot de passe changé, lien envoyé) — Ajouté par Noah le 2026-12-03 */
.connexion-ok { background: var(--green-soft); color: var(--green); border-radius: 10px; padding: 10px 13px; font-size: 13.5px; font-weight: 600; margin-bottom: 16px; line-height: 1.45; }

/* Avis clients et FAQ (page Site de l'agence) — Ajouté par Noah le 2026-12-03 */
.av-alerte { padding: 10px 13px; border-radius: 10px; background: var(--amber-soft); color: var(--amber); font-size: 13px; margin-bottom: 12px; }
.av-ligne { grid-template-columns: 1.2fr 1.2fr 110px 130px 1fr auto auto; }
.av-ligne .av-texte { grid-column: 1 / -1; grid-row: 2; }
.fq-ligne { grid-template-columns: 1fr 2fr auto; align-items: start; }
@media (max-width: 1000px) { .av-ligne, .fq-ligne { grid-template-columns: 1fr 1fr; } .av-ligne .av-texte { grid-row: auto; } }

/* =====================================================================
   AMBIANCE « SITE » (Modifié par Noah le 2026-12-03)
   L'espace équipe reprend le style du site public (maquette PDF) : bleu nuit, halos bleus,
   titres de page en serif fine « Instrument Serif » avec un mot en italique, texte en « DM Sans ».
   Sombre seulement (plus de mode clair). Ce bloc vient APRÈS « A + C » et le remplace.
   ===================================================================== */
@font-face { font-family: "Instrument Serif"; src: url("/static/fonts/instrument-serif-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/static/fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("/static/fonts/dm-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("/static/fonts/dm-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("/static/fonts/dm-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }

:root, [data-theme="sombre"], [data-theme="clair"] {
  --bg: #0A1D3F;            /* fond des pages : bleu nuit du site */
  --bg-2: #081733;
  --surface: #10284F;       /* cartes */
  --surface-2: #143060;     /* champs, petits blocs */
  --border: #21406F;
  --border-2: #2D5089;
  --text: #EEF3FC;
  --muted: #A1B5D8;
  --faint: #6F87B0;
  --accent: #5AA0FF;        /* le bleu du site, éclairci pour rester lisible sur le bleu nuit */
  --accent-soft: rgba(90, 160, 255, .16);
  --bleu-pale: #B9D3F8;     /* mots en italique, comme sur le site */
  --green: #4ADE9B;  --green-soft: rgba(74, 222, 155, .14);
  --amber: #FFC857;  --amber-soft: rgba(255, 200, 87, .14);
  --red: #FF8A8A;    --red-soft: rgba(255, 138, 138, .14);
  --violet: #B9A4FF; --violet-soft: rgba(185, 164, 255, .14);
  --shadow: 0 18px 40px -18px rgba(2, 10, 30, .7);
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", "Times New Roman", serif;
  color-scheme: dark;
}
body {
  background:
    radial-gradient(ellipse 55% 45% at 88% -5%, rgba(50, 120, 230, .45), transparent 70%),
    radial-gradient(ellipse 40% 50% at 15% 105%, rgba(40, 110, 230, .35), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
.app { background: none; }

/* --- Menu de gauche : bleu nuit, comme le bas de page du site --- */
.sidebar {
  --s-fond: #061430; --s-texte: #FFFFFF; --s-doux: #95ABD2;
  --s-survol: rgba(255, 255, 255, .06); --s-actif: rgba(90, 160, 255, .16); --s-bord: rgba(255, 255, 255, .12);
  background: var(--s-fond); border-right: 1px solid rgba(255, 255, 255, .07);
}
.sidebar .logo, .pm-logo { gap: 11px; }
.logo-p { width: 34px; height: 34px; flex: none; }
.logo-text { font-family: var(--serif); font-weight: 400; font-size: 19.5px; line-height: 1.05; letter-spacing: 0; white-space: nowrap; }
.logo-text em { font-style: italic; }
.logo-text small { font-family: var(--font); font-size: 11.5px; margin-top: 4px; letter-spacing: .02em; }
.sidebar .nav-item.actif { background: var(--s-actif); color: #fff; }
.sidebar .nav-item.actif svg { color: var(--accent); }
.sidebar .nav-titre { letter-spacing: .2em; font-size: 10.5px; }

/* --- Titres de page en serif, avec un mot en italique bleu pâle --- */
.entete h1, #salut { font-family: var(--serif); font-weight: 400; font-size: 44px; line-height: 1.02; letter-spacing: -0.01em; }
.entete h1 em, #salut em { color: var(--bleu-pale); }
.entete p { font-size: 15px; }

/* --- Cartes : bleu nuit légèrement transparent, comme les cartes « verre » du site --- */
.carte, .afaire { background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .025)), rgba(8, 23, 51, .55);
                  border: 1px solid rgba(255, 255, 255, .1); }
.carte-piste { background: var(--surface); border-color: rgba(255, 255, 255, .09); }
.input { background: rgba(4, 14, 34, .55); border-color: rgba(255, 255, 255, .13); }
.input:focus { border-color: var(--accent); }

/* --- Boutons : bleu plein en pilule pour l'action principale, comme sur le site --- */
.btn { border-radius: 999px; }
.btn-principal, .btn-vert { background: #2F7BEA; border-color: #2F7BEA; color: #fff; }
.btn-principal:hover, .btn-vert:hover { background: #3E8BFA; border-color: #3E8BFA; filter: none; }
.btn-icone { border-radius: 10px; }

/* --- Page de connexion : panneau de gauche en dégradé bleu, comme le haut du site --- */
.panneau-marque {
  --pm-fond: transparent; --pm-texte: #FFFFFF; --pm-doux: rgba(255, 255, 255, .78);
  background: radial-gradient(ellipse 60% 45% at 50% -5%, rgba(255, 255, 255, .3), transparent 70%),
              radial-gradient(ellipse 50% 60% at 10% 30%, rgba(80, 160, 255, .35), transparent 70%),
              linear-gradient(170deg, #3580E6 0%, #2463CF 45%, #1C52B3 100%);
}
.panneau-marque::before { opacity: .25; }
.panneau-marque::after { background: #9cc6ff; opacity: .18; }
.pm-titre { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 3.8vw, 56px); line-height: 1.02; letter-spacing: -0.015em; }
.pm-titre em { color: var(--bleu-pale); }
.pm-puce { background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .28); border-radius: 50%; }
.connexion-carte h1 { font-family: var(--serif); font-weight: 400; font-size: 34px; letter-spacing: 0; }
.cote-formulaire { background: transparent; }

/* Page de connexion de l'équipe : simple, une seule colonne sur le bleu nuit (Modifié par Noah le 2026-12-03) */
.ecran-simple { min-height: 100vh; display: grid; }
.ecran-simple .cote-formulaire { min-height: 100vh; }
.connexion-marque { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 6px; }
.connexion-marque .logo-p { width: 40px; height: 40px; }
.connexion-marque .logo-text { font-size: 26px; color: #fff; }
.connexion-marque .logo-text small { color: var(--muted); }

/* Accueil : un seul pôle pour l'instant (les pôles « bientôt » sont retirés) — Noah, 2026-12-03 */
.poles.poles-seul { grid-template-columns: 1fr; }

/* =====================================================================
   CALENDRIER DE L'ÉQUIPE (ajouté par Noah le 2026-12-03) — calendrier.js
   ===================================================================== */
.c-bleu { --c: #5AA0FF; } .c-violet { --c: #B9A4FF; } .c-vert { --c: #4ADE9B; } .c-orange { --c: #FFB257; }
.c-cyan { --c: #4FD6E8; } .c-gris { --c: #9AAAC6; } .c-rose { --c: #FF8FC7; } .c-auto { --c: #FFC857; }
.cal-barre { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-nav, .cal-droite { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cal-titre { margin: 0 0 0 10px; font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1; }
.cal-titre::first-letter { text-transform: uppercase; }
.cal-titre em { color: var(--bleu-pale); }
.cal-synchro { display: inline-flex; align-items: center; gap: 7px; border: 1px solid rgba(255,255,255,.13); background: rgba(4,14,34,.45);
  color: var(--muted); border-radius: 999px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.cal-synchro svg { width: 15px; height: 15px; }
.cal-synchro.vert { color: var(--green); border-color: rgba(74,222,155,.35); }
.cal-synchro.rouge { color: var(--red); border-color: rgba(255,138,138,.4); }
.cal-synchro:disabled svg { animation: cal-tourne 1s linear infinite; }
@keyframes cal-tourne { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cal-synchro:disabled svg { animation: none; } }
.cal-legende { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 14px; font-size: 12.5px; color: var(--muted); }
.cal-leg { display: inline-flex; align-items: center; gap: 6px; }
.cal-leg i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.cal-alerte { padding: 12px 14px; border-radius: 12px; background: var(--amber-soft); color: var(--amber); font-size: 13.5px; margin-bottom: 14px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cal-alerte b { color: var(--text); }

/* Vue mois */
.cal-mois { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid rgba(255,255,255,.1); border-radius: 16px; overflow: hidden;
  background: rgba(8,23,51,.45); }
.cal-tete { padding: 9px 10px; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint);
  border-bottom: 1px solid rgba(255,255,255,.08); }
.cal-case { min-height: 118px; padding: 6px 6px 8px; border-right: 1px solid rgba(255,255,255,.06); border-bottom: 1px solid rgba(255,255,255,.06);
  display: flex; flex-direction: column; gap: 3px; cursor: pointer; min-width: 0; transition: background .15s; }
.cal-case:nth-child(7n) { border-right: 0; }
.cal-case:hover { background: rgba(255,255,255,.025); }
.cal-case.we { background: rgba(0,0,0,.08); }
.cal-case.autre-mois .cal-num span { color: var(--faint); opacity: .6; }
.cal-case.cible, .cal-col.cible { background: var(--accent-soft); outline: 2px dashed var(--accent); outline-offset: -3px; }
.cal-num { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--muted); padding: 0 2px 2px; }
.cal-num span { min-width: 26px; height: 26px; display: inline-grid; place-items: center; border-radius: 999px; }
.cal-case.auj .cal-num span { background: #2F7BEA; color: #fff; }
.cal-plus { border: 0; background: none; color: var(--faint); font-size: 18px; line-height: 1; width: 24px; height: 24px; border-radius: 8px; cursor: pointer; opacity: 0; }
.cal-case:hover .cal-plus, .cal-col:hover .cal-plus, .cal-plus:focus-visible { opacity: 1; }
.cal-plus:hover { background: rgba(255,255,255,.08); color: var(--text); }
.cal-ev { display: block; width: 100%; text-align: left; border: 0; border-left: 3px solid var(--c); background: color-mix(in srgb, var(--c) 14%, transparent);
  color: var(--text); font-size: 12px; padding: 3px 6px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.cal-ev.plein { background: color-mix(in srgb, var(--c) 30%, transparent); }
.cal-ev b { font-weight: 600; color: var(--c); }
.cal-ev:hover { filter: brightness(1.15); }
.cal-reste { border: 0; background: none; color: var(--muted); font-size: 11.5px; text-align: left; padding: 1px 6px; cursor: pointer; }
.cal-reste:hover { color: var(--text); text-decoration: underline; }

/* Vue semaine */
.cal-semaine { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.cal-col { min-height: 360px; padding: 8px; border-radius: 14px; background: rgba(8,23,51,.45); border: 1px solid rgba(255,255,255,.08);
  display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cal-col.auj { border-color: rgba(90,160,255,.55); }
.cal-col-tete { display: flex; align-items: baseline; gap: 6px; padding: 2px 4px 6px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.cal-col-tete b { font-family: var(--serif); font-weight: 400; font-size: 26px; color: var(--text); letter-spacing: 0; text-transform: none; }
.cal-col.auj .cal-col-tete b { color: var(--accent); }
.cal-col-tete .cal-plus { margin-left: auto; }
.cal-carte { display: flex; flex-direction: column; gap: 3px; width: 100%; text-align: left; border: 0; border-left: 3px solid var(--c); cursor: pointer;
  background: color-mix(in srgb, var(--c) 12%, rgba(8,23,51,.6)); color: var(--text); border-radius: 8px; padding: 8px 9px; font-size: 12.5px; min-width: 0; }
.cal-carte:hover { filter: brightness(1.12); }
.cal-carte b { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.cal-carte-quand { color: var(--c); font-weight: 600; font-size: 12px; }
.cal-carte span:not(.cal-carte-quand) { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.cal-carte svg { width: 13px; height: 13px; flex: none; }
.cal-vide { border: 1px dashed rgba(255,255,255,.12); background: none; color: var(--faint); border-radius: 8px; padding: 10px; font-size: 12px; cursor: pointer; }
.cal-vide:hover { color: var(--text); border-color: var(--accent); }

/* Vue « À venir » */
.cal-liste { display: flex; flex-direction: column; gap: 14px; }
.cal-liste-jour { display: grid; grid-template-columns: 210px 1fr; gap: 14px; align-items: start; }
.cal-liste-date { font-weight: 600; color: var(--muted); padding-top: 8px; }
.cal-liste-date::first-letter, .cal-prochain-date::first-letter { text-transform: uppercase; }
.cal-liste-jour.auj .cal-liste-date { color: var(--accent); }
.cal-liste-evs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; align-items: start; }

/* Fenêtre d'un événement */
.modale .carte.cal-form { max-width: 620px; max-height: calc(100vh - 40px); overflow: auto; }
.cal-form-haut { display: flex; align-items: center; justify-content: space-between; }
.cal-form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.cal-quand { display: flex; gap: 6px; min-width: 0; }
.cal-quand .input { min-width: 0; padding-left: 9px; padding-right: 6px; }
.cal-quand .input[type=date] { flex: 1.4; } .cal-quand .input[type=time] { flex: 1; }
.cal-journee { padding-bottom: 10px; }
.cal-qui { display: flex; flex-wrap: wrap; gap: 6px; }
.cal-puce { border: 1px solid rgba(255,255,255,.13); border-radius: 999px; padding: 5px 11px 5px 8px; font-size: 12.5px; }
.cal-puce:has(input:checked) { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
.cal-form .label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.cal-form-bas { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Accueil : les 7 prochains jours */
.cal-prochains { display: flex; flex-direction: column; gap: 10px; }
.cal-prochain-jour { display: grid; grid-template-columns: 150px 1fr; gap: 12px; }
.cal-prochain-date { color: var(--muted); font-weight: 600; font-size: 13px; padding-top: 6px; }
.cal-prochain-jour > div:last-child { display: flex; flex-wrap: wrap; gap: 6px; }
.cal-prochain { display: inline-flex; align-items: baseline; gap: 7px; padding: 6px 11px; border-radius: 10px; border-left: 3px solid var(--c);
  background: color-mix(in srgb, var(--c) 12%, transparent); color: var(--text); font-size: 13px; }
.cal-prochain:hover { text-decoration: none; filter: brightness(1.15); }
.cal-prochain span { color: var(--c); font-weight: 600; font-size: 12px; }
.cal-prochain small { color: var(--muted); }

@media (max-width: 1100px) { .cal-semaine { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cal-liste-jour, .cal-prochain-jour { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .cal-case { min-height: 74px; } .cal-ev { font-size: 0; padding: 0; height: 6px; } .cal-form-2 { grid-template-columns: 1fr; } }

/* =====================================================================
   ESPACE FINANCES (ajouté par Noah le 2026-12-03) — finances.js
   ===================================================================== */
.fin-onglets { margin-bottom: 18px; flex-wrap: wrap; }
.fin-onglets .onglet { display: inline-flex; align-items: center; gap: 6px; }
.fin-onglets .onglet svg { width: 15px; height: 15px; }
.fin-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--amber-soft); color: var(--amber);
  font-size: 13.5px; margin: 0 0 14px; }
.fin-note b { color: var(--text); }
.fin-note svg { flex: none; margin-top: 1px; }
.fin-note.vert { background: var(--green-soft); color: var(--green); }
.fin-outils { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.fin-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fin-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.fin-kpi { display: flex; flex-direction: column; gap: 4px; padding: 16px; }
.fin-kpi span { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.fin-kpi b { font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1.05; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.fin-kpi small { color: var(--faint); font-size: 12px; }
.fin-kpi.alerte b { color: var(--red); }
.fin-graph { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 10px; }
.fin-barre { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; min-width: 0; }
.fin-barre i { display: block; width: 100%; max-width: 34px; min-height: 2px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #5AA0FF, #2F7BEA); }
.fin-barre span { font-size: 11px; color: var(--faint); white-space: nowrap; }
.fin-ligne { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.06); font-size: 13.5px; align-items: baseline; }
.fin-ligne:last-child { border-bottom: 0; }
.fin-ligne span { color: var(--muted); }
.fin-ligne b { font-variant-numeric: tabular-nums; text-align: right; display: inline-flex; align-items: center; gap: 6px; }
.fin-ligne.total { border-top: 1px solid rgba(255,255,255,.2); border-bottom: 0; margin-top: 4px; padding-top: 10px; font-size: 16px; }
.fin-ligne.total span { color: var(--text); font-weight: 600; }
.fin-ligne.rouge b { color: var(--red); } .fin-ligne.vert b { color: var(--green); }
.fin-plafond { margin-bottom: 12px; }
.fin-jauge { height: 8px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.fin-jauge i { display: block; height: 100%; border-radius: 99px; }
.fin-rembourser { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); font-size: 13px; }
.fin-table-carte { padding: 0; overflow-x: auto; }
.fin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.fin-table th { text-align: left; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); font-weight: 600; padding: 11px 12px;
  border-bottom: 1px solid rgba(255,255,255,.08); white-space: nowrap; }
.fin-table td { padding: 11px 12px; border-bottom: 1px solid rgba(255,255,255,.05); vertical-align: middle; }
.fin-table tbody tr:last-child td { border-bottom: 0; }
.fin-table tbody tr[data-ouvrir-devis], .fin-table tbody tr[data-ouvrir-facture], .fin-table tbody tr[data-abo], .fin-table tbody tr[data-article] { cursor: pointer; }
.fin-table tbody tr[data-ouvrir-devis]:hover, .fin-table tbody tr[data-ouvrir-facture]:hover, .fin-table tbody tr[data-abo]:hover, .fin-table tbody tr[data-article]:hover { background: rgba(255,255,255,.03); }
.fin-table tfoot td { padding: 12px; border-top: 1px solid rgba(255,255,255,.12); }
.fin-table .n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fin-table small { display: block; color: var(--faint); font-size: 12px; margin-top: 2px; }
.fin-table .fin-objet { max-width: 320px; }
.fin-table tr.fin-retard td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.fin-table tr.fin-inactif { opacity: .55; }
.fin-boutons { white-space: nowrap; text-align: right; }
.fin-boutons .btn-icone { width: 32px; height: 32px; padding: 6px; }
.fin-type { text-transform: lowercase; }
.fin-vu { color: var(--green) !important; }
/* Éditeur de devis / facture */
.fin-ed-haut { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.fin-ed-titre { margin: 0; flex: 1; font-family: var(--serif); font-weight: 400; font-size: 30px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fin-ed-titre .pastille { font-family: var(--font); }
.fin-ed { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.fin-ed-gauche { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.fin-ed-droite { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 16px; }
.fin-ed-actions { display: flex; flex-direction: column; gap: 8px; }
.fin-ed-actions .btn { justify-content: flex-start; width: 100%; }
.fin-ed-actions .credit { margin-top: 4px; }
.fin-totaux .fin-ligne.total b { font-family: var(--serif); font-weight: 400; font-size: 26px; }
.fin-form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fin-form-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fin-avec-bouton { display: flex; gap: 6px; } .fin-avec-bouton .input { flex: 1; min-width: 0; }
.fin-table-lignes td { padding: 4px 5px; vertical-align: top; border-bottom: 0; }
.fin-table-lignes tbody.fin-item { border-bottom: 1px solid rgba(255,255,255,.07); }
.fin-table-lignes tbody.fin-item tr:last-child td { padding-bottom: 10px; }
.fin-table-lignes tbody.fin-item tr:first-child td { padding-top: 10px; }
.fin-designation { font-weight: 600; }
.fin-sous-ligne td:first-child { width: 100%; }
.fin-table-lignes th { padding: 6px; }
.fin-table-lignes .input { padding: 7px 9px; font-size: 13.5px; }
.fin-table-lignes .fin-desc { font-size: 12.5px; color: var(--muted); resize: vertical; min-height: 34px; width: 100%; }
.fin-table-lignes .fin-boutons { vertical-align: middle; }
.fin-court { width: 64px; text-align: right; } .fin-moyen { width: 96px; text-align: right; } .fin-unite { width: 104px; padding-right: 4px !important; }
.fin-montant { padding-top: 13px !important; font-weight: 600; }
.fin-section td { padding-top: 12px !important; }
.fin-section .input { font-weight: 600; color: var(--accent); background: transparent; border-style: dashed; }
.fin-ajouts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
.fin-choix-cat { max-width: 340px; padding: 6px 10px; font-size: 13px; }
/* Formulaires courts */
.modale .carte.fin-fenetre { max-width: 520px; max-height: calc(100vh - 40px); overflow: auto; }
.modale .carte.fin-fenetre.large { max-width: 680px; }
.fin-fen-corps { display: flex; flex-direction: column; gap: 12px; }
.fin-fen-corps .label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.fin-radios { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.fin-form-dep { display: grid; grid-template-columns: 150px 2fr 1fr 1fr 120px 1fr; gap: 10px; align-items: end; }
.fin-form-dep .fin-large { grid-column: span 1; }
.fin-form-dep .champ:nth-child(7) { grid-column: 1 / span 3; }
.fin-bas-form { display: flex; justify-content: flex-end; align-items: end; }
.fin-form-dep .fin-bas-form { grid-column: 4 / -1; }
.fin-rembourse { font-size: 12px; margin-top: 4px; }
.fin-ajout-fichier { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); cursor: pointer; font-size: 13px; }
.fin-ajout-fichier svg { width: 14px; height: 14px; }
.fin-clients { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.fin-client { display: flex; flex-direction: column; gap: 3px; cursor: pointer; padding: 16px; }
.fin-client:hover { border-color: rgba(90,160,255,.45); }
.fin-client b { font-size: 15px; }
.fin-client > span { color: var(--muted); font-size: 13px; }
.fin-client-bas { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.fin-client-bas small { color: var(--faint); font-size: 12px; }
.fin-reglages { display: flex; flex-direction: column; gap: 14px; }
.fin-reglages .champ small { margin-top: 2px; }
@media (max-width: 1200px) { .fin-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .fin-ed { grid-template-columns: 1fr; } .fin-ed-droite { position: static; } }
@media (max-width: 900px) { .fin-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fin-form-dep, .fin-form-3 { grid-template-columns: 1fr 1fr; }
  .fin-form-dep .champ:nth-child(7), .fin-form-dep .fin-bas-form { grid-column: auto; } }
.fin-table-lignes .fin-court { width: 64px; min-width: 64px; }
.fin-table-lignes .fin-moyen { width: 96px; min-width: 96px; }
.fin-table-lignes .fin-unite { width: 104px; min-width: 104px; }
.fin-table-lignes .fin-sous-ligne td:not(:first-child) { width: 1%; white-space: nowrap; }
.fin-table td a { display: inline-flex; align-items: center; gap: 4px; }
.fin-table td a svg { width: 15px; height: 15px; }
.fin-form-dep { grid-template-columns: 150px 2fr 1fr 1.3fr 110px 1.3fr; }

/* Verrou des Finances (ajouté par Noah le 2026-12-03) */
.fin-verrou { max-width: 520px; margin: 20px auto; padding: 30px; text-align: center; }
.fin-verrou h2 { justify-content: center; font-family: var(--serif); font-weight: 400; font-size: 32px; margin: 10px 0 8px; display: block; }
.fin-verrou h2 em { color: var(--bleu-pale); }
.fin-verrou p { color: var(--muted); margin: 0 0 18px; }
.fin-verrou .ic.fin-verrou-ic { width: 40px; height: 40px; color: var(--accent); }
.fin-verrou-form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.fin-verrou-form .btn { align-self: center; }

/* ===== SÉCURITÉ (ajouté par Noah le 2026-12-03) : rapport de l'Agent Sécurité ===== */
#page-securite .carte { margin-bottom: 16px; }
.secu-haut { display: flex; align-items: center; gap: 20px; }
.secu-score { width: 96px; height: 96px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: baseline; justify-content: center;
  padding-top: 26px; border: 3px solid var(--c); box-shadow: 0 0 30px -8px var(--c); }
.secu-score b { font-family: "Instrument Serif", serif; font-weight: 400; font-size: 40px; line-height: 1; color: var(--c); }
.secu-score span { color: var(--muted); font-size: 13px; margin-left: 2px; }
.secu-point { display: grid; grid-template-columns: 190px 1fr; gap: 14px; align-items: start; padding: 12px 0; border-top: 1px solid var(--border); }
.secu-point:first-of-type { border-top: 0; }
.secu-point .pastille { justify-self: start; }
.secu-point b { font-weight: 550; display: block; }
.secu-detail { display: block; color: var(--muted); font-size: 12.5px; margin-top: 3px; word-break: break-word; }
.secu-correction { color: var(--text); opacity: .85; font-size: 13.5px; margin-top: 5px; display: flex; gap: 6px; align-items: flex-start; }
.secu-correction svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 3px; color: var(--accent); }
.secu-partie { display: block; color: var(--faint); font-size: 12px; margin-top: 4px; }
#page-securite details summary { cursor: pointer; list-style: none; }
#page-securite details summary::-webkit-details-marker { display: none; }
.secu-historique { display: flex; gap: 8px; flex-wrap: wrap; }
.secu-histo { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; color: var(--text);
  display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; font: inherit; min-width: 84px; }
.secu-histo b { font-size: 18px; }
.secu-histo span { font-size: 11.5px; color: var(--muted); }
.secu-histo.actif { border-color: var(--accent); }
@media (max-width: 700px) {
  .secu-point { grid-template-columns: 1fr; gap: 6px; }
  .secu-haut { flex-direction: column; align-items: flex-start; }
}

/* Mots de passe et codes (page Sécurité) */
#s-onglets { margin: 4px 0 18px; }
.secu-nouveau { display: inline-block; font-size: 11px; font-weight: 600; color: var(--bleu-pale, var(--accent)); border: 1px solid currentColor;
  border-radius: 999px; padding: 0 7px; margin-right: 8px; vertical-align: 2px; }
.secret { padding: 14px 0; border-top: 1px solid var(--border); }
.secret:first-of-type { border-top: 0; }
.secret-haut { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.secret-haut > svg { width: 20px; height: 20px; color: var(--accent); flex-shrink: 0; }
.secret-haut b, .secret-membre b { display: block; font-weight: 550; }
.secret-haut small, .secret-membre small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.secret-haut small.secret-quand { color: var(--faint); font-size: 12px; }
.secret-form { display: grid; gap: 12px; max-width: 460px; margin: 14px 0 4px 34px; }
.secret-membre { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.secret-membre:first-of-type { border-top: 0; }
.secret-membre small.secret-quand { color: var(--faint); font-size: 12px; }
@media (max-width: 700px) { .secret-form { margin-left: 0; } }
