:root {
  --ink: #1f2a2e;
  --ink-2: #4a5559;
  --paper: #f7f3ec;
  --paper-2: #efe8dc;
  --white: #fffdf9;
  --line: #ddd3c3;
  --accent: #b5583a;      /* terre cuite */
  --accent-text: #a2482a; /* terre cuite foncée pour les petits textes (contraste AA) */
  --lake: #2f6f86;        /* Léman */
  --wa: #25d366;
  --wa-dark: #128c4b;
  --radius: 14px;
  --shadow: 0 10px 30px -12px rgba(31, 42, 46, .25);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper); line-height: 1.6; font-size: 17px; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5.5vw, 3.8rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--lake); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1140px, 100% - 32px); margin-inline: auto; }
.ico { width: 1.25em; height: 1.25em; flex: none; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55em; padding: .8em 1.3em; border-radius: 999px; font-weight: 600; text-decoration: none; border: 2px solid transparent; cursor: pointer; font: inherit; font-weight: 600; transition: transform .15s, background .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-1px); }
.btn--wa { background: var(--wa-dark); color: #fff; box-shadow: 0 8px 20px -8px rgba(18, 140, 75, .6); }
.btn--wa:hover { background: #0f7a41; }
.btn--ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.1); }
.btn--sm { padding: .5em 1em; font-size: .95rem; }
.btn--lg { padding: 1em 1.6em; font-size: 1.05rem; }
.btn--block { width: 100%; }
.btn--line { border-color: var(--line); color: var(--ink); background: var(--white); }

