/* =============================================================================
   Pages publiques des espaces (espace-agence.php) et annuaire (partenaires.php)
   Chargée après dah-2026.css. Couleurs : uniquement les variables du jeu choisi (lib/vitrine_theme.php,
   liste fermée de 20 jeux) — --dh-brand, --dh-brand-soft, --dh-brand-deep, --vt-band, --vt-band-ink.
   Propriétés logiques (inline-start/end) : la mise en page se retourne d'elle-même en arabe (RTL).
   1. Image entière   2. En-tête (3 gabarits)   3. Séjours   4. Corps + contact   5. Annuaire
   ============================================================================= */

/* ---------- 1. Image entière : copie floutée en fond, image complète (contain) par-dessus ---------- */
.ve-frame { position: relative; overflow: hidden; background: var(--dh-brand-deep, #0f2c23); isolation: isolate; }
.ve-frame .ve-fill { position: absolute; inset: -24px; width: calc(100% + 48px); height: calc(100% + 48px); max-width: none; object-fit: cover;
  filter: blur(22px) saturate(1.1) brightness(.78); transform: scale(1.04); z-index: -1; }
.ve-frame .ve-fit { position: relative; display: block; width: 100%; height: 100%; object-fit: contain; }

/* ---------- 2. En-tête ---------- */
.ve-head { width: var(--dh-wrap); margin: 8px auto 0; position: relative; }
.ve-cover { border-radius: var(--dh-radius-lg); aspect-ratio: var(--ve-r, 16 / 7); max-height: 460px; width: 100%; }
.ve-id { position: relative; display: grid; gap: 10px; }
.ve-crumbs { margin: 0 0 4px; font-size: 13px; color: var(--dh-muted); }
.ve-crumbs a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: transparent; }
.ve-crumbs a:hover { text-decoration-color: currentColor; }
.ve-crumbs span[aria-hidden] { margin: 0 8px; opacity: .6; }
.ve-brand { display: inline-grid; justify-items: center; gap: 6px; width: max-content; }
.ve-logo { width: 104px; height: 104px; border-radius: 22px; background: #fff; display: grid; place-items: center; overflow: hidden; flex: none;
  box-shadow: 0 0 0 3px var(--vt-band), 0 10px 30px rgba(20,32,28,.14); color: var(--dh-brand); font-size: 40px; font-weight: 700; }
.ve-logo img { width: 100%; height: 100%; object-fit: contain; padding: 10px; box-sizing: border-box; }
.ve-by { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  letter-spacing: .01em; color: var(--dh-brand); text-decoration: none; white-space: nowrap; }
.ve-by:hover { text-decoration: underline; text-underline-offset: 2px; }
.ve-badge { display: inline-flex; align-items: center; gap: 6px; width: max-content; max-width: 100%; padding: 6px 12px; border-radius: 999px;
  background: var(--vt-band); color: var(--vt-band-ink); font-size: 13px; font-weight: 600; }
.ve-id h1 { font-size: clamp(2rem, 4.6vw, 3.6rem); line-height: 1.02; letter-spacing: -0.04em; margin: 0; max-width: 20ch; color: var(--dh-text); overflow-wrap: anywhere; }
.ve-lieu { margin: 0; display: inline-flex; align-items: center; gap: 6px; color: var(--dh-muted); font-size: 16px; }
.ve-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.ve-cta .dh-btn { min-height: 48px; height: auto; padding-block: 12px; }
.ve-btn-ghost { background: #fff; color: var(--dh-text); box-shadow: inset 0 0 0 1px var(--dh-line); }
.ve-btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--dh-text); opacity: 1; }
.ve-ico { flex: none; }

/* Gabarit « Classique » : bandeau photo, carte d'identité qui chevauche le bas de la photo. */

.ve-g-classique .ve-id { margin: 16px 0 0; padding: 22px clamp(18px, 3vw, 32px) 26px; border-radius: 24px; background: #fff;
  box-shadow: 0 1px 2px rgba(20,32,28,.06), 0 18px 48px rgba(20,32,28,.12); grid-template-columns: auto 1fr; column-gap: 26px; align-items: center; }
.ve-g-classique .ve-id > :not(.ve-brand) { grid-column: 2; }
.ve-g-classique .ve-brand { grid-row: 1 / span 6; align-self: start; }

