/* ═══════════════════════════════════════════════════════════════
   MIA IA SYSTEM — Patch CSS v4.0 (18/03/2026)
   ═══════════════════════════════════════════════════════════════ */

/* #0 FIX: Forcer le layout ticker + header + body */
/* Ticker desactive — le header est maintenant en haut */
#mia-tv-ticker {
  display: none !important;
}
header,
header.fixed,
header[class*="fixed"],
header[style*="position: fixed"] {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  background: #0A0E17 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  z-index: 100 !important;
  transition-property: transform, box-shadow !important;
}
body {
  padding-top: 64px !important;
}
/* Backdrop shield — div opaque DERRIERE le header, hors arbre React */
#mia-header-bg {
  position: fixed !important;
  top: 46px !important;
  left: 0 !important;
  right: 0 !important;
  height: 64px !important;
  background: #0A0E17 !important;
  z-index: 99 !important;
  pointer-events: none !important;
}
body {
  padding-top: 110px !important;
}

/* #0b FIX: Resultats section responsive */
@media (max-width: 768px) {
  #mia-results > div:nth-child(2) {
    grid-template-columns: 1fr 1fr !important;
  }
}
@media (max-width: 480px) {
  #mia-results > div:nth-child(2) {
    grid-template-columns: 1fr !important;
  }
}

/* #1 FIX: Rendre visible les éléments opacity:0 */
[style*="opacity:0"],
[style*="opacity: 0"] {
  opacity: 1 !important;
  transform: none !important;
}

.mia-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.mia-reveal.mia-visible { opacity: 1; transform: translateY(0); }
.mia-reveal[data-delay="1"] { transition-delay: 0.08s; }
.mia-reveal[data-delay="2"] { transition-delay: 0.16s; }
.mia-reveal[data-delay="3"] { transition-delay: 0.24s; }
.mia-reveal[data-delay="4"] { transition-delay: 0.32s; }
.mia-reveal[data-delay="5"] { transition-delay: 0.40s; }
.mia-reveal[data-delay="6"] { transition-delay: 0.48s; }
.mia-reveal[data-delay="7"] { transition-delay: 0.56s; }
.mia-reveal[data-delay="8"] { transition-delay: 0.64s; }


/* ─── #6 NAVBAR AUTO-HIDE ─── */
header.mia-nav-hidden { transform: translateY(-100%) !important; }


/* ─── #D SÉLECTEUR DE LANGUE — Griser EN/ES/DE ─── */
.mia-lang-disabled {
  opacity: 0.35 !important;
  cursor: not-allowed !important;
  pointer-events: none;
  position: relative;
}
.mia-lang-disabled::after {
  content: 'Bientôt';
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  color: #64748b;
  white-space: nowrap;
}
.mia-lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: rgba(19, 23, 34, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 8px;
  min-width: 160px;
  z-index: 100;
  display: none;
}
.mia-lang-dropdown.mia-open { display: block; }
.mia-lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: #cbd5e1;
  cursor: pointer;
  transition: background 0.2s;
}
.mia-lang-option:hover:not(.mia-lang-disabled) { background: rgba(255,255,255,0.05); }
.mia-lang-option.mia-lang-active {
  color: #00b4dc;
  background: rgba(0,180,220,0.1);
}


/* ─── #B FORMULAIRE CONTACT — Feedback ─── */
.mia-form-success {
  background: rgba(0, 200, 83, 0.1);
  border: 1px solid rgba(0, 200, 83, 0.3);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  color: #00c853;
  font-weight: 500;
}
.mia-form-error {
  background: rgba(255, 82, 82, 0.1);
  border: 1px solid rgba(255, 82, 82, 0.3);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  color: #ff5252;
  font-size: 14px;
}
.mia-form-sending {
  opacity: 0.6;
  pointer-events: none;
}
.mia-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #00b4dc;
  border-radius: 50%;
  animation: mia-spin 0.6s linear infinite;
}
@keyframes mia-spin {
  to { transform: rotate(360deg); }
}


/* ─── MISC FIXES ─── */
.faq-item:first-child .overflow-hidden { height: auto !important; opacity: 1 !important; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  .mia-reveal { transition: none; opacity: 1; transform: none; }
}
