/* Dar Yanis, riad, médina de Rabat.
   Charte tirée de la maison : la terre cuite de la façade et du sol de la terrasse, la pierre de Salé
   de l'encadrement de la porte, la chaux du patio, l'ocre des créneaux du toit. Le vert menthe vient
   des noms des chambres (Menthe, Romarin, Thym) et des plantes devant la porte.
   Motifs : les créneaux en escalier de la terrasse, et une plante par chambre. */

:root {
  --chaux: #FBF6EE;
  --blanc: #FFFDF9;
  --pierre: #F0E2CC;
  --rose: #F6E3D8;
  --terre: #B4533C;
  --terre-f: #9A4430;
  --menthe: #1F3B34;
  --menthe-2: #284A41;
  --menthe-3: #162B26;
  --ocre: #D2A04E;
  --texte: #23332E;
  --doux: #56615C;
  --filet: rgba(31, 59, 52, .15);
  --filet-clair: rgba(251, 246, 238, .18);
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Karla", "Helvetica Neue", Arial, sans-serif;
  --nav-h: 82px;
  --gout: clamp(20px, 4vw, 48px);
  --cran: 12px;
  --creneau: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='40' viewBox='0 0 64 40'%3E%3Cpath d='M0 40V32H16V24H20V16H24V8H28V0H36V8H40V16H44V24H48V32H64V40Z'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--chaux); color: var(--texte);
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.66;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--terre); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: 1260px; margin: 0 auto; padding: 0 var(--gout); }

/* coins crénelés : la forme de la maison, sur les photos et les fiches */
.cran { clip-path: polygon(0 var(--cran), var(--cran) var(--cran), var(--cran) 0, calc(100% - var(--cran)) 0, calc(100% - var(--cran)) var(--cran), 100% var(--cran), 100% 100%, 0 100%); }

/* frise de créneaux, couleur = currentColor */
.creneaux { display: block; height: 40px; background: currentColor; -webkit-mask: var(--creneau) left bottom / 64px 40px repeat-x; mask: var(--creneau) left bottom / 64px 40px repeat-x; }
.creneaux--petit { height: 26px; -webkit-mask-size: 42px 26px; mask-size: 42px 26px; }
.trace { animation: trace 1.9s .2s cubic-bezier(.6, .1, .2, 1) both; }
@keyframes trace { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* ------------------------------------------------------------ typographie -- */
.h1, .h2, .h3 { font-family: var(--serif); font-weight: 400; font-variation-settings: "SOFT" 60; letter-spacing: -.012em; color: var(--menthe); }
.h1 { font-size: clamp(3rem, 6vw, 5.6rem); line-height: 1; }
.h2 { font-size: clamp(2.2rem, 3.8vw, 3.3rem); line-height: 1.05; }
.h3 { font-size: clamp(1.6rem, 2.2vw, 2rem); line-height: 1.1; }
.h1 em, .h2 em, .h3 em { font-style: italic; }
.lbl { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; font: 600 .76rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--terre-f); }
.lbl::before { content: ""; width: 24px; height: 15px; background: var(--ocre); -webkit-mask: var(--creneau) center / 24px 15px no-repeat; mask: var(--creneau) center / 24px 15px no-repeat; }
.lead { margin-top: 20px; font-size: 1.2rem; line-height: 1.55; color: var(--texte); max-width: 52ch; }
.p { margin-top: 16px; color: var(--doux); max-width: 54ch; }
.lienfleche {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 30px; padding-bottom: 6px;
  font: 600 .8rem/1 var(--sans); letter-spacing: .15em; text-transform: uppercase;
  color: var(--menthe); text-decoration: none; border-bottom: 1px solid var(--terre);
}
.lienfleche svg { width: 22px; height: 10px; transition: transform .3s; }
.lienfleche:hover svg { transform: translateX(5px); }

