/* Charte « pratique » (2026-11-05) : police Onest (texte et titres), fond blanc, bleu cobalt, logo « domindex. ».
   Texte courant 18 px, zones cliquables de 48 px, contraste AA. */

@font-face { font-family: "Onest"; src: url("/assets/fonts/Onest.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #FFFFFF; --surface: #FFFFFF; --tint: #F3F6FC; --ink: #0F1B3D; --muted: #4F5C7A; --line: #E1E6F0; --field: #7A87A8;
  --brand: #2450E6; --brand-dark: #1A3BB0; --brand-soft: #EEF2FF; --on-brand: #FFFFFF; --focus: #A9BCFF;
  --ai: #2450E6; --ai-bg: #EEF2FF; --warn: #7A4F00; --warn-bg: #FFEFCC; --grey: #4F5C7A; --grey-bg: #F0F2F7;
  --danger: #A12C1F; --danger-bg: #FCE8E5;
  --f-body: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-display: var(--f-body);
  --radius: 14px; --wrap: 1180px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.125rem/1.55 var(--f-body); }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.12; margin: 0 0 0.5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(1.85rem, 4.4vw, 3rem); font-weight: 750; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.6rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--brand); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--brand-dark); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; box-shadow: 0 0 0 6px var(--focus); border-radius: 4px; }
img, svg { max-width: 100%; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 24px; } }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #FFFFFF; padding: 12px 16px; z-index: 10; }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* En-tête et pied de page */
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 8px 24px; flex-wrap: wrap; min-height: 64px; padding-top: 8px; padding-bottom: 8px; }
.top .logo { font-family: var(--f-display); font-weight: 800; font-size: 1.6rem; letter-spacing: -0.035em; color: var(--ink); text-decoration: none; display: inline-flex; align-items: baseline; flex-wrap: wrap; min-height: 48px; padding-top: 6px; }
.top .logo .logo-point { color: var(--brand); }
.top .logo small { font-weight: 400; font-size: 0.85rem; letter-spacing: 0; color: var(--muted); margin-left: 10px; }
.top nav { display: flex; flex-wrap: wrap; gap: 0 20px; margin-left: auto; }
.top nav a { display: inline-flex; align-items: center; min-height: 48px; color: var(--ink); font-size: 1rem; font-weight: 500; text-decoration: none; }
.top nav a:hover { color: var(--brand); text-decoration: underline; }
.foot { margin-top: 56px; background: var(--tint); border-top: 1px solid var(--line); padding: 28px 0 36px; font-size: 1rem; color: var(--muted); }
.foot-in { display: grid; gap: 16px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.foot nav a { display: inline-flex; align-items: center; min-height: 48px; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 10px; border: 1.5px solid var(--brand); background: var(--brand); color: var(--on-brand); font: 600 1.05rem var(--f-body); text-decoration: none; cursor: pointer; text-align: center; }
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: var(--on-brand); }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: #C9D1E3; }
.btn.ghost:hover { background: var(--tint); border-color: var(--field); color: var(--ink); }
.btn.brand { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn.sm { min-height: 48px; padding: 0 16px; font-size: 1rem; }
.btn.big { min-height: 56px; font-size: 1.12rem; width: 100%; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); font-weight: 600; text-decoration: underline; cursor: pointer; min-height: 48px; }

