/**
 * CRO Global — Réservation Taxi Paris
 * Composants conversion : bannière 2min · avis · sticky mobile · compteur
 * Chargé sur TOUTES les pages via inject_cro_global_css.py
 */

/* ══════════════════════════════════════════════════════
   1. URGENCY BANNER "Réponse en moins de 2 minutes"
   ══════════════════════════════════════════════════════ */
.cro-urgency-banner {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.32rem 0.85rem;
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.32);
  border-radius: 100px;
  margin-bottom: 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #22c55e;
  letter-spacing: 0.015em;
  animation: cro-blink 2.8s ease-in-out infinite;
}

.cro-urgency-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  animation: cro-dot-pulse 2.8s ease-in-out infinite;
}

@keyframes cro-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.72; }
}

@keyframes cro-dot-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
  50%       { box-shadow: 0 0 0 5px rgba(34, 197, 94, 0); }
}

/* ══════════════════════════════════════════════════════
   2. HERO REVIEWS (étoiles + note + nb avis)
   ══════════════════════════════════════════════════════ */
.cro-reviews-hero {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}

.cro-stars {
  display: inline-flex;
  gap: 0.05rem;
  color: #fbbf24;
  font-size: 1.05rem;
  line-height: 1;
  letter-spacing: 0.02em;
}

.cro-reviews-text {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 500;
  line-height: 1.3;
}

.cro-reviews-text strong {
  color: #fff;
  font-weight: 700;
}

/* ══════════════════════════════════════════════════════
   3. RESERVATION COUNTER BADGE
   ══════════════════════════════════════════════════════ */
.cro-counter-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.75rem;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: 100px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #fbbf24;
  margin-bottom: 0.55rem;
}

.cro-counter-icon {
  font-size: 0.85rem;
  line-height: 1;
}

/* ══════════════════════════════════════════════════════
   4. STICKY MOBILE BAR (pleine largeur)
   ══════════════════════════════════════════════════════ */
.cro-sticky-mobile {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #111114;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.55);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.cro-sticky-mobile-inner {
  display: flex;
  height: 58px;
}

.cro-sticky-mobile-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.01em;
  -webkit-tap-highlight-color: transparent;
  transition: filter 0.18s ease;
  cursor: pointer;
}

.cro-sticky-mobile-btn:active {
  filter: brightness(0.92);
}

.cro-sticky-mobile-btn--call {
  background: #f4f4f5;
  color: #0a0a0b;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}

.cro-sticky-mobile-btn--whatsapp {
  background: #22c55e;
  color: #fff;
}

.cro-sticky-mobile-btn svg,
.cro-sticky-mobile-btn .cro-smb-icon {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .cro-sticky-mobile {
    display: block;
  }
  /* Padding for main content so nothing is hidden behind the bar */
  .app-main,
  main {
    padding-bottom: max(calc(58px + env(safe-area-inset-bottom, 0px)), 58px) !important;
  }
}

@media (min-width: 901px) {
  .cro-sticky-mobile {
    display: none !important;
  }
}

/* ══════════════════════════════════════════════════════
   5. MID-PAGE CTA BANNER
   ══════════════════════════════════════════════════════ */
.cro-mid-banner {
  margin: 1.75rem 0;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #0f0f12 0%, #1a1a1e 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-left: 3px solid #22c55e;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.cro-mid-banner-copy {
  flex: 1;
  min-width: 0;
}

.cro-mid-banner-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f5f5f5;
  margin: 0 0 0.15rem;
}

.cro-mid-banner-sub {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
  font-weight: 400;
}

.cro-mid-banner-actions {
  display: flex;
  gap: 0.6rem;
  flex-shrink: 0;
}

.cro-mid-banner-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.15rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.01em;
  transition: opacity 0.2s ease;
  cursor: pointer;
}

.cro-mid-banner-btn:hover {
  opacity: 0.87;
}

.cro-mid-banner-btn--call {
  background: #fff;
  color: #0a0a0b;
}

.cro-mid-banner-btn--whatsapp {
  background: #22c55e;
  color: #fff;
}

@media (max-width: 640px) {
  .cro-mid-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.1rem;
  }
  .cro-mid-banner-actions {
    width: 100%;
    flex-direction: column;
  }
  .cro-mid-banner-btn {
    width: 100%;
    justify-content: center;
    padding: 0.7rem 1rem;
  }
}

/* ══════════════════════════════════════════════════════
   6. SOCIAL PROOF NUDGE (override / enhance existing)
   ══════════════════════════════════════════════════════ */
.social-proof-nudge {
  position: fixed;
  bottom: 80px; /* above sticky bar */
  left: 1rem;
  z-index: 9998;
  max-width: 320px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}

.social-proof-nudge.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@media (max-width: 900px) {
  .social-proof-nudge {
    bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    left: 0.5rem;
    right: 0.5rem;
    max-width: none;
  }
}