/* ---------------------------------------------------------------- boutons -- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 28px; border: 1px solid var(--terre); border-radius: 2px;
  background: var(--terre); color: var(--chaux);
  font: 600 .8rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
  transition: background .25s, border-color .25s, color .25s;
}
.btn:hover { background: var(--terre-f); border-color: var(--terre-f); }
.btn--menthe { background: var(--menthe); border-color: var(--menthe); }
.btn--menthe:hover { background: var(--menthe-3); border-color: var(--menthe-3); }
.btn--ligne { background: transparent; color: var(--menthe); border-color: rgba(31, 59, 52, .45); }
.btn--ligne:hover { background: var(--menthe); border-color: var(--menthe); color: var(--chaux); }
.btn--clair { background: transparent; color: var(--chaux); border-color: rgba(251, 246, 238, .6); }
.btn--clair:hover { background: var(--chaux); border-color: var(--chaux); color: var(--menthe); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

/* ------------------------------------------------------------------- nav -- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: var(--nav-h); color: var(--chaux); transition: background .3s, color .3s, box-shadow .3s; }
.nav::before { content: ""; position: absolute; inset: 0 0 -40px; background: linear-gradient(rgba(16, 30, 26, .62), rgba(16, 30, 26, 0)); pointer-events: none; transition: opacity .3s; }
.nav.est-solide { background: var(--chaux); color: var(--menthe); box-shadow: 0 1px 0 var(--filet); }
.nav.est-solide::before { opacity: 0; }
.nav__in { position: relative; height: 100%; max-width: 1400px; margin: 0 auto; padding: 0 clamp(20px, 3.4vw, 44px); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.nav__brand { position: relative; z-index: 2; justify-self: start; display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.marque { width: 38px; height: 38px; flex: none; color: var(--ocre); }
.nav.est-solide .marque { color: var(--terre); }
.nav__nom { font: italic 400 1.85rem/1 var(--serif); font-variation-settings: "SOFT" 80; white-space: nowrap; letter-spacing: -.01em; }
.nav__links { display: flex; align-items: center; gap: clamp(20px, 2.4vw, 34px); font-family: var(--serif); font-size: 1.14rem; }
.nav__links a { position: relative; padding: 6px 0; color: inherit; text-decoration: none; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 1px; height: 1px; background: var(--ocre); transform: scaleX(0); transform-origin: left; transition: transform .3s; }
.nav.est-solide .nav__links a::after { background: var(--terre); }
.nav__links a:hover::after, .nav__links a.active::after { transform: scaleX(1); }
.nav__end { position: relative; z-index: 2; justify-self: end; display: flex; align-items: center; gap: 20px; }
.nav__langue { font: 600 .76rem/1 var(--sans); letter-spacing: .16em; color: inherit; text-decoration: none; opacity: .88; }
.nav__langue:hover { opacity: 1; }
.nav__cta { min-height: 44px; padding: 0 22px; }
.nav__langue--menu, .nav__cta--menu { display: none; }
.nav__burger { display: none; width: 46px; height: 46px; margin-right: -9px; padding: 0; border: 0; background: none; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.nav__burger span { display: block; width: 26px; height: 1.5px; background: currentColor; transition: transform .3s, opacity .3s; }

@media (max-width: 980px) {
  :root { --nav-h: 70px; }
  .nav__in { grid-template-columns: 1fr auto; }
  .nav__nom { font-size: 1.6rem; }
  .marque { width: 33px; height: 33px; }
  .nav__links {
    position: fixed; inset: 0; z-index: 1; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px;
    padding: 96px 32px 40px; background: var(--menthe); color: var(--chaux); font-size: 2.1rem;
    transform: translateY(-100%); visibility: hidden; transition: transform .34s ease, visibility 0s linear .34s;
  }
  .nav__links.nav-open { transform: none; visibility: visible; transition: transform .34s ease, visibility 0s; }
  .nav__links a { color: var(--chaux); padding: 4px 0; }
  .nav__links a::after { background: var(--ocre) !important; }
  .nav__langue--menu { display: inline-block; margin-top: 22px; font: 600 .8rem/1 var(--sans); letter-spacing: .18em; color: var(--chaux); opacity: .88; }
  .nav__cta--menu { display: inline-flex; margin-top: 18px; color: var(--chaux); }
  .nav__end .nav__langue, .nav__end .nav__cta--bar { display: none; }
  .nav__burger { display: flex; }
  .nav.menu-open { background: transparent; color: var(--chaux); box-shadow: none; }
  .nav.menu-open::before { opacity: 0; }
  .nav.menu-open .marque { color: var(--ocre); }
  .nav.menu-open .nav__burger span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .nav.menu-open .nav__burger span:nth-child(2) { opacity: 0; }
  .nav.menu-open .nav__burger span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
}

/* ------------------------------------------------------------ hero accueil -- */
.hero { position: relative; display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; overflow: hidden; background: var(--menthe-3); color: var(--chaux); }
.hero__media { position: absolute; inset: 0; overflow: hidden; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; animation: lent 24s ease-out both; }
@keyframes lent { from { transform: scale(1.07); } to { transform: none; } }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(16, 30, 26, .8) 0%, rgba(16, 30, 26, .55) 34%, rgba(16, 30, 26, .12) 62%, rgba(16, 30, 26, 0) 78%);
}
.hero__in { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; justify-content: center; padding-top: calc(var(--nav-h) + clamp(16px, 4vh, 48px)); padding-bottom: clamp(20px, 4vh, 44px); }
.hero__titre { max-width: 9.5em; color: var(--chaux); font-size: clamp(3.3rem, 6.6vw, 6.3rem); }
.hero__sub { margin-top: 24px; max-width: 30ch; font-size: 1.22rem; line-height: 1.55; color: rgba(251, 246, 238, .9); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero__pied { position: relative; z-index: 2; color: var(--chaux); }
.hero__socle { background: var(--chaux); padding-bottom: clamp(18px, 3vh, 30px); }
.monte { animation: monte 1s cubic-bezier(.2, .7, .2, 1) both; }
.monte--2 { animation-delay: .12s; }
.monte--3 { animation-delay: .24s; }
@keyframes monte { from { transform: translateY(16px); } to { transform: none; } }

/* barre de dates, posée sur les créneaux, dans le premier écran */
.barre { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; background: var(--blanc); color: var(--menthe); border: 1px solid var(--filet); box-shadow: 0 18px 40px rgba(22, 43, 38, .12); }
.barre__champ { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 14px 22px; border-right: 1px solid var(--filet); }
.barre__champ label { font: 600 .7rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--terre-f); }
.barre__champ input, .barre__champ select {
  -webkit-appearance: none; appearance: none; width: 100%; min-height: 40px; padding: 0; border: 0; border-radius: 0;
  background: transparent; color: var(--menthe); font: 400 1.16rem/1.2 var(--serif);
}
.barre__champ input::-webkit-date-and-time-value { text-align: left; margin: 0; }
.barre__champ input::-webkit-calendar-picker-indicator { opacity: .5; cursor: pointer; }
.barre__champ select { padding-right: 22px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231F3B34' stroke-width='1.3'/%3E%3C/svg%3E") right 2px center / 12px 8px no-repeat; }
.barre__btn { align-self: stretch; min-height: 100%; padding: 0 36px; border-radius: 0; }

@media (max-width: 900px) {
  .hero::before { background: linear-gradient(180deg, rgba(16, 30, 26, .72) 0%, rgba(16, 30, 26, .5) 48%, rgba(16, 30, 26, .1) 100%); }
  .hero__in { justify-content: flex-start; padding-top: calc(var(--nav-h) + 26px); }
  .hero__titre { font-size: clamp(2.9rem, 12vw, 4.2rem); }
  .hero__sub { margin-top: 16px; font-size: 1.08rem; }
  .hero__cta { margin-top: 24px; }
  .hero .creneaux { height: 30px; -webkit-mask-size: 48px 30px; mask-size: 48px 30px; }
  .barre { grid-template-columns: 1fr 1fr; }
  .barre__champ { padding: 10px 14px; border-bottom: 1px solid var(--filet); }
  .barre__champ:nth-child(2) { border-right: 0; }
  .barre__champ--voy { grid-column: 1 / -1; border-right: 0; }
  .barre__champ input, .barre__champ select { min-height: 34px; font-size: 1.06rem; }
  .barre__btn { grid-column: 1 / -1; min-height: 52px; }
}
@media (max-width: 900px) and (max-height: 720px) {
  .hero__cta { display: none; }
  .hero__in { padding-top: calc(var(--nav-h) + 14px); padding-bottom: 14px; }
  .barre__champ { padding: 7px 14px; }
  .barre__btn { min-height: 46px; }
}

/* ------------------------------------------ hero accueil : diaporama lent --
   Quatre photos de la maison qui se succèdent. La première est fixe et prioritaire ; les trois
   autres se chargent après la page (app.js) et ne s'animent qu'une fois arrivées (classe pret). */
@keyframes fondu { 0% { opacity: 0; } 5% { opacity: 1; } 25% { opacity: 1; } 30% { opacity: 0; } 100% { opacity: 0; } }
.hero--fondu .hero__media > img { position: absolute; inset: 0; opacity: 0; animation: none; }
.hero--fondu .hero__media img.pret { animation: fondu 28s linear infinite both, lent 24s ease-out both; }
.hero--fondu .hero__media img.pret:nth-of-type(1) { animation-delay: 6s, 0s; }
.hero--fondu .hero__media img.pret:nth-of-type(2) { animation-delay: 13s, 0s; }
.hero--fondu .hero__media img.pret:nth-of-type(3) { animation-delay: 20s, 0s; }
.hero--fondu::before { background: linear-gradient(0deg, rgba(16, 30, 26, .7) 0%, rgba(16, 30, 26, .3) 38%, rgba(16, 30, 26, 0) 60%); }
.hero--fondu .hero__in { justify-content: flex-end; align-items: center; text-align: center; padding-bottom: 26px; }
.hero--fondu .hero__titre { max-width: none; }
.hero--fondu .hero__sub { margin-left: auto; margin-right: auto; }
.hero--fondu .hero__socle { background: transparent; }
@media (max-width: 900px) {
  .hero--fondu::before { background: linear-gradient(0deg, rgba(16, 30, 26, .72) 0%, rgba(16, 30, 26, .36) 44%, rgba(16, 30, 26, 0) 66%); }
}
@media (prefers-reduced-motion: reduce) { .hero--fondu .hero__media img.pret { animation: none; } }

/* --------------------------------------------------------------- faits -- */
.faits { padding: clamp(30px, 4vw, 44px) 0; border-bottom: 1px solid var(--filet); }
.faits__row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.fait { display: flex; align-items: center; gap: 14px; }
.fait__ico { display: block; width: 40px; height: 40px; flex: none; color: var(--terre); }
.fait__ico svg { display: block; width: 40px; height: 40px; }
.fait b { display: block; font: 400 1.2rem/1.2 var(--serif); color: var(--menthe); }
.fait span:not(.fait__ico) { display: block; font-size: .95rem; color: var(--doux); }
@media (max-width: 900px) {
  .faits__row { grid-template-columns: 1fr 1fr; gap: 22px 16px; }
  .fait { align-items: flex-start; gap: 10px; }
  .fait__ico, .fait__ico svg { width: 32px; height: 32px; }
}

/* ------------------------------------------------------------- sections -- */
.section { padding: clamp(76px, 9vw, 128px) 0; }
.section--pierre { background: var(--pierre); }
.section--rose { background: var(--rose); }
.tete { max-width: 680px; margin-bottom: clamp(36px, 5vw, 60px); }

/* bloc texte + photo, centré verticalement, bloc de pierre décalé derrière la photo */
.centre { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 7vw, 110px); align-items: center; }
.centre__media { position: relative; padding: 0 0 44px 0; }
.centre__media::before { content: ""; position: absolute; top: 44px; right: -22px; bottom: 0; left: 44px; background: var(--pierre); }
.centre--inverse .centre__media { order: -1; }
.centre--inverse .centre__media::before { right: 44px; left: -22px; }
.section--pierre .centre__media::before { background: var(--rose); }
.centre__photo { position: relative; }
.centre__photo img { width: 100%; height: clamp(340px, 40vw, 540px); object-fit: cover; }
.centre__petite { position: absolute; z-index: 2; left: -26px; bottom: 0; width: min(42%, 230px); border: 8px solid var(--chaux); background: var(--chaux); }
.centre--inverse .centre__petite { left: auto; right: -26px; }
.centre__petite img { width: 100%; height: clamp(150px, 15vw, 220px); object-fit: cover; }
@media (max-width: 900px) {
  .centre { grid-template-columns: 1fr; gap: 40px; }
  .centre__media, .centre--inverse .centre__media { order: -1; padding-bottom: 34px; margin-right: 14px; }
  .centre__media::before, .centre--inverse .centre__media::before { top: 30px; right: -14px; left: 30px; }
  .centre__photo img { height: clamp(260px, 72vw, 420px); }
  .centre__petite, .centre--inverse .centre__petite { left: auto; right: -6px; width: 40%; }
  .centre__petite img { height: clamp(110px, 30vw, 170px); }
}