/* Accueil */
.hero { background: var(--tint); border-bottom: 1px solid var(--line); padding: 52px 0 44px; }
.hero h1 { max-width: 20ch; }
.hero p.lead { font-size: 1.2rem; max-width: 54ch; color: #3A4766; }
/* Recherche : une seule barre, étiquettes dans les cases, bouton bleu à droite. */
.search { display: grid; gap: 0; background: var(--surface); border: 1px solid #D5DCEA; border-radius: 14px; padding: 8px; margin-top: 24px; box-shadow: 0 1px 2px rgba(15, 27, 61, 0.06); }
.search .field { gap: 2px; padding: 10px 14px; align-content: start; }
.search .field + .field { border-top: 1px solid var(--line); }
.search .field label { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.search input[type="text"], .search select { border: 0; min-height: 40px; padding: 0; font-weight: 500; background-color: transparent; }
.search select { padding-right: 36px; background-position: right 4px center; }
.search > .btn { margin-top: 8px; }
@media (min-width: 820px) {
  .search { grid-template-columns: 1.2fr 1fr auto; align-items: stretch; }
  .search .field + .field { border-top: 0; border-left: 1px solid var(--line); }
  .search > .btn { margin-top: 0; padding: 0 30px; }
}
.field { display: grid; gap: 6px; font-weight: 700; min-width: 0; position: relative; }
.field label, .field .label { font-weight: 700; }
.field small, .hint { font-weight: 400; color: var(--muted); font-size: 0.95rem; }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="search"], input[type="password"], select, textarea {
  width: 100%; min-height: 52px; border: 1.5px solid var(--field); border-radius: 10px; padding: 10px 14px; font: 400 1.1rem var(--f-body); color: var(--ink); background: var(--surface);
}
textarea { min-height: 140px; resize: vertical; }
/* WebKit ignore la hauteur d'un select natif : on dessine nous-mêmes la flèche. */
select {
  appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%232450E6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); }
.search .btn { min-height: 52px; }
.near-me { justify-self: start; }
.suggest { position: absolute; top: 100%; left: 0; right: 0; z-index: 5; margin: 4px 0 0; padding: 4px; list-style: none; background: var(--surface); border: 2px solid var(--brand); border-radius: 10px; box-shadow: 0 12px 28px -12px rgba(15, 27, 61, 0.35); }
.suggest li { padding: 12px; border-radius: 8px; cursor: pointer; font-weight: 400; min-height: 48px; }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--brand-soft); }
.suggest li small { color: var(--muted); margin-left: 6px; }
.section { padding-block: 36px 8px; }
.needs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; padding: 0; margin: 0; list-style: none; }
.needs a { display: grid; gap: 4px; height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; color: var(--ink); text-decoration: none; }
.needs a:hover { border-color: var(--brand); }
.needs a b { color: var(--ink); font-size: 1.1rem; font-weight: 650; }
.needs a:hover b { color: var(--brand); }
.needs a span { font-weight: 400; color: var(--muted); font-size: 1rem; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; padding: 0; margin: 0; list-style: none; counter-reset: step; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; counter-increment: step; }
.steps li::before { content: counter(step); display: block; font: 800 1.8rem/1 var(--f-display); color: var(--brand); margin-bottom: 8px; }

/* Fil d'Ariane */
.crumbs { padding-top: 16px; font-size: 1rem; color: var(--muted); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; }
.crumbs li + li::before { content: "›"; margin: 0 6px; color: var(--muted); }
.crumbs a { font-weight: 400; }

