/* ============================================================================
   STARFALL PRODUCTIONS — EASTER EGGS
   Reprend les tokens déjà définis dans :root de index.php
   (--gold, --navy-card, --font-title, --ease, etc.)
   ============================================================================ */

/* ----------------------------------------------------------------
   OVERLAY / POPUP GENERIQUE
   ---------------------------------------------------------------- */
.egg-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 8, 16, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.25s var(--ease, ease);
}
.egg-overlay--visible { opacity: 1; }

.egg-popup {
  position: relative;
  max-width: 480px;
  width: 100%;
  background: var(--navy-card, rgba(4, 10, 20, 0.92));
  border: 1px solid var(--border-gold, rgba(201, 168, 76, 0.28));
  border-radius: 14px;
  box-shadow: 0 12px 60px rgba(201, 168, 76, 0.12), 0 8px 40px rgba(0, 0, 0, 0.5);
  padding: 32px;
  transform: translateY(12px) scale(0.97);
  transition: transform 0.3s var(--ease, ease);
}
.egg-overlay--visible .egg-popup { transform: translateY(0) scale(1); }

.egg-popup--wide {
  max-width: 760px;
}

.egg-popup__close {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 22px;
  line-height: 1;
  color: var(--text-secondary, #a8b4c0);
  transition: color 0.2s;
}
.egg-popup__close:hover { color: var(--gold, #c9a84c); }

/* ----------------------------------------------------------------
   EGG 1 — LENY
   ---------------------------------------------------------------- */
.egg-leny {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.egg-leny__img {
  max-width: 200px;
  max-height: 260px;
  border-radius: 8px;
  border: 1px solid var(--border-gold, rgba(201, 168, 76, 0.28));
}

/* ----------------------------------------------------------------
   EGG 2 — COORDONNEES DU TITANIC
   ---------------------------------------------------------------- */
.egg-coords__title {
  font-family: var(--font-title, 'Cinzel', serif);
  color: var(--gold-light, #e8cc80);
  font-size: 20px;
  letter-spacing: 0.03em;
  margin-bottom: 18px;
  text-align: center;
}
.egg-coords__row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-sub, rgba(255, 255, 255, 0.06));
  font-family: var(--font-body, 'Raleway', sans-serif);
  color: var(--text-secondary, #a8b4c0);
  font-size: 14px;
}
.egg-coords__row strong {
  color: var(--text-primary, #f0ece4);
  font-weight: 600;
}
.egg-coords__map {
  margin-top: 18px;
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  border: 1px solid var(--border-gold, rgba(201, 168, 76, 0.28));
}
.egg-coords__legend {
  margin-top: 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-family: var(--font-body, 'Raleway', sans-serif);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary, #a8b4c0);
}
.egg-coords__legend-dot {
  flex-shrink: 0;
  margin-top: 4px;
  width: 8px;
  height: 8px;
  background: #3fa66c;
  border: 1px solid #2c7a4e;
  transform: rotate(45deg);
}

/* ----------------------------------------------------------------
   EGG 3 — MODE 1912
   ---------------------------------------------------------------- */
html.mode-1912 {
  --gold: #8a6d3b;
  --gold-light: #a9895a;
  --gold-dim: #5c4726;
  --gold-glow: rgba(138, 109, 59, 0.15);
  --navy-deep: #e9dfc7;
  --navy-card: rgba(233, 223, 199, 0.92);
  --text-primary: #2b2117;
  --text-secondary: #4d4030;
  --text-muted: #6b5d47;
  --border-gold: rgba(90, 70, 38, 0.35);
  --border-sub: rgba(43, 33, 23, 0.12);
  --vintage-red: #7a2420;
  --vintage-red-dark: #4a1512;

  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-title: 'Cinzel', 'Georgia', serif;
  --font-body: 'Georgia', 'Times New Roman', serif;
}

html.mode-1912 body {
  background: #e9dfc7 !important;
  box-shadow: inset 0 0 0 3px var(--border-gold), inset 0 0 0 8px transparent;
}

/* Grain plus prononcé façon papier vieilli, animations coupées */
html.mode-1912 *,
html.mode-1912 *::before,
html.mode-1912 *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

/* Désature toute image / vidéo du site */
html.mode-1912 img,
html.mode-1912 video,
html.mode-1912 picture {
  filter: sepia(0.55) grayscale(0.65) contrast(1.05) brightness(0.95) !important;
}

/* Vignette papier vieilli */
html.mode-1912 body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(43, 33, 23, 0.35) 100%);
}

/* Cadre ornemental — fleurons aux 4 coins de la page (sur <html>, jamais en conflit avec le grain/vignette de body) */
html.mode-1912::before {
  content: '';
  position: fixed;
  inset: 14px;
  pointer-events: none;
  z-index: 9999;
  border: 1px solid rgba(90, 70, 38, 0.28);
  background-repeat: no-repeat;
  background-size: 46px 46px;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 46'%3E%3Cpath d='M2 2 Q2 24 24 24 Q2 24 2 44' fill='none' stroke='%235c4726' stroke-width='1.3'/%3E%3Ccircle cx='2' cy='2' r='2.4' fill='%235c4726'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 46'%3E%3Cpath d='M44 2 Q44 24 22 24 Q44 24 44 44' fill='none' stroke='%235c4726' stroke-width='1.3'/%3E%3Ccircle cx='44' cy='2' r='2.4' fill='%235c4726'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 46'%3E%3Cpath d='M2 44 Q2 22 24 22 Q2 22 2 2' fill='none' stroke='%235c4726' stroke-width='1.3'/%3E%3Ccircle cx='2' cy='44' r='2.4' fill='%235c4726'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 46'%3E%3Cpath d='M44 44 Q44 22 22 22 Q44 22 44 2' fill='none' stroke='%235c4726' stroke-width='1.3'/%3E%3Ccircle cx='44' cy='44' r='2.4' fill='%235c4726'/%3E%3C/svg%3E");
  background-position: top left, top right, bottom left, bottom right;
}

/* Curseurs custom codés en couleur fixe (loupe, plume...) : neutralisés — ils jureraient avec le sépia */
html.mode-1912 *,
html.mode-1912 *::before,
html.mode-1912 *::after {
  cursor: auto !important;
}
html.mode-1912 a,
html.mode-1912 button,
html.mode-1912 .btn,
html.mode-1912 [onclick],
html.mode-1912 .coll-btn {
  cursor: pointer !important;
}

/* Dividers ornementaux — remplace le simple trait doré par un fleuron de gravure */
html.mode-1912 .gold-bar,
html.mode-1912 .section-divider {
  height: auto !important;
  width: auto !important;
  min-width: 90px;
  background: none !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 26px auto 40px !important;
}
html.mode-1912 .gold-bar.center,
html.mode-1912 .section-divider {
  margin-left: auto;
  margin-right: auto;
}
html.mode-1912 .gold-bar::before,
html.mode-1912 .gold-bar::after,
html.mode-1912 .section-divider::before,
html.mode-1912 .section-divider::after {
  content: '';
  width: 34px;
  height: 1px;
  background: var(--gold-dim);
}
html.mode-1912 .gold-bar::after,
html.mode-1912 .section-divider::after {
  content: '\25C6';
  width: auto;
  height: auto;
  background: none;
  color: var(--gold-dim);
  font-size: 10px;
  line-height: 1;
}

/* Boutons — effet gravure d'époque, accent rouge vieilli au survol */
html.mode-1912 .btn {
  border-width: 1px;
  border-style: double;
  border-width: 3px;
  font-family: var(--font-title);
  letter-spacing: .16em;
}
html.mode-1912 .btn--gold {
  background: var(--gold-glow);
  border-color: var(--gold-dim);
  color: var(--text-primary);
}
html.mode-1912 .btn--gold:hover {
  background: var(--vintage-red);
  border-color: var(--vintage-red-dark);
  color: #ede2c8;
}

/* Titres de hero — rouge masthead façon presse d'époque */
html.mode-1912 .hero h1,
html.mode-1912 .hero__title,
html.mode-1912 .rp-hero__cover + .rp-hero__text {
  color: var(--vintage-red) !important;
  -webkit-text-fill-color: var(--vintage-red) !important;
}

/* Toasts de badges — accordés au sépia (surcharge badges.css par spécificité, pas besoin d'y toucher) */
html.mode-1912 .badge-toast {
  background: var(--navy-card);
  border-color: var(--border-gold);
  box-shadow: 0 8px 32px rgba(43, 33, 23, 0.25);
}
html.mode-1912 .badge-toast__label {
  color: var(--text-muted);
}
html.mode-1912 .badge-toast__name {
  color: var(--text-primary);
}

/* ----------------------------------------------------------------
   MODE 1912 — WIDGET MARCONIA (reskin poste de radiotélégraphie
   d'époque : le bleu néon sci-fi devient laiton/sépia)
   ---------------------------------------------------------------- */
html.mode-1912 .mi-trigger {
  background: rgba(233, 223, 199, 0.88);
  border-color: var(--border-gold);
  color: var(--text-primary);
}
html.mode-1912 .mi-trigger:hover {
  border-color: var(--gold);
  box-shadow: 0 8px 24px rgba(90, 70, 38, 0.18);
}
html.mode-1912 .mi-pulse-dot,
html.mode-1912 .mi-center-dot {
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold-dim);
}
html.mode-1912 .mi-trigger-top,
html.mode-1912 .mi-logo-top,
html.mode-1912 .mi-status span,
html.mode-1912 .mi-msg-bot .mi-msg-label,
html.mode-1912 .mi-msg-loading .mi-msg-label {
  color: var(--gold-dim);
}
html.mode-1912 .mi-status-dot {
  background: #5c7a52;
  box-shadow: 0 0 10px #5c7a52;
}
html.mode-1912 .mi-overlay {
  background: radial-gradient(circle at center, rgba(90, 70, 38, 0.18), rgba(43, 33, 23, 0.85));
}
html.mode-1912 .mi-panel {
  background: var(--navy-card);
  border-color: var(--border-gold);
}
html.mode-1912 .mi-panel-header {
  border-bottom-color: var(--border-sub);
}
html.mode-1912 .mi-logo-main,
html.mode-1912 .mi-title {
  color: var(--text-primary);
}
html.mode-1912 .mi-close {
  background: rgba(90, 70, 38, 0.12);
  color: var(--text-primary);
}
html.mode-1912 .mi-close:hover {
  background: rgba(90, 70, 38, 0.2);
}
html.mode-1912 .mi-desc {
  color: var(--text-secondary);
}
html.mode-1912 .mi-msg-user {
  background: linear-gradient(135deg, rgba(90,70,38,.1), rgba(90,70,38,.02));
  border-color: var(--border-gold);
}
html.mode-1912 .mi-msg-bot,
html.mode-1912 .mi-msg-loading {
  background: linear-gradient(135deg, rgba(43,33,23,.06), rgba(43,33,23,.01));
  border-color: var(--border-sub);
}
html.mode-1912 .mi-msg-user .mi-msg-label {
  color: var(--text-muted);
}
html.mode-1912 .mi-ask-box {
  background: rgba(43, 33, 23, 0.04);
  border-color: var(--border-sub);
}
html.mode-1912 .mi-ask-box input {
  color: var(--text-primary);
}
html.mode-1912 .mi-ask-box button {
  background: var(--gold);
  color: #2b2117;
}
html.mode-1912 .mi-ask-box button:hover {
  background: var(--gold-light);
}
html.mode-1912 .mi-quota {
  color: var(--text-muted);
}
html.mode-1912 .mi-quota::before {
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}
html.mode-1912 .mi-radar {
  border-color: var(--border-gold);
  background: radial-gradient(circle, rgba(90,70,38,.06), transparent 70%);
}
html.mode-1912 .mi-radar::before,
html.mode-1912 .mi-radar::after {
  border-color: var(--border-sub);
}
html.mode-1912 .mi-sweep {
  background: linear-gradient(to bottom, rgba(138,109,59,.9), transparent);
}
html.mode-1912 .mi-blip.success {
  background: #5c7a52;
}
html.mode-1912 .mi-blip.failure {
  background: var(--vintage-red);
}

/* ----------------------------------------------------------------
   EGG 4 — VOYAGE DANS LE TEMPS
   ---------------------------------------------------------------- */
.egg-timetravel {
  text-align: center;
  padding: 12px 0;
}
.egg-timetravel__text {
  font-family: var(--font-title, 'Cinzel', serif);
  color: var(--gold-light, #e8cc80);
  font-size: 20px;
  letter-spacing: 0.05em;
  animation: eggFlicker 1.2s ease-in-out infinite;
}
@keyframes eggFlicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* ----------------------------------------------------------------
   EGG 5 — LOGO DVD
   ---------------------------------------------------------------- */
.egg-dvd__stage {
  position: relative;
  width: 100%;
  height: 320px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--navy-deep, #020810);
  border: 1px solid var(--border-gold, rgba(201, 168, 76, 0.28));
}
.egg-dvd__logo {
  position: absolute;
  top: 0;
  left: 0;
  width: 90px;
  will-change: transform;
}
.egg-dvd__status {
  margin-top: 14px;
  text-align: center;
  font-family: var(--font-title, 'Cinzel', serif);
  font-size: 15px;
  color: var(--gold-light, #e8cc80);
  min-height: 20px;
  opacity: 0;
  transition: opacity 0.3s;
}
.egg-dvd__status--success {
  opacity: 1;
}

/* ----------------------------------------------------------------
   RESPONSIVE
   ---------------------------------------------------------------- */
@media (max-width: 560px) {
  .egg-popup { padding: 24px 20px; }
  .egg-dvd__stage { height: 240px; }
  .egg-leny__img { max-width: 140px; max-height: 180px; }
}