/* ------------------------------------------------------- les huit chambres -- */
.chcs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 18px; }
.chc { display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.chc__media { position: relative; display: block; overflow: hidden; }
.chc__media img { width: 100%; height: clamp(200px, 17vw, 250px); object-fit: cover; transition: transform .7s ease; }
.chc:hover .chc__media img { transform: scale(1.04); }
.chc__chip, .fiche__chip { position: absolute; left: 10px; bottom: 10px; padding: 5px 9px; background: rgba(251, 246, 238, .92); font: 600 .66rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--menthe); }
.chc__corps { display: flex; align-items: flex-start; gap: 12px; padding-top: 16px; }
.chc__ico { display: block; width: 36px; height: 36px; flex: none; color: var(--terre); }
.chc__ico svg { display: block; width: 36px; height: 36px; }
.chc__txt { display: flex; flex-direction: column; min-width: 0; }
.chc__nom { font: 400 1.45rem/1.1 var(--serif); font-variation-settings: "SOFT" 60; color: var(--menthe); }
.chc__det { margin-top: 3px; font-size: .88rem; color: var(--doux); }
.chc__prix { margin-top: 6px; font: 400 1.05rem/1.2 var(--serif); color: var(--terre-f); }
.chx__note { margin-top: 30px; font-size: .92rem; color: var(--doux); }
.chx__note + .lienfleche { margin-top: 20px; }
@media (max-width: 1100px) { .chcs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .chcs { gap: 22px 12px; }
  .chc__media img { height: clamp(130px, 36vw, 220px); }
  .chc__corps { gap: 8px; padding-top: 10px; }
  .chc__ico, .chc__ico svg { width: 28px; height: 28px; }
  .chc__nom { font-size: 1.2rem; }
  .chc__det { font-size: .8rem; }
  .chc__prix { font-size: .95rem; }
}

