/* =========================================================
   Khoury Entreprise — site vitrine
   Design tokens issus du handoff "Plomberie Marceau.dc.html"
   ========================================================= */

:root {
  /* Couleurs */
  --navy:        #123A66;
  --navy-dark:   #0E2C4E;
  --navy-deep:   #14243A;
  --gold:        #C9A24B;
  --cream:       #F6F3EE;
  --white:       #FFFFFF;
  --beige:       #E7E1D6;
  --field-border:#E1DED4;
  --ink:         #1C2A24;
  --ink-2:       #4A5852;
  --ink-3:       #7A7264;
  --on-navy:     #B9C6D6;
  --on-footer:   #8FA0B4;
  --ok-bg:       #F1F6EE;
  --ok-border:   #CBDDC0;
  --ok-text:     #2F5C2A;
  --ok-icon:     #4A8B3F;
  --err:         #A32B2B;

  /* Typo */
  --font-display: 'Bricolage Grotesque', 'Trebuchet MS', sans-serif;
  --font-body:    'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'Space Grotesk', ui-monospace, monospace;

  /* Divers */
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 14px;
  --pill: 100px;
  --pad-x: 46px;
  --nav-h: 106px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--cream);
  font-family: var(--font-body);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

.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;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 0 0 10px 0;
  font-weight: 700; font-size: 14px;
}
.skip-link:focus { left: 0; }

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

/* --------------------------------------------------------- shell */
/* Pleine largeur : les fonds de section vont d'un bord à l'autre,
   le contenu reste centré sur 1200px grâce à --gutter. */
.shell {
  width: 100%;
  background: var(--cream);
  overflow: hidden;
}

/* Marge latérale : 46px minimum, puis ce qu'il faut pour recentrer
   le contenu sur 1200px quand l'écran est plus large. */
.nav,
.services,
.works,
.quote,
.footer,
.legal { padding-inline: max(var(--pad-x), calc((100% - 1200px) / 2)); }

.hero { padding-left: max(var(--pad-x), calc((100% - 1200px) / 2)); }

/* --------------------------------------------------------- boutons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: none;
  border-radius: var(--pill);
  font-family: var(--font-body);
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease, background .15s ease;
  text-align: center;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }

.btn--gold { background: var(--gold); color: var(--navy-deep); padding: 15px 26px; font-size: 16px; }
.btn--navy { background: var(--navy); color: #fff; padding: 15px 26px; font-size: 16px; }
.btn--block { width: 100%; padding: 15px; font-family: var(--font-display); }

/* --------------------------------------------------------- nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 24px;
  background: var(--cream);
  transition: box-shadow .2s ease, padding .2s ease;
}
.nav.is-stuck {
  box-shadow: 0 6px 24px rgba(28, 42, 36, .10);
  padding-top: 16px;
  padding-bottom: 16px;
}

.nav__logo { display: flex; align-items: center; gap: 12px; }
.nav__logo img { height: 58px; width: auto; display: block; transition: height .2s ease; }
.nav.is-stuck .nav__logo img { height: 46px; }

.nav__wordmark { line-height: 1; display: block; }
.nav__name {
  display: block;
  font-family: var(--font-display);
  font-weight: 700; font-size: 22px; letter-spacing: .01em;
  color: var(--navy);
}
.nav__sub {
  display: block;
  font-family: var(--font-mono);
  font-weight: 500; font-size: 11px; letter-spacing: .34em;
  text-transform: uppercase; color: var(--gold); margin-top: 3px;
}

.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a {
  font-weight: 600; font-size: 15px; color: var(--ink-2);
  transition: color .15s ease;
}
.nav__links a:hover,
.nav__links a.is-active { color: var(--navy); }
.nav__cta-mobile { display: none; }

.nav__right { display: flex; align-items: center; gap: 12px; }
.nav__cta { padding: 12px 22px; font-size: 14px; }

.nav__burger {
  display: none;
  width: 46px; height: 46px;
  border: 1px solid var(--beige);
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  padding: 0;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
}
.nav__burger span {
  display: block; width: 20px; height: 2px; background: var(--navy);
  border-radius: 2px; transition: transform .2s ease, opacity .2s ease;
}
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --------------------------------------------------------- commun */
.eyebrow {
  display: block;
  font-family: var(--font-display);
  font-style: italic; font-weight: 600; font-size: 18px;
  color: var(--gold);
}

section { scroll-margin-top: calc(var(--nav-h) + 8px); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em; }

.ico { width: 1em; height: 1em; fill: var(--gold); flex: none; }

