/* =========================================================
   Prolib — feuille de style unique
   Les couleurs, polices et tailles se règlent dans :root
   ========================================================= */

:root {
  --ink: #0f2e33;          /* texte principal */
  --muted: #56696c;        /* texte secondaire */
  --green: #0b6e78;        /* boutons, liens */
  --green-dark: #083a42;   /* bandeau d'accueil, pied de page */
  --mint: #e0f0f1;         /* fonds doux */
  --bg: #f3f8f8;           /* fond de page */
  --paper: #ffffff;
  --line: #d3e3e5;
  --tag: #f6b54a;          /* étiquette d'entretien (échéances) */
  --tag-soft: #fdf3d7;
  --accent: #c74a0e;       /* boutons d'action (contraste 4,8 avec le blanc) */
  --accent-dark: #a63d0b;
  --red: #b8452f;          /* en retard */
  --red-soft: #f8e4df;

  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, sans-serif;

  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --wrap: 1180px;
}

[hidden] { display: none !important; }

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--green); }
a:hover { color: var(--green-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 .5em;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2rem, 4.4vw, 3.25rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.125rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--tag); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 1rem/1 var(--font-body);
  padding: 13px 20px;
  border-radius: var(--r-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-tag { background: var(--accent); color: #fff; }
.btn-tag:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--green); color: var(--green); }
.btn-light { background: #fff; color: var(--green-dark); }
.btn-sm { padding: 9px 14px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- En-tête ---------- */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo {
  display: flex; align-items: center; gap: 10px;
  font: 700 1.5rem/1 var(--font-display);
  color: var(--green-dark); text-decoration: none;
}
.logo-mark { width: 34px; height: 34px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--green); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; padding: 8px; cursor: pointer; }
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 20px 16px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 12px; }
}

/* ---------- Accueil : bandeau ---------- */
.hero { background: var(--green-dark); color: #fff; padding: 56px 0 72px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 36px; align-items: center; }
.hero h1 { color: #fff; max-width: 15ch; }
.hero-lead { font-size: 1.15rem; color: #cbe4e6; max-width: 46ch; margin-bottom: 28px; }
.hero-illu { display: flex; justify-content: flex-end; min-width: 0; }
.hero-illu img { width: min(560px, 100%); height: auto; display: block; }
@media (max-width: 960px) { .hero .wrap { grid-template-columns: 1fr; gap: 40px; } .hero-illu { justify-content: center; } .hero-illu img { max-width: 420px; } }

/* Barre de recherche */
.search {
  display: grid; grid-template-columns: 1.2fr 1fr auto;
  background: #fff; border-radius: var(--r-md); padding: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
  max-width: 680px;
}
.search label {
  display: flex; flex-direction: column; justify-content: center;
  padding: 8px 14px; color: var(--ink);
}
.search label + label { border-left: 1px solid var(--line); }
.search span { font-size: .78rem; font-weight: 600; color: var(--muted); }
.search input, .search select {
  border: 0; outline: 0; padding: 4px 0 2px;
  font: 500 1rem var(--font-body); color: var(--ink); background: transparent; width: 100%;
}
.search .btn { border-radius: 8px; padding: 0 26px; }
@media (max-width: 640px) {
  .search { grid-template-columns: 1fr; }
  .search label + label { border-left: 0; border-top: 1px solid var(--line); }
  .search .btn { padding: 14px; margin-top: 6px; }
}
.hero-quick { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.hero-quick a {
  color: #fff; text-decoration: none; font-size: .9rem;
  border: 1px solid rgba(255, 255, 255, .3); padding: 6px 12px; border-radius: 99px;
}
.hero-quick a:hover { background: rgba(255, 255, 255, .1); }

/* Carnet d'entretien : l'élément signature */
.carnet {
  background: var(--paper); color: var(--ink);
  border-radius: var(--r-lg); padding: 22px 22px 10px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
  position: relative;
}
.carnet::before {   /* reliure du carnet */
  content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 6px;
  background: repeating-linear-gradient(to bottom, var(--tag) 0 10px, transparent 10px 18px);
  border-radius: 0 3px 3px 0;
}
.carnet-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.carnet-head h3 { margin: 0; font-size: 1.1rem; }
.carnet-head p { margin: 0; font-size: .85rem; color: var(--muted); }
.equip { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.equip-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--mint); display: grid; place-items: center; color: var(--green); }
.equip-icon svg { width: 22px; height: 22px; }
.equip strong { display: block; font-weight: 600; }
.equip small { color: var(--muted); font-size: .82rem; }

/* Étiquettes d'échéance */
.due {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .8rem; font-weight: 600; white-space: nowrap;
  padding: 4px 10px; border-radius: 4px;
  background: var(--tag-soft); color: #7a5a06;
  border-left: 4px solid var(--tag);
}
.due.ok { background: var(--mint); color: var(--green-dark); border-left-color: var(--green); }
.due.late { background: var(--red-soft); color: var(--red); border-left-color: var(--red); }
.due.booked { background: #e8eef9; color: #2a4a8a; border-left-color: #5b7fc7; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head p { color: var(--muted); font-size: 1.05rem; }

/* Grille des services */
.services { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.service {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--r-md);
  text-decoration: none; color: var(--ink);
}
.service:hover { border-color: var(--green); color: var(--ink); }
.service .equip-icon { flex: none; }
.service strong { display: block; font-weight: 600; line-height: 1.25; }
.service small { color: var(--muted); }
.service .soon { font-size: .75rem; color: var(--muted); }

/* Étapes numérotées (vraies séquences uniquement) */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 28px; grid-template-columns: repeat(3, 1fr); counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding-top: 52px; }
.steps li::before {
  content: counter(s);
  position: absolute; top: 0; left: 0;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--green); color: #fff; font: 700 1.05rem var(--font-display);
}
.steps p { color: var(--muted); margin: 0; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* Parcours devis : frise */
.flow { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); counter-reset: f; }
.flow li { counter-increment: f; position: relative; padding: 52px 16px 0 0; }
.flow li::before {
  content: counter(f);
  position: absolute; top: 0; left: 0; z-index: 1;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--paper); border: 2px solid var(--green); color: var(--green);
  font: 700 1rem var(--font-display);
}
.flow li::after { content: ""; position: absolute; top: 17px; left: 36px; right: 0; height: 2px; background: var(--line); }
.flow li:last-child::after { display: none; }
.flow h4 { margin-bottom: 4px; }
.flow p { color: var(--muted); font-size: .92rem; margin: 0; }
@media (max-width: 900px) {
  .flow { grid-template-columns: 1fr; gap: 22px; }
  .flow li { padding: 0 0 0 54px; }
  .flow li::after { display: none; }
}

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; gap: 28px; } }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding: 12px 0 12px 34px; border-top: 1px solid var(--line); position: relative; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 14px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%230b6e78' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
}
.checklist strong { display: block; }
.checklist span { color: var(--muted); font-size: .92rem; }