/* ---------------------------------------------------------------- avis -- */
.avis { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.avis__grand blockquote { font: italic 400 clamp(1.7rem, 2.8vw, 2.4rem)/1.28 var(--serif); font-variation-settings: "SOFT" 80; color: var(--menthe); }
.avis cite { display: block; margin-top: 16px; font: 600 .78rem/1 var(--sans); font-style: normal; letter-spacing: .18em; text-transform: uppercase; color: var(--terre-f); }
.avis__liste { display: grid; gap: 0; }
.avis__liste figure { padding: 22px 0; border-top: 1px solid rgba(31, 59, 52, .2); }
.avis__liste figure:last-child { border-bottom: 1px solid rgba(31, 59, 52, .2); }
.avis__liste blockquote { font-size: 1.06rem; line-height: 1.55; color: var(--texte); }
@media (max-width: 900px) { .avis { grid-template-columns: 1fr; gap: 32px; } }

/* --------------------------------------------------------- bande de fin -- */
.fin { position: relative; color: var(--menthe); background: var(--rose); }
.fin__corps { background: var(--menthe); color: var(--chaux); padding: clamp(64px, 8vw, 110px) 0 clamp(72px, 9vw, 120px); }
.fin__in { display: grid; grid-template-columns: minmax(0, 1.2fr) auto; gap: 40px; align-items: end; }
.fin .h2 { color: var(--chaux); }
.fin p { margin-top: 18px; max-width: 46ch; font-size: 1.14rem; color: rgba(251, 246, 238, .84); }
.fin__cta { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 900px) {
  .fin__in { grid-template-columns: 1fr; align-items: start; gap: 28px; }
  .fin .creneaux { height: 30px; -webkit-mask-size: 48px 30px; mask-size: 48px 30px; }
}

/* bandeau court de fin de page */
.rappel { padding: 46px 0; background: var(--pierre); }
.rappel__in { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.rappel p { font: 400 clamp(1.6rem, 2.6vw, 2.1rem)/1.15 var(--serif); color: var(--menthe); }
.rappel__cta { display: flex; flex-wrap: wrap; gap: 10px; }

/* ------------------------------------------------- hero des pages internes -- */
.ph { position: relative; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; min-height: 56vh; min-height: 56svh; background: var(--menthe-3); color: var(--chaux); }
.ph__media { position: absolute; inset: 0; }
.ph__media img { width: 100%; height: 100%; object-fit: cover; animation: lent 18s ease-out both; }
.ph::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(16, 30, 26, .84) 0%, rgba(16, 30, 26, .52) 44%, rgba(16, 30, 26, .1) 100%), linear-gradient(0deg, rgba(16, 30, 26, .45), rgba(16, 30, 26, 0) 52%); }
.ph__in { position: relative; z-index: 2; padding-top: calc(var(--nav-h) + 40px); padding-bottom: clamp(30px, 4vw, 48px); }
.ph .h1 { color: var(--chaux); }
.ph p { margin-top: 16px; max-width: 40ch; font-size: 1.15rem; color: rgba(251, 246, 238, .88); }
.ph .creneaux { position: relative; z-index: 2; color: var(--chaux); }

