/* ============================================================
   Design 2026 — couche moderne du moteur geobacklinks.
   L'accent (--accent) est injecte par site dans header2.php
   depuis sites.color ; tout le reste en derive.
   Ajoute le 2026-08-03.
   ============================================================ */

:root {
  color-scheme: light;                                            /* fond clair impose, meme en mode sombre navigateur */
  --accent: #d94747;                                              /* surchargé par site */
  --on-accent: #ffffff;                                           /* texte lisible sur accent (calcule par site) */
  --accent-strong: color-mix(in srgb, var(--accent) 74%, #000);
  --accent-wash: color-mix(in srgb, var(--accent) 12%, #fff);

  --ground: #f6f3f1;
  --surface: #ffffff;
  --surface-2: #fbf8f7;
  --ink: #211a18;
  --muted: #6f6360;
  --faint: #93857f;
  --line: #ece4df;

  --shadow: 0 1px 2px rgba(33,26,24,.04), 0 8px 24px -12px rgba(33,26,24,.14);
  --shadow-lift: 0 2px 4px rgba(33,26,24,.05), 0 18px 40px -18px rgba(33,26,24,.26);
  --radius: 16px;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --maxw: 1120px;
}
/* Design volontairement en fond clair uniquement (choix marque : services a domicile). */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.modern2026 {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: var(--sans); line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
.modern2026 img { max-width: 100%; display: block; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.modern2026 a { color: inherit; text-decoration: none; }
.modern2026 h1, .modern2026 h2, .modern2026 h3 { margin: 0; text-wrap: balance; letter-spacing: -.02em; line-height: 1.12; }

/* Header */
.m-header {
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: saturate(1.4) blur(10px);
  background: color-mix(in srgb, var(--ground) 84%, transparent);
  border-bottom: 1px solid var(--line);
}
.m-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 66px; padding-top: 11px; padding-bottom: 11px; }
.brand { min-width: 0; overflow-wrap: anywhere; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); }
.brand .dot { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-size: 15px; font-weight: 800; box-shadow: 0 4px 10px -3px color-mix(in srgb, var(--accent) 60%, transparent); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 24px; }
.nav a.link { color: var(--muted); font-size: 14.5px; font-weight: 500; }
.nav a.link:hover { color: var(--ink); }
@media (max-width: 760px) {
  .nav a.link { display: none; }
  .brand { font-size: 14px; }
  .brand .dot { width: 26px; height: 26px; font-size: 13px; }
  .nav .btn-sm { padding: 8px 13px; }
}

.btn { display: inline-flex; align-items: center; gap: 8px; justify-content: center; font-family: inherit; font-size: 15px; font-weight: 650; cursor: pointer; padding: 11px 18px; border-radius: 11px; border: 1px solid transparent; white-space: nowrap; transition: transform .12s ease, box-shadow .12s ease, background .12s ease; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--accent) 65%, transparent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.btn-sm { padding: 9px 14px; font-size: 14px; border-radius: 10px; }
.modern2026 :focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* Etat "envoi en cours" d'un bouton : spinner immediat au clic (feedback pendant reCAPTCHA + ajax) */
.btn-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn-loading::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px;
  border-radius: 50%; border: 2.5px solid color-mix(in srgb, var(--on-accent) 30%, transparent);
  border-top-color: var(--on-accent); animation: btnspin .7s linear infinite;
}
@keyframes btnspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn-loading::after { animation-duration: 1.6s; } }

/* Hero */
.hero { position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 0; background: radial-gradient(60% 90% at 88% -10%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 60%), radial-gradient(50% 70% at 5% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 55%); }
.hero .wrap { position: relative; z-index: 1; padding: 66px 24px 42px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .09em; color: var(--accent-strong); background: var(--accent-wash); padding: 6px 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); }
.hero h1 { font-size: clamp(2.2rem, 5.4vw, 3.9rem); font-weight: 800; margin: 20px 0 0; max-width: 16ch; }
.hero h1 .hl { color: var(--accent-strong); }
.hero .lede { font-size: clamp(1.05rem, 1.7vw, 1.2rem); color: var(--muted); max-width: 58ch; margin: 18px 0 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* Photo de la ville dans le hero (differencie chaque site) */
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 4vw, 56px); align-items: center; }
.hero-photo { border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-lift); aspect-ratio: 4 / 3; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { aspect-ratio: 16 / 10; max-height: 260px; }
}

