/*
 * Identité visuelle Primoclé — « Pétrole & cuivre »
 *  Pétrole #0E3B43 : le sérieux d'un dossier administratif bien tenu.
 *  Cuivre  #B85A24 : le métier (tuyaux, chauffage, chantier) ; sert aux actions et aux accents.
 *  Papier  #F6F3EE : fond chaud, comme un dossier papier.
 *  Titres : Bricolage Grotesque · Texte : Inter (polices libres SIL OFL, servies par le site).
 */
@font-face { font-family: "Bricolage Grotesque"; src: url("/fonts/bricolage-grotesque.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --petrole: #0E3B43;
  --petrole-2: #1B5A63;
  --cuivre: #B85A24;
  --cuivre-clair: #F2A36E;
  --cuivre-fond: #FBEDE3;
  --vert: var(--petrole);
  --vert-2: var(--petrole-2);
  --vert-clair: #E2EEEE;
  --accent: var(--cuivre);
  --fond: #F6F3EE;
  --carte: #ffffff;
  --texte: #16262A;
  --gris: #5B6A6D;
  --gris-2: #8A9699;
  --bord: #E2DED6;
  --rouge: #b42318;
  --rouge-fond: #fdecea;
  --orange: #b54708;
  --orange-fond: #fef4e6;
  --bleu: #2f5bd3;
  --bleu-fond: #eaf0ff;
  --ok: #0f8a5f;
  --ok-fond: #e6f6ef;
  --r: 10px;
  --ombre: 0 1px 2px rgba(14, 59, 67, .06), 0 2px 8px rgba(14, 59, 67, .04);
  --titres: "Bricolage Grotesque", "Inter", ui-sans-serif, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-family: "Inter", ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "cv11", "ss01";
  color: var(--texte);
  font-size: 14px;
  line-height: 1.45;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--fond); }