/* Gabarit « Immersif » : grande photo entière, texte sur un voile dans la nuance foncée du jeu. */
.ve-g-immersif .ve-head { display: grid; border-radius: var(--dh-radius-lg); overflow: hidden; background: var(--dh-brand-deep); }
.ve-g-immersif .ve-cover { grid-area: 1 / 1; border-radius: 0; max-height: 78vh; min-height: 420px; }
.ve-g-immersif .ve-id { grid-area: 1 / 1; align-self: end; z-index: 1; padding: clamp(80px, 12vw, 160px) clamp(20px, 4vw, 56px) clamp(24px, 4vw, 48px);
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--dh-brand-deep) 70%, transparent) 38%, var(--dh-brand-deep)); color: #fff; }
.ve-g-immersif .ve-id h1, .ve-g-immersif .ve-lieu, .ve-g-immersif .ve-crumbs { color: #fff; }
.ve-g-immersif .ve-by { background: #fff; color: var(--dh-brand); }
.ve-g-immersif .ve-btn-ghost { background: rgba(255,255,255,.94); box-shadow: none; }
.ve-g-immersif :focus-visible { outline-color: #fff; box-shadow: 0 0 0 4px var(--dh-brand-deep); }

/* Gabarit « Épuré » : fond clair du jeu, photo dans un cadre à côté du nom. */
.ve-g-epure .ve-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 56px); align-items: center;
  padding: clamp(24px, 4vw, 56px); border-radius: var(--dh-radius-lg); background: var(--dh-brand-soft); }
.ve-g-epure .ve-cover { order: 2; border-radius: 22px; box-shadow: 0 18px 48px rgba(20,32,28,.16); }
.ve-g-epure .ve-logo { width: 84px; height: 84px; border-radius: 18px; font-size: 32px; }

/* ---------- 3. Séjours (cœur de la page) ---------- */
.ve-body { margin-top: clamp(36px, 5vw, 64px); }
.ve-sec-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 14px 24px; margin-bottom: 20px; }
.ve-sec-head .dh-sub { max-width: 60ch; }
.ve-filters { display: flex; flex-wrap: wrap; gap: 8px; overflow: visible; }
.ve-filters .dh-chip { min-height: 44px; height: auto; }
.ve-trips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 22px; }
.ve-trip { position: relative; display: flex; flex-direction: column; min-width: 0; border-radius: 22px; background: #fff;
  box-shadow: inset 0 0 0 1px var(--dh-line); transition: box-shadow 200ms ease, transform 200ms ease; }
