/* ==========================================================================
   Fiduciaire COFINAC — feuille de style
   ========================================================================== */

:root {
  --green: #123c34;        /* vert sapin, couleur de marque */
  --green-2: #0c2b25;
  --sand: #f1ece3;         /* sable, fonds alternés */
  --sand-2: #e3dacb;
  --beige: #d9c7a6;
  --ink: #16201d;
  --muted: #5a6561;
  --line: #ddd6ca;
  --white: #ffffff;
  --accent: #b4532a;       /* terre cuite, usage ponctuel */
  --focus: #1f6fd1;

  --font: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 10px;
  --container: 1240px;
  --header-h: 78px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
svg { display: block; }

a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
a[href^="tel:"] { white-space: nowrap; }

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

h1, h2, h3 {
  margin: 0 0 .5em;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.025em;
  color: var(--ink);
}
h1 { font-size: clamp(2.4rem, 1.2rem + 4.6vw, 5rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3.1rem); }
h3 { font-size: 1.3rem; letter-spacing: -.015em; line-height: 1.25; }

p { margin: 0 0 1em; }
address { font-style: normal; }
figure { margin: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--green); color: var(--white);
  padding: .6rem 1rem; border-radius: 6px;
}
.skip-link:focus { top: 12px; color: var(--white); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

.label {
  margin-bottom: 1rem;
  font-size: .95rem; font-weight: 500;
  color: var(--accent);
}
.label-light { color: var(--beige); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 52px;
  padding: .8rem 1.5rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font: 600 1rem/1.2 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-2); color: var(--white); }
.btn-line { color: var(--ink); border-color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--white); }
.btn-sm { min-height: 44px; padding: .55rem 1.2rem; font-size: .95rem; }
.btn-block { width: 100%; }
.icon { width: 18px; height: 18px; fill: currentColor; flex: none; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  height: var(--header-h);
}

.brand {
  display: inline-flex; align-items: center; gap: .75rem;
  color: var(--ink); text-decoration: none; flex: none;
}
.brand:hover { color: var(--ink); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-size: 1.3rem; font-weight: 700; letter-spacing: .06em; }
.brand-kicker { font-size: .78rem; color: var(--muted); margin-top: .3rem; }

