:root {
  --bg: #f8fafc; --surface: #fff; --text: #111827; --muted: #6b7280; --border: #e5e7eb;
  --primary: #b45309; --primary-dark: #92400e; --danger: #b91c1c; --success: #15803d;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 15px; background: var(--bg); color: var(--text); }
a { color: var(--primary); }
h1 { font-size: 1.5rem; margin: 0 0 1rem; }
.container { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem; }

.badge { font-size: .75rem; background: #374151; color: #e5e7eb; padding: .15rem .5rem; border-radius: 999px; }
.badge-admin { background: #fef3c7; color: #92400e; }
.badge-user { background: #e5e7eb; color: #374151; }
.badge-off { background: #fee2e2; color: #991b1b; }

.btn { display: inline-block; padding: .5rem 1rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); text-decoration: none; cursor: pointer; font: inherit; }
.btn:hover { background: #f9fafb; }
.btn-sm { padding: .25rem .6rem; font-size: .85rem; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger { color: var(--danger); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 1.5rem; }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.page-head h1 { margin: 0; }

table.list { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
table.list th, table.list td { text-align: left; padding: .65rem .9rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.list th { background: #f9fafb; font-weight: 600; font-size: .85rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
table.list tr:last-child td { border-bottom: 0; }
table.list td.actions { text-align: right; white-space: nowrap; }
table.list td.actions form { display: inline; }
.muted { color: var(--muted); }

.flash { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid; }
.flash-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.flash-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

form div { margin-bottom: 1rem; }
form label { display: block; font-weight: 500; margin-bottom: .3rem; }
form input[type=text], form input[type=email], form input[type=password], form select {
  width: 100%; padding: .55rem .7rem; border: 1px solid #d1d5db; border-radius: 6px; font: inherit; background: #fff;
}
form input:focus, form select:focus { outline: 2px solid #fcd34d; border-color: var(--primary); }
form .help-text, form .form-help { display: block; font-size: .85rem; color: var(--muted); margin-top: .3rem; }
form ul { margin: .3rem 0 0; padding-left: 1.2rem; color: var(--danger); font-size: .9rem; }
form .checkbox { display: flex; align-items: center; gap: .5rem; }
form .checkbox label { margin: 0; font-weight: 400; }
form .form-actions { display: flex; gap: .75rem; align-items: center; margin-top: 1.5rem; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.login-card { width: 100%; max-width: 380px; }
.login-card .login-logo { display: block; text-align: center; margin-bottom: 1rem; }
.login-card .login-logo img { max-width: 160px; height: auto; }
.login-card h1 { text-align: center; }
.login-card .sub { text-align: center; color: var(--muted); margin: -.5rem 0 1.5rem; }
.login-card .btn { width: 100%; }
.alert { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* ---- Module Chantiers ---- */
.retour { margin: 0 0 .75rem; }
.petit { font-size: .9rem; }
.table-wrap { overflow-x: auto; }
form.inline { display: inline; }
form.inline div, .filtres div { margin-bottom: 0; }

.filtres { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.filtres input[type=search], .filtres select { padding: .5rem .7rem; border: 1px solid #d1d5db; border-radius: 6px; font: inherit; background: #fff; }
.filtres input[type=search] { min-width: 260px; flex: 1; }
.filtres .compteur { color: var(--muted); font-size: .9rem; margin-left: auto; }

/* Pastilles de statut (voir App\Enum\StatutChantier::cssClass) */
.statut { font-size: .75rem; padding: .15rem .55rem; border-radius: 999px; white-space: nowrap; font-weight: 500; }
.statut-a-visiter { background: #e5e7eb; color: #374151; }
.statut-visite-faite { background: #dbeafe; color: #1e40af; }
.statut-devis-envoye { background: #fef3c7; color: #92400e; }
.statut-accepte { background: #dcfce7; color: #166534; }
.statut-en-cours { background: #ffedd5; color: #9a3412; }
.statut-termine { background: #d1fae5; color: #065f46; }
.statut-annule { background: #fee2e2; color: #991b1b; }

td.num, .num { font-variant-numeric: tabular-nums; color: var(--muted); }
td .sous { display: block; font-size: .85rem; color: var(--muted); }
table.list tbody tr:hover td { background: #fafaf9; }
table.list td a.principal { color: var(--text); text-decoration: none; font-weight: 500; }
table.list td a.principal:hover { color: var(--primary); }

.vide { text-align: center; padding: 3rem 1.5rem; }
.vide h2 { margin-bottom: .4rem; }
.vide p { margin: 0 0 1.25rem; color: var(--muted); }

.fiche { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; align-items: start; }
.fiche-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.fiche-head .titre .num { font-size: .9rem; display: block; margin-bottom: .2rem; }
.fiche-head h1 { margin: 0 0 .35rem; }
.fiche-head .actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.fiche-head .actions select.btn { padding: .45rem .7rem; }
.fiche h2 { font-size: 1.05rem; margin: 0 0 .75rem; }
.fiche p { margin: 0 0 .4rem; }
.fiche .client-nom { font-weight: 600; }
dl.infos { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.25rem; margin: 0; }
dl.infos dt { color: var(--muted); font-size: .9rem; }
dl.infos dd { margin: 0; }
.bloc + .bloc { margin-top: 1rem; }
.texte-libre { white-space: pre-line; line-height: 1.5; }
.a-venir { border-style: dashed; color: var(--muted); text-align: center; padding: 1.25rem; }
.chrono { list-style: none; margin: 0; padding: 0; }
.chrono li { display: grid; grid-template-columns: 5.5rem 1fr; gap: .75rem; padding: .45rem 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.chrono li:last-child { border-bottom: 0; }
.chrono time { color: var(--muted); font-variant-numeric: tabular-nums; }

.form-chantier fieldset { border: 1px solid var(--border); border-radius: 8px; padding: 1rem 1.25rem .25rem; margin: 0 0 1.25rem; }
.form-chantier legend { font-weight: 600; padding: 0 .4rem; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
.form-grid .large { grid-column: 1 / -1; }
.form-grid > div { margin-bottom: 0; }
form textarea, form input[type=date], form input[type=tel] { width: 100%; padding: .55rem .7rem; border: 1px solid #d1d5db; border-radius: 6px; font: inherit; background: #fff; }
form textarea:focus, form input[type=date]:focus, form input[type=tel]:focus { outline: 2px solid #fcd34d; border-color: var(--primary); }
form .erreur input, form .erreur select, form div:has(> ul) > input, form div:has(> ul) > select { border-color: var(--danger); }
.client-choix { display: flex; gap: .75rem; align-items: center; }
.client-choix select { flex: 1; }
.nouveau-client { display: none; margin: .75rem 0 1rem; padding: 1rem 1rem .25rem; background: #f9fafb; border: 1px dashed #d1d5db; border-radius: 8px; }
.nouveau-client.ouvert { display: block; }
.nouveau-client > p { margin: 0 0 .75rem; }
#adresse-chantier.inactif { opacity: .55; }
form input:disabled { background: #f3f4f6; color: var(--muted); }

@media (max-width: 720px) {
  .fiche, .form-grid { grid-template-columns: 1fr; }
  .filtres input[type=search] { min-width: 0; width: 100%; }
  .client-choix { flex-direction: column; align-items: stretch; }
}

/* ---- Module 1.1 Sous-chantiers ---- */
.sous-head { display: flex; align-items: center; gap: 1rem; margin-bottom: .75rem; }
.sous-head h2 { margin: 0; flex: 1; }
.sous-head .avancement { color: var(--muted); font-size: .9rem; }
table.sous { width: 100%; border-collapse: collapse; margin-top: .75rem; }
table.sous th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); padding: .35rem .5rem; border-bottom: 1px solid var(--border); }
table.sous td { padding: .55rem .5rem; border-bottom: 1px solid var(--border); vertical-align: top; }
table.sous tr:last-child td { border-bottom: 0; }
table.sous td.ordre { color: var(--muted); font-variant-numeric: tabular-nums; width: 2rem; }
table.sous td.duree { white-space: nowrap; font-variant-numeric: tabular-nums; }
table.sous td .sous { display: block; font-size: .85rem; color: var(--muted); white-space: pre-line; }
table.sous td.actions { text-align: right; white-space: nowrap; }
table.sous td.actions form { display: inline; }
.btn-icone { padding: .2rem .45rem; font-size: .85rem; line-height: 1; }
.btn-icone:disabled { opacity: .35; cursor: default; }
.option-tag { font-size: .72rem; border: 1px solid #d1d5db; color: var(--muted); border-radius: 4px; padding: .05rem .35rem; margin-left: .35rem; vertical-align: middle; }
.statut-a-faire { background: #e5e7eb; color: #374151; }
.statut-planifie { background: #dbeafe; color: #1e40af; }
.barre { height: 6px; background: #e5e7eb; border-radius: 999px; overflow: hidden; }
.barre span { display: block; height: 100%; background: var(--success); }
.sous-vide { text-align: center; color: var(--muted); padding: 1.25rem; border: 1px dashed #d1d5db; border-radius: 8px; margin: 0; }
.sous-total { color: var(--muted); font-size: .85rem; text-align: right; padding-top: .5rem; margin: 0; }
.form-sous-chantier { max-width: 720px; }
form input[type=number] { width: 100%; padding: .55rem .7rem; border: 1px solid #d1d5db; border-radius: 6px; font: inherit; background: #fff; }
form input[type=number]:focus { outline: 2px solid #fcd34d; border-color: var(--primary); }
form.suppression { max-width: 720px; margin-top: 1rem; text-align: right; }

/* ---- Module 4 Paramétrage : employés (le menu déroulant est décrit avec le bandeau, module 0.2, en fin de fichier) ---- */
.fil { color: var(--muted); font-size: .9rem; margin: 0 0 .5rem; }
.fil a { color: var(--muted); text-decoration: none; }
.fil a:hover { color: var(--primary); }
.filtres select { width: auto; }
table.list td.num { white-space: nowrap; }
.statut-en-poste { background: #dcfce7; color: #166534; }
.statut-sorti { background: #e5e7eb; color: #374151; }
.form-employe fieldset { border: 1px solid var(--border); border-radius: 8px; padding: 1rem 1.25rem .25rem; margin: 0 0 1.25rem; }
.form-employe legend { font-weight: 600; padding: 0 .4rem; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 1.25rem; }
.form-grid-3 > div { margin-bottom: 0; }
.form-grid-3 .large { grid-column: 1 / -1; }
.form-grid-3 .moyen { grid-column: span 2; }
.form-grid-3 .checkbox { margin-top: 1.9rem; margin-bottom: 1rem; }
.fiche-employe dl.infos { grid-template-columns: 11rem 1fr; }
.form-sortie { max-width: 520px; }
@media (max-width: 720px) {
  .form-grid-3 { grid-template-columns: 1fr; }
  .form-grid-3 .checkbox { margin-top: 0; }
}

/* ---- Module 4.1 Fournisseurs et interlocuteurs ---- */
.statut-actif { background: #dcfce7; color: #166534; }
.statut-inactif { background: #e5e7eb; color: #374151; }
.tag-principal { font-size: .72rem; background: #fef3c7; color: #92400e; border-radius: 4px; padding: .05rem .35rem; margin-left: .35rem; vertical-align: middle; font-weight: 500; }
.fiche-fournisseur > div { min-width: 0; }
.fiche-fournisseur dl.infos { grid-template-columns: 8.5rem 1fr; }
.fiche-fournisseur table.sous td.actions { white-space: nowrap; }
.fiche-fournisseur table.sous td.actions form { display: inline; margin-left: .25rem; }
.fiche-fournisseur table.sous tr.inactif td { color: var(--muted); }
.fiche-fournisseur .sous-total a { color: var(--primary); }
.fiche-head .actions form.inline { display: inline; margin: 0; }
.form-fournisseur, .form-interlocuteur { max-width: 900px; }
.form-fournisseur fieldset, .form-interlocuteur fieldset { border: 1px solid var(--border); border-radius: 8px; padding: 1rem 1.25rem .25rem; margin: 0 0 1.25rem; }
.form-fournisseur legend, .form-interlocuteur legend { font-weight: 600; padding: 0 .4rem; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; }
.form-interlocuteur .checkbox { flex-wrap: wrap; }
.form-interlocuteur .checkbox .form-help { flex-basis: 100%; margin: 0 0 0 1.6rem; }

/* ---- Module 2.1 Devis ---- */
.statut-brouillon { background: #e5e7eb; color: #374151; }
.statut-envoye { background: #fef3c7; color: #92400e; }
.statut-refuse { background: #fee2e2; color: #991b1b; }
.page-head .actions-tete { display: flex; gap: .5rem; flex-wrap: wrap; }
.montant { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
table.list td.montant, table.list th.montant { text-align: right; }
table.devis { width: 100%; table-layout: fixed; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
table.devis th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); padding: .5rem .6rem; background: #f9fafb; border-bottom: 1px solid var(--border); }
table.devis th.ordre { width: 2.2rem; }
table.devis th.num { width: 6.5rem; }
/* Colonnes par position : uniquement l'aperçu d'import (la grille de saisie nomme ses colonnes, voir plus bas). */
table.devis:not(.grille) th:nth-child(4) { width: 5.5rem; }
table.devis:not(.grille) th:nth-child(5) { width: 5rem; }
table.devis:not(.grille) th:nth-child(6) { width: 6.3rem; }
table.devis th.montant { width: 7.5rem; }
table.devis th.col-actions { width: 9.5rem; }
table.devis td { padding: .45rem .6rem; border-bottom: 1px solid var(--border); vertical-align: top; }
table.devis tr:last-child td { border-bottom: 0; }
table.devis th.num, table.devis td.num, table.devis th.montant, table.devis td.montant { text-align: right; }
table.devis td.num { color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
table.devis td.montant { font-variant-numeric: tabular-nums; white-space: nowrap; }
table.devis tr.chapitre td { background: #f3f4f6; font-weight: 600; padding-top: .6rem; padding-bottom: .6rem; }
table.devis tr.chapitre.option td { background: #fffbeb; }
table.devis tr.nota td { color: var(--muted); font-style: italic; white-space: pre-line; }
table.devis tr.sous-total td { text-align: right; color: var(--muted); font-size: .9rem; border-bottom: 2px solid var(--border); }
table.devis tr.sous-total td strong { color: var(--text); }
table.devis td.designation { white-space: pre-line; }
table.devis td.ordre { color: var(--muted); font-variant-numeric: tabular-nums; }
table.devis td.actions { text-align: right; white-space: nowrap; }
table.devis tr.chapitre td.actions { white-space: normal; }
table.devis td.actions form { display: inline; margin: 0 0 .2rem .1rem; }
table.devis input[type=text], table.devis select, table.devis textarea { width: 100%; padding: .3rem .4rem; border: 1px solid #d1d5db; border-radius: 4px; font: inherit; font-size: .9rem; background: #fff; font-weight: 400; }
table.devis textarea { resize: vertical; min-height: 2.6rem; }
table.devis input.num { text-align: right; font-variant-numeric: tabular-nums; }
table.devis input.champ-chapitre { font-weight: 600; }
table.devis .option-case { display: inline-flex; gap: .3rem; align-items: center; font-weight: 400; font-size: .85rem; margin-top: .3rem; }
table.devis .option-case input { width: auto; }
table.devis tr.nota textarea { font-style: italic; color: var(--muted); }
table.devis tr.en-cours td { opacity: .6; }
table.devis tr.en-erreur input, table.devis tr.en-erreur textarea, table.devis tr.en-erreur select { border-color: var(--danger); }
.pied-devis { display: grid; grid-template-columns: 1fr minmax(320px, 420px); gap: 1rem; margin-top: 1rem; align-items: start; }
.pied-devis table.totaux { width: 100%; border-collapse: collapse; }
.pied-devis table.totaux td { padding: .35rem .5rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.pied-devis table.totaux td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.pied-devis table.totaux tr.ttc td { font-weight: 700; font-size: 1.1rem; border-bottom: 0; border-top: 2px solid var(--text); }
.pied-devis .option-hors-total { color: var(--muted); font-size: .85rem; margin: .5rem 0 0; }
.verrou { background: #fef3c7; border: 1px solid #fcd34d; color: #92400e; padding: .6rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: .95rem; }
.versions { display: flex; gap: .4rem; align-items: center; font-size: .85rem; color: var(--muted); margin-top: .4rem; flex-wrap: wrap; }
.versions a, .versions span.courante { padding: .15rem .5rem; border-radius: 999px; border: 1px solid var(--border); text-decoration: none; color: var(--muted); }
.versions span.courante { background: #1f2937; color: #fff; border-color: #1f2937; }
.fiche-head .actions form.rattacher { display: inline-flex; gap: .4rem; }
.form-devis, .form-import { max-width: 900px; }
.form-devis fieldset, .form-import fieldset { border: 1px solid var(--border); border-radius: 8px; padding: 1rem 1.25rem .25rem; margin: 0 0 1.25rem; }
.form-devis legend { font-weight: 600; padding: 0 .4rem; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; }
.form-devis .form-grid-3 > div { margin-bottom: 1rem; }
.form-devis #adresse-travaux.inactif { opacity: .55; }
.depot { border: 2px dashed #d1d5db; border-radius: 10px; padding: 1.5rem; margin: 1rem 0; }
.depot div { margin-bottom: 0; }
.apercu-import { margin-top: 1rem; }
.apercu-import .sous-total { text-align: left; margin-top: .75rem; }
@media (max-width: 900px) { .pied-devis { grid-template-columns: 1fr; } }

/* ---- Module 2.6 Saisie du devis en grille (fiche devis en pleine largeur, bandeau compact, lignes vides) ---- */
.container.pleine-largeur { max-width: none; padding-left: 1.25rem; padding-right: 1.25rem; }
.fiche-head.compacte { margin-bottom: .5rem; }
.fiche-head.compacte h1 { display: inline; margin-right: .5rem; font-size: 1.35rem; }
.bandeau-devis { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: .55rem 1rem; margin-bottom: .75rem; font-size: .93rem; }
.bandeau-devis .ligne { display: flex; flex-wrap: wrap; gap: .25rem .5rem; align-items: center; }
.bandeau-devis .ligne + .ligne { margin-top: .25rem; padding-top: .25rem; border-top: 1px dashed var(--border); }
.bandeau-devis .sep { color: #d1d5db; }
.bandeau-devis .cle { color: var(--muted); font-size: .85rem; }
.bandeau-devis .nom-client { font-weight: 600; font-size: 1rem; }
.bandeau-devis .details-bouton { margin-left: auto; background: none; border: 0; color: var(--primary); font: inherit; font-size: .88rem; cursor: pointer; padding: 0 .25rem; }
.bandeau-devis .details-bouton:hover { text-decoration: underline; }
.bandeau-devis .details { margin-top: .5rem; padding-top: .6rem; border-top: 1px solid var(--border); display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.bandeau-devis .details[hidden] { display: none; }
.bandeau-devis .details h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); margin: 0 0 .35rem; }
.bandeau-devis .details dl.infos { grid-template-columns: 7rem 1fr; gap: .2rem .75rem; font-size: .9rem; }
.sous-head.compacte { margin-bottom: .3rem; flex-wrap: wrap; }
.sous-head.compacte h2 { font-size: 1rem; }
.sous-head .aide { color: var(--muted); font-size: .85rem; margin-left: auto; }
.sous-head .aide kbd { font: inherit; font-size: .8rem; border: 1px solid #d1d5db; border-bottom-width: 2px; border-radius: 4px; padding: 0 .3rem; background: #f9fafb; }
.etat-saisie { font-size: .85rem; color: var(--muted); margin: 0 0 .4rem; text-align: right; min-height: 1.2em; }
.etat-saisie.etat-ok { color: var(--success); }
.etat-saisie.etat-erreur { text-align: left; background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; padding: .45rem .75rem; border-radius: 6px; font-weight: 500; }
/* La grille : champs sans cadre au repos (cadre au survol et au clic), une hauteur de ligne, boutons au survol. */
table.devis.grille { font-size: .9rem; }
table.devis.grille th { font-size: .74rem; padding: .35rem .45rem; }
table.devis.grille th.ordre { width: 2.6rem; }
table.devis.grille th.type { width: 6rem; }
table.devis.grille th.num { width: 6rem; }
table.devis.grille th.unite { width: 5rem; }
table.devis.grille th.tva { width: 5.5rem; }
table.devis.grille th.montant { width: 7.5rem; }
table.devis.grille th.col-actions { width: 5.2rem; }
table.devis.grille td { padding: .15rem .3rem; border-bottom: 1px solid #eef0f2; vertical-align: middle; }
table.devis.grille td.ordre { font-size: .82rem; text-align: right; padding-right: .5rem; white-space: nowrap; }
table.devis.grille input[type=text], table.devis.grille select, table.devis.grille textarea { padding: .22rem .35rem; border-color: transparent; background: transparent; line-height: 1.3; }
table.devis.grille textarea { resize: none; overflow: hidden; display: block; min-height: 0; }
table.devis.grille input[type=text]:hover, table.devis.grille select:hover, table.devis.grille textarea:hover { border-color: #e5e7eb; background: #fff; }
table.devis.grille input[type=text]:focus, table.devis.grille select:focus, table.devis.grille textarea:focus { outline: 2px solid #fcd34d; border-color: var(--primary); background: #fff; }
table.devis.grille select { -webkit-appearance: none; appearance: none; padding-right: 1.1rem; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%239ca3af'/%3E%3C/svg%3E") no-repeat right .35rem center; }
table.devis.grille td.type select { color: var(--muted); font-size: .82rem; }
table.devis.grille tr.chapitre td { font-weight: 400; padding-top: .2rem; padding-bottom: .2rem; border-top: 1px solid var(--border); }
table.devis.grille tr.chapitre td.type { font-size: .82rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .02em; padding-left: .6rem; }
table.devis.grille tr.chapitre .titre-option { display: flex; align-items: center; gap: .5rem; }
table.devis.grille tr.chapitre .option-case { margin-top: 0; font-size: .8rem; color: var(--muted); white-space: nowrap; }
table.devis.grille tr.chapitre td.montant { font-weight: 600; }
table.devis.grille tr.nota td { white-space: normal; }
table.devis.grille tr.nota td.type, table.devis.grille tr.lecture td.type { color: var(--muted); font-size: .82rem; font-style: normal; }
table.devis.grille tr.vide td { background: #fcfcfd; }
table.devis.grille tr.vide textarea::placeholder { color: #c4c8cf; font-style: italic; }
table.devis.grille tr.vide.futur-chapitre td { background: #f3f4f6; }
table.devis.grille tr.vide.futur-chapitre .si-ligne { visibility: hidden; }
table.devis.grille tr.vide.futur-chapitre textarea { font-weight: 600; }
table.devis.grille tr.sous-total td { font-size: .85rem; padding: .3rem .45rem; background: #fafafa; }
table.devis.grille td.actions .btn-icone { visibility: hidden; padding: .1rem .35rem; font-size: .8rem; border-color: transparent; background: transparent; color: var(--muted); }
table.devis.grille tr:hover td.actions .btn-icone, table.devis.grille tr:focus-within td.actions .btn-icone { visibility: visible; }
table.devis.grille td.actions .btn-icone:hover { border-color: var(--border); background: #fff; color: var(--text); }
table.devis.grille td.actions .btn-icone.btn-danger:hover { color: var(--danger); }
table.devis.grille tr.en-erreur td { background: #fef2f2; }
table.devis.grille tr.en-erreur input[type=text], table.devis.grille tr.en-erreur textarea { background: #fff; }
table.devis.grille tr.nouvelle td { background: #ecfdf5; transition: background .8s; }
table.devis.grille tr.lecture td { padding: .3rem .45rem; }
table.devis.grille tr.lecture td.designation { white-space: pre-line; }
.pied-devis.compact { margin-top: .75rem; }
.pied-devis.compact .card { padding: .75rem 1rem; }
.pied-devis.compact table.totaux td { padding: .25rem .5rem; }
@media (max-width: 900px) { .bandeau-devis .details { grid-template-columns: 1fr; } .bandeau-devis .details-bouton { margin-left: 0; } .sous-head .aide { margin-left: 0; } }

/* ---- Module 2.2 Devis avec WebODM, écran Clients ---- */
.choix-devis { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: 900px; }
.choix-devis .card { display: flex; flex-direction: column; gap: .6rem; }
.choix-devis h2 { margin: 0; font-size: 1.15rem; }
.choix-devis p { margin: 0; color: var(--muted); }
.choix-devis ol { margin: 0; padding-left: 1.2rem; color: var(--muted); font-size: .92rem; line-height: 1.5; }
.choix-devis .btn { align-self: flex-start; margin-top: auto; }
.origine-webodm { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; background: #e0f2f1; color: #0f5f55; border-radius: 999px; padding: .15rem .6rem; vertical-align: middle; }
.origine-webodm a { color: #0f5f55; }
.form-client { max-width: 720px; }
@media (max-width: 720px) { .choix-devis { grid-template-columns: 1fr; } }

/* ---- Module 2.7 : fiche client (civilité, prénom) et adresse assistée ---- */
.form-client { max-width: 760px; }
.form-client .form-grid-3 > div { margin-bottom: 1rem; }
/* Liste de propositions d'adresse (public/js/adresse-assistee.js), ancrée sous le champ Rue ou Ville */
.zone-adresse { position: relative; display: block; }
.propositions { position: absolute; left: 0; right: 0; top: calc(100% + 2px); z-index: 20; color: var(--text); background: var(--surface); border: 1px solid #d1d5db; border-radius: 6px; box-shadow: 0 8px 24px rgba(17, 24, 39, .12); list-style: none; margin: 0; padding: .25rem 0; font-size: 1rem; }
.propositions li { padding: .45rem .75rem; cursor: pointer; display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.propositions li + li { border-top: 1px solid #f3f4f6; }
.propositions li:hover, .propositions li.active { background: #fef3c7; }
.propositions li .voie { font-weight: 500; }
.propositions li .commune { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.propositions li.pied { color: var(--muted); font-size: .8rem; cursor: default; justify-content: flex-start; }
.propositions li.pied:hover { background: transparent; }
.adresse-indispo { display: block; font-size: .85rem; color: var(--muted); margin-top: .3rem; }

/* ---- Module 2.8 : produit relié à une ligne de devis (vignette, lien fiche technique, fenêtres) ---- */
table.devis.grille th.col-actions { width: 6.6rem; }
table.devis.grille td.actions .btn-icone.produit { font-size: .95rem; }
table.devis.grille td.actions .btn-icone.produit.actif { visibility: visible; color: var(--primary); }
table.devis.grille td.designation .avec-produit { display: flex; align-items: flex-start; gap: .4rem; }
table.devis.grille td.designation .avec-produit textarea, table.devis.grille td.designation .avec-produit .texte { flex: 1; min-width: 0; }
table.devis.grille tr.lecture td.designation .avec-produit { align-items: center; }
table.devis.grille tr.lecture td.designation .avec-produit .texte { white-space: pre-line; }
.vignette { flex: none; width: 32px; height: 32px; padding: 0; border: 1px solid var(--border); border-radius: 4px; background: #fff; overflow: hidden; cursor: zoom-in; margin-top: 1px; }
.vignette img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vignette:hover, .vignette:focus-visible { border-color: var(--primary); outline: 2px solid #fcd34d; }
.fiche-lien { flex: none; display: inline-flex; align-items: center; gap: .2rem; font-size: .78rem; color: var(--primary); text-decoration: none; white-space: nowrap; margin-top: .4rem; padding: 0 .3rem; border-radius: 4px; }
table.devis.grille tr.lecture .fiche-lien { margin-top: 0; }
.fiche-lien:hover { background: #fef3c7; text-decoration: underline; }
.fiche-lien svg { width: 13px; height: 13px; }

dialog.dialogue { border: 0; border-radius: 10px; padding: 0; max-width: min(560px, calc(100vw - 2rem)); width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.35); color: var(--text); }
dialog.dialogue::backdrop { background: rgba(17,24,39,.55); }
dialog.dialogue [hidden] { display: none !important; }   /* l'attribut hidden l'emporte sur .btn, .sans-photo… */
dialog.dialogue h2 { margin: 0 0 .2rem; font-size: 1.1rem; }
dialog.dialogue .form-actions { display: flex; gap: .5rem; justify-content: flex-end; align-items: center; flex-wrap: wrap; margin-top: 1.25rem; }
dialog.zoom-produit .zoom-photo { width: 100%; max-height: 380px; object-fit: contain; background: #f9fafb; display: block; }
dialog.zoom-produit .corps { padding: 1rem 1.25rem 1.25rem; }
dialog.zoom-produit .fournisseur { margin: 0 0 .5rem; font-size: .9rem; }
dialog.zoom-produit .form-actions > .petit { flex-basis: 100%; }
dialog.edition-produit form { padding: 1.25rem 1.5rem; }
dialog.edition-produit .ligne-cible { margin: 0 0 1rem; font-size: .9rem; }
dialog.edition-produit .photo-actuelle { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
dialog.edition-produit .photo-courante, dialog.edition-produit .sans-photo { flex: none; width: 96px; height: 96px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); background: #f9fafb; }
dialog.edition-produit .sans-photo { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: .8rem; text-align: center; padding: .5rem; }
dialog.edition-produit .legende { display: flex; flex-direction: column; gap: .15rem; }
dialog.edition-produit .legende .nom:empty, dialog.edition-produit .legende .fournisseur:empty { display: none; }
dialog.edition-produit label { display: block; font-weight: 500; margin-bottom: .3rem; }
dialog.edition-produit form > div { margin-bottom: 1rem; }
dialog.edition-produit input[type=file] { font: inherit; font-size: .9rem; max-width: 100%; }
dialog.edition-produit input[type=url] { width: 100%; padding: .55rem .7rem; border: 1px solid #d1d5db; border-radius: 6px; font: inherit; background: #fff; }
dialog.edition-produit input[type=url]:focus { outline: 2px solid #fcd34d; border-color: var(--primary); }
dialog.edition-produit .erreur input { border-color: var(--danger); }
dialog.edition-produit ul.erreurs { margin: .3rem 0 0; padding-left: 1.2rem; color: var(--danger); font-size: .9rem; }
dialog.edition-produit .form-actions .btn-danger { margin-right: auto; }

/* ---- Module 2.9 : styles de ligne. Le style se choisit dans la liste « Type » (Ligne, Nota, puis les 5 styles, chacun
   dans sa police) ; la classe style-… sur la ligne porte la mise en forme (voir App\Enum\StyleLigneDevis). ---- */
table.devis.grille th.type { width: 9rem; }
/* Une ligne stylée quitte le gris italique par défaut des notas ; la règle du style, plus bas, prend le dessus. */
table.devis.grille tr[class*="style-"] td.designation, table.devis.grille tr[class*="style-"] td.designation textarea { color: var(--text); font-style: normal; }
option.style-attention, table.devis.grille tr.style-attention td.designation, table.devis.grille tr.style-attention td.designation textarea, table.devis.grille tr.style-attention td.type select { color: #1d4ed8; font-style: italic; }
option.style-securite, table.devis.grille tr.style-securite td.designation, table.devis.grille tr.style-securite td.designation textarea, table.devis.grille tr.style-securite td.type select { color: #b91c1c; font-weight: 600; }
option.style-important, table.devis.grille tr.style-important td.designation, table.devis.grille tr.style-important td.designation textarea, table.devis.grille tr.style-important td.type select { color: var(--text); font-weight: 700; }
option.style-remarque, table.devis.grille tr.style-remarque td.designation, table.devis.grille tr.style-remarque td.designation textarea, table.devis.grille tr.style-remarque td.type select { color: var(--muted); font-style: italic; }
option.style-mise-en-avant, table.devis.grille tr.style-mise-en-avant td.designation, table.devis.grille tr.style-mise-en-avant td.type select { background-color: #fef9c3; color: #713f12; }
table.devis.grille tr.style-mise-en-avant td.designation textarea { color: #713f12; }
table.devis.grille tr.style-mise-en-avant td.designation textarea:hover, table.devis.grille tr.style-mise-en-avant td.designation textarea:focus { background: #fff; }

/* ---- Module 2.10 : bons d'intervention (pastille « Validé »), origine des sous-chantiers, fenêtre de confirmation ---- */
.statut-valide { background: #dbeafe; color: #1e40af; }
.origine { font-size: .72rem; border: 1px solid #d1d5db; color: var(--muted); border-radius: 4px; padding: .05rem .35rem; margin-left: .35rem; vertical-align: middle; white-space: nowrap; }
.origine a { color: var(--muted); text-decoration: none; }
.origine a:hover { color: var(--primary); }
.fiche-head .actions form.inline[data-confirmation] { margin-left: .5rem; }
dialog.confirmation { border: 0; border-radius: 10px; padding: 1.25rem 1.5rem; max-width: 460px; width: calc(100% - 2rem); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
dialog.confirmation::backdrop { background: rgba(17,24,39,.55); }
dialog.confirmation h2 { margin: 0 0 .5rem; font-size: 1.1rem; }
dialog.confirmation p { margin: 0 0 1rem; color: var(--muted); }
dialog.confirmation .form-actions { display: flex; gap: .5rem; justify-content: flex-end; margin: 0; }
.btn-danger-plein { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger-plein:hover { background: #991b1b; }

/* ---- Module 0.2 : bandeau par familles — remplacé par le menu latéral (module 0.8, en fin de fichier) ---- */

/* ---- Module 5.1 : articles (liste, fiche, formulaire, familles) ---- */
table.list td.vignette-cell { width: 44px; padding-right: 0; }
.vignette-art { width: 36px; height: 36px; border-radius: 4px; border: 1px solid var(--border); background: #f3f4f6; display: inline-flex; align-items: center; justify-content: center; color: #9ca3af; font-size: .7rem; overflow: hidden; }
.vignette-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
table.list td.code, .code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; color: var(--muted); white-space: nowrap; }
table.list tr.inactif td { color: var(--muted); }
.coef-force { font-size: .7rem; background: #fef3c7; color: #92400e; border-radius: 4px; padding: .05rem .35rem; margin-left: .3rem; vertical-align: middle; white-space: nowrap; }
.fiche-article .photo-grande { width: 100%; max-width: 280px; border-radius: 8px; border: 1px solid var(--border); background: #f9fafb; display: block; }
.prix-apercu { background: #f9fafb; border: 1px dashed #d1d5db; border-radius: 8px; padding: .75rem 1rem; display: flex; gap: 2rem; align-items: baseline; flex-wrap: wrap; margin-bottom: 1rem; }
.prix-apercu strong { font-size: 1.25rem; }
.form-article .photo-courante { display: flex; align-items: center; gap: 1rem; margin: -.5rem 0 1rem; }
.form-article .photo-courante img { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.form-article .photo-courante label { margin: 0; font-weight: 400; }
.familles-articles table.sous form.ligne-famille { display: inline; }
.familles-articles table.sous input.num { width: 5rem; text-align: right; padding: .3rem .4rem; border: 1px solid #d1d5db; border-radius: 4px; font: inherit; }
.familles-articles table.sous input.texte { width: 100%; padding: .3rem .4rem; border: 1px solid #d1d5db; border-radius: 4px; font: inherit; }
.familles-articles table.sous tr.inactif td { color: var(--muted); }
.familles-articles table.sous td.actions form.inline { display: inline; }
.form-inline-ajout { display: flex; gap: .5rem; align-items: center; margin-top: .75rem; flex-wrap: wrap; }
.form-inline-ajout input { padding: .45rem .6rem; border: 1px solid #d1d5db; border-radius: 6px; font: inherit; }

/* ---- Module 0.3 : profils utilisateurs (pastilles, cartes de choix) ---- */
.badge.profil-super-admin { background: #fef3c7; color: #92400e; }
.badge.profil-admin { background: #fde68a; color: #78350f; }
.badge.profil-bureau { background: #dbeafe; color: #1e40af; }
.badge.profil-chef-chantier { background: #dcfce7; color: #166534; }
.badge.profil-technicien { background: #e5e7eb; color: #374151; }
.profils { display: grid; gap: .5rem; margin: 0 0 1rem; }
.profils label.profil { display: grid; grid-template-columns: auto 1fr; gap: .25rem .75rem; align-items: start; padding: .6rem .8rem; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; font-weight: 400; margin: 0; }
.profils label.profil.choisi { border-color: var(--primary); background: #fffbeb; }
.profils label.profil input { margin: .25rem 0 0; width: auto; }
.profils label.profil strong { display: block; }
.profils label.profil span.desc { color: var(--muted); font-size: .88rem; grid-column: 2; }
.profils div { margin: 0; }

/* ---- Module 5.1.1 : fournisseurs multiples, historique des prix, fenêtres de la fiche article ---- */
.etoile { color: #b45309; font-size: 1rem; margin-right: .2rem; }
.tag-principal { font-size: .72rem; background: #fef3c7; color: #92400e; border-radius: 4px; padding: .05rem .35rem; margin-left: .35rem; vertical-align: middle; font-weight: 500; }
.fiche-article .identite dl.infos { grid-template-columns: 9rem 1fr; }
.ean { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .05em; }
.tendance-hausse { color: var(--danger); font-size: .8rem; margin-left: .3rem; white-space: nowrap; }
.tendance-baisse { color: var(--success); font-size: .8rem; margin-left: .3rem; white-space: nowrap; }
.fiche-article .bloc .sous-head { margin-bottom: .5rem; }
.fiche-article .bloc .sous-head h2 { margin: 0; flex: 1; }
.fiche-article table.sous td.num, .fiche-article table.sous td.duree { white-space: nowrap; }
.fiche-article table.sous td.actions form.inline { display: inline; }
.fiche-article table.sous td .sous a { color: var(--muted); }
dialog.fenetre-article { max-width: min(560px, calc(100vw - 2rem)); }
dialog.fenetre-article form { padding: 1.25rem 1.5rem; }
dialog.fenetre-article .ligne-cible { color: var(--muted); font-size: .9rem; margin: 0 0 1rem; }
dialog.fenetre-article .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
dialog.fenetre-article .form-grid > div { margin-bottom: .9rem; }
dialog.fenetre-article .form-grid .large { grid-column: 1 / -1; }
dialog.fenetre-article label { display: block; font-weight: 500; margin-bottom: .3rem; }
dialog.fenetre-article input[type=text], dialog.fenetre-article input[type=date], dialog.fenetre-article select { width: 100%; padding: .5rem .65rem; border: 1px solid #d1d5db; border-radius: 6px; font: inherit; background: #fff; }
dialog.fenetre-article .checkbox { display: flex; align-items: flex-start; gap: .5rem; }
dialog.fenetre-article .checkbox input { width: auto; margin-top: .25rem; }
dialog.fenetre-article .checkbox label { margin: 0; font-weight: 400; }
dialog.fenetre-article .form-actions { margin-top: .5rem; }
.fiche-article > div { min-width: 0; }
.fiche-article table.sous td .sous a { word-break: break-all; }

/* ---- Module 0.4 : grille des droits, page « accès refusé », affectation des profils dans la liste ---- */
table.droits { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
table.droits th, table.droits td { padding: .55rem .7rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
table.droits th { background: #f9fafb; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
table.droits th.profil { text-align: center; }
table.droits td.module { font-weight: 500; }
table.droits td.module .sous { display: block; font-size: .8rem; color: var(--muted); font-weight: 400; }
table.droits td.niveau { text-align: center; }
table.droits select { padding: .35rem .5rem; border: 1px solid #d1d5db; border-radius: 6px; font: inherit; font-size: .9rem; min-width: 8.5rem; }
table.droits select.n-aucun, .legende-niveaux .n-aucun { background: #fee2e2; color: #991b1b; }
table.droits select.n-lecture, .legende-niveaux .n-lecture { background: #e5e7eb; color: #374151; }
table.droits select.n-ecriture, .legende-niveaux .n-ecriture { background: #dbeafe; color: #1e40af; }
table.droits select.n-gestion, .legende-niveaux .n-gestion { background: #dcfce7; color: #166534; }
table.droits td.fixe { text-align: center; color: var(--muted); font-size: .85rem; }
.legende-niveaux { display: flex; gap: .75rem; flex-wrap: wrap; margin: .75rem 0 1rem; font-size: .9rem; }
.legende-niveaux span { padding: .15rem .6rem; border-radius: 999px; }
.refus { text-align: center; padding: 3rem 1.5rem; }
.refus h1 { font-size: 1.4rem; margin: 0 0 .5rem; }
table.list form.affectation { display: inline; }
table.list select.profil-select { padding: .3rem .5rem; border: 1px solid #d1d5db; border-radius: 6px; font: inherit; font-size: .9rem; }
.verrou-lecture { background: #fef3c7; border: 1px solid #fcd34d; color: #92400e; padding: .6rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: .95rem; }

/* ---- Module 5.1.2 : import d'articles (modèle, dépôt, aperçu, compte rendu) ---- */
.modele { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; margin-bottom: 1rem; }
.modele .card h2, .compte-rendu h2 { margin-top: 0; font-size: 1.05rem; }
.colonnes { margin: .5rem 0 0; padding-left: 1.2rem; columns: 2; font-size: .9rem; color: var(--muted); }
.colonnes li strong { color: var(--text); }
.depot.erreur { border-color: var(--danger); }
.depot input[type=file] { margin-top: .75rem; }
.bilan { display: flex; gap: .75rem; flex-wrap: wrap; margin: 0 0 1rem; }
.bilan span { padding: .25rem .7rem; border-radius: 999px; font-weight: 500; }
.bilan .nouveau, table.apercu .statut-nouveau { background: #dcfce7; color: #166534; }
.bilan .maj, table.apercu .statut-maj { background: #dbeafe; color: #1e40af; }
.bilan .erreur, table.apercu .statut-erreur { background: #fee2e2; color: #991b1b; }
.bilan .ignore, table.apercu .statut-rien { background: #e5e7eb; color: #374151; }
table.apercu td.etat { white-space: nowrap; }
table.apercu tr.erreur td { background: #fff7f7; }
table.apercu td .detail { display: block; font-size: .82rem; color: var(--muted); }
table.apercu td .detail.rouge { color: var(--danger); }
table.apercu td .detail.orange { color: #92400e; }
@media (max-width: 900px) { .modele { grid-template-columns: 1fr; } .colonnes { columns: 1; } }

/* ---- Module 5.2 : ouvrages (synthèse, composition) et Paramétrage › Entreprise ---- */
table.composition th.num, table.composition td.num { text-align: right; white-space: nowrap; }
table.composition tr.section td { background: #f3f4f6; font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
table.composition tr.total td { font-weight: 600; border-top: 2px solid var(--border); }
table.composition td .code { display: block; font-size: .78rem; }
table.composition input.num { width: 6rem; text-align: right; padding: .3rem .4rem; border: 1px solid #d1d5db; border-radius: 4px; font: inherit; }
table.composition input.texte { width: 100%; padding: .3rem .4rem; border: 1px solid #d1d5db; border-radius: 4px; font: inherit; }
table.composition tr.vide td { background: #fcfcfd; }
table.composition tr.vide input::placeholder { color: #c4c8cf; font-style: italic; }
table.composition td div { margin: 0; }
table.composition ul { margin: .2rem 0 0; padding-left: 1rem; color: var(--danger); font-size: .85rem; }
.synthese { display: grid; grid-template-columns: repeat(5, 1fr); gap: .75rem; margin: 0 0 1rem; }
.synthese .bloc-chiffre { background: #f9fafb; border: 1px solid var(--border); border-radius: 8px; padding: .6rem .8rem; }
.synthese .bloc-chiffre span { display: block; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.synthese .bloc-chiffre strong { font-size: 1.15rem; }
.synthese .bloc-chiffre.vente { background: #fffbeb; border-color: #fcd34d; }
.synthese .bloc-chiffre.vente strong { font-size: 1.35rem; color: #92400e; }
.alerte-inactif { background: #fef3c7; border: 1px solid #fcd34d; color: #92400e; padding: .5rem .8rem; border-radius: 8px; font-size: .9rem; margin: 0 0 .75rem; }
.unite-oeuvre { font-size: .85rem; color: var(--muted); }
.form-ouvrage { max-width: 1000px; }
.form-entreprise { max-width: 820px; }
@media (max-width: 900px) { .synthese { grid-template-columns: 1fr 1fr; } }

/* ---- Module 2.11 : contrats de maintenance (situations, statuts, synthèse, échéancier, pastille de visite sur un bon) ---- */
.situations { display: inline-flex; gap: .3rem; flex-wrap: wrap; vertical-align: middle; }
.situation { font-size: .72rem; padding: .1rem .5rem; border-radius: 999px; white-space: nowrap; font-weight: 500; }
.situation-intervenir { background: #ffedd5; color: #9a3412; }
.situation-facturer { background: #dbeafe; color: #1e40af; }
.situation-relancer { background: #fee2e2; color: #991b1b; }
.situation-renouveler { background: #fef3c7; color: #92400e; }
.statut-actif-contrat { background: #dcfce7; color: #166534; }
.statut-resilie { background: #fee2e2; color: #991b1b; }
table.echeancier td.coche { white-space: nowrap; }
table.echeancier td.coche label.checkbox { display: inline-flex; gap: .4rem; align-items: center; margin: 0; }
table.echeancier td.coche input.texte { padding: .2rem .4rem; border: 1px solid #d1d5db; border-radius: 4px; font: inherit; font-size: .85rem; }
table.echeancier tr.passee td { background: #fff7ed; }
table.echeancier tr.faite td { color: var(--muted); }
.contrat-synthese { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; margin: 0 0 1rem; }
.contrat-synthese .bloc-chiffre { background: #f9fafb; border: 1px solid var(--border); border-radius: 8px; padding: .6rem .8rem; }
.contrat-synthese .bloc-chiffre span { display: block; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.contrat-synthese .bloc-chiffre strong { font-size: 1.1rem; }
.visite-contrat { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; background: #ecfeff; color: #155e75; border-radius: 999px; padding: .15rem .6rem; vertical-align: middle; }
.visite-contrat a { color: inherit; font-weight: 600; }
.form-contrat #date-fin:disabled { background: #f3f4f6; color: var(--muted); }
@media (max-width: 900px) { .contrat-synthese { grid-template-columns: 1fr 1fr; } }
.btn[hidden] { display: none; } /* `.btn` fixe display : sans cette règle, hidden n'aurait pas d'effet (bouton « OK » des échéances) */

/* ---- Module 6.1 : planning intégré (grille reprise du planning DUF, panneau « À planifier », fiche de phase) ---- */
.page-planning { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; align-items: start; }
.outils-planning { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .6rem .9rem; border-bottom: 1px solid var(--border); }
.outils-planning .periode { font-weight: 600; margin: 0 .5rem; }
.outils-planning select { padding: .4rem .6rem; border: 1px solid #d1d5db; border-radius: 6px; font: inherit; background: #fff; }
.outils-planning .pousse { margin-left: auto; }
.bilan-ecart { font-size: .75rem; font-weight: 700; padding: .15rem .5rem; border-radius: 4px; cursor: help; white-space: nowrap; }
.bilan-ecart.manque { background: #fee2e2; color: #991b1b; }
.bilan-ecart.rab, .bilan-ecart.juste { background: #f3f4f6; color: #374151; }
.card.planning-carte { padding: 0; overflow: hidden; }
.planning { overflow: auto; max-height: calc(100svh - 260px); min-height: 220px; }
.grille { min-width: 780px; }
.ligne-semaines, .ligne-jours { display: grid; grid-template-columns: var(--colonnes); position: sticky; background: #fff; z-index: 10; }
.ligne-semaines { top: 0; z-index: 16; }
.ligne-jours { top: var(--h-semaines, 23px); z-index: 16; border-bottom: 1px solid var(--border); }
.rangee { display: grid; grid-template-columns: var(--colonnes); border-bottom: 1px solid var(--border); }
.rangee:last-child { border-bottom: 0; }
.coin { position: sticky; left: 0; z-index: 20; background: #f9fafb; border-bottom: 1px solid var(--border); }
.rangee-tete { position: sticky; left: 0; z-index: 8; padding: .6rem .8rem; display: flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .9rem; background: #fafaf9; }
.rangee-tete small { color: var(--muted); font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pastille { display: inline-block; vertical-align: -1px; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.semaine { grid-column: span 5; text-align: center; font-size: .75rem; color: var(--muted); padding: .2rem .25rem; border-left: 2px solid #d1d5db; white-space: nowrap; overflow: hidden; }
.semaine.courante { color: var(--primary); font-weight: 600; }
.jour { text-align: center; font-size: .72rem; color: var(--muted); padding: .3rem .1rem .4rem; border-left: 1px solid var(--border); background: #f9fafb; }
.jour b { display: block; font-size: .85rem; color: var(--text); font-weight: 600; }
.jour.lundi, .colonne.lundi { border-left: 2px solid #d1d5db; }
.jour.aujourdhui, .jour.aujourdhui b { color: var(--primary); }
.jour.ferie, .jour.ferie b { color: var(--danger); }
.piste { position: relative; display: grid; row-gap: 3px; column-gap: 0; padding: 4px 0; }
.colonne { grid-row: 1 / -1; border-left: 1px solid var(--border); cursor: copy; }
.colonne.aujourdhui { background: #fff7ed; }
.colonne:hover { background: #fef3c7; }
.colonne.cible { background: #fde68a; box-shadow: inset 0 0 0 1px var(--primary); }
.colonne.ferie { cursor: not-allowed; background: repeating-linear-gradient(45deg, transparent 0 5px, #fee2e2 5px 10px); }
/* Barres du planning (module 6.1) — limitées à #planning-app depuis le module 0.9 : elles écrasaient la barre d'avancement des sous-chantiers. */
#planning-app .barre { position: relative; z-index: 2; height: 100%; min-height: 40px; margin: 0 2px; padding: 3px 7px; border-radius: 5px; border: 0; font-family: inherit; font-size: .8rem; line-height: 1.25; cursor: grab; overflow: hidden; color: #fff; border-left: 3px solid rgba(0,0,0,.3); text-align: left; display: flex; flex-direction: column; justify-content: center; touch-action: none; }
#planning-app .barre:hover { filter: brightness(1.08); }
#planning-app .barre.glisse { opacity: .4; }
#planning-app .barre.bon { border-left-color: #fff; outline: 2px dashed rgba(255,255,255,.75); outline-offset: -3px; }
#planning-app .barre.verrou { cursor: not-allowed; outline: 2px solid var(--danger); outline-offset: -2px; border-left-color: var(--danger); }
#planning-app .barre b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#planning-app .barre small { opacity: .88; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
#planning-app .barre.termine { opacity: .55; }
#planning-app .barre.annule { opacity: .45; text-decoration: line-through; }
.barre .poignee { position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize; opacity: 0; }
.barre .poignee.gauche { left: 0; }
.barre .poignee.droite { right: 0; }
.barre:hover .poignee { opacity: 1; background: rgba(0,0,0,.28); }
.barre.redim { outline: 2px solid var(--primary); outline-offset: -2px; }
.barre.redim .poignee { opacity: 1; background: var(--primary); }
.barre.fantome { opacity: .55; outline: 2px dashed #fff; outline-offset: -2px; pointer-events: none; }
#planning.geste, #planning.geste .barre, #planning.geste .colonne { cursor: grabbing; }
#planning.geste .colonne:hover { background: transparent; }
#planning.geste .colonne.cible { background: #fde68a; }
#planning.deplacement .barre, #planning.deplacement .renfort { pointer-events: none; }
#planning.deplacement .colonne { cursor: move; }
.ecart { font-style: normal; font-size: .7rem; font-weight: 700; white-space: nowrap; align-self: center; justify-self: end; padding: 1px 5px; border-radius: 4px; margin: 0 14px 0 4px; z-index: 3; pointer-events: none; }
.ecart.manque { background: #fee2e2; color: #991b1b; }
.ecart.rab { background: #f3f4f6; color: #374151; }
.ecart[draggable] { pointer-events: auto; cursor: grab; border: 1px dashed #f87171; }
.ecart[draggable].glisse { opacity: .4; }
.rangee-renforts .rangee-tete { background: transparent; font-weight: 500; color: var(--muted); font-size: .8rem; }
.renfort { z-index: 2; margin: 0 2px; padding: 2px 6px; border-radius: 4px; font-size: .72rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.renfort.orphelin { border: 1px dashed var(--danger); color: var(--danger); }
.vide-planning { padding: 2rem 1rem; text-align: center; color: var(--muted); }
.legende-planning { padding: .5rem .9rem; font-size: .8rem; color: var(--muted); border-top: 1px solid var(--border); display: flex; gap: 1.5rem; flex-wrap: wrap; }
.legende-planning .puce-bon { display: inline-block; width: 22px; height: 12px; border-radius: 3px; background: #0891b2; outline: 2px dashed rgba(255,255,255,.75); outline-offset: -3px; vertical-align: -2px; }
/* Panneau « À planifier » : cible de dépôt pour retirer une barre */
.a-planifier .card { padding: 0; overflow: hidden; }
.a-planifier h2 { font-size: .95rem; margin: 0; padding: .6rem .9rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: .5rem; }
.a-planifier h2 .compte { margin-left: auto; font-size: .75rem; font-weight: 500; color: var(--muted); text-align: right; }
.a-planifier .fiches { padding: .6rem; display: flex; flex-direction: column; gap: .5rem; max-height: 480px; overflow: auto; }
.fiche-planif { border: 1px solid var(--border); border-left: 4px solid #6b7280; border-radius: 6px; padding: .45rem .6rem; background: #fff; font-size: .85rem; }
.fiche-planif[draggable] { cursor: grab; }
.fiche-planif[draggable]:hover { border-color: var(--primary); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.fiche-planif.glisse { opacity: .4; }
.fiche-planif b { display: block; }
.fiche-planif .meta { color: var(--muted); font-size: .78rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.fiche-planif.bon { border-left-color: #0891b2; }
.fiche-planif.chantier { border-left-color: #b45309; }
.fiche-planif .num { font-family: ui-monospace, monospace; font-size: .75rem; color: var(--muted); }
.fiche-planif .retard { color: var(--danger); font-weight: 600; }
.a-planifier .vide-panneau { padding: 1rem; color: var(--muted); font-size: .85rem; text-align: center; }
.a-planifier .aide { padding: .5rem .9rem; font-size: .78rem; color: var(--muted); border-top: 1px dashed var(--border); margin: 0; }
.a-planifier.attend .card:first-child { border-style: dashed; border-color: var(--primary); }
.a-planifier.attend .card:first-child h2::after { content: 'Dépose ici pour retirer du planning'; font-size: .72rem; font-weight: 500; color: var(--primary); margin-left: auto; }
.a-planifier.attend .card:first-child h2 .compte { display: none; }
.a-planifier.cible .card:first-child { box-shadow: inset 0 0 0 2px var(--primary); background: #fffbeb; }
/* Fiche d'une phase et avis */
.modale-planning { border: 1px solid var(--border); border-radius: 10px; padding: 0; width: min(560px, 94vw); }
.modale-planning::backdrop { background: rgba(17, 24, 39, .45); }
.modale-planning header { padding: .9rem 1.25rem; border-bottom: 1px solid var(--border); }
.modale-planning header h2 { margin: 0; font-size: 1.05rem; }
.modale-planning .corps { padding: 1rem 1.25rem 0; }
.modale-planning footer { padding: .75rem 1.25rem 1rem; margin: 0; }
.modale-planning .grille2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.modale-planning .champ { margin-bottom: .9rem; }
.modale-planning input:disabled, .modale-planning select:disabled { background: #f3f4f6; color: var(--muted); }
.modale-planning .message, #avis .message { padding: .6rem .9rem; border-radius: 8px; border: 1px solid; font-size: .9rem; }
.modale-planning .message.err, #avis .message.err { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.modale-planning .message.ok, #avis .message.ok { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
#avis { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 200; max-width: 520px; }
#avis .message { box-shadow: 0 6px 20px rgba(0,0,0,.15); }
#avis .lien { background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; padding: 0; margin-left: .4rem; }
#infobulle { position: fixed; z-index: 150; max-width: 320px; background: #1f2937; color: #f9fafb; font-size: .8rem; line-height: 1.4; padding: .5rem .7rem; border-radius: 6px; box-shadow: 0 6px 20px rgba(0,0,0,.25); pointer-events: none; }
#infobulle .mini { opacity: .8; }
/* Fiche chantier : bloc Planning ; Paramétrage › Équipes */
.chantier-planning-bloc .form-forcages { margin-top: .75rem; padding-top: .75rem; border-top: 1px dashed var(--border); }
.chantier-planning-bloc .form-forcages .form-grid > div { margin-bottom: .5rem; }
.equipes-liste .membres { display: flex; gap: .3rem; flex-wrap: wrap; }
.membre { font-size: .78rem; background: #f3f4f6; border-radius: 999px; padding: .1rem .5rem; white-space: nowrap; }
.membre.alternant { background: #ecfeff; color: #155e75; }
.equipes-liste input[type=color], .form-inline-ajout input[type=color] { width: 3rem; height: 2rem; padding: 2px; border: 1px solid #d1d5db; border-radius: 4px; background: #fff; cursor: pointer; }
.form-inline-ajout select { padding: .5rem .7rem; border: 1px solid #d1d5db; border-radius: 6px; font: inherit; background: #fff; }
@media (max-width: 1100px) { .page-planning { grid-template-columns: 1fr; } }
/* Palette des chantiers (module 6.1) */
.etiquette-palette { display: block; font-weight: 500; margin-bottom: .3rem; }
.palette { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.palette .teinte { width: 26px; height: 26px; padding: 0; border-radius: 6px; cursor: pointer; border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); }
.palette .teinte:hover { transform: scale(1.08); }
.palette .teinte.choisie { border-color: var(--text); }
.palette .teinte-libre { width: 34px; height: 26px; padding: 0; cursor: pointer; border: 1px dashed #9ca3af; border-radius: 6px; background: none; }
/* ---- Module 6.1.1 : agenda de présence des alternants (une colonne par mois, une case par semaine) ---- */
.agenda-tete { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .5rem; }
.agenda-tete h2 { margin: 0; }
.agenda-tete .annee { font-weight: 600; font-size: 1.05rem; margin: 0 .3rem; }
.agenda-tete .resume { color: var(--muted); font-size: .85rem; margin-left: auto; }
.agenda-tete .sans-equipe { color: var(--danger); }
.agenda { display: grid; grid-template-columns: repeat(12, 1fr); gap: .35rem; }
.agenda .mois { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); text-align: center; border-bottom: 1px solid var(--border); padding-bottom: .2rem; margin-bottom: .1rem; }
.agenda .colonne-mois { display: flex; flex-direction: column; gap: .3rem; }
.semaine-agenda { display: flex; align-items: center; gap: .35rem; border: 1px solid var(--border); border-radius: 5px; padding: .3rem .4rem; background: #fff; cursor: pointer; font-size: .78rem; line-height: 1.15; margin: 0; font-weight: 400; }
.semaine-agenda input[type=checkbox] { width: 15px; height: 15px; margin: 0; flex: none; }
.semaine-agenda .num { font-weight: 600; }
.semaine-agenda .dates { color: var(--muted); font-size: .7rem; display: block; }
.semaine-agenda .pastille { width: 8px; height: 8px; margin-left: .2rem; }
.semaine-agenda.cochee { background: #cffafe; border-color: #22d3ee; }
.semaine-agenda.cochee .num { color: #155e75; }
.semaine-agenda:has(input:disabled) { cursor: default; }
.agenda-bloc form div { margin-bottom: 0; }
.agenda-pied { display: flex; gap: .75rem; align-items: center; margin-top: .7rem; }
.agenda-pied .muted { font-size: .85rem; }
.agenda-legende { display: flex; gap: 1rem; font-size: .78rem; color: var(--muted); margin: 0 0 .5rem; }
.agenda-legende .case { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--border); vertical-align: -3px; margin-right: .25rem; }
.agenda-legende .case.cochee { background: #cffafe; border-color: #22d3ee; }
@media (max-width: 1000px) { .agenda { grid-template-columns: repeat(6, 1fr); } }
.renfort { border: 0; font: inherit; cursor: pointer; text-align: left; }
.renfort.orphelin { background: #fff !important; }

/* ---- Module 0.5 : accueil (tuiles, histogramme, blocs à traiter par thème) et facturation du chantier ---- */
.statut-non-facture { background: #fee2e2; color: #991b1b; }
.statut-facture { background: #dcfce7; color: #166534; }
.raccourcis { display: flex; gap: .5rem; flex-wrap: wrap; }
.accueil-tete { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.accueil-tete h1 { margin: 0; }
.accueil-tete .date { color: var(--muted); }
.theme-facturation { --theme: #d97706; } .theme-devis { --theme: #2563eb; } .theme-bons { --theme: #0891b2; } .theme-contrats { --theme: #16a34a; } .theme-planning { --theme: #7c3aed; } .theme-habilitations { --theme: #6b7280; }
.kpi { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: .75rem; margin-bottom: .75rem; }
.kpi .tuile { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: .8rem 1rem; display: grid; grid-template-columns: auto 1fr; column-gap: .8rem; align-items: start; border-left: 4px solid var(--theme, #9ca3af); }
.kpi .tuile .ico-theme { grid-row: span 3; width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--theme) 14%, #fff); color: var(--theme); }
.kpi .tuile .ico-theme svg { width: 20px; height: 20px; }
.kpi .tuile .lib { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.kpi .tuile .val { font-size: 1.6rem; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin: .15rem 0; color: var(--theme); }
.kpi .tuile .note { font-size: .8rem; color: var(--muted); }
.kpi .tuile-histo { grid-template-columns: auto 1fr 1fr; grid-template-rows: auto auto auto; }
.kpi .tuile-histo .histo { grid-column: 3; grid-row: 1 / span 3; width: 100%; height: auto; align-self: center; }
.kpi .tuile-histo .histo rect:hover { fill: #1d4ed8; }
.kpi .tuile.cliquable { cursor: pointer; }
.kpi .tuile.cliquable:hover, .kpi .tuile.cliquable[aria-expanded=true] { border-color: var(--theme); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.kpi .tuile .depli { color: var(--theme); font-weight: 600; }
.kpi-liste { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; margin-bottom: .75rem; overflow: hidden; }
.kpi-liste h3 { font-size: .9rem; margin: 0; padding: .55rem .9rem; border-bottom: 1px solid var(--border); display: flex; gap: .5rem; background: #f9fafb; }
.kpi-liste h3 .tout { margin-left: auto; font-size: .78rem; font-weight: 500; }
.kpi-liste ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 0; }
.kpi-liste li { break-inside: avoid; border-bottom: 1px solid var(--border); font-size: .85rem; }
.kpi-liste li a { display: block; padding: .4rem .9rem; color: var(--text); text-decoration: none; }
.kpi-liste li a:hover { background: #fff7ed; color: var(--primary); }
.a-traiter { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.bloc-traiter { background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--theme, #9ca3af); border-radius: 10px; padding: 0; overflow: hidden; }
.bloc-traiter h2 { font-size: .95rem; margin: 0; padding: .6rem .9rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: .55rem; background: color-mix(in srgb, var(--theme, #9ca3af) 8%, #fff); }
.bloc-traiter h2 .ico-theme { width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: var(--theme, #9ca3af); color: #fff; flex: none; }
.bloc-traiter h2 .ico-theme svg { width: 18px; height: 18px; }
.bloc-traiter h2 .nombre { display: inline-block; min-width: 1.6rem; text-align: center; font-size: .75rem; font-weight: 700; padding: .1rem .45rem; border-radius: 999px; background: #fee2e2; color: #991b1b; }
.bloc-traiter h2 .nombre.calme { background: #f3f4f6; color: #374151; }
.bloc-traiter h2 .tout { margin-left: auto; font-size: .78rem; font-weight: 500; }
.bloc-traiter ul { list-style: none; margin: 0; padding: 0; }
.bloc-traiter li { display: flex; gap: .6rem; align-items: baseline; padding: .45rem .9rem; border-bottom: 1px solid var(--border); font-size: .88rem; }
.bloc-traiter li:last-child { border-bottom: 0; }
.bloc-traiter li a.principal { color: var(--text); text-decoration: none; font-weight: 500; }
.bloc-traiter li a.principal:hover { color: var(--primary); }
.bloc-traiter li .num { font-family: ui-monospace, monospace; font-size: .75rem; color: var(--theme, var(--muted)); font-weight: 600; white-space: nowrap; }
.bloc-traiter li .detail { color: var(--muted); font-size: .8rem; margin-left: auto; white-space: nowrap; }
.bloc-traiter li .retard { color: var(--danger); font-weight: 600; }
.bloc-traiter .vide-bloc { padding: .8rem .9rem; color: var(--muted); font-size: .85rem; }
.bloc-traiter.reserve { border-style: dashed; }
.bloc-traiter.reserve h2 { color: var(--muted); }
.rien-a-traiter { text-align: center; padding: 2.5rem 1rem; }
.rien-a-traiter h2 { margin: 0 0 .3rem; }
@media (max-width: 1000px) { .kpi { grid-template-columns: 1fr 1fr; } .kpi .tuile-histo { grid-column: 1 / -1; } .a-traiter { grid-template-columns: 1fr; } .kpi-liste ul { columns: 1; } }
/* Taille de secours des icônes hors bandeau : jamais plus grandes que le texte, même si une règle manque. */
svg.ico { width: 1em; height: 1em; vertical-align: -.15em; }
.histo { max-height: 90px; }

/* ---- Module 7.1 : habilitations (états, tableau croisé, bloc de la fiche employé) ---- */
.etat-hab { font-size: .75rem; padding: .15rem .55rem; border-radius: 999px; white-space: nowrap; font-weight: 500; }
.etat-valide { background: #dcfce7; color: #166534; }
.etat-renouveler { background: #ffedd5; color: #9a3412; }
.etat-echue { background: #fee2e2; color: #991b1b; }
.etat-illimitee { background: #f3f4f6; color: #374151; }
table.croise { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
table.croise th, table.croise td { padding: .45rem .6rem; border-bottom: 1px solid var(--border); font-size: .85rem; vertical-align: middle; }
table.croise th { background: #f9fafb; font-weight: 600; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; text-align: center; }
table.croise th:first-child, table.croise td:first-child { text-align: left; position: sticky; left: 0; background: #fff; z-index: 1; }
table.croise th:first-child { background: #f9fafb; }
table.croise td { text-align: center; }
table.croise td .sous { display: block; font-size: .8rem; color: var(--muted); }
table.croise td .date { display: block; font-size: .72rem; color: var(--muted); }
table.croise td.vide { color: #d1d5db; }
table.croise .case-hab { display: inline-block; min-width: 5.4rem; padding: .25rem .4rem; border-radius: 6px; }
table.croise .case-valide { background: #dcfce7; color: #166534; }
table.croise .case-renouveler { background: #ffedd5; color: #9a3412; }
table.croise .case-echue { background: #fee2e2; color: #991b1b; }
table.croise .case-illimitee { background: #f3f4f6; color: #374151; }
table.croise tbody tr:hover td { background: #fafaf9; }
.hab-doc { font-size: .8rem; }
.compteurs-hab { display: flex; gap: .5rem; flex-wrap: wrap; margin: 0 0 .75rem; }
.compteurs-hab .etat-hab { font-size: .85rem; padding: .3rem .7rem; }
.ajout-habilitation summary { list-style: none; display: inline-block; }
.ajout-habilitation summary::-webkit-details-marker { display: none; }
.ajout-habilitation form div { margin-bottom: .9rem; }
table.sous.habilitations td.actions form.inline { display: inline; }

/* ---- Module 0.7 : confort et navigation (décisions 1a 2a 3a 4a) ---- */
/* Confort de lecture : texte à 16 px (les pages pleine largeur — grille du devis, planning, tableau de bord — restent à 15 px
   pour garder toutes leurs colonnes), boutons un peu plus hauts, contour de focus bien visible au clavier. */
body { font-size: 16px; }
.container.pleine-largeur { font-size: 15px; }
.btn { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; line-height: 1.2; }
.btn-sm { min-height: 32px; }
.btn-icone { min-height: 0; }
:focus-visible { outline: 3px solid #fcd34d; outline-offset: 2px; }
.btn svg.ico { flex: none; }
/* Fenêtre de recherche (Ctrl+K) */
.recherche-dialogue { border: 0; border-radius: 12px; padding: 0; width: min(720px, 94vw); background: #fff; box-shadow: 0 24px 60px rgba(0,0,0,.35); margin: 8vh auto auto; color: var(--text); }
.recherche-dialogue::backdrop { background: rgba(17,24,39,.45); }
.recherche-dialogue .champ { display: flex; align-items: center; gap: .6rem; padding: .85rem 1rem; border-bottom: 1px solid var(--border); margin: 0; }
.recherche-dialogue .champ svg.ico { color: var(--muted); width: 1.2em; height: 1.2em; }
.recherche-dialogue .champ input { flex: 1; border: 0; font: inherit; font-size: 1.1rem; outline: none; width: auto; padding: .2rem 0; }
.recherche-dialogue .champ input:focus { outline: none; }
.recherche-dialogue .champ .fermer { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
.recherche-dialogue kbd { font: inherit; font-size: .72rem; border: 1px solid #d1d5db; border-radius: 4px; padding: 0 .35rem; color: var(--muted); background: #fff; }
.recherche-dialogue .resultats { max-height: 60vh; overflow-y: auto; padding: .4rem; }
.recherche-dialogue .resultats:empty { display: none; }
.recherche-dialogue .groupe { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: .55rem .75rem .25rem; }
.recherche-dialogue a.resultat, .resultats-groupe a.resultat { display: grid; grid-template-columns: 7.5rem 1fr auto; gap: .75rem; align-items: center; padding: .5rem .75rem; border-radius: 8px; text-decoration: none; color: var(--text); }
.recherche-dialogue a.resultat:hover, .recherche-dialogue a.resultat.actif, .resultats-groupe a.resultat:hover { background: #fff7ed; }
.recherche-dialogue a.resultat .num, .resultats-groupe a.resultat .num { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; color: var(--muted); }
.recherche-dialogue a.resultat .lib small, .resultats-groupe a.resultat .lib small { display: block; color: var(--muted); font-size: .85rem; }
.recherche-dialogue a.resultat.plus .lib { color: var(--primary); font-size: .9rem; }
.recherche-dialogue mark { background: #fde68a; color: inherit; padding: 0 .05em; border-radius: 2px; }
.recherche-dialogue .pied { display: flex; gap: 1rem; padding: .5rem 1rem; border-top: 1px solid var(--border); font-size: .8rem; color: var(--muted); background: #fafaf9; border-radius: 0 0 12px 12px; }
.recherche-dialogue .pied .etat { margin-left: auto; }
.recherche-dialogue .aucun { padding: 1.5rem 1rem; text-align: center; color: var(--muted); }
.recherche-dialogue .aucun b { color: var(--text); }
.recherche-dialogue .aucun .btn { margin-top: .75rem; }
/* Page /recherche (sans JavaScript) */
.resultats-groupe .compte { font-size: .75rem; background: #f3f4f6; color: var(--muted); padding: .1rem .5rem; border-radius: 999px; font-weight: 500; margin-left: .35rem; }
.resultats-groupe ul.resultats { list-style: none; margin: 0; padding: 0; }
/* Frise des étapes (chantier, devis, bon) */
.frise { display: flex; gap: .25rem; margin: 0 0 1.25rem; padding: 0; list-style: none; }
.frise li { flex: 1; font-size: .8rem; color: var(--muted); text-align: center; padding: 0 .2rem; min-width: 0; }
.frise li::before { content: ""; display: block; height: 5px; border-radius: 999px; background: #e5e7eb; margin-bottom: .35rem; }
.frise li.etape-fait { color: #166534; } .frise li.etape-fait::before { background: #15803d; }
.frise li.etape-encours { color: #9a3412; font-weight: 600; } .frise li.etape-encours::before { background: #f97316; }
.frise li.etape-sortie { color: #991b1b; font-weight: 600; } .frise li.etape-sortie::before { background: #b91c1c; }
.frise li.etape-fin { color: #065f46; font-weight: 600; } .frise li.etape-fin::before { background: #059669; }
.frise li small { display: block; font-weight: 400; color: var(--muted); font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.container.pleine-largeur .frise { max-width: 900px; }
@media (max-width: 720px) { .frise { flex-wrap: wrap; } .frise li { flex: 1 1 30%; margin-bottom: .5rem; } }
/* Boutons de contact (Appeler · Écrire · Itinéraire) */
.contacts { display: flex; gap: .5rem; flex-wrap: wrap; margin: .5rem 0 .75rem; }
.btn-contact svg.ico { color: var(--primary); }
dl.infos dd .btn-contact, dl.infos dd .choix-itineraire { margin-left: .5rem; vertical-align: middle; }
/* Menu « Itinéraire » : Google Maps / Waze / Apple Plans (details sans JavaScript) */
.choix-itineraire { position: relative; display: inline-block; }
.choix-itineraire summary { list-style: none; cursor: pointer; }
.choix-itineraire summary::-webkit-details-marker { display: none; }
.choix-itineraire .liste { position: absolute; top: 100%; left: 0; z-index: 10; margin-top: .25rem; min-width: 160px; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.15); padding: .3rem; }
.choix-itineraire .liste a { display: block; padding: .45rem .7rem; border-radius: 6px; color: var(--text); text-decoration: none; white-space: nowrap; }
.choix-itineraire .liste a:hover { background: #fff7ed; color: var(--primary); }
.btn[hidden] { display: none; } /* rappel après le passage de .btn en inline-flex (module 0.7) */
/* Fenêtre de recherche sur téléphone : une seule colonne par résultat (après les règles générales, pour les surcharger). */
@media (max-width: 720px) {
  .recherche-dialogue { margin-top: 2vh; }
  .recherche-dialogue a.resultat { grid-template-columns: 1fr; gap: .2rem; }
  .recherche-dialogue a.resultat .num { font-size: .75rem; }
  .recherche-dialogue a.resultat .statut { justify-self: start; }
  .recherche-dialogue a.resultat .num:empty { display: none; }
}

/* ---- Module 0.8 : menu latéral (décisions 1a 2a 3a 4a) — remplace le bandeau du module 0.2 ---- */
/* Mise en page : menu à gauche (240 px, 64 px réduit), colonne principale = barre du haut + contenu. Fond des pages gris très clair bleuté (--bg). */
:root { --lateral: 240px; --lateral-reduit: 64px; --nuit: #0f172a; --nuit-2: #1e293b; --nuit-texte: #cbd5e1; --nuit-muted: #64748b; }
.app { display: grid; grid-template-columns: var(--lateral) 1fr; min-height: 100vh; }
.app.sans-menu { display: block; }
.app.menu-reduit { grid-template-columns: var(--lateral-reduit) 1fr; }
.colonne-principale { min-width: 0; display: flex; flex-direction: column; }
.colonne-principale > main { flex: 1; width: 100%; }
/* Le menu */
.lateral { background: var(--nuit); color: var(--nuit-texte); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; font-size: .93rem; z-index: 25; }
.lateral .marque { display: flex; align-items: center; gap: .6rem; padding: .8rem .75rem .6rem; }
.lateral .logo { width: 34px; height: 34px; border-radius: 9px; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; text-decoration: none; }
.lateral .logo svg.ico { width: 20px; height: 20px; }
.lateral .brand { color: #fff; font-weight: 700; text-decoration: none; line-height: 1.1; flex: 1; }
.lateral .brand small { display: block; color: #94a3b8; font-weight: 400; font-size: .75rem; }
.lateral .replier { background: none; border: 0; color: #94a3b8; cursor: pointer; padding: .3rem; border-radius: 6px; display: inline-flex; }
.lateral .replier:hover { background: var(--nuit-2); color: #fff; }
.lateral .replier svg.ico { width: 18px; height: 18px; transition: transform .15s; }
.lateral .replier.vers-droite svg.ico { transform: rotate(180deg); }
.lateral nav { flex: 1; padding: 0 .5rem; }
.lateral .menu { margin-top: .5rem; }
.lateral .menu-bouton { display: flex; align-items: center; gap: .5rem; width: 100%; padding: .35rem .5rem .2rem; font: inherit; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--nuit-muted); background: none; border: 0; cursor: pointer; text-align: left; border-radius: 6px; }
.lateral .menu-bouton:hover { color: #fff; }
.lateral .menu-bouton svg.ico { width: 15px; height: 15px; flex: none; }
.lateral .menu-bouton .chevron { margin-left: auto; display: inline-flex; opacity: .6; transition: transform .15s; }
.lateral .menu-bouton .chevron svg.ico { width: 13px; height: 13px; }
.lateral .menu-bouton .compteur-menu { display: none; margin-left: 0; }
.lateral .menu.repliee .menu-bouton .chevron { transform: rotate(-90deg); }
.lateral .menu.repliee .menu-liste { display: none; }
.lateral .menu.repliee .menu-bouton .compteur-menu { display: inline-block; }
.lateral .titre-volet { display: none; }
.lateral .menu-liste a { display: flex; align-items: center; gap: .5rem; padding: .42rem .6rem .42rem 1.9rem; border-radius: 7px; color: var(--nuit-texte); text-decoration: none; }
.lateral .menu-liste a:hover { background: var(--nuit-2); color: #fff; }
.lateral .menu-liste a.active { background: var(--primary); color: #fff; font-weight: 600; }
.lateral .menu-liste a.externe::after { content: "↗"; margin-left: .2rem; opacity: .7; }
.lateral .compteur-menu { margin-left: auto; background: #f59e0b; color: #0f172a; font-size: .68rem; font-weight: 700; padding: 0 .38rem; border-radius: 999px; min-width: 1.15rem; text-align: center; line-height: 1.4; }
.lateral .menu-liste a.active .compteur-menu { background: #fff; color: var(--primary); }
.lateral .bas { border-top: 1px solid var(--nuit-2); padding: .6rem .75rem; display: flex; align-items: center; gap: .6rem; }
.lateral .moi { display: flex; align-items: center; gap: .6rem; flex: 1; min-width: 0; }
.lateral .initiales { width: 32px; height: 32px; border-radius: 50%; background: #fbbf24; color: #0f172a; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; flex: none; }
.lateral .qui { line-height: 1.15; min-width: 0; }
.lateral .qui .nom { display: block; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lateral .qui .badge { display: inline-block; margin-top: .15rem; font-size: .68rem; padding: .05rem .45rem; }
.lateral .deconnexion { color: #94a3b8; display: inline-flex; align-items: center; gap: .3rem; text-decoration: none; padding: .3rem; border-radius: 6px; flex: none; }
.lateral .deconnexion:hover { background: var(--nuit-2); color: #fff; }
.lateral .deconnexion span { display: none; }
/* Réduit en barre d'icônes : une icône par famille, ses entrées en volet au survol ou au clic (classe `ouvert`). */
.app.menu-reduit .lateral { overflow: visible; }
.app.menu-reduit .lateral .brand, .app.menu-reduit .lateral .qui { display: none; }
.app.menu-reduit .lateral .marque { flex-direction: column; gap: .4rem; padding: .7rem .5rem .4rem; }
.app.menu-reduit .lateral .menu { position: relative; margin-top: .25rem; }
.app.menu-reduit .lateral .menu-bouton { justify-content: center; padding: .55rem 0; border-radius: 8px; }
.app.menu-reduit .lateral .menu-bouton svg.ico { width: 20px; height: 20px; color: var(--nuit-texte); }
.app.menu-reduit .lateral .menu-bouton span, .app.menu-reduit .lateral .menu-bouton .chevron { display: none; }
.app.menu-reduit .lateral .menu-bouton .compteur-menu { display: block; position: absolute; top: 2px; right: 2px; margin: 0; }
.app.menu-reduit .lateral .menu.active .menu-bouton { background: var(--primary); }
.app.menu-reduit .lateral .menu.active .menu-bouton svg.ico { color: #fff; }
.app.menu-reduit .lateral .menu-liste, .app.menu-reduit .lateral .menu.repliee .menu-liste { display: none; position: absolute; left: 100%; top: 0; margin-left: .35rem; min-width: 230px; background: var(--nuit); border: 1px solid #334155; border-radius: 8px; padding: .4rem; box-shadow: 0 8px 24px rgba(0,0,0,.35); z-index: 30; }
.app.menu-reduit .lateral .menu.ouvert .menu-liste, .app.menu-reduit .lateral .menu:hover .menu-liste { display: block; }
.app.menu-reduit .lateral .titre-volet { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--nuit-muted); padding: .3rem .6rem .35rem; }
.app.menu-reduit .lateral .menu-liste a { padding-left: .6rem; }
.app.menu-reduit .lateral .bas { flex-direction: column; padding: .6rem .4rem; }
/* Barre du haut : ☰ (téléphone), fil d'Ariane, loupe, + Nouveau */
.barre-haut { height: 52px; background: #fff; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: .75rem; padding: 0 1.25rem; position: sticky; top: 0; z-index: 15; }
.barre-haut .burger { display: none; background: none; border: 1px solid var(--border); border-radius: 7px; padding: .35rem; cursor: pointer; color: var(--text); }
.barre-haut .burger svg.ico { width: 20px; height: 20px; }
.barre-haut .fil-ariane { color: var(--muted); font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.barre-haut .fil-ariane b { color: var(--text); font-weight: 600; }
.barre-haut .recherche-bouton { margin-left: auto; display: inline-flex; align-items: center; gap: .5rem; width: 300px; flex: none; padding: .4rem .7rem; border: 1px solid #e2e8f0; border-radius: 7px; background: #f1f5f9; color: #64748b; font-size: .9rem; text-decoration: none; white-space: nowrap; overflow: hidden; }
.barre-haut .recherche-bouton:hover, .barre-haut .recherche-bouton:focus-visible { border-color: #94a3b8; color: var(--text); }
.barre-haut .recherche-bouton svg.ico { width: 16px; height: 16px; flex: none; }
.barre-haut .recherche-bouton kbd { margin-left: auto; font: inherit; font-size: .72rem; border: 1px solid #cbd5e1; border-radius: 4px; padding: 0 .3rem; background: #fff; }
.barre-haut .menu.nouveau { position: relative; flex: none; }
.barre-haut .menu.nouveau .menu-bouton { display: inline-flex; align-items: center; gap: .35rem; background: var(--primary); color: #fff; border: 0; border-radius: 7px; padding: .45rem .8rem; font: inherit; font-size: .93rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.barre-haut .menu.nouveau .menu-bouton::after { content: "▾"; font-size: .75em; opacity: .8; }
.barre-haut .menu.nouveau .menu-bouton:hover, .barre-haut .menu.nouveau.ouvert .menu-bouton { background: var(--primary-dark); }
.barre-haut .menu.nouveau .menu-bouton svg.ico { width: 18px; height: 18px; }
.barre-haut .menu.nouveau .menu-liste { display: none; position: absolute; top: 100%; right: 0; margin-top: .3rem; min-width: 230px; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: .35rem; z-index: 30; box-shadow: 0 8px 24px rgba(0,0,0,.15); }
.barre-haut .menu.nouveau.ouvert .menu-liste, .barre-haut .menu.nouveau:focus-within .menu-liste { display: block; }
.barre-haut .menu.nouveau .menu-liste a { display: flex; align-items: center; gap: .6rem; padding: .5rem .7rem; border-radius: 6px; color: var(--text); text-decoration: none; white-space: nowrap; }
.barre-haut .menu.nouveau .menu-liste a:hover { background: #fff7ed; color: var(--primary); }
.barre-haut .menu.nouveau .menu-liste a svg.ico { width: 18px; height: 18px; color: var(--primary); }
.voile-menu { display: none; }
@media (max-width: 1400px) { .barre-haut .recherche-bouton { width: 40px; padding: .4rem .6rem; justify-content: center; } .barre-haut .recherche-bouton span, .barre-haut .recherche-bouton kbd { display: none; } }
/* Téléphone : menu masqué, ouvert en volet par ☰ ; jamais réduit en icônes. */
@media (max-width: 1000px) {
  .app, .app.menu-reduit { grid-template-columns: 1fr; }
  .lateral, .app.menu-reduit .lateral { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; height: auto; overflow-y: auto; transform: translateX(-100%); transition: transform .2s; z-index: 40; box-shadow: 0 0 40px rgba(0,0,0,.4); }
  .app.menu-ouvert .lateral { transform: none; }
  .app.menu-reduit .lateral .brand, .app.menu-reduit .lateral .qui, .app.menu-reduit .lateral .menu-bouton span, .app.menu-reduit .lateral .menu-bouton .chevron { display: revert; }
  .app.menu-reduit .lateral .marque { flex-direction: row; }
  .app.menu-reduit .lateral .menu-bouton { justify-content: flex-start; padding: .35rem .5rem .2rem; }
  .app.menu-reduit .lateral .menu-bouton svg.ico { width: 15px; height: 15px; }
  .app.menu-reduit .lateral .menu-liste { display: block; position: static; margin: 0; min-width: 0; border: 0; box-shadow: none; padding: 0; }
  .app.menu-reduit .lateral .menu.repliee .menu-liste { display: none; }
  .app.menu-reduit .lateral .titre-volet { display: none; }
  .app.menu-reduit .lateral .menu-liste a { padding-left: 1.9rem; }
  .app.menu-reduit .lateral .menu-bouton .compteur-menu { position: static; display: none; }
  .app.menu-reduit .lateral .bas { flex-direction: row; }
  .lateral .replier { display: none; }
  .barre-haut { padding: 0 .75rem; gap: .5rem; }
  .barre-haut .burger { display: inline-flex; }
  .barre-haut .menu.nouveau .menu-bouton { padding: .45rem .6rem; }
  .barre-haut .menu.nouveau .menu-bouton span { display: none; }
  .voile-menu { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 39; }
  .voile-menu[hidden] { display: none; }
}

/* ---- Module 0.9 : fiche chantier en onglets (décisions 1a 2a 3a 4a) ---- */
main.fiche-chantier { max-width: 1240px; }
/* En-tête collant sous la barre du haut (52 px) : titre, actions, frise, chiffres clés, onglets */
.entete-fiche { margin: -1.5rem -1rem 1.25rem; padding: 1rem 1rem 0; background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 52px; z-index: 10; }
.entete-fiche .ligne-titre { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.entete-fiche .ligne-titre .num { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); font-size: .9rem; }
.entete-fiche .ligne-titre h1 { margin: 0; font-size: 1.4rem; }
.entete-fiche .ligne-titre .client-court { color: var(--muted); }
.entete-fiche .ligne-titre .actions { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.entete-fiche .ligne-titre .actions select.btn { padding: .45rem .7rem; }
.entete-fiche .frise { margin: .75rem 0 .5rem; }
.entete-fiche .chiffres { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin: .25rem 0 .75rem; }
.entete-fiche .chiffre { background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: .6rem .9rem; display: grid; gap: .15rem; align-content: start; }
.entete-fiche .chiffre .lib { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); display: flex; align-items: center; gap: .35rem; }
.entete-fiche .chiffre .val { font-size: 1.25rem; font-weight: 700; }
.entete-fiche .chiffre .val small { font-size: .85rem; font-weight: 400; color: var(--muted); }
.entete-fiche .chiffre .sous { font-size: .82rem; color: var(--muted); }
.entete-fiche .chiffre .barre { display: block; margin-top: .3rem; }
.onglets { display: flex; gap: .25rem; overflow-x: auto; }
.onglets a { text-decoration: none; color: var(--muted); padding: .6rem .9rem; border-bottom: 3px solid transparent; font-weight: 500; white-space: nowrap; display: inline-flex; gap: .4rem; align-items: center; margin-bottom: -1px; }
.onglets a:hover { color: var(--text); }
.onglets a.active { color: var(--primary); border-color: var(--primary); }
.onglets a .compte { font-size: .72rem; background: #f3f4f6; color: var(--muted); padding: .05rem .45rem; border-radius: 999px; }
.onglets a.active .compte { background: #fef3c7; color: #92400e; }
/* Sans JavaScript, toutes les sections se suivent ; avec, une seule à la fois. */
.onglets-actifs section.onglet { display: none; }
.onglets-actifs section.onglet.active { display: block; }
section.onglet + section.onglet { margin-top: 1rem; }
.fiche-chantier .bloc h2 { display: flex; align-items: center; gap: .5rem; }
.prochain { background: #fff7ed; border-color: #fed7aa; }
.prochain h2 { color: #9a3412; }
.prochain .jour { font-size: 1.1rem; font-weight: 700; margin: 0 0 .2rem; }
.mini-semaine { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; margin: .6rem 0 .3rem; }
.mini-semaine span { height: 24px; border-radius: 4px; background: #f3f4f6; font-size: .68rem; color: var(--muted); display: flex; align-items: center; justify-content: center; white-space: nowrap; }
.mini-semaine span.pose { background: #7c3aed; color: #fff; }
.mini-semaine span.bon { background: #0891b2; color: #fff; }
.a-faire ul { list-style: none; margin: 0; padding: 0; }
.a-faire li { display: flex; gap: .6rem; align-items: flex-start; padding: .45rem 0; border-bottom: 1px solid var(--border); font-size: .92rem; }
.a-faire li:last-child { border-bottom: 0; }
.a-faire .puce { width: 10px; height: 10px; border-radius: 50%; margin-top: .4rem; flex: none; }
.a-faire .rouge { background: #ef4444; } .a-faire .orange { background: #f59e0b; } .a-faire .bleu { background: #3b82f6; }
.chrono.unifie li { grid-template-columns: 6rem 1fr; }
.chrono.unifie .type { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; padding: .05rem .4rem; border-radius: 4px; margin-right: .3rem; white-space: nowrap; }
.chrono.unifie .type.statut { background: #ffedd5; color: #9a3412; } .chrono.unifie .type.devis { background: #dbeafe; color: #1e40af; } .chrono.unifie .type.bon { background: #cffafe; color: #155e75; } .chrono.unifie .type.sous_chantier { background: #dcfce7; color: #166534; } .chrono.unifie .type.facturation { background: #fef3c7; color: #92400e; }
.chrono.unifie .qui { color: var(--muted); font-size: .82rem; }
table.sous tr.muted td { color: var(--muted); }
@media (max-width: 900px) { .entete-fiche { position: static; } .entete-fiche .chiffres { grid-template-columns: 1fr; } }

/* ---- Module 0.10 : listes avec vues en un clic (décisions 1a 2a 3a 4a) ---- */
main.liste-page { max-width: 1240px; }
.vues { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: .75rem; }
.vues a { text-decoration: none; font-size: .9rem; padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: var(--text); display: inline-flex; gap: .35rem; align-items: center; }
.vues a:hover { border-color: #94a3b8; }
.vues a.active { background: #1f2937; color: #fff; border-color: #1f2937; }
.vues a .n { font-size: .72rem; background: rgba(0,0,0,.07); padding: 0 .4rem; border-radius: 999px; min-width: 1.3rem; text-align: center; }
.vues a.active .n { background: rgba(255,255,255,.22); }
.vues a svg.ico { width: 14px; height: 14px; color: #b45309; }
.vues a.active svg.ico { color: #fcd34d; }
.filtres-liste .recherche { flex: 1; min-width: 260px; display: flex; align-items: center; gap: .5rem; background: #fff; border: 1px solid #d1d5db; border-radius: 8px; padding: 0 .75rem; color: var(--muted); margin: 0; font-weight: 400; }
.filtres-liste .recherche input[type=search] { border: 0; padding: .5rem 0; flex: 1; font: inherit; outline: none; width: auto; min-width: 0; background: transparent; }
.filtres-liste .recherche:focus-within { border-color: var(--primary); }
.filtres-liste .recherche svg.ico { flex: none; }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
table.liste-plus th a { color: inherit; text-decoration: none; display: inline-flex; gap: .3rem; align-items: center; }
table.liste-plus th a:hover { color: var(--primary); }
table.liste-plus th.tri a { color: var(--primary); }
table.liste-plus th i { font-style: normal; font-size: .7rem; }
table.liste-plus td .principal { font-weight: 600; }
table.liste-plus td:nth-child(2) { min-width: 15rem; }
table.liste-plus td.actions { opacity: 0; transition: opacity .1s; }
table.liste-plus tbody tr:hover td.actions, table.liste-plus tbody tr:focus-within td.actions { opacity: 1; }
table.liste-plus .couleur { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .45rem; vertical-align: -1px; }
table.liste-plus .avancement { display: flex; align-items: center; gap: .5rem; min-width: 110px; }
table.liste-plus .avancement .barre { flex: 1; }
table.liste-plus td.montant, table.liste-plus th.montant { text-align: right; white-space: nowrap; }
table.liste-plus .alerte, table.liste-plus td.suivi.alerte { color: #b91c1c; font-size: .86rem; font-weight: 500; }
table.liste-plus td.suivi { font-size: .88rem; white-space: nowrap; }
table.liste-plus tr.muted td { color: var(--muted); }
.pied-liste { display: flex; align-items: center; gap: 1rem; padding: .75rem 0; color: var(--muted); font-size: .9rem; flex-wrap: wrap; }
.pied-liste .pages { margin-left: auto; display: flex; gap: .25rem; align-items: center; }
.pied-liste .pages a, .pied-liste .pages span { padding: .25rem .6rem; border: 1px solid var(--border); border-radius: 6px; text-decoration: none; color: var(--text); background: #fff; }
.pied-liste .pages span { border-color: transparent; background: none; color: var(--muted); }
.pied-liste .pages a.active { background: #1f2937; color: #fff; border-color: #1f2937; }
@media (max-width: 720px) { table.liste-plus td.actions { opacity: 1; } .filtres-liste .recherche { min-width: 0; width: 100%; } }

/* ---- Module 1.2 : photos et documents du chantier (décisions 1a 2a 3a 4a 5a) ---- */
.ajout-photos .ajout .boutons { display: flex; gap: .6rem; flex-wrap: wrap; }
.ajout-photos .ajout .boutons .btn { cursor: pointer; }
.ajout-photos .ajout .boutons .btn.desactive { opacity: .5; pointer-events: none; }
.ajout-photos .ajout .options { display: flex; gap: 1rem; flex-wrap: wrap; margin: .75rem 0 .25rem; }
.ajout-photos .ajout .options label { font-weight: 500; display: flex; flex-direction: column; gap: .25rem; min-width: 220px; margin: 0; }
.ajout-photos .ajout .options select, .ajout-photos .ajout .options input { font-weight: 400; width: 100%; }
.ajout-photos .ajout div { margin-bottom: 0; }
.galerie h2 { font-size: 1.05rem; margin: 0; }
.grille-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .9rem; }
.photo { margin: 0; }
.photo .photo-vignette { display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 10px; border: 1px solid var(--border); background-color: #e5e7eb; background-size: cover; background-position: center; cursor: zoom-in; position: relative; overflow: hidden; padding: 0; text-decoration: none; }
.photo .photo-vignette:focus-visible { outline: 3px solid #fcd34d; }
.photo .photo-vignette .apercu { position: absolute; right: .4rem; bottom: .4rem; font-size: .68rem; color: #fff; background: rgba(0,0,0,.45); padding: .05rem .4rem; border-radius: 4px; }
.photo.document .photo-vignette { background: #fff7ed; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.photo.document .photo-vignette .pdf { font-weight: 800; color: #b91c1c; font-size: 1.3rem; letter-spacing: .05em; border: 2px solid #b91c1c; border-radius: 6px; padding: .2rem .5rem; }
.photo figcaption { padding: .4rem .1rem 0; font-size: .86rem; display: grid; gap: .15rem; }
.photo figcaption b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.photo figcaption .meta { color: var(--muted); font-size: .8rem; }
.photo figcaption .retirer-photo { margin-top: .2rem; }
.photo figcaption .retirer-photo .btn { font-size: .78rem; min-height: 26px; padding: .1rem .5rem; }
.nas { font-size: .74rem; color: var(--muted); }
.nas.ok { color: #166534; }
.nas.attente { color: #92400e; }
.nas-info { display: flex; gap: .4rem; align-items: flex-start; margin: .75rem 0 0; }
.nas-info code { background: #f1f5f9; padding: 0 .3rem; border-radius: 4px; }
/* Photo en grand */
.zoom-chantier { border: 0; border-radius: 12px; padding: 0; width: min(1100px, 92vw); max-height: 92vh; background: #0f172a; color: var(--text); overflow: hidden; }
.zoom-chantier::backdrop { background: rgba(15,23,42,.85); }
.zoom-chantier .zoom-cadre { position: relative; display: flex; align-items: center; justify-content: center; background: #0f172a; }
.zoom-chantier .zoom-cadre img { display: block; max-width: 100%; max-height: calc(92vh - 110px); object-fit: contain; }
.zoom-chantier .zoom-barre { background: #fff; padding: .7rem 1rem; display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; font-size: .92rem; }
.zoom-chantier .zoom-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.zoom-chantier .zoom-actions .nas { font-size: .8rem; }
.zoom-chantier .fleche { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.85); border: 0; border-radius: 50%; width: 44px; height: 44px; font-size: 1.6rem; cursor: pointer; }
.zoom-chantier .fleche.gauche { left: .6rem; } .zoom-chantier .fleche.droite { right: .6rem; }
.zoom-chantier .fleche[hidden] { display: none; }
@media (max-width: 720px) { .grille-photos { grid-template-columns: repeat(2, 1fr); } .ajout-photos .ajout .options label { min-width: 0; width: 100%; } }

/* ---- Module 6.3 : « Ma journée » (décisions 1a 2a 3a 4a) et bouton « Terminé ✓ » des sous-chantiers ---- */
main.journee { max-width: 900px; }
.journee-tete { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.journee-tete h1 { margin: 0; font-size: 1.5rem; }
.journee-tete .date { margin: .1rem 0 0; color: var(--muted); }
.mon-equipe { display: inline-flex; align-items: center; gap: .4rem; background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: .35rem .8rem; font-weight: 600; }
.mon-equipe small { font-weight: 400; color: var(--muted); }
.journee .pastille { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.choix-equipe { display: flex; flex-direction: column; gap: .2rem; font-weight: 500; min-width: 200px; }
.choix-equipe div { margin: 0; }
.carte-jour { background: #fff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; display: grid; grid-template-columns: 8px 1fr; box-shadow: 0 1px 3px rgba(0,0,0,.06); margin-bottom: 1.25rem; }
.carte-jour.vide { grid-template-columns: 1fr; text-align: center; }
.carte-jour .corps { padding: 1rem 1.1rem 1.1rem; min-width: 0; }
.carte-jour .num { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; color: var(--muted); }
.carte-jour h2 { margin: .1rem 0 .4rem; font-size: 1.2rem; }
.carte-jour p { margin: .2rem 0; display: flex; gap: .4rem; align-items: flex-start; }
.carte-jour.vide p { display: block; }
.carte-jour p svg.ico, .carte-jour .notes svg.ico { flex: none; margin-top: .2rem; color: var(--muted); }
.carte-jour .notes { display: flex; gap: .4rem; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: .5rem .7rem; margin: .6rem 0; font-size: .92rem; }
.bon-jour { display: flex; gap: .5rem; align-items: flex-start; background: #ecfeff; border: 1px solid #a5f3fc; border-radius: 8px; padding: .55rem .7rem; text-decoration: none; color: var(--text); margin: .4rem 0 .6rem; }
.bon-jour svg.ico { color: #0891b2; margin-top: .2rem; flex: none; }
.bon-jour small { display: block; color: #155e75; }
.carte-jour .gros { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .7rem; }
.carte-jour .gros .btn, .carte-jour .gros summary.btn { min-height: 48px; font-size: .98rem; justify-content: center; width: 100%; cursor: pointer; }
.carte-jour .gros .btn-primary { grid-column: 1 / -1; }
.carte-jour .gros .photo-rapide { margin: 0; }
.carte-jour .gros .photo-rapide div { margin: 0; }
.carte-jour .gros .choix-itineraire { display: block; grid-column: 1 / -1; }
.carte-jour .gros .choix-itineraire summary { width: 100%; }
.sous-jour { margin-top: .9rem; border-top: 1px dashed var(--border); padding-top: .6rem; font-size: .92rem; }
.sous-jour ul { list-style: none; margin: .4rem 0 0; padding: 0; }
.sous-jour li { display: flex; align-items: center; gap: .5rem; padding: .35rem 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.sous-jour li:last-child { border-bottom: 0; }
.sous-jour li form { margin-left: auto; }
.sous-jour li form div { margin: 0; }
.journee .titre-section { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 1rem 0 .4rem; }
.liste-semaine { background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.liste-semaine .jour { display: grid; grid-template-columns: 3.6rem 1fr; gap: .6rem; padding: .55rem .8rem; border-bottom: 1px solid var(--border); align-items: center; }
.liste-semaine .jour:last-child { border-bottom: 0; }
.liste-semaine .j { font-size: .72rem; color: var(--muted); text-align: center; line-height: 1.1; display: flex; flex-direction: column; align-items: center; gap: .15rem; }
.liste-semaine .j b { font-size: 1.05rem; color: var(--text); }
.liste-semaine .autre-equipe { font-size: .78rem; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: .3rem; }
.liste-semaine .items { display: grid; gap: .3rem; min-width: 0; }
.liste-semaine .item { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--text); }
.liste-semaine .item .couleur { width: 6px; height: 34px; border-radius: 3px; flex: none; }
.liste-semaine .item .lib { font-size: .95rem; line-height: 1.2; text-align: left; }
.liste-semaine .item small { display: block; color: var(--muted); font-size: .8rem; }
.autres-equipes { margin-top: 1rem; }
.autres-equipes summary { cursor: pointer; font-weight: 600; padding: .5rem 0; display: flex; gap: .4rem; align-items: center; list-style: none; }
.autres-equipes summary::before { content: "›"; color: var(--muted); transition: transform .15s; }
.autres-equipes[open] summary::before { transform: rotate(90deg); }
.autres-equipes[open] summary { margin-bottom: .4rem; }
table.sous td.actions .btn-termine { white-space: nowrap; }
@media (max-width: 720px) { .carte-jour .gros { grid-template-columns: 1fr 1fr; } .journee-tete { flex-direction: column; } }

/* ---- Module 4.3 : parc automobile (liste, fiche en onglets, modèles et plans d'entretien, Mon véhicule) ---- */
.statut-sorti { background: #e5e7eb; color: #374151; }
.fiche-vehicule .chiffre.alerte-orange { border-color: #fed7aa; background: #fff7ed; }
.fiche-vehicule .chiffre.alerte-rouge { border-color: #fecaca; background: #fef2f2; }
.fiche-vehicule .chiffre .sous.alerte { color: #b91c1c; }
.fiche-vehicule .form-releve { margin-bottom: 1rem; padding-bottom: .75rem; border-bottom: 1px dashed var(--border); }
.fiche-vehicule .form-grid-3 > div { margin-bottom: .6rem; }
.form-vehicule .palette { margin-top: .3rem; }
.modele-vehicule.inactif { opacity: .6; }
.modele-vehicule .sous-head { flex-wrap: wrap; gap: .5rem; }
.modele-vehicule .sous-head h2 { flex: 1; min-width: 240px; }
.modele-vehicule input.titre-modele { font: inherit; font-weight: 600; font-size: 1.05rem; width: 100%; border: 1px solid transparent; border-radius: 6px; padding: .2rem .4rem; background: transparent; }
.modele-vehicule input.titre-modele:hover, .modele-vehicule input.titre-modele:focus { border-color: #d1d5db; background: #fff; }
.modele-vehicule input.conso-modele { width: 4.5rem; text-align: right; font: inherit; border: 1px solid #d1d5db; border-radius: 6px; padding: .15rem .4rem; }
.modele-vehicule table.operations input[type=text] { width: 100%; font: inherit; font-size: .92rem; border: 1px solid transparent; border-radius: 6px; padding: .3rem .4rem; background: transparent; }
.modele-vehicule table.operations input[type=text]:hover, .modele-vehicule table.operations input[type=text]:focus { border-color: #d1d5db; background: #fff; }
.modele-vehicule table.operations input.court { width: 6rem; text-align: right; }
.modele-vehicule table.operations td.actions { white-space: nowrap; }
.modele-vehicule tr.ajout td { background: #fafaf9; }
.mon-vehicule .form-plein h3 { font-size: 1rem; margin: .8rem 0 .4rem; }
.mon-vehicule .form-plein .form-grid > div { margin-bottom: .6rem; }
.mon-vehicule .form-plein .btn { width: 100%; min-height: 48px; justify-content: center; }
.mon-vehicule .alertes-vehicule { list-style: none; margin: .4rem 0 0; padding: 0; font-size: .9rem; }
.mon-vehicule .alertes-vehicule li { padding: .25rem 0 .25rem 1rem; position: relative; }
.mon-vehicule .alertes-vehicule li::before { content: ""; position: absolute; left: 0; top: .6rem; width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; }
.mon-vehicule .alertes-vehicule li.rouge::before { background: #ef4444; }
.mon-vehicule .alertes-vehicule li.bleu::before { background: #3b82f6; }
.theme-parc .ico-theme { background: #ccfbf1; color: #0f766e; }

/* ---- Module 1.3 : consultations fournisseurs (choix des lignes, fournisseurs, fiche, comparatif, mail) ---- */
.bandeau-resume { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: center; background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: .7rem 1rem; margin: 0 0 1rem; }
.bandeau-resume b { font-size: 1.05rem; }
table.selection-lignes tr.chapitre td { background: #f8fafc; font-weight: 600; }
table.selection-lignes td.coche, table.selection-lignes th.coche { width: 2.2rem; text-align: center; }
table.selection-lignes tr.cochee td { background: #fffbeb; }
table.selection-lignes select.article { max-width: 300px; font-size: .88rem; }
table.selection-lignes .libre { color: var(--muted); font-size: .85rem; }
.choisis { display: flex; gap: .4rem; flex-wrap: wrap; min-height: 2rem; align-items: center; }
.chip { display: inline-flex; gap: .4rem; align-items: center; background: #fffbeb; border: 1px solid #fcd34d; color: #92400e; border-radius: 999px; padding: .2rem .4rem .2rem .7rem; font-weight: 500; }
.chip button { border: 0; background: #fde68a; color: #92400e; border-radius: 50%; width: 20px; height: 20px; cursor: pointer; font-size: .75rem; line-height: 1; }
.barre-fournisseurs { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin: .6rem 0; }
.barre-fournisseurs .recherche { flex: 1; min-width: 260px; }
.liste-fournisseurs { max-height: 330px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.liste-fournisseurs table.list { margin: 0; }
.liste-fournisseurs td.coche, .liste-fournisseurs th.coche { width: 2.2rem; text-align: center; }
.liste-fournisseurs tr.cochee td { background: #fffbeb; }
.liste-fournisseurs select { font-size: .85rem; max-width: 320px; }
.liste-fournisseurs tr[hidden] { display: none; }
.form-consultation .etiquette { display: block; font-weight: 500; margin-bottom: .3rem; }
.choix-livraison { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .6rem; }
.choix-livraison label { display: block; border: 1px solid var(--border); border-radius: 10px; padding: .6rem .8rem; background: #fff; font-weight: 500; cursor: pointer; }
.choix-livraison label:has(:checked) { border-color: var(--primary); background: #fffbeb; }
.choix-livraison .sous { display: block; font-weight: 400; color: var(--muted); font-size: .85rem; margin-left: 1.4rem; }
.fournisseurs-consultes { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .75rem; }
.fournisseur-carte { border: 1px solid var(--border); border-radius: 10px; padding: .7rem .9rem; background: #fff; display: grid; gap: .2rem; align-content: start; }
.fournisseur-carte.retenu { border-color: #16a34a; background: #f0fdf4; }
.fournisseur-carte > b { font-size: 1rem; }
.fournisseur-carte .etat { font-size: .85rem; }
.fournisseur-carte .etat.ok { color: #166534; } .fournisseur-carte .etat.attente { color: #92400e; } .fournisseur-carte .etat.retard { color: #b91c1c; }
.fournisseur-carte .actions { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .3rem; }
.fournisseur-carte .form-reponse { grid-column: 1 / -1; margin-top: .6rem; padding-top: .6rem; border-top: 1px dashed var(--border); }
.fournisseur-carte .form-reponse[hidden] { display: none; }
.piece-jointe { display: inline-flex; gap: .3rem; align-items: center; font-size: .85rem; background: #f3f4f6; border-radius: 6px; padding: .15rem .5rem; text-decoration: none; color: inherit; }
table.comparatif th.fournisseur { text-align: right; min-width: 130px; }
table.comparatif th.fournisseur small { display: block; font-weight: 400; color: var(--muted); }
table.comparatif td.prix { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.comparatif td.prix input { width: 6.5rem; text-align: right; font: inherit; border: 1px solid transparent; border-radius: 6px; padding: .2rem .4rem; background: transparent; }
table.comparatif td.prix input:hover, table.comparatif td.prix input:focus { border-color: #d1d5db; background: #fff; }
table.comparatif td.prix .total-ligne { display: block; color: var(--muted); font-size: .78rem; }
table.comparatif td.prix.mini { background: #dcfce7; }
table.comparatif td.prix.sans { color: var(--muted); }
table.comparatif tfoot td { font-weight: 700; background: #f8fafc; }
table.comparatif tfoot td.prix.mini { background: #bbf7d0; }
table.comparatif td.retenu select { font-size: .85rem; max-width: 160px; }
table.comparatif th.retenu, table.comparatif td.retenu { background: #fefce8; }
table.comparatif tr.retenu-ligne td { background: #f0fdf4; }
.legende-comparatif { color: var(--muted); font-size: .88rem; margin: .5rem 0 0; }
.mail-apercu { max-width: 760px; background: #fff; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.mail-apercu .tete { background: #f8fafc; border-bottom: 1px solid var(--border); padding: .8rem 1rem; font-size: .9rem; display: grid; gap: .15rem; }
.mail-apercu .corps { padding: 1rem 1.2rem; }
.statut-consultee { background: #dbeafe; color: #1e40af; }
.statut-a-decider { background: #fef3c7; color: #92400e; }
.statut-retenue { background: #dcfce7; color: #166534; }
.fiche-consultation .chiffre.alerte-orange { border-color: #fed7aa; background: #fff7ed; }
.fiche-consultation .chiffre.alerte-rouge { border-color: #fecaca; background: #fef2f2; }
.fiche-consultation .chiffre .sous.alerte { color: #b91c1c; }
.form-help.alerte { color: #b91c1c; }

/* ---- Module 1.4 : commandes sur chantier (lignes en saisie, fiche, réception, liste, accueil) ---- */
.statut-commandee { background: #dbeafe; color: #1e40af; }
.statut-partielle { background: #fef3c7; color: #92400e; }
.statut-livree { background: #dcfce7; color: #166534; }
table.lignes-commande td { vertical-align: top; }
table.lignes-commande input[type=text], table.lignes-commande select { font: inherit; width: 100%; border: 1px solid #d1d5db; border-radius: 6px; padding: .3rem .5rem; }
table.lignes-commande input.court { width: 6.5rem; text-align: right; }
table.lignes-commande select { width: auto; }
table.lignes-commande tr.ajout td { background: #fafaf9; }
table.lignes-commande tr.erreur td { background: #fef2f2; }
table.lignes-commande .propose { display: block; }
table.commande td.num, table.commande th.num { text-align: right; white-space: nowrap; }
table.commande input.qte { width: 5.5rem; text-align: right; font: inherit; border: 1px solid #d1d5db; border-radius: 6px; padding: .25rem .4rem; }
table.commande input.date-recue, table.commande input.remarque-recue { font: inherit; border: 1px solid #d1d5db; border-radius: 6px; padding: .25rem .4rem; }
table.commande input.remarque-recue { width: 9rem; }
table.commande tr.livree td { color: var(--muted); }
table.commande .reste { font-weight: 600; }
table.commande .reste.zero { color: #166534; font-weight: 400; }
.avancement-livraison { display: flex; align-items: center; gap: .6rem; min-width: 260px; }
.avancement-livraison .barre { flex: 1; height: 8px; border-radius: 999px; background: #e5e7eb; overflow: hidden; }
.avancement-livraison .barre span { display: block; height: 100%; background: #16a34a; }
.fiche-commande .chiffre.alerte-orange { border-color: #fed7aa; background: #fff7ed; }
.fiche-commande .chiffre .sous.alerte { color: #b91c1c; }
.theme-commandes { --theme: #7c3aed; }
.theme-commandes .ico-theme { background: #ede9fe; color: #6d28d9; }
.entete-fiche .chiffres.chiffres-secondaires { margin-top: -.25rem; grid-template-columns: repeat(3, 1fr); }

/* ---- Module 2.3 : trames d'impression, polices, documents complémentaires, PDF produits ---- */
.trames { display: grid; grid-template-columns: 280px 1fr; gap: 1rem; align-items: start; }
.trames .liste-trames { display: grid; gap: .4rem; }
.trames .liste-trames h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: .6rem 0 .1rem; }
.trames .liste-trames form { margin-bottom: .2rem; }
.trames .trame-item { display: flex; align-items: center; gap: .5rem; padding: .55rem .75rem; border: 1px solid var(--border); border-radius: 10px; background: #fff; text-decoration: none; color: inherit; }
.trames .trame-item.active { border-color: var(--primary); background: #fffbeb; }
.trames .trame-item b { flex: 1; font-weight: 600; }
.trames .trame-item .tag { font-size: .7rem; padding: .05rem .4rem; border-radius: 4px; background: #dcfce7; color: #166534; }
.trames .trame-item .orient { font-size: .78rem; color: var(--muted); }
.editeur-trame { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 1rem; align-items: start; }
.editeur-trame .etiquette { display: block; font-weight: 500; margin: .9rem 0 .3rem; }
.editeur-trame .zone { margin-bottom: .8rem; }
.editeur-trame .zone label { display: block; font-weight: 500; margin-bottom: .25rem; }
.editeur-trame .zone textarea { font: inherit; font-size: .9rem; width: 100%; border: 1px solid #d1d5db; border-radius: 8px; padding: .5rem .7rem; }
.editeur-trame .aide { margin: .25rem 0 .5rem; }
.variables { display: flex; flex-wrap: wrap; gap: .3rem; margin: .4rem 0 .8rem; }
.variables code { background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 6px; padding: .1rem .45rem; font-size: .8rem; cursor: pointer; }
.variables code:hover { border-color: var(--primary); background: #fffbeb; }
.options-trame { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem .8rem; margin: .2rem 0 .4rem; }
.options-trame label { font-weight: 400; font-size: .92rem; }
.palette[data-palette-trame] { display: flex; gap: .4rem; align-items: center; margin-top: .3rem; }
.palette[data-palette-trame] .teinte { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #d1d5db; cursor: pointer; }
.palette[data-palette-trame] .teinte.choisie { box-shadow: 0 0 0 2px var(--primary); }
.apercu-cadre { background: #e5e7eb; border-radius: 10px; padding: 1rem; position: sticky; top: calc(52px + 1rem); }
.apercu-cadre .titre-apercu { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .6rem; font-size: .88rem; color: var(--muted); }
.apercu-cadre iframe { width: 100%; height: calc(100vh - 52px - 9rem); min-height: 520px; border: 0; background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.15); border-radius: 4px; }
.apercu-cadre p { margin: .5rem 0 0; }
.docs-comp input.titre-modele { font: inherit; font-weight: 600; width: 100%; border: 1px solid transparent; border-radius: 6px; padding: .2rem .4rem; background: transparent; }
.docs-comp input.titre-modele:hover, .docs-comp input.titre-modele:focus { border-color: #d1d5db; background: #fff; }
.docs-comp input[type=date] { font: inherit; font-size: .9rem; border: 1px solid #d1d5db; border-radius: 6px; padding: .2rem .4rem; }
.docs-comp input[type=file].petit { font-size: .8rem; margin-top: .3rem; }
.docs-comp td.validite .sous.alerte { display: block; }
.logo-entreprise { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.logo-entreprise .apercu-logo { min-width: 180px; height: 70px; border: 1px solid var(--border); border-radius: 8px; background: #fff; display: flex; align-items: center; justify-content: center; padding: .4rem .8rem; }
.logo-entreprise .apercu-logo img { max-height: 60px; max-width: 220px; }
.pdf-liste { list-style: none; margin: 0; padding: 0; }
.pdf-liste li { display: grid; grid-template-columns: 1fr auto; gap: .5rem; padding: .45rem 0; border-bottom: 1px solid var(--border); font-size: .92rem; align-items: center; }
.pdf-liste li:last-child { border-bottom: 0; }
.pdf-liste .quand { color: var(--muted); font-size: .85rem; display: block; }
.choix-trame .liste form { display: block; }
.choix-trame .liste button.lien { display: block; width: 100%; text-align: left; background: none; border: 0; font: inherit; padding: .5rem .8rem; cursor: pointer; color: inherit; }
.choix-trame .liste button.lien:hover { background: #fffbeb; }
.theme-documents { --theme: #b45309; }
.theme-documents .ico-theme { background: #ffedd5; color: #9a3412; }
@media (max-width: 1100px) { .trames, .editeur-trame { grid-template-columns: 1fr; } .apercu-cadre { position: static; } }

/* ---- Module 0.4.1 : droits par sous-module (lignes dépliables « Affiner » dans la grille des droits) ---- */
table.droits td.module { min-width: 13rem; }
table.droits td.module .ligne-module { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
table.droits .affiner { font: inherit; font-size: .78rem; padding: .15rem .55rem; border: 1px solid #d1d5db; border-radius: 999px; background: #fff; color: var(--muted); cursor: pointer; white-space: nowrap; }
table.droits .affiner:hover { border-color: #9ca3af; color: var(--text); }
table.droits .affiner::before { content: "▸ "; }
table.droits tr.deplie .affiner::before { content: "▾ "; }
table.droits .tag-affine { font-size: .72rem; padding: .1rem .5rem; border-radius: 999px; background: #fef3c7; color: #92400e; font-weight: 500; }
table.droits tr.sous-module { display: none; background: #fafafa; }
table.droits tr.sous-module.visible { display: table-row; }
table.droits tr.sous-module td { border-bottom: 1px dashed var(--border); padding-top: .35rem; padding-bottom: .35rem; }
table.droits tr.sous-module td.module { font-weight: 400; padding-left: 2.2rem; color: #374151; font-size: .93rem; }
table.droits tr.sous-module td.module::before { content: "└ "; color: #9ca3af; }
table.droits tr.sous-module select { min-width: 9.5rem; font-size: .85rem; }
table.droits select.n-suit { background: #fff; color: #9ca3af; border-style: dashed; }
table.droits td.conflit select { outline: 2px solid var(--danger); outline-offset: 1px; }
table.droits tr.sous-module.dernier td { border-bottom: 1px solid var(--border); }
.aide-affiner { font-size: .85rem; color: var(--muted); margin: -.5rem 0 1rem; }

/* ---- Module 0.4.2 : montants masqués par profil (ligne « Montants » de la grille, pastille sur les fiches) ---- */
table.droits tr.montants select.n-aucun, .legende-niveaux .n-masque { background: #f3f4f6; color: #6b7280; }
table.droits tr.montants select.n-lecture, .legende-niveaux .n-visible { background: #dcfce7; color: #166534; }
.montants-masques { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; padding: .15rem .6rem; border-radius: 999px; background: #f3f4f6; color: #6b7280; border: 1px dashed #d1d5db; vertical-align: middle; }
.montants-masques::before { content: "€"; text-decoration: line-through; font-weight: 700; }

/* ---- Module 7.2 : congés et absences (calendrier mensuel, saisie, bloc de la fiche employé, planning, Ma journée) ---- */
.conges-tete { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .75rem; }
.conges-tete .mois { font-size: 1.1rem; font-weight: 600; min-width: 11rem; text-align: center; }
.conges-tete select { width: auto; padding: .4rem .6rem; border: 1px solid #d1d5db; border-radius: 6px; font: inherit; }
.legende-types { display: flex; gap: .6rem 1rem; flex-wrap: wrap; font-size: .85rem; color: var(--muted); margin: .5rem 0 1rem; }
.legende-types .puce, .type-puce { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: .3rem; }
.legende-types .puce-ferie { background: repeating-linear-gradient(45deg, transparent 0 3px, #fee2e2 3px 6px); border: 1px solid #fecaca; }
.calendrier-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
table.calendrier { border-collapse: collapse; width: 100%; min-width: 900px; font-size: .8rem; }
table.calendrier th, table.calendrier td { border-bottom: 1px solid var(--border); border-left: 1px solid #f1f5f9; padding: 0; height: 30px; text-align: center; }
table.calendrier th { background: #f9fafb; font-weight: 500; color: var(--muted); font-size: .72rem; padding: .3rem 0; }
table.calendrier th b { display: block; font-size: .85rem; color: var(--text); }
table.calendrier th.we, table.calendrier td.we { background: #f3f4f6; color: #9ca3af; }
table.calendrier th.ferie, table.calendrier td.ferie { background: repeating-linear-gradient(45deg, transparent 0 5px, #fee2e2 5px 10px); }
table.calendrier th.ferie b { color: var(--danger); }
table.calendrier th.aujourdhui b { color: var(--primary); }
table.calendrier td.aujourdhui { box-shadow: inset 0 0 0 2px #fdba74; }
table.calendrier th.employe, table.calendrier td.employe { text-align: left; padding: .35rem .7rem; position: sticky; left: 0; background: #fafaf9; min-width: 12rem; border-left: 0; font-weight: 500; z-index: 2; }
table.calendrier td.employe a { color: var(--text); text-decoration: none; }
table.calendrier td.employe a:hover { color: var(--primary); }
table.calendrier td.employe small { display: block; color: var(--muted); font-weight: 400; font-size: .72rem; }
table.calendrier tr.equipe td { background: #f1f5f9; text-align: left; padding: .25rem .7rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
table.calendrier th.solde-tete, table.calendrier td.solde { text-align: right; padding: 0 .6rem; white-space: nowrap; color: var(--muted); border-left: 1px solid var(--border); min-width: 6rem; }
table.calendrier th.solde-tete { padding: .3rem .6rem; }
table.calendrier td.solde b { color: var(--text); }
table.calendrier td.solde b.negatif { color: var(--danger); }
table.calendrier td .abs { display: block; height: 22px; margin: 4px 1px; border-radius: 3px; }
table.calendrier td a.abs { cursor: pointer; }
table.calendrier td .abs.matin { height: 11px; margin-bottom: 15px; border-radius: 3px 3px 0 0; }
table.calendrier td .abs.apres { height: 11px; margin-top: 15px; border-radius: 0 0 3px 3px; }
table.calendrier td:hover .abs { filter: brightness(.9); }
.liste-absences { list-style: none; margin: 0; padding: 0; }
.liste-absences li { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; padding: .35rem 0; border-bottom: 1px dashed var(--border); }
.liste-absences li:last-child { border-bottom: 0; }
.liste-absences .quand { color: var(--muted); font-size: .85rem; min-width: 12rem; }
.liste-absences form.inline { display: inline; margin: 0; }
.bloc-solde { display: flex; gap: 1rem; flex-wrap: wrap; margin: .5rem 0 1rem; }
.bloc-solde .chiffre { flex: 1; min-width: 9rem; }
#form-absence label.checkbox.demi { margin: .35rem 0 0; font-size: .9rem; }
.apercu-absence [data-solde].avertissement { color: #92400e; }
.absent { z-index: 2; margin: 0 2px; padding: 2px 6px; border-radius: 4px; font-size: .72rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: left; color: #1f2937; }

.absents-jour { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-top: .35rem; }
.absents-jour .tag-abs { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem; border-radius: 999px; font-size: .85rem; background: #f3f4f6; }
.form-inline-ajout label.checkbox { display: inline-flex; align-items: center; gap: .3rem; margin: 0; }

/* ---- Module 4.3.1 — Parc automobile : tarif de l'assurance, documents du véhicule ---- */
.prime-actuelle { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; margin: .2rem 0 .8rem; }
.prime-actuelle .montant { font-size: 1.6rem; font-weight: 700; }
.prime-actuelle .par { color: var(--muted); }
.evolution { font-size: .8rem; padding: .1rem .45rem; border-radius: 999px; font-weight: 600; white-space: nowrap; }
.evolution.hausse { background: #fef2f2; color: #b91c1c; }
.evolution.baisse { background: #ecfdf5; color: #15803d; }
.evolution.stable { background: #f3f4f6; color: #4b5563; }
table.tarifs td.actions .btn { opacity: 0; transition: opacity .15s; }
table.tarifs tr:hover td.actions .btn, table.tarifs td.actions .btn:focus-visible { opacity: 1; }
table.tarifs tr.en-cours td:first-child { font-weight: 600; }
table.tarifs tr.a-venir { color: var(--muted); }
#assurance .sous-head .btn, #documents-essentiels .sous-head a { margin-left: auto; }
ul.docs-essentiels { list-style: none; margin: 0; padding: 0; }
ul.docs-essentiels li { display: flex; align-items: center; gap: .6rem; padding: .55rem 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
ul.docs-essentiels li:last-child { border-bottom: 0; }
ul.docs-essentiels .etat-doc { width: 1.4rem; height: 1.4rem; border-radius: 50%; display: inline-grid; place-items: center; font-size: .8rem; font-weight: 700; flex: none; background: #f3f4f6; color: var(--muted); }
ul.docs-essentiels .etat-doc.ok { background: #dcfce7; color: #15803d; }
ul.docs-essentiels .etat-doc.manque { background: #fff7ed; color: #c2410c; border: 1px dashed #fdba74; }
ul.docs-essentiels .quoi { flex: 1; min-width: 10rem; }
ul.docs-essentiels .quoi small { display: block; color: var(--muted); }
.tag-manque { font-size: .75rem; padding: .1rem .5rem; border-radius: 999px; background: #fff7ed; color: #c2410c; border: 1px dashed #fdba74; white-space: nowrap; }
.erreur-champ { color: var(--danger); font-size: .85rem; margin-top: .25rem; }
input.invalide, select.invalide { border-color: var(--danger); }
.pied-parc { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: baseline; padding: .8rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; margin-top: 1rem; }
.pied-parc b { font-size: 1.15rem; }
.pied-parc .muted { font-size: .9rem; }
@media (max-width: 720px) { table.tarifs td.actions .btn { opacity: 1; } }

/* ---- Module 0.10.1 — Tri par colonne sur toutes les listes : mêmes en-têtes que les listes du module 0.10 ---- */
table.list th a, table.croise th a { color: inherit; text-decoration: none; display: inline-flex; gap: .3rem; align-items: center; }
table.list th a:hover, table.croise th a:hover { color: var(--primary); }
table.list th i, table.croise th i { font-style: normal; font-size: .7rem; }
table.list th.tri a, table.croise th.tri a { color: var(--primary); }
table.list th:not(.tri) a:hover::after, table.croise th:not(.tri) a:hover::after { content: "↕"; color: #9ca3af; font-size: .9em; }

/* ---- Module 2.7.1 : corbeille des clients ---- */
/* Cadre sous la fiche client : même carte que la fiche, liseré rouge à gauche = action à part ; gris si impossible. */
.zone-suppression { max-width: 760px; margin-top: 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-left: 4px solid var(--danger); padding: 1rem 1.5rem; }
.zone-suppression p { margin: .25rem 0 0; }
.zone-suppression form { margin: 0; }
.zone-suppression.zone-bloquee { border-left-color: var(--border); }
/* Message de succès qui porte un bouton (« Restaurer »). */
.flash-avec-action { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.flash-avec-action form { margin: 0; }
/* Nombre de clients dans la corbeille, sur le bouton de la liste. */
.compteur-corbeille { display: inline-block; min-width: 1.4em; padding: 0 .35em; border-radius: 999px; background: #f3f4f6; font-size: .8rem; text-align: center; }

/* ---- Module 7.2.1 : saisir une absence dans le calendrier des congés ---- */
/* Case vide choisissable : curseur « + », léger survol ; pendant le glisser, les cases choisies se teintent. */
table.calendrier.saisie tbody tr[data-employe] td[data-date] { cursor: cell; user-select: none; -webkit-user-select: none; }
table.calendrier.saisie tbody tr[data-employe] td[data-date]:hover { background-color: #fff7ed; }
table.calendrier td.choisi, table.calendrier.saisie tbody tr[data-employe] td.choisi:hover { background: #fed7aa; box-shadow: inset 0 2px 0 #fb923c, inset 0 -2px 0 #fb923c; }
table.calendrier td.choisi.bord-debut { box-shadow: inset 2px 2px 0 #fb923c, inset 0 -2px 0 #fb923c; }
table.calendrier td.choisi.bord-fin { box-shadow: inset -2px 2px 0 #fb923c, inset 0 -2px 0 #fb923c; }
table.calendrier td.choisi.bord-debut.bord-fin { box-shadow: inset 0 0 0 2px #fb923c; }
/* Tablette : le premier jour touché reste marqué, une aide dit quoi faire ensuite. */
.aide-selection { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 60; width: max-content; max-width: calc(100% - 2rem); background: #111827; color: #fff; border-radius: 999px; padding: .55rem 1rem; font-size: .9rem; display: flex; gap: .75rem; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.aide-selection[hidden] { display: none; }
.aide-selection button { background: none; border: 1px solid #6b7280; color: #fff; border-radius: 999px; padding: .15rem .7rem; font: inherit; font-size: .85rem; cursor: pointer; }
/* Fenêtre de saisie : même famille que la fenêtre de confirmation commune, plus large. */
dialog.fenetre-absence { border: 0; border-radius: 10px; padding: 1.25rem 1.5rem; max-width: 560px; width: calc(100% - 2rem); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
dialog.fenetre-absence::backdrop { background: rgba(17,24,39,.55); }
dialog.fenetre-absence h2 { margin: 0 0 .15rem; font-size: 1.1rem; }
dialog.fenetre-absence .sous-titre { margin: 0 0 1rem; color: var(--muted); font-size: .9rem; }
dialog.fenetre-absence .deux { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
dialog.fenetre-absence .champ { margin-bottom: .8rem; }
dialog.fenetre-absence label.checkbox { margin: .35rem 0 0; font-size: .88rem; font-weight: 400; }
dialog.fenetre-absence .prix-apercu { margin-bottom: .8rem; padding: .55rem .8rem; gap: .25rem 1rem; }
dialog.fenetre-absence .prix-apercu strong { font-size: 1.1rem; }
dialog.fenetre-absence .erreur-fenetre { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; border-radius: 8px; padding: .55rem .8rem; font-size: .9rem; margin-bottom: .8rem; }
dialog.fenetre-absence .form-actions { display: flex; gap: .5rem; justify-content: flex-end; margin: .25rem 0 0; }
dialog.fenetre-absence .select-type { display: flex; align-items: center; gap: .5rem; }
dialog.fenetre-absence .select-type .puce { width: 16px; height: 16px; border-radius: 4px; flex: none; }
@media (max-width: 600px) { dialog.fenetre-absence .deux { grid-template-columns: 1fr; } }

/* ---- Module 2.12 : photos sur les devis et les bons, reprises par le chantier ---- */
.photos-document { margin-top: 1rem; }
.photos-document .ajout { margin: .5rem 0 1rem; }
.pastille-photos { display: inline-flex; align-items: center; gap: .3rem; margin-left: .6rem; padding: .1rem .6rem; border-radius: 999px; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; font-size: .8rem; font-weight: 500; text-decoration: none; vertical-align: middle; }
.photo figcaption .origine-photo { justify-self: start; font-size: .72rem; padding: .05rem .45rem; border-radius: 4px; background: #eef2ff; color: #3730a3; }
.photo figcaption .etape-photo { justify-self: start; font-size: .72rem; padding: .05rem .45rem; border-radius: 4px; background: #f3f4f6; color: #374151; }
.photos-passees { background: #eef2ff; border: 1px solid #c7d2fe; color: #3730a3; border-radius: 8px; padding: .5rem .8rem; font-size: .9rem; margin: .25rem 0 .75rem; }

/* ---- Module 6.1.2 : équipes à composition datée (planning, Ma journée) ---- */
.rangee.avec-compo { border-bottom: 0; }
.rangee-compo .rangee-tete { background: #fafaf9; font-weight: 400; padding-top: 0; padding-bottom: .3rem; }
.rangee-compo .rangee-tete small { font-size: .72rem; }
.rangee-compo .piste { padding: 0 0 4px; }
.compo { display: flex; flex-wrap: wrap; align-items: center; gap: 2px .25rem; margin: 0 3px; padding: 2px .3rem; min-height: 26px; border-left: 1px solid var(--border); overflow: hidden; }
.compo.resume { justify-content: center; padding: 2px 0; }
.compo.resume .capa { margin: 0; }
.compo.cible { background: #ecfdf5; outline: 2px dashed #16a34a; outline-offset: -2px; border-radius: 4px; }
.personne { display: inline-block; padding: .05rem .45rem; border-radius: 999px; background: #f1f5f9; border: 1px solid #e2e8f0; font-size: .72rem; }
button.personne { font: inherit; font-size: .72rem; color: inherit; cursor: grab; }
.personne.alternant { background: #fff; border-style: dashed; color: var(--muted); cursor: default; }
.personne.en-cours { opacity: .45; outline: 2px solid #2563eb; }
.personne.ponctuelle { background: #dcfce7; border-color: #86efac; font-weight: 600; }
.personne.detache { text-decoration: line-through; color: var(--muted); }
.personne.ajoutee { background: #eef2ff; border-color: #c7d2fe; color: #3730a3; font-size: .85rem; cursor: default; }
.personne.ajoutee .retirer { border: 0; background: none; color: inherit; cursor: pointer; padding: 0 .1rem; }
.compo .personne { white-space: nowrap; }
.compo .capa { margin-left: auto; flex-shrink: 0; font-size: .72rem; color: var(--muted); font-weight: 600; }
.personnes-liste { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; margin: .35rem 0; }
.personnes-liste select { width: auto; }
.barre .personnes-phase { margin-top: auto; font-weight: 600; background: rgba(255,255,255,.7); color: #111; border-radius: 4px; padding: 0 .25rem; font-size: .7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.modale-planning label.checkbox { display: block; font-weight: 400; margin: .3rem 0; }
.note-equipe { flex-basis: 100%; order: 3; margin: 0; color: #3730a3; background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 8px; padding: .4rem .8rem; font-size: .88rem; }

/* ---- Module 6.1.3 : tâches du bureau (occupation de voirie…) ---- */
.rangee-bureau { background: #f8fafc; }
.rangee-bureau .rangee-tete small { color: var(--muted); }
.barre.tache-bureau { overflow: visible; white-space: nowrap; z-index: 3; min-width: max-content; border: 0; border-radius: 6px; margin: 5px 1px; padding: .2rem .45rem; font-size: .72rem; text-align: left; display: flex; flex-direction: column; justify-content: center; cursor: pointer; }
.barre.tache-bureau small { font-size: .66rem; opacity: .9; }
.barre.tache-bureau.a-faire { background: #f59e0b; color: #111; }
.barre.tache-bureau.demandee { background: #3b82f6; color: #fff; }
.barre.tache-bureau.accordee { background: #16a34a; color: #fff; }
.barre.tache-bureau.refusee { background: #dc2626; color: #fff; }
.fiche-planif.tache-attente { border-left-color: #64748b; background: #f8fafc; cursor: pointer; }
.pastille-tache { display: inline-block; padding: .05rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.pastille-tache.a-faire { background: #fef3c7; color: #92400e; }
.pastille-tache.demandee { background: #dbeafe; color: #1e40af; }
.pastille-tache.accordee { background: #dcfce7; color: #166534; }
.pastille-tache.refusee { background: #fee2e2; color: #991b1b; }
.taches-a-prevoir label.checkbox { display: block; font-weight: 400; margin: .3rem 0; }
.etats-tache { display: flex; gap: 1rem; flex-wrap: wrap; margin: .2rem 0 .6rem; }
.etats-tache label.checkbox { margin: 0; font-weight: 400; }
.taches-bureau .tache-bureau-ligne { padding: .5rem 0; border-bottom: 1px solid var(--border); }
.taches-bureau .tache-bureau-ligne:last-of-type { border-bottom: 0; }
.taches-bureau .tete { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.taches-bureau p { margin: .2rem 0; }
.taches-bureau details summary { cursor: pointer; color: var(--primary); font-size: .9rem; }
.taches-bureau .form-tache { margin-top: .5rem; display: grid; gap: .5rem; }
dialog.creer-chantier form { padding: 1.25rem 1.5rem; }
dialog.creer-chantier fieldset { border: 1px solid var(--border); border-radius: 8px; padding: .6rem .9rem; margin: 0 0 .75rem; }
dialog.creer-chantier legend { font-weight: 600; padding: 0 .3rem; }

/* ---- Base TEST : bandeau, pages Paramétrage › Base TEST (absent en production) ---- */
.bandeau-base-test { display: flex; gap: .3rem 1rem; align-items: center; flex-wrap: wrap; padding: .4rem 1rem; background: repeating-linear-gradient(135deg, #6d28d9 0 14px, #7c3aed 14px 28px); color: #fff; font-size: .88rem; position: sticky; top: 0; z-index: 90; }
.bandeau-base-test .marque-bt { letter-spacing: .08em; background: #fff; color: #6d28d9; padding: .05rem .5rem; border-radius: 4px; }
.bandeau-base-test .liens { margin-left: auto; display: flex; gap: .9rem; flex-wrap: wrap; }
.bandeau-base-test a { color: #fff; text-decoration: underline; }
.bandeau-base-test a i { font-style: normal; background: #fff; color: #6d28d9; border-radius: 999px; padding: 0 .4rem; font-size: .75rem; font-weight: 700; }
body.base-test .lateral, body.base-test .barre-haut { top: 2.1rem; }
body.base-test .lateral { height: calc(100vh - 2.1rem); }
.lateral .menu-liste .desactive { display: flex; align-items: center; padding: .42rem .6rem .42rem 1.9rem; opacity: .45; cursor: not-allowed; text-decoration: line-through; color: var(--nuit-texte); }
.nas.simule { color: #6d28d9; font-weight: 600; }
@media (max-width: 700px) { .bandeau-base-test { font-size: .75rem; padding: .3rem .8rem; } .bandeau-base-test .long, .bandeau-base-test .liens { display: none; } }
.bt-grille { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; align-items: start; margin-bottom: 1rem; }
@media (max-width: 900px) { .bt-grille { grid-template-columns: 1fr; } }
.bt-etat { display: grid; grid-template-columns: 12rem 1fr; gap: .45rem 1rem; margin: 0 0 1rem; } .bt-etat dt { color: var(--muted); } .bt-etat dd { margin: 0; }
.bt-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: .6rem; }
.bt-qr svg { width: 180px; height: 180px; display: block; margin: .3rem 0 .8rem; border: 1px solid var(--border); }
.bt-etapes { padding-left: 1.2rem; margin: 0 0 .8rem; } .bt-etapes li { margin: .3rem 0; color: var(--muted); } .bt-etapes li.fait { color: #166534; } .bt-etapes li.fait::after { content: ' ✓'; } .bt-etapes li.encours { color: #6d28d9; font-weight: 600; }
.bt-barre { height: 8px; background: #ede9fe; border-radius: 999px; overflow: hidden; margin-bottom: .6rem; } .bt-barre i { display: block; height: 100%; background: #7c3aed; transition: width .4s; }
.bt-boite { display: grid; grid-template-columns: 1fr 2fr; gap: 1rem; } @media (max-width: 900px) { .bt-boite { grid-template-columns: 1fr; } }
.bt-liste ul { list-style: none; margin: 0; padding: 0; } .bt-liste li a { padding: .6rem .7rem; border-radius: 8px; display: flex; flex-direction: column; gap: .15rem; color: inherit; text-decoration: none; } .bt-liste li span { font-size: .82rem; color: var(--muted); } .bt-liste li.actif a { background: #f5f3ff; outline: 1px solid #ddd6fe; }
.bt-message dl { display: grid; grid-template-columns: 7rem 1fr; gap: .3rem .8rem; margin: 0 0 1rem; } .bt-message dt { color: var(--muted); } .bt-message dd { margin: 0; }
.bt-corps { border-top: 1px solid var(--border); padding-top: .8rem; line-height: 1.5; }
.bt-corps-html { width: 100%; min-height: 420px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.bt-simule { margin: 1rem 0 0; color: #6d28d9; font-weight: 600; }
.bt-op { display: inline-block; padding: .05rem .5rem; border-radius: 999px; font-size: .78rem; font-weight: 600; } .bt-op.cree { background: #dcfce7; color: #166534; } .bt-op.modifie { background: #dbeafe; color: #1e40af; } .bt-op.supprime { background: #fee2e2; color: #991b1b; } .bt-op.envoi { background: #ede9fe; color: #5b21b6; }
