/* ============================================================
   Démo artisan — feuille de style
   Les couleurs du métier sont pilotées par body[data-trade]
   ============================================================ */

:root {
  --accent: #1565d8;
  --accent-dark: #0d4ea8;
  --accent-soft: #e8f1fd;
  --accent-ink: #ffffff;
  --ink: #0f1b2d;
  --ink-2: #1c2a40;
  --grey: #5b6678;
  --line: #e3e8ef;
  --soft: #f5f7fb;
  --white: #ffffff;
  --radius: 18px;
  --shadow: 0 12px 32px rgba(15, 27, 45, .08);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}
body[data-trade="electricien"] { --accent: #f2a900; --accent-dark: #9a6500; --accent-soft: #fff5d6; --accent-ink: #0f1b2d; }
body[data-trade="garagiste"] { --accent: #0f766e; --accent-dark: #0b5a54; --accent-soft: #e0f2ef; --accent-ink: #ffffff; }
body[data-trade="couvreur"] { --accent: #c2410c; --accent-dark: #9a330a; --accent-soft: #fdece4; --accent-ink: #ffffff; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
/* Enfants de grilles : ne jamais forcer la largeur de la page */
.hero__inner > *, .quote-grid > *, .form__row > *, .faq-wrap > *, .services > *, .works > *, .reviews > *, .guarantees__grid > * { min-width: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--white); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.2; overflow-wrap: break-word; }
p { margin: 0 0 1em; }
.container { width: min(1160px, 100% - 40px); margin-inline: auto; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .8em 1.3em; border-radius: 12px; border: 2px solid transparent;
  font: 700 .95rem/1 var(--font); text-decoration: none; cursor: pointer; transition: transform .2s, background .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--lg { padding: 1em 1.5em; font-size: 1rem; }
.btn--block { width: 100%; }
.btn--accent { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn--accent:hover { background: var(--accent-dark); }
.btn--ghost { border-color: var(--line); background: var(--white); color: var(--ink); }
.btn--ghost:hover { border-color: var(--accent); }
.btn--white { background: var(--white); color: var(--ink); }

/* ---------- Bandeau démo ---------- */
.demo-bar { background: var(--ink); color: #c9d3e3; font-size: .8rem; }
.demo-bar__inner { display: flex; align-items: center; justify-content: space-between; gap: .5rem 1rem; flex-wrap: wrap; padding: .45rem 0; }
.demo-bar p { margin: 0; }
.demo-bar strong { color: var(--white); }
.trade-switch { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem; padding: .2rem; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.trade-switch button { border: 0; background: none; color: #c9d3e3; font: 600 .78rem var(--font); padding: .35rem .8rem; border-radius: 999px; cursor: pointer; }
.trade-switch button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }

/* ---------- En-tête ---------- */
.header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header__inner { display: flex; align-items: center; gap: 1.5rem; height: 74px; }
.logo { display: flex; align-items: center; gap: .65rem; text-decoration: none; margin-right: auto; }
.logo__mark { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); }
.logo__mark svg { width: 24px; height: 24px; }
.logo__text { display: flex; flex-direction: column; line-height: 1.1; }
.logo__name { font-weight: 800; font-size: 1.2rem; letter-spacing: -.01em; }
.logo__trade { font-size: .75rem; font-weight: 600; color: var(--grey); }
.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav a:not(.btn) { text-decoration: none; font-weight: 600; font-size: .92rem; color: var(--grey); }
.nav a:not(.btn):hover { color: var(--ink); }
.header__phone { display: flex; align-items: center; gap: .6rem; text-decoration: none; font-weight: 800; white-space: nowrap; }
.header__phone small { display: block; font-size: .7rem; font-weight: 600; color: var(--accent-dark); text-transform: uppercase; letter-spacing: .06em; }
.header__phone-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-dark); }
.header__phone-icon svg { width: 20px; height: 20px; }
.burger { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.burger span { display: block; width: 24px; height: 3px; margin: 5px 0; border-radius: 3px; background: var(--ink); transition: transform .25s, opacity .25s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; padding: clamp(50px, 8vw, 100px) 0 clamp(60px, 8vw, 110px);
  background:
    radial-gradient(circle at 85% 20%, var(--accent-soft), transparent 45%),
    linear-gradient(180deg, var(--soft), var(--white));
}
.hero__inner { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero__badge { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .9rem; border-radius: 999px; background: var(--white); border: 1px solid var(--line); font-size: .82rem; font-weight: 600; color: var(--grey); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 4px rgba(22, 163, 74, .18); }
.hero__title { margin: 1.1rem 0 1rem; font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.08; }
.hero__text { font-size: 1.1rem; color: var(--grey); max-width: 540px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.hero__trust { list-style: none; padding: 0; margin: 1.8rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; font-size: .9rem; color: var(--grey); }
.hero__trust li { display: flex; align-items: center; gap: .35rem; }
.hero__trust li:not(:first-child)::before { content: "✓"; color: var(--accent-dark); font-weight: 800; }
.stars { color: #f5b301; letter-spacing: .05em; }

.hero__visual { position: relative; display: grid; place-items: center; min-height: 380px; }
.hero__disc {
  width: min(340px, 80%); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--accent) 75%, white), var(--accent-dark));
  box-shadow: 0 40px 80px color-mix(in srgb, var(--accent) 35%, transparent), inset 0 -20px 40px rgba(0, 0, 0, .15);
}
.hero__icon { width: 46%; color: var(--accent-ink); }
.hero__icon svg { width: 100%; height: auto; display: block; }
.float-card { position: absolute; display: flex; align-items: center; gap: .7rem; padding: .8rem 1rem; border-radius: 14px; background: var(--white); box-shadow: var(--shadow); font-size: .85rem; }
.float-card small { display: block; color: var(--grey); font-size: .75rem; }
.float-card--top { top: 10%; left: 0; }
.float-card--bottom { bottom: 8%; right: 2%; flex-direction: column; align-items: flex-start; gap: 0; }
.float-card__icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #dcfce7; color: #15803d; font-weight: 800; }
.float-card__big { font-size: 1.6rem; font-weight: 800; color: var(--accent-dark); line-height: 1.1; }

/* ---------- Garanties ---------- */
.guarantees { position: relative; margin-top: -40px; z-index: 2; }
.guarantees__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; padding: 1.3rem; border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); border: 1px solid var(--line); }
.guarantee { display: flex; gap: .8rem; align-items: flex-start; }
.guarantee__icon { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-dark); }
.guarantee__icon svg { width: 22px; height: 22px; }
.guarantee strong { display: block; font-size: .95rem; }
.guarantee p { margin: 0; font-size: .83rem; color: var(--grey); }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 104px) 0; }
.section--soft { background: var(--soft); }
.section__head { text-align: center; max-width: 700px; margin: 0 auto 2.8rem; }
.section__head--left { text-align: left; margin: 0; }
.eyebrow { margin: 0 0 .6rem; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-dark); }
.section__title { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; letter-spacing: -.02em; }
.section__lead { color: var(--grey); font-size: 1.02rem; }

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
.service { padding: 1.6rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--white); transition: border-color .2s, box-shadow .2s, transform .2s; }
.service:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-3px); }
.service__icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-dark); margin-bottom: 1rem; }
.service__icon svg { width: 26px; height: 26px; }
.service h3 { font-size: 1.12rem; font-weight: 700; }
.service p { margin: 0; color: var(--grey); font-size: .92rem; }
.service__price { display: inline-block; margin-top: .9rem; font-size: .8rem; font-weight: 700; color: var(--accent-dark); }