/* Badge logo officiel de la ville (fond blanc, discret) */
.city-badge { display: inline-flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; margin-top: 22px; box-shadow: var(--shadow); }
.city-badge img { height: 36px; width: auto; max-width: 180px; object-fit: contain; display: block; }
.city-badge span { font-size: 12px; color: var(--faint); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 28px; color: var(--muted); font-size: 14.5px; }
.trust span { display: inline-flex; align-items: center; gap: 9px; }
.trust .tick { width: 18px; height: 18px; border-radius: 999px; background: var(--accent-wash); color: var(--accent-strong); display: grid; place-items: center; font-size: 11px; font-weight: 800; }

/* Sections */
section.block { padding: 52px 0; }
section.block.alt { background: var(--surface-2); border-block: 1px solid var(--line); }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.sec-head h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); font-weight: 750; }
.sec-head p { margin: 8px 0 0; color: var(--muted); max-width: 54ch; }
.sec-link { color: var(--accent-strong); font-weight: 600; font-size: 14.5px; white-space: nowrap; }

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-3 { grid-template-columns: 1fr; } }

/* Provider cards */
.provider { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease; }
.provider:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.provider .top { display: flex; align-items: center; gap: 13px; }
.mono { width: 46px; height: 46px; border-radius: 12px; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 16px; color: var(--on-accent); letter-spacing: -.02em; background: linear-gradient(150deg, var(--accent), color-mix(in srgb, var(--accent) 82%, #000)); overflow: hidden; }
.mono img { width: 100%; height: 100%; object-fit: cover; }
.provider h3 { font-size: 16.5px; font-weight: 700; letter-spacing: -.01em; }
.provider .addr { font-size: 13.5px; color: var(--faint); margin-top: 3px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; font-weight: 550; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px; }
.provider .foot { display: flex; gap: 8px; margin-top: auto; padding-top: 4px; }
.provider .foot .btn { flex: 1; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 720px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.step .n { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; background: var(--accent-wash); color: var(--accent-strong); margin-bottom: 14px; }
.step h3 { font-size: 16.5px; font-weight: 700; margin-bottom: 7px; }
.step p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* Articles */
.article-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .14s ease, box-shadow .14s ease; }
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.article-card .thumb { position: relative; overflow: hidden; height: 180px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 30%, var(--surface-2)), var(--surface-2)); display: grid; place-items: center; color: color-mix(in srgb, var(--accent) 70%, var(--ink)); font-weight: 700; letter-spacing: .04em; font-size: 12.5px; text-transform: uppercase; padding: 0 16px; text-align: center; }
.article-card .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.article-card .body { padding: 18px 20px 20px; }
.article-card h3 { font-size: 16.5px; font-weight: 700; }
.article-card p { color: var(--muted); font-size: 14.5px; margin: 9px 0 14px; }
.read { color: var(--accent-strong); font-weight: 600; font-size: 14px; }

/* CTA band */
.cta-band { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 80%, #000)); border-radius: 22px; padding: clamp(30px, 5vw, 52px); color: var(--on-accent); box-shadow: var(--shadow-lift); position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 999px; background: color-mix(in srgb, var(--on-accent) 12%, transparent); }
.cta-band h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); font-weight: 800; color: var(--on-accent); max-width: 18ch; }
.cta-band p { color: var(--on-accent); opacity: .9; margin: 12px 0 22px; max-width: 46ch; }
.cta-band .btn-primary { background: #fff; color: var(--accent-strong); box-shadow: none; }
.cta-band .btn-primary:hover { background: #fff; }

/* Footer */
footer.m-footer { border-top: 1px solid var(--line); margin-top: 20px; color: var(--muted); font-size: 14px; }
footer.m-footer .wrap { padding: 30px 24px; display: flex; flex-wrap: wrap; gap: 12px 30px; align-items: center; }
footer.m-footer .brand { color: var(--ink); }
footer.m-footer .links { display: flex; gap: 20px; }
footer.m-footer .links a:hover { color: var(--ink); }

/* Pied sur mobile : tout aligne a gauche, liens empiles (place APRES les regles de base pour gagner la cascade). */
@media (max-width: 760px) {
  footer.m-footer .wrap { flex-direction: column; align-items: flex-start; gap: 22px; }
  footer.m-footer .links { flex-direction: column; gap: 15px; width: 100%; }
  footer.m-footer .links a { padding: 2px 0; }
  footer.m-footer .wrap > span { margin-left: 0 !important; }
}

/* ---------- Pages internes ---------- */
.page-hero { position: relative; border-bottom: 1px solid var(--line); overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 100% at 90% -20%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%); }
.page-hero .wrap { position: relative; padding: 34px 24px 30px; }
.crumb { font-size: 13.5px; color: var(--faint); display: flex; gap: 8px; flex-wrap: wrap; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--accent-strong); }
.page-hero h1 { font-size: clamp(1.7rem, 4vw, 2.7rem); font-weight: 800; margin-top: 12px; max-width: 22ch; }
.page-hero .sub { color: var(--muted); margin-top: 10px; max-width: 60ch; }

