/* Charte claire Tayba — typo forte et mise en page aérée.
   Les couleurs viennent des feuilles d’origine (fond blanc/crème, texte foncé, or Tayba).
   Cette feuille ne rétablit plus le thème sombre : elle conserve l’épure et les grands titres. */

html { color-scheme: light; }

/* Typo un peu plus ample, sans capitales forcées ni inversion des couleurs */
h1 { font-size: clamp(34px, 5.2vw, 58px); line-height: 1.12; }
h2 { font-size: clamp(26px, 3.4vw, 42px); line-height: 1.2; }

/* Hero accueil : widget à gauche, Kaaba visible à droite (photo centrée sur la Kaaba). */
.accueil-hero {
  min-height: 640px;
  overflow: hidden;
}
.accueil-hero-img img {
  object-fit: cover;
  object-position: 12% 42%;
}
.accueil-hero-img::after {
  background: linear-gradient(
    100deg,
    rgba(17, 24, 39, .78) 0%,
    rgba(17, 24, 39, .48) 34%,
    rgba(17, 24, 39, .18) 58%,
    rgba(17, 24, 39, .16) 100%
  );
}
[dir="rtl"] .accueil-hero-img img { object-position: 88% 42%; }
[dir="rtl"] .accueil-hero-img::after {
  background: linear-gradient(
    260deg,
    rgba(17, 24, 39, .78) 0%,
    rgba(17, 24, 39, .48) 34%,
    rgba(17, 24, 39, .18) 58%,
    rgba(17, 24, 39, .16) 100%
  );
}
.accueil-hero-inner {
  display: grid;
  grid-template-columns: minmax(280px, 34rem) minmax(220px, 1fr);
  column-gap: clamp(24px, 4vw, 56px);
  align-items: start;
  min-height: 640px;
  padding-top: clamp(32px, 4.5vw, 56px);
  padding-bottom: clamp(28px, 4vw, 48px);
}
.accueil-hero-intro,
.accueil-hero .resa-pub {
  grid-column: 1;
}
.accueil-hero .moteur { grid-column: 1 / -1; }
.accueil-hero h1 {
  font-size: clamp(28px, 4vw, 50px);
  font-weight: 600;
  max-width: none;
  margin: 8px 0 12px;
  letter-spacing: -.02em;
}
.accueil-hero .lead { margin-bottom: 20px; max-width: 36ch; }

/* Widget compact et lisible, limité à la colonne de gauche */
.accueil-hero .resa-pub {
  background: #fff;
  color: var(--ink, #1F2937);
  border: 1px solid rgba(255, 255, 255, .55);
  box-shadow: 0 18px 50px rgba(17, 24, 39, .18);
  max-width: 100%;
  padding: 16px 16px 14px;
}

@media (max-width: 700px) {
  .accueil-hero { min-height: 0; --hero-photo: clamp(280px, 70vw, 400px); }
  .accueil-hero-img {
    position: relative;
    inset: auto;
    display: block;
    width: 100%;
    height: var(--hero-photo);
    min-height: 0;
    max-height: none;
  }
  .accueil-hero-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 38%;
  }
  [dir="rtl"] .accueil-hero-img img { object-position: center 38%; }
  .accueil-hero-img::after {
    background: linear-gradient(180deg, rgba(17, 24, 39, .58) 0%, rgba(17, 24, 39, .18) 42%, rgba(17, 24, 39, .45) 100%);
  }
  .accueil-hero-inner {
    display: block;
    min-height: 0;
    position: relative;
    z-index: 2;
    margin-top: -36px;
    padding-top: 0;
    padding-bottom: 20px;
  }
  .accueil-hero-intro {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(48px - var(--hero-photo));
    bottom: auto;
    padding: 18px var(--gutter, 16px) 0;
    z-index: 3;
    pointer-events: none;
  }
  .accueil-hero-intro * { pointer-events: auto; }
  .accueil-hero-img::after {
    background: linear-gradient(180deg, rgba(17, 24, 39, .66) 0%, rgba(17, 24, 39, .22) 32%, rgba(17, 24, 39, .08) 52%, rgba(17, 24, 39, .4) 100%);
  }
  .accueil-hero h1 {
    margin: 0 0 6px;
    font-size: clamp(24px, 7vw, 34px);
    text-shadow: 0 2px 14px rgba(17, 24, 39, .55);
  }
  .accueil-hero .lead {
    margin: 0;
    font-size: 15px;
    max-width: none;
    text-shadow: 0 1px 10px rgba(17, 24, 39, .5);
  }
}

