:root {
  --green: #1f4e46;
  --green-2: #2f7a6d;
  --terracotta: #c8643b;
  --terracotta-dark: #a94f2b;
  --saffron: #e9c46a;
  --sand: #f6efe3;
  --sand-2: #efe4d2;
  --ink: #1d2422;
  --muted: #5c6662;
  --white: #fffdf9;
  --radius: 14px;
  --font-head: "Marcellus", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.lang-ar { --font-head: "Noto Kufi Arabic", sans-serif; --font-body: "Noto Kufi Arabic", sans-serif; }
.lang-zgh { --font-head: "Noto Sans Tifinagh", "Marcellus", serif; --font-body: "Noto Sans Tifinagh", "Inter", sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--green); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 400; line-height: 1.2; margin: 0 0 .5em; }
.lang-ar h1, .lang-ar h2, .lang-ar h3 { font-weight: 600; line-height: 1.5; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); text-align: center; }
h3 { font-size: 1.2rem; }

.wrap { width: min(1140px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); }
.center { text-align: center; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 253, 249, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--sand-2);
}
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: "Marcellus", serif; font-size: 1.15rem; white-space: nowrap; }
.main-nav { display: flex; gap: 22px; margin-inline-start: auto; }
.main-nav a { text-decoration: none; color: var(--muted); font-size: .95rem; }
.main-nav a:hover { color: var(--green); }
.langs { display: flex; gap: 4px; flex-wrap: wrap; }
.langs a { text-decoration: none; font-size: .82rem; padding: 4px 8px; border-radius: 999px; color: var(--muted); font-family: "Inter", "Noto Kufi Arabic", "Noto Sans Tifinagh", sans-serif; }
.langs a[aria-current] { background: var(--green); color: var(--white); }
.lang-menu { position: relative; }
.lang-menu summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border: 1px solid var(--sand-2); border-radius: 999px; color: var(--ink);
  font-size: .9rem; font-family: "Inter", "Noto Kufi Arabic", "Noto Sans Tifinagh", sans-serif; background: var(--white);
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover, .lang-menu[open] summary { border-color: var(--green); color: var(--green); }
.lang-menu .chev { transition: transform .2s; }
.lang-menu[open] .chev { transform: rotate(180deg); }
.lang-list {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); min-width: 170px; z-index: 40;
  background: var(--white); border: 1px solid var(--sand-2); border-radius: 12px; padding: 6px;
  box-shadow: 0 18px 40px -20px rgba(31, 78, 70, .45); display: grid;
}
.lang-list a {
  text-decoration: none; color: var(--ink); padding: 9px 12px; border-radius: 8px; font-size: .95rem;
  font-family: "Inter", "Noto Kufi Arabic", "Noto Sans Tifinagh", sans-serif;
}
.lang-list a:hover { background: var(--sand); }
.lang-list a[aria-current] { background: var(--green); color: var(--white); }

/* Buttons */
.btn {
  display: inline-block; border: 0; cursor: pointer;
  background: var(--terracotta); color: #fff;
  padding: 14px 24px; border-radius: 999px;
  font: 600 1rem var(--font-body); text-decoration: none;
  transition: background .2s, transform .2s;
}
.btn:hover { background: var(--terracotta-dark); transform: translateY(-1px); }
.btn-small { padding: 9px 16px; font-size: .9rem; white-space: nowrap; }
.btn-ghost { background: transparent; color: var(--green); box-shadow: inset 0 0 0 1.5px var(--green); }
.btn-ghost:hover { background: var(--green); color: #fff; }

/* Hero */
.hero {
  background:
    linear-gradient(var(--sand), rgba(246, 239, 227, .94)),
    url("img/zellige-light.svg") 0 0 / 80px;
  padding: clamp(48px, 8vw, 96px) 0;
}
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; color: var(--terracotta); font-weight: 600; font-size: .85rem; margin: 0 0 12px; }
h1 .eyebrow { display: block; font-family: var(--font-body); line-height: 1.4; }
.lang-ar .eyebrow, .lang-zgh .eyebrow { letter-spacing: 0; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 38em; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0; }
.badges { list-style: none; padding: 0; margin: 0; display: flex; gap: 18px; flex-wrap: wrap; color: var(--green); font-weight: 500; font-size: .95rem; }
.badges li::before { content: "✦"; color: var(--terracotta); margin-inline-end: 6px; }

