/* =========================================================
   AMHMAZ BUILDING · style.css
   Charte (variables), reset, typographie, boutons, en-tête,
   menu mobile, bandes, pied de page, mentions légales
   ========================================================= */

/* Charte : bleu nuit et jaune du logo, bandes claires couleur sable de Marrakech.
   Modifier une couleur ici la change sur tout le site. */
:root {
  --night: #0d1522; /* fond principal, bleu nuit du chantier */
  --night-2: #16202f; /* surfaces sur fond nuit */
  --sun: #fdc04e; /* jaune du logo */
  --sun-deep: #e9a422;
  --stone: #5f5f5f; /* gris du logo */
  --sand: #f3ece2; /* bandes claires, enduit de Marrakech */
  --sand-2: #e8dccb;
  --ink: #1b222c; /* texte sur sable */
  --mist: #c9cdd3; /* texte secondaire sur nuit */
  --line-dark: rgba(255,255,255,.1);
  --line-light: rgba(27,34,44,.14);
  --f-display: "Marcellus", "Cormorant Garamond", Georgia, serif;
  --f-body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --f-label: "Barlow Condensed", "Arial Narrow", sans-serif;
  --wrap: 1180px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--night);
  color: #f4f1ec;
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

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

[hidden] {
  display: none !important;
}

h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 400;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: max(20px,env(safe-area-inset-left,0px));
  padding-right: max(20px,env(safe-area-inset-right,0px));
}

.eyebrow {
  font-family: var(--f-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .82rem;
  color: var(--sun);
  display: flex;
  align-items: center;
  gap: 12px;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: currentColor;
}

.light .eyebrow {
  color: #b47a0c;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-body);
  font-weight: 600;
  font-size: .95rem;
  padding: 14px 22px;
  border-radius: 2px;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .2s, background .2s, color .2s;
}

.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--sun);
  outline-offset: 3px;
}

.btn-sun {
  background: var(--sun);
  color: var(--night);
}

.btn-sun:hover {
  background: #ffd27a;
  transform: translateY(-1px);
}

.btn-ghost {
  border-color: rgba(255,255,255,.35);
  color: #fff;
}

.btn-ghost:hover {
  border-color: var(--sun);
  color: var(--sun);
}

.btn svg {
  width: 18px;
  height: 18px;
}

/* Accessibilité */
.skip {
  position: absolute;
  left: -999px;
  top: 12px;
  z-index: 100;
  background: var(--sun);
  color: var(--night);
  padding: 10px 16px;
  font-weight: 700;
  text-decoration: none;
}

.skip:focus {
  left: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* Apparition au défilement (ajoutée par js/animations.js) */
.reveal {
  transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1);
}

.js .reveal:not(.in) {
  opacity: 0;
  transform: translateY(22px);
}

/* Apparition du hero */
@media (prefers-reduced-motion:no-preference) {
  .hero .eyebrow, .hero h1, .hero .lead, .hero .ctas {
    animation: rise .8s cubic-bezier(.2,.7,.2,1) both;
  }
  .hero h1 {
    animation-delay: .08s;
  }
  .hero .lead {
    animation-delay: .16s;
  }
  .hero .ctas {
    animation-delay: .24s;
  }
  .hero .arc {
    animation: sweep 1.4s cubic-bezier(.2,.7,.2,1) both;
  }
}

@keyframes rise {
  from {
    transform: translateY(14px);
  }
  to {
    transform: none;
  }
}

@keyframes sweep {
  from {
    transform: rotate(-60deg);
  }
  to {
    transform: rotate(-28deg);
  }
}

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

/* =========================================================
   Mise en page générale
   En-tête, menu mobile, bandes de section, pied de page,
   bouton WhatsApp flottant, page mentions légales
   ========================================================= */

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13,21,34,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-dark);
}

.header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 12px;
}

.brand img {
  height: 46px;
  width: auto;
}

