/* ============================================================
   DAR EL MOUHIT — feuille de style
   Système : plâtre crème · terracotta · bleu-océan · fusain
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* Palette « Médina » (défaut) */
  --plaster:    #F3ECDF;   /* fond tadelakt crème */
  --plaster-2:  #EADFCB;   /* panneau plus profond */
  --plaster-3:  #E0D2B8;   /* carte sable */
  --ink:        #2A2420;   /* texte fusain */
  --ink-soft:   #5A5147;   /* texte secondaire */
  --terra:      #B65A30;   /* terracotta accent */
  --terra-deep: #934523;
  --ocean:      #1E5450;   /* bleu-vert océan */
  --ocean-deep: #143C39;
  --brass:      #A8895A;   /* filets laiton */
  --brass-soft: #C2A878;

  /* Typo */
  --display: "Cormorant", Georgia, serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;

  /* Rythme */
  --maxw: 1280px;
  --gutter: clamp(20px, 5vw, 72px);
  --section-y: clamp(72px, 11vw, 160px);

  --ease: cubic-bezier(.22,.61,.36,1);
}

/* Direction « Nuit safran » */
[data-palette="safran"] {
  --plaster:    #F2E7D4;
  --plaster-2:  #E7D6B8;
  --plaster-3:  #DEC9A1;
  --ink:        #2C2114;
  --ink-soft:   #6A5638;
  --terra:      #C57F22;
  --terra-deep: #9E6212;
  --ocean:      #6E4A26;
  --ocean-deep: #4A3018;
  --brass:      #B08742;
  --brass-soft: #CDA866;
}

/* Direction « Atlantique » */
[data-palette="atlantique"] {
  --plaster:    #EFEDE6;
  --plaster-2:  #DFE2DC;
  --plaster-3:  #D2D9D4;
  --ink:        #23292B;
  --ink-soft:   #4E5A5C;
  --terra:      #C06A3E;
  --terra-deep: #9C5230;
  --ocean:      #1B5A66;
  --ocean-deep: #103E48;
  --brass:      #8DA0A0;
  --brass-soft: #AFC0BE;
}

/* image-slot ships :host{height:160px}; aspect-ratio is ignored unless height is auto */
.welcome-media image-slot,
.room image-slot,
.exp-media image-slot,
.exp-media .float image-slot,
.place-grid image-slot,
.gallery image-slot { height: auto; }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  background: var(--plaster);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  font-weight: 300;
  letter-spacing: .01em;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ---------- Typo helpers ---------- */
h1, h2, h3, h4 { font-family: var(--display); font-weight: 500; line-height: 1.04; margin: 0; letter-spacing: .005em; }
.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--terra);
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.eyebrow::before {
  content: "";
  width: 30px; height: 1px;
  background: var(--terra);
  opacity: .6;
}
.eyebrow.centered { justify-content: center; }
.eyebrow.centered::after {
  content: "";
  width: 30px; height: 1px;
  background: var(--terra);
  opacity: .6;
}

.lead {
  font-family: var(--display);
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.5;
  font-weight: 400;
  color: var(--ink);
}

.shell { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* Arabic accent line */
.arabic {
  font-family: "Amiri", serif;
  direction: rtl;
  font-size: 1.5em;
  color: var(--brass);
  line-height: 1;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px var(--gutter);
  transition: background .5s var(--ease), padding .5s var(--ease), box-shadow .5s var(--ease);
}
.nav[data-scrolled="true"] {
  background: color-mix(in srgb, var(--plaster) 88%, transparent);
  backdrop-filter: blur(14px);
  padding-block: 14px;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--brass) 30%, transparent);
}
.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark {
  width: 38px; height: 38px; flex: none;
  color: var(--terra);
  transition: color .5s var(--ease);
}
.brand-name {
  font-family: var(--display);
  font-size: 23px;
  letter-spacing: .04em;
  line-height: 1;
  color: var(--ink);
  transition: color .5s var(--ease);
}
.brand-name small {
  display: block;
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: .42em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-soft);
  margin-top: 5px;
}
.nav-links { display: flex; align-items: center; gap: clamp(18px, 2vw, 34px); }
.nav-links a {
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--ink);
  position: relative;
  padding: 4px 0;
  transition: color .3s var(--ease);
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 0; height: 1px; background: var(--terra);
  transition: width .35s var(--ease);
}
.nav-links a:hover { color: var(--terra); }
.nav-links a:hover::after { width: 100%; }