/* Article */
.article-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 40px; align-items: start; }
@media (max-width: 880px) { .article-layout { grid-template-columns: 1fr; } }
.article-media { border-radius: var(--radius); overflow: hidden; margin-bottom: 26px; box-shadow: var(--shadow); }
.article-media img { width: 100%; }
.prose { max-width: 72ch; }
.prose p { margin: 0 0 1.1em; font-size: 1.05rem; line-height: 1.75; color: var(--ink); }
.prose h2 { font-size: 1.45rem; font-weight: 750; margin: 1.7em 0 .5em; }
.prose h3 { font-size: 1.18rem; font-weight: 700; margin: 1.4em 0 .4em; }
.prose a { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 2px; }
.prose img { border-radius: 12px; margin: 1.1em 0; }
.aside { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 16px; }
.aside-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.aside-card h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); margin-bottom: 12px; font-weight: 700; }
.aside-card .meta { font-size: 14px; color: var(--muted); margin: 0 0 8px; }

/* Fiche prestataire */
.profile { display: grid; grid-template-columns: 200px 1fr; gap: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
@media (max-width: 680px) { .profile { grid-template-columns: 1fr; text-align: center; } }
.profile .logo { width: 180px; height: 180px; border-radius: 20px; display: grid; place-items: center; overflow: hidden; background: linear-gradient(150deg, var(--accent), color-mix(in srgb, var(--accent) 82%, #000)); color: var(--on-accent); font-weight: 800; font-size: 46px; margin: 0 auto; }
.profile .logo img { width: 100%; height: 100%; object-fit: cover; }
.profile h1 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); font-weight: 800; }
.profile .svc { color: var(--muted); margin: 8px 0 0; }
.profile .desc { margin: 16px 0 0; color: var(--ink); line-height: 1.7; }
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 22px; }
@media (max-width: 520px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-row { display: flex; gap: 12px; align-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.contact-row .ic { width: 34px; height: 34px; flex: none; border-radius: 9px; display: grid; place-items: center; background: var(--accent-wash); color: var(--accent-strong); font-weight: 800; }
.contact-row .v { font-size: 14px; min-width: 0; }
.contact-row .v b { display: block; font-size: 12px; color: var(--faint); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.contact-row a { color: var(--accent-strong); word-break: break-word; }

/* Formulaire contact */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 4vw, 34px); box-shadow: var(--shadow); max-width: 720px; }
.modern2026 .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .modern2026 .form-row { grid-template-columns: 1fr; } }
.modern2026 .field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.modern2026 .field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.modern2026 input[type="text"], .modern2026 input[type="email"], .modern2026 textarea, .modern2026 select {
  font-family: inherit; font-size: 15px; color: var(--ink); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 11px; padding: 12px 14px; width: 100%; transition: border-color .12s, box-shadow .12s;
}
.modern2026 select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 36px; cursor: pointer; }
.modern2026 input:focus, .modern2026 textarea:focus, .modern2026 select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.modern2026 .field.border_error input, .modern2026 .border_error { border-color: #dc2626 !important; }
.modern2026 textarea { resize: vertical; min-height: 130px; }
.consent { font-size: 12.5px; color: var(--faint); margin: 6px 0 16px; line-height: 1.5; }
.msg-box { border-radius: 12px; padding: 16px 18px; margin-bottom: 18px; }
.msg-ok { background: color-mix(in srgb, #16a34a 12%, var(--surface)); border: 1px solid color-mix(in srgb, #16a34a 40%, var(--line)); color: #166534; }
.msg-ko { background: color-mix(in srgb, #dc2626 10%, var(--surface)); border: 1px solid color-mix(in srgb, #dc2626 40%, var(--line)); color: #991b1b; }
.d_none { display: none; }

/* Badge reCAPTCHA masque (mention legale ajoutee sous les formulaires, cf. CGU Google). */
.grecaptcha-badge { visibility: hidden; }

@media (prefers-reduced-motion: reduce) { .modern2026 * { transition: none !important; scroll-behavior: auto; } }

/* Titre de section (Tier 2 audit SF : H2 sur annuaires, fiches, formulaires) */
.block-title { font-size: clamp(1.3rem, 2.4vw, 1.6rem); font-weight: 750; letter-spacing: -.01em; margin: 0 0 18px; color: var(--ink); }