/* ---------------------------------------------------- fiches des chambres -- */
.fiches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.fiche { display: flex; flex-direction: column; padding: 34px 34px 30px; background: var(--blanc); scroll-margin-top: calc(var(--nav-h) + 24px); }
.fiche__media { position: relative; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); grid-template-rows: 1fr 1fr; gap: 6px; height: clamp(240px, 22vw, 300px); margin: -34px -34px 28px; }
.fiche__media--1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.fiche__ph { display: block; width: 100%; height: 100%; min-height: 0; padding: 0; border: 0; background: var(--pierre); overflow: hidden; }
.fiche__ph:first-child { grid-row: 1 / -1; }
.fiche__ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease; }
.fiche__ph:hover img { transform: scale(1.04); }
.fiche__tete { display: flex; align-items: center; gap: 18px; }
.fiche__ico { display: block; width: 62px; height: 62px; flex: none; color: var(--terre); }
.fiche__ico svg { display: block; width: 62px; height: 62px; }
.fiche__type { display: block; margin-top: 4px; font: 600 .74rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--terre-f); }
.fiche dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 20px; margin: 26px 0 28px; padding-top: 20px; border-top: 1px solid var(--filet); }
.fiche dt { font-size: .9rem; color: var(--doux); }
.fiche dd { font-size: .98rem; color: var(--texte); }
.fiche__pied { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: auto; }
.fiche__prix { font: 400 1.25rem/1.2 var(--serif); color: var(--menthe); }
.fiche__prix small { display: block; font: 400 .84rem/1.3 var(--sans); color: var(--doux); }
.fiche .btn { min-height: 46px; padding: 0 22px; }
@media (max-width: 900px) {
  .fiches { grid-template-columns: 1fr; gap: 14px; }
  .fiche { padding: 26px 22px 24px; }
  .fiche__media { height: clamp(200px, 58vw, 280px); margin: -26px -22px 22px; }
  .fiche__ico, .fiche__ico svg { width: 52px; height: 52px; }
}

/* grille de photos (chambres, mosaïque du riad) */
.grille { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.grille--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grille__item { display: block; width: 100%; padding: 0; border: 0; background: var(--pierre); overflow: hidden; }
.grille__item img { width: 100%; height: clamp(180px, 19vw, 260px); object-fit: cover; transition: transform .7s ease; }
.grille--3 .grille__item img { height: clamp(200px, 24vw, 320px); }
.grille__item:hover img { transform: scale(1.04); }
@media (max-width: 900px) {
  .grille, .grille--3 { grid-template-columns: 1fr 1fr; gap: 8px; }
  .grille__item img, .grille--3 .grille__item img { height: clamp(130px, 38vw, 220px); }
  .grille--3 .grille__item:first-child { grid-column: 1 / -1; }
  .grille--3 .grille__item:first-child img { height: clamp(200px, 56vw, 320px); }
}

/* bon à savoir */
.savoir { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; background: var(--blanc); }
.savoir > div { padding: 28px 30px; border-right: 1px solid var(--filet); border-bottom: 1px solid var(--filet); }
.savoir > div:nth-child(3n) { border-right: 0; }
.savoir > div:nth-last-child(-n+3) { border-bottom: 0; }
.savoir h3 { margin-bottom: 8px; font: 600 .76rem/1.3 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--terre-f); }
.savoir p { font-size: .98rem; color: var(--texte); }
@media (max-width: 900px) {
  .savoir { grid-template-columns: 1fr; }
  .savoir > div, .savoir > div:nth-last-child(-n+3) { padding: 22px 22px; border-right: 0; border-bottom: 1px solid var(--filet); }
  .savoir > div:last-child { border-bottom: 0; }
}