.nav-right { display: flex; align-items: center; gap: 18px; }
.lang {
  display: inline-flex; align-items: center;
  font-size: 12px; letter-spacing: .14em; font-weight: 500;
  border: 1px solid color-mix(in srgb, var(--brass) 55%, transparent);
  border-radius: 999px;
  overflow: hidden;
}
.lang button {
  appearance: none; border: 0; background: transparent;
  font: inherit; letter-spacing: inherit; color: var(--ink-soft);
  padding: 6px 11px; cursor: pointer; transition: all .3s var(--ease);
}
.lang button[aria-pressed="true"] { background: var(--ocean); color: #F3ECDF; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans);
  font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; font-weight: 500;
  padding: 13px 24px;
  border-radius: 2px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .35s var(--ease);
  white-space: nowrap;
}
.btn-solid { background: var(--terra); color: #FBF4E7; }
.btn-solid:hover { background: var(--terra-deep); transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: currentColor; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--plaster); }
.btn-light { background: #F6EFE2; color: var(--ink); }
.btn-light:hover { background: #fff; }

.nav-toggle { display: none; }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; }
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media image-slot { width: 100%; height: 100%; }
.hero-scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(to top, rgba(20,14,10,.72) 0%, rgba(20,14,10,.30) 38%, rgba(20,14,10,.12) 62%, rgba(20,14,10,.34) 100%);
  pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 2;
  width: 100%;
  padding-bottom: clamp(48px, 8vw, 110px);
  padding-top: 140px;
}
.hero .eyebrow { color: var(--brass-soft); }
.hero .eyebrow::before, .hero .eyebrow::after { background: var(--brass-soft); }
.hero h1 {
  color: #F7EFDF;
  font-size: clamp(52px, 10vw, 138px);
  font-weight: 500;
  letter-spacing: .01em;
  margin: 20px 0 0;
  text-shadow: 0 2px 40px rgba(0,0,0,.3);
}
.hero-tag {
  color: #EDE3D0;
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(20px, 2.6vw, 30px);
  font-weight: 400;
  max-width: 30ch;
  margin: 18px 0 0;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-cta .btn-ghost { color: #F6EFE2; }
.hero-cta .btn-ghost:hover { background: #F6EFE2; color: var(--ink); }

.scroll-hint {
  position: absolute; z-index: 2; right: var(--gutter); bottom: clamp(40px, 7vw, 96px);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  color: #EDE3D0; font-size: 10px; letter-spacing: .3em; text-transform: uppercase;
  writing-mode: vertical-rl;
}
.scroll-hint .line { width: 1px; height: 54px; background: linear-gradient(var(--brass-soft), transparent); }

/* ============================================================
   SECTION SHELLS
   ============================================================ */
section { position: relative; }
.band { padding-block: var(--section-y); }
.band-plaster2 { background: var(--plaster-2); }
.band-ocean { background: var(--ocean-deep); color: #EFE4D0; }
.band-ocean .eyebrow { color: var(--brass-soft); }
.band-ocean .eyebrow::before, .band-ocean .eyebrow::after { background: var(--brass-soft); }

.section-head { max-width: 60ch; }
.section-head h2 { font-size: clamp(34px, 5vw, 64px); margin-top: 18px; }
.section-head.center { margin-inline: auto; text-align: center; }

/* hairline divider with khatam motif */
.rule { display: flex; align-items: center; gap: 18px; color: var(--brass); }
.rule::before, .rule::after { content: ""; height: 1px; flex: 1; background: color-mix(in srgb, var(--brass) 45%, transparent); }
.rule svg { width: 26px; height: 26px; opacity: .85; }

/* ============================================================
   INTRO / WELCOME
   ============================================================ */
.welcome { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.welcome-media { position: relative; }
.welcome-media image-slot { width: 100%; aspect-ratio: 4/5; }
.welcome-media .tag {
  position: absolute; bottom: 0; left: 0; transform: translate(-18px, 18px);
  background: var(--ocean); color: #F2E7D2;
  padding: 18px 24px; max-width: 230px;
}
.welcome-media .tag .arabic { font-size: 30px; color: var(--brass-soft); }
.welcome-media .tag p { margin: 8px 0 0; font-size: 13px; line-height: 1.5; letter-spacing: .04em; }
.welcome-body h2 { font-size: clamp(32px, 4.4vw, 58px); margin: 18px 0 0; }
.welcome-body .lead { margin-top: 26px; }
.welcome-body p.body { margin-top: 20px; color: var(--ink-soft); }
.signature { margin-top: 30px; font-family: var(--display); font-style: italic; font-size: 22px; color: var(--ocean); }

.stat-row { display: flex; flex-wrap: wrap; gap: clamp(28px, 5vw, 70px); margin-top: 40px; }
.stat .n { font-family: var(--display); font-size: clamp(38px, 5vw, 58px); line-height: 1; color: var(--terra); }
.stat .l { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); margin-top: 8px; }

/* ============================================================
   CHAMBRES
   ============================================================ */
.rooms { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 2.4vw, 34px); margin-top: 56px; }
.room { background: var(--plaster); border: 1px solid color-mix(in srgb, var(--brass) 28%, transparent); display: flex; flex-direction: column; }
.band-plaster2 .room { background: var(--plaster); }
.room image-slot { width: 100%; aspect-ratio: 4/3.4; }
.room-body { padding: 26px 26px 30px; display: flex; flex-direction: column; flex: 1; }
.room-body h3 { font-size: 28px; }
.room-meta { display: flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); margin-top: 10px; }
.room-meta span { display: inline-flex; align-items: center; gap: 6px; }
.room-body p { font-size: 15px; color: var(--ink-soft); margin: 16px 0 0; }
.room-foot { display: flex; align-items: baseline; justify-content: space-between; margin-top: auto; padding-top: 24px; }
.price small { display: block; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); }
.price b { font-family: var(--display); font-weight: 500; font-size: 30px; color: var(--ink); }
.price b em { font-style: normal; font-size: 15px; font-family: var(--sans); color: var(--ink-soft); }
.room-link { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--terra); border-bottom: 1px solid currentColor; padding-bottom: 3px; transition: gap .3s; }
.room-avail { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }

/* ============================================================
   EXPÉRIENCE (features)
   ============================================================ */
.exp { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.exp-media { position: relative; }
.exp-media image-slot { width: 100%; aspect-ratio: 3/4; }
.exp-media .float {
  position: absolute; right: -28px; top: 40px; width: 46%;
  border: 6px solid var(--plaster-2);
}
.exp-media .float image-slot { aspect-ratio: 1/1; }
.feat-list { margin-top: 30px; display: grid; gap: 4px; }
.feat {
  display: grid; grid-template-columns: 54px 1fr; gap: 20px; align-items: start;
  padding: 22px 0; border-top: 1px solid color-mix(in srgb, var(--brass) 32%, transparent);
}
.feat:last-child { border-bottom: 1px solid color-mix(in srgb, var(--brass) 32%, transparent); }
.feat-icon { width: 46px; height: 46px; color: var(--terra); }
.feat h4 { font-size: 23px; font-family: var(--display); }
.feat p { margin: 6px 0 0; font-size: 15px; color: var(--ink-soft); }
.band-ocean .feat { border-color: color-mix(in srgb, var(--brass-soft) 30%, transparent); }
.band-ocean .feat p { color: #CDBFA8; }
.band-ocean .feat-icon { color: var(--brass-soft); }

/* ============================================================
   MÉDINA / LIEU
   ============================================================ */
.place-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; margin-top: 56px; }
.place-grid image-slot { width: 100%; }
.pg-a { grid-column: span 7; aspect-ratio: 16/11; }
.pg-b { grid-column: span 5; aspect-ratio: 4/5; }
.pg-c { grid-column: span 5; aspect-ratio: 5/4; }
.pg-d { grid-column: span 7; aspect-ratio: 16/9; }
.place-note { grid-column: span 12; display: grid; grid-template-columns: repeat(3,1fr); gap: 30px; margin-top: 14px; }
.place-note .item h4 { font-size: 21px; }
.place-note .item p { font-size: 14px; color: #C9BBA3; margin-top: 8px; }

/* ============================================================
   GALERIE
   ============================================================ */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 52px; }
.gallery image-slot { width: 100%; aspect-ratio: 1/1; }
.gallery .wide { grid-column: span 2; aspect-ratio: 2/1; }
.gallery .tall { grid-row: span 2; aspect-ratio: 1/2; }

/* ============================================================
   TÉMOIGNAGE
   ============================================================ */
.quote { max-width: 26ch; margin-inline: auto; text-align: center; }
.quote .mark { font-family: var(--display); font-size: 90px; line-height: .4; color: var(--brass); }
.quote blockquote {
  margin: 0; font-family: var(--display); font-weight: 400;
  font-size: clamp(28px, 4vw, 50px); line-height: 1.28;
}
.quote cite { display: block; margin-top: 30px; font-style: normal; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--brass-soft); }