/* Arcade marocaine : forme d'arc outrepassé */
.arch-frame, .arch .placeholder, .arch img {
  border-radius: 999px 999px var(--radius) var(--radius);
  overflow: hidden;
}
.arch-frame { aspect-ratio: 4 / 5; box-shadow: 0 0 0 10px var(--white), 0 0 0 11px var(--sand-2), 0 30px 60px -30px rgba(31, 78, 70, .45); }
.arch-frame > * { width: 100%; height: 100%; object-fit: cover; }

/* Portrait détouré dans une arche verte à motif zellige ; la tête dépasse de l'arche. */
.portrait-arch { position: relative; aspect-ratio: 4 / 5; margin-top: 12%; }
.portrait-arch::before {
  content: ""; position: absolute; inset: 0;
  border-radius: 999px 999px var(--radius) var(--radius);
  background: linear-gradient(rgba(31, 78, 70, .9), rgba(31, 78, 70, .9)), url("img/zellige.svg") 0 0 / 80px;
  box-shadow: 0 0 0 10px var(--white), 0 0 0 11px var(--sand-2), 0 30px 60px -30px rgba(31, 78, 70, .45);
}
.portrait-arch img {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  height: 112%; width: auto; max-width: none;
  border-radius: 0 0 var(--radius) var(--radius);
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .25));
}

.placeholder { background: url("img/zellige.svg") 0 0 / 80px; width: 100%; height: 100%; min-height: 200px; }
.placeholder.p1 { background-size: 60px; filter: hue-rotate(150deg) saturate(.8); }
.placeholder.p2 { background-size: 100px; filter: sepia(.35); }

.zellige-band { height: 22px; background: url("img/zellige.svg") 0 0 / 22px; }

/* Sections */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-intro { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 40px; }
.section-tint { background: var(--sand); }
.section-dark { background: var(--green); color: var(--sand); }
.section-dark h2 { color: #fff; }

.grid { display: grid; gap: 20px; }
.services { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--white); border: 1px solid var(--sand-2); border-radius: var(--radius); padding: 28px; transition: box-shadow .2s, transform .2s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -24px rgba(31, 78, 70, .4); }
.card p { color: var(--muted); margin: 0; }
.icon { width: 40px; height: 40px; color: var(--terracotta); margin-bottom: 14px; }

.why { grid-template-columns: repeat(4, 1fr); margin-top: 32px; }
.why-item { text-align: center; }
.why-item p { color: var(--muted); }
.num {
  display: inline-grid; place-items: center; width: 48px; height: 48px; margin-bottom: 12px;
  background: var(--green); color: var(--saffron); font-family: "Marcellus", serif; font-size: 1.3rem;
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
}

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.arch { margin: 0; }
.arch img, .arch .placeholder { aspect-ratio: 4 / 5; width: 100%; height: auto; object-fit: cover; }
.arch figcaption { text-align: center; margin-top: 10px; color: var(--muted); font-size: .95rem; }
.videos-title { text-align: center; margin: 56px 0 20px; }
.videos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 900px; margin: 0 auto; }
.videos video { width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 160px 160px 12px 12px; background: var(--sand-2); }
.link { font-weight: 600; color: var(--terracotta); text-decoration: none; display: inline-block; margin-top: 28px; }