/* Bandeau pros */
.pro-band { background: var(--green); color: #fff; border-radius: var(--r-lg); padding: 40px; display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; }
.pro-band h2 { color: #fff; }
.pro-band p { color: #d3e8ea; margin: 0; max-width: 60ch; }
@media (max-width: 760px) { .pro-band { grid-template-columns: 1fr; padding: 28px; } }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--green-dark); color: #b3cdd0; padding: 56px 0 28px; margin-top: 72px; font-size: .92rem; }
.site-footer a { color: #e0eef0; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer-grid h4 { color: #fff; font-size: 1rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .15); margin-top: 40px; padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Page de recherche ---------- */
.search-bar-page { background: var(--green-dark); padding: 20px 0; }
.search-bar-page .search { max-width: none; box-shadow: none; }
.results-layout { display: grid; grid-template-columns: 260px 1fr; gap: 28px; padding-top: 28px; padding-bottom: 28px; }
@media (max-width: 900px) { .results-layout { grid-template-columns: 1fr; } }
.filters { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; align-self: start; position: sticky; top: 88px; }
@media (max-width: 900px) { .filters { position: static; } }
.filters h3 { font-size: 1rem; }
.filters fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.filters legend { font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.filters label { display: flex; gap: 8px; align-items: center; padding: 4px 0; font-size: .95rem; cursor: pointer; }
.results-count { margin-bottom: 14px; }

.pro-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md);
  display: grid; grid-template-columns: 1fr 1.1fr; margin-bottom: 16px; overflow: hidden;
}
@media (max-width: 760px) { .pro-card { grid-template-columns: 1fr; } }
.pro-info { padding: 20px; display: flex; gap: 16px; }
.avatar {
  flex: none; width: 64px; height: 64px; border-radius: 14px;
  display: grid; place-items: center;
  font: 700 1.3rem var(--font-display); color: #fff; background: var(--green);
}
.avatar.lg { width: 96px; height: 96px; font-size: 2rem; border-radius: 20px; }
.pro-info h3 { margin: 0 0 2px; font-size: 1.15rem; }
.pro-info h3 a { color: var(--ink); text-decoration: none; }
.pro-info h3 a:hover { color: var(--green); }
.pro-meta { color: var(--muted); font-size: .9rem; margin: 0 0 8px; }
.stars { color: #b07d00; font-weight: 600; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.badge { font-size: .76rem; font-weight: 600; padding: 3px 8px; border-radius: 4px; background: var(--mint); color: var(--green-dark); }
.badge.alt { background: var(--tag-soft); color: #7a5a06; }
.price-line { font-size: .88rem; margin-top: 10px; color: var(--muted); }
.price-line strong { color: var(--ink); }

/* Créneaux */
.slots { border-left: 1px solid var(--line); padding: 16px; background: #fbfdfd; }
@media (max-width: 760px) { .slots { border-left: 0; border-top: 1px solid var(--line); } }
.slot-days { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.slot-day { text-align: center; }
.slot-day b { display: block; font-size: .85rem; }
.slot-day small { display: block; color: var(--muted); font-size: .78rem; margin-bottom: 6px; }
.slot {
  display: block; width: 100%; margin-bottom: 6px; text-align: center; text-decoration: none;
  border: 0; border-radius: var(--r-sm); padding: 8px 0;
  font: 600 .88rem var(--font-body);
  background: var(--mint); color: var(--green-dark); cursor: pointer;
}
.slot:hover { background: var(--green); color: #fff; }
.slot.selected { background: var(--green); color: #fff; }
.slot-none { display: block; font-size: .8rem; color: var(--muted); padding: 8px 0; }
.slots .more { margin-top: 6px; font-size: .88rem; }

/* ---------- Fiche artisan ---------- */
.pro-hero { background: var(--paper); border-bottom: 1px solid var(--line); padding: 28px 0; }
.pro-hero .wrap { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.pro-hero h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 4px; }
.pro-layout { display: grid; grid-template-columns: 1fr 400px; gap: 28px; padding-top: 28px; padding-bottom: 28px; align-items: start; }
@media (max-width: 980px) { .pro-layout { grid-template-columns: 1fr; } }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px; margin-bottom: 18px; }
.card h2 { font-size: 1.3rem; }
.card > :last-child { margin-bottom: 0; }

table.tarifs { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.tarifs th, table.tarifs td { text-align: left; padding: 10px 8px; border-top: 1px solid var(--line); vertical-align: top; }
table.tarifs th { font-weight: 600; }
table.tarifs td.num { text-align: right; white-space: nowrap; font-weight: 600; }

.review { border-top: 1px solid var(--line); padding: 14px 0; }
.review p { margin: 4px 0 0; }

/* Module de réservation */
.booking { position: sticky; top: 88px; }
.booking .card { padding: 0; overflow: hidden; }
.booking-head { background: var(--green); color: #fff; padding: 16px 20px; }
.booking-head h2 { color: #fff; margin: 0; font-size: 1.15rem; }
.booking-head p { margin: 2px 0 0; color: #d3e8ea; font-size: .88rem; }
.booking-body { padding: 18px 20px 20px; }
.booking-step { margin-bottom: 18px; }
.booking-step > h3 { font-size: 1rem; margin-bottom: 10px; }
.motif {
  display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start;
  border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 12px; margin-bottom: 8px; cursor: pointer;
}
.motif:hover { border-color: var(--green); }
.motif input { margin-top: 4px; accent-color: var(--green); }
.motif strong { display: block; font-size: .95rem; }
.motif small { color: var(--muted); display: block; font-size: .82rem; }
.motif .p { font-weight: 700; white-space: nowrap; }
.motif:has(input:checked) { border-color: var(--green); background: #eef7f8; }
.kind { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 7px; border-radius: 3px; margin-top: 5px; }
.kind.forfait { background: var(--mint); color: var(--green-dark); }
.kind.devis { background: var(--tag-soft); color: #7a5a06; }

.notice { font-size: .86rem; background: var(--tag-soft); border-left: 4px solid var(--tag); padding: 10px 12px; border-radius: 4px; margin: 10px 0; }
.notice.info { background: var(--mint); border-left-color: var(--green); }

.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.field input[type=text], .field input[type=email], .field input[type=tel], .field input[type=password], .field input[type=number], .field input[type=date],
.field select, .field textarea {
  width: 100%; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: var(--r-sm);
  font: 1rem var(--font-body); color: var(--ink); background: #fff;
}
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green); outline: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; margin: 10px 0; cursor: pointer; }
.check input { margin-top: 4px; accent-color: var(--green); width: 18px; height: 18px; flex: none; }

/* ---------- Espace client ---------- */
.page-head { background: var(--paper); border-bottom: 1px solid var(--line); padding: 28px 0 0; }
.page-head h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.tabs { display: flex; gap: 4px; overflow-x: auto; margin-top: 18px; }
.tab {
  background: none; border: 0; border-bottom: 3px solid transparent;
  padding: 12px 16px; font: 600 1rem var(--font-body); color: var(--muted); cursor: pointer; white-space: nowrap;
}
.tab[aria-selected="true"] { color: var(--green-dark); border-bottom-color: var(--green); }
.tab .count { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px; border-radius: 99px; background: var(--tag); color: var(--ink); font-size: .78rem; }
.panel { padding: 28px 0; }
.panel[hidden] { display: none; }

.rdv { display: grid; grid-template-columns: 84px 1fr auto; gap: 18px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; margin-bottom: 12px; }
@media (max-width: 640px) { .rdv { grid-template-columns: 70px 1fr; } .rdv .actions { grid-column: 1 / -1; } }
.rdv-date { text-align: center; border-right: 1px solid var(--line); padding-right: 14px; }
.rdv-date b { display: block; font: 700 1.8rem/1 var(--font-display); }
.rdv-date small { text-transform: capitalize; color: var(--muted); }
.rdv h3 { margin: 0 0 2px; font-size: 1.05rem; }
.rdv p { margin: 0; color: var(--muted); font-size: .92rem; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* Dossier de travaux */
.dossier { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 18px; overflow: hidden; }
.dossier-head { padding: 18px 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; border-bottom: 1px solid var(--line); }
.dossier-head h3 { margin: 0 0 4px; }
.dossier-head p { margin: 0; color: var(--muted); font-size: .92rem; }
.track { list-style: none; margin: 0; padding: 20px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; }
.track li { position: relative; padding: 30px 10px 0 0; font-size: .88rem; }
.track li::before { content: ""; position: absolute; top: 6px; left: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); border: 2px solid var(--line); z-index: 1; }
.track li::after { content: ""; position: absolute; top: 12px; left: 14px; right: 0; height: 2px; background: var(--line); }
.track li:last-child::after { display: none; }
.track li.done::before { background: var(--green); border-color: var(--green); }
.track li.done::after { background: var(--green); }
.track li.current::before { background: var(--tag); border-color: #c99a1f; box-shadow: 0 0 0 4px var(--tag-soft); }
.track b { display: block; font-weight: 600; }
.track small { color: var(--muted); }
@media (max-width: 760px) {
  .track { grid-template-columns: 1fr; gap: 14px; }
  .track li { padding: 0 0 0 28px; }
  .track li::before { top: 3px; }
  .track li::after { display: none; }
}
.dossier-actions { padding: 14px 20px; background: #fbfdfd; border-top: 1px solid var(--line); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.dossier-actions .spacer { flex: 1; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }

.doc-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.doc-row svg { width: 28px; height: 28px; color: var(--green); flex: none; }
.doc-row div { flex: 1; }
.doc-row small { color: var(--muted); display: block; }

.empty { text-align: center; padding: 36px 20px; color: var(--muted); background: var(--paper); border: 1px dashed var(--line); border-radius: var(--r-md); }

/* ---------- Devis ---------- */
.devis-sheet { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 32px; }
@media (max-width: 640px) { .devis-sheet { padding: 20px; } }
.devis-top { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.devis-top h1 { font-size: 1.7rem; margin-bottom: 2px; }
.devis-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; font-size: .92rem; }
@media (max-width: 640px) { .devis-parties { grid-template-columns: 1fr; } }
.devis-parties h4 { font-size: .9rem; color: var(--muted); font-family: var(--font-body); margin-bottom: 4px; }
.devis-parties p { margin: 0; }
table.lines { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.lines th { text-align: left; font-weight: 600; font-size: .82rem; color: var(--muted); padding: 8px; border-bottom: 2px solid var(--ink); }
table.lines td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.lines .num { text-align: right; white-space: nowrap; }
table.lines tr.group td { background: var(--bg); font-weight: 600; font-size: .85rem; }
.totals { margin-left: auto; max-width: 320px; margin-top: 16px; font-size: .95rem; }
.totals div { display: flex; justify-content: space-between; padding: 6px 0; }
.totals .grand { border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 10px; font: 700 1.2rem var(--font-display); }
.mentions { font-size: .84rem; color: var(--muted); margin-top: 24px; border-top: 1px solid var(--line); padding-top: 16px; }
.mentions p { margin-bottom: .6em; }
.devis-layout { display: grid; grid-template-columns: 1fr 360px; gap: 28px; padding-top: 28px; padding-bottom: 28px; align-items: start; }
@media (max-width: 980px) { .devis-layout { grid-template-columns: 1fr; } }
.sign-box { position: sticky; top: 88px; }
.status-pill { display: inline-block; font-size: .8rem; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: var(--tag-soft); color: #7a5a06; }
.status-pill.ok { background: var(--mint); color: var(--green-dark); }

/* ---------- Espace pro ---------- */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px) { .pricing { grid-template-columns: 1fr; } }
.plan { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 26px; display: flex; flex-direction: column; }
.plan.featured { border: 2px solid var(--green); }
.plan .amount { font: 700 2.4rem/1 var(--font-display); margin: 8px 0 2px; }
.plan ul { padding-left: 18px; margin: 16px 0 22px; flex: 1; }
.plan li { margin-bottom: 6px; }

.agenda-day { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); }
.agenda-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; padding: 14px 18px; border-top: 1px solid var(--line); align-items: center; }
.agenda-item:first-of-type { border-top: 0; }
.agenda-item time { font-weight: 700; }
.agenda-item p { margin: 0; font-size: .9rem; color: var(--muted); }
.sector { font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 3px; background: #e8eef9; color: #2a4a8a; }

.line-editor { width: 100%; border-collapse: collapse; font-size: .92rem; }
.line-editor th { text-align: left; font-size: .8rem; color: var(--muted); padding: 6px; }
.line-editor td { padding: 4px; }
.line-editor input, .line-editor select { width: 100%; padding: 8px; border: 1.5px solid var(--line); border-radius: var(--r-sm); font: .92rem var(--font-body); }
.line-editor td.num { text-align: right; font-weight: 600; white-space: nowrap; }
.line-editor button.rm { background: none; border: 0; color: var(--red); cursor: pointer; font-size: 1.2rem; }

.day-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.day-picks label { border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 8px 12px; cursor: pointer; font-size: .9rem; }
.day-picks label:has(input:checked) { border-color: var(--green); background: #eef7f8; }
.day-picks input { accent-color: var(--green); margin-right: 6px; }

/* ---------- Fenêtre modale et toast ---------- */
dialog {
  border: 0; border-radius: var(--r-lg); padding: 0; width: min(560px, calc(100% - 32px));
  box-shadow: 0 30px 80px rgba(0, 0, 0, .3); color: var(--ink);
}
dialog::backdrop { background: rgba(18, 63, 53, .55); }
.dialog-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.dialog-head h2 { font-size: 1.2rem; margin: 0; }
.dialog-body { padding: 20px 22px; max-height: 70vh; overflow-y: auto; }
.dialog-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.close-x { background: none; border: 0; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--muted); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%);
  background: var(--ink); color: #fff; padding: 14px 20px; border-radius: var(--r-md);
  font-weight: 500; z-index: 100; transition: transform .25s ease; max-width: calc(100% - 32px);
}
.toast.show { transform: translate(-50%, 0); }

.demo-banner { background: var(--tag-soft); border-bottom: 1px solid #ecd9a0; font-size: .85rem; text-align: center; padding: 8px 16px; color: #6b4f05; }
.demo-banner button { background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }

/* Le bouton du menu garde son texte blanc */
.nav a.btn-primary, .nav a.btn-primary:hover { color: #fff; }
.tab .count[hidden] { display: none; }
.equip-row { grid-template-columns: 40px 1fr auto auto; }
.equip > div { min-width: 0; }
@media (max-width: 640px) {
  .equip-row { grid-template-columns: 40px 1fr; row-gap: 8px; }
  .equip-row .due, .equip-row .btn { grid-column: 2; justify-self: start; }
}
.two-col > * { min-width: 0; }
.pro-cols { grid-template-columns: .9fr 1.1fr; }
@media (max-width: 860px) { .pro-cols { grid-template-columns: 1fr; } }

/* ---------- Comptes : inscription et connexion ---------- */
.auth { max-width: 600px; padding-top: 40px; padding-bottom: 20px; }
.auth h1 { font-size: clamp(1.7rem, 3vw, 2.2rem); }
.auth .card { padding: 26px; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md); padding: 5px; margin-bottom: 20px; }
.segmented label { text-align: center; padding: 10px; border-radius: 8px; cursor: pointer; font-weight: 600; color: var(--muted); }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label:has(input:checked) { background: var(--paper); color: var(--green-dark); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.segmented label:has(input:focus-visible) { outline: 3px solid var(--tag); }
.field-err { color: var(--red); font-size: .85rem; margin: 6px 0 0; }
[aria-invalid="true"] { border-color: var(--red) !important; }
.form-msg { background: var(--red-soft); color: var(--red); border-radius: var(--r-sm); padding: 10px 12px; font-size: .92rem; }
.form-msg[hidden] { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.demo-banner a { color: inherit; font-weight: 600; }
.prose { max-width: 72ch; }
.prose h2 { font-size: 1.3rem; margin-top: 1.6em; }

/* ---------- Communes : liste de suggestions ---------- */
.ac-wrap { position: relative; }
.ac-list {
  position: absolute; z-index: 60; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 4px;
  list-style: none; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-sm);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .15); color: var(--ink);
}
.ac-list[hidden] { display: none; }
.ac-list li { padding: 9px 10px; border-radius: 4px; cursor: pointer; font-size: .95rem; }
.ac-list li span { color: var(--muted); margin-left: 6px; font-size: .85rem; }
.ac-list li:hover, .ac-list li[aria-selected="true"] { background: var(--mint); }
.search .ac-list { left: -6px; right: -6px; }

/* ---------- Résultats ---------- */
.badge.credit { background: #e8eef9; color: #2a4a8a; }
.slots-info { display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.slots-info p { margin: 0; }
.slots-info .btn { align-self: flex-start; }
.sep-exemples { font-size: 1.15rem; margin: 32px 0 10px; padding-top: 22px; border-top: 1px solid var(--line); }
.pro-card.exemple { opacity: .92; }

/* ---------- Fiche publique de l'artisan (espace pro) ---------- */
.profil-pro { margin-bottom: 48px; }
.profil-pro[hidden] { display: none; }
fieldset.bloc { border: 0; border-top: 1px solid var(--line); padding: 18px 0 6px; margin: 0; }
fieldset.bloc:first-of-type { border-top: 0; padding-top: 0; }
fieldset.bloc legend { font: 600 1.05rem var(--font-display); padding: 0 0 10px; }
.choix-services { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 16px; }
.choix-services .check { margin: 6px 0; }
.modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 6px 0 14px; }
@media (max-width: 760px) { .modes { grid-template-columns: 1fr 1fr; } }
.modes label { display: flex; gap: 8px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 10px; cursor: pointer; }
.modes label:has(input:checked) { border-color: var(--green); background: #eef7f8; }
.modes input { accent-color: var(--green); margin-top: 3px; }
.modes strong { display: block; font-size: .92rem; }
.modes small { display: block; color: var(--muted); font-size: .8rem; }
.mode-detail[hidden] { display: none; }
.zones-table { border-collapse: collapse; }
.zones-table th { text-align: left; font-size: .82rem; color: var(--muted); padding: 4px 8px 4px 0; }
.zones-table td { padding: 3px 8px 3px 0; }
.zones-table input { width: 110px; padding: 8px; border: 1.5px solid var(--line); border-radius: var(--r-sm); font: inherit; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 640px) { .grid-3 { grid-template-columns: 1fr; } }
.apercu-frais { background: var(--bg); border-radius: var(--r-sm); padding: 12px 14px; margin: 10px 0 8px; }
.apercu-ligne { display: flex; flex-wrap: wrap; gap: 8px; }
.apercu-ligne span { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; font-size: .9rem; }
.apercu-ligne b { display: block; font-size: .78rem; color: var(--muted); font-weight: 600; }
#pf-avance-wrap[hidden], #pf-devis-prix-wrap[hidden] { display: none; }
#mon-profil { scroll-margin-top: 90px; }

.results-layout > *, .pro-layout > *, .devis-layout > * { min-width: 0; }

/* ---------- Bloc frais de déplacement ---------- */
.modes.modes-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .modes.modes-3 { grid-template-columns: 1fr; } }
.fb-detail[hidden], .fb-rayon[hidden], .fb-offert[hidden], .apercu-frais[hidden] { display: none; }
.fb-zones { display: grid; gap: 8px; margin-bottom: 10px; }
.fb-zone { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fb-zone span { font-size: .95rem; white-space: nowrap; }
.fb-zone input { width: 90px; padding: 9px 10px; border: 1.5px solid var(--line); border-radius: var(--r-sm); font: inherit; }
.fb-zone input:focus { border-color: var(--green); outline: none; }
.fb-zone .rm { background: none; border: 0; color: var(--red); font-size: 1.3rem; line-height: 1; cursor: pointer; padding: 4px 8px; }
.bloc-inscription { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 4px; }
.bloc-inscription legend { padding-top: 8px; }
@media (max-width: 480px) {
  .fb-zone { gap: 6px; flex-wrap: nowrap; }
  .fb-zone input { width: 64px; padding: 8px; }
  .fb-zone span { font-size: .88rem; }
}

/* ---------- Agenda en ligne ---------- */
.lien { background: none; border: 0; padding: 0; color: var(--green); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.rdv.annule { opacity: .7; }
.rdv.annule h3 { text-decoration: line-through; }
.rdv.nouveau { border-color: var(--green); box-shadow: 0 0 0 2px var(--mint); }
.rdv p + p { margin-top: 2px; }
.agenda-day-head { padding: 12px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; }
.agenda-day-head strong::first-letter { text-transform: uppercase; }
.agenda-item time small { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; }
.agenda-item.annule { opacity: .65; }
.agenda-item p + p { margin-top: 2px; }
.profil-pro + .profil-pro { margin-top: 48px; }
details.anciens { margin-top: 18px; }
details.anciens summary { cursor: pointer; font-weight: 600; margin-bottom: 10px; }
.page-head .tabs a.tab { text-decoration: none; }
.ag-actif { padding: 12px 14px; background: var(--mint); border-radius: var(--r-sm); margin: 0 0 18px; }
.ag-jour { display: grid; grid-template-columns: 140px 1fr; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.ag-jour .check { margin: 0; }
.ag-plages { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.ag-plages.ferme { opacity: .35; pointer-events: none; }
.ag-plage { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ag-plage input, .ag-absence input { padding: 7px 8px; border: 1.5px solid var(--line); border-radius: var(--r-sm); font: .92rem var(--font-body); }
.ag-absence { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 10px; }
.ag-absence label { display: inline-flex; gap: 6px; align-items: center; font-size: .9rem; }
.ag-absence .ab-m { flex: 1 1 180px; }
.ag-absence .rm { background: none; border: 0; color: var(--red); cursor: pointer; font-size: 1.3rem; }
@media (max-width: 560px) { .ag-jour { grid-template-columns: 1fr; } }
.empty.attente form { max-width: 420px; margin: 16px auto 0; text-align: left; }
.prose h2 { margin-top: 28px; }
.prose li { margin-bottom: 6px; }
.booking { position: static; }

/* ---------- Rappels chauffage ---------- */
.compteur-rappels { display: inline-block; background: var(--mint); border-radius: 999px; padding: 6px 14px; font-size: .88rem; font-weight: 600; margin: 4px 0 14px; }
#pro-chauffage .tarifs { margin-top: 4px; }
.explication-pro { background: var(--mint); border-radius: var(--r-sm); padding: 18px 20px; margin-bottom: 16px; }
.explication-pro h2 { font-size: 1.1rem; margin: 0 0 8px; }
.explication-pro ol { margin: 0 0 14px; padding-left: 20px; }
.explication-pro li { margin-bottom: 8px; font-size: .95rem; }
.pfc { border-top: 1px solid var(--line); padding: 10px 0 4px; }
.pfc h4 { margin: 0 0 8px; font-size: .95rem; }
.fourchette-ligne { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; font-size: .92rem; }
.fourchette-nom { min-width: 220px; }
.fourchette-ligne input { width: 110px; padding: 7px 8px; border: 1.5px solid var(--line); border-radius: var(--r-sm); font: .92rem var(--font-body); }
@media (max-width: 560px) { .fourchette-nom { min-width: 100%; } }
.service .prix-depuis { color: var(--green); font-weight: 600; }
.bloc-inscription .fourchette-nom { min-width: 100%; margin-bottom: -2px; }

/* ---------- Barre d'onglets en bas de l'écran (téléphone) ---------- */
.onglets, .feuille-compte { display: none; }
@media (max-width: 820px) {
  .nav-toggle, .nav { display: none !important; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .onglets {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 96;
    background: var(--paper); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 16px rgba(8, 58, 66, .06);
  }
  .onglets a, .onglets button {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 4px 2px; min-height: 52px; justify-content: center;
    background: none; border: 0; cursor: pointer;
    color: var(--muted); text-decoration: none; font: 600 .7rem/1.1 var(--font-body);
    -webkit-tap-highlight-color: transparent;
  }
  .onglets svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .onglets [aria-current="page"], .onglets [aria-expanded="true"] { color: var(--green); }
  .onglets [aria-current="page"] svg { stroke-width: 2.3; }
  .onglets [aria-current="page"]::before {
    content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--green);
  }
  .onglets a, .onglets button { position: relative; }
  .toast { bottom: calc(80px + env(safe-area-inset-bottom)); }

  .feuille-compte:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 95; }
  .feuille-fond { position: absolute; inset: 0; background: rgba(8, 30, 34, .45); }
  .feuille {
    position: absolute; left: 0; right: 0; bottom: 0;
    background: var(--paper); border-radius: 18px 18px 0 0;
    padding: 10px 20px calc(84px + env(safe-area-inset-bottom));
    animation: feuille-monte .2s ease-out;
  }
  .feuille-poignee { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 18px; }
  .feuille-liens { display: grid; gap: 10px; }
  .feuille-nom { margin: 0 0 4px; font: 700 1.15rem var(--font-display); color: var(--ink); }
  .feuille-lien { display: block; padding: 12px 0; color: var(--green); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--line); }
  .feuille-bas { margin-top: 18px; font-size: .82rem; color: var(--muted); }
  .feuille-bas a { color: var(--muted); }
  html.feuille-ouverte { overflow: hidden; }
}
@keyframes feuille-monte { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .feuille { animation: none; } }

/* ---------- Assistant IA ---------- */
.ia-bulle {
  position: fixed; right: 24px; bottom: 24px; z-index: 92;
  width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--green); color: #fff; box-shadow: 0 8px 24px rgba(8, 58, 66, .3);
  display: grid; place-items: center; transition: transform .15s ease;
}
.ia-bulle:hover { transform: scale(1.05); }
.ia-bulle svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.ia-bulle[aria-expanded="true"] { display: none; }
.ia-panneau:not([hidden]) {
  position: fixed; right: 24px; bottom: 24px; z-index: 93;
  width: 380px; max-width: calc(100vw - 32px); height: 560px; max-height: calc(100vh - 48px);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 48px rgba(8, 58, 66, .25);
}
.ia-tete { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--green-dark); color: #fff; }
.ia-tete div { flex: 1; display: grid; }
.ia-tete span { font-size: .75rem; color: #cbe4e6; }
.ia-fermer { background: none; border: 0; color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 4px; }
.ia-fil { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.ia-msg { max-width: 86%; padding: 10px 13px; border-radius: 14px; font-size: .92rem; line-height: 1.45; overflow-wrap: anywhere; }
.ia-assistant { align-self: flex-start; background: var(--paper); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.ia-user { align-self: flex-end; background: var(--green); color: #fff; border-bottom-right-radius: 4px; }
.ia-assistant a { color: var(--green); font-weight: 600; }
.ia-attente { display: flex; gap: 4px; padding: 14px; }
.ia-attente span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: ia-point 1s infinite ease-in-out; }
.ia-attente span:nth-child(2) { animation-delay: .15s; } .ia-attente span:nth-child(3) { animation-delay: .3s; }
@keyframes ia-point { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.ia-suggestions { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px; background: var(--bg); }
.ia-suggestions:not(:empty) { padding-bottom: 12px; }
.ia-suggestions .chip {
  border: 1px solid var(--line); background: var(--paper); color: var(--green); border-radius: 99px;
  padding: 6px 12px; font: 600 .8rem var(--font-body); cursor: pointer;
}
.ia-saisie { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--paper); }
.ia-saisie input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; font: inherit; font-size: 16px; }
.ia-saisie input:focus { outline: 2px solid var(--green); outline-offset: -1px; }
@media (max-width: 820px) {
  .ia-bulle { right: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); width: 52px; height: 52px; }
  .ia-panneau:not([hidden]) {
    left: 0; right: 0; top: 0; bottom: calc(64px + env(safe-area-inset-bottom));
    width: auto; max-width: none; height: auto; max-height: none; border-radius: 0; border: 0;
  }
  html.ia-ouvert { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) { .ia-attente span { animation: none; opacity: .6; } }

/* ---------- Page « Décrivez votre problème » ---------- */
.notice.warn { background: var(--red-soft); border-left-color: var(--red); color: var(--ink); }
.diag { background: var(--bg); padding: 40px 0 56px; }
.diag-wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.diag h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); margin: 0 0 6px; }
.diag-intro { color: var(--muted); margin: 0 0 12px; font-size: 1.05rem; }
.diag-contexte { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.diag-contexte:empty { display: none; }
.diag-contexte span { background: var(--mint); color: var(--green-dark); font-weight: 600; font-size: .85rem; padding: 4px 10px; border-radius: 99px; }
.diag-chat { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 6px 24px rgba(8, 58, 66, .06); }
.diag-fil { display: flex; flex-direction: column; gap: 10px; padding: 20px; max-height: 52vh; overflow-y: auto; }
.diag-msg { max-width: 85%; padding: 11px 14px; border-radius: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.diag-assistant { align-self: flex-start; background: var(--bg); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.diag-user { align-self: flex-end; background: var(--green); color: #fff; border-bottom-right-radius: 4px; }
.diag-assistant a { color: var(--green); font-weight: 600; }
.diag-choix { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 20px; }
.diag-choix:not(:empty) { padding-bottom: 16px; }
.diag-choix .chip {
  border: 1.5px solid var(--green); background: var(--paper); color: var(--green); border-radius: 99px;
  padding: 8px 14px; font: 600 .9rem var(--font-body); cursor: pointer;
}
.diag-choix .chip:hover { background: var(--mint); }
.diag-saisie { display: flex; gap: 10px; align-items: flex-end; padding: 14px; border-top: 1px solid var(--line); }
.diag-saisie[hidden] { display: none; }
.diag-saisie textarea { flex: 1; min-width: 0; resize: none; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 16px; line-height: 1.4; }
.diag-saisie textarea:focus { outline: 2px solid var(--green); outline-offset: -1px; border-color: transparent; }
.diag-note { margin: 0; padding: 0 16px 12px; font-size: .78rem; color: var(--muted); }
.diag-resultat { margin-top: 28px; scroll-margin-top: 96px; }
.diag-synthese { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; }
.diag-synthese h2 { font-size: 1.3rem; margin: 10px 0 6px; }
.diag-synthese p { margin: 0 0 4px; }
.urgence { display: inline-block; font-size: .8rem; font-weight: 700; padding: 4px 10px; border-radius: 99px; }
.urgence.urgent { background: var(--red-soft); color: var(--red); }
.urgence.rapide { background: var(--tag-soft); color: #7a5a06; }
.urgence.planifie { background: var(--mint); color: var(--green-dark); }
.diag-titre-pros { font-size: 1.1rem; margin: 24px 0 12px; }
.diag-pro .avatar { width: 48px; height: 48px; font-size: 1rem; border-radius: 12px; }
.diag-pro { display: grid; grid-template-columns: 48px 1fr auto; gap: 14px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 10px; }
.diag-pro h4 { margin: 0 0 2px; font-size: 1.02rem; }
.diag-pro h4 a { color: var(--ink); text-decoration: none; }
.diag-pro-info p { margin: 0 0 6px; color: var(--muted); font-size: .88rem; }
.diag-pro-action { display: grid; justify-items: end; gap: 4px; text-align: right; }
.diag-pro-action small { font-size: .78rem; color: var(--muted); }
.diag-pro-action small a, .diag-ou { color: var(--green); font-size: .82rem; }
.diag-tous { text-align: center; margin: 14px 0 0; }
.diag-bas { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin: 18px 0 0; font-size: .9rem; }
.diag-bas a, .diag-bas .lien { color: var(--muted); }
.lien { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; cursor: pointer; }
@media (max-width: 640px) {
  .diag { padding: 24px 0 40px; }
  .diag-wrap { padding: 0 16px; }
  .diag-fil { padding: 16px; max-height: none; }
  .diag-pro { grid-template-columns: 40px 1fr; }
  .diag-pro .avatar { width: 40px; height: 40px; }
  .diag-pro-action { grid-column: 1 / -1; justify-items: stretch; text-align: left; }
  .diag-pro-action .btn { width: 100%; }
}

/* ---------- Tranches horaires : grille de la fiche artisan ---------- */
.tr-grille { display: grid; gap: 6px; align-items: center; }
.tr-jour { text-align: center; }
.tr-jour b { display: block; font-size: .82rem; text-transform: capitalize; }
.tr-jour small { display: block; color: var(--muted); font-size: .74rem; }
.tr-nom { font-size: .8rem; font-weight: 600; white-space: nowrap; padding-right: 4px; }
.tr-nom small { display: block; color: var(--accent); font-weight: 700; font-size: .72rem; }
.tr-grille .slot { margin: 0; text-align: center; text-decoration: none; padding: 7px 2px; font-size: .8rem; }
.tr-grille .slot-none { text-align: center; padding: 7px 0; }
.slot.soir { background: #fbe9df; color: var(--accent-dark); }
.slot.soir:hover { background: var(--accent); color: #fff; }
.tr-prochaines { display: grid; gap: 6px; }
.tr-prochaines .slot { margin: 0; text-decoration: none; text-align: center; }
.tarifs th small { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; margin-top: 2px; }
.pastille { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 99px; background: var(--accent); color: #fff; font-size: .78rem; text-align: center; }
.pastille[hidden] { display: none; }
.label { display: block; font-weight: 600; font-size: .9rem; margin: 0 0 4px; }
.sous-titre { font-size: 1rem; margin: 0 0 10px; color: var(--muted); }
.bandeau-prix { max-width: 760px; margin: 28px auto 0; text-align: center; font-size: .95rem; }

/* ---------- Villes et agglomérations (sélection multiple) ---------- */
.zones-bloc input[type=text] { width: 100%; }
.zones-choisies { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 8px; }
.zones-choisies:empty { display: none; }
.zones-choisies li { display: inline-flex; align-items: center; gap: 4px; background: var(--green); color: #fff; border-radius: 99px; padding: 5px 6px 5px 12px; font-size: .88rem; font-weight: 600; }
.zones-choisies small { font-weight: 400; opacity: .85; margin-left: 2px; }
.zones-choisies button { background: rgba(255, 255, 255, .2); border: 0; color: #fff; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; font-size: 1rem; line-height: 1; }
.zones-choisies button:hover { background: rgba(255, 255, 255, .4); }
.zones-suggestions { margin: 8px 0 0; font-size: .86rem; color: var(--muted); }
.zones-suggestions[hidden] { display: none; }
.chip { border: 1.5px solid var(--line); background: var(--paper); color: var(--green); border-radius: 99px; padding: 5px 11px; font: 600 .82rem var(--font-body); cursor: pointer; }
.chip:hover { background: var(--mint); }
.chip small { font-weight: 400; color: var(--muted); }
.chip.choisie { background: var(--green); border-color: var(--green); color: #fff; }
.chip.choisie small { color: #d3e8ea; }
.zones-catalogue { margin-top: 10px; font-size: .88rem; }
.zones-catalogue summary { cursor: pointer; color: var(--green); font-weight: 600; }
.zones-catalogue-liste { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; max-height: 220px; overflow-y: auto; padding: 2px; }

/* ---------- Questions de prix selon le métier ---------- */
.prix-metier h4 { margin: 10px 0 8px; font-size: 1rem; }
.prix-question { margin-bottom: 14px; }
.prix-question label { margin-bottom: 2px; }
.prix-question p { margin: 0 0 6px; }
.prix-saisie { display: inline-flex; align-items: center; gap: 8px; }
.prix-question .prix-saisie input { width: 140px; flex: none; }
.prix-saisie span { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.rdv-tranche { display: block; margin-top: 4px; font-size: .78rem; font-weight: 700; color: var(--green-dark); white-space: nowrap; }
#b-tranches .more { margin-top: 12px; }
#b-tranches { margin-bottom: 14px; }

/* ---------- Jours travaillés et clients par tranche ---------- */
.tr-label { font-weight: 600; font-size: .9rem; margin: 0 0 8px; }
.tr-jours { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tr-jours label { cursor: pointer; }
.tr-jours input { position: absolute; opacity: 0; pointer-events: none; }
.tr-jours span { display: inline-block; min-width: 46px; text-align: center; padding: 7px 8px; border: 1.5px solid var(--line); border-radius: 8px; font-weight: 600; font-size: .88rem; color: var(--muted); }
.tr-jours input:checked + span { background: var(--green); border-color: var(--green); color: #fff; }
.tr-jours input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }
.tr-tranches label.soir input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.tr-tranches small { font-weight: 700; opacity: .9; }
.tr-tranches label.soir span { border-color: var(--accent); color: var(--accent-dark); }
.cap-calc { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.cap-calc[hidden] { display: none; }
.cap-liste { display: flex; flex-wrap: wrap; gap: 8px; }
.cap-liste span { display: grid; justify-items: center; min-width: 92px; padding: 8px 10px; border-radius: 10px; background: var(--mint); color: var(--green-dark); font-size: .8rem; font-weight: 600; }
.cap-liste span b { font: 700 1.5rem/1.1 var(--font-display); }
.cap-liste span.soir { background: #fbe9df; color: var(--accent-dark); }

/* ---------- Où vous travaillez : point de départ, villes, rayon ---------- */
.etape-zone { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--paper); margin-bottom: 12px; }
.etape-zone > label, .etape-zone > .label { display: flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 600; margin: 0 0 4px; }
.pas { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--green); color: #fff; font: 700 .82rem var(--font-body); }
.aide { margin: 0 0 10px; }
.frais-villes { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.frais-villes[hidden] { display: none; }
.frais-villes label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.frais-villes input { width: 140px; }
.frais-villes p { margin: 6px 0 0; }
.choix-autour { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choix-autour label { cursor: pointer; }
.choix-autour input { position: absolute; opacity: 0; pointer-events: none; }
.choix-autour span { display: block; text-align: center; padding: 10px 8px; border: 1.5px solid var(--line); border-radius: 10px; font-weight: 600; font-size: .9rem; color: var(--muted); }
.choix-autour input:checked + span { border-color: var(--green); background: var(--mint); color: var(--green-dark); }
.choix-autour input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }
@media (max-width: 520px) { .choix-autour { grid-template-columns: 1fr; } }

/* ---------- Page « Demander une intervention » ---------- */
.demande-page { background: var(--bg); padding: 36px 0 56px; }
.demande-wrap { max-width: 800px; margin: 0 auto; padding: 0 20px; }
.demande-page h1 { font-size: clamp(1.7rem, 4vw, 2.2rem); margin: 0 0 6px; }
.etape h2 { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; margin: 0 0 14px; }
.etape .num { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: #fff; font: 700 .95rem var(--font-body); flex: none; }
.dm-jours { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
.dm-jour { flex: none; width: 62px; padding: 8px 4px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper); cursor: pointer; text-align: center; font: inherit; color: var(--ink); }
.dm-jour b { display: block; font-size: .78rem; text-transform: capitalize; color: var(--muted); font-weight: 600; }
.dm-jour span { display: block; font: 700 1.3rem/1.1 var(--font-display); }
.dm-jour small { display: block; font-size: .74rem; color: var(--muted); }
.dm-jour:disabled { opacity: .4; cursor: not-allowed; }
.dm-jour.choisi { background: var(--green); border-color: var(--green); color: #fff; }
.dm-jour.choisi b, .dm-jour.choisi small { color: #d3e8ea; }
.dm-tranches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 6px; }
.dm-tranche { padding: 12px 6px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper); cursor: pointer; text-align: center; font: inherit; color: var(--ink); }
.dm-tranche b { display: block; font-size: .98rem; white-space: nowrap; }
.dm-tranche span { display: block; font-size: .78rem; color: var(--muted); margin-top: 2px; }
.dm-tranche em { display: inline-block; margin-top: 5px; font-style: normal; font-size: .72rem; font-weight: 700; color: var(--accent); background: #fbe9df; border-radius: 99px; padding: 2px 8px; }
.dm-tranche:hover:not(:disabled) { border-color: var(--green); }
.dm-tranche:disabled { opacity: .45; cursor: not-allowed; }
.dm-tranche.choisi { background: var(--green); border-color: var(--green); color: #fff; }
.dm-tranche.choisi span { color: #d3e8ea; }
.dm-tranche.choisi em { background: #fff; }
.dm-compteur { font-size: .85rem; font-weight: 600; color: var(--muted); margin: 0 0 8px; }
.dm-pro { display: grid; grid-template-columns: auto 48px 1fr; gap: 12px; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; cursor: pointer; background: var(--paper); }
.dm-pro input { width: 22px; height: 22px; accent-color: var(--green); }
.dm-pro .avatar { width: 48px; height: 48px; font-size: 1rem; border-radius: 12px; }
.dm-pro.choisi { border-color: var(--green); background: var(--mint); }
.dm-pro:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.dm-pro-info { display: grid; gap: 1px; font-size: .88rem; color: var(--muted); }
.dm-pro-info strong { color: var(--ink); font-size: 1rem; }
.dm-pro-info a { justify-self: start; color: var(--green); font-size: .82rem; }
.dm-prix { color: var(--ink); font-weight: 600; }
.dm-prix em { font-style: normal; font-weight: 700; color: var(--accent); font-size: .8rem; }
.diag-appel { background: var(--mint); border-radius: 14px; padding: 16px 18px; margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.diag-appel p { margin: 0; flex: 1 1 320px; }

/* ---------- Espace pro : demandes à traiter ; espace client : demandes en attente ---------- */
.demande-pro { display: grid; grid-template-columns: 96px 1fr auto; gap: 18px; align-items: start; background: var(--paper); border: 1.5px solid var(--accent); border-radius: var(--r-md); padding: 16px 18px; margin-bottom: 12px; }
.demande-quand { text-align: center; border-right: 1px solid var(--line); padding-right: 14px; }
.demande-quand b { display: block; font: 700 1.15rem/1.1 var(--font-display); text-transform: capitalize; }
.demande-quand small { display: block; color: var(--muted); text-transform: capitalize; }
.demande-quand span { display: inline-block; margin-top: 6px; background: var(--mint); color: var(--green-dark); border-radius: 6px; padding: 2px 6px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.demande-quoi h3 { margin: 0 0 2px; font-size: 1.05rem; }
.demande-quoi p { margin: 0 0 2px; color: var(--muted); font-size: .92rem; }
.demande-reponse { display: grid; gap: 8px; width: 250px; background: var(--bg); border-radius: 12px; padding: 14px; }
.demande-reponse .field { margin: 0; }
.demande-reponse label { font-size: .92rem; font-weight: 700; margin-bottom: 4px; }
.demande-reponse select { width: 100%; padding: 9px; font-size: 1rem; }
.demande-reponse small { display: block; margin-top: 3px; color: var(--muted); font-size: .76rem; line-height: 1.3; }
.demande-consigne { margin: 0; font-size: .85rem; color: var(--muted); }
.demande-fin { margin: 0; font-weight: 700; font-size: .9rem; color: var(--green-dark); }
.demande-jour { margin-top: 6px !important; color: var(--ink) !important; }
.kind.attente { background: #fbe9df; color: var(--accent-dark); }
.rdv.demande { border-style: dashed; }

@media (max-width: 720px) {
  .dm-tranches { grid-template-columns: 1fr 1fr; }
  .dm-tranche.soir { grid-column: 1 / -1; }
  .demande-pro { grid-template-columns: 1fr; gap: 12px; }
  .demande-reponse { width: auto; }
  .demande-quand { display: flex; align-items: baseline; gap: 8px; border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 10px; text-align: left; }
  .demande-quand span { margin: 0 0 0 auto; }
  .demande-page { padding: 24px 0 40px; }
  .demande-wrap { padding: 0 16px; }
  .tr-nom { white-space: normal; font-size: .74rem; }
}
