:root {
  --fond: #f6f8fa; --surface: #ffffff; --encre: #1b1f24; --gris: #5b6470; --ligne: #d7dce2; --accent: #16456b; --accent-clair: #e8f0f7;
  --ok: #1f7a3f; --attention: #8a6d00; --danger: #a8430f; --danger-clair: #fbe9e0; --ombre: 0 1px 2px rgba(0,0,0,.06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --fond: #0f1317; --surface: #171c22; --encre: #e6e9ed; --gris: #9aa4b1; --ligne: #2b333d; --accent: #7fb3e6; --accent-clair: #1c2a38; --ok: #5fcf85; --attention: #e2c45a; --danger: #ef8a5a; --danger-clair: #3a2218; }
}
:root[data-theme="dark"] { --fond: #0f1317; --surface: #171c22; --encre: #e6e9ed; --gris: #9aa4b1; --ligne: #2b333d; --accent: #7fb3e6; --accent-clair: #1c2a38; --ok: #5fcf85; --attention: #e2c45a; --danger: #ef8a5a; --danger-clair: #3a2218; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fond); color: var(--encre); font: 15px/1.5 "Segoe UI", "Helvetica Neue", Arial, sans-serif; }
a { color: var(--accent); }
h1 { font-size: 1.5rem; margin: 0; } h2 { font-size: 1.2rem; margin: 1.5rem 0 .5rem; } h3 { font-size: 1.05rem; margin: 1.2rem 0 .4rem; }
.bandeau { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem 16px; background: var(--surface); border-bottom: 1px solid var(--ligne); box-shadow: var(--ombre); }
.marque { text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.marque .titre { font-weight: 700; color: var(--accent); } .marque .sous-titre { font-size: .8rem; color: var(--gris); }
.nav { display: flex; align-items: center; gap: 1rem; }
.contenu { max-width: 1200px; margin: 0 auto; padding: 1rem 16px 3rem; }
.pied { text-align: center; color: var(--gris); font-size: .8rem; padding: 1rem; }
.discret { color: var(--gris); }
.entete-vue { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .8rem; }
.etapes { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0 0 1rem; }
.etapes li { background: var(--surface); border: 1px solid var(--ligne); border-radius: 999px; padding: .25rem .8rem .25rem .4rem; font-size: .9rem; }
.etapes li a { text-decoration: none; color: inherit; } .etapes li.active { border-color: var(--accent); background: var(--accent-clair); font-weight: 600; }
.etapes li.verrouillee { color: var(--gris); } .etapes .numero { display: inline-block; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--accent); color: #fff; text-align: center; line-height: 1.4rem; font-size: .8rem; }
.etape-contenu { background: var(--surface); border: 1px solid var(--ligne); border-radius: 8px; padding: 1rem; box-shadow: var(--ombre); }
.formulaire .grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .7rem 1rem; }
.champ { display: flex; flex-direction: column; gap: .2rem; } .champ .libelle { font-size: .85rem; color: var(--gris); } .champ .aide { color: var(--gris); }
input, select, textarea { font: inherit; color: inherit; background: var(--fond); border: 1px solid var(--ligne); border-radius: 6px; padding: .4rem .5rem; max-width: 100%; }
input[type="checkbox"], input[type="radio"] { width: auto; } input.court { width: 5.5rem; }
fieldset { border: 1px solid var(--ligne); border-radius: 8px; margin: .8rem 0; padding: .5rem .8rem; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; } legend { color: var(--gris); font-size: .85rem; padding: 0 .3rem; }
.cases { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin: .6rem 0; } .case { display: inline-flex; align-items: center; gap: .2rem; white-space: nowrap; }
.actions { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1rem; }
.bouton { font: inherit; border: 1px solid var(--accent); background: var(--surface); color: var(--accent); border-radius: 6px; padding: .45rem .9rem; cursor: pointer; }
.bouton.primaire, .bouton.actif { background: var(--accent); color: #fff; } .bouton.secondaire { border-color: var(--ligne); color: var(--encre); }
.bouton.danger { border-color: var(--danger); color: var(--danger); } .bouton.petit { padding: .2rem .5rem; font-size: .85rem; } .bouton:disabled { opacity: .5; cursor: default; }
.tableau { width: 100%; border-collapse: collapse; font-size: .92rem; margin: .4rem 0 .8rem; }
.tableau th, .tableau td { border-bottom: 1px solid var(--ligne); padding: .35rem .45rem; text-align: left; vertical-align: top; }
.tableau thead th { color: var(--gris); font-weight: 600; font-size: .85rem; } .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tableau.existant td:nth-child(2) { white-space: nowrap; }
.action-ajouter td:nth-child(4) { color: var(--ok); font-weight: 600; } .action-remplacer td:nth-child(4) { color: var(--danger); font-weight: 600; } .action-modifier td:nth-child(4) { color: var(--attention); font-weight: 600; }
.badge { display: inline-block; font-size: .75rem; border-radius: 4px; padding: 0 .35rem; background: var(--accent-clair); color: var(--accent); border: 1px solid transparent; }
.badge.estimation, .badge.a_relire, .badge.en_projet, .badge.brouillon { background: transparent; border-color: var(--attention); color: var(--attention); }
.badge.sur-devis, .badge.refuse { background: var(--danger-clair); color: var(--danger); } .badge.ajuste, .badge.relu, .badge.accepte, .badge.emis { background: transparent; border-color: var(--ok); color: var(--ok); }
.onglets { display: flex; gap: .4rem; flex-wrap: wrap; margin: 1rem 0 .5rem; }
.totaux { border-collapse: collapse; margin-left: auto; min-width: 360px; } .totaux th { text-align: left; font-weight: 500; color: var(--gris); padding: .2rem 1rem .2rem 0; } .totaux td { padding: .2rem 0; }
.totaux .total th, .totaux .total td { font-weight: 700; color: var(--encre); border-top: 1px solid var(--ligne); }
.avertissements li, .obligations li { margin: .2rem 0; } .avertissements { color: var(--attention); }
.traces { background: var(--fond); border: 1px solid var(--ligne); border-radius: 6px; padding: .6rem; font-size: .8rem; overflow: auto; max-height: 300px; }
.carte { background: var(--fond); border: 1px solid var(--ligne); border-radius: 8px; padding: .6rem .9rem; }
.message { padding: .5rem .8rem; border-radius: 6px; margin: .6rem 0; } .message.erreur { background: var(--danger-clair); color: var(--danger); } .message.info { background: var(--accent-clair); color: var(--accent); }
.actions-ligne { white-space: nowrap; } .actions-ligne select { max-width: 220px; }
.liens { white-space: nowrap; }
@media (max-width: 720px) { .tableau { font-size: .82rem; } .totaux { min-width: 0; width: 100%; } .bandeau { flex-direction: column; align-items: flex-start; } .case { white-space: normal; } fieldset { min-width: 0; } }
.connexion { max-width: 520px; margin: 3rem auto; text-align: center; } .connexion #zone-google { display: flex; justify-content: center; margin-top: 1rem; }
.budget-cible { margin: 1rem 0; } .import { margin: .5rem 0 1rem; } .import summary { cursor: pointer; color: var(--accent); }
.paliers-vitrine { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin: .8rem 0; }
.palier-vitrine.recommande { border-color: var(--accent); } .montant-fourchette { font-size: 1.3rem; font-weight: 700; color: var(--accent); margin: .2rem 0; }
.contact-vitrine { margin-top: 1rem; } a.bouton { display: inline-block; text-decoration: none; }
.pied .confidentialite { max-width: 760px; margin: .5rem auto 0; text-align: left; } .pied .confidentialite summary { cursor: pointer; text-align: center; color: var(--accent); }
