/* ==========================================================================
   Assfar Eddyafa — one page
   Palette : vert zellige, safran, ivoire, sable
   Typo    : Marcellus (titres) · Karla (texte)
   ========================================================================== */

:root {
  --vert: #12382f;
  --vert-fonce: #0b271f;
  --safran: #cf9b35;
  --safran-clair: #e3b95f;
  --ivoire: #f8f4ea;
  --sable: #ece3cf;
  --encre: #1e2a26;
  --blanc: #ffffff;

  --police-titre: "Marcellus", "Georgia", serif;
  --police-texte: "Karla", "Segoe UI", system-ui, sans-serif;

  /* arc marocain : plein cintre en haut, presque droit en bas */
  --arche: 45% 45% 4% 4%;
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  font-family: var(--police-texte);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--encre);
  background: var(--ivoire);
}

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

h1,
h2,
h3 {
  font-family: var(--police-titre);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 0.75em;
  color: var(--vert);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 5.2vw, 3.4rem);
}

h2 {
  font-size: clamp(1.6rem, 3.6vw, 2.4rem);
  max-width: 22ch;
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--vert);
}

::selection {
  background: var(--safran-clair);
  color: var(--vert-fonce);
  text-shadow: none;
}

.container {
  width: min(72rem, 100% - 2.5rem);
  margin-inline: auto;
}

.visually-hidden {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  background: var(--vert);
  color: var(--blanc);
  padding: 0.5rem 1rem;
  border-radius: 0 0 0.5rem 0.5rem;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

:focus-visible {
  outline: 3px solid var(--safran);
  outline-offset: 2px;
}

/* ---------- Éléments partagés ---------- */

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--safran);
  margin-bottom: 0.75rem;
}

.eyebrow::before {
  content: "✦";
  margin-right: 0.5em;
}

.eyebrow--light {
  color: var(--safran-clair);
}