a { color: var(--vert-2); }
h1, h2, h3 { margin: 0; letter-spacing: -.015em; font-family: var(--titres); font-weight: 700; }
h1 { font-size: 22px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
.muted { color: var(--gris); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.hidden { display: none !important; }

/* Layout */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: var(--vert); color: #D6E6E7; padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; font-family: var(--titres); font-weight: 600; font-size: 19px; letter-spacing: -.02em; padding: 4px 8px 18px; }
.logo-mark { width: 32px; height: 32px; flex: 0 0 32px; display: block; }
.logo-mark svg { width: 100%; height: 100%; display: block; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: #D6E6E7; text-decoration: none; font-weight: 500; }
.nav a:hover { background: rgba(255,255,255,.07); }
.nav a.on { background: rgba(255,255,255,.13); color: #fff; }
.nav .ico { width: 18px; text-align: center; opacity: .9; }
.side-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.12); padding: 14px 8px 0; font-size: 12px; }
.side-foot b { color: #fff; display: block; font-size: 13px; }
.side-foot button { margin-top: 10px; background: none; border: 1px solid rgba(255,255,255,.25); color: #D6E6E7; border-radius: 7px; padding: 6px 10px; cursor: pointer; font: inherit; }
.main { padding: 26px 32px 60px; max-width: 1280px; width: 100%; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .sub { color: var(--gris); margin-top: 3px; }

/* Cartes */
.card { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--r); box-shadow: var(--ombre); }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--bord); gap: 10px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); gap: 18px; align-items: start; }

/* KPI */
.kpi { padding: 16px 18px; }
.kpi .v { font-size: 26px; font-weight: 700; margin-top: 4px; letter-spacing: -.02em; }
.kpi .l { color: var(--gris); font-size: 12.5px; font-weight: 500; }
.kpi.kpi-rouge .v { color: var(--rouge); }

/* Boutons */
.btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--bord); background: #fff; color: var(--texte); padding: 8px 13px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: #c9c5bb; background: #fbfaf7; }
.btn.primary { background: var(--vert); color: #fff; border-color: var(--vert); }
.btn.primary:hover { background: var(--vert-2); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger { color: var(--rouge); }
.btn.sm { padding: 5px 9px; font-size: 12.5px; border-radius: 7px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Formulaires */
label.f { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 12.5px; color: #38423c; }
input, select, textarea { font: inherit; padding: 8px 10px; border: 1px solid #d6d2c8; border-radius: 8px; background: #fff; color: var(--texte); width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid #b9d3c2; border-color: var(--vert-2); }
input[type=checkbox] { width: auto; }
textarea { min-height: 80px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.form-grid .full { grid-column: 1 / -1; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; }
.check { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--bord); border-radius: 8px; cursor: pointer; font-weight: 500; background: #fff; }
.check:hover { border-color: #c9c5bb; }
.check.on { border-color: var(--vert-2); background: var(--vert-clair); }
.check small { display: block; color: var(--gris); font-weight: 400; }
.check .warn { color: var(--rouge); }
.fieldset-title { font-weight: 700; margin: 6px 0 8px; font-size: 13px; }

/* Tables */
table.t { width: 100%; border-collapse: collapse; }
.t th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--gris); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--bord); background: #fbfaf7; }
.t td { padding: 11px 14px; border-bottom: 1px solid #efece5; vertical-align: middle; }
.t tr.click { cursor: pointer; }
.t tr.click:hover td { background: #fbfaf7; }
.t tr:last-child td { border-bottom: none; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: #efece5; color: #4b544f; white-space: nowrap; }
.badge.ok { background: var(--ok-fond); color: var(--ok); }
.badge.rouge { background: var(--rouge-fond); color: var(--rouge); }
.badge.orange { background: var(--orange-fond); color: var(--orange); }
.badge.bleu { background: var(--bleu-fond); color: var(--bleu); }
.badge.dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badges { display: flex; gap: 4px; flex-wrap: wrap; }
.st-brouillon { background: #efece5; color: #5f6b64; }
.st-collecte { background: #ffedd5; color: #c2410c; }
.st-pret_depot { background: #e6f4f1; color: #0f6f62; }
.st-depose { background: var(--bleu-fond); color: var(--bleu); }
.st-accorde { background: #2563eb; color: #fff; }
.st-travaux { background: #f1ebff; color: #6234c9; }
.st-solde { background: #db2777; color: #fff; }
.st-paye { background: #dcfce7; color: #15803d; }
.st-refuse, .st-abandonne { background: var(--rouge-fond); color: var(--rouge); }

/* Progression */
.prog { height: 6px; background: #ece9e1; border-radius: 99px; overflow: hidden; min-width: 80px; }
.prog > i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.prog-l { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--gris); }

/* Alertes */
.alerte { display: flex; gap: 10px; padding: 10px 12px; border-radius: 8px; font-size: 13px; align-items: flex-start; }
.alerte + .alerte { margin-top: 6px; }
.alerte .i { font-weight: 800; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; color: #fff; flex: none; margin-top: 1px; }
.alerte.bloquant { background: var(--rouge-fond); color: #7a1a12; }
.alerte.bloquant .i { background: var(--rouge); }
.alerte.attention { background: var(--orange-fond); color: #7a3306; }
.alerte.attention .i { background: var(--orange); }
.alerte.info { background: #f1f3f2; color: #3b4540; }
.alerte.info .i { background: var(--gris-2); }
.ok-box { background: var(--ok-fond); color: #0b5e41; padding: 10px 12px; border-radius: 8px; font-size: 13px; }

/* Pièces */
.phase { padding: 6px 18px 14px; }
.phase-h { display: flex; justify-content: space-between; align-items: center; padding: 12px 0 6px; font-weight: 700; font-size: 13px; color: var(--vert); }
.piece { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; padding: 10px 0; border-top: 1px solid #efece5; align-items: start; }
.piece:first-of-type { border-top: none; }
.piece .etat { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #c6c2b8; margin-top: 2px; display: grid; place-items: center; font-size: 10px; color: #fff; font-weight: 800; }
.piece .etat.validee { background: var(--ok); border-color: var(--ok); }
button.etat { padding: 0; cursor: pointer; font: inherit; font-size: 10px; }
.piece .etat.recue { border-color: var(--bleu); background: var(--bleu-fond); }
.piece .etat.refusee { background: var(--rouge); border-color: var(--rouge); }
.piece .nom { font-weight: 600; }
.piece .aide { color: var(--gris); font-size: 12px; margin-top: 2px; }
.piece .files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.file-chip { display: inline-flex; align-items: center; gap: 6px; background: #f4f2ec; border: 1px solid var(--bord); padding: 3px 8px; border-radius: 6px; font-size: 12px; max-width: 260px; }
.file-chip a { text-decoration: none; color: var(--texte); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip button { border: none; background: none; cursor: pointer; color: var(--gris-2); padding: 0; font-size: 14px; line-height: 1; }
.piece .refus { color: var(--rouge); font-size: 12px; margin-top: 4px; }
.piece-actions { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }

/* Chronologie */
.dates { display: grid; gap: 8px; }
.date-row { display: grid; grid-template-columns: 1fr 150px; gap: 8px; align-items: center; font-size: 13px; }
.date-row input { padding: 6px 8px; }

/* Journal */
.journal { max-height: 380px; overflow: auto; }
.ev { padding: 9px 18px; border-top: 1px solid #efece5; font-size: 12.5px; }
.ev .m { color: var(--texte); }
.ev .w { color: var(--gris-2); font-size: 11.5px; margin-top: 2px; }
.ev.note { background: #fffbea; }

/* Divers */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--bord); background: #fff; padding: 5px 11px; border-radius: 99px; font: inherit; font-size: 12.5px; cursor: pointer; font-weight: 500; }
.chip.on { background: var(--vert); color: #fff; border-color: var(--vert); }
.chip .n { opacity: .65; margin-left: 4px; }
.chip { display: inline-flex; align-items: center; gap: 5px; }
.chip.vide { opacity: .5; }
.chip.coche.on { background: var(--accent); border-color: var(--accent); }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.chip.on .dot { box-shadow: 0 0 0 2px #fff; }
.dot.st-brouillon { background: #c8c3b7; } .dot.st-collecte { background: #f59e0b; } .dot.st-pret_depot { background: #14b8a6; }
.dot.st-depose { background: #93b4f5; } .dot.st-accorde { background: #2563eb; } .dot.st-travaux { background: #8b5cf6; }
.dot.st-solde { background: #db2777; } .dot.st-paye { background: #4ade80; } .dot.st-refuse { background: #d9534f; }
.filtres { display: grid; gap: 10px; background: #fff; border: 1px solid var(--bord); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.filtres-ligne { display: flex; gap: 8px; flex-wrap: wrap; }
.filtres-ligne .search { flex: 1 1 240px; min-width: 0; }
.filtres-ligne select { width: auto; flex: 0 1 auto; }
.filtres-groupe { display: flex; gap: 10px; align-items: center; min-width: 0; }
.filtres-titre { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted, #6b746f); flex: 0 0 64px; }
.filtres-groupe .chips { min-width: 0; }
.filtres-resume { display: flex; gap: 12px; align-items: center; justify-content: space-between; font-size: 13px; color: #5f6b64; margin: 0 2px 10px; }
.lien { background: none; border: none; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }
.toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; }
.search { max-width: 280px; }
.empty { padding: 36px 20px; text-align: center; color: var(--gris); }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 10px; font-size: 13px; }
.kv dt { color: var(--gris); }
.kv dd { margin: 0; }
.pipeline { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: #ece9e1; margin: 8px 0 12px; }
.pipeline i { display: block; height: 100%; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--gris); }
.legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; background: var(--c); vertical-align: -1px; }
.list-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px 18px; border-top: 1px solid #efece5; cursor: pointer; }
.list-row:first-child { border-top: none; }
.list-row:hover { background: #fbfaf7; }
.profil { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12.5px; }
.profil::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.demo-banner { background: var(--accent); color: #fff; text-align: center; padding: 7px 12px; font-size: 13px; font-weight: 600; }
.demo-banner a { color: #fff; }

/* Modale */
.modal-bg { position: fixed; inset: 0; background: rgba(20, 28, 24, .45); display: grid; place-items: center; z-index: 50; padding: 20px; animation: fade .12s ease; }
.modal { background: #fff; border-radius: 14px; width: min(720px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.sm { width: min(440px, 100%); }
.modal.lg { width: min(1000px, 100%); }
.modal-h { padding: 16px 20px; border-bottom: 1px solid var(--bord); display: flex; justify-content: space-between; align-items: center; }
.modal-b { padding: 18px 20px; overflow: auto; }
.modal-f { padding: 14px 20px; border-top: 1px solid var(--bord); display: flex; justify-content: flex-end; gap: 8px; }
.x { border: none; background: none; font-size: 22px; cursor: pointer; color: var(--gris); line-height: 1; }
@keyframes fade { from { opacity: 0; } }

/* Toast */
.toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: var(--texte); color: #fff; padding: 10px 14px; border-radius: 9px; font-size: 13px; box-shadow: 0 6px 20px rgba(0,0,0,.2); max-width: 380px; animation: fade .15s ease; }
.toast.err { background: var(--rouge); }

/* Auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-pitch { background: var(--vert); color: #DCEAEA; padding: 56px; display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.auth-pitch h1 { color: #fff; font-size: 32px; line-height: 1.15; max-width: 480px; }
.auth-pitch ul { padding: 0; margin: 0; list-style: none; display: grid; gap: 12px; max-width: 460px; }
.auth-pitch li { display: flex; gap: 10px; }
.auth-pitch li::before { content: "✓"; color: var(--accent); font-weight: 800; }
.auth-form { display: grid; place-items: center; padding: 40px; }
.auth-form .card { width: min(400px, 100%); padding: 26px; }
.tabs { display: flex; gap: 4px; background: #f1efe9; padding: 4px; border-radius: 9px; margin-bottom: 18px; }
.tabs button { flex: 1; border: none; background: none; padding: 8px; border-radius: 7px; font: inherit; font-weight: 600; cursor: pointer; color: var(--gris); }
.tabs button.on { background: #fff; color: var(--texte); box-shadow: var(--ombre); }

/* Portail client */
.portal { max-width: 620px; margin: 0 auto; padding: 0 16px 60px; }
.portal-top { background: var(--vert); color: #fff; padding: 26px 20px 60px; text-align: center; }
.portal-top .ent { font-weight: 700; font-size: 18px; }
.portal-card { margin-top: -40px; }
.portal-piece { padding: 14px 18px; border-top: 1px solid #efece5; }
.portal-piece:first-child { border-top: none; }
.portal-piece .row { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.upload-btn { position: relative; overflow: hidden; }
.upload-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.big-prog { height: 10px; background: #ece9e1; border-radius: 99px; overflow: hidden; margin: 10px 0 4px; }
.big-prog i { display: block; height: 100%; background: var(--ok); }

@media (max-width: 1000px) {
  .detail-grid, .g2, .g3 { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; padding: 10px; }
  .side .logo { padding: 4px 8px; }
  .nav { display: flex; flex-wrap: wrap; }
  .side-foot { display: none; }
  .main { padding: 18px 14px 50px; }
  .auth { grid-template-columns: 1fr; }
  .auth-pitch { padding: 32px 24px; }
  .form-grid { grid-template-columns: 1fr; }
  .t .hide-m { display: none; }
}

/* Navigation : pastille */
.nav-badge { margin-left: auto; background: var(--accent); color: #fff; border-radius: 99px; font-size: 11px; font-weight: 700; padding: 1px 7px; }

/* Site public */
.pub { min-height: 100vh; background: var(--fond); }
.pub-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 32px; max-width: 1180px; margin: 0 auto; gap: 12px; flex-wrap: wrap; }
.pub-hero { max-width: 1180px; margin: 0 auto; padding: 36px 32px 20px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; }
.pub-hero h1 { font-size: 40px; line-height: 1.1; letter-spacing: -.02em; color: var(--vert); margin: 10px 0 14px; }
.pub-lead { font-size: 16.5px; color: #3d4741; max-width: 600px; margin: 0 0 20px; }
.pub-kicker { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.btn.big { padding: 12px 18px; font-size: 15px; border-radius: 10px; }
.pub-cal { padding: 20px; }
.cal-row { display: flex; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid #efece5; }
.cal-row:first-of-type { border-top: none; }
.cal-dpe { width: 44px; height: 32px; border-radius: 6px; color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 13px; flex: none; }
.pub-sec { max-width: 1180px; margin: 0 auto; padding: 28px 32px; }
.pub-step { display: flex; gap: 12px; background: #fff; border: 1px solid var(--bord); border-radius: 12px; padding: 16px; }
.pub-num { width: 30px; height: 30px; border-radius: 50%; background: var(--vert); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.pub-pro > div { background: var(--vert); color: #D6E6E7; border-radius: 16px; padding: 32px; }
.pub-pro h2 { color: #fff; font-size: 24px; margin: 8px 0; }
.pub-pro p { max-width: 640px; }
.pub-foot { max-width: 1180px; margin: 0 auto; padding: 10px 32px 40px; }
.diag { padding: 24px 26px; }
.diag-steps { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.diag-steps span { font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 99px; background: #f1efe9; color: var(--gris); }
.diag-steps span.on { background: var(--vert); color: #fff; }
.diag-steps span.done { background: var(--vert-clair); color: var(--vert); }
.diag-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; gap: 10px; }
.diag-res { border-radius: 12px; padding: 18px 20px; border: 1px solid; }
.diag-res h2 { font-size: 19px; margin-bottom: 8px; }
.diag-res p { margin: 6px 0; }
.diag-res ul { margin: 6px 0 0; padding-left: 18px; }
.diag-res li { margin: 4px 0; }
.diag-res.rouge { background: var(--rouge-fond); border-color: #f3c3bd; }
.diag-res.rouge h2 { color: var(--rouge); }
.diag-res.orange { background: var(--orange-fond); border-color: #f4d6b0; }
.diag-res.orange h2 { color: var(--orange); }
.diag-res.vert { background: var(--ok-fond); border-color: #bfe6d3; }
.diag-res.vert h2 { color: var(--ok); }
.diag-res.inconnu { background: #f1f3f2; border-color: var(--bord); }
.check.artisan { padding: 14px; }
.big-check { width: 56px; height: 56px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 28px; display: grid; place-items: center; margin: 0 auto 10px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.demande-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #efece5; flex-wrap: wrap; }
@media (max-width: 900px) {
  .pub-hero { grid-template-columns: 1fr; padding: 20px 18px; }
  .pub-hero h1 { font-size: 30px; }
  .pub-sec, .pub-head { padding-left: 18px; padding-right: 18px; }
}

/* Page d'accueil artisans */
.pub-h2 { font-size: 26px; color: var(--vert); letter-spacing: -.01em; }
.apercu { padding: 18px; display: grid; gap: 8px; transform: rotate(.6deg); box-shadow: 0 18px 50px rgba(20, 40, 30, .12); }
.apercu-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 4px; flex-wrap: wrap; }
.apercu .alerte + .alerte { margin-top: 0; }
.apercu-pieces { border-top: 1px solid #efece5; margin-top: 4px; padding-top: 6px; }
.apercu-piece { display: flex; gap: 10px; align-items: center; padding: 6px 0; font-size: 13px; }
.apercu-piece span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #c6c2b8; display: grid; place-items: center; font-size: 10px; font-weight: 800; color: #fff; }
.apercu-piece.ok span { background: var(--ok); border-color: var(--ok); }
.apercu-piece.att span { background: var(--orange-fond); border-color: var(--orange); color: var(--orange); }
.fonction { display: flex; gap: 12px; background: #fff; border: 1px solid var(--bord); border-radius: 12px; padding: 16px; }
.fonction-ico { width: 38px; height: 38px; border-radius: 10px; background: var(--vert-clair); display: grid; place-items: center; font-size: 18px; flex: none; }
.prix-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.prix-card { position: relative; background: #fff; border: 1px solid var(--bord); border-radius: 14px; padding: 22px 20px; display: flex; flex-direction: column; gap: 6px; }
.prix-card.vedette { border: 2px solid var(--accent); box-shadow: 0 12px 34px rgba(184, 90, 36, .16); }
.prix-card.actuel { border-color: var(--vert-2); background: var(--vert-clair); }
.prix-tag { position: absolute; top: -12px; left: 20px; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.prix-nom { font-weight: 700; font-size: 15px; color: var(--vert); }
.prix-montant { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.prix-montant span { font-size: 14px; font-weight: 500; color: var(--gris); }
.prix-liste { list-style: none; padding: 0; margin: 10px 0 16px; display: grid; gap: 8px; flex: 1; font-size: 13.5px; }
.prix-liste li::before { content: "✓"; color: var(--ok); font-weight: 800; margin-right: 8px; }
.faq { background: #fff; border: 1px solid var(--bord); border-radius: 10px; padding: 12px 16px; margin-bottom: 8px; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq p { margin: 10px 0 2px; color: #3d4741; }
@media (max-width: 900px) {
  .prix-grid { grid-template-columns: 1fr; }
  .apercu { transform: none; }
  .pub-h2 { font-size: 22px; }
}

/* Suggestions (autocomplétion) */
.ac-wrap { position: relative; }
.ac-box { position: fixed; background: #fff; border: 1px solid var(--bord); border-radius: 10px; box-shadow: 0 12px 30px rgba(20, 30, 25, .14); z-index: 90; overflow-y: auto; max-height: 340px; }
.ac-item { display: flex; align-items: center; gap: 8px; padding: 9px 12px; cursor: pointer; font-size: 13.5px; font-weight: 500; color: var(--texte); }
.ac-item + .ac-item { border-top: 1px solid #f1efe9; }
.ac-item.on, .ac-item:hover { background: var(--vert-clair); }
.ac-ico { width: 18px; color: var(--gris-2); text-align: center; }
.ac-l { flex: 1; }
.ac-sub { font-size: 11.5px; color: var(--gris-2); font-weight: 400; }
.chip-x { border: none; background: none; color: inherit; cursor: pointer; font-size: 14px; padding: 0 0 0 4px; line-height: 1; }
/* Interrupteur */
.switch { position: relative; width: 44px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #d6d2c8; border-radius: 99px; transition: .15s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::before { transform: translateX(20px); }

/* Page d'accueil simplifiée */
.centre { text-align: center; }
.hero2 { max-width: 1080px; margin: 0 auto; padding: 40px 32px 10px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.hero2 h1 { font-size: 46px; line-height: 1.08; letter-spacing: -.025em; color: var(--vert); max-width: 780px; margin: 0; }
.hero2 .pub-lead { max-width: 640px; margin: 0; }
.hero2 .small { margin: -4px 0 0; }
.navigateur { margin-top: 26px; width: 100%; border-radius: 14px; overflow: hidden; border: 1px solid var(--bord); background: #fff; box-shadow: 0 30px 70px rgba(20, 40, 30, .16); }
.navigateur-barre { height: 34px; background: #efece5; display: flex; align-items: center; gap: 7px; padding: 0 14px; border-bottom: 1px solid var(--bord); }
.navigateur-barre i { width: 11px; height: 11px; border-radius: 50%; background: #d5d0c5; }
.navigateur img { display: block; width: 100%; height: auto; }
.etapes { display: flex; flex-direction: column; gap: 56px; padding-top: 60px; }
.etape { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: center; }
.etape.inverse .etape-txt { order: 2; }
.etape-num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; }
.etape h3 { font-size: 24px; line-height: 1.2; color: var(--vert); margin: 12px 0 8px; letter-spacing: -.01em; }
.etape p { font-size: 16px; color: #3d4741; margin: 0; max-width: 420px; }
.etape-img img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--bord); box-shadow: 0 18px 44px rgba(20, 40, 30, .12); background: #fff; }
.etape-img.telephone { display: flex; justify-content: center; }
.etape-img.telephone img { width: 290px; border: 9px solid #1d2420; border-radius: 34px; }
@media (max-width: 900px) {
  .hero2 h1 { font-size: 32px; }
  .hero2 { padding: 24px 18px 0; }
  .etape { grid-template-columns: 1fr; gap: 20px; }
  .etape.inverse .etape-txt { order: 0; }
  .etapes { gap: 40px; }
}

/* Accueil avec photos */
.hero3 { max-width: 1180px; margin: 0 auto; padding: 36px 32px 20px; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero3 h1 { font-size: 46px; line-height: 1.08; letter-spacing: -.025em; color: var(--vert); margin: 10px 0 16px; }
.hero3 .pub-lead { margin: 0 0 22px; }
.hero3 .small { margin-top: 10px; }
.hero3-visuel { position: relative; padding: 18px 0 18px 26px; }
.hero3-photo { aspect-ratio: 4 / 4.4; border-radius: 22px; overflow: hidden; background: linear-gradient(135deg, var(--petrole-2), var(--petrole)); box-shadow: 0 30px 70px rgba(14, 59, 67, .22); }
.hero3-photo img, .bandeau-photo > img, .cta-photo > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-absente { visibility: hidden; }
.carte-flottante { position: absolute; display: flex; gap: 12px; align-items: center; background: #fff; border-radius: 14px; padding: 12px 16px; box-shadow: 0 16px 40px rgba(20, 30, 25, .18); font-size: 14px; max-width: 290px; }
.carte-flottante.haut { top: 46px; left: -8px; }
.carte-flottante.bas { bottom: 50px; right: -14px; }
.cf-ico { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; flex: none; }
.cf-ico.ok { background: var(--ok); }
.cf-ico.alerte-ico { background: var(--rouge); }
.bandeau-photo { position: relative; height: 420px; margin: 40px 0 10px; overflow: hidden; background: var(--vert); }
.bandeau-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20, 38, 29, .88) 0%, rgba(20, 38, 29, .55) 55%, rgba(20, 38, 29, .15) 100%); }
.bandeau-contenu { position: absolute; inset: 0; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 0 32px; display: flex; flex-direction: column; justify-content: center; color: #fff; }
.bandeau-contenu h2 { font-size: 34px; letter-spacing: -.02em; max-width: 520px; }
.bandeau-contenu p { font-size: 17px; opacity: .9; margin: 10px 0 20px; max-width: 480px; }
.metiers { display: flex; flex-wrap: wrap; gap: 8px; max-width: 560px; }
.metiers span { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); padding: 6px 12px; border-radius: 99px; font-size: 13.5px; font-weight: 600; backdrop-filter: blur(4px); }
.cta-photo { position: relative; border-radius: 22px; overflow: hidden; min-height: 320px; background: var(--vert); }
.cta-photo::after { content: ""; position: absolute; inset: 0; background: rgba(20, 38, 29, .78); }
.cta-contenu { position: relative; z-index: 1; text-align: center; color: #fff; padding: 64px 24px; }
.cta-photo > img { position: absolute; inset: 0; }
.cta-contenu h2 { font-size: 30px; letter-spacing: -.02em; }
.cta-contenu p { opacity: .9; margin: 10px 0 22px; }
@media (max-width: 900px) {
  .hero3 { grid-template-columns: 1fr; gap: 26px; padding: 20px 18px 10px; }
  .hero3 h1 { font-size: 32px; }
  .hero3-visuel { padding: 10px 0; }
  .hero3-photo { aspect-ratio: 4 / 3; }
  .carte-flottante { position: static; max-width: none; margin-top: 10px; box-shadow: 0 6px 18px rgba(20, 30, 25, .1); }
  .bandeau-photo { height: 380px; }
  .bandeau-contenu { padding: 0 20px; }
  .bandeau-contenu h2 { font-size: 26px; }
}

/* Deux formules */
.prix-grid { grid-template-columns: repeat(3, minmax(0, 330px)); justify-content: center; }
@media (max-width: 900px) { .prix-grid { grid-template-columns: 1fr; } }
.modal .prix-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .modal .prix-grid { grid-template-columns: 1fr; } }

/* DPE du logement */
.dpe-ligne { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line, #e7e3da); border-radius: 10px; background: #fff; }
.dpe-classe { flex: 0 0 38px; height: 38px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 18px; color: #fff; }
.dpe-A { background: #009c6d; } .dpe-B { background: #52b153; } .dpe-C { background: #78bd76; color: #12301a; }
.dpe-D { background: #f4e70f; color: #3a3500; } .dpe-E { background: #f0b40f; color: #3a2a00; } .dpe-F { background: #eb8235; } .dpe-G { background: #d7221f; }
/* Connexion Google / Facebook */
.btn.social { justify-content: center; padding: 10px 13px; }
.social-ico { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; background: #5f6b64; }
.social-google .social-ico { background: #ea4335; }
.social-facebook .social-ico { background: #1877f2; }
.ou { display: flex; align-items: center; gap: 10px; color: var(--gris-2); font-size: 12px; margin: 6px 0 12px; }
.ou::before, .ou::after { content: ""; flex: 1; height: 1px; background: var(--bord); }

/* Identité : détails */
.btn.primary { background: var(--petrole); border-color: var(--petrole); }
.btn.primary:hover { background: var(--petrole-2); border-color: var(--petrole-2); }
.btn.accent:hover { background: #A24E1E; border-color: #A24E1E; }
.nav a.on { box-shadow: inset 3px 0 0 var(--cuivre-clair); }
::selection { background: var(--cuivre-fond); color: var(--petrole); }
.prix-montant, .kpi .v, .kpi b { font-family: var(--titres); }

/* Calcul des aides */
.simu { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1000px) { .simu { grid-template-columns: 1fr; } }
.simu-ligne { display: grid; grid-template-columns: minmax(0, 1fr) 90px 130px 34px; gap: 8px; align-items: center; }
.simu-tete { margin-bottom: 6px; }
.simu-total { display: grid; grid-template-columns: 1fr 1fr; gap: 0; overflow: hidden; }
.simu-total > div { padding: 16px 18px; }
.simu-total > div + div { border-left: 1px solid var(--bord); }
.simu-total .l { color: var(--gris); font-size: 12.5px; font-weight: 500; }
.simu-total .v { font-family: var(--titres); font-size: 30px; font-weight: 700; letter-spacing: -.02em; color: var(--petrole); margin: 2px 0; }
.simu-total .v.cuivre { color: var(--cuivre); }
.t .num, .t th.num { text-align: right; white-space: nowrap; }
.t tr.total td { font-weight: 700; background: var(--vert-clair); }
.offre-ligne { display: flex; justify-content: space-between; padding: 7px 10px; border-radius: 8px; background: #fbfaf7; font-size: 13px; }
.offre-ligne.on { background: var(--cuivre-fond); color: #7A3A14; }
.grille input { width: 84px; text-align: right; padding: 5px 6px; }
.grille td { padding: 7px 10px; }
.pastille { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); margin-right: 5px; vertical-align: 0; }
.doc-ligne { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid #efece5; font-size: 13.5px; }
.doc-ligne:last-child { border-bottom: 0; }
.dim-res { background: var(--vert-clair); border-radius: 10px; padding: 12px 14px; font-size: 13.5px; display: grid; gap: 4px; }
.doc-client .doc-entete { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 10px; border-bottom: 3px solid var(--petrole); }
.doc-client .simu-total { border: 1px solid var(--bord); border-radius: 10px; }

/* Impression de la version client */
@media print {
  body.impression > *:not(.modal-bg) { display: none !important; }
  body.impression .modal-bg { position: static; background: none; padding: 0; display: block; }
  body.impression .modal { box-shadow: none; width: 100%; max-height: none; }
  body.impression .modal-h, body.impression .modal-f { display: none; }
}

/* Accueil : atouts */
.atouts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 22px; }
@media (max-width: 1000px) { .atouts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .atouts { grid-template-columns: 1fr; } }
.atout { background: #fff; border: 1px solid var(--bord); border-radius: 14px; padding: 20px; }
.atout h3 { font-size: 16px; margin: 12px 0 6px; color: var(--petrole); }
.atout p { margin: 0; color: var(--gris); font-size: 13.5px; line-height: 1.5; }
.atout-ico { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--cuivre-fond); color: var(--cuivre); font-weight: 800; font-size: 17px; }

/* Pied de page */
.pied { background: var(--petrole); color: #D6E6E7; margin-top: 40px; }
.pied-grille { max-width: 1180px; margin: 0 auto; padding: 44px 32px 28px; display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 32px; }
.pied-marque p { margin: 12px 0 0; max-width: 300px; font-size: 13.5px; line-height: 1.5; opacity: .85; }
.pied-col { display: grid; gap: 9px; align-content: start; font-size: 13.5px; }
.pied-col b { color: #fff; font-family: var(--titres); font-size: 14px; margin-bottom: 2px; }
.pied-col a { color: #D6E6E7; text-decoration: none; }
.pied-col a:hover { color: #fff; text-decoration: underline; }
.pied-bas { max-width: 1180px; margin: 0 auto; padding: 16px 32px 26px; border-top: 1px solid rgba(255,255,255,.12); display: flex; gap: 8px 24px; flex-wrap: wrap; justify-content: space-between; font-size: 12px; opacity: .8; }
@media (max-width: 800px) { .pied-grille { grid-template-columns: 1fr 1fr; padding: 32px 18px 20px; } .pied-marque { grid-column: 1 / -1; } .pied-bas { padding: 14px 18px 22px; } }

/* Pages légales et aide */
.legal { max-width: 820px; }
.legal h1 { font-size: 30px; color: var(--petrole); }
.legal h2 { font-size: 17px; color: var(--petrole); margin: 26px 0 8px; }
.legal p, .legal li { line-height: 1.65; color: #2B3A3D; font-size: 14.5px; }
.legal ul { padding-left: 20px; }
.aide-recherche { width: 100%; margin: 14px 0 22px; padding: 12px 14px; font-size: 15px; }
.aide-cat { font-size: 15px; color: var(--cuivre); margin-bottom: 10px; }
.aide-plus { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }

/* Assistant du support */
.support { position: fixed; right: 20px; bottom: 20px; z-index: 40; }
.support-bulle { display: flex; align-items: center; gap: 8px; background: var(--petrole); color: #fff; border: 0; border-radius: 99px; padding: 10px 16px 10px 10px; font: inherit; font-weight: 600; cursor: pointer; box-shadow: 0 8px 24px rgba(14, 59, 67, .3); }
.support-bulle:hover { background: var(--petrole-2); }
.support-ico { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--cuivre); font-weight: 800; }
.support-panneau { width: min(380px, calc(100vw - 24px)); height: min(560px, calc(100vh - 40px)); background: #fff; border-radius: 16px; box-shadow: 0 20px 60px rgba(14, 59, 67, .32); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--bord); }
.support-tete { background: var(--petrole); color: #fff; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; }
.support-tete b { font-family: var(--titres); font-size: 15px; }
.support-tete .small { opacity: .75; }
.support-tete button { background: none; border: 0; color: #fff; font-size: 22px; cursor: pointer; line-height: 1; }
.support-fil { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--fond); }
.msg { max-width: 86%; padding: 9px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.bot { background: #fff; border: 1px solid var(--bord); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.moi { background: var(--petrole); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg.attente { display: flex; gap: 4px; padding: 13px 14px; }
.msg.attente span { width: 6px; height: 6px; border-radius: 50%; background: var(--gris-2); animation: pt 1s infinite; }
.msg.attente span:nth-child(2) { animation-delay: .15s; } .msg.attente span:nth-child(3) { animation-delay: .3s; }
@keyframes pt { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }
.support-sugg { display: grid; gap: 6px; }
.support-sugg button { text-align: left; background: var(--cuivre-fond); color: #7A3A14; border: 0; border-radius: 10px; padding: 8px 11px; font: inherit; font-size: 13px; cursor: pointer; }
.support-saisie { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--bord); align-items: flex-end; }
.support-saisie textarea { flex: 1; resize: none; min-height: 38px; max-height: 90px; }
.support-pied { padding: 0 12px 10px; color: var(--gris); }
.support-contact { padding: 14px; overflow: auto; display: grid; gap: 10px; }
@media print { .support { display: none; } }

/* Comment ça marche (version légère) */
.pas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 26px; position: relative; }
.pas-carte { text-align: center; padding: 6px 14px; }
.pas-carte h3 { font-size: 18px; color: var(--petrole); margin: 12px 0 6px; }
.pas-carte p { margin: 0 auto; color: var(--gris); font-size: 14.5px; line-height: 1.5; max-width: 280px; }
.pas-carte .etape-num { width: 42px; height: 42px; font-size: 17px; font-family: var(--titres); }
@media (max-width: 760px) { .pas { grid-template-columns: 1fr; gap: 22px; } }

/* Menu de l'espace artisan */
.side-tete { display: flex; justify-content: space-between; align-items: flex-start; }
.menu-btn { display: none; background: none; border: 1px solid rgba(255,255,255,.25); border-radius: 9px; width: 42px; height: 38px; padding: 0; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.menu-btn span { display: block; width: 18px; height: 2px; background: #fff; border-radius: 2px; }

/* ---------- Téléphone ---------- */
@media (max-width: 760px) {
  html { -webkit-text-size-adjust: 100%; }
  input, select, textarea { font-size: 16px !important; } /* évite le zoom automatique sur iPhone */
  .side { display: block; padding: 10px 14px; position: sticky; top: 0; z-index: 30; height: auto; }
  .side-tete { align-items: center; }
  .side .logo { padding: 0; }
  .menu-btn { display: flex; }
  .side .nav { display: none; flex-direction: column; flex-wrap: nowrap; margin-top: 10px; }
  .side.ouvert .nav { display: flex; }
  .side .nav a { padding: 12px 10px; font-size: 15px; }
  .side.ouvert .side-foot { display: block; margin-top: 8px; }
  .main { padding: 16px 12px 90px; min-width: 0; }
  .shell > * { min-width: 0; }
  .page-head h1 { font-size: 20px; }
  .g4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 12px 14px; } .kpi .v { font-size: 21px; }
  .form-grid { grid-template-columns: 1fr !important; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar select, .toolbar .search { width: 100% !important; }
  .toolbar > * { min-width: 0; max-width: 100%; }
  .card { max-width: 100%; }
  .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .filtres { padding: 10px; } .filtres-ligne select, .filtres-ligne .search { flex: 1 1 100%; width: 100% !important; max-width: none; }
  .filtres-groupe { flex-direction: column; align-items: stretch; gap: 4px; } .filtres-titre { flex: none; }
  .chip { flex: 0 0 auto; }
  .btn { min-height: 40px; } .btn.sm { min-height: 34px; }
  .page-head .btns { width: 100%; } .page-head .btns > * { flex: 1 1 auto; justify-content: center; }
  /* Tableaux : une fiche par ligne */
  table.t:not(.grille):not(.garde) thead { display: none; }
  table.t:not(.grille):not(.garde), table.t:not(.grille):not(.garde) tbody, table.t:not(.grille):not(.garde) tr, table.t:not(.grille):not(.garde) td { display: block; width: 100%; }
  table.t:not(.grille):not(.garde) tr { padding: 10px 0; border-bottom: 1px solid #efece5; }
  table.t:not(.grille):not(.garde) tr:last-child { border-bottom: 0; }
  table.t:not(.grille):not(.garde) td { border: 0; padding: 3px 14px; text-align: left !important; white-space: normal; }
  table.t:not(.grille):not(.garde) td:empty { display: none; }
  table.t:not(.grille):not(.garde) td.hide-m { display: none; }
  .t .btns { justify-content: flex-start !important; }
  /* Pièces d'un dossier */
  .piece { grid-template-columns: 22px minmax(0, 1fr); }
  .piece-actions { grid-column: 2; justify-content: flex-start; }
  .date-row { grid-template-columns: 1fr 1fr; }
  .kv { grid-template-columns: 1fr; } .kv dt { margin-top: 8px; }
  .simu-ligne { grid-template-columns: 1fr 1fr 34px; } .simu-ligne > select { grid-column: 1 / -1; }
  .simu-ligne > span:empty { display: none; }
  .simu-tete { display: none; }
  .simu-total .v { font-size: 24px; }
  .modal-bg { padding: 0; align-items: end; }
  .modal, .modal.sm, .modal.lg { width: 100%; max-height: 94vh; border-radius: 16px 16px 0 0; }
  .modal-f { flex-wrap: wrap; } .modal-f .btn { flex: 1 1 auto; justify-content: center; }
  .support { right: 12px; bottom: 12px; }
  .support-bulle { padding: 8px; font-size: 0; gap: 0; }
  .support-ico { width: 34px; height: 34px; font-size: 16px; }
  .support-panneau { width: calc(100vw - 24px); height: min(560px, calc(100vh - 24px)); }
  .pub-head { padding: 12px 14px; flex-wrap: nowrap; } .pub-head .btn { padding: 8px 10px; font-size: 13px; min-height: 36px; } .pub-head .logo { font-size: 17px; }
  .pub-head .btns { flex-wrap: nowrap; gap: 4px; } .pub-head .btn { padding: 8px 9px; font-size: 12.5px; } .pub-head .btn.ghost { padding: 8px 5px; }
  .aide-plus { flex-direction: column; align-items: stretch; }
  .demo-banner { font-size: 11.5px; padding: 5px 8px; }
  .toast { left: 12px; right: 12px; bottom: 70px; }
  .doc-ligne { flex-wrap: wrap; }
  .dpe-ligne { flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .main > div, .main .grid, .main .card { min-width: 0; }
  .prix-grid, .modal .prix-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) { .card-head { flex-wrap: wrap; } .card-head .btn { white-space: normal; text-align: left; } }

/* Logo : texte « Dossier » selon le fond, « Prime » et le symbole identiques partout */
.nav a.nav-deconnexion { margin-top: 6px; border-top: 1px solid rgba(255,255,255,.12); border-radius: 0 0 8px 8px; padding-top: 12px; }

/* Aide, contact et pages légales dans l'espace artisan */
.page-info .aide-recherche { margin-top: 0; }
.page-info.legal h1 { font-size: 24px; }
.liens-info { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--bord); }
.liens-info a { color: var(--gris); }
@media (max-width: 760px) { .page-info { max-width: 100% !important; } .legal p, .legal li { font-size: 14px; } }
.page-info .aide-recherche, .pub-sec .aide-recherche { width: 100% !important; max-width: none; }

/* Logo : mêmes couleurs partout (symbole cuivre, nom cuivre clair lisible sur fond clair comme sur fond sombre) */
.logo, .logo .logo-nom, a.logo, a.logo:hover { color: #D2702F !important; text-decoration: none !important; }
.logo .logo-nom { font-weight: 800; letter-spacing: -.02em; }

/* Tarifs : mensuel / annuel, offre fondateur */
.periode { display: flex; width: max-content; margin: 0 auto 14px; background: #fff; border: 1px solid var(--bord); border-radius: 99px; padding: 4px; gap: 4px; }
.periode button { border: 0; background: none; font: inherit; font-weight: 600; font-size: 14px; color: var(--gris); padding: 8px 16px; border-radius: 99px; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.periode button.on { background: var(--petrole); color: #fff; }
.periode-bonus { font-size: 11px; font-weight: 700; background: var(--cuivre-fond); color: #7A3A14; padding: 2px 7px; border-radius: 99px; }
.fondateur { max-width: 760px; margin: 0 auto 18px; text-align: center; background: var(--cuivre-fond); color: #5E2E10; border: 1px solid #F2C9AE; border-radius: 12px; padding: 10px 16px; font-size: 14px; }
.fondateur-places { font-weight: 700; color: var(--cuivre); }
.prix-barre { font-size: 16px; font-weight: 500; color: var(--gris-2); }
.prix-card .small a, .prix-card > a.small { display: block; }
@media (max-width: 760px) { .periode button { padding: 8px 12px; } .fondateur { font-size: 13px; } }

/* Mot de passe et sécurité */
.jauge { height: 5px; border-radius: 99px; background: #ece8df; overflow: hidden; }
.jauge i { display: block; height: 100%; width: 0; transition: width .2s, background .2s; }
.journal-secu { display: grid; gap: 4px; font-size: 12.5px; }
.journal-secu > div { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 5px 8px; border-radius: 6px; background: #fbfaf7; }
.journal-secu > div.alerte-ligne { background: var(--rouge-fond); color: var(--rouge); }

/* Fiche dossier épurée */
.reco { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: #fff7f0; border: 1px solid #f2c9ae; border-left: 4px solid var(--accent); border-radius: 14px; padding: 14px 16px; margin-bottom: 18px; }
.reco-texte { display: grid; gap: 3px; min-width: 0; flex: 1 1 320px; }
.reco-titre { font-weight: 700; color: var(--vert); }
.reco-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-liste { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; background: #fff; border: 1px solid var(--bord); border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.12); padding: 6px; min-width: 230px; display: grid; }
.menu-item { text-align: left; background: none; border: none; font: inherit; padding: 9px 12px; border-radius: 8px; cursor: pointer; }
.menu-item:hover, .menu-item:focus-visible { background: #f4f1ea; }
.menu-item.danger { color: var(--rouge); }
.onglets { display: flex; gap: 4px; padding: 0 14px; border-bottom: 1px solid var(--bord); overflow-x: auto; }
.onglet { background: none; border: none; border-bottom: 2px solid transparent; font: inherit; font-size: 13.5px; font-weight: 600; color: #5f6b64; padding: 10px 8px; cursor: pointer; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.onglet.on { color: var(--vert); border-bottom-color: var(--accent); }
.onglet .n { font-size: 12px; font-weight: 600; background: #f0ede6; border-radius: 99px; padding: 1px 7px; }
.onglet .n.fini { background: #dcfce7; color: #15803d; }
.repli > summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; cursor: pointer; font-weight: 700; color: var(--vert); list-style: none; }
.repli > summary::-webkit-details-marker { display: none; }
.repli > summary::after { content: '▾'; color: #9aa39d; margin-left: 6px; transition: transform .15s; }
.repli[open] > summary::after { transform: rotate(180deg); }
.repli > summary > .small { margin-left: auto; font-weight: 500; }
.repli-corps { padding: 0 16px 16px; }
.repli .journal { border-top: 1px solid var(--bord); }
.lien.small { font-size: 12.5px; }
@media (max-width: 760px) {
  .reco { padding: 12px; } .reco-actions { width: 100%; } .reco-actions .btn { flex: 1 1 auto; justify-content: center; }
  .menu-liste { right: auto; left: 0; }
}