/* ---------- En-tête ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(247, 243, 236, .92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.topbar__in { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo { display: flex; align-items: center; text-decoration: none; margin: 0; --lg-t: #b2502b; --lg-g: #535d60; }
.logo__svg { height: 48px; width: auto; aspect-ratio: 1240 / 392; display: block; }
.logo--foot { margin-bottom: 16px; --lg-t: #d0663d; --lg-g: #f2ebdd; }
.logo--foot .logo__svg { height: auto; width: min(260px, 100%); aspect-ratio: 1290 / 596; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a:not(.btn) { text-decoration: none; font-weight: 500; color: var(--ink-2); }
.nav a:not(.btn):hover { color: var(--accent); }

/* ---------- Accueil ---------- */
.hero { position: relative; overflow: hidden; background: var(--ink); color: #fff; }
.hero__tiles { position: absolute; inset: 0; opacity: .5;
  background:
    radial-gradient(120% 90% at 85% 10%, rgba(47,111,134,.55), transparent 60%),
    radial-gradient(90% 80% at 0% 100%, rgba(181,88,58,.45), transparent 60%),
    repeating-linear-gradient(0deg, transparent 0 58px, rgba(255,255,255,.06) 58px 60px),
    repeating-linear-gradient(90deg, transparent 0 58px, rgba(255,255,255,.06) 58px 60px);
}
.hero.has-photo .hero__tiles { opacity: 1; background-size: cover; background-position: center; }
.hero.has-photo .hero__tiles::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,28,31,.88), rgba(20,28,31,.45)); }
.hero__in { position: relative; padding: clamp(64px, 11vw, 130px) 0 clamp(56px, 9vw, 110px); }
.hero__in > * { max-width: 780px; }
.hero h1 em { font-style: italic; color: #f0c2a8; }
.hero__lead { font-size: clamp(1.05rem, 1.8vw, 1.25rem); color: rgba(255,255,255,.85); max-width: 620px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 28px; }
.hero__points { display: flex; flex-wrap: wrap; gap: 10px 26px; list-style: none; padding: 0; margin: 0; color: rgba(255,255,255,.8); font-size: .95rem; }
.hero__points li::before { content: "✓"; color: var(--wa); font-weight: 700; margin-right: .45em; }

.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; font-weight: 700; color: #f0c2a8; margin-bottom: 14px; }
.eyebrow--dark { color: var(--accent-text); }

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 200; background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 8px; text-decoration: none; font-weight: 600; }
.skip-link:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.subnav { display: none; }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 110px) 0; }
.section--alt { background: var(--paper-2); }
.section--dark { background: var(--ink); color: #fff; }
.section__head { max-width: 720px; margin-bottom: 44px; }
.section__lead { color: var(--ink-2); font-size: 1.08rem; }

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.svc { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px 20px; transition: transform .2s, box-shadow .2s, border-color .2s; }
.svc:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.svc__ico { width: 40px; height: 40px; color: var(--accent); margin-bottom: 14px; }
.svc p { color: var(--ink-2); font-size: .97rem; margin: 0; }
.svc--more { background: transparent; border-style: dashed; }
.svc--more .svc__ico { color: var(--lake); }

/* ---------- Réalisations ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.filters button { font: inherit; font-size: .92rem; padding: .45em 1em; border-radius: 999px; border: 1px solid var(--line); background: var(--white); color: var(--ink-2); cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.shot { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; background: var(--line); cursor: zoom-in; border: 0; padding: 0; font: inherit; text-align: left; color: #fff; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.shot:hover img { transform: scale(1.04); }
.shot__cap { position: absolute; inset: auto 0 0 0; padding: 40px 16px 14px; background: linear-gradient(transparent, rgba(0,0,0,.72)); }
.shot__cap strong { display: block; font-size: 1rem; }
.shot__cap span { font-size: .85rem; opacity: .85; }
.shot--empty { cursor: default; display: grid; place-items: center; text-align: center; color: var(--ink-2); background:
  repeating-linear-gradient(45deg, var(--white) 0 14px, #f3ede3 14px 28px); border: 1px dashed var(--line); }
.shot--empty svg { width: 36px; height: 36px; color: var(--accent); margin: 0 auto 8px; display: block; }
.shot--empty small { display: block; font-size: .82rem; opacity: .8; }
.gallery__note { grid-column: 1 / -1; color: var(--ink-2); font-size: .95rem; margin: 6px 0 0; }

/* ---------- Chantier à la une ---------- */
.story { list-style: none; margin: 0 0 22px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: etape; }
.step { display: flex; flex-direction: column; background: var(--white); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); min-width: 0; }
.step__pic { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; max-width: 100%; padding: 0; border: 0; cursor: zoom-in; background: var(--line); overflow: hidden; }
.step__pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.step__pic:hover img { transform: scale(1.04); }
.step--apres .step__pic img { object-position: 50% 35%; }
.step__tag { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 8px; padding: .3em .8em .3em .35em; border-radius: 999px; background: rgba(20, 28, 31, .82); color: #fff; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.step__tag::before { counter-increment: etape; content: counter(etape); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--paper); color: var(--ink); font-size: .78rem; letter-spacing: 0; }
.step--apres .step__tag { background: var(--wa-dark); }
.step__body { padding: 16px 18px 18px; }
.step__body h3 { font-size: 1.05rem; margin-bottom: .35em; }
.step__body p { margin: 0; color: var(--ink-2); font-size: .93rem; }

.plans { display: grid; grid-template-columns: 1fr 1.2fr; gap: 16px; }
.plan { margin: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.plan__pic { display: block; width: 100%; padding: 14px; border: 0; background: #fff; cursor: zoom-in; flex: 1; }
.plan__pic img { width: 100%; height: 100%; max-height: 360px; object-fit: contain; margin: 0 auto; }
.plan figcaption { padding: 12px 18px 16px; border-top: 1px solid var(--line); font-size: .93rem; color: var(--ink-2); }
.plan figcaption strong { display: block; color: var(--ink); font-family: var(--serif); font-size: 1.05rem; }

/* ---------- Équipe ---------- */
.team { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.member { display: flex; gap: 20px; align-items: flex-start; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.member__pic { width: 86px; height: 86px; border-radius: 50%; flex: none; display: grid; place-items: center; font-family: var(--serif); font-size: 1.9rem; font-weight: 700; color: #fff; background: var(--accent); overflow: hidden; }
.member:nth-child(2) .member__pic { background: var(--lake); }
.member__pic img { width: 100%; height: 100%; object-fit: cover; }
.member h3 { margin-bottom: .1em; }
.member .member__place { font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; color: var(--lake); margin: 0 0 .2em; }
.member .member__role { font-weight: 600; color: var(--accent-text); font-size: .95rem; margin: 0 0 .7em; }
.member p { color: var(--ink-2); font-size: .97rem; }
.member__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.member__btns .btn { padding: .55em 1em; font-size: .93rem; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact__intro p { color: rgba(255,255,255,.82); }
.contact__direct { font-size: .98rem; }
.contact__direct a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,.5); }
.contact__direct a:hover { color: #f0c2a8; }
.form .opt { display: inline; font-weight: 400; color: var(--ink-2); font-size: .85rem; margin: 0; }
.contact__zone { font-size: .95rem; border-left: 3px solid var(--accent); padding-left: 14px; }
.steps { list-style: none; padding: 0; margin: 28px 0; display: grid; gap: 12px; }
.steps li { display: flex; align-items: center; gap: 14px; font-weight: 500; }
.steps span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.1); color: #f0c2a8; font-weight: 700; flex: none; }

.form { background: var(--white); color: var(--ink); border-radius: 20px; padding: clamp(22px, 4vw, 36px); box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); }
.form fieldset { border: 0; padding: 0; margin: 0 0 20px; }
.form legend, .form label { font-weight: 600; font-size: .95rem; margin-bottom: 8px; display: block; padding: 0; }
.field { margin-bottom: 18px; }
.field input, .field textarea, .field select { width: 100%; font: inherit; font-size: 1rem; padding: .8em .9em; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--lake); outline: none; box-shadow: 0 0 0 3px rgba(47,111,134,.18); }
.field textarea { resize: vertical; min-height: 110px; }
.field .is-bad { border-color: #c0392b; }

.who { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.who label, .chips label { position: relative; }
.who label { margin: 0; cursor: pointer; }
.who input { position: absolute; opacity: 0; pointer-events: none; }
.who span { display: flex; flex-direction: column; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; font-weight: 600; transition: border-color .15s, background .15s; }
.who small { font-weight: 400; color: var(--ink-2); font-size: .85rem; }
.who input:checked + span { border-color: var(--wa-dark); background: #eefaf2; box-shadow: inset 0 0 0 1px var(--wa-dark); }
.who input:focus-visible + span { outline: 3px solid var(--lake); outline-offset: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { margin: 0; cursor: pointer; font-weight: 500; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span { display: inline-block; padding: .45em .95em; border-radius: 999px; border: 1.5px solid var(--line); font-size: .93rem; transition: all .15s; }
.chips input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.chips input:focus-visible + span { outline: 3px solid var(--lake); outline-offset: 2px; }

.form__err { background: #fdecea; color: #922; padding: 10px 14px; border-radius: 10px; font-size: .95rem; }
.form__note { font-size: .82rem; color: var(--ink-2); text-align: center; margin: 12px 0 0; }

/* ---------- Pied de page ---------- */
.footer { background: #172023; color: rgba(255,255,255,.75); padding: 48px 0 20px; font-size: .95rem; }
.footer__in { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr; gap: 32px; align-items: start; }
.logo--foot .logo__txt { color: rgba(255,255,255,.6); }
.footer__contacts a { display: flex; align-items: center; gap: .5em; text-decoration: none; color: #fff; margin-bottom: 8px; }
.footer__contacts a:hover { color: #f0c2a8; }
.footer__legal summary { cursor: pointer; color: #fff; font-weight: 600; margin-bottom: 8px; }
.footer__legal p { font-size: .85rem; }
.footer__copy { border-top: 1px solid rgba(255,255,255,.1); margin-top: 32px; padding-top: 16px; font-size: .82rem; opacity: .6; }

/* ---------- Bouton flottant ---------- */
.fab { position: fixed; right: calc(18px + env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 60; width: 60px; height: 60px; border-radius: 50%; background: var(--wa-dark); color: #fff; display: none; place-items: center; box-shadow: 0 10px 25px -6px rgba(0,0,0,.4); transition: opacity .2s, transform .2s; }
.fab svg { width: 32px; height: 32px; }
.fab--hidden { opacity: 0; pointer-events: none; transform: translateY(12px); }

/* ---------- Visionneuse (dialog natif) ---------- */
.lightbox { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; border: 0; z-index: 100; background: rgba(10,14,16,.94); place-items: center; padding: 20px; color: #fff; }
.lightbox[open] { display: grid; }
.lightbox::backdrop { background: rgba(10,14,16,.6); }
.lightbox figure { margin: 0; max-width: min(1100px, 100%); }
.lightbox img { max-height: 80vh; width: auto; margin: 0 auto; border-radius: 8px; }
.lightbox figcaption { color: #fff; text-align: center; margin-top: 12px; }
.lightbox button { position: absolute; background: rgba(255,255,255,.1); color: #fff; border: 0; width: 52px; height: 52px; border-radius: 50%; font-size: 2rem; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: rgba(255,255,255,.2); }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 16px; top: 50%; transform: translateY(-50%); }

/* ---------- Mobile ---------- */
@media (max-width: 1000px) {
  .story { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 880px) {
  html { scroll-padding-top: 112px; }
  .nav a:not(.btn) { display: none; }
  .subnav { display: flex; gap: 20px; overflow-x: auto; padding-block: 2px 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .subnav::-webkit-scrollbar { display: none; }
  .subnav a { flex: none; white-space: nowrap; text-decoration: none; font-weight: 500; font-size: .95rem; color: var(--ink-2); padding: 4px 0; }
  .plans { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
  .footer__in { grid-template-columns: 1fr; }
  .fab { display: grid; }
  .hide-sm { display: none; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .hero__cta .btn { width: 100%; }
  .who { grid-template-columns: 1fr; }
  .story { grid-template-columns: 1fr; }
  .member { flex-direction: column; }
  .logo__svg { height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