.ve-trip:hover { box-shadow: inset 0 0 0 1px var(--dh-brand), 0 14px 34px rgba(20,32,28,.10); }
.ve-trip-media { position: relative; aspect-ratio: 4 / 3; border-radius: 22px 22px 0 0; }
.ve-trip-type, .ve-trip-star { position: absolute; top: 12px; z-index: 2; padding: 6px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; line-height: 1.2; }
.ve-trip-type { inset-inline-start: 12px; background: rgba(255,255,255,.95); color: #14201c; }
.ve-trip-star { inset-inline-start: 12px; top: 46px; background: var(--vt-band); color: var(--vt-band-ink); }
.ve-trip .dh-fav { inset-inline-end: 8px; inset-inline-start: auto; top: 8px; width: 44px; height: 44px; }
.ve-trip-body { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 18px; flex: 1; }
.ve-trip-body h3 { margin: 0; font-size: 19px; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
.ve-trip-body h3 a { color: var(--dh-text); text-decoration: none; }
.ve-trip-body h3 a:hover { color: var(--dh-brand); text-decoration: underline; text-underline-offset: 3px; }
.ve-trip-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14.5px; color: var(--dh-muted); }
.ve-trip-facts li { display: flex; align-items: center; gap: 8px; }
.ve-trip-facts .ve-ico { color: var(--dh-brand); }
.ve-trip-facts .is-hot { color: var(--dh-hot); font-weight: 600; }
.ve-trip-facts .is-full { color: var(--dh-text); font-weight: 600; }
.ve-trip-price { margin: auto 0 0; font-size: 15px; color: var(--dh-text); }
.ve-trip-price b { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.ve-trip-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
.ve-trip-cta { min-height: 46px; flex: 1 1 auto; }
.ve-trip .dh-cmp { margin-top: 0; min-height: 44px; }
.ve-trip[hidden] { display: none; }
.ve-empty { padding: 48px 22px; border-radius: 24px; background: var(--dh-brand-soft); text-align: center; }
.ve-empty h3 { margin: 0; font-size: 20px; color: var(--dh-text); }
.ve-empty p { margin: 8px auto 18px; max-width: 52ch; color: var(--dh-text); }

/* ---------- 4. Corps : présentation, garanties, avis + bloc « Contacter » ---------- */
.ve-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(28px, 4vw, 56px); align-items: start; margin-top: clamp(48px, 6vw, 80px); }
.ve-main { display: grid; gap: clamp(40px, 5vw, 56px); min-width: 0; }
.ve-main h2 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); margin: 0 0 14px; }
.ve-about p { margin: 0; font-size: 17px; line-height: 1.7; color: var(--dh-text); max-width: 68ch; }
.ve-guar { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.ve-guar li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; background: var(--dh-brand-soft); color: var(--dh-text); font-size: 15px; line-height: 1.45; }
.ve-guar .ve-ico { color: var(--dh-brand); margin-top: 1px; }
.ve-guar b { display: block; font-weight: 700; }
.ve-reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.ve-review { padding: 18px; border-radius: 18px; box-shadow: inset 0 0 0 1px var(--dh-line); }
.ve-review p { margin: 8px 0 0; line-height: 1.55; }
.ve-review .ve-stars { color: #8a5a00; letter-spacing: 1px; }
.ve-review small, .ve-review .ve-reply { color: var(--dh-muted); }
.ve-note { margin: 0; font-size: 13.5px; color: var(--dh-muted); line-height: 1.55; }
.ve-note a { color: inherit; }
.ve-admin-note { width: var(--dh-wrap); margin: 14px auto 0; padding: 12px 16px; border-radius: 14px; background: #fdf2ea; color: #4a2412; border: 1px solid #b3380a; font-size: 14.5px; }

.ve-contact { position: sticky; top: calc(var(--dh-top-h) + 20px); display: grid; gap: 10px; padding: 22px; border-radius: 24px; background: #fff;
  box-shadow: inset 0 0 0 1px var(--dh-line), 0 14px 40px rgba(20,32,28,.08); }
.ve-contact h2 { margin: 0 0 4px; font-size: 18px; }
.ve-contact-acts { display: grid; gap: 8px; }
.ve-act { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 14px; border-radius: 14px; background: var(--dh-surface); color: var(--dh-text);
  text-decoration: none; font-size: 14.5px; line-height: 1.25; min-width: 0; }
.ve-act:hover { background: var(--dh-brand-soft); }
.ve-act .ve-ico { color: var(--dh-brand); }
.ve-act > span { display: grid; min-width: 0; }
.ve-act b { font-weight: 700; }
.ve-act-v { color: var(--dh-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ve-act.is-main { background: var(--vt-band); color: var(--vt-band-ink); }
.ve-act.is-main .ve-ico, .ve-act.is-main .ve-act-v { color: var(--vt-band-ink); }
.ve-contact-lieu { margin: 4px 0 0; display: flex; gap: 8px; align-items: center; color: var(--dh-muted); font-size: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) { .ve-trips { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 960px) {
  .ve-layout { grid-template-columns: 1fr; }
  /* Le bloc « Contacter » devient une barre basse, toujours à portée de pouce. */
  .ve-contact { position: fixed; inset-inline: 0; bottom: 0; top: auto; z-index: 70; gap: 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    border-radius: 18px 18px 0 0; box-shadow: 0 -8px 30px rgba(20,32,28,.16), inset 0 1px 0 var(--dh-line); }
  .ve-contact h2, .ve-contact-lieu { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ve-contact-acts { grid-auto-flow: column; grid-auto-columns: minmax(66px, 1fr); gap: 8px; overflow-x: auto; scrollbar-width: none; }
  .ve-act { justify-content: center; min-height: 48px; padding: 6px 10px; gap: 8px; }
  .ve-act-v { display: none; }
  body.ve-has-bar { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  body.ve-has-bar .dh-float { display: none; } /* le contact de l’espace remplace celui du site */
  body.ve-has-bar .dhc-tray { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
  .ve-g-epure .ve-head { grid-template-columns: 1fr; }
  .ve-g-epure .ve-cover { order: 0; }
}
@media (max-width: 700px) {
  .ve-cover { aspect-ratio: var(--ve-rm, 4 / 3); }
  .ve-g-classique .ve-cover { border-radius: 22px; }
  .ve-g-classique .ve-id { grid-template-columns: 1fr; margin-top: 12px; padding: 18px 18px 22px; }
  .ve-g-classique .ve-id > :not(.ve-brand) { grid-column: 1; }
  .ve-g-classique .ve-brand { grid-row: auto; }
  .ve-logo { width: 84px; height: 84px; border-radius: 18px; font-size: 32px; }
  /* Immersif : sur un écran étroit, la photo reste entière et le texte passe dessous, sur la nuance foncée. */
  .ve-g-immersif .ve-cover { grid-area: auto; min-height: 0; max-height: none; }
  .ve-g-immersif .ve-id { grid-area: auto; padding: 18px 20px 24px; background: var(--dh-brand-deep); }

  .ve-g-epure .ve-head { padding: 18px; }
  .ve-cta .dh-btn { flex: 1 1 100%; }
  .ve-trips { grid-template-columns: 1fr; }
  .ve-act { flex-direction: column; gap: 2px; font-size: 12.5px; min-height: 52px; padding: 6px 4px; }
  .ve-act > span { justify-items: center; text-align: center; }
}
@media (max-width: 380px) { .ve-act b { font-size: 12px; } }
@media (prefers-reduced-motion: reduce) { .ve-trip { transition: none; } }

/* ---------- 5. Annuaire (partenaires.php) ---------- */
.dir-form { margin-top: 28px; display: grid; gap: 14px; padding: clamp(16px, 2.4vw, 24px); border-radius: 24px; background: var(--dh-surface); }
.dir-q { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.dir-q label, .dir-f label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--dh-text); }
.dir-form input[type=search], .dir-form select { width: 100%; box-sizing: border-box; min-height: 48px; padding: 10px 14px; border-radius: 14px; border: 1px solid #c9cec9;
  background: #fff; color: var(--dh-text); font: 500 15px/1.3 var(--dh-font); }
.dir-form input[type=search]:focus-visible, .dir-form select:focus-visible { outline: 2px solid var(--dh-brand); outline-offset: 1px; }
.dir-q .dh-btn { align-self: end; min-height: 48px; }
.dir-fs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.dir-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 22px 0 4px; }
.dir-count { margin: 0; font-size: 16px; font-weight: 600; }
.dir-reset { font-size: 14px; color: var(--dh-text); min-height: 44px; display: inline-flex; align-items: center; }
.dir-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.dir-card { position: relative; display: flex; flex-direction: column; gap: 12px; height: 100%; box-sizing: border-box; padding: 20px; border-radius: 22px; background: #fff;
  box-shadow: inset 0 0 0 1px var(--dh-line); transition: box-shadow 200ms ease; }
.dir-card:hover, .dir-card:focus-within { box-shadow: inset 0 0 0 1px var(--dh-text); }
.dir-top { display: flex; align-items: center; gap: 14px; min-width: 0; }
.dir-logo { width: 60px; height: 60px; border-radius: 14px; flex: none; display: grid; place-items: center; overflow: hidden; font-weight: 700; font-size: 22px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.dir-logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; box-sizing: border-box; background: #fff; }
.dir-card h3 { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.dir-card h3 a { color: var(--dh-text); text-decoration: none; }
.dir-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 22px; }
.dir-meta { margin: 3px 0 0; font-size: 13.5px; color: var(--dh-muted); }
.dir-desc { margin: 0; font-size: 14px; line-height: 1.5; color: var(--dh-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dir-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.dir-tags li { padding: 4px 10px; border-radius: 999px; background: var(--dh-surface); font-size: 12.5px; font-weight: 600; color: var(--dh-text); }
.dir-tags li.is-hidden { background: #fdf2ea; color: #4a2412; }
.dir-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--dh-line); font-size: 14px; }
.dir-foot span:first-child { color: var(--dh-muted); }
.dir-foot span:last-child { font-weight: 600; }
.dir-pages { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 30px; }
.dir-pages a, .dir-pages span { min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; padding: 0 14px; box-sizing: border-box; border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--dh-line); color: var(--dh-text); text-decoration: none; font-weight: 600; font-size: 14.5px; }
.dir-pages a:hover { box-shadow: inset 0 0 0 1px var(--dh-text); }
.dir-pages [aria-current="page"] { background: var(--dh-text); color: #fff; box-shadow: none; }
.dir-results[aria-busy="true"] { opacity: .55; transition: opacity 150ms ease; }
.dir-empty { margin-top: 18px; }
@media (max-width: 1100px) { .dir-fs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .dir-fs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dir-q { grid-template-columns: 1fr; }
  .dir-list { grid-template-columns: 1fr; gap: 10px; }
  /* Cartes compactes sur mobile : logo, nom, ville et nombre de séjours sur quelques lignes. */
  .dir-card { padding: 14px; gap: 8px; border-radius: 18px; }
  .dir-logo { width: 48px; height: 48px; border-radius: 12px; font-size: 18px; }
  .dir-desc { display: none; }
  .dir-foot { padding-top: 8px; }
}
@media (max-width: 330px) { .dir-fs { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .dir-card, .dir-results[aria-busy="true"] { transition: none; } }