/* ---------- Urgence ---------- */
.urgency { background: var(--ink); color: var(--white); padding: 2.4rem 0; }
.urgency__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; flex-wrap: wrap; }
.urgency__kicker { margin: 0 0 .3rem; color: var(--accent); font-weight: 700; }
.urgency__title { margin: 0; font-size: clamp(1.3rem, 2.6vw, 1.8rem); font-weight: 800; }

/* ---------- Réalisations ---------- */
.works { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.work { border-radius: var(--radius); overflow: hidden; background: var(--white); border: 1px solid var(--line); }
.work__img { position: relative; aspect-ratio: 4 / 3; display: grid; grid-template-columns: 1fr 1fr; }
.work__half { position: relative; display: grid; place-items: center; color: rgba(255, 255, 255, .9); }
.work__half svg { width: 38%; height: auto; opacity: .9; }
.work__half--before { background: linear-gradient(135deg, #9aa4b2, #6b7686); }
.work__half--after { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 70%, white), var(--accent-dark)); color: var(--accent-ink); }
.work__label { position: absolute; top: .6rem; left: .6rem; padding: .2rem .55rem; border-radius: 6px; background: rgba(15, 27, 45, .7); color: var(--white); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.work__body { padding: 1.1rem 1.2rem 1.3rem; }
.work__body h3 { font-size: 1.02rem; margin-bottom: .25rem; }
.work__meta { margin: 0; font-size: .83rem; color: var(--grey); }

/* ---------- Avis ---------- */
.rating-summary { margin: 0; display: flex; justify-content: center; align-items: center; gap: .4rem; flex-wrap: wrap; color: var(--grey); }
.demo-tag { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: .15rem .5rem; border-radius: 6px; background: var(--soft); border: 1px dashed var(--line); color: var(--grey); }
.reviews { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
.review { padding: 1.5rem; border-radius: var(--radius); background: var(--soft); border: 1px solid var(--line); display: flex; flex-direction: column; }
.review__text { flex: 1; margin: .7rem 0 1.1rem; font-size: .95rem; }
.review__author { display: flex; align-items: center; gap: .7rem; font-size: .88rem; }
.review__avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 800; }
.review__author small { display: block; color: var(--grey); }

/* ---------- Zone + devis ---------- */
.quote-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.towns { list-style: none; padding: 0; margin: 1.4rem 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.towns li { padding: .4rem .85rem; border-radius: 999px; background: var(--white); border: 1px solid var(--line); font-size: .86rem; font-weight: 600; }
.hours { padding: 1.2rem 1.4rem; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); }
.hours__title { margin: 0 0 .3rem; font-weight: 800; }
.hours p:last-child { margin: 0; color: var(--grey); }
.hours strong { color: var(--accent-dark); }
.quote { padding: clamp(1.4rem, 3vw, 2.2rem); border-radius: 22px; background: var(--white); box-shadow: var(--shadow); border: 1px solid var(--line); }
.quote__title { font-size: 1.5rem; font-weight: 800; margin-bottom: .2rem; }
.quote__lead { color: var(--grey); margin-bottom: 1.3rem; }
.form { display: grid; gap: .9rem; }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.form label { display: grid; gap: .35rem; font-size: .85rem; font-weight: 600; color: var(--grey); }
.form input:not([type=checkbox]), .form select, .form textarea {
  width: 100%; min-width: 0; font: inherit; font-size: .95rem; font-weight: 500; color: var(--ink); padding: .75em .9em;
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--soft);
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--accent); background: var(--white); }
.form .is-invalid { border-color: #dc2626 !important; background: #fef2f2 !important; }
.form__consent { display: flex !important; align-items: flex-start; gap: .55rem !important; font-weight: 500 !important; font-size: .82rem !important; }
.form__consent input { margin-top: 3px; accent-color: var(--accent); }
.form__consent.is-invalid span { color: #dc2626; }
.form__status { margin: 0; padding: .85rem 1rem; border-radius: 10px; font-size: .9rem; font-weight: 600; }
.form__status--ok { background: #dcfce7; color: #166534; }
.form__status--error { background: #fef2f2; color: #b91c1c; }

/* ---------- FAQ ---------- */
.faq-wrap { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.faq { display: grid; gap: .7rem; }
.faq details { border-radius: 14px; border: 1px solid var(--line); background: var(--white); }
.faq details[open] { border-color: var(--accent); box-shadow: var(--shadow); }
.faq summary { cursor: pointer; list-style: none; padding: 1.05rem 3rem 1.05rem 1.2rem; position: relative; font-weight: 700; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 1.1rem; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--accent-dark); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0; padding: 0 1.2rem 1.1rem; color: var(--grey); font-size: .93rem; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #9aa6b8; padding: 2.2rem 0 calc(2.2rem + env(safe-area-inset-bottom)); font-size: .88rem; }
.footer__inner { display: flex; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; }
.footer__inner p { margin: 0; }
.footer__brand { color: var(--white); font-weight: 800; font-size: 1.05rem; margin-bottom: .2rem !important; }
.footer__brand span { color: var(--accent); font-weight: 600; font-size: .9rem; }
.footer__demo { max-width: 420px; font-size: .78rem; }
.footer__legal { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .74rem; color: #7d8aa0; }
.footer__legal p { margin: 0 0 .35rem; }
.footer__legal strong { color: #c9d3e3; }
.footer__legal a { color: #c9d3e3; }

/* ---------- Barre mobile ---------- */
.mobile-bar { display: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1000px) {
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); padding: .5rem 20px 1.4rem; border-bottom: 1px solid var(--line); box-shadow: 0 20px 30px rgba(0, 0, 0, .08);
    transform: translateY(-130%); visibility: hidden; transition: transform .3s, visibility .3s;
  }
  .nav.is-open { transform: none; visibility: visible; }
  .nav a:not(.btn) { padding: .9rem 0; border-bottom: 1px solid var(--line); font-size: 1.02rem; color: var(--ink); }
  .nav__cta { margin-top: 1rem; }
  .burger { display: block; }
  .hero__inner { grid-template-columns: minmax(0, 1fr); }
  .hero__visual { min-height: 300px; }
  .guarantees__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .services, .works, .reviews { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quote-grid, .faq-wrap { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 680px) {
  .header__phone > span:last-child { display: none; }
  .header__inner { gap: .8rem; }
  .hero__visual { display: none; }
  .hero__actions .btn { width: 100%; }
  .guarantees__grid { grid-template-columns: minmax(0, 1fr); }
  .services, .works, .reviews { grid-template-columns: minmax(0, 1fr); }
  .form__row { grid-template-columns: minmax(0, 1fr); }
  .demo-bar__inner { justify-content: center; text-align: center; }
  .mobile-bar {
    display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: .6rem .8rem calc(.6rem + env(safe-area-inset-bottom)); background: var(--white); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(15, 27, 45, .08);
  }
  .mobile-bar a { display: flex; align-items: center; justify-content: center; gap: .45rem; padding: .85rem; border-radius: 12px; font-weight: 800; text-decoration: none; }
  .mobile-bar__call { background: var(--accent); color: var(--accent-ink); }
  .mobile-bar__quote { background: var(--ink); color: var(--white); }
  .footer { padding-bottom: calc(6rem + env(safe-area-inset-bottom)); }
}

@media (max-width: 360px) {
  .trade-switch button { padding: .35rem .42rem; font-size: .68rem; }
  .logo__name { font-size: 1.05rem; }
}

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