/* AG Tous Travaux — site final
   Direction : cadre rouge audacieux (réf. Roof Tark) + corps cartes crème premium (réf. Walker).
   Couleur dominante : rouge du logo. Bleu/orange/vert en micro-accents (services, zone). */

:root {
  --red: #BE1622;
  --orange: #EF7B22;
  --blue: #1D5DA9;
  --green: #149A67;
  --ink: #161617;
  --ink-soft: #3c3c3e;
  --muted: #6b6c6f;
  --paper: #F2F1EE;
  --cream: #DEDDD9;
  --sky: #F2F1EE;
  --white: #ffffff;
  --frame: 18px;
  --maxw: 1280px;
  --sans: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--red);
  -webkit-font-smoothing: antialiased;
  transition: background-color .45s ease;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ---------- Cadre rouge ---------- */
.frame {
  padding: var(--frame);
  min-height: 100vh;
}
.sheet {
  background: var(--paper);
  border-radius: 4px;
  overflow: clip;
}

/* ---------- Placeholder photo ---------- */
.ph {
  position: relative;
  background:
    repeating-linear-gradient(45deg, #e7e4de, #e7e4de 14px, #ddd9d1 14px, #ddd9d1 28px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.ph.dark {
  background:
    repeating-linear-gradient(45deg, #2e2e30, #2e2e30 14px, #39393b 14px, #39393b 28px);
}
.ph .cap {
  font: 12px/1.4 ui-monospace, 'SF Mono', Menlo, monospace;
  color: #8a8780;
  background: rgba(255,255,255,.72);
  padding: 7px 12px;
  width: 100%;
}
.ph.dark .cap { color: #9a9a9e; background: rgba(0,0,0,.35); }

/* ---------- Emplacements photo (image-slot) ---------- */
image-slot.imgslot { display: block; width: 100%; height: auto; vertical-align: top; }
.svc image-slot.imgslot { aspect-ratio: 4 / 3.1; }
.about-grid > image-slot.imgslot { aspect-ratio: 4 / 4.2; }
.svc-hero-grid > image-slot.imgslot { aspect-ratio: 4 / 3.4; }
.gallery image-slot.imgslot { aspect-ratio: 4 / 3.2; }

/* ---------- Carte (Google Maps intégrée) ---------- */
.map-card .map-embed { display: block; width: 100%; aspect-ratio: 4 / 3.4; border: 0; border-radius: 8px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  padding: 13px 24px;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.btn-red { background: var(--red); color: #fff; border-color: var(--red); }
.btn-red:hover { background: #a01019; border-color: #a01019; transform: translateY(-1px); }
.btn-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-dark:hover { transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-white { background: #fff; color: var(--red); border-color: #fff; }
.btn-white:hover { transform: translateY(-1px); }

/* ---------- Header ---------- */
.head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  background: var(--sky);
  position: relative;
  z-index: 5;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 44px; height: 44px; }
.brand .name { font-size: 14px; font-weight: 700; line-height: 1.18; letter-spacing: .01em; }
.brand .name small { display: block; font-weight: 400; font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { font-size: 14.5px; color: var(--ink); font-weight: 500; }
.nav a:hover { color: var(--red); }
.burger { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.burger span { width: 25px; height: 2.5px; background: var(--ink); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero { background: var(--sky); padding: 24px 40px 0; }
.hero-title {
  text-align: center;
  max-width: 980px;
  margin: 8px auto 0;
}
.hero-title .eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--red); margin-bottom: 18px;
  display: inline-flex; align-items: center; gap: 10px;
}
.hero-title .eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.hero-title h1 {
  font-size: clamp(40px, 7vw, 92px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.98;
  margin: 0;
}
.hero-title p {
  font-size: clamp(16px, 1.6vw, 21px);
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 20px auto 0;
  max-width: 620px;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }

.hero-photo-wrap { position: relative; margin-top: 34px; }
.hero-photo { aspect-ratio: 4 / 1.5; border-radius: 4px; }
video.hero-photo { width: 100%; object-fit: cover; display: block; background: #1b1b1d; }

/* Badge avis */
.badge {
  position: absolute; top: -34px; left: 48px;
  background: var(--red); color: #fff;
  padding: 20px 26px; border-radius: 10px; text-align: center;
  box-shadow: 0 18px 34px -14px rgba(190,22,34,.55);
  display: block;
  transition: transform .18s ease, box-shadow .18s ease;
}
.badge:hover { transform: translateY(-3px); box-shadow: 0 24px 40px -14px rgba(190,22,34,.6); }
.badge .stars { font-size: 14px; letter-spacing: 3px; }
.badge .score { font-size: 52px; font-weight: 800; line-height: 1.04; }
.badge .label { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }

/* Formulaire dans le hero */
.devis-card {
  position: absolute; right: 48px; top: 38px; width: 420px;
  background: rgba(255,255,255,.78); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 12px; padding: 26px 28px 24px;
  box-shadow: 0 24px 50px -20px rgba(20,40,60,.45);
}
.devis-card h3 { margin: 0 0 18px; font-size: 19px; font-weight: 700; }
.devis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; margin-bottom: 20px; }
.field { display: flex; flex-direction: column; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12.5px; color: #55565a; margin-bottom: 7px; }
.field input, .field select, .field textarea {
  font-family: var(--sans); font-size: 14.5px; color: var(--ink);
  border: none; border-bottom: 1.5px solid #8fa6b5; background: transparent;
  padding: 6px 2px; outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--red); }
.devis-card .btn { width: 100%; justify-content: center; }

/* ---------- Bandeau confiance ---------- */
.trust {
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--ink);
}
.trust div {
  padding: 22px 28px; color: #fff;
  border-left: 1px solid #2c2c2e;
  display: flex; align-items: baseline; gap: 12px;
}
.trust div:first-child { border-left: none; }
.trust .big { font-size: 30px; font-weight: 800; letter-spacing: -.01em; }
.trust .sm { font-size: 13.5px; color: #a3a3a6; }

/* ---------- Sections génériques ---------- */
.section { padding: 80px 40px; }
.section-head { max-width: var(--maxw); margin: 0 auto 44px; }
.kicker {
  font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--red); display: inline-flex; align-items: center; gap: 10px; margin-bottom: 16px;
}
.kicker .dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.section h2 { font-size: clamp(28px, 3.4vw, 46px); font-weight: 800; letter-spacing: -.02em; line-height: 1.05; margin: 0; }
.section .lead { font-size: clamp(17px, 1.7vw, 22px); line-height: 1.4; font-weight: 500; color: var(--ink-soft); margin: 18px 0 0; max-width: 720px; }

/* ---------- Prestations ---------- */
.services { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.svc { display: block; background: var(--cream); padding: 14px 14px 22px; border-radius: 6px; transition: transform .2s ease, box-shadow .2s ease; }
.svc:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -22px rgba(20,20,18,.4); }
.svc:hover .more { text-decoration: underline; }
.svc .ph { aspect-ratio: 4 / 3.1; border-radius: 4px; }
.svc .body { display: flex; gap: 14px; margin-top: 16px; padding: 0 6px; }
.svc .num { font-size: 50px; font-weight: 800; line-height: .9; color: var(--ink); }
.svc .num.c-red { color: var(--red); }
.svc .num.c-orange { color: var(--orange); }
.svc .num.c-blue { color: var(--blue); }
.svc h3 { margin: 2px 0 6px; font-size: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; line-height: 1.2; }
.svc p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.svc .more { margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--red); display: inline-flex; gap: 6px; }

/* ---------- À propos (cartes crème) ---------- */
.about { background: var(--cream); }
.about-grid { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center; }
.about .ph { aspect-ratio: 4 / 4.2; border-radius: 14px; }
.about p { font-size: 17px; line-height: 1.7; color: var(--ink-soft); margin: 0 0 28px; }
.feats { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; }
.feat { display: flex; gap: 12px; align-items: flex-start; }
.feat .dia { width: 9px; height: 9px; transform: rotate(45deg); margin-top: 6px; flex: none; }
.feat strong { font-size: 15px; }
.feat span { display: block; font-size: 13.5px; color: var(--muted); margin-top: 2px; }

/* ---------- Zone ---------- */
.zone { background: var(--ink); text-align: center; }
.zone h2 { color: #fff; }
.zone .lead { color: #a3a3a6; margin-left: auto; margin-right: auto; }
.chips { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; max-width: 760px; margin: 36px auto 0; }
.chip {
  font-size: 15px; font-weight: 600; color: #e8e6e1;
  border: 1px solid #3a3a3c; border-radius: 999px; padding: 11px 22px;
  display: inline-flex; align-items: center; gap: 10px;
}
.chip .dia { width: 8px; height: 8px; transform: rotate(45deg); }

/* ---------- Avis ---------- */
.reviews { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.review { background: #fff; border-radius: 10px; padding: 28px 26px; box-shadow: 0 14px 34px -22px rgba(20,20,18,.4); }
.review .stars { color: #E8A33D; font-size: 15px; letter-spacing: 2px; }
.review p { font-size: 15.5px; line-height: 1.6; color: var(--ink-soft); margin: 14px 0 18px; }
.review .who { font-size: 14px; font-weight: 700; }
.review .who span { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }

/* ---------- Contact ---------- */
.contact { background: var(--red); }
.contact-grid { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
.contact h2 { color: #fff; }
.contact .phone { font-size: clamp(30px, 4vw, 52px); font-weight: 800; color: #fff; letter-spacing: -.02em; margin: 18px 0; }
.contact .info { font-size: 16px; line-height: 1.95; color: #ffd9dc; }
.contact .info strong { color: #fff; }
.contact-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.map-card { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); border-radius: 14px; padding: 8px; }
.map-card .ph { aspect-ratio: 4 / 3.4; border-radius: 8px; }

/* ---------- Footer ---------- */
.foot { background: var(--paper); }
.foot-row { padding: 26px 40px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.foot .brand .name { font-size: 13px; }
.foot .slogan { font-size: 14px; font-style: italic; color: var(--muted); }
.foot-credit { padding: 14px 40px; border-top: 1px solid var(--cream); display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.foot-credit .dot-sep { opacity: .6; }
.foot-credit a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.foot-credit a:hover { color: var(--ink); }
.strip { display: grid; grid-template-columns: repeat(4, 1fr); height: 8px; width: 150px; border-radius: 2px; overflow: hidden; }
.strip i:nth-child(1){background:var(--red)} .strip i:nth-child(2){background:var(--orange)}
.strip i:nth-child(3){background:var(--blue)} .strip i:nth-child(4){background:var(--green)}

/* ---------- Barre d'appel mobile ---------- */
.callbar { display: none; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1100px) {
  .devis-card { position: static; width: auto; margin: 18px auto 0; max-width: 560px; backdrop-filter: none; background: #fff; }
  .hero-photo { aspect-ratio: 4 / 2.4; }
  .badge { top: -28px; left: 24px; padding: 16px 20px; }
  .badge .score { font-size: 40px; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .services, .reviews { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  :root { --frame: 10px; }
  .head { padding: 14px 16px; }
  .nav { display: none; }
  .head .btn-red { display: none; }
  .burger { display: flex; padding: 8px; margin: -8px; }
  .brand .name { font-size: 13px; }
  .brand img { width: 40px; height: 40px; }
  .hero { padding: 18px 16px 0; }
  .hero-title h1 { font-size: clamp(34px, 9vw, 92px); }
  .section { padding: 48px 16px; }
  .section-head { margin-bottom: 28px; }
  .trust { grid-template-columns: 1fr 1fr; }
  .trust div { border-left: none; border-top: 1px solid #2c2c2e; flex-direction: column; align-items: flex-start; gap: 2px; padding: 16px 18px; }
  .trust div:nth-child(-n+2) { border-top: none; }
  .trust div:nth-child(odd) { border-right: 1px solid #2c2c2e; }
  .trust .big { font-size: 26px; }
  .services, .reviews { grid-template-columns: 1fr; }
  .feats { grid-template-columns: 1fr; }
  .badge { left: 12px; top: -20px; padding: 12px 16px; }
  .badge .score { font-size: 32px; }
  .badge .label { font-size: 10px; }
  .devis-grid { grid-template-columns: 1fr; }
  .foot-row { flex-direction: column; align-items: flex-start; }
  body { padding-bottom: 64px; }
  .callbar {
    display: grid; grid-template-columns: 1fr 1fr;
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
    box-shadow: 0 -4px 18px rgba(0,0,0,.18);
  }
  .callbar a { text-align: center; padding: 17px 0; font-size: 15px; font-weight: 700; color: #fff; }
  .callbar .call { background: var(--green); }
  .callbar .quote { background: var(--ink); }
}

/* Menu mobile déroulant */
.mobile-menu { display: none; }
.mobile-menu.open { display: block; }
@media (max-width: 720px) {
  .mobile-menu {
    position: absolute; top: 100%; left: 0; right: 0; background: var(--sky);
    padding: 8px 18px 18px; box-shadow: 0 12px 24px -12px rgba(0,0,0,.2); z-index: 20;
  }
  .mobile-menu a { display: block; padding: 12px 0; font-size: 16px; font-weight: 600; border-top: 1px solid rgba(0,0,0,.08); }
}

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

/* ===================== SMOOTH PAGE TRANSITIONS ===================== */
html { scroll-behavior: smooth; }
body { animation: fadeIn .5s ease-out; }
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Enhanced hamburger menu animation */
.burger span {
  transition: transform .3s ease, opacity .3s ease, background .3s ease;
  transform-origin: center;
}
.burger.active span:nth-child(1) {
  transform: rotate(45deg) translateY(10px);
}
.burger.active span:nth-child(2) {
  opacity: 0;
}
.burger.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-10px);
}

/* Smooth mobile menu slide down */
.mobile-menu {
  animation: slideDown .3s ease-out;
  max-height: 0;
  overflow: hidden;
}
.mobile-menu.open {
  display: block;
  animation: slideDown .3s ease-out;
  max-height: 500px;
}
@keyframes slideDown {
  from {
    max-height: 0;
    opacity: 0;
  }
  to {
    max-height: 500px;
    opacity: 1;
  }
}

/* Section fade-in on scroll */
.section {
  animation: fadeInUp .6s ease-out;
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Link hover effects */
a {
  transition: color .2s ease, opacity .2s ease;
}
a:active {
  transform: scale(.98);
  transition: transform .1s ease;
}

/* Smooth button transitions */
.btn {
  transition: transform .2s cubic-bezier(.34, 1.56, .64, 1),
              background .2s ease,
              box-shadow .2s ease,
              color .2s ease;
}
.btn:active {
  transform: scale(.95);
}
