/* ============================================================
   CQSR 2026 – Page exposants
   Dépend des variables de assets/css/main.css :
   --ink, --ink-2, --brand, --brand-2, --sand, --line, --shadow, --topbar-height
   ============================================================ */

:root {
  --expo-primary: #24588D;          /* même bleu que .btn-primary */
  --expo-selected: var(--ink);
  --expo-radius: 18px;
  --expo-radius-sm: 10px;
  --expo-palier-presentateur: #24588D;
  --expo-palier-platine: #4F5F75;
  --expo-palier-or: #8C6410;
  --expo-palier-argent: #6B7A8E;
  --expo-palier-bronze: #8F5530;
}

/* La barre de navigation est masquée par défaut sur l'accueil (révélée au défilement).
   Sur cette page elle est toujours visible et pousse le contenu. */
.page-exposants .topbar {
  position: sticky;
  transform: none;
  opacity: 1;
  pointer-events: auto;
}
.page-exposants .brand-title a { color: inherit; text-decoration: none; }
.page-exposants nav a[aria-current="page"] { background: rgba(47, 134, 169, 0.2); color: var(--ink); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- En-tête de page ---------- */
.exposants-hero { padding: 56px 0 8px; }
.exposants-hero .section-subtitle { max-width: 60ch; }

.exposants-section { padding: 32px 0 56px; }

/* ---------- Barre d'outils : recherche + filtres ---------- */
.expo-toolbar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  position: sticky; top: var(--topbar-height); z-index: 20;
  background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(10px);
  padding: 10px 0 12px; margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.expo-search {
  display: flex; align-items: center; gap: 10px;
  flex: 1 1 260px; height: 44px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--expo-radius-sm);
  background: var(--sand); color: var(--ink-2);
}
.expo-search input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
  font: inherit; font-size: 15px; color: var(--ink);
}
.expo-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47, 134, 169, 0.2); }
.expo-filtres { display: flex; gap: 8px; flex-wrap: wrap; }
.expo-filtre {
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  padding: 9px 14px; border: 0; border-radius: 999px;
  background: rgba(15, 27, 43, 0.08); color: var(--ink);
  transition: background 0.2s ease, color 0.2s ease;
}
.expo-filtre:hover { background: rgba(47, 134, 169, 0.2); }
.expo-filtre.is-active { background: var(--expo-primary); color: #fff; }
.expo-filtre:focus-visible, .expo-pin:focus-visible, .expo-liste a:focus-visible,
.expo-card-entete:focus-visible, .expo-doc:focus-visible, .expo-action:focus-visible {
  outline: 3px solid var(--brand); outline-offset: 2px;
}

/* ---------- Plan + liste latérale ---------- */
.expo-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }

.expo-plan {
  position: relative; width: 100%; aspect-ratio: 1671 / 1554;
  border-radius: var(--expo-radius); background: #fff; border: 1px solid var(--line);
  overflow: hidden; box-shadow: var(--shadow);
}
.expo-plan > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.expo-pins { position: absolute; inset: 0; }

.expo-pin {
  position: absolute; transform: translate(-50%, -50%);
  width: 38px; height: 38px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  background: #fff; color: var(--ink); border: 2px solid var(--ink);
  box-shadow: 0 4px 10px rgba(15, 43, 64, 0.3);
  transition: transform 0.15s ease, opacity 0.2s ease;
}
/* zone tactile de 44 px minimum, même si la pastille est plus petite */
.expo-pin::before { content: ""; position: absolute; inset: -6px; border-radius: inherit; }
.expo-pin:hover { transform: translate(-50%, -50%) scale(1.08); }
.expo-pin.is-selected {
  background: var(--expo-selected); color: #fff; width: 46px; height: 46px; font-size: 16px;
  border: 3px solid #fff; box-shadow: 0 0 0 3px var(--ink), 0 8px 18px rgba(15, 43, 64, 0.35); z-index: 2;
}
.expo-pin.is-libre {
  background: #fff; color: var(--ink-2); border: 2px dashed var(--brand-2); box-shadow: none; cursor: default;
}
.expo-pin.is-dimmed { opacity: 0.3; }

.expo-plan-zoom {
  position: absolute; right: 10px; bottom: 10px; width: 40px; height: 40px;
  border-radius: var(--expo-radius-sm); border: 1px solid var(--line); background: #fff;
  color: var(--ink-2); cursor: pointer; display: none; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(8, 30, 50, 0.12);
}

