/* =====================================================================
   CAMYnergie — systeme de design v2 (06/09/2026, demande Yann :
   « un design actuel, des pastilles, des paves parlants, des couleurs »)
   Charte conservee : bleu #004B79, or #A77D39, vert #1f845a.
   Couche posee SUR Bootstrap : toutes les pages en profitent d'un coup.
   ===================================================================== */
:root {
  --camy-bleu: #004B79;
  --camy-bleu-clair: #0a6aa8;
  --camy-bleu-fonce: #102A43;
  --camy-or: #A77D39;
  --camy-vert: #1f845a;
  --camy-vert-fond: #e9f7f0;
  --fond: #eef2f7;
  --carte: #ffffff;
  --encre: #17293d;
  --encre-2: #5a6b7e;
  --bord: #e3e9f1;
  --ombre: 0 1px 2px rgba(16, 42, 67, .05), 0 10px 30px -12px rgba(16, 42, 67, .14);
  --ombre-haute: 0 2px 4px rgba(16, 42, 67, .06), 0 18px 44px -14px rgba(16, 42, 67, .22);
  --rayon: 16px;
  --rayon-s: 10px;
}

html { font-size: 14px; position: relative; min-height: 100%; }
@media (min-width: 768px) { html { font-size: 15px; } }

body {
  margin-bottom: 60px;
  background:
    radial-gradient(1100px 380px at 85% -80px, rgba(0, 75, 121, .07), transparent 60%),
    radial-gradient(900px 320px at -10% -60px, rgba(167, 125, 57, .06), transparent 55%),
    var(--fond);
  color: var(--encre);
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  color: var(--camy-bleu-fonce);
  font-weight: 700;
  letter-spacing: -.01em;
}
a { color: var(--camy-bleu); text-decoration: none; }
a:hover { color: var(--camy-bleu-clair); text-decoration: underline; }
.texte-camy-or { color: var(--camy-or); }

/* ---------- Barre de navigation : bandeau profond, liens en pastilles ---------- */
.navbar-camy {
  background: linear-gradient(115deg, var(--camy-bleu-fonce) 0%, var(--camy-bleu) 75%, #0a5d92 100%);
  box-shadow: 0 6px 24px -10px rgba(16, 42, 67, .55);
  border: 0 !important;
  padding-top: .55rem;
  padding-bottom: .55rem;
}
.navbar-camy .navbar-brand { font-size: 1.25rem; letter-spacing: .01em; }
.navbar-camy .nav-link {
  color: rgba(255, 255, 255, .82) !important;
  border-radius: 999px;
  padding: .38rem 1rem !important;
  margin-right: .15rem;
  font-weight: 600;
  transition: background .15s, color .15s;
}
.navbar-camy .nav-link:hover { background: rgba(255, 255, 255, .12); color: #fff !important; }
.navbar-camy .nav-link.actif { background: rgba(255, 255, 255, .16); color: #fff !important; }

/* Pastille utilisateur (initiales) dans la barre */
.avatar-chip {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--camy-or), #c99a52);
  color: #fff; font-weight: 700; font-size: .8rem;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
  flex: none;
}

/* ---------- Cartes : blanches, arrondies, ombre douce, titre a pastille ---------- */
.card {
  border: 0;
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  background: var(--carte);
}
.card > .card-body { padding: 1.15rem 1.25rem; }
.card h2.h6, .card .titre-carte {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--encre-2);
  display: flex; align-items: center; gap: .5rem;
}
.card h2.h6::before, .card .titre-carte::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--camy-or);
  flex: none;
}
.card.border-warning { border: 0; box-shadow: var(--ombre), inset 0 0 0 1.5px rgba(167, 125, 57, .45); }
.card.border-warning h2.h6::before { background: var(--camy-or); }