.btn {
  display: inline-block;
  font-family: var(--police-texte);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--gold {
  background: var(--safran);
  color: var(--vert-fonce);
}

.btn--gold:hover {
  background: var(--safran-clair);
}

.btn--ghost {
  color: var(--ivoire);
  border: 1.5px solid rgba(248, 244, 234, 0.5);
}

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

.btn--outline {
  color: var(--vert);
  border: 1.5px solid var(--vert);
}

.btn--outline:hover {
  background: var(--vert);
  color: var(--ivoire);
}

.btn--small {
  padding: 0.5rem 1.1rem;
  font-size: 0.9375rem;
}

/* Photos en arc marocain — la signature du site */
.arch {
  margin: 0;
  border-radius: var(--arche);
  overflow: hidden;
  background: var(--sable);
}

.arch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  background: transparent;
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.est-scrolle {
  background: var(--vert-fonce);
  box-shadow: 0 2px 18px rgba(11, 39, 31, 0.35);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.9rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  font-family: var(--police-titre);
  font-size: 1.35rem;
  color: var(--ivoire);
  letter-spacing: 0.02em;
}

.brand em {
  font-style: normal;
  color: var(--safran-clair);
}

.brand__star {
  width: 1.05em;
  height: 1.05em;
  fill: var(--safran);
  flex-shrink: 0;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__menu a:not(.btn) {
  color: var(--ivoire);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: 0.03em;
}

.nav__menu a:not(.btn):hover {
  color: var(--safran-clair);
}

.nav__toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.6rem;
  cursor: pointer;
}

.nav__toggle-bar::before,
.nav__toggle-bar::after {
  content: "";
}

.nav__toggle-bar,
.nav__toggle-bar::before,
.nav__toggle-bar::after {
  display: block;
  width: 1.5rem;
  height: 2px;
  background: var(--ivoire);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav__toggle-bar {
  position: relative;
}

.nav__toggle-bar::before {
  position: absolute;
  top: -7px;
}

.nav__toggle-bar::after {
  position: absolute;
  top: 7px;
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bar {
  transform: rotate(45deg);
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bar::before {
  transform: rotate(-90deg) translateX(-7px);
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bar::after {
  opacity: 0;
}

/* ---------- Hero ---------- */

.hero {
  background:
    radial-gradient(ellipse at 80% -10%, rgba(207, 155, 53, 0.18), transparent 55%),
    var(--vert-fonce);
  color: var(--ivoire);
  padding-top: 7.5rem;
  padding-bottom: 4.5rem;
  position: relative;
  overflow: hidden;
}

/* semis d'étoiles à huit branches, très discret */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cpath d='M48 38l2 8 8 2-8 2-2 8-2-8-8-2 8-2z' fill='%23cf9b35' fill-opacity='0.12'/%3E%3C/svg%3E");
  pointer-events: none;
}

.hero__grid {
  position: relative;
  display: grid;
  gap: 3rem;
  align-items: center;
}

.hero h1 {
  color: var(--ivoire);
}

.hero__lead {
  font-size: 1.15rem;
  max-width: 46ch;
  color: rgba(248, 244, 234, 0.85);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.8rem;
}

.hero__phone {
  margin-top: 1.4rem;
  font-size: 0.95rem;
  color: rgba(248, 244, 234, 0.7);
}

.hero__phone a {
  color: var(--safran-clair);
  font-weight: 700;
  text-decoration: none;
}

.hero__figure {
  position: relative;
  justify-self: center;
  width: min(24rem, 100%);
}

.arch--hero {
  aspect-ratio: 4 / 5;
  border: 5px solid rgba(207, 155, 53, 0.55);
}

.arch--hero-small {
  position: absolute;
  right: -1.5rem;
  bottom: -1.8rem;
  width: 42%;
  aspect-ratio: 3 / 4;
  border: 4px solid var(--vert-fonce);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

/* ---------- Sections ---------- */

.section {
  padding-block: 5rem;
}

.section--sand {
  background: var(--sable);
}

.section--dark {
  background: var(--vert);
  color: var(--ivoire);
}

.section--dark h2,
.section--dark h3 {
  color: var(--ivoire);
}

/* ---------- Services ---------- */

.cards--services {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  margin-top: 2.5rem;
}

.card {
  background: var(--blanc);
  border-radius: 1rem;
  padding: 1.8rem 1.5rem;
  border-top: 3px solid var(--safran);
}

.card__icon {
  width: 2.6rem;
  height: 2.6rem;
  margin-bottom: 1rem;
  color: var(--vert);
}

.card__icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.card p {
  font-size: 0.95rem;
  color: #4a564f;
  margin: 0;
}

/* ---------- Offres ---------- */

.cards--offres {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  margin-top: 2.5rem;
}

.offre .arch {
  aspect-ratio: 4 / 5;
}

.offre__body {
  padding: 1.2rem 0.4rem 0;
}

.offre__body p {
  font-size: 0.95rem;
  color: #4a564f;
}

/* ---------- L'agence ---------- */

.agence__grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.arch--tall {
  aspect-ratio: 3 / 4;
  max-width: 22rem;
  justify-self: center;
  border: 5px solid rgba(207, 155, 53, 0.45);
}

.agence__lead {
  font-size: 1.1rem;
  color: rgba(248, 244, 234, 0.85);
  max-width: 50ch;
}

.atouts {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
}

.atouts h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25em;
  color: var(--safran-clair);
}

.atouts p {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(248, 244, 234, 0.8);
}

/* ---------- Contact ---------- */

.contact__grid {
  display: grid;
  gap: 3rem;
  align-items: start;
}

.contact__lead {
  max-width: 42ch;
}

.contact__infos {
  list-style: none;
  margin: 0;
  padding: 2rem 1.8rem;
  background: var(--blanc);
  border-radius: 1rem;
  border-top: 3px solid var(--safran);
  display: grid;
  gap: 1.4rem;
}

.contact__label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--safran);
  margin-bottom: 0.2rem;
}

.contact__infos a {
  font-family: var(--police-titre);
  font-size: 1.4rem;
  text-decoration: none;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--vert-fonce);
  color: rgba(248, 244, 234, 0.7);
  padding-block: 2.2rem;
  font-size: 0.9rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.site-footer p {
  margin: 0;
}

.brand--footer {
  font-size: 1.15rem;
}

/* ---------- Bouton WhatsApp flottant ---------- */

.whatsapp-fab {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 60;
  width: 3.4rem;
  height: 3.4rem;
  display: grid;
  place-items: center;
  background: #25d366;
  border-radius: 50%;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease;
}

.whatsapp-fab:hover {
  transform: scale(1.08);
}

.whatsapp-fab svg {
  width: 1.9rem;
  height: 1.9rem;
  fill: var(--blanc);
}

/* ---------- Animations d'apparition ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.est-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn,
  .whatsapp-fab {
    transition: none;
  }
}

/* ---------- Responsive ---------- */

@media (min-width: 56em) {
  .hero__grid {
    grid-template-columns: 1.15fr 1fr;
  }

  .agence__grid {
    grid-template-columns: 2fr 3fr;
  }

  .atouts {
    grid-template-columns: 1fr 1fr;
  }

  .contact__grid {
    grid-template-columns: 3fr 2fr;
  }
}

@media (max-width: 47.99em) {
  .nav__toggle {
    display: block;
  }

  .nav__menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--vert-fonce);
    padding: 0.5rem 1.25rem 1.25rem;
    display: none;
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.3);
  }

  .nav__menu.est-ouvert {
    display: flex;
  }

  .nav__menu li {
    width: 100%;
  }

  .nav__menu a:not(.btn) {
    display: block;
    padding: 0.8rem 0;
    font-size: 1.05rem;
    border-bottom: 1px solid rgba(248, 244, 234, 0.12);
  }

  .nav__menu .btn {
    margin-top: 1rem;
  }

  .arch--hero-small {
    right: 0;
  }
}

/* ---------- Impression ---------- */

@media print {
  .site-header,
  .whatsapp-fab {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}
