/* ==========================================================================
   BLOCS FLOTTANTS V3 - Repliables avec flèche
   ========================================================================== */

@keyframes slideInRight {
  0% { opacity: 0; transform: translateX(100%); }
  100% { opacity: 1; transform: translateX(0); }
}
@keyframes slideInLeft {
  0% { opacity: 0; transform: translateX(-100%); }
  100% { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* === BLOCS FLOTTANTS === */
.floating-block {
  position: fixed;
  z-index: 900;
  background: linear-gradient(135deg, #0d1b2a 0%, #1b263b 100%);
  border: 1px solid rgba(201, 162, 39, 0.4);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(201, 162, 39, 0.1);
  width: 340px;
  max-width: 90vw;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  font-family: 'Libre Baskerville', Georgia, serif;
}

.floating-block.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* SIMULATEUR - Position droite */
.floating-simulator {
  top: 160px;
  right: 20px;
  max-height: none;
  overflow-y: visible;
}
.floating-simulator.is-visible {
  animation: slideInRight 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.floating-simulator.is-collapsed {
  top: 520px;
  right: 20px;
  bottom: auto;
}

/* FAQ - Position gauche */
.floating-faq {
  bottom: 120px;
  left: 20px;
  right: auto;
  max-height: calc(100vh - 280px);
  overflow-y: auto;
}
.floating-faq.is-visible {
  animation: slideInLeft 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.floating-faq.is-collapsed {
  bottom: 0;
  bottom: 0;
  left: 20px;
  top: auto;
}

/* ÉTAT REPLIÉ */
.floating-block.is-collapsed {
  width: 54px;
  height: 120px !important;
  max-height: 120px !important;
  overflow: hidden;
}
.floating-simulator.is-collapsed {
  width: 54px;
  height: 145px !important;
  max-height: 145px !important;
}
.floating-block.is-collapsed .floating-content {
  opacity: 0;
  visibility: hidden;
  height: 0;
  padding: 0;
}
.floating-block.is-collapsed .floating-toggle {
  opacity: 0;
  visibility: hidden;
}
.floating-block.is-collapsed .floating-collapsed {
  opacity: 1;
  visibility: visible;
}

/* BOUTON REPLIER */
.floating-toggle {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 32px;
  height: 32px;
  background: rgba(201, 162, 39, 0.25);
  border: 3px solid rgba(201, 162, 39, 0.8);
  border-radius: 50%;
  color: #c9a227;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}
.floating-toggle:hover {
  background: #c9a227;
  color: #0d1b2a;
}

/* ÉTAT REPLIÉ VISIBLE */
.floating-collapsed {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 6px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  background: linear-gradient(135deg, #0d1b2a 0%, #1b263b 100%);
  border-radius: 12px;
}
.floating-expand {
  width: 36px;
  height: 36px;
  background: rgba(201, 162, 39, 0.3);
  border: 3px solid rgba(201, 162, 39, 0.85);
  border-radius: 50%;
  color: #c9a227;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.floating-expand:hover {
  background: #c9a227;
  color: #0d1b2a;
  transform: scale(1.1);
}
.floating-collapsed-label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: #c9a227;
  letter-spacing: 0.04em;
  text-shadow: 0 0 8px rgba(201, 162, 39, 0.3);
}

/* CONTENU */
.floating-content {
  padding: 1.25rem;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.gold-bar {
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, #c9a227, #e8d48b, #c9a227);
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
  border-radius: 2px;
  margin-bottom: 0.75rem;
}
.floating-title {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 400;
  color: #c9a227;
  margin: 0 0 1rem;
  text-shadow: 0 0 12px rgba(201, 162, 39, 0.3);
}

/* SIMULATEUR WIDGET */
.simulator-widget {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 1rem;
  font-family: 'Libre Baskerville', Georgia, serif;
}
.sim-input-row { margin-bottom: 0.75rem; }
.sim-input-row label {
  display: block;
  font-size: 0.8rem;
  font-family: 'Libre Baskerville', Georgia, serif;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.4rem;
}
.sim-input-wrap {
  display: flex;
  background: rgba(10, 22, 34, 0.9);
  border: 1px solid rgba(201, 162, 39, 0.4);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.sim-input-wrap:focus-within {
  border-color: #c9a227;
  box-shadow: 0 0 12px rgba(201, 162, 39, 0.3);
}
.sim-input-wrap input {
  flex: 1;
  min-width: 0;
  padding: 0.7rem 0.9rem;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.1rem;
  font-family: 'Libre Baskerville', Georgia, serif;
}
.sim-input-wrap input::placeholder { color: rgba(255, 255, 255, 0.3); }
.sim-input-wrap input:focus { outline: none; }
.sim-suffix {
  padding: 0.7rem 0.9rem;
  color: #c9a227;
  font-weight: 600;
  background: rgba(201, 162, 39, 0.1);
  font-size: 1.1rem;
  font-family: 'Libre Baskerville', Georgia, serif;
}
.sim-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.7rem 1rem;
  margin-top: 0.5rem;
  background: linear-gradient(135deg, #c9a227 0%, #a8851e 100%);
  color: #0a1622;
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.sim-btn:hover {
  background: linear-gradient(135deg, #d4b23a 0%, #c9a227 100%);
  box-shadow: 0 4px 16px rgba(201, 162, 39, 0.4);
  transform: translateY(-1px);
}
.sim-btn svg { stroke: #0a1622; }
.sim-result {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(201, 162, 39, 0.2);
}
.sim-result.anim-fade-in { animation: fadeInUp 0.4s ease forwards; }
.sim-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
}
.sim-result-row.highlight {
  background: rgba(201, 162, 39, 0.1);
  margin: 0.25rem -0.5rem;
  padding: 0.5rem;
  border-radius: 4px;
}
.sim-label { font-size: 0.8rem; color: rgba(255, 255, 255, 0.7); font-family: 'Libre Baskerville', Georgia, serif; }
.sim-value { font-family: 'Libre Baskerville', Georgia, serif; font-weight: 700; color: #fff; }
.sim-value.gold { color: #c9a227; font-size: 1.1rem; }
.sim-value.green { color: #4ade80; }
.sim-disclaimer {
  margin: 1rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.65rem;
  font-family: 'Libre Baskerville', Georgia, serif;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.4;
}

/* FAQ ACCORDION */
.faq-accordion { display: flex; flex-direction: column; gap: 0.5rem; }
.faq-item {
  background: rgba(10, 22, 34, 0.6);
  border: 1px solid rgba(201, 162, 39, 0.15);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.3s;
}
.faq-item:hover, .faq-item.open { border-color: rgba(201, 162, 39, 0.4); }
.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0.9rem;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
}
.faq-q span:first-child { font-family: 'Libre Baskerville', Georgia, serif; font-size: 0.85rem; color: #fff; }
.faq-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(201, 162, 39, 0.2);
  border: 2px solid rgba(201, 162, 39, 0.5);
  border-radius: 50%;
  color: #c9a227;
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.3s, background 0.3s;
}
.faq-item.open .faq-icon { transform: rotate(45deg); background: #c9a227; color: #0a1622; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.faq-item.open .faq-a { max-height: 120px; }
.faq-a p { padding: 0 0.9rem 0.7rem; margin: 0; font-size: 0.8rem; font-family: 'Libre Baskerville', Georgia, serif; color: rgba(255, 255, 255, 0.7); line-height: 1.5; }
.faq-a strong { color: #c9a227; }
.faq-contact-link {
  display: block;
  text-align: center;
  margin-top: 0.75rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 2px solid #c9a227;
  border-radius: 6px;
  color: #c9a227;
  font-size: 0.8rem;
  font-family: 'Libre Baskerville', Georgia, serif;
  text-decoration: none;
  transition: all 0.2s;
}
.faq-contact-link:hover { background: #c9a227; color: #0a1622; }

/* RESPONSIVE */
@media (max-width: 768px) {
  .floating-block { max-width: calc(100vw - 20px); }
  .floating-simulator { top: 120px; right: 10px; }
  .floating-simulator.is-collapsed { top: auto; bottom: 20px; }
  .floating-faq { bottom: 100px; left: 10px; }
  .floating-faq.is-collapsed {
  bottom: 0; bottom: 60px; }
}