.steps { list-style: none; counter-reset: s; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.steps li { counter-increment: s; border-top: 2px solid var(--saffron); padding-top: 18px; }
.steps li::before { content: counter(s, decimal-leading-zero); font-family: "Marcellus", serif; color: var(--saffron); font-size: 1.6rem; display: block; margin-bottom: 6px; }
.steps h3 { color: #fff; }
.steps p { color: rgba(246, 239, 227, .8); margin: 0; }

.zones { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.zones li { background: var(--sand); border: 1px solid var(--sand-2); padding: 8px 16px; border-radius: 999px; }

/* Devis */
.quote-wrap { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: start; }
.quote-wrap h2, .quote-wrap .section-intro { text-align: start; margin-inline: 0; }
.contact-box { background: var(--white); border-radius: var(--radius); padding: 24px; border: 1px solid var(--sand-2); }
.contact-box h3 { margin-top: 0; }
.contact-list { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; }
.contact-list a { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.contact-list a:hover { color: var(--green); }
.ci { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--sand); color: var(--green); }
.ci svg { width: 18px; height: 18px; }
.ci-wa { color: #1fa855; }
.follow-title { margin: 0 0 10px; font-weight: 600; color: var(--muted); font-size: .9rem; }
.social-icons { display: flex; gap: 10px; flex-wrap: wrap; }
.si {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  color: var(--white); background: var(--green); transition: transform .15s, background .15s;
}
.si svg { width: 20px; height: 20px; }
.si:hover { transform: translateY(-2px); }
.si-facebook:hover { background: #1877f2; }
.si-instagram:hover { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.si-tiktok:hover { background: #000; }
.si-whatsapp:hover { background: #25d366; }
.social-footer { justify-content: center; margin: 4px 0 10px; }
.social-footer .si { background: rgba(246, 239, 227, .12); color: var(--sand); }
.quote-form { background: var(--white); border-radius: var(--radius); padding: 32px; box-shadow: 0 24px 50px -30px rgba(31, 78, 70, .35); display: grid; gap: 16px; }
.quote-form label { display: grid; gap: 6px; font-weight: 500; font-size: .95rem; }
.quote-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.quote-form input, .quote-form select, .quote-form textarea {
  font: inherit; font-weight: 400; padding: 12px 14px; border: 1px solid #d9cdb8; border-radius: 10px; background: #fff; color: var(--ink); width: 100%;
}
.quote-form input:focus, .quote-form select:focus, .quote-form textarea:focus { outline: 2px solid var(--green-2); border-color: transparent; }
.quote-form .invalid { border-color: #c0392b; }
.form-note { font-size: .85rem; color: var(--muted); margin: 0; }
/* Carte du formulaire de devis (Leaflet + OpenStreetMap, chargée à l'approche) */
.map-field { display: grid; gap: 8px; }
.map-label { font-weight: 500; font-size: .95rem; }
.quote-map {
  height: 260px; border-radius: 12px; border: 1px solid #d9cdb8; overflow: hidden; z-index: 0;
  background: var(--sand) url("img/zellige-light.svg") 0 0 / 60px;
}
.map-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.map-locate {
  display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
  color: var(--green); background: var(--sand); border: 1px solid var(--sand-2); border-radius: 999px; padding: 7px 14px;
}
.map-locate:hover { border-color: var(--green); }
.map-hint { font-size: .85rem; color: var(--muted); }
.map-hint.ok { color: var(--green); font-weight: 600; }
.map-pin { background: none; border: 0; }
.map-pin svg { filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .3)); }
.form-status { margin: 0; font-weight: 600; color: var(--green); min-height: 1em; }
.form-status.error { color: #c0392b; }

/* FAQ */
details { border-bottom: 1px solid var(--sand-2); padding: 18px 0; }
summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--terracotta); font-size: 1.4rem; line-height: 1; }
details[open] summary::after { content: "−"; }
details p { color: var(--muted); margin: 12px 0 0; }

/* Footer */
.site-footer { background: var(--green); color: var(--sand); }
.footer-inner { padding: 36px 0; display: grid; gap: 12px; justify-items: center; text-align: center; }
.footer-inner .langs a { color: var(--sand); }
.footer-inner .langs a[aria-current] { background: var(--sand); color: var(--green); }
.small { font-size: .85rem; opacity: .75; margin: 0; }

.wa-float {
  position: fixed; inset-inline-end: 20px; bottom: 20px; z-index: 30;
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: #25d366; color: #fff; box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .35);
}

@media (max-width: 960px) {
  .main-nav { display: none; }
  .lang-menu { margin-inline-start: auto; }
  .services { grid-template-columns: repeat(2, 1fr); }
  .why, .steps { grid-template-columns: repeat(2, 1fr); }
  .hero-inner, .quote-wrap { grid-template-columns: 1fr; }
  .hero-visual { max-width: 360px; margin-inline: auto; width: 100%; }
}
@media (max-width: 600px) {
  .header-inner { flex-wrap: wrap; gap: 8px 12px; padding: 10px 0; }
  .brand span { font-size: 1rem; }
  .header-inner .btn-small { display: none; }
  .services, .why, .steps, .gallery, .quote-form .row { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .videos { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .videos video { border-radius: 80px 80px 8px 8px; }
  .quote-form { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .card { transition: none; }
}

/* Le menu des langues n'hérite pas du style des questions de la FAQ */
details.lang-menu { border: 0; padding: 0; }
.lang-menu summary { font-weight: 500; justify-content: flex-start; }
.lang-menu summary::after, .lang-menu[open] summary::after { content: none; }