/* ============================================================
   CONTACT
   ============================================================ */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 80px); }
.contact-info h2 { font-size: clamp(32px, 4.4vw, 58px); margin-top: 18px; }
.contact-rows { margin-top: 34px; display: grid; gap: 2px; }
.crow { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 18px 0; border-top: 1px solid color-mix(in srgb, var(--brass) 30%, transparent); align-items: baseline; }
.crow:last-child { border-bottom: 1px solid color-mix(in srgb, var(--brass) 30%, transparent); }
.crow .k { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); }
.crow .v { font-size: 16px; }
.crow .v a:hover { color: var(--terra); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn-wa { background: var(--ocean); color: #F2E7D2; }
.btn-wa:hover { background: var(--ocean-deep); }

.map { position: relative; border: 1px solid color-mix(in srgb, var(--brass) 30%, transparent); background: var(--plaster-2); min-height: 360px; overflow: hidden; }
.map image-slot { width: 100%; height: 100%; position: absolute; inset: 0; }
.map .pin {
  position: absolute; left: 50%; top: 48%; transform: translate(-50%,-100%);
  z-index: 2; color: var(--terra); width: 40px; height: 40px;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,.3));
}
.map .pin-label {
  position: absolute; left: 50%; top: calc(48% + 6px); transform: translateX(-50%);
  z-index: 2; background: var(--plaster); padding: 5px 12px; font-size: 11px;
  letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
  border: 1px solid color-mix(in srgb, var(--brass) 40%, transparent);
}

/* ============================================================
   FOOTER
   ============================================================ */
.foot { background: var(--ink); color: #D9CDB8; padding-block: clamp(56px, 8vw, 90px) 36px; }
.foot-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.foot .brand-name, .foot .brand-name small { color: #F0E6D2; }
.foot-col h5 { font-family: var(--sans); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--brass-soft); margin: 0 0 18px; font-weight: 500; }
.foot-col a, .foot-col p { display: block; font-size: 14px; color: #C5B89F; margin: 0 0 11px; transition: color .3s; }
.foot-col a:hover { color: #F0E6D2; }
.foot p.desc { margin-top: 20px; max-width: 34ch; font-size: 14px; line-height: 1.7; color: #B6A88E; }
.foot p.operator { margin-top: 14px; max-width: 34ch; font-size: 12px; letter-spacing: .04em; line-height: 1.6; color: var(--brass-soft); }
.foot-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 56px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,.12);
  font-size: 12px; letter-spacing: .08em; color: #9C8F77;
}

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
  .reveal.in { opacity: 1; transform: none; }
  .reveal.d1 { transition-delay: .08s; }
  .reveal.d2 { transition-delay: .16s; }
  .reveal.d3 { transition-delay: .24s; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .welcome, .exp, .contact { grid-template-columns: 1fr; }
  .rooms { grid-template-columns: 1fr 1fr; }
  .exp-media .float { right: 0; }
}
@media (max-width: 760px) {
  .nav-links, .nav .lang { display: none; }
  .nav-toggle { display: inline-flex; }
  .rooms, .gallery, .place-note { grid-template-columns: 1fr 1fr; }
  .gallery .wide, .gallery .tall { grid-column: auto; grid-row: auto; aspect-ratio: 1/1; }
  .place-grid > image-slot { grid-column: span 12 !important; }
  .foot-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .rooms, .gallery { grid-template-columns: 1fr; }
  body { font-size: 16px; }
}
