/* ============================================================
   Mosquito Service · Frédéric Merle · Plombier-chauffagiste-climaticien
   Porto-Vecchio (Corse-du-Sud · 20137)
   Design system « Méditerranée corse »
   Granit + turquoise mer + blanc + sable chaud
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* Couleurs */
  --granite:    #2b333b;   /* granit corse profond */
  --granite-2:  #353f49;
  --granite-3:  #46535f;
  --sea:        #0fb3c4;   /* turquoise mer Méditerranée */
  --sea-br:     #21d3e3;   /* turquoise lumineux (accent vif) */
  --sea-deep:   #0a8f9e;
  --sand:       #e7d2aa;   /* sable chaud */
  --sand-soft:  #f4ecdc;
  --paper:      #f7f9fa;   /* blanc cassé lumineux */
  --paper-2:    #eef3f4;
  --white:      #ffffff;
  --text:       #25303a;
  --text-muted: #5a6873;
  --text-inv:   #e9f4f5;
  --text-inv-muted: #9fbcc1;
  --line:       #dde6e7;
  --ok:         #1f9e8e;

  /* Typo fluide */
  --step--1: clamp(0.84rem, 0.80rem + 0.20vw, 0.95rem);
  --step-0:  clamp(1.02rem, 0.96rem + 0.30vw, 1.18rem);
  --step-1:  clamp(1.24rem, 1.12rem + 0.55vw, 1.55rem);
  --step-2:  clamp(1.55rem, 1.34rem + 1.0vw, 2.15rem);
  --step-3:  clamp(2.0rem, 1.6rem + 1.9vw, 3.2rem);
  --step-4:  clamp(2.6rem, 1.9rem + 3.4vw, 4.7rem);

  --font-title: "Sora", "Trebuchet MS", sans-serif;
  --font-body:  "Outfit", "Segoe UI", system-ui, sans-serif;

  /* Espace */
  --space-xs: .5rem;
  --space-s:  1rem;
  --space-m:  1.75rem;
  --space-l:  3rem;
  --space-xl: 5rem;

  --radius:    14px;
  --radius-lg: 22px;
  --shadow:    0 20px 50px -24px rgba(20, 50, 60, .42);
  --shadow-sm: 0 10px 26px -16px rgba(20, 50, 60, .4);
  --transition: .25s cubic-bezier(.2,.7,.3,1);
  --header-h: 76px;
  --maxw: 1180px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-title); font-weight: 700; line-height: 1.07; letter-spacing: -.015em; margin: 0; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p  { margin: 0; }
:focus-visible { outline: 3px solid var(--sea-br); outline-offset: 2px; border-radius: 4px; }

.container { width: min(100% - 2.4rem, var(--maxw)); margin-inline: auto; }
.section { padding-block: var(--space-xl); }
.section--tight { padding-block: var(--space-l); }
.section--granite { background: var(--granite); color: var(--text-inv); position: relative; }
.section--paper2 { background: var(--paper-2); }
.section--sand { background: var(--sand-soft); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  text-transform: uppercase; letter-spacing: .18em; font-weight: 700;
  font-size: var(--step--1); color: var(--sea-deep);
}
.eyebrow::before { content: ""; width: 30px; height: 2px; background: var(--sea); }
.section--granite .eyebrow { color: var(--sea-br); }
.section-title { margin-top: .55rem; max-width: 24ch; }
.lead { color: var(--text-muted); max-width: 60ch; margin-top: var(--space-s); font-size: var(--step-1); }
.section--granite .lead { color: var(--text-inv-muted); }

