/* ==========================================================================
   AR INTEGRATION - KUCK STYLE
   ========================================================================== */

/* Bannière AR sous le hero */
.ar-banner {
  position: relative;
  background: linear-gradient(
    135deg,
    rgba(9, 11, 20, 0.98) 0%,
    rgba(27, 35, 51, 0.98) 100%
  );
  border: 2px solid rgba(0, 240, 255, 0.5);
  border-radius: 25px;
  padding: 3rem 3rem;
  margin: 4rem auto 4rem auto;
  max-width: 1000px;
  backdrop-filter: blur(15px);
  box-shadow: 0 0 50px rgba(0, 240, 255, 0.4), 0 15px 60px rgba(0, 0, 0, 0.6),
    inset 0 2px 0 rgba(0, 240, 255, 0.2);
  z-index: 5;
  overflow: visible;
}

.ar-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 240, 255, 0.8) 50%,
    transparent 100%
  );
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}

.ar-banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  flex-wrap: wrap;
}

.ar-banner-text {
  flex: 1;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 0.9rem; /* espace régulier entre titre et texte */
  text-align: center;
}

.ar-banner-title {
  position: relative;
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  color: #00f0ff;
  margin-bottom: 0.75rem;
  text-shadow: 0 0 30px rgba(0, 240, 255, 0.8);
  text-align: center; /* <-- CENTRE le texte */
  display: block; /* <-- supprime le flex */
}

/* On place l’icône au-dessus ou à gauche, mais centrée */
.ar-banner-title i {
  display: block; /* <-- l’icône prend toute la largeur */

  font-size: 2.5rem;
  animation: rotate3d 4s linear infinite;
  margin: 0 auto 1rem auto;
}

@keyframes rotate3d {
  0% {
    transform: rotateY(0deg);
  }
  100% {
    transform: rotateY(360deg);
  }
}

.ar-banner-subtitle {
  font-family: "Roboto", sans-serif;
  font-size: 0.98rem;
  color: #c5d1e3;
  margin: 0;
  line-height: 1.7;
  font-weight: 300;
  opacity: 0.98;
  max-width: 32rem; /* limite la largeur du paragraphe */
  margin: 0 auto;
}

.ar-banner-qr {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.95);
  border: 3px solid rgba(0, 240, 255, 0.8);
  border-radius: 20px;
  padding: 0.5rem;
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.6);
  transition: all 0.3s ease;
  min-width: 220px;
  min-height: 220px;
  max-width: 220px;
  max-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ar-banner-qr:hover {
  border-color: rgba(0, 240, 255, 1);
  box-shadow: 0 0 60px rgba(0, 240, 255, 0.9);
  transform: scale(1.05);
  cursor: pointer;
}

/* Styles pour l'image QR code dans la bannière */
.ar-banner-qr a {
  display: block;
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease;
}

.ar-banner-qr a:hover {
  transform: scale(1.02);
}

.ar-banner-qr img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 15px;
}

/* Bouton flottant AR */
.ar-floating-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, #00f0ff 0%, #0099ff 100%);
  border: 2px solid rgba(0, 240, 255, 0.6);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.6), 0 10px 30px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.6), 0 10px 30px rgba(0, 0, 0, 0.4);
  }
  50% {
    box-shadow: 0 0 50px rgba(0, 240, 255, 0.9), 0 10px 40px rgba(0, 0, 0, 0.5);
  }
}

.ar-floating-btn:hover {
  transform: scale(1.1) translateY(-3px);
  box-shadow: 0 0 50px rgba(0, 240, 255, 0.9), 0 15px 40px rgba(0, 0, 0, 0.5);
}

.ar-floating-btn i {
  font-size: 1.8rem;
  color: #090b14;
  margin-bottom: 2px;
  animation: rotate3d 4s linear infinite;
}