/* --------------------------------------------------------- hero */
.hero {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  align-items: stretch;
}
.hero__text {
  padding: 72px var(--pad-x) 72px 0;
  display: flex; flex-direction: column; justify-content: center;
}
.hero__text h1 {
  font-size: clamp(34px, 4.6vw, 56px);
  max-width: 640px;
  line-height: 1.02;
  margin: 14px 0 20px;
}
.hero__text p {
  font-size: 17px; line-height: 1.65; color: var(--ink-2);
  max-width: 440px; margin: 0 0 30px;
}
.hero__cta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.hero__phone {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: 16px; color: var(--navy);
  padding: 15px 4px;
}
.hero__phone .ico { font-size: 18px; }

.hero__media {
  position: relative;
  min-height: 440px;
  background: var(--beige);
  border-left: 6px solid var(--gold);
  overflow: hidden;
}
.hero__media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 22%;
  display: block;
}

/* --------------------------------------------------------- services */
.services { padding-block: 66px; background: var(--white); }
.services__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 32px; margin-bottom: 36px;
}
.services__head h2 {
  font-size: clamp(28px, 3.2vw, 38px);
  margin: 0; max-width: 420px; line-height: 1.05;
}
.services__head p { font-size: 15px; color: var(--ink-3); max-width: 300px; margin: 0; }

.services__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--beige);
}
.service {
  display: flex; gap: 18px;
  padding: 28px 28px 28px 0;
  border-bottom: 1px solid var(--beige);
}
.service:nth-child(odd) { border-right: 1px solid var(--beige); }
.service:nth-child(even) { padding: 28px 0 28px 28px; }
.service__num {
  font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--gold);
}
.service h3 { font-size: 20px; margin: 0 0 6px; }
.service p { font-size: 15px; line-height: 1.55; color: var(--ink-3); margin: 0; }

/* --------------------------------------------------------- réalisations */
.works { padding-block: 66px; }
.works h2 { font-size: clamp(26px, 3vw, 34px); margin: 10px 0 8px; }
.works__hint { font-size: 14px; color: var(--ink-3); margin: 0 0 28px; }

.works__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: start;
}

.ba {
  position: relative;
  height: 500px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--navy-deep);
  cursor: ew-resize;
  user-select: none;
  touch-action: none;
}
.ba img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 50%;
  display: block;
}
.ba__after { pointer-events: none; }
.ba__after--contain { object-fit: contain; }
.ba__before-wrap {
  position: absolute; inset: 0;
  overflow: hidden; pointer-events: none;
  clip-path: inset(0 50% 0 0);
}
.ba__handle {
  position: absolute; top: 0; bottom: 0;
  width: 2px;
  left: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(28, 42, 36, .18);
}
.ba__knob {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #fff; color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(28, 42, 36, .28);
}
.ba__knob svg { width: 17px; height: 17px; fill: var(--navy); }

.ba__tag {
  position: absolute; bottom: 14px;
  font-family: var(--font-mono); font-size: 12px;
  padding: 5px 10px; border-radius: 6px;
  pointer-events: none;
}
.ba__tag--before { left: 14px; color: #fff; background: rgba(18, 58, 102, .82); }
.ba__tag--after  { right: 14px; color: var(--navy-deep); background: var(--gold); }

/* --------------------------------------------------------- devis */
.quote { padding-block: 0 66px; }
.quote__card {
  border-radius: var(--radius-lg);
  background: var(--navy);
  padding: 52px 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  color: #fff;
}
.quote__intro h2 { font-size: clamp(26px, 3vw, 34px); margin: 0 0 14px; }
.quote__intro > p {
  font-size: 16px; line-height: 1.6; color: var(--on-navy);
  margin: 0 0 28px; max-width: 360px;
}
.quote__contacts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.quote__contacts li { display: flex; align-items: center; gap: 12px; font-size: 16px; }
.quote__contacts .ico { font-size: 22px; }
.quote__contacts a { border-bottom: 1px solid transparent; transition: border-color .15s ease; }
.quote__contacts a:hover { border-color: var(--gold); }

.quote__form { background: #fff; border-radius: var(--radius-md); padding: 26px; color: var(--ink); }
.quote__form form { display: flex; flex-direction: column; gap: 12px; }
.field-row { display: flex; gap: 12px; }
.field { flex: 1; min-width: 0; }

.quote__form input[type="text"],
.quote__form input[type="tel"],
.quote__form input[type="email"],
.quote__form textarea {
  width: 100%;
  padding: 14px 15px;
  border: 1px solid var(--field-border);
  border-radius: 10px;
  color: var(--ink);
  font-size: 14px;
  font-family: var(--font-body);
  background: #fff;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.quote__form textarea { height: 96px; resize: vertical; }
.quote__form input:focus,
.quote__form textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 75, .22);
}
.quote__form input.is-invalid,
.quote__form textarea.is-invalid { border-color: var(--err); }
::placeholder { color: #A49C8E; opacity: 1; }

/* honeypot : display:none, sinon les navigateurs le remplissent automatiquement */
.hp { display: none; }

.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; line-height: 1.5; color: var(--ink-3); }
.consent input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--navy); flex: none; }
.consent a { text-decoration: underline; }