/* ---------- Texture « littoral » (vagues granit) ---------- */
.coastal {
  background-color: var(--granite);
  background-image:
    radial-gradient(circle at 18% 120%, rgba(31,211,227,.16) 0, transparent 45%),
    radial-gradient(circle at 92% -10%, rgba(232,205,155,.10) 0, transparent 42%),
    repeating-linear-gradient(180deg, transparent 0 38px, rgba(255,255,255,.022) 38px 39px);
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-title); font-weight: 600; letter-spacing: .005em;
  font-size: var(--step-0); padding: .85em 1.5em; border-radius: 999px;
  cursor: pointer; border: 2px solid transparent; transition: var(--transition);
  line-height: 1; white-space: nowrap;
}
.btn--primary { background: var(--sea); color: #06343a; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--sea-br); transform: translateY(-2px); }
.btn--ghost { border-color: currentColor; color: inherit; }
.btn--ghost:hover { background: rgba(255,255,255,.08); transform: translateY(-2px); }
.section--granite .btn--ghost:hover { background: rgba(255,255,255,.1); }
.btn--lg { font-size: var(--step-1); padding: .95em 1.7em; }
.btn svg { width: 1.1em; height: 1.1em; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247,249,250,.9); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 1rem; }
.brand { display: flex; align-items: center; gap: .7rem; }
.brand__logo { height: 44px; width: auto; display: block; }
.brand__mark { width: 46px; height: 46px; flex: none; }
.brand__name { font-family: var(--font-title); font-weight: 700; font-size: 1.28rem; line-height: 1; color: var(--granite); }
.brand__name span { display: block; font-family: var(--font-body); font-weight: 600; font-size: .64rem; letter-spacing: .2em; text-transform: uppercase; color: var(--sea-deep); margin-top: .3rem; }
.primary-nav { display: flex; align-items: center; gap: 1.6rem; }
.primary-nav ul { display: flex; gap: 1.4rem; list-style: none; margin: 0; padding: 0; }
.primary-nav a { font-weight: 600; color: var(--granite-2); position: relative; padding-block: .3rem; }
.primary-nav a::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px; background: var(--sea); transition: width var(--transition); }
.primary-nav a:hover::after { width: 100%; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 46px; height: 46px; padding: 10px; }
.nav-toggle span { display: block; height: 3px; background: var(--granite); border-radius: 3px; margin: 5px 0; transition: var(--transition); }

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .primary-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: var(--space-s) 1.2rem var(--space-m);
    gap: var(--space-s); transform: translateY(-130%); transition: transform var(--transition); box-shadow: var(--shadow);
  }
  .primary-nav.is-open { transform: translateY(0); }
  .primary-nav ul { flex-direction: column; gap: .25rem; }
  .primary-nav li a { display: block; padding: .7rem .2rem; border-bottom: 1px solid var(--line); }
  .nav-toggle.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav-toggle.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* ---------- Hero ---------- */