/* ---------- Boutons : arrondis, degrade, releve au survol ---------- */
.btn { border-radius: var(--rayon-s); font-weight: 600; transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-camy {
  background: linear-gradient(135deg, var(--camy-bleu-clair), var(--camy-bleu));
  border: 0; color: #fff;
  box-shadow: 0 6px 16px -6px rgba(0, 75, 121, .55);
}
.btn-camy:hover, .btn-camy:focus { background: linear-gradient(135deg, #0b76bb, #005a91); color: #fff; }
.btn-camy-or {
  background: linear-gradient(135deg, #bb8d44, var(--camy-or));
  border: 0; color: #fff;
  box-shadow: 0 6px 16px -6px rgba(167, 125, 57, .55);
}
.btn-camy-or:hover, .btn-camy-or:focus { color: #fff; }
.btn-outline-secondary { border-color: var(--bord); color: var(--camy-bleu); }
.btn-outline-secondary:hover { background: #eef6ff; border-color: var(--camy-bleu); color: var(--camy-bleu); }
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 .2rem rgba(0, 75, 121, .18);
}

/* ---------- Formulaires : champs doux, libelles en petites capitales ---------- */
.form-control, .form-select {
  border-radius: var(--rayon-s);
  border-color: var(--bord);
  padding: .5rem .8rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--camy-bleu);
  box-shadow: 0 0 0 .2rem rgba(0, 75, 121, .12);
}
.form-label {
  font-size: .74rem; font-weight: 700; color: var(--encre-2);
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: .25rem;
}

/* ---------- Tableaux : en-tetes en capitales douces, lignes aerees ---------- */
.table { --bs-table-striped-bg: #f8fafd; margin-bottom: 0; }
.table thead th {
  background: #f1f5fa;
  color: var(--encre-2);
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  border-bottom: 0;
  padding: .6rem .75rem;
  white-space: nowrap;
}
.table td { border-color: #edf1f6; padding: .55rem .75rem; }
.table tbody tr { transition: background .1s; }
.table-hover tbody tr:hover, .table-striped tbody tr:hover { background: #eaf3fc; }
.table-responsive { border-radius: 12px; overflow: hidden; border: 1px solid var(--bord); }
.card .table-responsive { border: 0; }

/* ---------- Pastilles de statut : pilules aux fonds doux ---------- */
.badge { border-radius: 999px; font-weight: 600; padding: .38em .8em; letter-spacing: .02em; }
.badge.bg-danger  { background: #fdecec !important; color: #b3261e; }
.badge.bg-success { background: var(--camy-vert-fond) !important; color: var(--camy-vert); }
.badge.bg-warning { background: #fdf3e0 !important; color: #8a6116; }
.badge.bg-info    { background: #e5f2fb !important; color: var(--camy-bleu); }
.badge.bg-secondary { background: #eef1f5 !important; color: var(--encre-2); }
.badge.bg-light   { background: #f1f5fa !important; color: var(--encre) !important; border: 0 !important; }
.pastille-statut { border-radius: 999px; font-weight: 600; font-size: .78rem; padding: .3em .8em; display: inline-block; }

/* ---------- Alertes ---------- */
.alert { border: 0; border-radius: 12px; box-shadow: var(--ombre); }
.alert-info { background: #e5f2fb; color: var(--camy-bleu-fonce); border-left: 4px solid var(--camy-bleu); }
.alert-danger { background: #fdecec; color: #7b241c; border-left: 4px solid #c0392b; }
.alert-success { background: var(--camy-vert-fond); color: #14563b; border-left: 4px solid var(--camy-vert); }
.alert-warning { background: #fdf3e0; color: #6d4d12; border-left: 4px solid var(--camy-or); }

/* ---------- Tuiles du portail : icone en pastille, releve au survol ---------- */
.tuile { transition: transform .15s, box-shadow .15s; color: inherit; }
a.tuile:hover {
  transform: translateY(-3px);
  box-shadow: var(--ombre-haute), inset 0 0 0 1.5px rgba(167, 125, 57, .5);
  text-decoration: none;
}
.tuile-icone {
  width: 46px; height: 46px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex: none;
  background: linear-gradient(135deg, #e8f1f8, #d9e8f4);
  box-shadow: inset 0 0 0 1px rgba(0, 75, 121, .08);
}
.tuile-verrouillee { opacity: .6; background: #f5f7fa; box-shadow: none; border: 1px dashed var(--bord); }

/* ---------- Bandeau d'accueil ---------- */
.bandeau-bienvenue {
  background: linear-gradient(115deg, var(--camy-bleu-fonce), var(--camy-bleu) 70%, #0a5d92);
  color: #fff;
  border-radius: var(--rayon);
  padding: 1.1rem 1.4rem;
  box-shadow: var(--ombre-haute);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem;
}
.bandeau-bienvenue h1 { color: #fff; margin: 0; }
.puce-role {
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .25);
  color: #fff; border-radius: 999px;
  padding: .3rem .95rem; font-size: .8rem; font-weight: 600;
}

/* ---------- Fiche tiers : identite, contacts, GED (retours Yann 06/09/2026) ---------- */
.btn-rond {
  width: 30px; height: 30px; border-radius: 50%; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.15rem; line-height: 1; flex: none;
}
.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  background: #f1f5fa; border-radius: 999px;
  padding: .22rem .75rem; font-size: .8rem; color: var(--encre);
}
.chip-mail { background: #e5f2fb; color: var(--camy-bleu); font-weight: 600; }
.chip-mail:hover { background: #d7ebfa; text-decoration: none; }
.chip-tel { background: var(--camy-vert-fond); color: var(--camy-vert); font-weight: 600; }
.contact-ligne { border: 1px solid var(--bord); border-radius: 12px; padding: .6rem .8rem; margin-bottom: .5rem; }
.zone-depot {
  border: 2px dashed #b9c9da; border-radius: 12px;
  padding: 1rem .8rem; text-align: center; color: var(--encre-2);
  cursor: pointer; transition: border-color .15s, background .15s, color .15s;
  background: #f8fafd; font-size: .85rem;
}
.zone-depot:hover, .zone-depot.survol { border-color: var(--camy-bleu); background: #eef6ff; color: var(--camy-bleu); }
.fenetre-voile { position: fixed; inset: 0; background: rgba(16, 42, 67, .45); z-index: 1050; }
.fenetre-panneau {
  position: absolute; top: 6vh; left: 50%; transform: translateX(-50%);
  background: #fff; border-radius: var(--rayon); box-shadow: var(--ombre-haute);
  display: flex; flex-direction: column; overflow: hidden;
}
.fenetre-entete {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  background: linear-gradient(115deg, var(--camy-bleu-fonce), var(--camy-bleu));
  color: #fff;
}

/* ---------- Tableau de bord Super admin (demande Yann 07/09/2026) : fenetre ouverte
   depuis la barre — pastilles chiffrees + raccourcis « plus pertinents qu'un navigateur ». ---------- */
.tdb { padding: 14px 18px 18px; overflow-y: auto; }
.tdb-pastilles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tdb-pastille {
  background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon-s);
  padding: 10px 12px; border-top: 3px solid var(--camy-bleu);
}
.tdb-bleu { border-top-color: var(--camy-bleu); }
.tdb-or { border-top-color: var(--camy-or); }
.tdb-vert { border-top-color: var(--camy-vert); }
.tdb-valeur { font-size: 1.35rem; font-weight: 800; color: var(--camy-bleu-fonce); font-variant-numeric: tabular-nums; }
.tdb-libelle { font-weight: 600; font-size: .82rem; color: var(--encre); }
.tdb-detail { font-size: .74rem; color: var(--encre-2); }
.tdb-colonnes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 14px; }
.tdb-col-titre { font-weight: 700; color: var(--camy-bleu-fonce); font-size: .92rem; margin-bottom: 6px; }
.tdb-vide { font-size: .8rem; color: var(--encre-2); padding: 6px 2px; }
.tdb-raccourci {
  display: flex; align-items: center; gap: 8px; padding: 7px 9px; margin-bottom: 6px;
  background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon-s);
  text-decoration: none !important; transition: box-shadow .12s, border-color .12s;
}
.tdb-raccourci:hover { border-color: var(--camy-bleu); box-shadow: var(--ombre); }
.tdb-r-texte { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tdb-r-titre { font-weight: 600; font-size: .84rem; color: var(--encre); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tdb-r-sous { font-size: .74rem; color: var(--encre-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tdb-badge { border-radius: 999px; font-size: .68rem; font-weight: 700; padding: .18em .6em; white-space: nowrap; }
.tdb-badge-bleu { background: #e5f2fb; color: var(--camy-bleu); }
.tdb-badge-or { background: #f7efe1; color: var(--camy-or); }
.tdb-badge-vert { background: var(--camy-vert-fond); color: var(--camy-vert); }
.tdb-badge-rouge { background: #fdeaea; color: #b02a37; }
.tdb-badge-gris { background: #eef1f5; color: var(--encre-2); }
.tdb-fiches { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; }
.tdb-fiche {
  display: flex; flex-direction: column; gap: 2px; padding: 8px 10px;
  background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon-s);
}
.tdb-fiche-active { border-left: 3px solid var(--camy-vert); }
.tdb-fiche-liens { display: flex; align-items: center; gap: 8px; margin-top: 3px; font-size: .76rem; }

/* ---------- Listes recherchables (regle d'or Yann 06/09/2026 : toute recherche
   filtre en CONTIENT, multi-lettres, accents ignores — composant global site.js) ---------- */
.combo { position: relative; }
.combo-liste {
  position: absolute; z-index: 1060; left: 0; right: 0; top: calc(100% + 4px);
  background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon-s);
  box-shadow: var(--ombre-haute); max-height: 46vh; overflow-y: auto; padding: 4px;
}
.combo-option { padding: .42rem .7rem; border-radius: 8px; cursor: pointer; font-size: .92rem; }
.combo-option:hover { background: #eef6ff; }
.combo-option.actif { background: var(--camy-bleu); color: #fff; }
.combo-vide { padding: .5rem .7rem; color: var(--encre-2); font-size: .85rem; }

/* ---------- Divers ---------- */
.footer { border: 0 !important; color: #93a3b5; font-size: .8rem; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #c6d2e0; border-radius: 999px; border: 2px solid var(--fond); }
::-webkit-scrollbar-track { background: transparent; }
datalist { display: none; }

/* ---- Fiche CEE officielle : contenu recomposé depuis le PDF du ministère (03/10/2026) ---- */
.fiche-officielle { max-width: 92ch; font-size: .94rem; line-height: 1.5; color: var(--camy-bleu-fonce); }
.fiche-officielle .entete { margin: 0; color: #6b7280; font-size: .85rem; text-align: center; }
.fiche-officielle h3.section { font-size: 1.02rem; font-weight: 700; color: var(--camy-bleu); margin: 1.4rem 0 .5rem; padding-bottom: .25rem; border-bottom: 2px solid var(--camy-vert-fond); }
.fiche-officielle p { margin: 0 0 .6rem; text-align: justify; hyphens: auto; }
.fiche-officielle p.puce { margin-left: 1.4rem; text-indent: -1.1rem; text-align: justify; }
.fiche-officielle sup, .fiche-officielle sub { font-size: .72em; line-height: 0; }
.tableau-officiel { width: auto; min-width: 60%; margin: .6rem auto 1rem; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; background: #fff; box-shadow: 0 1px 2px rgba(16,42,67,.08); }
.tableau-officiel th, .tableau-officiel td { border: 1px solid #c9d6e2; padding: .4rem .65rem; vertical-align: middle; text-align: center; }
.tableau-officiel thead th { background: var(--camy-bleu); color: #fff; font-weight: 600; }
.tableau-officiel tbody th { background: #eef4f9; color: var(--camy-bleu-fonce); font-weight: 600; }
.tableau-officiel tbody tr:nth-child(even) td { background: #f7fafc; }
.tableau-officiel td.num { text-align: right; white-space: nowrap; }
.tableau-officiel td[rowspan], .tableau-officiel th[rowspan] { background: #fbfcfe; }
.bareme-officiel { white-space: pre-wrap; font-size: .85rem; margin: 0; }
.fiche-officielle p.titre-fiche { font-size: 1.15rem; font-weight: 700; color: var(--camy-bleu-fonce); text-align: center; margin: .3rem 0 1rem; text-wrap: balance; }
.tableau-officiel td.op { border-top: 0; border-bottom: 0; background: transparent !important; font-weight: 600; padding: .4rem .5rem; }
.tableau-officiel tr:first-child td.op { border-top: 0; }
/* ---- Historique JORF d'une fiche CEE (03/10/2026) : ligne de dernière mise à jour, tableau latéral, détail ---- */
.maj-jorf { font-size: .95rem; color: var(--camy-bleu-fonce); background: #eef4f9; border-left: 4px solid var(--camy-bleu); padding: .4rem .7rem; border-radius: 0 .4rem .4rem 0; display: inline-block; }
.histo-aside { float: right; width: 360px; max-width: 100%; margin: 0 0 1rem 1.25rem; background: #fff; border: 1px solid #c9d6e2; border-radius: .5rem; box-shadow: 0 1px 2px rgba(16,42,67,.08); padding: .7rem .8rem; font-size: .82rem; }
.histo-aside .histo-titre { font-weight: 700; color: var(--camy-bleu); margin-bottom: .45rem; }
.histo-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.histo-table th { text-align: left; font-weight: 600; color: #6b7280; border-bottom: 1px solid #c9d6e2; padding: .25rem .35rem; font-size: .76rem; text-transform: uppercase; letter-spacing: .03em; }
.histo-table td { padding: .3rem .35rem; border-bottom: 1px solid #eef1f5; vertical-align: top; }
.histo-table tr:first-child td { background: #eef4f9; font-weight: 600; }
.histo-table tr.histo-suppr td { background: #fdeaea; color: #b02a37; font-weight: 600; }
.histo-aside .histo-note { margin-top: .5rem; color: #6b7280; font-size: .74rem; line-height: 1.3; }
.histo-detail .histo-item { padding: .55rem 0; border-bottom: 1px solid #eef1f5; }
.histo-detail .histo-item:last-child { border-bottom: 0; }
.histo-detail .histo-item-tete { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: .92rem; }
.histo-detail .histo-item-corps { margin-top: .25rem; font-size: .9rem; text-align: justify; max-width: 100ch; }
.histo-detail .histo-suppr .histo-item-corps { color: #b02a37; }
@media (max-width: 992px) { .histo-aside { float: none; width: auto; margin: 0 0 1rem; } }
/* ---- Synthèse d'une fiche CEE, à la demande (04/10/2026) : page lisible et imprimable ---- */
.synthese-fiche { max-width: 96ch; margin: 0 auto; background: #fff; border: 1px solid #c9d6e2; border-radius: .6rem; box-shadow: 0 1px 3px rgba(16,42,67,.08); padding: 1.6rem 2rem; }
.synthese-outils { margin-bottom: .8rem; font-size: .9rem; }
.synthese-entete { border-bottom: 3px solid var(--camy-bleu); padding-bottom: .8rem; margin-bottom: 1rem; }
.synthese-code { font-weight: 700; letter-spacing: .08em; color: var(--camy-or); font-size: .95rem; }
.synthese-titre { font-size: 1.5rem; color: var(--camy-bleu-fonce); margin: .15rem 0 .5rem; text-wrap: balance; }
.synthese-sous { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; font-size: .88rem; }
.synthese-maj { color: var(--camy-bleu-fonce); }
.synthese-bloc { margin: 1.1rem 0; }
.synthese-bloc h2 { font-size: 1rem; font-weight: 700; color: var(--camy-bleu); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 .45rem; }
.synthese-bloc p { text-align: justify; margin: 0 0 .4rem; }
.synthese-liste { padding-left: 1.2rem; margin: 0; }
.synthese-liste li { margin-bottom: .3rem; text-align: justify; }
.synthese-note { font-size: .8rem; color: #6b7280; margin-top: .4rem; }
.synthese-chiffres { display: grid; grid-template-columns: 1fr 2fr; gap: 1.5rem; align-items: start; }
.synthese-grand { font-size: 2rem; font-weight: 700; color: var(--camy-bleu-fonce); margin: 0; }
.synthese-chiffres .tableau-officiel { margin: 0; min-width: 0; }
.synthese-pied { margin-top: 1.4rem; padding-top: .6rem; border-top: 1px solid #c9d6e2; font-size: .78rem; color: #6b7280; }
@media (max-width: 768px) { .synthese-chiffres { grid-template-columns: 1fr; } .synthese-fiche { padding: 1rem; } }
@media print {
  body * { visibility: hidden; } .synthese-fiche, .synthese-fiche * { visibility: visible; }
  .synthese-fiche { position: absolute; left: 0; top: 0; width: 100%; border: 0; box-shadow: none; padding: 0; }
  .synthese-outils { display: none; }
}

/* ----- Module financier (phase F1, 07/10/2026) ----- */
.tuile-fin .tuile-titre { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--camy-bleu); }
.tuile-fin .tuile-valeur { font-size: 1.45rem; font-weight: 700; font-variant-numeric: tabular-nums; margin: .15rem 0; }
.tuile-fin .tuile-detail { font-size: .8rem; color: #5a6b7e; }
.texte-entree { color: var(--camy-vert); }
.texte-sortie { color: #b3261e; }
.montant { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.libelle-banque { font-size: .85rem; max-width: 34rem; overflow-wrap: anywhere; }
.carte-compte { display: flex; flex-direction: column; padding: .5rem .8rem; border: 1px solid #e3e9f1; border-radius: .5rem; background: #fff; min-width: 13rem; color: inherit; }
.carte-compte:hover { border-color: var(--camy-bleu); text-decoration: none; }
.carte-compte.active { border-color: var(--camy-bleu); box-shadow: 0 0 0 2px rgba(0, 75, 121, .15); }
.carte-compte strong { font-variant-numeric: tabular-nums; }
.menu-financier .nav-link.disabled { color: #9aa7b6; }
.table td.text-end, .table th.text-end { font-variant-numeric: tabular-nums; }
.journal-maj { max-height: 18rem; overflow: auto; background: #102A43; color: #e3e9f1; font-size: .78rem; padding: .6rem .8rem; border-radius: .5rem; white-space: pre-wrap; }

/* ----- Tableau de bord par statut (fusion des environnements, 08/10/2026) ----- */
.statuts-tableau { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; margin-bottom: .2rem; }
.statuts-bloc { background: #fff; border: 1px solid #e3e9f1; border-radius: 12px; padding: .85rem 1rem; }
.statuts-titre { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--camy-bleu); margin: 0 0 .6rem; }
.statuts-cases { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .5rem; }
.statut-case { display: flex; flex-direction: column; gap: .1rem; padding: .55rem .7rem; border-radius: 9px; border: 1px solid #e3e9f1; border-left: 4px solid #9aa7b6; color: inherit; background: #fbfcfe; }
a.statut-case:hover { border-color: var(--camy-bleu); text-decoration: none; background: #f2f7fc; }
.statut-nombre { font-size: 1.45rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.statut-libelle { font-size: .8rem; color: #374151; line-height: 1.2; }
.statut-montant { font-size: .75rem; color: #5a6b7e; font-variant-numeric: tabular-nums; }
.statut-orange { border-left-color: #d97706; }
.statut-vert { border-left-color: #1f845a; }
.statut-bleu { border-left-color: #0a6aa8; }
.statut-rouge { border-left-color: #b3261e; }
.statut-gris { border-left-color: #9aa7b6; }

/* ----- Bulle de survol des fiches CEE (08/10/2026) ----- */
.bulle-fiche { position: absolute; z-index: 1090; max-width: 360px; background: #fff; border: 1px solid #d5dfeb; border-radius: 10px;
  box-shadow: 0 8px 24px rgba(16, 42, 67, .18); padding: .65rem .8rem; font-size: .85rem; }
.bulle-fiche-code { font-weight: 700; color: var(--camy-bleu); }
.bulle-fiche-libelle { margin-top: .2rem; line-height: 1.3; }
.bulle-fiche-actions { display: flex; gap: .4rem; margin-top: .55rem; flex-wrap: wrap; }
[data-fiche-info] { cursor: help; text-decoration: underline dotted rgba(0, 75, 121, .45); text-underline-offset: 3px; }

/* ----- Bulles d'aide (08/10/2026) ----- */
.bulle-aide { position: absolute; z-index: 1095; max-width: 300px; background: #102A43; color: #f1f5fa; font-size: .78rem; line-height: 1.35;
  padding: .45rem .6rem; border-radius: 7px; box-shadow: 0 6px 18px rgba(16, 42, 67, .25); pointer-events: none; }
.aide-i { display: inline-block; margin-left: .3rem; color: #6b7c93; font-size: .85em; cursor: help; font-weight: 400; }
.aide-i:hover, .aide-i:focus { color: var(--camy-bleu); outline: none; }

/* Pictogrammes de civilité des tiers — ceux du Courrier sortant (08/10/2026) */
img.civ-ico { display: inline-block; width: 22px; height: 22px; object-fit: contain; vertical-align: -6px; margin-right: 6px; }
img.civ-ico.civ-grand { width: 34px; height: 34px; vertical-align: -9px; margin-right: 8px; }
i.civ { display: inline-flex; align-items: center; justify-content: center; width: 19px; height: 19px; border-radius: 50%; margin-right: 6px; vertical-align: -4px; font-style: normal; }
i.civ.civ-grand { width: 30px; height: 30px; }
i.civ.civ-grand svg { width: 18px; height: 18px; }
i.civ-personne { color: #5f697c; background: #e9edf4; }

/* Repérage des fiches CEE par secteur (demande de Yann du 09/10/2026) : AGRI vert, industriel bleu, particulier jaune orangé,
   tertiaire prune. Pastille de fiche (.fiche-chip) partout où une fiche est citée, et liseré coloré dans le menu Devis. */
.secteur-agri  { --secteur: #2e8b3e; --secteur-fond: #e7f5ea; --secteur-texte: #1d5e29; }
.secteur-ind   { --secteur: #1f5fbf; --secteur-fond: #e7effb; --secteur-texte: #17468c; }
.secteur-bar   { --secteur: #e09a00; --secteur-fond: #fff3d9; --secteur-texte: #8a5c00; }
.secteur-bat   { --secteur: #7b2d5e; --secteur-fond: #f6e8f0; --secteur-texte: #5e2147; }
.secteur-autre { --secteur: #6c757d; --secteur-fond: #eef0f2; --secteur-texte: #495057; }
.fiche-chip {
  display: inline-block; padding: .05rem .45rem; margin: 0 .25rem .15rem 0; border-radius: 999px; font-size: .78rem; font-weight: 600;
  white-space: nowrap; color: var(--secteur-texte); background: var(--secteur-fond); border: 1px solid var(--secteur);
}
a.fiche-chip:hover { text-decoration: none; filter: brightness(.96); }
.p-sous-menu .secteur-titre {
  display: flex; align-items: center; gap: .35rem; width: 100%; margin: .2rem 0 .1rem; padding: .3rem .4rem .3rem .55rem;
  font: inherit; font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; text-align: left;
  color: var(--secteur-texte); background: transparent; border: 0; border-left: 3px solid var(--secteur); border-radius: 0 6px 6px 0; cursor: pointer;
}
.p-sous-menu .secteur-titre:hover, .secteur-groupe.survol > .secteur-titre { background: var(--secteur-fond); }
.p-sous-menu .secteur-nb { margin-left: auto; font-weight: 600; opacity: .7; letter-spacing: 0; }
.p-sous-menu .secteur-chevron { transition: transform .15s; }
.secteur-groupe.ouvert > .secteur-titre .secteur-chevron { transform: rotate(90deg); }
/* Secteur replié : ses fiches n'apparaissent qu'au survol, dans une fenêtre À DROITE du menu (20/10/2026) */
.secteur-groupe:not(.ouvert):not(.survol) > .secteur-fiches { display: none; }
.secteur-groupe.survol:not(.ouvert) > .secteur-fiches {
  position: fixed; left: var(--fenetre-x, 260px); top: var(--fenetre-y, 80px); z-index: 1060; min-width: 13.5rem;
  max-height: calc(100vh - var(--fenetre-y, 80px) - 12px); overflow-y: auto; padding: .4rem;
  background: #fff; border: 1px solid #d5dfeb; border-top: 3px solid var(--secteur); border-radius: 10px; box-shadow: 0 10px 28px rgba(15, 35, 60, .18);
}
.secteur-groupe.survol:not(.ouvert) > .secteur-fiches a { display: block; padding: .3rem .55rem; color: var(--secteur-texte); border-radius: 6px; }
.secteur-groupe.survol:not(.ouvert) > .secteur-fiches a:hover { background: var(--secteur-fond); text-decoration: none; }
.p-sous-menu a.fiche-menu { border-left: 3px solid var(--secteur); padding-left: .55rem; }
.p-sous-menu a.fiche-menu.actif { background: var(--secteur-fond); color: var(--secteur-texte); }

/* Frise d'avancement du dossier (fiche client, suivi des dossiers) */
.frise { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .4rem; }
.frise-phase { border-top: 4px solid #ced4da; padding-top: .3rem; min-width: 0; }
.frise-phase.faite { border-top-color: #198754; }
.frise-phase.courante { border-top-color: #0d6efd; }
.frise-phase-titre { font-size: .8rem; font-weight: 600; margin-bottom: .25rem; color: #495057; }
.frise-phase.courante .frise-phase-titre { color: #0d6efd; }
.frise-etape { display: block; width: 100%; text-align: left; font-size: .75rem; line-height: 1.2; border: 1px solid #e9ecef;
    background: #fff; border-radius: .3rem; padding: .25rem .35rem; margin-bottom: .2rem; color: #6c757d; }
.frise-etape:hover:not(:disabled) { border-color: #0d6efd; }
.frise-etape.faite { background: #e8f5ee; border-color: #b6e0c6; color: #146c43; }
.frise-etape.faite:disabled { opacity: 1; cursor: default; }
.frise-etape.courante { background: #e7f0ff; border-color: #0d6efd; color: #084298; font-weight: 600; }
.frise-etape.passee { background: #fff8e6; border-color: #ffe08a; color: #8a6d00; }
.frise-icone { display: inline-block; width: 1em; text-align: center; }
.frise-statut { font-size: .85rem; background: #f1f6ff; border-left: 3px solid #0d6efd; padding: .35rem .6rem; margin-bottom: .6rem; display: flex; flex-wrap: wrap; gap: .35rem; }
.frise-statut.bloque { background: #fff1f0; border-left-color: #dc3545; }
.frise-bloque { color: #b02a37; }
.frise-mini { display: flex; gap: 2px; }
.frise-mini span { flex: 1; height: 8px; border-radius: 2px; background: #dee2e6; min-width: 10px; }
.frise-mini span.faite { background: #198754; }
.frise-mini span.courante { background: #0d6efd; }
@media (max-width: 991px) { .frise { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575px) { .frise { grid-template-columns: 1fr; } }
/* Collecte TH-108 : cases des serres déjà enregistrées (09/10/2026) */
.choix-serres { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .25rem .75rem; max-height: 16rem; overflow-y: auto; background: #fff; border: 1px solid #dfe7e1; border-radius: .4rem; padding: .5rem .75rem; }
.choix-serre { display: flex; align-items: baseline; gap: .15rem; cursor: pointer; font-size: .9rem; }

/* Vue « Widgets » des tableaux (19/10/2026) */
.vue-widgets { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.vue-carte { position: relative; background: #fff; border: 1px solid #e3e8ee; border-left: 4px solid #004B79; border-radius: .5rem; padding: .7rem .8rem .6rem; box-shadow: 0 1px 2px rgba(16,42,67,.06); font-size: .88rem; }
.vue-carte.alerte { border-left-color: #dc3545; background: #fff7f7; }
.vue-carte.attention { border-left-color: #ffc107; }
.vue-carte .vue-coche { position: absolute; top: .7rem; right: .7rem; }
.vue-carte .vue-titre { font-weight: 600; font-size: .98rem; margin: 0 1.6rem .4rem 0; }
.vue-carte .vue-champ { display: flex; gap: .5rem; padding: .12rem 0; border-top: 1px dashed #eef1f4; }
.vue-carte .vue-lib { flex: 0 0 6.5rem; color: #6c757d; font-size: .75rem; text-transform: uppercase; letter-spacing: .02em; padding-top: .1rem; }
.vue-carte .vue-val { flex: 1; min-width: 0; overflow-wrap: anywhere; }

/* ===== Widgets de l'accueil (19/10/2026) — bandeau photo de la banque d'images ; contenus des vignettes du Pilotage ===== */
.widgets-accueil { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); align-items: start; }
.widget-accueil { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre); overflow: hidden; }
.widget-accueil.large { grid-column: 1 / -1; }
.widget-bandeau { display: flex; align-items: center; gap: .55rem; min-height: 4.6rem; padding: .7rem 1rem; color: #fff; background: var(--camy-bleu, #004b79) center / cover no-repeat; }
.widget-bandeau h2 { color: #fff; font-size: 1.05rem; font-weight: 700; margin: 0; text-shadow: 0 1px 4px rgba(0,0,0,.7); }
.widget-icone { font-size: 1.3rem; }
.widget-plus { margin-left: auto; color: #fff; font-size: .8rem; background: rgba(255,255,255,.18); border-radius: 999px; padding: .15rem .65rem; text-decoration: none; }
.widget-plus:hover { background: rgba(255,255,255,.32); color: #fff; }
.widget-contenu { padding: .85rem 1rem; }
.v-chiffres { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.v-chiffre b { display: block; font-size: 1.55rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--encre); }
.v-chiffre span { font-size: .75rem; color: var(--encre-2); }
.v-hausse { color: #1e8e3e; } .v-baisse { color: #c5221f; }
.v-liste { list-style: none; padding: 0; margin: .7rem 0 0; font-size: .82rem; }
.v-liste li { display: flex; justify-content: space-between; gap: .6rem; padding: .25rem 0; border-top: 1px solid var(--bord); }
.v-liste li span:last-child { color: var(--encre-2); white-space: nowrap; }
.v-alerte { color: #c5221f; font-weight: 600; }
.v-ok { color: #1e8e3e; }
.v-note { font-size: .75rem; color: var(--encre-2); margin: .5rem 0 0; }
.v-chargement { color: var(--encre-2); font-size: .8rem; }
.v-raccourcis { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); }
.v-raccourcis a { display: flex; align-items: center; gap: .5rem; padding: .55rem .7rem; border: 1px solid var(--bord); border-radius: var(--rayon-s); color: var(--encre); font-size: .88rem; font-weight: 500; text-decoration: none; background: var(--carte); }
.v-raccourcis a:hover { border-color: var(--camy-bleu-clair); background: #f6f9fc; }
.v-raccourcis a span { font-size: 1.15rem; }
/* ===== Icônes Lucide (20/10/2026) : @Icones.Svg("nom") — trait de la couleur du texte, à la taille du texte ===== */
svg.ico { width: 1.15em; height: 1.15em; vertical-align: -0.2em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.p-icone svg.ico { width: 1.25rem; height: 1.25rem; vertical-align: middle; }
.widget-icone svg.ico { width: 1.35rem; height: 1.35rem; }
.tuile-icone svg.ico { width: 1.6rem; height: 1.6rem; }
.v-raccourcis a svg.ico { width: 1.15rem; height: 1.15rem; color: var(--camy-bleu, #004b79); }
/* widget entier cliquable (20/10/2026) */
.widget-accueil.cliquable { cursor: pointer; transition: box-shadow .15s, border-color .15s; }
.widget-accueil.cliquable:hover { border-color: var(--camy-bleu-clair, #4a90c2); box-shadow: 0 6px 20px rgba(0, 40, 70, .14); }

/* icônes du menu de gauche, les mêmes que les raccourcis de l'accueil (20/10/2026) */
.p-menu-item svg.ico { width: 1.05rem; height: 1.05rem; margin-right: .5rem; vertical-align: -0.18em; opacity: .85; }
.p-menu-item.actif svg.ico, .p-menu-item:hover svg.ico { opacity: 1; }

/* barre d'actions de la fiche prospect / client (27/10/2026) : même style pour tous, icône bleue alignée à gauche */
.barre-actions-fiche > .btn { display: flex; align-items: center; gap: .55rem; text-align: left; }
.barre-actions-fiche > .btn svg.ico { color: var(--camy-bleu, #004b79); }
.barre-actions-fiche > .btn:hover svg.ico { color: inherit; }

/* ===== Indicateur d'attente « chronomètre » (29/10/2026, Yann) : le symbole du logo se dévoile depuis midi, dans le sens des
   aiguilles, disparaît d'un coup en revenant à midi, puis recommence (wwwroot/js/attente.js) ===== */
@property --camy-aiguille { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.camy-attente { position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center; background: rgba(255,255,255,.7); backdrop-filter: blur(2px); }
.camy-attente.on { display: flex; }
.camy-attente-boite { background: var(--bs-body-bg, #fff); border: 1px solid var(--bs-border-color, #dee2e6); border-radius: 1rem; padding: 1rem 1.3rem; box-shadow: 0 10px 34px rgba(0,0,0,.12); display: flex; gap: 1rem; align-items: center; max-width: 27rem; }
.camy-attente-titre { color: #004B79; }
.camy-attente-texte { font-size: .82rem; color: var(--bs-secondary-color, #6c757d); margin-top: .1rem; }
.camy-chrono { position: relative; width: 3.2rem; height: 3.2rem; flex: 0 0 auto; border-radius: 50%; background: #f3f6f9; box-shadow: inset 0 0 0 1px #e3e9ef; }
.camy-chrono img { position: absolute; inset: 14%; width: 72%; height: 72%;
    -webkit-mask: conic-gradient(from 0deg, #000 var(--camy-aiguille), transparent 0); mask: conic-gradient(from 0deg, #000 var(--camy-aiguille), transparent 0);
    animation: camy-chrono 1.6s linear infinite; }
.camy-chrono::after { content: ""; position: absolute; left: calc(50% - 1px); top: 8%; width: 2px; height: 42%; border-radius: 2px; background: #A77D39;
    transform-origin: 50% 100%; animation: camy-aiguille 1.6s linear infinite; }
@keyframes camy-chrono { from { --camy-aiguille: 0deg; } to { --camy-aiguille: 360deg; } }
@keyframes camy-aiguille { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .camy-chrono img { animation: none; --camy-aiguille: 360deg; } .camy-chrono::after { animation-duration: 4s; } }

/* ARCHIVES (01/11/2026) : interrupteur « Voir les archives » du bandeau, rappel, bloc des fiches, pastille des listes */
.arch-interrupteur { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(0,0,0,.15); background: #fff; color: #44505c;
    border-radius: 999px; padding: 3px 6px 3px 10px; font-size: .8rem; white-space: nowrap; }
.arch-interrupteur i { width: 28px; height: 16px; border-radius: 8px; background: #c8d1db; position: relative; flex: none; }
.arch-interrupteur i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: left .15s; }
.arch-interrupteur.on { background: #fff4e0; border-color: #A77D39; color: #6b4f1d; font-weight: 600; }
.arch-interrupteur.on i { background: #A77D39; }
.arch-interrupteur.on i::after { left: 14px; }
.arch-rappel { background: #fff4e0; border: 1px solid #e6c98f; color: #6b4f1d; border-radius: 8px; padding: 6px 12px; margin-bottom: 10px; font-size: .9rem; }
.arch-bloc { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 8px; }
.arch-bloc-archive { display: flex; background: #fff4e0; border: 1px solid #e6c98f; color: #6b4f1d; border-radius: 8px; padding: 6px 12px; }
.arch-pastille { display: inline-block; background: #A77D39; color: #fff; border-radius: 4px; font-size: .7rem; padding: 0 5px; margin-left: 4px;
    vertical-align: middle; font-weight: 600; letter-spacing: .02em; }