/* Champs individuels du calculateur (absents des feuilles d’origine) */
.resa-pub-nuits {
  margin: .35rem 0 .85rem;
  font-size: .85rem;
  color: var(--muted, #6B7280);
  letter-spacing: .01em;
}
.resa-pub-opts-ind {
  display: grid;
  gap: .85rem;
  margin: .4rem 0 1.1rem;
}
.resa-pub-opts-ind .booking-help { margin: 0; color: var(--muted, #6B7280); }

.section-head { margin-bottom: 28px; }

/* Empêche le débordement horizontal (input[type=date] trop large ; radios cachés non étirés). */
input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]):not([type="file"]):not([type="submit"]):not([type="button"]),
select, textarea { max-width: 100%; min-width: 0; box-sizing: border-box; }
.field input[type="date"],
.field input[type="datetime-local"],
.field input[type="number"],
.field input[type="tel"],
.field input[type="email"],
.field input[type="text"],
.resa-pub-dates-ind input[type="date"],
.resa-pub-pax input[type="number"] {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.ag-choix-groupe-opt, .ag-chambre-opt, .ag-parcours-opt { position: relative; }
.ag-choix-groupe-opt > input, .ag-chambre-opt > input, .ag-parcours-opt > input, .seg input {
  width: auto !important;
  max-width: none;
  min-width: 0;
}
.resa-pub-dates-ind, .resa-pub-pax, .field-row, .ag-choix-groupe, .ag-chambres, .resa-pub, .wrap, main {
  min-width: 0;
  max-width: 100%;
}
@media (max-width: 700px) {
  html { overflow-x: hidden; }
  main, .accueil-hero, .page-hero { overflow-x: hidden; }
}

/* Logo : ne plus se faire écraser par le menu trop large */
.logo { flex: 0 0 auto; }
.logo img { width: 120px !important; height: auto !important; max-width: none; min-width: 96px; flex-shrink: 0; }

/* Photos d’hôtels : ratio 4:3 uniforme, recadrage cover centré, bords nets */
.hotels { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 22px; }
.hotel img, .hotel-noimg {
  aspect-ratio: 4 / 3;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* Galerie La Mecque & Médine */
.section-galerie { background: var(--bg-soft, #F9FAFB); }
.galerie-lieux {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.galerie-lieux figure { margin: 0; }
.galerie-lieux img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--r, 12px);
  background: #EEE;
}
.galerie-lieux figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted, #6B7280);
}
.galerie-credits { margin: 16px 0 0; font-size: 13px; }
@media (max-width: 700px) {
  .galerie-lieux { grid-template-columns: 1fr 1fr; gap: 10px; }
}

/* Bulles d’hôtels : 2 par ligne, un seul carrousel (3 Médine + 3 Mecque), synchro */
.ag-choix-groupe-opt > span { gap: 8px; min-height: 0; align-items: stretch; }
.resa-pub .ag-choix-groupe,
.accueil-hero .ag-choix-groupe {
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
}
.resa-pub .ag-choix-groupe:has(> :only-child),
.accueil-hero .ag-choix-groupe:has(> :only-child) {
  grid-template-columns: 1fr;
}
.ag-choix-photos {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: auto;
  border-radius: 0;
  overflow: hidden;
  background: transparent;
}
.ag-carousel {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: #F3F4F6;
}
.ag-carousel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0;
  transition: opacity .9s ease;
  display: block;
}
.ag-carousel img.is-on { opacity: 1; z-index: 1; }
.ag-choix-groupe-opt > span {
  padding: 8px 8px 10px !important;
  min-width: 0;
}
.ag-choix-groupe-opt strong { font-size: .92rem !important; }
@media (max-width: 700px) {
  .resa-pub .ag-choix-groupe,
  .accueil-hero .ag-choix-groupe { gap: 8px; }
  .ag-choix-groupe-opt > span { padding: 6px 6px 8px !important; min-height: 0 !important; }
  .ag-choix-groupe-opt strong { font-size: .82rem !important; }
  .ag-carousel { border-radius: 10px; }
}

/* Sélecteur de nationalité : liste fixe, utilisable sur mobile (le <select> natif peut rester bloqué). */
.pays-select-wrap { position: relative; }
.pays-select-wrap select[data-rd-nationalite] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.pays-select-btn {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 12px 40px 12px 14px;
  border: 1px solid #D1D5DB;
  border-radius: var(--r, 12px);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F2937' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 12px center / 18px no-repeat;
  font: inherit;
  font-size: 16px;
  text-align: left;
  color: var(--ink, #1F2937);
  cursor: pointer;
}
.pays-select-btn.is-placeholder { color: #6B7280; }
.pays-select-btn:focus { border-color: var(--gold, #D0A444); outline: 3px solid rgba(208, 164, 68, .25); }
.pays-panneau {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(17, 24, 39, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
}
@media (min-width: 701px) {
  .pays-panneau { align-items: center; }
}
.pays-panneau-box {
  width: min(520px, 100%);
  max-height: min(88vh, 720px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(17, 24, 39, .25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.pays-panneau-haut {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 8px;
}
.pays-panneau-titre { margin: 0; font-size: 16px; font-weight: 700; color: var(--ink, #1F2937); }
.pays-panneau-fermer {
  border: 0;
  background: #F3F4F6;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.pays-panneau-recherche {
  margin: 0 16px 8px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #D1D5DB;
  border-radius: 10px;
  font: inherit;
  font-size: 16px;
}
.pays-panneau-liste {
  list-style: none;
  margin: 0;
  padding: 0 0 12px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.pays-panneau-liste li {
  padding: 12px 16px;
  font-size: 16px;
  cursor: pointer;
  border-top: 1px solid #F3F4F6;
}
.pays-panneau-liste li[aria-selected="true"] { font-weight: 700; color: var(--gold-dark, #8A6A1E); background: #FBF8F0; }
.pays-panneau-liste li:empty, .pays-panneau-liste li[data-value=""] { color: #6B7280; }
body.pays-liste-ouverte { overflow: hidden; }
