/* Riad M'barka — finitions : icônes vectorielles + lisibilité mobile (chargé en dernier) */

/* ---------- Icônes : traits fins, couleur du texte, identiques sur tous les appareils ---------- */
.ico, .is-ext::after, .with-arrow::after {
  --i-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h15M13.5 6.5 19 12l-5.5 5.5'/%3E%3C/svg%3E");
  --i-ext: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M9 7h8v8'/%3E%3C/svg%3E");
}
.ico {
  display: inline-block;
  flex: none;
  width: 1.05em;
  height: 1.05em;
  vertical-align: -0.16em;
  background-color: currentColor;
  -webkit-mask: var(--i) center / contain no-repeat;
  mask: var(--i) center / contain no-repeat;
  transition: transform .3s cubic-bezier(.2, .7, .2, 1);
}
.ico-arrow { --i: var(--i-arrow); }
.ico-ext { --i: var(--i-ext); }
.ico-arrow-left { --i: var(--i-arrow); transform: scaleX(-1); }
.ico-arrow-down { --i: var(--i-arrow); transform: rotate(90deg); }
.ico-check { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5 10 17 19 7.5'/%3E%3C/svg%3E"); }
.ico-expand { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 5h5v5M10 19H5v-5M19 5l-6 6M5 19l6-6'/%3E%3C/svg%3E"); }
.ico-spark { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.3' stroke-linejoin='round'%3E%3Cpath d='M12 3c.6 4.6 3.4 7.4 8 8-4.6.6-7.4 3.4-8 8-.6-4.6-3.4-7.4-8-8 4.6-.6 7.4-3.4 8-8Z'/%3E%3C/svg%3E"); }
.ico-play { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.4' stroke-linejoin='round'%3E%3Cpath d='M8 5.5v13l10-6.5-10-6.5Z'/%3E%3C/svg%3E"); }
.ico-pause { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M9 6v12M15 6v12'/%3E%3C/svg%3E"); }

/* Lien externe (WhatsApp, Maps, Instagram, Booking…) : petite flèche oblique fine */
.is-ext::after, .with-arrow::after {
  content: "";
  display: inline-block;
  width: .9em;
  height: .9em;
  margin-left: .35em;
  vertical-align: -0.08em;
  background-color: currentColor;
  -webkit-mask: var(--i-ext) center / contain no-repeat;
  mask: var(--i-ext) center / contain no-repeat;
  opacity: .8;
  transition: transform .3s cubic-bezier(.2, .7, .2, 1);
}
.with-arrow::after { -webkit-mask-image: var(--i-arrow); mask-image: var(--i-arrow); }

/* Micro-interaction : la flèche avance au survol */
a:hover > .ico-arrow, button:hover > .ico-arrow, a:focus-visible > .ico-arrow, a:hover .with-arrow::after { transform: translateX(3px); }
a:hover > .ico-arrow-left, button:hover > .ico-arrow-left { transform: scaleX(-1) translateX(3px); }
.is-ext:hover::after, a:hover > .ico-ext { transform: translate(2px, -2px); }

/* Les cercles et pastilles gardent l'icône bien centrée */
.circle-arrow, .photo-enlarge { display: grid; place-items: center; }
.circle-arrow .ico { width: 16px; height: 16px; }
.photo-enlarge .ico { width: 15px; height: 15px; }
.room-choice-mark .ico, .step-complete .ico { width: .95em; height: .95em; vertical-align: -0.12em; }

/* ---------- Lisibilité : plus aucun texte en 7-9 px ---------- */
.eyebrow, .house-kicker, figcaption, .photo-label, .cinema-caption,
.hero-top span, .hero-location span, .arrival-top span, .arrival-bottom span,
.room-meta span, .room-view, .footer-bottom span, .discover span,
.guest-review-language, .guest-reviews-position, .guest-reviews-footer p,
.weather-panel span, .languages button, .hero-replay,
.stay-intro .eyebrow, .header-book span, .stay-submit span, label > span {
  font-size: max(11px, 1em) !important;
}
.eyebrow, .house-kicker, .photo-label, .cinema-caption, .room-meta span,
.hero-top span, .hero-location span, .arrival-top span, .room-view, .discover span {
  font-size: 11px !important;
  letter-spacing: .14em;
}
figcaption, .footer-bottom span, .guest-review-language, .guest-reviews-footer p,
.guest-reviews-position, .weather-panel span, label > span { font-size: 12px !important; }
.footer-bottom span { line-height: 1.6; }

/* Formulaires : 16 px minimum pour éviter le zoom automatique d'iPhone, champs faciles à toucher */
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  font-size: 16px !important;
  min-height: 44px;
}

/* Cibles tactiles confortables */
@media (pointer: coarse) {
  .languages button, .hero-replay, .guest-reviews-controls button, [data-prev], [data-next],
  .rd-lightbox-prev, .rd-lightbox-next { min-width: 44px; min-height: 44px; }
}

/* Contenu jamais caché derrière la barre « Préparer votre séjour » en bas sur mobile */
@media (max-width: 760px) {
  body.homepage { padding-bottom: calc(57px + env(safe-area-inset-bottom)); }
  .hero-content p:not(.eyebrow) { font-size: 16px; line-height: 1.6; }

  /* Haut de page épuré : le film et le titre respirent */
  .hero-top > span:first-child, .cinema-caption { display: none; }
  .hero-top { justify-content: flex-end; }

  /* Barre de réservation : apparaît une fois le haut de page passé */
  .js-polish .mobile-book { transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
  .js-polish body.homepage:not(.book-visible) .mobile-book,
  .js-polish body.homepage:not(.book-visible) .mobile-wa { transform: translateY(calc(100% + 48px)); }
  .mobile-book .ico { width: 18px; height: 18px; }
  body.has-wa .mobile-book { right: 64px; width: auto; }

  /* Bouton WhatsApp direct, à côté de « Préparer votre séjour » */
  .mobile-wa {
    position: fixed; right: 0; bottom: 0; z-index: 28;
    display: grid; place-items: center;
    width: 64px; min-height: 57px;
    padding-bottom: env(safe-area-inset-bottom);
    background: #6f3b1c; color: #fff2dd;
    box-shadow: inset 1px 0 0 #ffffff26;
    transition: transform .45s cubic-bezier(.2, .7, .2, 1), background .2s;
  }
  .mobile-wa:active { background: #5c3016; }
  .mobile-wa svg { width: 24px; height: 24px; }
}
@media (min-width: 761px) { .mobile-wa { display: none; } }

/* Photos : teinte ivoire pendant le chargement plutôt qu'un trou blanc */
main img, .room-image img, .gallery-shot img { background-color: #ebe1d4; }

/* Retour tactile immédiat */
a, button, summary { -webkit-tap-highlight-color: transparent; }
.button:active, .header-book:active, .mobile-book:active, .stay-submit:active,
.booking-primary:active, .booking-secondary:active { transform: scale(.98); }

/* Focus clavier visible et élégant */
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid #c9613a;
  outline-offset: 3px;
}

/* Défilement doux vers les ancres, sauf si l'utilisateur limite les animations */
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (prefers-reduced-motion: reduce) { .ico, .is-ext::after, .with-arrow::after { transition: none; } }

/* ---------- Matière : grain papier très léger + dégradés chauds ---------- */
:root {
  /* grain sombre (fonds clairs) et grain clair (fonds bruns), tuiles SVG de 160 px, aucun fichier à charger */
  --grain-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .24 0 0 0 0 .16 0 0 0 0 .11 0 0 0 .055 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .95 0 0 0 0 .88 0 0 0 .045 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Fonds ivoire : grain + lueur chaude venant du haut */
body {
  background-image: var(--grain-dark), radial-gradient(120% 70% at 50% 0%, #fcf9f4 0%, transparent 70%);
  background-attachment: scroll;
}
:root:root body .stay-bar { background-image: var(--grain-dark), linear-gradient(180deg, #fffcf8 0%, #faf4ea 100%); }
:root:root body .guest-reviews { background-image: var(--grain-dark), linear-gradient(180deg, #f9f4ed 0%, #f3ebe0 100%); }
:root:root body .moments { background-image: var(--grain-dark), linear-gradient(160deg, #f2eadf 0%, #e8ddcf 100%); }

/* Fonds bruns : grain clair + halo cuivré discret */
:root:root body .rooms {
  background-image: var(--grain-light),
    radial-gradient(70% 45% at 15% 0%, rgba(174, 96, 42, .16) 0%, transparent 70%),
    linear-gradient(180deg, #33241c 0%, #281b15 100%);
}
:root:root body .invitation {
  background-image: var(--grain-light),
    radial-gradient(60% 90% at 50% 110%, rgba(174, 96, 42, .30) 0%, transparent 70%),
    linear-gradient(180deg, #30221b 0%, #2a1d16 100%);
}
:root:root body footer, :root:root body .ux-footer {
  background-image: var(--grain-light), linear-gradient(180deg, #2c1e17 0%, #20150f 100%);
}

/* Haut de page : dégradé plus profond en bas pour un titre toujours lisible */
:root:root body .hero-film .hero-shade {
  background:
    linear-gradient(90deg, rgba(28, 20, 14, .38), rgba(28, 20, 14, .08) 70%),
    linear-gradient(0deg, rgba(28, 20, 14, .82) 0%, rgba(28, 20, 14, .35) 38%, transparent 68%, rgba(28, 20, 14, .18) 100%);
}

/* Boutons cuivre : léger dégradé vertical, comme un métal patiné */
.button.primary, .header-book, .stay-submit, .booking-primary {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .10) 0%, rgba(0, 0, 0, .08) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
}
:root:root body .mobile-book { background-image: var(--grain-light), linear-gradient(180deg, #96552c 0%, #7e4521 100%); }
:root:root body .mobile-wa { background-image: linear-gradient(180deg, #7a4321 0%, #643519 100%); }

/* Photos : ombre portée très douce pour les détacher du papier */
.house-image img, .moments-photo img, .destination-still img, .room-image img {
  box-shadow: 0 18px 40px -24px rgba(48, 34, 27, .45);
}