.hero { position: relative; color: var(--text-inv); overflow: hidden; }
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(100deg, rgba(33,42,50,.95) 0%, rgba(33,42,50,.86) 42%, rgba(33,42,50,.42) 100%),
    linear-gradient(0deg, rgba(28,36,43,.62) 0%, rgba(28,36,43,0) 55%);
}
.hero .hero__inner { position: relative; z-index: 2; }
.hero__inner {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: var(--space-l);
  align-items: center; padding-block: clamp(3rem, 7vw, 6rem);
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: .6rem; background: rgba(31,211,227,.16);
  color: var(--sea-br); border: 1px solid rgba(31,211,227,.42);
  padding: .5rem 1rem; border-radius: 999px; font-weight: 600; font-size: var(--step--1);
  letter-spacing: .08em; text-transform: uppercase;
}
.hero h1 { margin-top: var(--space-s); }
.hero h1 .accent { color: var(--sea-br); }
.hero__lead { font-size: var(--step-1); color: var(--text-inv-muted); margin-top: var(--space-s); max-width: 48ch; }
.hero__cta { display: flex; gap: .9rem; flex-wrap: wrap; margin-top: var(--space-m); }
.hero__trust { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-top: var(--space-m); padding-top: var(--space-m); border-top: 1px solid rgba(255,255,255,.14); }
.hero__trust div { display: flex; flex-direction: column; }
.hero__trust b { font-family: var(--font-title); font-size: var(--step-2); color: #fff; line-height: 1; }
.hero__trust span { font-size: var(--step--1); color: var(--text-inv-muted); }

/* Carte « fiche artisan » dans le hero */
.hero__card {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.17);
  border-radius: var(--radius-lg); padding: var(--space-m); backdrop-filter: blur(4px);
  box-shadow: var(--shadow);
}
.hero__card h2 { font-size: var(--step-1); color: #fff; display: flex; align-items: center; gap: .6rem; }
.hero__card ul { list-style: none; margin: var(--space-s) 0 0; padding: 0; display: grid; gap: .7rem; }
.hero__card li { display: block; position: relative; padding-left: 30px; text-align: left; color: var(--text-inv); font-size: var(--step-0); line-height: 1.45; }
.hero__card li svg { position: absolute; left: 0; top: 3px; width: 22px; height: 22px; color: var(--sea-br); }

@media (max-width: 880px) {
  .hero__inner { grid-template-columns: 1fr; gap: var(--space-m); padding-block: var(--space-l); }
  .hero__card { order: 2; }
  .hero::after { background: linear-gradient(180deg, rgba(33,42,50,.82) 0%, rgba(33,42,50,.94) 60%); }
}

/* ---------- Bandeau réassurance ---------- */
.assure { background: var(--sea); color: #06343a; }
.assure__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.assure__grid > div { display: flex; align-items: center; gap: .8rem; padding: 1.1rem 1rem; }
.assure__grid > div + div { border-left: 1px solid rgba(6,52,58,.18); }
.assure svg { width: 30px; height: 30px; flex: none; }
.assure b { font-family: var(--font-title); font-size: 1.02rem; display: block; line-height: 1.15; }
.assure span { font-size: var(--step--1); opacity: .82; }
@media (max-width: 820px) {
  .assure__grid { grid-template-columns: repeat(2, 1fr); }
  .assure__grid > div:nth-child(3) { border-left: 0; }
  .assure__grid > div { border-top: 1px solid rgba(6,52,58,.18); }
  .assure__grid > div:nth-child(-n+2) { border-top: 0; }
}
@media (max-width: 480px) { .assure__grid { grid-template-columns: 1fr; } .assure__grid > div + div { border-left: 0; } }

/* ---------- Cartes prestations ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-m); margin-top: var(--space-l); }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: var(--space-m); display: flex; flex-direction: column; gap: .6rem;
  transition: var(--transition); position: relative; overflow: hidden;
}
.card::before { content: ""; position: absolute; left: 0; top: 0; height: 4px; width: 100%; background: var(--sea); transform: scaleX(0); transform-origin: left; transition: transform var(--transition); }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.card:hover::before { transform: scaleX(1); }
.card__media {
  margin: calc(-1 * var(--space-m)) calc(-1 * var(--space-m)) var(--space-s);
  aspect-ratio: 16 / 10; overflow: hidden;
}
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.card:hover .card__media img { transform: scale(1.06); }
.card h3 { color: var(--granite); }
.card p { color: var(--text-muted); }
.card ul { margin: 0; padding-left: 1.1rem; color: var(--text-muted); font-size: var(--step--1); }
.card ul li { margin-top: .25rem; }
.card__link { margin-top: auto; padding-top: .6rem; color: var(--sea-deep); font-weight: 700; display: inline-flex; align-items: center; gap: .4rem; }
.card:hover .card__link { gap: .8rem; }

/* ---------- Chiffres ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-m); margin-top: var(--space-l); }
.stats > div { padding-left: 1.1rem; border-left: 3px solid var(--sea); }
.stats b { font-family: var(--font-title); font-size: var(--step-3); color: #fff; display: block; line-height: 1; }
.stats span { color: var(--text-inv-muted); font-size: var(--step--1); }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); gap: var(--space-m) var(--space-s); } }

/* ---------- Split « à propos » ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-l); align-items: center; }
.split__media { position: relative; }
.about-photo { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.about-caption { font-size: var(--step--1); color: var(--text-muted); margin-top: .6rem; }
.checks { list-style: none; padding: 0; margin: var(--space-m) 0 0; display: grid; gap: .8rem; }
.checks li { position: relative; padding-left: 30px; }
.checks li svg { position: absolute; left: 0; top: 4px; width: 22px; height: 22px; color: var(--ok); }
.checks li strong { color: var(--granite); }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; gap: var(--space-m); } }

/* ---------- Zone d'intervention ---------- */
.zone { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--space-l); align-items: center; }
.zone__list { list-style: none; padding: 0; margin: var(--space-m) 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.zone__list li { display: flex; gap: .5rem; align-items: center; color: var(--text-inv); }
.zone__list li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sea-br); flex: none; }
.zone__map { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid rgba(255,255,255,.18); }
.zone__map iframe { width: 100%; height: 320px; border: 0; display: block; filter: grayscale(.15) contrast(1.04); }
@media (max-width: 820px) { .zone { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { max-width: 800px; margin-top: var(--space-l); }
.faq details { border-bottom: 1px solid var(--line); }
.faq details[open] summary { color: var(--sea-deep); }
.faq summary { font-family: var(--font-title); font-weight: 600; font-size: var(--step-1); cursor: pointer; list-style: none; padding: var(--space-s) 2.2rem var(--space-s) 0; position: relative; color: var(--granite); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .3rem; top: 50%; transform: translateY(-50%); font-size: 1.7rem; color: var(--sea); line-height: 1; }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { padding-bottom: var(--space-s); color: var(--text-muted); margin-top: -.2rem; }

/* ---------- CTA final ---------- */
.cta-final { text-align: center; }
.cta-final .hero__cta { justify-content: center; }
.cta-final .lead { margin-inline: auto; }

/* ---------- Footer ---------- */
.site-footer { background: #20272d; color: var(--text-inv); padding-block: var(--space-l) var(--space-m); }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr; gap: var(--space-l); }
.site-footer h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: .12em; color: var(--sea-br); margin-bottom: var(--space-s); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.site-footer a:hover { color: var(--sea-br); }
.site-footer address { font-style: normal; line-height: 2; color: var(--text-inv-muted); }
.site-footer address a { color: var(--text-inv); }
.site-footer__brand p { color: var(--text-inv-muted); margin-top: var(--space-s); max-width: 40ch; }
.site-footer__brand .brand__name { color: #fff; }
.site-footer__legal { border-top: 1px solid rgba(255,255,255,.12); margin-top: var(--space-m); padding-top: var(--space-s); color: var(--text-inv-muted); font-size: var(--step--1); }
@media (max-width: 820px) { .site-footer__grid { grid-template-columns: 1fr; gap: var(--space-m); } }

/* ---------- Barre d'action mobile ---------- */
.mobile-bar { display: none; }
@media (max-width: 680px) {
  .mobile-bar {
    display: grid; grid-template-columns: 1fr 1fr; position: fixed; inset: auto 0 0 0; z-index: 90;
    background: var(--granite); box-shadow: 0 -8px 24px -12px rgba(0,0,0,.5);
  }
  .mobile-bar a { display: flex; align-items: center; justify-content: center; gap: .5rem; padding: .9rem; color: #fff; font-weight: 600; font-family: var(--font-title); }
  .mobile-bar a + a { border-left: 1px solid rgba(255,255,255,.15); }
  .mobile-bar a.is-call { background: var(--sea); color: #06343a; }
  body { padding-bottom: 60px; }
}

/* ---------- Pages internes : fil d'ariane + hero service ---------- */
.breadcrumb { font-size: var(--step--1); color: var(--text-inv-muted); padding-block: var(--space-s); }
.breadcrumb a:hover { color: var(--sea-br); }
.breadcrumb [aria-current] { color: #fff; font-weight: 600; }
.page-hero { color: var(--text-inv); position: relative; overflow: hidden; }
.page-hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.page-hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(100deg, rgba(33,42,50,.95) 0%, rgba(33,42,50,.84) 55%, rgba(33,42,50,.5) 100%);
}
.page-hero .container { position: relative; z-index: 2; }
.page-hero__inner { padding-block: var(--space-l) var(--space-xl); max-width: 760px; }
.page-hero h1 { margin-top: var(--space-s); }
.page-hero p { color: var(--text-inv-muted); font-size: var(--step-1); margin-top: var(--space-s); max-width: 54ch; }

.service-body { display: grid; grid-template-columns: 2fr 1fr; gap: var(--space-l); align-items: start; }
.prose > * + * { margin-top: var(--space-s); }
.prose h2 { color: var(--granite); margin-top: var(--space-m); }
.prose ul { padding-left: 1.2rem; color: var(--text-muted); }
.prose ul li { margin-top: .4rem; }
.prose strong { color: var(--granite); }
.aside-card { position: sticky; top: calc(var(--header-h) + 1rem); background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--sea); border-radius: var(--radius-lg); padding: var(--space-m); display: grid; gap: .8rem; box-shadow: var(--shadow-sm); }
.aside-card h3 { color: var(--granite); }
.aside-card p { color: var(--text-muted); font-size: var(--step--1); }
.aside-card .btn { justify-content: center; }
@media (max-width: 820px) { .service-body { grid-template-columns: 1fr; } .aside-card { position: static; } }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.2fr; gap: var(--space-l); align-items: start; }
.contact__info address { font-style: normal; line-height: 2; margin-top: var(--space-s); }
.contact__info .row { display: flex; gap: .7rem; align-items: center; padding: .5rem 0; }
.contact__info .row svg { width: 22px; height: 22px; color: var(--sea-deep); flex: none; }
.form { display: grid; gap: var(--space-s); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-m); box-shadow: var(--shadow-sm); }
.form .field { display: grid; gap: .35rem; }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-s); }
.form label { font-weight: 600; color: var(--granite); font-size: var(--step--1); }
.form input, .form select, .form textarea {
  font-family: inherit; font-size: var(--step-0); padding: .7rem .85rem; border: 1px solid var(--line);
  border-radius: 10px; background: var(--paper); color: var(--text); width: 100%;
}
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--sea); outline: none; box-shadow: 0 0 0 3px rgba(15,179,196,.18); }
.form textarea { min-height: 130px; resize: vertical; }
.form .hint { font-size: var(--step--1); color: var(--text-muted); }
.form .consent { display: flex; gap: .6rem; align-items: flex-start; font-size: var(--step--1); color: var(--text-muted); }
.form .consent input { width: auto; margin-top: .25rem; }
@media (max-width: 820px) { .contact { grid-template-columns: 1fr; } .form .row2 { grid-template-columns: 1fr; } }