.expo-legende { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.expo-legende span { display: inline-flex; align-items: center; gap: 8px; }
.expo-legende-pin { width: 14px; height: 14px; border-radius: 999px; background: #fff; border: 2px solid var(--ink); box-sizing: border-box; display: inline-block; }
.expo-legende-pin.is-selected { background: var(--expo-selected); border-color: #fff; box-shadow: 0 0 0 2px var(--ink); }
.expo-legende-pin.is-libre { background: #fff; border: 2px dashed var(--brand-2); box-sizing: border-box; }

.expo-liste-col {
  background: #fff; border: 1px solid var(--line); border-radius: var(--expo-radius);
  box-shadow: var(--shadow); overflow: hidden;
  position: sticky; top: calc(var(--topbar-height) + 80px);
  max-height: calc(100vh - var(--topbar-height) - 100px); display: flex; flex-direction: column;
}
.expo-liste-entete { display: flex; align-items: baseline; justify-content: space-between; padding: 18px 20px 12px; border-bottom: 1px solid var(--line); }
.expo-liste-entete h2 { margin: 0; font-size: 1.05rem; }
.expo-liste-entete span { font-size: 13px; color: var(--ink-2); }
.expo-liste { list-style: none; margin: 0; padding: 8px; overflow-y: auto; }
.expo-liste-palier { padding: 12px 10px 4px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-2); }
.expo-liste a {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px; min-height: 48px;
  border-radius: var(--expo-radius-sm); color: var(--ink); text-decoration: none;
}
.expo-liste a:hover { background: var(--sand); }
.expo-liste a.is-selected { background: var(--sand); }
.expo-liste a.is-selected .expo-num { background: var(--expo-selected); color: #fff; }
.expo-liste a span:not(.expo-num) { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.expo-liste a i { color: var(--brand-2); }
.expo-liste li[hidden] { display: none; }

.expo-num {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; background: rgba(15, 27, 43, 0.08); color: var(--ink);
}

/* ---------- Fiches (Carte A) ---------- */
.expo-palier { padding: 0; margin-bottom: 48px; scroll-margin-top: 0; }   /* annule le padding générique de section */
.expo-palier:last-child { margin-bottom: 0; }
.expo-palier-titre { display: flex; align-items: center; gap: 14px; margin: 0 0 20px; }
.expo-palier-titre span:first-child { font-size: 0.9rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-2); }
.expo-palier-titre .expo-trait { flex: 1; height: 1px; background: var(--line); }
.expo-palier-titre span:last-child { font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.expo-palier[hidden] { display: none; }

.expo-grille { display: grid; gap: 24px; grid-template-columns: repeat(var(--colonnes, 3), minmax(0, 1fr)); }

.expo-card {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--expo-radius);
  box-shadow: var(--shadow); display: flex; flex-direction: column; scroll-margin-top: calc(var(--topbar-height) + 90px);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.expo-card[hidden] { display: none; }
.expo-card.is-flash { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(47, 134, 169, 0.25), var(--shadow); }
.expo-card.is-vide { border-style: dashed; box-shadow: none; }

.expo-card-entete {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  padding: 24px 24px 0; border: 0; background: none; font: inherit; color: var(--ink); cursor: default;
}
.expo-card-entete .expo-num { width: auto; height: auto; padding: 7px 13px 7px 10px; gap: 6px; font-size: 13px; background: var(--expo-primary); color: #fff; box-shadow: 0 10px 20px rgba(36, 88, 141, 0.28); }
.expo-card-entete .expo-chevron { display: none; margin-left: auto; color: var(--brand-2); }
.expo-card-entete h3 { margin: 0; font-size: 1.35rem; line-height: 1.15; }
.expo-card-palier { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--brand); }
.expo-card-palier::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--palier-couleur, var(--brand)); }

.expo-card-corps { padding: 18px 24px 24px; display: flex; flex-direction: column; gap: 16px; }
.expo-logo {
  height: var(--logo-h, 88px); border-radius: 14px; border: 1px solid var(--line); background: #fff;
  display: flex; align-items: center; justify-content: center; padding: 10px;
}
.expo-logo img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.expo-logo.is-vide { border-style: dashed; background: var(--sand); color: var(--ink-2); font-size: 13px; font-weight: 600; gap: 8px; }

.expo-contact-nom { font-size: 15px; font-weight: 600; }
.expo-contact-titre { font-size: 14px; color: var(--ink-2); }

.expo-liens { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.expo-liens a { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink-2); }
.expo-liens a i { color: var(--brand); width: 18px; text-align: center; }
.expo-liens a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.expo-liens .is-muted { color: var(--ink-2); opacity: 0.7; }

/* boutons d'action (mobile) */
.expo-actions { display: none; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.expo-action {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  height: 54px; border-radius: var(--expo-radius-sm); background: var(--sand);
  font-size: 12px; font-weight: 600; color: var(--ink); text-decoration: none;
}
.expo-action i { color: var(--brand); font-size: 16px; }
.expo-action.is-disabled { opacity: 0.45; pointer-events: none; }

.expo-sep { height: 1px; background: var(--line); }

.expo-docs-entete { display: flex; align-items: baseline; justify-content: space-between; }
.expo-docs-entete span:first-child { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-2); }
.expo-docs { display: flex; flex-direction: column; gap: 10px; }
.expo-doc {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; min-height: 48px;
  border: 1px solid var(--line); border-radius: var(--expo-radius-sm); color: var(--ink); text-decoration: none;
}
.expo-doc:hover { border-color: var(--brand); text-decoration: none; }
.expo-doc-type { width: 32px; height: 32px; flex-shrink: 0; border-radius: 8px; background: var(--sand); color: var(--ink-2); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; }
.expo-doc-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.expo-doc-info b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.expo-doc-info small { font-size: 12px; color: var(--ink-2); }
.expo-doc > i { color: var(--expo-primary); }
.expo-doc.is-vide { border-style: dashed; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.expo-doc.is-vide i { color: inherit; }

.expo-avis {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px;
  border-radius: 14px; background: var(--sand); border: 1px solid var(--line); font-size: 13px; line-height: 1.45; color: var(--ink-2);
}
.expo-avis i { color: var(--brand); margin-top: 2px; }
.expo-avis b { display: block; color: var(--ink); font-size: 14px; margin-bottom: 2px; }

/* ---------- Plan plein écran (mobile) ---------- */
.expo-dialog { border: 0; padding: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; background: #fff; }
.expo-dialog::backdrop { background: rgba(15, 43, 64, 0.5); }
.expo-dialog-scroll { width: 100%; height: 100%; overflow: auto; padding: 72px 16px 24px; box-sizing: border-box; }
.expo-plan--dialog { width: max(100%, 720px); max-width: none; aspect-ratio: 1671 / 1554; }
.expo-dialog-fermer {
  position: fixed; top: 14px; right: 14px; z-index: 2; width: 44px; height: 44px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; font-size: 18px;
}

/* bouton flottant « Plan » (mobile, après défilement) */
.expo-retour-plan {
  position: fixed; right: 16px; bottom: 84px; z-index: 30;
  display: none; align-items: center; gap: 8px; height: 46px; padding: 0 18px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; text-decoration: none;
  box-shadow: 0 14px 30px rgba(15, 43, 64, 0.35);
  opacity: 0; transform: translateY(8px); transition: opacity 0.2s ease, transform 0.2s ease;
}
.expo-retour-plan.is-visible { opacity: 1; transform: none; }

/* ---------- Mobile (< 900 px) : plan pleine largeur, liste accordéon ---------- */
@media (max-width: 899px) {
  .expo-layout { grid-template-columns: 1fr; }
  .expo-liste-col { display: none; }               /* la liste latérale devient l'accordéon des fiches */
  .expo-plan-zoom { display: flex; }
  .expo-retour-plan { display: flex; }
  .expo-toolbar { top: 0; }
  .page-exposants .topbar { position: static; }    /* la barre n'est plus collante sur mobile */

  .exposants-section { padding: 20px 0 40px; }
  .expo-pin { width: 30px; height: 30px; font-size: 11px; }
  .expo-pin.is-selected { width: 38px; height: 38px; font-size: 13px; }

  .expo-palier { margin-bottom: 20px; }
  .expo-palier-titre { margin-bottom: 8px; }
  .expo-palier-titre span:first-child { font-size: 0.75rem; letter-spacing: 0.12em; }
  .expo-grille { grid-template-columns: 1fr !important; gap: 8px; }

  .expo-card { box-shadow: none; }
  .expo-card-entete { padding: 8px 10px; cursor: pointer; min-height: 56px; }
  .expo-card-entete .expo-num { width: 36px; height: 36px; padding: 0; font-size: 12px; box-shadow: none; background: var(--expo-primary); }
  .expo-card-entete .expo-num i, .expo-card-entete .expo-num-label { display: none; }
  .expo-card-entete h3 { font-size: 1rem; }
  .expo-card-entete .expo-chevron { display: inline-block; }
  .expo-card-palier { display: none; }
  .expo-card-corps { display: none; padding: 0 12px 14px; gap: 12px; }
  .expo-card.is-open { background: var(--sand); }
  .expo-card.is-open .expo-card-entete .expo-num { background: var(--expo-selected); }
  .expo-card.is-open .expo-card-corps { display: flex; }
  .expo-logo { height: 64px; background: #fff; }
  .expo-liens { display: none; }                    /* remplacés par les trois boutons */
  .expo-actions { display: grid; }
  .expo-action { background: #fff; border: 1px solid var(--line); }
  .expo-doc { background: #fff; }
  .expo-situer { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); min-height: 40px; }
}
@media (min-width: 900px) {
  .expo-situer { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .expo-pin, .expo-retour-plan, .expo-card, .expo-filtre { transition: none; }
}
