/* ════════════════════════════════════════════════════════════════════
   explorer.css — "Le monde de Sacha" · exploration libre interactive
   ════════════════════════════════════════════════════════════════════
   Format ludique, mobile-first, hotspots qui respirent (breathe),
   panel narratif avec révélation progressive.
   ════════════════════════════════════════════════════════════════════ */

.explorer {
  max-width: 880px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.explorer__eyebrow {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--eco-accent);
  display: block;
  margin-bottom: 14px;
}

/* ─── INTRO ─────────────────────────────────────────────────────── */
.explorer__intro {
  text-align: center;
  margin-bottom: 56px;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}
.explorer__intro h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  font-size: clamp(40px, 7vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0 0 18px;
  color: var(--eco-ink);
}
.explorer__intro h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--eco-accent);
}
.explorer__intro p {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.6;
  color: var(--eco-ink-soft);
  margin: 0;
}

/* ─── SCÈNE : 4 HOTSPOTS ─────────────────────────────────────── */
.explorer__scene {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-bottom: 72px;
}

.hotspot {
  position: relative;
  background: #FFFFFF;
  border: 1px solid var(--eco-line);
  border-radius: 18px;
  padding: 20px 16px 22px;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  transition: border-color .25s, transform .25s, box-shadow .25s;
  overflow: hidden;
}
.hotspot:hover,
.hotspot:focus-visible {
  border-color: var(--eco-accent);
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(61, 107, 181, 0.12);
  outline: none;
}
.hotspot:active { transform: translateY(-1px); }

.hotspot__pulse {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--eco-accent);
  box-shadow: 0 0 0 0 rgba(61, 107, 181, 0.45);
  animation: hotspotBreathe 2.6s ease-in-out infinite;
}
@keyframes hotspotBreathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(61, 107, 181, 0.55); opacity: 1; }
  50%      { box-shadow: 0 0 0 12px rgba(61, 107, 181, 0); opacity: 0.6; }
}

.hotspot__art {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 240px;
  margin: 0 auto 14px;
  background: var(--eco-bg-soft, #F4F2EC);
  border-radius: 14px;
  overflow: hidden;
}
.hotspot__art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.hotspot__label {
  display: block;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-size: clamp(20px, 2.5vw, 26px);
  line-height: 1.2;
  color: var(--eco-ink);
  margin-bottom: 6px;
}
.hotspot__hint {
  display: block;
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--eco-accent);
  opacity: 0.85;
}

/* ─── COLLECTIONNEUR "Mes idées gardées" ──────────────────────── */
.explorer__collect {
  margin-bottom: 56px;
  padding: 28px 24px;
  background: var(--eco-bg-soft, #F4F2EC);
  border-radius: 16px;
  border-left: 3px solid var(--eco-accent);
}
.explorer__collect h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  font-size: clamp(22px, 2.6vw, 28px);
  line-height: 1.2;
  margin: 0 0 18px;
  color: var(--eco-ink);
}
.explorer__collect h2 em {
  font-style: italic;
  font-weight: 500;
  color: var(--eco-accent);
}
.explorer__collect ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.explorer__collect li {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.45;
  color: var(--eco-ink);
  padding-left: 22px;
  position: relative;
}
.explorer__collect li::before {
  content: '★';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--eco-accent);
  font-style: normal;
  font-size: 14px;
}

/* ─── CTA FINAL ─────────────────────────────────────────────────── */
.explorer__cta {
  text-align: center;
  padding-top: 40px;
  border-top: 1px solid var(--eco-line);
}
.explorer__cta-lead {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: clamp(22px, 2.4vw, 28px);
  color: var(--eco-ink);
  margin: 0 0 20px;
}
.explorer__btn {
  display: inline-block;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 16px 32px;
  border-radius: 999px;
  text-decoration: none;
  transition: background .2s, transform .15s, box-shadow .2s;
}
.explorer__btn--primary {
  background: var(--eco-ink);
  color: #FFFFFF;
  box-shadow: 0 8px 20px rgba(26, 31, 46, 0.2);
}
.explorer__btn--primary:hover {
  background: var(--eco-accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(61, 107, 181, 0.32);
}
.explorer__credit {
  margin-top: 32px;
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--eco-ink-muted);
}

/* ─── PANEL MODAL ──────────────────────────────────────────────── */
.panel {
  position: fixed;
  inset: 0;
  z-index: 1000;
}
.panel[hidden] { display: none; }

.panel__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 31, 46, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: panelFade .25s ease;
}