.nav {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav a {
  text-decoration: none;
  font-size: .92rem;
  font-weight: 500;
  color: var(--mist);
  position: relative;
  padding-block: 6px;
}

.nav a:hover {
  color: #fff;
}

.nav a.active {
  color: #fff;
}

.nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--sun);
}

.header .btn {
  padding: 11px 18px;
  font-size: .88rem;
}

.burger {
  display: none;
  background: none;
  border: 1px solid var(--line-dark);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 2px;
  cursor: pointer;
}

.burger svg {
  width: 22px;
  height: 22px;
}

@media (max-width:1100px) {
  .nav {
    position: fixed;
    inset: 70px 0 auto 0;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--night);
    border-bottom: 1px solid var(--line-dark);
    padding: 8px max(20px,env(safe-area-inset-right,0px)) 20px max(20px,env(safe-area-inset-left,0px));
  }
  .nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line-dark);
    font-size: 1rem;
  }
  .nav a.active::after {
    display: none;
  }
  .nav:not(.open) {
    display: none;
  }
  .burger {
    display: inline-grid;
    place-items: center;
  }
  .header .btn-sun {
    display: none;
  }
}

/* ---------- Bandes ---------- */
.band {
  padding-block: clamp(72px,9vw,120px);
}

.light {
  background: var(--sand);
  color: var(--ink);
}

.light .muted {
  color: #555d68;
}

.muted {
  color: var(--mist);
}

.head {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 24px 64px;
  align-items: end;
  margin-bottom: 56px;
}

.head h2 {
  font-size: clamp(2rem,4vw,3.1rem);
  margin-top: 16px;
}

.head p {
  max-width: 56ch;
}

@media (max-width:820px) {
  .head {
    grid-template-columns: 1fr;
  }
}

/* Footer */
footer {
  border-top: 1px solid var(--line-dark);
  background: #0a111c;
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding-block: 34px;
}

footer img {
  height: 40px;
  width: auto;
}

footer p {
  font-size: .84rem;
  color: var(--mist);
}

footer nav {
  display: flex;
  gap: 18px;
  font-size: .84rem;
}

footer nav a {
  color: var(--mist);
  text-decoration: none;
}

footer nav a:hover {
  color: #fff;
}

/* WhatsApp flottant */
.wa-float {
  position: fixed;
  right: calc(18px + env(safe-area-inset-right,0px));
  bottom: calc(18px + env(safe-area-inset-bottom,0px));
  z-index: 40;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 30px -8px rgba(0,0,0,.5);
  transition: transform .2s;
}

.wa-float:hover {
  transform: scale(1.07);
}

.wa-float svg {
  width: 30px;
  height: 30px;
}

.band.flush-top {
  padding-top: 0;
}

.head-side {
  display: grid;
  gap: 14px;
  justify-items: start;
}

.header.scrolled {
  box-shadow: 0 12px 30px -18px rgba(0,0,0,.7);
}

.to-top {
  position: fixed;
  left: calc(18px + env(safe-area-inset-left,0px));
  bottom: calc(18px + env(safe-area-inset-bottom,0px));
  z-index: 40;
  width: 44px;
  height: 44px;
  border-radius: 2px;
  border: 1px solid var(--line-dark);
  background: var(--night-2);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}

.to-top.show {
  opacity: 1;
  pointer-events: auto;
}

.to-top svg {
  width: 20px;
  height: 20px;
}

/* Page mentions légales */
.legal {
  max-width: 760px;
}

.legal h1 {
  font-size: clamp(2.2rem,5vw,3.2rem);
  margin: 16px 0 40px;
}

.legal h2 {
  font-size: 1.5rem;
  margin: 40px 0 12px;
}

.legal p, .legal li {
  color: #555d68;
  max-width: 65ch;
}

.legal ul {
  padding-left: 20px;
  display: grid;
  gap: 6px;
}

.legal a {
  color: #b47a0c;
}

.back {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-top: 48px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
}