.ar-floating-btn span {
  font-family: "Orbitron", sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  color: #090b14;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Modale AR */
.ar-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(9, 11, 20, 0.95);
  backdrop-filter: blur(10px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.ar-modal.active {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.ar-modal-content {
  position: relative;
  background: linear-gradient(135deg, #0a0c15 0%, #1b2333 100%);
  border: 2px solid rgba(0, 240, 255, 0.6);
  border-radius: 20px;
  padding: 2rem 2rem;
  max-width: 450px;
  width: 90%;
  box-shadow: 0 0 50px rgba(0, 240, 255, 0.5), 0 20px 60px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(0, 240, 255, 0.2);
  animation: slideUp 0.4s ease;
  text-align: center;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ar-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 35px;
  height: 35px;
  background: rgba(255, 45, 117, 0.1);
  border: 1px solid rgba(255, 45, 117, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.2rem;
  color: #ff2d75;
}

.ar-modal-close:hover {
  background: rgba(255, 45, 117, 0.2);
  border-color: rgba(255, 45, 117, 0.8);
  transform: rotate(90deg);
  box-shadow: 0 0 20px rgba(255, 45, 117, 0.5);
}

.ar-modal-header {
  margin-bottom: 1.5rem;
}

.ar-modal-title {
  font-family: "Orbitron", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #00f0ff;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 25px rgba(0, 240, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.ar-modal-title i {
  font-size: 1.8rem;
  animation: rotate3d 4s linear infinite;
}

.ar-modal-subtitle {
  font-family: "Roboto", sans-serif;
  font-size: 0.95rem;
  color: #b8c5d6;
  line-height: 1.5;
  margin: 0;
}

.ar-modal-qr-container {
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid rgba(0, 240, 255, 0.7);
  border-radius: 15px;
  padding: 0.5rem;
  margin: 1.5rem 0;
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.5),
    inset 0 0 20px rgba(0, 240, 255, 0.08);
  min-height: 200px;
  max-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Styles pour l'image QR code dans la modale */
.ar-modal-qr-container a {
  display: block;
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease;
}

.ar-modal-qr-container a:hover {
  transform: scale(1.02);
}

.ar-modal-qr-container img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 10px;
}

.ar-modal-instructions {
  font-family: "Roboto", sans-serif;
  font-size: 0.9rem;
  color: #8a9bb0;
  line-height: 1.6;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 240, 255, 0.3);
}

.ar-modal-instructions strong {
  color: #00f0ff;
  font-weight: 600;
}

/* Mobile detection badge */
.mobile-badge {
  display: inline-block;
  background: linear-gradient(
    135deg,
    rgba(0, 240, 255, 0.2) 0%,
    rgba(0, 153, 255, 0.2) 100%
  );
  border: 1px solid rgba(0, 240, 255, 0.4);
  border-radius: 20px;
  padding: 0.5rem 1rem;
  font-family: "Roboto", sans-serif;
  font-size: 0.85rem;
  color: #00f0ff;
  margin-top: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .ar-banner {
    margin: 3rem 1rem 3rem 1rem;
    padding: 2rem 1.5rem;
  }

  .ar-banner-content {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }

  .ar-banner-text {
    min-width: 100%;
  }

  .ar-banner-title {
    font-size: 1.5rem;
    justify-content: center;
  }

  .ar-banner-title i {
    font-size: 1.75rem;
  }

  .ar-banner-subtitle {
    font-size: 0.95rem;
  }

  .ar-banner-qr {
    margin: 0 auto;
    min-width: 200px;
    min-height: 200px;
    max-width: 200px;
    max-height: 200px;
  }

  .ar-floating-btn {
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
  }

  .ar-floating-btn i {
    font-size: 1.5rem;
  }

  .ar-floating-btn span {
    font-size: 0.6rem;
  }

  .ar-modal-content {
    padding: 1.5rem 1.5rem;
    width: 95%;
    max-width: 380px;
  }

  .ar-modal-title {
    font-size: 1.3rem;
  }

  .ar-modal-title i {
    font-size: 1.5rem;
  }

  .ar-modal-subtitle {
    font-size: 0.9rem;
  }

  .ar-modal-qr-container {
    padding: 1.5rem;
    min-height: 180px;
  }

  .ar-modal-instructions {
    font-size: 0.85rem;
  }
}

/* Responsive popup AR */
@media (max-width: 768px) {
  .embed8-pop-over,
  [class*="embed8-pop"] {
    width: 95vw !important;
    padding: 20px !important;
  }

  .embed8-pop-over > div,
  [class*="embed8-pop"] > div {
    flex-direction: column !important;
    gap: 20px !important;
  }

  .embed8-pop-over canvas,
  [class*="embed8-pop"] canvas {
    width: 160px !important;
    height: 160px !important;
  }
}

/* Hide on very small screens */
@media (max-width: 480px) {
  .ar-banner-qr {
    width: 100%;
    max-width: 250px;
  }

  .ar-banner-qr canvas,
  .ar-banner-qr img {
    width: 140px !important;
    height: 140px !important;
  }

  .ar-modal-qr-container canvas,
  .ar-modal-qr-container img {
    width: 140px !important;
    height: 140px !important;
  }

  .ar-modal-content {
    max-width: 320px;
  }
}