/* ------------------------------------------------------------- le riad -- */
.salons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); }
.salon img { width: 100%; height: clamp(260px, 30vw, 400px); object-fit: cover; }
.salon .h3 { margin-top: 24px; }
.salon p { margin-top: 10px; color: var(--doux); max-width: 46ch; }
@media (max-width: 760px) { .salons { grid-template-columns: 1fr; gap: 40px; } }

.autour { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--filet); }
.autour li { display: flex; align-items: baseline; gap: 16px; padding: 22px 8px 22px 0; border-bottom: 1px solid var(--filet); }
.autour b { flex: none; min-width: 3.4em; font: 400 2rem/1 var(--serif); font-variation-settings: "SOFT" 60; color: var(--terre); }
.autour b small { font: 600 .7rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; margin-left: 3px; color: var(--terre-f); }
.autour span { font-size: 1.02rem; color: var(--texte); }
.autour__note { margin-top: 18px; font-size: .9rem; color: var(--doux); }
@media (max-width: 900px) { .autour { grid-template-columns: 1fr; } }

/* -------------------------------------------------------------- galerie -- */
.filtres { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.filtres button { min-height: 42px; padding: 0 18px; border: 1px solid rgba(31, 59, 52, .3); border-radius: 2px; background: transparent; color: var(--menthe); font: 600 .76rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.filtres button[aria-pressed="true"] { background: var(--menthe); border-color: var(--menthe); color: var(--chaux); }
.gal { columns: 3 300px; column-gap: 12px; }
.gal__item { display: block; width: 100%; margin: 0 0 12px; padding: 0; border: 0; background: var(--pierre); overflow: hidden; break-inside: avoid; }
.gal__item img { width: 100%; height: auto; transition: transform .7s ease; }
.gal__item:hover img { transform: scale(1.03); }
@media (max-width: 760px) { .gal { columns: 2; column-gap: 8px; } .gal__item { margin-bottom: 8px; } }

/* visionneuse */
.lb { position: fixed; inset: 0; z-index: 150; display: none; align-items: center; justify-content: center; padding: 64px 72px; background: rgba(16, 30, 26, .96); color: var(--chaux); }
.lb.is-open { display: flex; }
.lb img { max-width: 100%; max-height: calc(100vh - 128px); max-height: calc(100dvh - 128px); width: auto; height: auto; object-fit: contain; box-shadow: 0 30px 80px rgba(0, 0, 0, .4); }
.lb__btn { position: absolute; display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border: 1px solid rgba(251, 246, 238, .35); border-radius: 50%; background: rgba(16, 30, 26, .5); color: var(--chaux); }
.lb__btn:hover { background: var(--chaux); color: var(--menthe); }
.lb__btn svg { width: 20px; height: 20px; }
.lb__prec { left: 18px; top: 50%; translate: 0 -50%; }
.lb__suiv { right: 18px; top: 50%; translate: 0 -50%; }
.lb__fermer { right: 18px; top: 16px; font-size: 1.8rem; line-height: 1; }
.lb__compte { position: absolute; left: 50%; bottom: 20px; translate: -50% 0; font: 600 .74rem/1 var(--sans); letter-spacing: .18em; color: rgba(251, 246, 238, .75); }
@media (max-width: 760px) {
  .lb { padding: 64px 10px; }
  .lb__prec, .lb__suiv { top: auto; bottom: 12px; translate: none; }
  .lb__compte { bottom: 30px; }
}

/* -------------------------------------------------------------- contact -- */
.contact { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 72px); align-items: stretch; }
.coord { padding: clamp(30px, 4vw, 44px); background: var(--blanc); }
.coord dl { display: grid; gap: 18px; margin-top: 28px; }
.coord dt { font: 600 .72rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--terre-f); }
.coord dd { margin-top: 6px; font: 400 1.25rem/1.35 var(--serif); color: var(--menthe); }
.coord dd a { text-decoration: none; }
.coord dd a:hover { text-decoration: underline; text-underline-offset: 4px; }
.coord__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.carte { position: relative; min-height: 420px; background: var(--pierre); }
.carte iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.carte__lien { position: absolute; left: 16px; bottom: 16px; z-index: 2; min-height: 44px; }
.venir { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--filet); }
.venir > div { padding: 26px 30px 26px 0; border-bottom: 1px solid var(--filet); }
.venir > div:nth-child(odd) { border-right: 1px solid var(--filet); }
.venir > div:nth-child(even) { padding-left: 30px; }
.venir h3 { font: 400 1.4rem/1.2 var(--serif); color: var(--menthe); }
.venir p { margin-top: 8px; color: var(--doux); }
@media (max-width: 900px) {
  .contact { grid-template-columns: 1fr; }
  .carte { min-height: 340px; }
  .venir { grid-template-columns: 1fr; }
  .venir > div, .venir > div:nth-child(even) { padding: 22px 0; border-right: 0 !important; }
}