/* Liste d'une ville */
.list-head { padding: 12px 0 8px; }
.list-head p { color: var(--muted); max-width: 70ch; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 0 16px; }
.chip { display: inline-flex; align-items: center; min-height: 48px; border: 1.5px solid #D5DCEA; border-radius: 10px; padding: 0 16px; font-weight: 600; font-size: 1rem; background: var(--surface); color: var(--ink); text-decoration: none; }
.chip:hover { border-color: var(--field); }
.chip[aria-pressed="true"], .chip.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.filters .sort { margin-left: auto; color: var(--muted); font-size: 1rem; }
.results { display: grid; gap: 24px; }
@media (min-width: 960px) { .results.has-map { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; } }
.cards { display: grid; gap: 12px; padding: 0; margin: 0; list-style: none; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; }
.card h3 { margin: 0 0 2px; font-size: 1.2rem; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { text-decoration: underline; color: var(--brand); }
.card.active { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.pin-n { width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-weight: 700; display: grid; place-items: center; font-size: 0.95rem; }
.meta { color: var(--muted); font-size: 1rem; margin: 0 0 8px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.badge { display: inline-flex; align-items: center; border-radius: 7px; padding: 4px 10px; font-size: 0.92rem; font-weight: 600; text-decoration: none; min-height: 32px; }
.b-ai { background: var(--brand); color: var(--on-brand); }
.b-ok { background: var(--brand-soft); color: var(--brand-dark); }
.b-warn { background: var(--warn-bg); color: var(--warn); }
.b-unk { background: var(--grey-bg); color: var(--grey); }
.b-info { background: transparent; color: var(--grey); border: 1.5px dashed #C9D1E3; font-weight: 500; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.map-box { position: sticky; top: 16px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #E9EEF7; }
.map { height: 420px; width: 100%; }
@media (min-width: 960px) { .map { height: calc(100vh - 32px); max-height: 720px; } }
.map-fallback { padding: 16px; color: var(--muted); font-size: 1rem; }
.map-toggle { margin: 0 0 16px; }
@media (max-width: 959px) { .results .map-box { order: -1; position: static; } }
.pin { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: var(--on-brand); border: 3px solid #fff; font: 700 0.95rem/28px var(--f-body); text-align: center; text-decoration: none; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); cursor: pointer; }
.pin:hover, .pin.active { background: var(--ink); color: #FFFFFF; z-index: 2; }
.notice { background: var(--warn-bg); color: var(--ink); border-radius: var(--radius); padding: 14px 16px; margin: 12px 0; }
.notice.info { background: var(--brand-soft); }
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 20px; }
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: center; padding: 20px 0; }
.below { display: grid; gap: 28px; padding: 32px 0 0; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; font-weight: 700; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 4px 0 14px; }
.links { display: flex; flex-wrap: wrap; gap: 4px 18px; padding: 0; margin: 0; list-style: none; }
.links a { display: inline-flex; align-items: center; min-height: 48px; }
.cols { display: grid; gap: 4px 24px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); padding: 0; margin: 0; list-style: none; }
.cols a { display: inline-flex; align-items: center; min-height: 44px; }
.cols small { color: var(--muted); margin-left: 6px; font-weight: 400; }

/* Fiche */
.fiche { display: grid; gap: 24px; padding-block: 8px 0; }
@media (min-width: 960px) { .fiche { grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr); align-items: start; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel + .panel { margin-top: 16px; }
.panel h2 { font-size: 1.3rem; }
.contact { position: sticky; top: 16px; display: grid; gap: 12px; }
.f-ai { background: var(--ai-bg); border-radius: var(--radius); padding: 14px 16px; }
.f-ai strong { color: var(--ai); }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.acts { columns: 2 260px; padding-left: 1.2em; margin: 0; }
.acts li { break-inside: avoid; }
/* Sur mobile, la colonne de contact passe en bas : appeler et demander un devis restent sous le titre. */
.quick-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
@media (min-width: 960px) { .quick-acts { display: none; } }
.small { font-size: 1rem; color: var(--muted); }
.mini-map { height: 240px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin-top: 12px; }

/* Formulaires */
.form { display: grid; gap: 16px; }
.form .row { display: grid; gap: 16px; }
@media (min-width: 640px) { .form .row { grid-template-columns: 1fr 1fr; } }
.form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.form legend { font-weight: 700; margin-bottom: 4px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; min-height: 48px; }
.check input { width: 24px; height: 24px; margin-top: 2px; flex: none; accent-color: var(--brand); }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.errors { background: var(--danger-bg); color: var(--danger); border-radius: var(--radius); padding: 12px 16px; }
.errors ul { margin: 0; padding-left: 1.2em; }
.ok-box { background: var(--ai-bg); border-radius: var(--radius); padding: 18px 20px; }

/* Contenus */
.prose { max-width: 760px; padding-top: 24px; }
.prose h2 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.4em; }
.prose table { border-collapse: collapse; width: 100%; margin: 0 0 1.2em; font-size: 1rem; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; vertical-align: top; }
.sources { font-size: 1rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; margin-top: 28px; }
.statut { scroll-margin-top: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.sim { display: grid; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 16px 0 24px; }
.sim-out { display: grid; gap: 8px; background: var(--brand-soft); border-radius: var(--radius); padding: 16px 18px; }
.sim-out .big { font: 800 2rem/1.1 var(--f-display); color: var(--brand); }

/* Administration */
.admin table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.admin th, .admin td { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; }
.admin form.inline { display: inline; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media print { .top nav, .foot nav, .actions, .map-box, .filters { display: none !important; } }

/* Fiches sans aucun moyen de contact, après les autres */
.sans-contact { margin-top: 32px; display: grid; gap: 8px; }
.sans-contact h2 { font-size: 1.15rem; margin: 0; }
.sans-contact .small { margin: 0 0 8px; color: var(--muted); }

/* Fiche : entreprise cessée d'après Sirene, faits d'identité */
.f-cessee { margin: 12px 0 0; padding: 10px 12px; border-radius: var(--radius); background: #FFF4E5; border: 1px solid #F0C27B; color: var(--ink); }
.faits { margin: 4px 0 8px; padding-left: 20px; }

/* Fiche : faits relevés sur le site du prestataire */
.depuis-site .statut:last-of-type { border-bottom: 0; }
.passages { margin-top: 8px; }
.passages summary { cursor: pointer; font-weight: 700; color: var(--brand); }
.passages ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 12px; }
.passages blockquote { margin: 2px 0 0; padding: 6px 12px; border-left: 3px solid var(--line); color: var(--muted); overflow-wrap: anywhere; }

/* Tarif relevé sur le site du prestataire (cartes) et fourchette des tarifs d'une ville */
.card .tarif { margin: .35rem 0 0; font-size: .95rem; color: var(--ink, inherit); }
.list-head .fourchette { margin-top: .5rem; }
.list-head .fourchette .small { display: block; margin-top: .2rem; }

/* Icônes (Lucide) : à la taille du texte, couleur du texte */
.ico { width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.18em; }
.badge { gap: 6px; }
.badge .ico { width: 1em; height: 1em; }
.lien-ico, .titre-ico { display: inline-flex; align-items: center; gap: 8px; }

/* Infobulle des badges : courte explication au survol, au focus clavier ou au premier appui (infobulle.js) */
.badge { position: relative; }
.badge .tip {
  position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 20;
  width: max-content; max-width: min(280px, calc(100vw - 32px));
  padding: 8px 12px; border-radius: 8px; background: var(--ink); color: #fff;
  font-size: 0.88rem; font-weight: 400; line-height: 1.4; text-align: left; white-space: normal;
  box-shadow: 0 6px 18px rgba(15, 27, 61, 0.18);
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.12s ease;
}
.badge .tip::after { content: ""; position: absolute; top: 100%; left: 16px; border: 6px solid transparent; border-top-color: var(--ink); }
.badge:hover .tip, .badge:focus-visible .tip, .badge.tip-on .tip { opacity: 1; visibility: visible; }
@media (prefers-reduced-motion: reduce) { .badge .tip { transition: none; } }

/* Favicon du site du prestataire à la place du numéro (le numéro reste en pastille pour la carte) */
.card .logo { position: relative; width: 44px; height: 44px; flex: none; }
.card .logo img { display: block; width: 44px; height: 44px; box-sizing: border-box; padding: 5px; border-radius: 10px; border: 1px solid var(--line); background: #fff; object-fit: contain; }
.card .logo .pin-n { position: absolute; right: -7px; bottom: -7px; width: 22px; height: 22px; font-size: 0.72rem; border: 2px solid var(--surface); }
/* Fiche : favicon du site à gauche du nom. */
.f-titre { display: flex; align-items: flex-start; gap: 16px; }
.f-titre > div { min-width: 0; }
.f-logo { flex: none; width: 56px; height: 56px; box-sizing: border-box; padding: 7px; margin-top: 4px; border-radius: 12px; border: 1px solid var(--line); background: #fff; object-fit: contain; }
@media (max-width: 600px) { .f-titre { gap: 12px; } .f-logo { width: 44px; height: 44px; padding: 5px; border-radius: 10px; margin-top: 2px; } }
.card:has(> .pin-n, > .logo) { grid-template-columns: 44px minmax(0, 1fr); }
.card > .pin-n { justify-self: center; margin-top: 4px; }
