/* ============================================================
   Mon Prix Énergie — feuille de style commune
   ============================================================ */

:root {
    --bleu: #003087;
    --bleu-fonce: #00205c;
    --bleu-clair: #e8eef9;
    --blanc: #ffffff;
    --fond: #f4f6fa;
    --texte: #1d2433;
    --texte-doux: #5b6476;
    --bordure: #d6dce8;
    --erreur: #b3261e;
    --erreur-fond: #fdecea;
    --succes: #1e6b3a;
    --succes-fond: #e7f5ec;
    --rayon: 10px;
    --ombre: 0 8px 30px rgba(0, 32, 92, 0.12);
    /* Charte couleurs électricité / gaz (15/11/2026, v84) : à utiliser pour tout ce qui distingue les deux énergies
       (CLAUDE.md, « Charte couleurs »). Jamais de code hexadécimal élec / gaz en dur ailleurs. */
    --color-elec: #2563EB;        /* bleu électricité : bordures, traits */
    --color-elec-light: #DBEAFE;  /* fond clair élec : cellules, en-têtes */
    --color-elec-dark: #1E40AF;   /* texte élec sur fond clair */
    --color-gaz: #EA580C;         /* orange gaz : bordures, traits */
    --color-gaz-light: #FFEDD5;   /* fond clair gaz : cellules, en-têtes */
    --color-gaz-dark: #C2410C;    /* texte gaz sur fond clair */
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Poppins', 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--texte);
    background: var(--fond);
}

a { color: var(--bleu); }

h1 { font-size: 1.4rem; font-weight: 600; color: var(--bleu); margin: 0 0 1.25rem; }

/* --- Formulaires --- */

.champ { margin-bottom: 1rem; }
.champ label { display: block; font-weight: 500; margin-bottom: 0.35rem; }
.champ input {
    width: 100%;
    padding: 0.7rem 0.85rem;
    font: inherit;
    border: 1px solid var(--bordure);
    border-radius: 8px;
    background: var(--blanc);
}
.champ input:focus { outline: 2px solid var(--bleu); outline-offset: 1px; border-color: var(--bleu); }
.aide { font-size: 0.85rem; color: var(--texte-doux); margin-top: 0.3rem; }

.bouton {
    display: inline-block;
    padding: 0.7rem 1.2rem;
    font: inherit;
    font-weight: 500;
    color: var(--blanc);
    background: var(--bleu);
    border: 1px solid var(--bleu);
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
}
.bouton:hover { background: var(--bleu-fonce); }
.bouton-plein { width: 100%; }
.bouton-secondaire { color: var(--bleu); background: var(--blanc); }
.bouton-secondaire:hover { background: var(--bleu-clair); }

.message { padding: 0.75rem 0.9rem; border-radius: 8px; margin-bottom: 1rem; font-size: 0.92rem; }
.message-erreur { color: var(--erreur); background: var(--erreur-fond); }
.message-succes { color: var(--succes); background: var(--succes-fond); }

/* --- Sélecteur de langue --- */

.lang-switch { display: flex; gap: 0.25rem; }
.lang-switch a {
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    color: var(--texte-doux);
}
.lang-switch a.actif { color: var(--blanc); background: var(--bleu); }

/* --- Pages d'authentification --- */