.form-error { margin: 0; font-size: 13px; color: var(--err); font-weight: 600; }

.form-ok {
  display: flex; align-items: center; gap: 11px;
  padding: 14px 16px; border-radius: 12px;
  background: var(--ok-bg); border: 1px solid var(--ok-border);
  color: var(--ok-text); font-size: 14px; line-height: 1.5;
}
.form-ok svg { width: 22px; height: 22px; fill: var(--ok-icon); flex: none; }

/* --------------------------------------------------------- footer */
.footer {
  background: var(--navy-dark);
  color: var(--on-footer);
  padding-block: 32px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; font-size: 14px; flex-wrap: wrap;
}
.footer__brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.footer__brand img { height: 40px; width: auto; display: block; }
.footer__brand span { font-family: var(--font-display); font-weight: 700; }
.footer__legal { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.footer__legal a { border-bottom: 1px solid rgba(143, 160, 180, .5); }
.footer__legal a:hover { color: #fff; border-color: #fff; }

/* Accès à l'espace de suivi des demandes : visible pour l'artisan,
   discret pour les visiteurs. */
.footer__intranet {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(143, 160, 180, .65);
  border-bottom-color: transparent !important;
}
.footer__intranet:hover { color: var(--gold) !important; border-bottom-color: var(--gold) !important; }

/* --------------------------------------------------------- bouton appel mobile */
.call-fab {
  display: none;
  position: fixed; right: 16px; bottom: 16px; z-index: 50;
  align-items: center; gap: 8px;
  padding: 14px 20px;
  border-radius: var(--pill);
  background: var(--navy);
  color: #fff; font-weight: 700; font-size: 15px;
  box-shadow: 0 10px 24px rgba(14, 44, 78, .35);
}
.call-fab svg { width: 18px; height: 18px; fill: var(--gold); }

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1100px) {
  .works__grid { grid-template-columns: repeat(2, 1fr); }
  .ba { height: 420px; }
}

@media (max-width: 900px) {
  :root { --pad-x: 26px; --nav-h: 90px; }

  .shell { width: 100%; margin: 0; border-radius: 0; box-shadow: none; }

  /* nav mobile */
  .nav { flex-wrap: wrap; padding-block: 16px; }
  .nav__burger { display: flex; }
  .nav__cta { display: none; }
  .nav__links {
    display: none;
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-top: 8px;
    border-top: 1px solid var(--beige);
    margin-top: 12px;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 14px 2px; font-size: 16px; border-bottom: 1px solid var(--beige); }
  .nav__links a:last-child { border-bottom: none; }
  .nav__links .nav__cta-mobile {
    display: inline-flex; justify-content: center;
    margin-top: 12px; border-bottom: none;
  }

  /* hero */
  .hero { grid-template-columns: 1fr; padding-left: 0; }
  .hero__text { padding: 44px var(--pad-x) 32px; }
  .hero__text h1 { max-width: none; }
  .hero__text p { max-width: none; }
  .hero__cta { gap: 10px; }
  .btn--navy, .btn--gold { padding: 15px 22px; }
  /* portrait recadré : en pleine largeur le visage devient énorme,
     on le contient dans une colonne centrée */
  .hero__media {
    width: min(100%, 460px);
    margin: 0 auto;
    min-height: clamp(320px, 78vw, 460px);
    border-left: none;
    border-top: 6px solid var(--gold);
  }
  .hero__media img { object-position: 50% 16%; }

  /* services */
  .services { padding-block: 48px; }
  .services__head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .services__grid { grid-template-columns: 1fr; }
  .service,
  .service:nth-child(even) { padding: 22px 0; border-right: none; }

  /* réalisations */
  .works { padding-block: 48px; }
  .works__grid { grid-template-columns: 1fr; gap: 14px; }
  .ba { height: 62vw; min-height: 300px; max-height: 460px; }

  /* devis */
  .quote { padding-block: 0 48px; }
  .quote__card { grid-template-columns: 1fr; gap: 30px; padding: 32px 24px; }
  .quote__intro > p { max-width: none; }
  .quote__contacts li { font-size: 15px; align-items: flex-start; }

  /* footer */
  .footer { flex-direction: column; align-items: flex-start; gap: 14px; padding-bottom: 96px; }

  .call-fab { display: inline-flex; }
}

@media (max-width: 560px) {
  .field-row { flex-direction: column; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { width: 100%; }
  .hero__phone { justify-content: center; }
}

@media print {
  .nav, .call-fab, .ba__handle, .btn { box-shadow: none; }
  .shell { box-shadow: none; margin: 0; }
}