/* --------------------------------------------------------------- footer -- */
.pied { position: relative; background: var(--menthe-3); color: rgba(251, 246, 238, .78); padding: 80px 0 32px; font-size: .98rem; }
.pied__haut { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 40px; padding-bottom: 52px; border-bottom: 1px solid var(--filet-clair); }
.pied__brand { display: inline-flex; align-items: center; gap: 14px; color: var(--chaux); text-decoration: none; }
.pied__brand .marque { width: 46px; height: 46px; color: var(--ocre); }
.pied__brand .nav__nom { font-size: 2.2rem; }
.pied__txt { margin-top: 18px; max-width: 30ch; }
.pied h2 { margin-bottom: 18px; font: 600 .72rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ocre); }
.pied ul { display: grid; gap: 10px; }
.pied a { color: rgba(251, 246, 238, .86); text-decoration: none; }
.pied a:hover { color: var(--chaux); }
.pied__bas { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding-top: 26px; font-size: .84rem; color: rgba(251, 246, 238, .62); }
.pied__credit a { color: rgba(251, 246, 238, .72); font: 600 .7rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; text-decoration: none; }
.pied__credit a:hover { color: var(--chaux); }
@media (max-width: 900px) { .pied__haut { grid-template-columns: 1fr 1fr; } .pied__col--brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .pied__haut { grid-template-columns: 1fr; } }

/* ---------------------------------------------- fenêtre de réservation (.rsv) --
   Architecture de défilement recopiée telle quelle de .claude/rules/booking-modal.md §1. */
.rsv{position:fixed;inset:0;z-index:140;display:flex;align-items:flex-start;justify-content:center;
  padding:24px;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.rsv:not(.is-open) { display: none; }
.rsv__backdrop { position: fixed; inset: 0; background: rgba(16, 30, 26, .74); }
.rsv__card{position:relative;display:grid;
  grid-template-columns:minmax(0,.82fr) minmax(0,1.18fr);grid-template-rows:minmax(0,1fr);
  width:min(980px,calc(100vw - 40px));margin:auto;
  max-height:calc(100vh - 48px);max-height:calc(100dvh - 48px);
  overflow:hidden}
.rsv__card { background: var(--chaux); box-shadow: 0 40px 100px rgba(8, 18, 15, .5); }
.rsv__aside{min-height:0;overflow-y:auto}
.rsv__body{display:flex;flex-direction:column;overflow-y:auto;min-height:0;-webkit-overflow-scrolling:touch}
.rsv__body > *{flex-shrink:0}

.rsv__aside { position: relative; display: flex; flex-direction: column; padding: 34px 36px 36px; background: var(--menthe); color: var(--chaux); }
.rsv__aside .creneaux { flex: none; margin: 0 0 26px; color: var(--ocre); }
.rsv__photo { flex: none; margin-bottom: 26px; }
.rsv__photo img { width: 100%; height: 170px; object-fit: cover; }
.rsv__h { font: 400 2.5rem/1 var(--serif); font-variation-settings: "SOFT" 60; color: var(--chaux); }
.rsv__aside p { margin-top: 14px; color: rgba(251, 246, 238, .84); font-size: .98rem; }
.rsv__steps { display: flex; gap: 6px; margin-top: auto; padding-top: 26px; }
.rsv__steps i { flex: 1; height: 3px; background: rgba(251, 246, 238, .2); transition: background .3s; }
.rsv__steps i.on { background: var(--ocre); }
.rsv__close { position: absolute; top: 12px; right: 12px; z-index: 3; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(31, 59, 52, .08); color: var(--menthe); font-size: 1.7rem; line-height: 1; }
.rsv__close:hover { background: var(--menthe); color: var(--chaux); }
.rsv__body { padding: 40px 40px 34px; }
.rsv__bloc { padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--filet); }
.rsv__lbl { margin-bottom: 14px; font: 600 .74rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--terre-f); }
.rsv__lbl b { font-weight: 400; letter-spacing: .04em; text-transform: none; color: var(--doux); }
.rsv__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rsv__field label { display: block; margin-bottom: 6px; font-size: .88rem; color: var(--doux); }
.rsv__field input[type="date"]{-webkit-appearance:none;appearance:none;
  min-height:48px;line-height:1.3;padding:0 14px;
  background:var(--blanc);border:1px solid var(--filet)}