.page-auth {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.page-auth > .lang-switch { position: absolute; top: 1rem; right: 1rem; }

.auth-carte {
    width: 100%;
    max-width: 420px;
    padding: 2rem;
    background: var(--blanc);
    border-radius: var(--rayon);
    box-shadow: var(--ombre);
}
.auth-logo { display: block; max-width: 170px; height: auto; margin: 0 auto 1.5rem; }
.auth-carte h1 { text-align: center; }
.auth-liens { margin-top: 1.25rem; text-align: center; font-size: 0.9rem; }
.auth-pied { margin-top: 1.5rem; font-size: 0.8rem; color: var(--texte-doux); }

/* --- Espaces connectés --- */

.app-entete {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    background: var(--blanc);
    border-bottom: 3px solid var(--bleu);
}
.app-marque { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; font-weight: 600; }
.app-marque img { height: 36px; width: auto; }
.app-utilisateur { display: flex; align-items: center; gap: 1rem; }
.app-nom { color: var(--texte-doux); font-size: 0.9rem; }

.app-corps { display: flex; min-height: calc(100vh - 64px); }
.app-menu {
    flex: 0 0 220px;
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
    background: var(--bleu);
}
.app-menu a {
    padding: 0.7rem 1.25rem;
    color: var(--blanc);
    text-decoration: none;
    opacity: 0.85;
}
.app-menu a:hover { opacity: 1; background: var(--bleu-fonce); }
.app-menu a.actif { opacity: 1; background: var(--bleu-fonce); border-left: 4px solid var(--blanc); }

.app-contenu { flex: 1; padding: 2rem; min-width: 0; }
.carte { padding: 1.5rem; background: var(--blanc); border-radius: var(--rayon); box-shadow: var(--ombre); }

/* --- Pages de gestion (admin) --- */

h2 { font-size: 1.15rem; font-weight: 600; color: var(--bleu); margin: 0 0 1rem; }
h3 { font-size: 1rem; font-weight: 600; margin: 1.25rem 0 0.75rem; }
.carte + .carte, .carte + .tableau-conteneur, .filtres + .carte { margin-top: 1rem; }

.titre-page { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.titre-page h1 { margin: 0; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.compteur { color: var(--texte-doux); font-weight: 400; font-size: 1rem; }
.actions-page { display: flex; gap: 0.5rem; align-items: center; }
.fil { font-size: 0.85rem; color: var(--texte-doux); margin: 0 0 0.5rem; }
.fil a { text-decoration: none; }

.champ select, .champ textarea {
    width: 100%;
    padding: 0.7rem 0.85rem;
    font: inherit;
    border: 1px solid var(--bordure);
    border-radius: 8px;
    background: var(--blanc);
}
.champ textarea { resize: vertical; }
.champ select:focus, .champ textarea:focus { outline: 2px solid var(--bleu); outline-offset: 1px; border-color: var(--bleu); }
.champ input[readonly] { background: var(--fond); color: var(--texte-doux); }
fieldset.champ { border: none; padding: 0; margin: 0 0 1rem; }
fieldset.champ legend { font-weight: 500; margin-bottom: 0.35rem; padding: 0; }
.choix-ligne { display: flex; gap: 1.25rem; flex-wrap: wrap; padding: 0.55rem 0; }
.choix { display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer; }
.choix.case { align-items: flex-start; margin-top: 0.5rem; }
.choix.case input { margin-top: 0.3rem; }
.a-erreur input, .a-erreur select, .a-erreur textarea { border-color: var(--erreur); }
.erreur-champ { color: var(--erreur); font-size: 0.85rem; margin: 0.3rem 0 0; }
.sous-titre { font-weight: 500; margin: 0.5rem 0 0.75rem; color: var(--texte-doux); }

.grille-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.25rem; }
.grille-adresse { display: grid; grid-template-columns: 3fr 1fr 1fr 2fr; gap: 0 1rem; }

.bouton-lien { background: none; border: none; padding: 0; font: inherit; color: var(--bleu); cursor: pointer; text-decoration: underline; }
.danger { color: var(--erreur); }
.bouton.danger { border-color: var(--erreur); }
.bouton-danger { color: var(--blanc); background: var(--erreur); border-color: var(--erreur); }
.bouton-danger:hover { background: #8c1d18; }
.bouton-danger[disabled] { opacity: 0.5; cursor: not-allowed; }
.bouton-petit { padding: 0.3rem 0.7rem; font-size: 0.85rem; white-space: nowrap; }
.actions-lot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-bottom: 0.75rem; }
.col-case { width: 2rem; text-align: center; }
.historique-offres { margin-bottom: 1.25rem; }
.actions-historique { white-space: nowrap; }
.actions-historique .bouton + .bouton { margin-left: 0.4rem; }
.form-inline { display: inline; margin: 0; }

/* Filtres */
.filtres { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 0 1rem; align-items: end; }
.filtres-actions { display: flex; gap: 0.5rem; margin-bottom: 1rem; }

/* Tableaux */
.tableau-conteneur { overflow-x: auto; }
.carte.tableau-conteneur { padding: 0.5rem; }
.tableau { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.tableau th { text-align: left; font-weight: 600; color: var(--texte-doux); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.02em; }
.tableau th, .tableau td { padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--bordure); vertical-align: top; }
.tableau tbody tr:hover { background: var(--bleu-clair); }
.tableau .num { text-align: right; }
.tableau .actions { white-space: nowrap; }
.tableau .actions > * + * { margin-left: 0.75rem; }
.tableau-compact th, .tableau-compact td { padding: 0.45rem 0.6rem; }
td.alerte { color: var(--erreur); font-weight: 500; }
td.attention { color: #9a5b00; font-weight: 500; }

/* Badges de statut */
.badge { display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.75rem; font-weight: 500; background: var(--fond); color: var(--texte-doux); }
.badge-actif, .badge-signee, .badge-payee, .badge-acceptee { background: var(--succes-fond); color: var(--succes); }
.badge-inactif, .badge-termine, .badge-archive, .badge-brouillon { background: #eceff4; color: var(--texte-doux); }
.badge-suspendu, .badge-revoquee, .badge-en_retard, .badge-refusee { background: var(--erreur-fond); color: var(--erreur); }
.badge-en_attente, .badge-emise, .badge-envoyee { background: #fff4e0; color: #9a5b00; }

/* Pagination */
.pagination { display: flex; flex-wrap: wrap; gap: 0.35rem; justify-content: center; margin-top: 1.25rem; }
.pagination a, .pagination span { padding: 0.4rem 0.75rem; border-radius: 6px; text-decoration: none; }
.pagination a { background: var(--blanc); border: 1px solid var(--bordure); }
.pagination a:hover { background: var(--bleu-clair); }
.pagination .actif { background: var(--bleu); color: var(--blanc); }
.pagination .ellipse { color: var(--texte-doux); }

/* Wizard */
.wizard .wizard-etape + .wizard-etape { margin-top: 1rem; }
.wizard.js .wizard-etape + .wizard-etape { margin-top: 0; }
.wizard-progression { display: none; margin-bottom: 1.25rem; }
.wizard.js .wizard-progression { display: block; }
.wizard-compteur { font-size: 0.85rem; color: var(--texte-doux); margin: 0 0 0.4rem; }
.wizard-barre { height: 6px; background: var(--bordure); border-radius: 999px; overflow: hidden; }
.wizard-barre span { display: block; height: 100%; width: 20%; background: var(--bleu); transition: width 0.25s ease; }
.wizard-etapes { list-style: none; display: flex; justify-content: space-between; gap: 0.5rem; padding: 0; margin: 0.9rem 0 0; }
.wizard-etapes li { display: flex; align-items: center; gap: 0.45rem; font-size: 0.85rem; color: var(--texte-doux); }
.wizard-etapes .pastille {
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.7rem; height: 1.7rem; border-radius: 50%;
    border: 2px solid var(--bordure); background: var(--blanc); font-weight: 600; font-size: 0.8rem;
}
.wizard-etapes li.actif { color: var(--bleu); font-weight: 600; }
.wizard-etapes li.actif .pastille { border-color: var(--bleu); background: var(--bleu); color: var(--blanc); }
.wizard-etapes li.fait .pastille { border-color: var(--bleu); color: var(--bleu); }
.wizard-etapes li.saute { opacity: 0.45; text-decoration: line-through; }
.wizard-nav { display: flex; justify-content: space-between; gap: 0.5rem; margin-top: 1rem; flex-wrap: wrap; }
.wizard-nav-droite { display: flex; gap: 0.5rem; }
.wizard:not(.js) .wizard-precedent, .wizard:not(.js) .wizard-suivant { display: none; }

.societe-bloc { border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 1rem 1.25rem 0.25rem; margin-bottom: 1rem; }
.societe-entete { display: flex; justify-content: space-between; align-items: center; }
.societe-entete h3 { margin: 0 0 0.75rem; }

.recap h3 { color: var(--bleu); border-bottom: 1px solid var(--bordure); padding-bottom: 0.35rem; }
.recap-liste, .infos { display: grid; grid-template-columns: minmax(140px, 1fr) 2fr; gap: 0.4rem 1rem; margin: 0 0 0.5rem; }
.recap-liste dt, .infos dt { color: var(--texte-doux); font-size: 0.9rem; }
.recap-liste dd, .infos dd { margin: 0; }
.vide { color: var(--bordure); }

/* Fiche client */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat { display: flex; flex-direction: column; gap: 0.2rem; padding: 1rem 1.25rem; }
.stat-valeur { font-size: 1.5rem; font-weight: 600; color: var(--bleu); }
.stat-libelle { font-size: 0.85rem; color: var(--texte-doux); }

.onglets { display: flex; gap: 0.25rem; overflow-x: auto; border-bottom: 2px solid var(--bordure); margin-bottom: 1rem; }
.onglets a { padding: 0.65rem 1rem; text-decoration: none; color: var(--texte-doux); white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.onglets a:hover { color: var(--bleu); }
.onglets a.actif { color: var(--bleu); font-weight: 600; border-bottom-color: var(--bleu); }
.onglet-contenu + .onglet-contenu { margin-top: 1rem; }

.adresse-bloc, .societe-fiche { border-top: 1px solid var(--bordure); padding-top: 1rem; margin-top: 1rem; }
.adresse-bloc:first-of-type { border-top: none; margin-top: 0; padding-top: 0; }
.adresse-bloc h4 { margin: 0 0 0.6rem; font-size: 0.95rem; }
.societe-fiche .adresse-bloc { margin-left: 1rem; }
.inactif { opacity: 0.7; }

/* --- Adresses --- */

.titre-section { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 1rem; }
.titre-section h2 { margin: 0; }
.adresse-entete { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1rem; }
.adresse-entete .actions { white-space: nowrap; font-size: 0.9rem; }
.adresse-entete .actions > * + * { margin-left: 0.75rem; }
.filtres-5 { grid-template-columns: 2fr 1fr 1fr 1fr auto; }
.grille-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 1.25rem; }
.form-actions { display: flex; justify-content: space-between; gap: 0.5rem; margin-top: 1rem; flex-wrap: wrap; }
.form-adresse .aide-compteur { margin-top: -0.6rem; margin-bottom: 1rem; }
.tableau td.ean { font-variant-numeric: tabular-nums; white-space: nowrap; }
.energie-libelle { color: var(--texte-doux); font-size: 0.8rem; }
/* --- Documents --- */

.badge-valide { background: var(--succes-fond); color: var(--succes); }
.badge-rejete { background: var(--erreur-fond); color: var(--erreur); }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.filtres-type { grid-template-columns: minmax(0, 320px) auto; justify-content: start; }
.doc-groupe + .doc-groupe { border-top: 1px solid var(--bordure); margin-top: 1.25rem; }
.doc-apercu { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.doc-apercu:hover .doc-nom { text-decoration: underline; }
.doc-nom { word-break: break-all; }
.doc-miniature { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid var(--bordure); background: var(--fond); flex: none; }
.doc-pdf { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; flex: none;
           border-radius: 6px; background: var(--erreur-fond); color: var(--erreur); font-weight: 600; font-size: 0.8rem; }
.doc-motif { margin: 0.35rem 0 0; font-size: 0.85rem; color: var(--erreur); }
.doc-actions { min-width: 230px; }
.doc-validation textarea { width: 100%; font: inherit; font-size: 0.85rem; padding: 0.4rem 0.5rem; border: 1px solid var(--bordure); border-radius: 6px; resize: vertical; }
.doc-boutons { display: flex; gap: 0.5rem; margin-top: 0.4rem; }
.doc-boutons .bouton { padding: 0.4rem 0.8rem; font-size: 0.85rem; }
.modeles-procuration { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.75rem; }
.form-document input[type="file"] { padding: 0.45rem; background: var(--blanc); }
.doc-telecharger { font-size: 0.8rem; }
.doc-groupe .titre-section h3 { margin: 0; }
.form-categorie { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem; }
.form-categorie .champ { margin: 0; }
.form-categorie .erreur-champ { flex-basis: 100%; }
.message-info { color: var(--bleu-fonce); background: var(--bleu-clair); }
.actions-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.75rem; }
.form-conjoint { border-top: 1px solid var(--bordure); margin-top: 1rem; padding-top: 0.5rem; }

/* --- Fenêtre (envoi de procuration) --- */
.dialogue { width: min(560px, calc(100vw - 2rem)); border: none; border-radius: var(--rayon); box-shadow: var(--ombre); padding: 1.5rem; }
.dialogue::backdrop { background: rgba(0, 32, 92, 0.35); }
.dialogue h2 { margin-top: 0; }
.dialogue select, .dialogue input[type="text"] { width: 100%; }
.resultat-procuration input { width: 100%; font-size: 0.85rem; }

/* --- Signature en ligne (signer-procuration.php) --- */
.signature-zone { display: block; width: 100%; height: auto; aspect-ratio: 600 / 220; border: 1px dashed var(--bleu);
    border-radius: 8px; background: var(--blanc); touch-action: none; cursor: crosshair; }
.signature-form .bouton[disabled] { opacity: 0.5; cursor: not-allowed; }
.signature .infos { margin-bottom: 1rem; }

span.alerte { color: var(--erreur); font-weight: 500; }
span.attention { color: #9a5b00; font-weight: 500; }

/* --- Mobile --- */

@media (max-width: 760px) {
    .auth-carte { padding: 1.5rem; }
    .app-entete { flex-wrap: wrap; padding: 0.75rem 1rem; }
    .app-nom { display: none; }
    .app-corps { flex-direction: column; }
    .app-menu { flex: none; flex-direction: row; overflow-x: auto; padding: 0; }
    .app-menu a { white-space: nowrap; padding: 0.75rem 1rem; }
    .app-menu a.actif { border-left: none; border-bottom: 3px solid var(--blanc); }
    .app-contenu { padding: 1rem; }

    .grille-2, .grille-3, .grille-adresse, .filtres, .stats { grid-template-columns: 1fr; }
    .tableau td.ean { white-space: normal; }
    .wizard-etapes .libelle { display: none; }
    .recap-liste, .infos { grid-template-columns: 1fr; gap: 0 0; }
    .recap-liste dd, .infos dd { margin-bottom: 0.5rem; }

    /* Tableaux en cartes empilées : chaque cellule affiche son en-tête */
    .tableau thead { display: none; }
    .tableau, .tableau tbody, .tableau tr, .tableau td { display: block; width: 100%; }
    .tableau tr { border-bottom: 1px solid var(--bordure); padding: 0.5rem 0; }
    .tableau td { border: none; padding: 0.25rem 0.5rem; text-align: left; }
    .tableau .num { text-align: left; }
    .tableau td[data-label]::before { content: attr(data-label) " : "; color: var(--texte-doux); font-size: 0.8rem; }
}

/* --- Lien de signature à copier (fiche client, onglet Procuration) --- */
.lien-copie { display: flex; gap: 0.5rem; align-items: center; width: 100%; }
.lien-copie input { flex: 1; min-width: 0; font-size: 0.8rem; padding: 0.4rem 0.5rem; border: 1px solid var(--bordure); border-radius: 6px; }
.lien-copie .bouton { white-space: nowrap; padding: 0.4rem 0.75rem; }
.ligne-lien td { background: var(--bleu-clair); }

/* --- Signature du mandataire (admin/ma_signature.php) --- */
.signature-actuelle img { display: block; max-width: 100%; width: 360px; height: auto; border: 1px dashed var(--bordure); border-radius: 8px; background: var(--blanc); }

/* --- « Pour qui ? » (fenêtre Envoyer une procuration) --- */
.choix.desactive { opacity: 0.55; cursor: not-allowed; }

/* --- Fournisseurs & tarifs (admin/fournisseurs.php) --- */
.fournisseur-bloc { border-top: 1px solid var(--bordure); padding: 1rem 0; }
.fournisseur-bloc.inactif, tr.inactif { opacity: 0.6; }
.fournisseur-entete { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; margin-bottom: 0.5rem; }
.fournisseur-titre { flex: 1; min-width: 200px; }
.fournisseur-titre h3 { margin: 0; }
.fournisseur-titre .aide { margin: 0.2rem 0 0; }
.fournisseur-logo { width: 56px; height: 56px; object-fit: contain; border: 1px solid var(--bordure); border-radius: 8px; background: var(--blanc); }
.fournisseur-logo.vide { display: inline-flex; align-items: center; justify-content: center; font-weight: 600; color: var(--bleu); background: var(--bleu-clair); }
.contacts-fournisseur { margin-top: 0.75rem; }
.contacts-fournisseur h4 { margin: 0 0 0.35rem; font-size: 1rem; }
.contacts-fournisseur .aide { margin: 0; }
.filtres-tarifs { grid-template-columns: 1fr 1fr auto; }
.actions-tarif { min-width: 220px; }
.form-upload-pdf { display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; align-items: center; margin-top: 0.4rem; }
.form-upload-pdf input[type="file"] { max-width: 190px; font-size: 0.8rem; }
.dialogue-large { width: min(860px, calc(100vw - 2rem)); }
.section-tarif { border: 1px solid var(--bordure); border-radius: 8px; padding: 0.5rem 0.9rem 0; margin: 0 0 0.9rem; }
.section-tarif legend { font-weight: 600; color: var(--bleu); padding: 0 0.3rem; }

/* --- Profil énergie (fiche client, onglet Énergie) --- */
.energie-section + .energie-section { border-top: 1px solid var(--bordure); margin-top: 1.25rem; padding-top: 0.75rem; }
.energie-section h3 { margin: 0.25rem 0 0.75rem; }
.champ-adresse-energie select { max-width: 100%; }
.panneau-adresse { border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 0.75rem 1rem; margin-top: 0.75rem; }
.panneau-titre { margin-top: 0; }
.grille-contrats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.bloc-contrat, .bloc-consommation { background: var(--fond); border-radius: 8px; padding: 0.75rem 1rem; }
.bloc-consommation { margin-top: 1rem; }
.resume-contrat { margin-bottom: 0.75rem; }
.bloc-contrat form[data-form-contrat] { margin-top: 0.75rem; }
.tableau tr.ligne-en-cours td { background: var(--bleu-clair); }
.bloc-contrat h4, .bloc-consommation h4 { margin: 0 0 0.5rem; color: var(--bleu); }
/* v85 : charte couleurs énergie — blocs « Contrat électricité » / « Contrat gaz » de la fiche (onglet Énergie) */
.bloc-contrat-elec { background: var(--color-elec-light); border-left: 4px solid var(--color-elec); }
.bloc-contrat-gaz { background: var(--color-gaz-light); border-left: 4px solid var(--color-gaz); }
.bloc-contrat-elec > h4 { color: var(--color-elec); }
.bloc-contrat-gaz > h4 { color: var(--color-gaz); }
.badge-expiree { background: #eceff4; color: var(--texte-doux); }
.badge-offre-expiree { background: #c2410c; color: #fff; }
.badge-espace-ferme { background: #ffedd5; color: #9a3412; margin-left: .25rem; } /* migration 45 : client actif, espace client fermé */
.validite-offre { color: var(--erreur); font-weight: 700; }

/* --- Simulateur (admin/simulateur.php) --- */
.tableau-simulation tr.meilleure-offre td { background: var(--succes-fond); }
.tableau-simulation tr.meilleure-offre td.economie { color: var(--succes); font-weight: 600; }
.tableau-simulation tr.offre-moins-bonne td { color: var(--texte-doux); }
/* Économie négative : rouge gras (prime sur le gris des offres moins bonnes) */
.tableau-simulation tr td.economie-negative, .tableau-simulation tr td .economie-negative { color: var(--erreur); font-weight: 700; }
.tableau-simulation th .mention-fournisseur { color: var(--erreur); }
.tableau-simulation tr.offre-selectionnee td { box-shadow: inset 0 2px 0 var(--bleu), inset 0 -2px 0 var(--bleu); background: var(--bleu-clair); }
.choix-offre { white-space: nowrap; font-size: 0.85rem; }
.bouton-apercu-offre { display: block; margin-top: 0.4rem; padding: 0.3rem 0.7rem; font-size: 0.85rem; white-space: nowrap; }
.actions-apercu { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; align-items: center; margin-top: 1.5rem; }
.actions-apercu form { margin: 0; }

/* --- Pages client par lien (proposition, décompte) --- */
.proposition .encart { border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 0.75rem 1rem; margin: 0.75rem 0; }
.proposition .encart h2 { font-size: 1rem; margin: 0 0 0.4rem; color: var(--bleu); }
.proposition .encart p { margin: 0.25rem 0; }
.encart-proposition { border-color: var(--succes) !important; }
.economie-grande { font-size: 1.5rem; font-weight: 600; color: var(--succes); }
.provision-estimee .provision-grande { font-size: 1.25rem; font-weight: 600; color: var(--bleu); margin-bottom: .25rem; }
.tableau-simulation td.provision-estimee { white-space: nowrap; }
/* Tableau des offres en groupes de colonnes (14/11/2026) : total élec + gaz vert clair ; élec / gaz : charte couleurs (v84).
   La ligne de la meilleure offre et l'offre sélectionnée (.tableau-simulation tr.… td, plus spécifiques) gardent leur fond. */
.tableau-simulation thead tr.groupes-colonnes th[data-groupe] { text-align: center; color: var(--texte); }
.tableau-simulation .groupe-elec { background: var(--color-elec-light); }
.tableau-simulation .groupe-gaz { background: var(--color-gaz-light); }
.tableau-simulation thead tr.groupes-colonnes th[data-groupe="elec"] { color: var(--color-elec-dark); box-shadow: inset 0 3px 0 var(--color-elec); }
.tableau-simulation thead tr.groupes-colonnes th[data-groupe="gaz"] { color: var(--color-gaz-dark); box-shadow: inset 0 3px 0 var(--color-gaz); }
.tableau-simulation .groupe-total { background: #eaf6ee; }
@media (min-width: 761px) {
    .tableau-simulation .debut-groupe { border-left: 2px solid var(--bordure); }
}
/* v79 (15/11/2026) : situation actuelle et nouvelle simulation alignées (même <colgroup>, table-layout: fixed),
   pleine largeur sans défilement horizontal : cellules resserrées, en-têtes plus petits, texte replié dans la colonne */
@media (min-width: 761px) {
    .tableau-simulation.tableau-aligne { table-layout: fixed; width: 100%; }
    .tableau-simulation.tableau-aligne th, .tableau-simulation.tableau-aligne td { padding: 4px 6px; overflow-wrap: break-word; hyphens: auto; }
    .tableau-simulation.tableau-aligne th { font-size: 0.66rem; letter-spacing: 0; text-transform: none; line-height: 1.25; }
    .tableau-simulation.tableau-aligne td { font-size: 0.76rem; }
    /* montants : jamais coupés au milieu d'un nombre (retour à la ligne aux espaces seulement : « 1.027,50 » / « € ») */
    .tableau-simulation.tableau-aligne td.num { overflow-wrap: normal; hyphens: none; }
    .tableau-simulation.tableau-aligne td.num .aide, .tableau-simulation.tableau-aligne td.num .detail-calcul { overflow-wrap: break-word; }
    .tableau-simulation.tableau-aligne .choix-offre, .tableau-simulation.tableau-aligne .bouton-apercu-offre,
    .tableau-simulation.tableau-aligne td.provision-estimee { white-space: normal; }
    .tableau-simulation.tableau-aligne .bouton-apercu-offre, .tableau-simulation.tableau-aligne .promo-offre > summary { padding: 0.2rem 0.4rem; font-size: 0.75rem; }
    .tableau-simulation.tableau-aligne .bulle-provision { padding: 0.1rem 0.35rem; }
    .resultats-simulation .sim-section .tableau-conteneur { overflow-x: visible; }
    .resultats-simulation.carte { padding: 1rem; }
}
/* v81 (15/11/2026) : simulateur compact par défaut, ▶ / ▼ par ligne (simulateur.js section 7). La classe sim-compact
   n'est posée que par JavaScript : sans lui, tout reste développé. Compact : valeur principale seule des cellules
   chiffrées (lignes en petit, détail du calcul, « puis … », moyennes, primes, provisions détaillées masqués). */
.tableau-simulation .cellule-developper { text-align: center; padding-left: 2px; padding-right: 2px; }
.bouton-developper { border: 1px solid var(--bordure, #ccc); background: #fff; color: var(--bleu); border-radius: 4px; cursor: pointer;
    font-size: 0.75rem; line-height: 1; padding: 0.2rem 0.3rem; }
.bouton-developper:hover, .bouton-developper:focus-visible { background: var(--bleu-clair); }
.ligne-developper-tout { margin: 0.4rem 0; }
.tableau-simulation.sim-compact tr:not(.expanded) td.num > br,
.tableau-simulation.sim-compact tr:not(.expanded) td.num > small,
.tableau-simulation.sim-compact tr:not(.expanded) td.num > .detail-calcul { display: none; }
@media (max-width: 760px) {
    .tableau-simulation td.colonne-vide { display: none; }
}
/* Simulateur en deux sections (15/11/2026) : situation actuelle (bandeau orange), nouvelle simulation (bandeau gris) */
.sim-section { margin-top: 1.25rem; }
.bandeau-sim { margin: 0 0 0.75rem; padding: 0.6rem 0.9rem; border-radius: 8px; font-size: 1.05rem; font-weight: 600; color: #ffffff; }
.bandeau-situation { background: #c2410c; }
.bandeau-simulation { background: #4b5563; }
.case-sans-promo { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; margin: 0 0 0.75rem; }
.case-sans-promo .aide { flex-basis: 100%; margin: 0; }
.bouton-accepter { background: var(--succes); border-color: var(--succes); font-size: 1.05rem; padding-top: 0.85rem; padding-bottom: 0.85rem; }
.bouton-accepter:hover { background: #17552e; }
.form-reponse .refus { text-align: center; font-size: 0.9rem; }
.zone-depot { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 1.25rem; border: 2px dashed var(--bordure);
    border-radius: var(--rayon); text-align: center; cursor: pointer; background: var(--fond); }
.zone-depot.survol { border-color: var(--bleu); background: var(--bleu-clair); }
.zone-depot-nom { font-size: 0.85rem; color: var(--texte-doux); word-break: break-all; }

/* --- Présentation client (client/simulation.php) --- */
.encart-proposition h3 { font-size: 0.95rem; margin: 0.75rem 0 0.1rem; color: var(--bleu); }
.proposition .pres-part { color: var(--texte-doux); }
.proposition .pres-economie, .proposition-commerciale .pres-economie { color: var(--succes); font-weight: 600; font-size: 1.05rem; }
.proposition .pres-perte, .proposition-commerciale .pres-perte { color: var(--erreur); font-weight: 700; font-size: 1.05rem; }
/* Page de l'offre en deux étapes (prompt 21) */
.page1-contexte p { margin: 0 0 .6rem; }
.page1-contexte .p1-rouge { color: var(--erreur); }
.p1-provisions { font-size: 1.1rem; font-weight: 600; color: var(--bleu); }
.actions-page1 { display: grid; gap: .75rem; margin-top: 1rem; }
.actions-page1 .form-contact .bouton { width: 100%; }
.p2-resultat { font-size: 1.15rem; margin-top: 0; }
.tableau-comparatif th[scope="row"] { text-align: left; font-weight: 500; }
.tableau-comparatif { font-size: .9rem; }
.tableau-comparatif th, .tableau-comparatif td { padding: .5rem .35rem; }
.tableau-comparatif .p2-difference th, .tableau-comparatif .p2-difference td { font-weight: 700; border-top: 2px solid var(--bordure); }
.p2-garantie { margin-top: .75rem; }
.bouton-refuser { background: var(--blanc); border-color: var(--erreur); color: var(--erreur); margin-top: .5rem; }
.bouton-refuser:hover { background: var(--erreur-fond); }
.contact-demande { font-size: .8rem; color: #9a5b00; }
/* Actualisation des prix (prompt 19) */
.actualisation-prix h2 { margin-top: 1.25rem; }
.actualisation-prix .liste-prix, .actualisation-prix .liste-decomposition { margin: .25rem 0 .75rem; padding-left: 1.25rem; }
.actualisation-prix .liste-decomposition { color: var(--texte-doux, #555); }
.actualisation-prix .provision-grande { font-size: 1.15rem; font-weight: 600; color: var(--bleu); }
.actualisation-prix .actu-difference { font-weight: 600; font-size: 1.05rem; }
.actualisation-prix .actu-difference.pres-economie { color: var(--succes); }
.actualisation-prix .actu-difference.pres-perte { color: var(--erreur); font-weight: 700; }
.actualisation-prix .actu-question { margin-top: 1rem; padding-top: .75rem; border-top: 1px solid var(--bordure); }
.actualisation-prix .actu-deux-realites { display: grid; gap: .25rem; margin: .5rem 0; }
.contrat-variable { margin-bottom: .75rem; }
/* Proposition commerciale (prompt 20) */
.badge-signe_concurrent { background: var(--erreur-fond); color: var(--erreur); }
.badge-traite { background: #eceff4; color: var(--texte-doux); }
.bouton-succes { background: var(--succes); border-color: var(--succes); color: var(--blanc); }
.bouton-alerte { background: #fff4e0; border-color: #c77700; color: #8a4f00; }
.message-avertissement { color: #8a4f00; background: #fff4e0; }
.message-protection { border-left: 4px solid var(--bleu); padding: .25rem 0 .25rem 1rem; margin: 1rem 0; }
.proposition-commerciale .actions-ligne { flex-wrap: wrap; }
.detail-proposition summary { cursor: pointer; color: var(--bleu); font-size: .9rem; }
.etapes-proposition { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0 0 1rem; font-size: .9rem; }
.etapes-proposition li { padding: .3rem .7rem; border-radius: 999px; background: #eceff4; color: var(--texte-doux); }
.etapes-proposition li.actif { background: var(--bleu); color: var(--blanc); font-weight: 600; }
.proposition-commerciale .choix { display: inline-flex; }
.proposition-commerciale .choix input { width: auto; flex: none; }
.proposition-commerciale fieldset > .choix { display: flex; margin: .35rem 0; }
.tableau-propositions td.actions { white-space: normal; min-width: 10rem; }
.tableau-propositions td.actions .form-inline { display: block; margin-bottom: .25rem; }
.detail-admin { margin: 0.75rem 0; border: 1px dashed var(--bordure); border-radius: var(--rayon); padding: 0.5rem 0.75rem; }
.detail-admin summary { cursor: pointer; font-weight: 500; color: var(--texte-doux); }

/* --- Résumé budgétaire (simulateur, page client) et prix variables --- */
.resumes-budget { margin: 1rem 0; }
.resumes-budget h3 { font-size: 1rem; margin: 0 0 0.25rem; }
.resume-budget { margin: 0.5rem 0; }
.resume-budget h3 { font-size: 0.95rem; margin: 0.75rem 0 0.25rem; color: var(--bleu); }
.tableau-budget { border-collapse: collapse; margin: 0.4rem 0 0.75rem; max-width: 34rem; width: 100%; }
.tableau-budget th, .tableau-budget td { padding: 0.2rem 0.4rem; text-align: left; font-weight: 400; border: 0; }
.tableau-budget td.num { text-align: right; white-space: nowrap; }
.tableau-budget .budget-total th, .tableau-budget .budget-total td { font-weight: 600; border-top: 1px solid var(--bordure); }
.tableau-budget .budget-provision th, .tableau-budget .budget-provision td { font-weight: 600; color: var(--bleu); }
.tableau-budget td.economie-negative, .proposition .economie-negative { color: var(--erreur); font-weight: 700; }
.fonction-a-venir { display: inline-block; cursor: help; }
.fonction-a-venir .bouton[disabled] { pointer-events: none; opacity: 0.6; }

@media (max-width: 760px) {
    .grille-contrats { grid-template-columns: 1fr; }
}

/* --- Onglet Contrats (fiche client) et « Mes contrats » (espace client) — prompt 17 --- */
.badge-transfert_prevu { background: #e3edff; color: var(--bleu); }
.badge-transfert_finalise { background: var(--succes-fond); color: var(--succes); }
.badge-demarche-directe { background: #efe7ff; color: #5b21b6; margin-left: .25rem; } /* migration 51 : Démarche en direct */
.badge-contrat-expire { background: #eceff4; color: var(--texte-doux); }
.badge-a_classer { background: #fff4e0; color: #9a5b00; }
.contrat-en-cours { margin: 0.75rem 0; }
.contrat-en-cours .contrat-titre { margin-top: 0; }
.contrat-en-cours .actions-ligne { align-items: flex-start; flex-wrap: wrap; }
/* Volets « Enregistrer chez le fournisseur », « Valider le transfert », « ✏ Modifier » : <details>, sans JavaScript */
.volet-contrat > summary { list-style: none; cursor: pointer; display: inline-block; }
.volet-contrat > summary::-webkit-details-marker { display: none; }
.volet-contrat[open] > summary { margin-bottom: 0.5rem; }
.volet-contenu { border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 1rem; background: var(--blanc); }
.tableau-contrats td.actions { position: relative; }
.tableau-contrats .volet-contrat[open] .volet-contenu { position: absolute; right: 0; z-index: 5; width: min(36rem, 90vw);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); text-align: left; }
.form-classer { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; margin-bottom: 0.35rem; }
.form-classer select { max-width: 14rem; }
tr.ligne-a-classer td { background: #fffaf0; }
@media (max-width: 760px) {
    .tableau-contrats .volet-contrat[open] .volet-contenu { position: static; width: auto; box-shadow: none; }
}

/* --- Agents commerciaux (prompt 23) --- */
.badge-agent-en_formation { background: #fff4e0; color: #9a5b00; }
.badge-agent-actif { background: var(--succes-fond); color: var(--succes); }
.badge-agent-inactif { background: #eceff4; color: var(--texte-doux); }
.badge-nature-reel { background: #e3edff; color: var(--bleu); }
.badge-nature-test { background: #fff4e0; color: #9a5b00; }
.badge-nature-personnel { background: #efe7ff; color: #5b21b6; }
.conversion-client { border-left: 4px solid #9a5b00; }
/* Fiche en lecture seule (Team Leader sur un client de son Consultant) : aucune action proposée */
.lecture-seule form, .lecture-seule button, .lecture-seule dialog, .lecture-seule .actions-page,
.lecture-seule a[href*="_modifier.php"], .lecture-seule a[href*="adresse_nouvelle.php"],
.lecture-seule a[href*="actualisation_prix.php"], .lecture-seule a[href*="proposition_commerciale.php"],
.lecture-seule a[href*="simulateur.php"] { display: none !important; }
.liste-simple { list-style: none; padding: 0; margin: 0 0 0.75rem; }
.liste-simple li { padding: 0.35rem 0; border-bottom: 1px solid #eceff4; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.badge-fact-en_attente { background: #fff4e0; color: #9a5b00; }
.badge-fact-paye_client { background: #e3edff; color: var(--bleu); }
.badge-fact-ventilation_envoyee, .badge-fact-facture_agent_recue { background: #efe7ff; color: #5b21b6; }
.badge-fact-courtage_paye { background: var(--succes-fond); color: var(--succes); }
#recap-facturation td.num, #historique-facturation td.num { white-space: nowrap; }

/* --- Onglet Emails de la fiche client (prompt 24) --- */
.badge-non-lus { display: inline-block; min-width: 1.3em; padding: 0 0.35em; border-radius: 1em; background: var(--erreur); color: #fff; font-size: 0.75rem; text-align: center; }
/* Lot D : éléments à compléter (fiche, liste des clients, tuiles) */
.badge-manquants { display: inline-block; padding: 0 0.45em; border-radius: 1em; background: #fdecea; color: var(--erreur); border: 1px solid var(--erreur); font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.liste-manquants { margin: 0.3rem 0 0.6rem; color: var(--erreur); font-size: 0.9rem; }
.volet-email { margin-bottom: 1rem; }
.volet-email > summary { display: inline-block; list-style: none; cursor: pointer; }
.volet-email > summary::-webkit-details-marker { display: none; }
.volet-email[open] > summary { margin-bottom: 0.75rem; }
.liste-emails { display: flex; flex-direction: column; gap: 0.4rem; }
.email { border: 1px solid #e3e7ef; border-radius: 8px; }
.email > summary { display: grid; grid-template-columns: 1.5rem 9rem minmax(10rem, 16rem) 1fr auto; gap: 0.25rem 0.75rem; align-items: baseline; padding: 0.6rem 0.8rem; cursor: pointer; list-style: none; }
.email > summary::-webkit-details-marker { display: none; }
.email.non-lu { background: #fff4f2; border-color: #f3c7c0; }
.email.non-lu .email-sujet::after { content: ' •'; color: var(--erreur); }
.email-direction { font-weight: 600; color: var(--bleu); }
.email-entrant .email-direction { color: var(--succes); }
.email-date, .email-correspondant { color: var(--texte-doux); font-size: 0.9rem; }
.email-extrait { grid-column: 2 / -1; color: var(--texte-doux); font-size: 0.9rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.badge-email { background: #eceff4; color: var(--texte-doux); }
.email-contenu { padding: 0 0.8rem 0.8rem; }
.email-texte { white-space: pre-wrap; word-break: break-word; font-family: inherit; background: #f7f8fb; padding: 0.75rem; border-radius: 6px; margin: 0.5rem 0; }
@media (max-width: 760px) {
    .email > summary { grid-template-columns: 1.5rem 1fr; }
    .email-correspondant, .email-sujet, .badge-email { grid-column: 2; }
}

/* Prompt 25 : en lecture seule, les actions de procuration (envoi, relance) restent permises au Team Leader */
.lecture-seule .action-autorisee, .lecture-seule .action-autorisee form, .lecture-seule .action-autorisee button { display: revert !important; }
.lecture-seule .action-autorisee .form-inline { display: inline-block !important; }
/* Prompt 26 : actualisation des prix permise au Team Leader (lien masqué par la règle a[href*="actualisation_prix.php"]) */
.lecture-seule a.action-autorisee { display: inline-block !important; }
/* Prompt 27 : activation de l'espace client, checklist des documents */
.activation-client { border: 1px solid var(--bordure, #c9d3e6); border-radius: 8px; padding: 0.8rem 1rem; margin: 0.8rem 0; }
.checklist-documents { list-style: none; padding: 0; margin: 0.4rem 0 0.8rem; }
.checklist-documents li { padding: 0.15rem 0; }
.checklist-manquant { color: var(--erreur); }
.checklist-absent { color: var(--texte-doux); }
.checklist-volet { margin: 0.4rem 0 1rem; }
.checklist-volet summary { cursor: pointer; font-weight: 600; }
/* Prompt 28 : statuts bronze / silver / gold / platinium, page Paramètres */
.badge-niveau { color: #1d2433; font-weight: 600; }
.badge-niveau-bronze { background: #CD7F32; color: #ffffff; }
.badge-niveau-silver { background: #C0C0C0; }
.badge-niveau-gold { background: #FFD700; }
.badge-niveau-platinium { background: #E5E4E2; }
.tableau-parametres .champ { margin: 0; }
.tableau-parametres .champ label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.champ-unite input { width: 7rem; text-align: right; }
.part-negative { color: var(--erreur); }
/* Prompt 29 : bandeau de la checklist (fiche client), synthèse de l'onglet Documents, modèles des agents */
.bandeau-checklist { background: #fff4e0; border: 1px solid #f0c27a; border-radius: 8px; padding: 0.6rem 1rem; margin: 0.6rem 0 1rem; }
.bandeau-checklist-titre { margin: 0 0 0.3rem; font-weight: 600; color: #8a4f00; }
.bandeau-checklist ul { list-style: none; margin: 0; padding: 0; }
.bandeau-checklist .checklist-attente, .checklist-documents .checklist-attente { color: #b06a00; }
.checklist-conseilles, .checklist-rappel { color: var(--texte-doux); margin: 0.3rem 0 0; }
.synthese-checklist { border-radius: 8px; padding: 0.6rem 1rem; margin: 0 0 1rem; }
.synthese-checklist h3 { margin-top: 0; }
.dossier-complet { background: var(--succes-fond); }
.dossier-complet-titre { color: var(--succes); font-weight: 600; }
.dossier-incomplet { background: #fff4e0; }
.dossier-incomplet-titre { color: #8a4f00; font-weight: 600; }
.etat-ok { color: var(--succes); font-weight: 600; }
.etat-attention { color: #b06a00; font-weight: 600; }
.stat-emails { text-decoration: none; color: inherit; }

/* Index compteurs (prompt 31) */
.compteur-index { border-top: 1px solid #e3e7ef; padding-top: 12px; margin-top: 16px; }
.compteur-index h3 { margin-bottom: 8px; }
.volet-releve { margin: 8px 0 12px; }
.volet-releve > summary { display: inline-block; cursor: pointer; list-style: none; }
.volet-releve > summary::-webkit-details-marker { display: none; }
.form-releve { margin-top: 12px; padding: 12px; background: #f7f9fc; border-radius: 6px; }
.resume-index p { margin: 4px 0; }
.barre-avancement { height: 12px; background: #e3e7ef; border-radius: 6px; overflow: hidden; max-width: 420px; margin: 6px 0; }
.barre-avancement span { display: block; height: 100%; }
.barre-vert span { background: var(--succes); }
.barre-orange span { background: #e08a00; }
.barre-rouge span { background: var(--erreur); }
.avancement-vert { color: var(--succes); }
.avancement-orange { color: #b06a00; }
.avancement-rouge { color: var(--erreur); }
.badge-releve-decompte { background: #e1ecff; color: #003087; }
.badge-releve-client { background: #eef0f4; color: #4a5263; }
.form-releve .champ label.choix { display: inline-flex; margin-bottom: 0; }
.form-releve .choix input { width: auto; flex: none; }
/* Index de départ, modification d'un relevé (prompt 33) */
.badge-index-depart { background: #fff4d6; color: #7a5600; }
.actions-releve { position: relative; width: 1%; }
.actions-releve .form-inline, .actions-releve .volet-modif-releve { display: block; margin: 2px 0; white-space: nowrap; }
.volet-modif-releve > summary { list-style: none; cursor: pointer; }
.volet-modif-releve > summary::-webkit-details-marker { display: none; }
.volet-modif-releve[open] > .form-releve { position: absolute; right: 0; z-index: 5; width: min(560px, 90vw); white-space: normal;
    background: var(--blanc); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15); text-align: left; }

/* Lot L8 : tableaux de bord à tuiles (includes/navigation_functions.php) */
.tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin: 1rem 0 1.5rem; }
.tuile { display: flex; flex-direction: column; gap: 0.4rem; padding: 1rem 1.15rem; background: var(--blanc);
    border: 1px solid var(--bordure); border-radius: var(--rayon); box-shadow: var(--ombre); }
.tuile-entete { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; font-size: 1.05rem; color: var(--bleu); text-decoration: none; }
a.tuile-entete:hover, a.tuile-entete:focus-visible { color: var(--bleu-fonce); text-decoration: underline; }
.tuile-icone { font-size: 1.4rem; line-height: 1; }
.tuile-detail { margin: 0; font-size: 0.9rem; color: var(--texte-doux); }
.tuile-sous > summary { cursor: pointer; font-size: 0.85rem; color: var(--bleu); }
.tuile-sous ul { list-style: none; margin: 0.4rem 0 0; padding: 0; display: grid; gap: 0.3rem; font-size: 0.9rem; }

/* Lot L9 : arbre du compte (onglet « Compte » de la fiche, « Mon dossier » du client) */
.arbre-compte { display: grid; gap: 1rem; }
.arbre-entite, .arbre-adresse { border: 1px solid var(--bordure); border-radius: var(--rayon); background: var(--blanc); }
.arbre-entite > summary, .arbre-adresse > summary { cursor: pointer; padding: 0.7rem 1rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.arbre-entite > summary { font-weight: 600; background: var(--bleu-clair); border-radius: var(--rayon); }
.arbre-titre { color: var(--bleu); }
.arbre-contenu { padding: 0.75rem 1rem 1rem; display: grid; gap: 0.75rem; }
.arbre-adresse { margin-left: 1rem; }
.arbre-sous-blocs { padding: 0 1rem 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.75rem 1.25rem; }
.arbre-bloc h5 { margin: 0.5rem 0 0.3rem; font-size: 0.95rem; color: var(--bleu); }
.arbre-entite.inactif, .arbre-adresse.inactif { opacity: 0.75; }
.arbre-economies-total { font-size: 1.1rem; }
@media (max-width: 640px) { .arbre-adresse { margin-left: 0; } }

/* Lot L10 : messagerie interne */
.liste-fils tr.non-lu td:first-child a { font-weight: 600; }
.badge-fil-ouvert { background: var(--bleu-clair); color: var(--bleu); }
.badge-fil-en_cours { background: #fff4e0; color: #8a5300; }
.badge-fil-resolu { background: var(--succes-fond); color: var(--succes); }
.badge-fil-archive { background: #eceff3; color: var(--texte-doux); }
.messages { list-style: none; margin: 1rem 0; padding: 0; display: grid; gap: 0.75rem; }
.message-fil { padding: 0.75rem 1rem; border: 1px solid var(--bordure); border-radius: var(--rayon); background: var(--blanc); max-width: 48rem; }
.message-fil.message-moi { margin-left: auto; background: var(--bleu-clair); }
.message-fil.message-systeme { background: transparent; border-style: dashed; font-style: italic; }
.message-entete { margin: 0 0 0.35rem; }
.message-corps { white-space: normal; overflow-wrap: anywhere; }
/* Lot L11 : traductions des messages */
.message-original, .message-autres-langues { margin-top: .4rem; font-size: .92em; }
.message-original summary, .message-autres-langues summary { cursor: pointer; color: var(--texte-doux, #555); }
.message-original .message-corps { border-left: 3px solid var(--bordure, #ccc); padding-left: .6rem; }
.message-non-traduit { font-style: italic; }
.apercu-traduction textarea { width: 100%; }

/* --- Lot L12 : langues (Paramètres) --- */
.champ-ordre, .champ input.champ-ordre { width: 6rem; }
.tableau-langues tr.a-erreur td { background: var(--erreur-fond); }
.tableau-langues .choix.case { margin-top: 0; }

/* --- Lot L12 : page publique (index.php) --- */
.page-publique { background: var(--blanc); }
.public-entete {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--bordure);
}
.public-marque { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--bleu); font-weight: 600; }
.public-marque img { height: auto; }
.public-actions { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.public-actions .bouton-plein { width: auto; }
.page-publique main { max-width: 980px; margin: 0 auto; padding: 0 1rem 2rem; }
.public-hero { text-align: center; padding: 3rem 0 2rem; }
.public-hero h1 { font-size: 2rem; margin-bottom: 0.75rem; }
.public-accroche { font-size: 1.1rem; color: var(--texte-doux); max-width: 680px; margin: 0 auto; }
.public-compteur {
    background: var(--bleu); color: var(--blanc); border-radius: var(--rayon); padding: 2rem 1.5rem; text-align: center;
    box-shadow: var(--ombre);
}
.public-compteur h2 { margin: 0 0 0.5rem; font-size: 1.2rem; font-weight: 600; color: var(--blanc); }
.public-compteur-phrase { font-size: 1.15rem; margin: 0 0 1.5rem; }
.public-compteur-phrase strong { font-size: 1.35rem; }
.public-chiffres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.public-chiffres > div { background: rgba(255, 255, 255, 0.1); border-radius: var(--rayon); padding: 1rem 0.5rem; }
.public-chiffres span { display: block; }
.public-chiffre { font-size: 1.8rem; font-weight: 600; line-height: 1.2; }
.public-note { margin: 1.25rem 0 0; font-size: 0.8rem; opacity: 0.85; }
.public-etapes { padding: 2.5rem 0 1rem; }
.public-etapes h2, .public-contact h2 { color: var(--bleu); font-size: 1.3rem; text-align: center; }
.public-etapes ol { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; counter-reset: etape; }
.public-etapes li { background: var(--fond); border-radius: var(--rayon); padding: 1.25rem; counter-increment: etape; }
.public-etapes li::before {
    content: counter(etape); display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem;
    border-radius: 50%; background: var(--bleu); color: var(--blanc); font-weight: 600; margin-bottom: 0.5rem;
}
.public-etapes h3 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.public-etapes p { margin: 0; color: var(--texte-doux); }
.public-contact { text-align: center; padding: 1.5rem 0; overflow-wrap: anywhere; }
.public-pied { text-align: center; font-size: 0.8rem; color: var(--texte-doux); padding: 1.5rem 1rem; border-top: 1px solid var(--bordure); }
@media (max-width: 760px) {
    .public-hero { padding: 2rem 0 1.5rem; }
    .public-hero h1 { font-size: 1.5rem; }
    .public-chiffres, .public-etapes ol { grid-template-columns: 1fr; }
}

/* Client en brouillon (création rapide, migration 40) : champs à compléter en rouge gras */
.a-completer { color: var(--erreur); font-weight: 700; }
.brouillon-client .liste-simple { margin: 0.25rem 0 0.75rem; }

/* Provision d'une adresse professionnelle : « J'introduis le prix en : HTVA / TVAC » + équivalent calculé (provision_ui.php) */
.champ-provision .choix-regime { border: none; padding: 0; margin: 0 0 0.35rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1rem; }
.champ-provision .choix-regime legend { float: left; padding: 0; margin-right: 0.25rem; font-size: 0.9em; color: var(--texte-doux); }
.champ-provision .choix-regime .choix { margin-bottom: 0; font-weight: normal; }
.champ-provision .provision-calculee { margin-top: 0.4rem; }
.champ-provision .provision-calculee label { font-size: 0.9em; color: var(--texte-doux); font-weight: normal; }
.champ-provision .champ-grise { background: var(--fond); color: var(--texte-doux); cursor: default; }

/* Note d'une fiche de prix fournisseur (simulateur) : bouton « ⓘ Infos » et bulle ouverte au clic (renderInfoNote) */
.info-note { position: relative; display: inline-block; margin-top: 0.25rem; }
.info-note > summary { list-style: none; cursor: pointer; color: var(--bleu); font-size: 0.85em; white-space: nowrap; }
.info-note > summary::-webkit-details-marker { display: none; }
.info-note-contenu { position: absolute; z-index: 20; top: 100%; left: 0; margin-top: 0.25rem; width: max-content; max-width: min(22rem, 80vw);
    padding: 0.6rem 0.75rem; background: var(--blanc); color: var(--texte); border: 1px solid var(--bordure);
    border-radius: var(--rayon); box-shadow: var(--ombre); font-size: 0.85em; font-weight: normal; white-space: normal; text-align: left; }

/* Simulateur : fenêtre « 🏷 Promo » d'une offre (promotions par canal, migration 44) et badge de la promotion appliquée */
.promo-offre { position: relative; margin-top: 0.4rem; }
.promo-offre > summary { list-style: none; padding: 0.3rem 0.7rem; font-size: 0.85rem; white-space: nowrap; }
.promo-offre > summary::-webkit-details-marker { display: none; }
.promo-fenetre { position: absolute; z-index: 20; top: 100%; right: 0; margin-top: 0.25rem; width: max-content; max-width: min(24rem, 85vw);
    padding: 0.75rem; background: var(--blanc); color: var(--texte); border: 1px solid var(--bordure); border-radius: var(--rayon);
    box-shadow: var(--ombre); font-size: 0.85rem; white-space: normal; text-align: left; }
.promo-fenetre fieldset { border: 0; margin: 0.5rem 0; padding: 0; }
.promo-fenetre legend { font-weight: 600; padding: 0; }
.promo-fenetre .choix { display: flex; gap: 0.4rem; align-items: flex-start; margin: 0.25rem 0; }
.promo-creation { margin-top: 0.6rem; border-top: 1px solid var(--bordure); padding-top: 0.4rem; }
.promo-creation > summary { cursor: pointer; color: var(--bleu); }
.promo-creation label { display: block; margin-top: 0.35rem; }
.promo-creation input { width: 100%; }
.promo-creation .bouton { margin-top: 0.5rem; }
.badge-promo { background: var(--succes-fond); color: var(--succes); }

/* Actualisation des prix : état des provisions (payée / nouveaux prix, cas 1 / cas 2) et réponse du client (migration 41) */
.etat-provisions { margin: 0.5rem 0; }
.etat-provisions p { margin: 0.35rem 0; }
.etat-provisions-fiche { border-left: 3px solid var(--bordure); padding-left: 0.75rem; margin: 0.5rem 0 0.75rem; }
.reponse-actualisation { margin: 0.5rem 0; }
.bandeau-actualisation .bouton { margin-left: 0.5rem; }

/* Contrat actuel en deux blocs : situation actuelle (origine) / situation correcte (tarif fournisseur), migration 42 */
.situations-contrat { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0.75rem 1.25rem; margin: 0.5rem 0; }
.situation-contrat h5 { margin: 0 0 0.35rem; }
.situation-correcte { border-left: 3px solid var(--bleu); padding-left: 0.75rem; }
.titre-surligne { display: inline-block; background: var(--bleu-clair); padding: 0.15rem 0.5rem; border-radius: 4px; margin: 0.35rem 0; }
.bulle-provision { display: inline-block; font-weight: 700; background: var(--bleu-clair); color: var(--bleu); padding: 0.15rem 0.6rem; border-radius: 999px; }
/* Couleur selon l'évolution par rapport à la provision payée : hausse rouge, baisse verte, identique neutre */
.bulle-hausse { background: var(--erreur-fond); color: var(--erreur); }
.bulle-baisse { background: var(--succes-fond); color: var(--succes); }
.bulle-neutre { background: var(--bleu-clair); color: var(--bleu); }

/* Lignes de calcul (fiche, simulateur, proposition concurrente) : nombre de kWh en rouge gras ; volet « Détail du calcul » */
.kwh-calcul { color: var(--erreur); font-weight: 700; }
.detail-calcul { text-align: left; margin-top: 0.35rem; font-size: 0.9em; }
.detail-calcul summary { cursor: pointer; color: var(--bleu); }
.detail-calcul dl { margin: 0.35rem 0; }
/* Migration 43 : import des tarifs (aperçu) et assistant fournisseur */
.tableau-import tr.ligne-erreur td { background: #fdecea; }
.tableau-import .erreur-champ, .tableau-import .aide { margin: 0.15rem 0 0; }
.import-resume li { margin-bottom: 0.25rem; }
/* Lot 3 : grille de correction des tarifs (colonne produit fixe au défilement horizontal) */
.tableau-grille-conteneur { max-height: 75vh; overflow: auto; }
.tableau-grille th, .tableau-grille td { white-space: nowrap; vertical-align: top; }
.tableau-grille thead th { position: sticky; top: 0; z-index: 2; background: var(--blanc); font-size: 0.8rem; }
.tableau-grille .col-produit { position: sticky; left: 0; z-index: 1; background: var(--blanc); text-align: left; min-width: 14rem; white-space: normal; }
.tableau-grille thead .col-produit { z-index: 3; }
.tableau-grille .col-produit small { display: block; color: var(--texte-doux); font-weight: 400; }
.tableau-grille input[type="text"] { width: 5.5rem; text-align: right; padding: 0.2rem 0.3rem; }
.tableau-grille td.a-erreur input { border-color: var(--erreur); background: #fdecea; }
.tableau-grille td .erreur-champ { display: block; white-space: normal; max-width: 8rem; font-size: 0.75rem; }
.tableau-grille tr.ligne-a-saisir .col-produit { background: #fff8e6; }
.tableau-grille tr.ligne-erreur .col-produit { background: #fdecea; }

/* ---- Token Énergie v4 (page de l'offre, client/simulation.php) ----
   Page 1 : bandeau par cas (A bleu, D vert, B violet), sections, encadrés, résultats vert / rouge.
   Page 2 : bilan chiffré, palette validée en couleurs fixes (indépendantes du thème). */
.page1-v4 { padding: 0; overflow: hidden; }
.p1v4-bandeau { margin: 0; padding: .8rem 1.2rem; color: #fff; font-weight: 600; }
.p1v4-bleu { background: #1a6abf; }
.p1v4-vert { background: #1a7a4a; }
.p1v4-violet { background: #6a3aab; }
.p1v4-section { padding: .9rem 1.2rem; border-top: 1px solid var(--bordure); }
.p1v4-bandeau + .p1v4-section { border-top: none; }
.p1v4-section h3 { margin: 0 0 .5rem; font-size: 1.02rem; }
.p1v4-section ul, .p1v4-section ol { margin: .4rem 0 .6rem; padding-left: 1.3rem; }
.p1v4-section li { margin-bottom: .3rem; }
.p1v4-encadre { margin-top: .7rem; padding: .6rem .8rem; border-radius: 6px; border-left: 3px solid; font-size: .92rem; }
.p1v4-encadre p { margin: 0; }
.p1v4-encadre .p1v4-encadre-titre { font-weight: 600; margin-bottom: .2rem; }
.p1v4-encadre-info { background: #f0f4fa; border-color: #b8cce8; }
.p1v4-encadre-vert { background: #edf7f2; border-color: #1a7a4a; }
.p1v4-encadre-ambre { background: #fef9ee; border-color: #92600a; }
.p1v4-resultat { margin-top: .6rem; }
.p1v4-resultat p { margin: 0; }
.p1v4-point { display: inline-block; width: .65rem; height: .65rem; border-radius: 50%; margin-right: .4rem; vertical-align: middle; }
.p1v4-resultat-vert .p1v4-point { background: #1a7a4a; }
.p1v4-resultat-rouge .p1v4-point { background: #c0392b; }

.auth-carte:has(.bilan-token) { max-width: 760px; min-width: 0; } /* page 2 de l'offre : carte élargie pour le bilan ; min-width : le tableau défile dans son conteneur (téléphone) */
.bilan-token { margin-top: 1.2rem; }
.bilan-token h2 { margin-bottom: .3rem; }
.bilan-token .tableau-conteneur + .tableau-conteneur { margin-top: 1rem; }
.bilan-tableau { width: 100%; min-width: 30rem; border-collapse: collapse; font-size: .82rem; background: #fff; color: #000; }
.bilan-tableau th, .bilan-tableau td { border: 1px solid #d9d9d9; padding: .4rem .5rem; text-align: center; vertical-align: middle; }
.bilan-tableau td { background: #fff; color: #595959; font-style: italic; }
.bilan-tableau th[scope="row"] { text-align: left; font-weight: 600; }
.bilan-tableau .bilan-entete th { background: #FFC000; color: #000; font-weight: 700; }
.bilan-tableau .bilan-entete th:first-child { color: #fff; text-align: left; }
.bilan-tableau .bilan-id th { background: #ED7D31; color: #fff; }
.bilan-tableau .bilan-analyse th, .bilan-tableau .bilan-analyse td,
.bilan-tableau .bilan-tarif th { background: #5B9BD5; color: #000; font-style: normal; font-weight: 600; }
.bilan-tableau .bilan-conso th { background: #fff; color: #595959; font-style: italic; font-weight: 400; padding-left: 1.2rem; }
.bilan-tableau .bilan-sous-total th, .bilan-tableau .bilan-sous-total td { background: #DDEBF7; color: #000; font-style: normal; font-weight: 600; }
.bilan-tableau.bilan-synthese { min-width: 0; }
.bilan-tableau .bilan-total th, .bilan-tableau .bilan-total td { background: #ED7D31; color: #fff; font-style: normal; font-weight: 700; }
.bilan-tableau .bilan-budget th, .bilan-tableau .bilan-budget td { background: #C6EFCE; color: #000; font-style: normal; font-weight: 700; }
.bilan-tableau .bilan-conseil td { background: #ED7D31; color: #fff; font-style: italic; }
.bilan-tableau td.bilan-ecart { font-style: normal; font-weight: 700; }
.bilan-tableau td.bilan-ecart.bilan-gain { background: #1a7a4a; color: #fff; }
.bilan-tableau td.bilan-ecart.bilan-hausse { background: #c0392b; color: #fff; }

/* --- Portefeuille prix fixe (admin/portefeuille_fixe.php, étape 3 de novembre 2026) --- */
.tableau-portefeuille-fixe td { vertical-align: top; }
/* v84 : charte couleurs élec / gaz — colonnes propres à une énergie (fond clair, en-tête foncé + trait), et lignes par
   énergie des colonnes communes (trait à gauche) */
.tableau-portefeuille-fixe .energie-elec { background: var(--color-elec-light); }
.tableau-portefeuille-fixe .energie-gaz { background: var(--color-gaz-light); }
.tableau-portefeuille-fixe th.energie-elec { color: var(--color-elec-dark); box-shadow: inset 0 3px 0 var(--color-elec); }
.tableau-portefeuille-fixe th.energie-gaz { color: var(--color-gaz-dark); box-shadow: inset 0 3px 0 var(--color-gaz); }
.tableau-portefeuille-fixe [data-contrat-energie], .tableau-portefeuille-fixe [data-echeance-energie],
.tableau-portefeuille-fixe [data-cout-energie], .tableau-portefeuille-fixe [data-difference-energie] { padding-left: 0.4rem; border-left: 3px solid transparent; }
.tableau-portefeuille-fixe [data-contrat-energie="elec"], .tableau-portefeuille-fixe [data-echeance-energie="elec"],
.tableau-portefeuille-fixe [data-cout-energie="elec"], .tableau-portefeuille-fixe [data-difference-energie="elec"] { border-left-color: var(--color-elec); }
.tableau-portefeuille-fixe [data-contrat-energie="gaz"], .tableau-portefeuille-fixe [data-echeance-energie="gaz"],
.tableau-portefeuille-fixe [data-cout-energie="gaz"], .tableau-portefeuille-fixe [data-difference-energie="gaz"] { border-left-color: var(--color-gaz); }
.tableau-portefeuille-fixe .ecart-economie { color: var(--succes); font-weight: 600; }
.tableau-portefeuille-fixe .ecart-surcout { color: var(--erreur); font-weight: 700; }
.tableau-portefeuille-fixe .ecart-economie, .tableau-portefeuille-fixe .ecart-surcout { white-space: nowrap; }
.filtres-portefeuille-fixe .choix input, .form-simulateur .choix input { width: auto; flex: none; }

/* --- Fiche d'analyse (admin/analyse_adresse.php, étape 4 de novembre 2026) --- */
.tableau-analyse td, .tableau-analyse th { vertical-align: top; }
/* Jamais en cartes empilées (écran étroit, impression) : les 4 colonnes se comparent ligne à ligne ; le conteneur défile */
.tableau.tableau-analyse { display: table; width: 100%; }
.tableau.tableau-analyse thead { display: table-header-group; }
.tableau.tableau-analyse tbody { display: table-row-group; }
.tableau.tableau-analyse tr { display: table-row; padding: 0; }
.tableau.tableau-analyse td, .tableau.tableau-analyse th { display: table-cell; width: auto; }
.tableau.tableau-analyse .num { text-align: right; }
.tableau-analyse thead th[data-colonne] { white-space: nowrap; }
.tableau-analyse .ligne-total td, .tableau-analyse .ligne-total th { border-top: 2px solid var(--bordure, #ccc); }
@media print {
    .app-entete, .app-menu, nav.fil, .non-imprime, .message-info { display: none !important; }
    .app-corps, .app-contenu { display: block; margin: 0; padding: 0; }
    body, .app-corps, .app-contenu { background: #fff; }
    .fiche-analyse-energie { box-shadow: none; padding: 0; }
    .tableau-analyse tr { break-inside: avoid; }
    .fiche-analyse-energie h2 { break-after: avoid; }
    .tableau-analyse { font-size: 10pt; }
    .tableau-conteneur { overflow: visible; }
}

/* --- Préférences e-mail du client (fiche, Compte > Identité et accès, migration 53) --- */
.info-bulle-preference { color: #8a4f00; font-size: 0.8rem; cursor: help; white-space: nowrap; }
.preferences-email fieldset { margin-bottom: 0.5rem; }
.liste-preferences-email { list-style: none; padding-left: 0; }

/* --- E-mails aux clients à valider (admin/emails_attente.php et encadré des pages admin, migration 55) --- */
.emails-a-valider { border-left: 4px solid #d98200; }
.email-attente { border-top: 1px solid #e3e6ec; padding: 0.6rem 0; }
.email-attente:first-of-type { border-top: 0; }
.email-attente-question { margin: 0 0 0.25rem; }
.email-attente-corps { white-space: pre-wrap; word-break: break-word; max-height: 20rem; overflow: auto; background: #f6f7f9; padding: 0.5rem; font-size: 0.85rem; }
.actions-email-attente { margin-top: 0.4rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* --- Évolution des prix fournisseur (admin/graphique_prix.php, 16/11/2026, v86) ---
   Interface : charte élec / gaz (variables) ; barres : palette propre aux séries (graphique_prix_functions.php). */
.filtres-graphique-prix.graphique-prix-elec, .graphique-prix.graphique-prix-elec { border-top: 4px solid var(--color-elec); }
.filtres-graphique-prix.graphique-prix-gaz, .graphique-prix.graphique-prix-gaz { border-top: 4px solid var(--color-gaz); }
.graphique-prix.graphique-prix-elec > h2 { color: var(--color-elec-dark); }
.graphique-prix.graphique-prix-gaz > h2 { color: var(--color-gaz-dark); }
.filtres-graphique-prix .choix input { width: auto; flex: none; }
.graphique-prix-fournisseur { border-top: 1px solid #e3e6ec; padding: 0.4rem 0; }
.graphique-prix-fournisseur:first-of-type { border-top: 0; }
.graphique-prix-fournisseur .choix-ligne { padding-left: 1.5rem; }
.graphique-prix-conteneur { overflow-x: auto; }
.graphique-prix-svg { display: block; width: 100%; min-width: 600px; height: auto; font-family: inherit; }
.graphique-prix-grille { stroke: #e3e6ec; stroke-width: 1; }
.graphique-prix-base { stroke: #6b7280; stroke-width: 1; }
.graphique-prix-tranche { stroke: #9ca3af; stroke-width: 1; stroke-dasharray: 4 3; }
.graphique-prix-axe { font-size: 12px; fill: #4b5563; }
.graphique-prix-etoile { font-size: 13px; font-weight: 700; fill: #111827; }
.legende-graphique-prix { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; }
.pastille-graphique { display: inline-block; width: 0.85rem; height: 0.85rem; border-radius: 2px; vertical-align: -0.1rem; }
.tableau-graphique-prix td.num, .tableau-graphique-prix th.num { text-align: right; white-space: nowrap; }

/* --- Estimation du prochain décompte (admin/estimation_decompte.php, 16/11/2026, v87) : charte élec / gaz --- */
.estimation-decompte.estimation-decompte-elec { border-top: 4px solid var(--color-elec); }
.estimation-decompte.estimation-decompte-gaz { border-top: 4px solid var(--color-gaz); }
.estimation-decompte-elec > h2 { color: var(--color-elec-dark); }
.estimation-decompte-gaz > h2 { color: var(--color-gaz-dark); }
.estimation-decompte-elec .ligne-moyenne > *, .estimation-decompte-elec .ligne-total > * { background: var(--color-elec-light); }
.estimation-decompte-gaz .ligne-moyenne > *, .estimation-decompte-gaz .ligne-total > * { background: var(--color-gaz-light); }
.tableau-estimation-prix td.num, .tableau-estimation-prix th.num, .tableau-estimation td.num { text-align: right; white-space: nowrap; }
.tableau.tableau-estimation { max-width: 46rem; }
.liste-estimation { padding-left: 1.2rem; }

/* Migration 58 (v89) : prospects — badges, bandeau, panneau de la fiche, onglets de la liste, alertes du tableau de bord */
.badge-prospect { background: #ede9fe; color: #5b21b6; }
.badge-no_interest { background: #fde8e8; color: #9b1c1c; }
.bandeau-prospect { border-left: 4px solid #7c3aed; }
.panneau-prospect { border-top: 4px solid #7c3aed; }
.panneau-prospect-no_interest { border-top-color: #9b1c1c; }
.panneau-prospect h2 .badge { vertical-align: middle; }
.liste-minimums-prospect li[data-ok="0"] { color: #9b1c1c; }
.actions-prospect { flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.actions-prospect input[type="text"] { max-width: 16rem; }
.onglets-liste-clients { margin-bottom: 1rem; }
.prospects-a-relancer { margin-top: 1.5rem; border-top: 4px solid #7c3aed; }