.panel__card {
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: 520px;
  max-height: calc(100vh - 40px);
  width: calc(100% - 32px);
  background: #FAFAF7;
  border-radius: 22px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.32);
  padding: 32px 28px 24px;
  overflow-y: auto;
  font-family: 'Inter', -apple-system, sans-serif;
  animation: panelRise .35s cubic-bezier(.16, .7, .2, 1);
  height: fit-content;
}
@keyframes panelFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes panelRise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.panel__close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: transparent;
  border: 0;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 30px;
  line-height: 1;
  color: var(--eco-ink-soft);
  transition: background .15s, color .15s;
  z-index: 2;
}
.panel__close:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--eco-ink);
}

.panel__place {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--eco-accent);
  display: block;
  margin-bottom: 8px;
  padding-right: 40px;
}
.panel__title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-size: clamp(24px, 4vw, 30px);
  line-height: 1.15;
  margin: 0 0 18px;
  color: var(--eco-ink);
}
.panel__art {
  margin: 0 0 20px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--eco-bg-soft, #F4F2EC);
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}
.panel__art img {
  display: block;
  width: 100%;
  height: auto;
}

.panel__label {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--eco-ink-muted);
  display: block;
  margin-bottom: 6px;
}
.panel__beat {
  margin-bottom: 18px;
  padding-left: 16px;
  border-left: 2px solid var(--eco-line);
}
.panel__beat--visible { border-left-color: #9A9FAB; }
.panel__beat--maybe   { border-left-color: var(--eco-accent); }
.panel__beat--maybe .panel__label { color: var(--eco-accent); }
.panel__beat--help    { border-left-color: #88A874; }
.panel__beat--help .panel__label { color: #5C7848; }
.panel__beat p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--eco-ink);
  margin: 0;
}

.panel__reveal {
  display: block;
  width: 100%;
  background: transparent;
  border: 1px dashed var(--eco-line);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--eco-accent);
  cursor: pointer;
  margin: 0 0 18px;
  transition: background .2s, border-color .2s;
}
.panel__reveal:hover {
  background: rgba(61, 107, 181, 0.05);
  border-color: var(--eco-accent);
}
.panel__reveal[data-state="open"] {
  border-style: solid;
  border-color: var(--eco-accent);
  background: rgba(61, 107, 181, 0.08);
}
.panel__reveal .when-open { display: none; }
.panel__reveal[data-state="open"] .when-closed { display: none; }
.panel__reveal[data-state="open"] .when-open { display: inline; }

.panel__phrase {
  margin: 24px 0 8px;
  padding: 18px 4px 0;
  border-top: 1px solid var(--eco-line);
  text-align: center;
}
.panel__phrase[hidden] { display: none; }
.panel__phrase p {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(19px, 2.2vw, 23px);
  line-height: 1.4;
  color: var(--eco-accent);
  margin: 0;
}

.panel__actions {
  margin-top: 22px;
  text-align: center;
}
.panel__keep {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
  border: 1px solid var(--eco-line);
  border-radius: 999px;
  padding: 11px 22px;
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--eco-ink);
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.panel__keep:hover {
  border-color: var(--eco-accent);
  color: var(--eco-accent);
}
.panel__keep .star { color: var(--eco-accent); font-size: 16px; }
.panel__keep[data-kept="true"] {
  background: var(--eco-accent);
  color: #FFFFFF;
  border-color: var(--eco-accent);
}
.panel__keep[data-kept="true"] .star { color: #FFFFFF; }

/* ─── Reveal animation ────────────────────────────────────────── */
.mcw-reveal { opacity: 1; }
.mcw-reveal.is-revealable {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .55s ease-out, transform .55s ease-out;
}
.mcw-reveal.is-revealable.is-revealed { opacity: 1; transform: translateY(0); }

/* ─── Mobile ────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .explorer { padding: 28px 18px 64px; }
  .explorer__intro { margin-bottom: 40px; }
  .explorer__scene {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 56px;
  }
  .hotspot { padding: 16px 14px 18px; }
  .hotspot__art { max-width: 180px; margin-bottom: 12px; }

  .panel__card {
    padding: 28px 22px 20px;
    width: calc(100% - 24px);
    max-height: calc(100vh - 24px);
    border-radius: 18px;
  }
  .panel__art { max-width: 220px; }
}

@media (prefers-reduced-motion: reduce) {
  .hotspot__pulse { animation: none; opacity: 0.6; box-shadow: none; }
  .mcw-reveal.is-revealable { transition: none !important; }
  .panel__backdrop, .panel__card { animation: none !important; }
  .hotspot, .panel__keep { transition: none !important; }
  .hotspot:hover, .explorer__btn--primary:hover { transform: none; }
}