.rsv__field input[type="date"] { width: 100%; border-radius: 2px; color: var(--menthe); font: 400 16px/1.3 var(--sans); }
.rsv__field input[type="date"]::-webkit-date-and-time-value{text-align:left;margin:0}
.rsv__field input[type="date"]::-webkit-calendar-picker-indicator{opacity:.55;cursor:pointer}
.rsv__nuits { margin-top: 10px; min-height: 1.2em; font: italic 400 1.2rem/1.2 var(--serif); color: var(--menthe); }
.rsv__cpt { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 6px; background: var(--blanc); border: 1px solid var(--filet); border-radius: 2px; }
.rsv__cpt button { width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; color: var(--menthe); font-size: 1.3rem; line-height: 1; }
.rsv__cpt button:hover:not(:disabled) { background: var(--pierre); }
.rsv__cpt button:disabled { opacity: .3; cursor: default; }
.rsv__cpt output { font: 400 1.3rem/1 var(--serif); color: var(--menthe); }
.rsv__packs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rsv__pack { position: relative; display: grid; grid-template-columns: 20px 64px minmax(0, 1fr); align-items: center; gap: 10px; width: 100%; padding: 10px 12px 10px 10px; border: 1px solid var(--filet); border-radius: 2px; background: var(--blanc); text-align: left; transition: border-color .2s, background .2s; }
.rsv__pack:hover { border-color: rgba(180, 83, 60, .5); }
.rsv__pack[aria-pressed="true"] { border-color: var(--terre); background: #FCF1EA; }
.rsv__pack img { width: 64px; height: 50px; object-fit: cover; }
.rsv__pack--libre { grid-column: 1 / -1; grid-template-columns: 20px minmax(0, 1fr); padding: 14px 12px 14px 10px; }
.rsv__box { width: 20px; height: 20px; border: 1px solid rgba(31, 59, 52, .4); border-radius: 2px; background: var(--blanc); }
.rsv__pack[aria-pressed="true"] .rsv__box { border-color: var(--terre); background: var(--terre) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 7' fill='none' stroke='%23FBF6EE' stroke-width='1.8'/%3E%3C/svg%3E") center / 18px no-repeat; }
.rsv__pack-n { display: flex; flex-direction: column; min-width: 0; font: 400 1.18rem/1.15 var(--serif); color: var(--menthe); }
.rsv__pack-n small { margin-top: 2px; font: 400 .8rem/1.3 var(--sans); color: var(--doux); }
.rsv__pack-n .rsv__pack-prix { color: var(--terre-f); font-weight: 600; }
.rsv__compte { margin-top: 10px; min-height: 1.2em; font-size: .9rem; color: var(--doux); }
.rsv__msg { width: 100%; padding: 12px 14px; border: 1px solid var(--filet); border-radius: 2px; background: var(--blanc); color: var(--menthe); font: 400 16px/1.5 var(--sans); resize: vertical; }
.rsv__recap { margin-bottom: 16px; padding: 18px 20px; background: var(--pierre); color: var(--menthe); font-size: .98rem; line-height: 1.6; }
.rsv__recap strong { font-weight: 600; }
.rsv__estim { display: block; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--filet); font: 400 1.22rem/1.3 var(--serif); }
.rsv__hint { margin-bottom: 16px; font-size: .92rem; color: var(--doux); }
.rsv__hint.is-alerte { color: var(--terre-f); }
.rsv__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.rsv__actions .btn { flex: 1 1 200px; min-width: 0; }
.rsv__note { margin-top: 18px; font-size: .86rem; color: var(--doux); }

@media (max-width:1020px){
  .rsv__card{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr);
    max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px)}
  .rsv__aside { max-height: 32vh; max-height: 32dvh; padding: 22px 28px 20px; }
  .rsv__aside .creneaux { margin: 0 0 14px; height: 22px; -webkit-mask-size: 35px 22px; mask-size: 35px 22px; }
  .rsv__photo, .rsv__aside p, .rsv__steps { display: none; }
  .rsv__h { font-size: 2rem; }
  .rsv__close { background: rgba(251, 246, 238, .14); color: var(--chaux); }
  .rsv__close:hover { background: var(--chaux); color: var(--menthe); }
}
@media (max-width:680px){
  .rsv{padding:0}
  .rsv__card{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr);width:100vw;margin:0;
    height:100vh;max-height:100vh;height:100dvh;max-height:100dvh}
  .rsv__packs{max-height:none}
  .rsv__packs { grid-template-columns: 1fr; }
  .rsv__body { padding: 26px 20px 28px; }
  .rsv__aside { padding: 18px 64px 16px 20px; }
  .rsv__h { font-size: 1.75rem; }
  .rsv__actions { flex-direction: column; }
  .rsv__actions .btn { flex: 0 0 auto; }
}

/* ------------------------------------------------------------ mouvement -- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__media img, .ph__media img, .trace, .monte, .rsv.is-open .rsv__trace { animation: none; }
}
.rsv.is-open .rsv__trace { animation: trace 1.7s .1s cubic-bezier(.6, .1, .2, 1) both; }