.site-nav { display: flex; align-items: center; gap: 2.25rem; }
.site-nav ul { display: flex; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.site-nav ul a {
  display: inline-block; padding: .65rem 0;
  color: var(--ink); text-decoration: none; font-size: .98rem; font-weight: 500;
}
.site-nav ul a:hover { color: var(--accent); }
.nav-actions { display: flex; align-items: center; gap: 1.25rem; }
.nav-phone {
  font-weight: 600; text-decoration: none; color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.nav-toggle {
  display: none;
  width: 46px; height: 46px;
  background: none; border: 1px solid var(--line); border-radius: 50%;
  cursor: pointer; position: relative;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  position: absolute; left: 12px; width: 20px; height: 2px;
  background: var(--ink); transition: transform .2s;
}
.nav-toggle-bar { top: 50%; margin-top: -1px; }
.nav-toggle-bar::before,
.nav-toggle-bar::after { content: ""; left: 0; }
.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(2.5rem, 5vw, 4.5rem); }
.hero-top {
  display: grid; grid-template-columns: 1.6fr 1fr;
  gap: clamp(2rem, 5vw, 5rem); align-items: end;
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
}
.hero-top h1 { margin: 0; max-width: 13ch; }
.lead { font-size: 1.15rem; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

.hero-media { position: relative; }
.hero-media img {
  width: 100%; aspect-ratio: 16 / 7; object-fit: cover; object-position: center 35%;
  border-radius: var(--radius);
}
.hero-badge {
  position: absolute; left: 24px; bottom: 24px;
  background: var(--white); border-radius: 8px;
  padding: 1rem 1.25rem;
}
.hero-badge p { margin: 0; }
.badge-rating { display: flex; align-items: center; gap: .6rem; }
.badge-rating strong { font-size: 1.6rem; line-height: 1; }
.badge-label { font-size: .85rem; color: var(--muted); margin-top: .25rem !important; }
.stars { color: #c9902c; letter-spacing: .06em; }

.facts {
  display: grid; grid-template-columns: repeat(4, 1fr);
  list-style: none; margin: 0; padding: 0;
  border-bottom: 1px solid var(--line);
}
.facts li {
  display: flex; flex-direction: column; gap: .3rem;
  padding: 1.6rem 1.5rem 1.6rem 0;
}
.facts li + li { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.fact-label { font-size: .85rem; color: var(--muted); }
.fact-value { font-weight: 600; color: var(--ink); text-decoration: none; }

/* ---------- Sections ---------- */
.section { padding: clamp(4.5rem, 9vw, 7.5rem) 0; }
.section-sand { background: var(--sand); }
.section-green { background: var(--green); color: #cfdcd8; }
.section-green h2,
.section-green h3 { color: var(--white); }

.section-head {
  display: grid; grid-template-columns: 1.4fr 1fr;
  gap: 2rem 4rem; align-items: end;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section-head h2 { margin: 0; }
.section-intro { color: var(--muted); font-size: 1.1rem; }
.section-head .section-intro { margin: 0; }
.section-green .section-intro { color: #b9cbc5; }

/* Cabinet */
.about {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 6rem); align-items: center;
}
.about-media img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 40% center;
  border-radius: var(--radius);
}
.statement {
  font-size: clamp(1.2rem, 1rem + .6vw, 1.45rem); line-height: 1.45;
  color: var(--ink); font-weight: 500;
  padding-bottom: 1.5rem; margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.about-text p:not(.statement):not(.label) { color: var(--muted); }

/* Pour qui */
.audience { background: var(--green); color: var(--white); padding: 2.75rem 0; }
.audience .container {
  display: grid; grid-template-columns: auto 1fr; gap: 3rem; align-items: start;
}
.audience-title {
  font-size: 1rem; font-weight: 500; letter-spacing: 0;
  color: var(--beige); margin: .2rem 0 0; white-space: nowrap;
}
.audience-list {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 2rem;
  list-style: none; margin: 0; padding: 0;
}
.audience-list strong { display: block; font-size: 1.1rem; font-weight: 600; margin-bottom: .35rem; }
.audience-list span { display: block; font-size: .92rem; color: #b9cbc5; line-height: 1.45; }

/* Services */
.services {
  display: grid; grid-template-columns: .85fr 1.15fr;
  gap: clamp(2rem, 5vw, 5rem); align-items: start;
}
.services-media { position: sticky; top: calc(var(--header-h) + 24px); }
.services-media img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: var(--radius);
}
.service-list { border-top: 1px solid var(--ink); }
.service {
  padding: 1.9rem 0;
  border-bottom: 1px solid var(--line);
}
.service h3 { font-size: 1.55rem; margin-bottom: .55rem; }
.service p { color: var(--muted); margin-bottom: 1rem; max-width: 52ch; }
.tags { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; margin: 0; padding: 0; }
.tags li {
  font-size: .86rem; padding: .3rem .75rem;
  background: var(--sand); border-radius: 999px; color: var(--ink);
}

/* Pourquoi */
.why {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 6rem); align-items: start;
}
.why-media { position: sticky; top: calc(var(--header-h) + 24px); }
.why-media img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: var(--radius);
}
.why-list { margin: 2rem 0 0; }
.why-list > div {
  display: grid; grid-template-columns: 9.5rem 1fr; gap: 1.5rem;
  padding: 1.35rem 0; border-top: 1px solid var(--sand-2);
}
.why-list dt { font-weight: 600; font-size: 1.1rem; }
.why-list dd { margin: 0; color: var(--muted); }

/* Méthode */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem;
}
.steps li {
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem 2rem;
}
.step-num {
  display: inline-block; margin-bottom: 2.75rem;
  font-size: .85rem; font-weight: 500; color: var(--beige);
}
.steps h3 { font-size: 1.3rem; }
.steps p { font-size: .97rem; margin: 0; }

/* Zone */
.zone {
  display: grid; grid-template-columns: .8fr 1.2fr;
  gap: clamp(2.5rem, 6vw, 6rem); align-items: center;
}
.zone-media img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
  border-radius: var(--radius);
}
.zone-media figcaption { margin-top: .6rem; font-size: .78rem; color: var(--muted); }
.zone-media figcaption a { color: var(--muted); }
.places {
  display: grid; grid-template-columns: repeat(2, 1fr);
  list-style: none; margin: 2rem 0; padding: 0;
  border-top: 1px solid var(--line);
}
.places li {
  padding: .8rem 0; border-bottom: 1px solid var(--line);
  font-weight: 500;
}
.places li:nth-child(odd) { padding-right: 1rem; }
.places li:first-child { color: var(--accent); }
.link-arrow { display: inline-block; padding: .6rem 0; font-weight: 600; text-decoration: none; color: var(--green); }
.link-arrow::after { content: " →"; }
.link-arrow:hover { text-decoration: underline; }

/* FAQ */
.faq-wrap {
  display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(2rem, 6vw, 6rem);
}
.faq { border-top: 1px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--sand-2); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 1.5rem;
  padding: 1.4rem 0;
  font-size: 1.12rem; font-weight: 600; line-height: 1.4;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none;
  width: 12px; height: 12px;
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  transform: rotate(45deg) translate(-3px, -3px);
  transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq details p { color: var(--muted); padding-bottom: 1.4rem; margin: 0; max-width: 62ch; }

/* Contact */
.contact {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 6rem); align-items: start;
}
.contact-phone {
  display: inline-block; margin: .5rem 0 1.75rem;
  font-size: clamp(2rem, 1.4rem + 2vw, 2.9rem); font-weight: 600; letter-spacing: -.02em;
  text-decoration: none; color: var(--green);
  font-variant-numeric: tabular-nums;
}
.contact-list { margin: 0 0 2rem; border-top: 1px solid var(--line); }
.contact-list > div {
  display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem;
  padding: .95rem 0; border-bottom: 1px solid var(--line);
}
.contact-list dt { color: var(--muted); }
.contact-list dd { margin: 0; font-weight: 500; }

.map {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden; background: var(--sand);
}
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
.rdv-form {
  background: var(--sand); border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.5rem);
}
.rdv-form h3 { font-size: 1.5rem; margin-bottom: .35rem; }
.form-hint { font-size: .88rem; color: var(--muted); margin-bottom: 1.5rem; }
.field { margin-bottom: 1.1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field label { display: block; font-size: .93rem; font-weight: 500; margin-bottom: .4rem; }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: .75rem .9rem;
  border: 1px solid #c9c0b0; border-radius: 8px;
  background: var(--white); color: var(--ink);
  font: 400 1rem/1.4 var(--font);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
.field [aria-invalid="true"] { border-color: #b3261e; }
.field-check input { max-width: 8rem; }
.verif-question { font-weight: 600; white-space: nowrap; }
.hp-field {
  position: absolute !important; left: -9999px;
  width: 1px; height: 1px; overflow: hidden;
}
.form-status { margin: 1rem 0 0; font-size: .93rem; min-height: 1.2em; }
.form-status.is-error { color: #b3261e; }
.form-status.is-ok { color: #1f6b3a; }
.form-legal { font-size: .8rem; color: var(--muted); margin: .75rem 0 0; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--green-2); color: #a9bbb5; font-size: .95rem; }
.site-footer a { color: #e7eeeb; text-decoration: none; }
.site-footer a:hover { color: var(--beige); }
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 3rem;
  padding-top: 4.5rem; padding-bottom: 3.5rem;
}
.footer-logo {
  font-size: 2rem; font-weight: 700; letter-spacing: .06em;
  color: var(--white); margin-bottom: .9rem;
}
.footer-brand p:last-child { max-width: 36ch; }
.footer-title { font-weight: 600; color: var(--white); margin-bottom: 1rem; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; }
.footer-nav li { margin-bottom: .1rem; }
.footer-nav a { display: inline-block; padding: .4rem 0; }
.footer-contact address { line-height: 1.9; }

.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); }
.footer-bottom-inner {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding-top: 1.3rem; padding-bottom: 1.3rem;
  font-size: .85rem; color: #849a93;
}
.footer-bottom-inner p { margin: 0; }

/* Mention de réalisation : discrète, sans concurrencer la marque */
.credit { font-size: .8rem; color: #6f857e; }
.site-footer .credit a {
  display: inline-block;
  color: #a9bbb5;
  border-bottom: 1px solid rgba(169, 187, 181, .35);
  padding-bottom: 1px;
  transition: color .2s, border-color .2s;
}
.site-footer .credit a:hover,
.site-footer .credit a:focus-visible { color: var(--beige); border-bottom-color: var(--beige); }

.mobile-bar { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nav-phone { display: none; }
  .audience .container { grid-template-columns: 1fr; gap: 1.5rem; }
  .audience-list { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  :root { --header-h: 68px; }

  .nav-toggle { display: block; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 1.25rem;
    padding: .75rem 24px 1.75rem;
    background: var(--white); border-bottom: 1px solid var(--line);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { display: block; padding: .9rem 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav-actions { flex-direction: column; align-items: stretch; gap: .75rem; }
  .nav-phone { display: block; text-align: center; padding: .6rem; }

  .hero-top,
  .section-head,
  .about,
  .services,
  .why,
  .zone,
  .faq-wrap,
  .contact { grid-template-columns: 1fr; }

  .hero-top h1 { max-width: 16ch; }
  .hero-media img { aspect-ratio: 4 / 3; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts li:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts li:nth-child(n+3) { border-top: 1px solid var(--line); }

  .about-media img { aspect-ratio: 3 / 2; }
  .services-media,
  .why-media { position: static; }
  .services-media img,
  .why-media img { aspect-ratio: 3 / 2; }
  .zone-media { max-width: 520px; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  body { font-size: 1rem; padding-bottom: 64px; }

  .hero-actions .btn { width: 100%; }
  .hero-badge { left: 12px; bottom: 12px; padding: .7rem .9rem; }
  .badge-rating strong { font-size: 1.3rem; }
  .facts { grid-template-columns: 1fr; }
  .facts li,
  .facts li + li { padding: 1rem 0; border-left: 0; }
  .facts li + li { border-top: 1px solid var(--line); }

  .audience-list { grid-template-columns: 1fr 1fr; gap: 1.5rem 1rem; }
  .service h3 { font-size: 1.35rem; }
  .why-list > div { grid-template-columns: 1fr; gap: .3rem; }
  .steps { grid-template-columns: 1fr; }
  .step-num { margin-bottom: 1.25rem; }
  .places { grid-template-columns: 1fr; }
  .contact-list > div { grid-template-columns: 1fr; gap: .15rem; }
  .field-row { grid-template-columns: 1fr; gap: 0; }

  .footer-grid { grid-template-columns: 1fr; gap: 2rem; padding-top: 3rem; }

  /* Variante mobile plus discrète de la mention de réalisation */
  .footer-bottom-inner { flex-direction: column; align-items: center; text-align: center; gap: .5rem; }
  .credit { font-size: .74rem; opacity: .85; }

  .mobile-bar {
    display: grid; grid-template-columns: 1fr 1fr;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--white); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mobile-bar a {
    display: flex; align-items: center; justify-content: center;
    min-height: 56px; font-weight: 600; text-decoration: none;
  }
  .mobile-bar-call { background: var(--green); color: var(--white); }
  .mobile-bar-call:hover { color: var(--white); }
  .mobile-bar-rdv { color: var(--green); }
}

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

@media print {
  .site-header, .mobile-bar, .map, .rdv-form, .hero-actions { display: none !important; }
  body { padding: 0; }
  .section-green, .audience { background: #fff; color: #000; }
  .section-green h2, .section-green h3 { color: #000; }
}