/* ---------- Légal / 404 ---------- */
.legal { max-width: 75ch; }
.legal h2 { color: var(--granite); margin-top: var(--space-m); font-size: var(--step-1); }
.legal p, .legal ul { margin-top: var(--space-s); color: var(--text-muted); }
.legal ul { padding-left: 1.2rem; }
.error-page { text-align: center; padding-block: var(--space-xl); }
.error-page .code { font-family: var(--font-title); font-size: var(--step-4); color: var(--sea-br); line-height: 1; }

/* ---------- Reveal au scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* notice démo (bandeau discret, à retirer en prod) */
.demo-flag { background: #353f49; color: var(--text-inv-muted); text-align: center; font-size: .78rem; padding: .35rem 1rem; letter-spacing: .04em; }
.demo-flag b { color: var(--sea-br); }

/* ---------- Figure illustrative (pages internes) ---------- */
.prose-figure { margin: 1.8rem 0 0; border-radius: 14px; overflow: hidden; border: 1px solid rgba(0,0,0,.14); box-shadow: 0 12px 30px -18px rgba(0,0,0,.45); }
.prose-figure img { width: 100%; display: block; aspect-ratio: 16/9; object-fit: cover; }
.prose-figure figcaption { font-size: .9rem; color: #6b6b6b; padding: .55rem .85rem; background: rgba(0,0,0,.05); font-style: italic; }

.primary-nav a.btn--primary { color: #06343a; }
