@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");

/* =========================
   VARIABLES DÉCATHLON
========================= */
:root {
  --decathlon-blue: #445be8;
  --decathlon-blue-light: #4f90f0;
  --decathlon-orange: #f86f0b;
  --decathlon-yellow: #ece200;
  --decathlon-purple: #402dfc;
  --decathlon-orange-dark: #d05c09;
  --decathlon-gray-light: #f2f2f2;
  --decathlon-gray-border: #d8d8d8;
  --decathlon-text: #252525;
  --white: #fff;
  --shadow: 0 10px 30px rgba(62, 70, 138, 0.12);
}

/* =========================
   BASE
========================= */
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  margin: 0;
}
body {
  font-family: "Poppins", sans-serif;
  color: var(--decathlon-text);
  background: url("../images/bg.svg") center/cover no-repeat fixed;
}

/* =========================
   CHAT LAYOUT
========================= */
.chat-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100vh;
}

/* =========================
   MESSAGES
========================= */
.messages {
  flex: 1;
  padding: 130px 60px 180px 60px;
  overflow-y: auto;
  scrollbar-color: var(--decathlon-blue) transparent;
  scrollbar-width: thin;
  scroll-behavior: smooth;
}

/* Personnalisation scrollbar pour WebKit */
.messages::-webkit-scrollbar {
  width: 8px;
}

.messages::-webkit-scrollbar-track {
  background: transparent;
}

.messages::-webkit-scrollbar-thumb {
  background: var(--decathlon-blue);
  border-radius: 4px;
}

.messages::-webkit-scrollbar-thumb:hover {
  background: var(--decathlon-purple);
}

.message {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 30px;
}

.message .avatar {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
}

.message .avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.message .bubble {
  background: var(--decathlon-gray-light);
  border: 2px solid var(--decathlon-gray-border);
  border-radius: 20px;
  padding: 24px 32px;
  max-width: 90%;
  line-height: 1.8;
  font-weight: 500;
  font-size: 1.4rem;
  color: var(--decathlon-text);
  box-shadow: var(--shadow);
  word-wrap: break-word;
}

/* Markdown */
.message .bubble img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 6px 0;
}

.message .bubble a {
  color: var(--decathlon-blue);
  text-decoration: underline;
}

/* =========================
   ZONE DE SAISIE
========================= */
.composer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0) 0,
    rgba(255, 255, 255, 0.9) 14%,
    rgba(255, 255, 255, 1) 70%
  );
  padding: 30px 40px;
}

.composer-form {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.composer-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  background: transparent;
  width: 100%;
  margin: 0;
}

.composer-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  background: #fafafa;
  border: 4px solid var(--decathlon-purple);
  border-radius: 100px;
  padding: 20px 30px;
  box-shadow: 0 0 60px rgba(64, 45, 252, 0.2);
  width: 100%;
}

.composer-input-wrap:hover {
  box-shadow: 0 0 80px rgba(64, 45, 252, 0.35);
}

.input-icon img {
  width: 30px;
  height: 30px;
  opacity: 0.8;
}

#chat-form-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 1.6rem;
  font-weight: 500;
  padding: 10px;
  color: var(--decathlon-text);
}

/* =========================
   FEEDBACK
========================= */
.feedback {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 24px;
  background: var(--decathlon-gray-light);
  border: 1px solid var(--decathlon-gray-border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.feedback.hidden {
  display: none;
}

.feedback-text {
  font-size: 1.1rem;
  color: #333;
  margin: 0;
  font-weight: 500;
}

.feedback-buttons {
  display: flex;
  gap: 12px;
}

.feedback-button {
  flex: 1;
  padding: 16px 24px;
  border: none;
  border-radius: 16px;
  font-size: 1.3rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all 0.3s ease;
  color: white;
  min-height: 44px;
}

.feedback-button.primary {
  border: 2px solid var(--decathlon-purple);
  background: linear-gradient(
    90deg,
    var(--decathlon-blue) 22%,
    var(--decathlon-blue-light) 100%
  );
}

.feedback-button.primary:hover {
  box-shadow: inset 100px 100px rgba(255, 255, 255, 0.1);
}

.feedback-button.secondary {
  border: 2px solid var(--decathlon-orange-dark);
  background: linear-gradient(
    90deg,
    var(--decathlon-orange) 3%,
    var(--decathlon-yellow) 100%
  );
}

.feedback-button.secondary:hover {
  box-shadow: inset 100px 100px rgba(255, 255, 255, 0.1);
}

.feedback-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.feedback-button img {
  width: 18px;
  height: 18px;
}

/* =========================
   ANIMATION TYPING
========================= */
.bouncing-dots {
  display: inline-block;
}

.bouncing-dots span {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 0 3px;
  background: #999;
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out both;
}

.bouncing-dots span:nth-child(1) {
  animation-delay: -0.32s;
}
.bouncing-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes bounce {
  0%,
  80%,
  100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

/* =========================
   MESSAGES UTILISATEUR / BOT
========================= */

.message.user {
  justify-content: flex-end;
}

.message.user .bubble {
  background: linear-gradient(
    90deg,
    var(--decathlon-blue-light) 22%,
    var(--decathlon-blue) 100%
  );
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(68, 91, 232, 0.3);
  border-top-right-radius: 4px;
  border-top-left-radius: 20px;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  text-align: right;
}

.message.user .avatar {
  display: none;
}

.message.bot {
  justify-content: flex-start;
}

.message.bot .bot-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.message.bot .bubble {
  background: var(--decathlon-gray-light);
  border: 2px solid var(--decathlon-gray-border);
  color: var(--decathlon-text);
  border-top-left-radius: 4px;
  border-top-right-radius: 20px;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
}

/* Animation apparition */
.message.user .bubble,
.message.bot .bubble {
  animation: fadeIn 0.25s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   BOUTONS ACTION - Design borne tactile
========================= */
.composer-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.btn.icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.3);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.btn.icon img {
  width: 36px;
  height: 36px;
}

.btn.icon:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn.icon:active {
  transform: scale(0.95);
}

/* Micro - Blanc avec bordure */
.chat-mic {
  background: linear-gradient(135deg, #ffffff 0%, #f3f4f6 100%);
  border: 3px solid #e5e7eb;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.chat-mic:hover {
  background: linear-gradient(135deg, #f9fafb 0%, #e5e7eb 100%);
  transform: scale(1.1);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  border-color: #d1d5db;
}

/* Reset - Orange/Jaune */
.chat-reset {
  background: linear-gradient(
    135deg,
    var(--decathlon-orange) 0%,
    var(--decathlon-yellow) 100%
  );
  border: 3px solid var(--decathlon-orange-dark);
  box-shadow: 0 6px 18px rgba(248, 111, 11, 0.45);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-reset img {
  filter: brightness(0) invert(1);
}

.chat-reset:hover {
  box-shadow: 0 10px 28px rgba(248, 111, 11, 0.6);
  transform: scale(1.1);
  border-color: var(--decathlon-orange);
}

/* Envoyer - Bleu/Violet */
.btn.icon.primary {
  background: linear-gradient(
    135deg,
    var(--decathlon-blue) 0%,
    var(--decathlon-purple) 100%
  );
  border: 3px solid var(--decathlon-purple);
  box-shadow: 0 6px 18px rgba(68, 91, 232, 0.45);
}

.btn.icon.primary img {
  filter: brightness(0) invert(1);
}

.btn.icon.primary:hover {
  box-shadow: 0 10px 28px rgba(68, 91, 232, 0.6);
  transform: scale(1.1);
  border-color: var(--decathlon-blue-light);
}

/* Micro actif - État enregistrement */
.chat-mic.recording {
  position: relative;
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  border: 3px solid #B91C1C;
  animation: mic-pulse 1.5s infinite ease-in-out;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
}

.chat-mic.recording img {
  filter: brightness(0) invert(1);
}

@keyframes mic-pulse {
  0%,
  100% {
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.6),
                0 0 0 0 rgba(239, 68, 68, 0.4);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 10px 28px rgba(239, 68, 68, 0.8),
                0 0 0 20px rgba(239, 68, 68, 0);
    transform: scale(1.05);
  }
}

/* Label écoute */
.mic-listening-label {
  position: fixed;
  bottom: 130px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(244, 67, 54, 0.9);
  color: #fff;
  padding: 10px 16px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.95rem;
  animation: fade-in 0.3s ease forwards;
  z-index: 2000;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* Bouton volume */
/* Bouton volume */
.chat-sound {
  position: fixed;
  top: 20px;
  left: 20px;   /* <-- à gauche */
  right: auto;  /* <-- on enlève le "right" */
  background: linear-gradient(
    135deg,
    var(--decathlon-blue) 0%,
    var(--decathlon-purple) 100%
  );
  border: none;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: all 0.25s ease;
  z-index: 900;
}


/* ========================================
   BOUTONS FIXES - Design borne tactile
======================================== */

/* Bouton Home - Haut gauche, discret */
.chat-home-btn {
  position: fixed;
  top: 24px;
  left: 24px;
  width: 85px;
  height: 85px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.25);
  display: grid;
  place-items: center;
  cursor: pointer;
  background: linear-gradient(
    135deg,
    #EF4444 0%,
    #DC2626 100%
  );
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 50;
}

.chat-home-btn img {
  width: 40px;
  height: 40px;
  filter: brightness(0) invert(1);
}

.chat-home-btn i {
  font-size: 40px;
  color: white;
}

.chat-home-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 10px 28px rgba(239, 68, 68, 0.5);
  border-color: rgba(255, 255, 255, 0.4);
}

.chat-home-btn:active {
  transform: scale(0.95);
}

/* Bouton Paramètres Vocaux (Haut droite - 1er) */
.chat-settings-btn {
  position: fixed;
  top: 24px;
  right: 24px;
  width: 75px;
  height: 75px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.2);
  display: grid;
  place-items: center;
  cursor: pointer;
  background: linear-gradient(
    135deg,
    var(--decathlon-blue) 0%,
    var(--decathlon-purple) 100%
  );
  box-shadow: 0 8px 24px rgba(68, 91, 232, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

.chat-settings-btn i {
  font-size: 32px;
  color: white;
}

.chat-settings-btn:hover {
  transform: scale(1.1) rotate(45deg);
  box-shadow: 0 12px 32px rgba(68, 91, 232, 0.5);
  border-color: rgba(255, 255, 255, 0.4);
}

.chat-settings-btn:active {
  transform: scale(0.95) rotate(45deg);
}

/* Bouton Son ON/OFF (Haut droite - 2ème) */
.chat-sound-btn {
  position: fixed;
  top: 24px;
  right: 120px;
  width: 75px;
  height: 75px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.2);
  display: grid;
  place-items: center;
  cursor: pointer;
  background: linear-gradient(
    135deg,
    #10B981 0%,
    #059669 100%
  );
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

.chat-sound-btn i {
  font-size: 32px;
  color: white;
}

.chat-sound-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.5);
  border-color: rgba(255, 255, 255, 0.4);
}

.chat-sound-btn:active {
  transform: scale(0.95);
}

/* État désactivé du son */
.chat-sound-btn.disabled {
  background: linear-gradient(
    135deg,
    #6B7280 0%,
    #4B5563 100%
  );
  box-shadow: 0 8px 24px rgba(107, 114, 128, 0.4);
}

.chat-sound-btn.disabled:hover {
  box-shadow: 0 12px 32px rgba(107, 114, 128, 0.5);
}


.chat-sound img {
  width: 26px;
  height: 26px;
  filter: brightness(0) invert(1);
}

.chat-sound:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

.chat-sound.muted {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

/* ===================================
   CARROUSEL PRODUIT
=================================== */

/* Wrapper : occupe toute la bulle bot */
.carousel-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 10px 0;
  padding: 0 80px;
}

/* IMPORTANT :
   On enlève le fond blanc pour avoir le même fond
   que la bulle bot (gris clair). */
.carousel-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 24px;
  background: transparent;
  box-shadow: none;
  border: none;
}

/* La carte n’a plus de fond propre :
   le fond est celui de la bulle (.message.bot .bubble). */
.carousel-card {
  display: none;
  padding: 20px 0;
  background: transparent;
  border-radius: 24px;
  animation: fadeInSlide 0.4s ease;
}

.carousel-card.active {
  display: block;
}

@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.carousel-intro {
  font-size: 1.3rem;
  line-height: 1.6;
  margin-bottom: 1.4rem;
  color: #333;
}


/* Bloc image + détails */
.carousel-card-main {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

/* Media + mini vignettes */
.product-media {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.product-image {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 16px;
  flex-shrink: 0;
  background: #ffffff;
  border: 3px solid var(--decathlon-gray-border);
  transition: transform 0.3s ease;
}

.product-image:hover {
  transform: scale(1.03);
}

.product-thumbs {
  display: flex;
  gap: 10px;
}

.product-thumb {
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 3px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.product-thumb img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.product-thumb.active {
  border-color: var(--decathlon-blue);
}

/* Détails produit */
.product-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-name {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  color: var(--decathlon-text);
  line-height: 1.3;
}

.product-brand {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--decathlon-text);
  background: #d9d9d9;
  padding: 10px 18px;
  border-radius: 18px;
  text-align: center;
  text-transform: uppercase;
  margin: 0;
  width: fit-content;
}

.product-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--decathlon-text);
  margin: 4px 0;
}

.product-category {
  font-size: 1.1rem;
  color: #6b6b6c;
  font-weight: 400;
}

.product-reference {
  font-size: 1rem;
  color: #5b5b5c;
}

/* Caractéristiques */
.product-features {
  list-style: none;
  padding: 0;
  margin: 14px 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-features-item {
  font-size: 1.1rem;
  color: var(--decathlon-text);
  line-height: 1.6;
  padding-left: 24px;
  position: relative;
}

.product-features-item:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--decathlon-blue);
  font-weight: bold;
  font-size: 18px;
}

/* Flèches carrousel */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.95);
  color: var(--decathlon-text);
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.carousel-arrow:hover {
  background: var(--decathlon-blue);
  color: white;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 8px 20px rgba(68, 91, 232, 0.4);
}

.carousel-arrow:disabled {
  background: rgba(200, 200, 200, 0.5);
  cursor: not-allowed;
  opacity: 0.4;
}

.carousel-arrow.left {
  left: 0;
}

.carousel-arrow.right {
  right: 0;
}

/* Bouton Localiser le produit */
.btn-location {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 28px;
  font-size: 1.1rem;
  font-weight: 600;
  min-width: 260px;
  height: 56px;
  background-color: #8c8c8c;
  color: white;
  border: none;
  border-radius: 14px;
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 18px;
}

.btn-location:hover {
  background-color: #6e6e6e;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.btn-location-icon {
  font-size: 1.2rem;
}

/* =========================
   POPUP GÉNÉRALE
========================= */
.reset-popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}

.reset-content {
  background: #fff;
  border-radius: 36px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  padding: 50px 60px;
  width: 90%;
  max-width: 600px;
  text-align: center;
  animation: fadeInUp 0.35s ease;
}

.reset-content h3 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--decathlon-text);
  margin: 0 0 20px;
}

.reset-content p {
  font-size: 1.3rem;
  color: #555;
  margin-bottom: 30px;
  line-height: 1.5;
}

.reset-content .button {
  font-size: 1.2rem;
  padding: 16px 32px;
  border-radius: 16px;
  font-weight: 600;
  min-width: 160px;
}

.reset-content .popup-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* Boutons généraux */
.button {
  border: none;
  background-color: transparent;
  font-size: calc(15px + 0.390625vw);
  font-weight: 500;
  font-family: inherit;
  color: white;
  padding: 15px 30px;
  border-radius: 16px;
  transition: 0.2s;
  text-align: center;
  cursor: pointer;
}

.button-primary {
  border: 4px solid var(--decathlon-orange-dark);
  background: linear-gradient(
    90deg,
    var(--decathlon-orange) 3%,
    var(--decathlon-yellow) 100%
  );
}

.button-primary:hover {
  box-shadow: inset 100px 100px rgba(255, 255, 255, 0.1),
    0 5px 5px rgba(0, 0, 0, 0.2);
}

.button-secondary {
  border: 4px solid var(--decathlon-purple);
  background: linear-gradient(
    90deg,
    var(--decathlon-blue) 22%,
    var(--decathlon-blue-light) 100%
  );
}

.button-secondary:hover {
  box-shadow: inset 100px 100px rgba(255, 255, 255, 0.1),
    0 5px 5px rgba(0, 0, 0, 0.2);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1024px) {
  .carousel-wrapper {
    padding: 0 60px;
  }

  .carousel-card-main {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .product-media {
    align-items: center;
  }

  .product-image {
    width: 260px;
    height: 260px;
  }

  .product-brand {
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .carousel-wrapper {
    padding: 0 50px;
  }

  .product-name {
    font-size: 1.8rem;
  }

  .product-price {
    font-size: 1.5rem;
  }

  .carousel-arrow {
    width: 52px;
    height: 52px;
    font-size: 34px;
  }

  .btn-location {
    width: 100%;
  }
}



/* Bouton "Localiser le produit" en bas à gauche */
.btn-location {
  margin-top: auto;            /* pousse le bouton en bas de .product-details */
  align-self: flex-start;      /* collé au bord gauche */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 28px;
  font-size: 1.1rem;
  font-weight: 600;
  min-width: 260px;
  height: 56px;
  background-color: #8c8c8c;
  color: #fff;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-location:hover {
  background-color: #6e6e6e;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.btn-location-icon {
  width: 18px;
  height: 18px;
}
/* =========================
   MODALE "LOCALISER LE PRODUIT"
   (plein écran, centrée)
========================= */

/* Overlay plein écran */
#svgModal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;              /* toujours flex */
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);

  /* masqué par défaut */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

/* visible quand .show est présent */
#svgModal.show {
  opacity: 1;
  pointer-events: auto;
}

/* Contenu de la modale (la carte) */
.map-modal-content {
  position: relative;
  background: #ffffff;
  border-radius: 28px;
  padding: 32px 40px;
  width: min(1200px, 90vw);   /* grande mais avec marges */
  max-height: 85vh;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Titre "Localiser le produit" */
.map-modal-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 10px 0;
  color: var(--decathlon-text);
}

/* Carte SVG */
.map-svg {
  width: 100%;
  max-height: 70vh;
  border-radius: 20px;
  border: 2px solid var(--decathlon-gray-border);
  background: #f9f9f9;
}

/* Bouton de fermeture (croix) */
.map-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #ffffff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  color: #555;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.map-modal-close:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Responsive */
@media (max-width: 768px) {
  .map-modal-content {
    padding: 22px 20px;
    width: 94vw;
  }

  .map-svg {
    max-height: 60vh;
  }
}


/* --- Écran de consentement / sélection (TOS) --- */

.tos-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.tos-container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.tos-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  text-align: center;
}

.tos-list {
  list-style: disc;
  max-width: 900px;
  margin: 0 auto;
  padding-left: 1.5rem;
  text-align: left;
  font-size: calc(18px + 0.15vw);
  line-height: 1.7;
  font-weight: 500;
}

.tos-list li + li {
  margin-top: 12px;
}

.tos-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 60px;
  justify-content: center;
  align-items: center;
}

.tos-buttons .button {
  font-size: calc(18px + 0.2vw);
  padding: 22px 42px;
  border-radius: 24px;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
}

.tos-btn-orange,
.tos-btn-blue {
  min-width: 260px;
}

/* Orange : deux lignes centrées */
.tos-btn-orange {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  line-height: 1.3;
}

/* Logo + nom en bas */
.tos-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
  opacity: 0.95;
}

.tos-logo-footer {
  width: 70px;
  height: auto;
}

.tos-brand-name {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.04em;
}


/* Boutons de la page TOS */
.tos-buttons a,
.tos-buttons a:link,
.tos-buttons a:visited {
  text-decoration: none;      /* retire le soulignement */
}

/* Si tu veux être encore plus sûr qu’aucune règle globale ne le remette */
.tos-buttons a:hover,
.tos-buttons a:focus {
  text-decoration: none;
}
/* Ligne prix + prévention */
.product-price {
  margin: 4px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

/* Montant principal */
.product-price-main {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--decathlon-text);
}

/* Texte de prévention beaucoup plus discret */
.product-price-note {
  font-size: 0.95rem;
  font-weight: 500;
  font-style: italic;
  color: #777;
  opacity: 0.9;
}

/* =========================
   ANIMATIONS & UX AMÉLIORÉE
========================= */

/* Animation d'apparition pour les bulles */
.message {
  animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Curseur clignotant pendant le typing effect */
.bubble.typing::after {
  content: '|';
  animation: blink 1s infinite;
  margin-left: 2px;
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* Effet de hover sur les boutons */
.btn:hover {
  transform: scale(1.05);
  transition: transform 0.2s ease;
}

.btn:active {
  transform: scale(0.95);
}

/* Animation pour le panneau des paramètres vocaux */
#voiceSettingsPanel {
  animation: slideInFadeIn 0.3s ease-out;
}

@keyframes slideInFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -45%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* Overlay animé */
#voiceSettingsOverlay {
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Amélioration des sliders */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  background: #e2e8f0;
  border-radius: 5px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--decathlon-blue);
  cursor: pointer;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
  transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: var(--decathlon-purple);
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--decathlon-blue);
  cursor: pointer;
  border-radius: 50%;
  border: none;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
  transition: all 0.2s ease;
}

input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.2);
  background: var(--decathlon-purple);
}

/* Boutons désactivés pendant le typing */
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Transition fluide pour le clavier */
.keyboard {
  transition: all 0.3s ease-in-out;
}

.keyboard.active {
  animation: slideUpKeyboard 0.3s ease-out;
}

@keyframes slideUpKeyboard {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Amélioration visuelle des messages utilisateur */
.message.user .bubble {
  background: linear-gradient(135deg, var(--decathlon-blue-light) 0%, var(--decathlon-blue) 100%);
  color: white;
  border: none;
}

/* Amélioration visuelle des messages bot */
.message.bot .bubble {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Responsive improvements */
@media (max-width: 768px) {
  .messages {
    padding: 20px 15px;
    padding-bottom: 180px;
  }

  .message .bubble {
    font-size: 1.2rem;
    padding: 16px 20px;
  }

  #voiceSettingsPanel {
    width: 95%;
    padding: 20px;
  }

  /* Boutons d'action responsive */
  .btn.icon {
    width: 70px;
    height: 70px;
  }

  .btn.icon img {
    width: 32px;
    height: 32px;
  }

  .composer-actions {
    gap: 14px;
  }
}

/* =========================
   INTERFACE VOCALE SIMPLIFIÉE
========================= */

.voice-settings-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: white;
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
  z-index: 101;
  width: 90%;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.voice-settings-panel.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
  max-width: 550px;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -40%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.voice-settings-panel.show {
  display: block;
}

.voice-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 2px solid #E5E7EB;
}

.voice-settings-header h2 {
  margin: 0;
  font-size: 26px;
  color: #1F2937;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
}

.close-settings-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #F3F4F6;
  color: #6B7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.2s;
}

.close-settings-btn:hover {
  background: #E5E7EB;
  color: #1F2937;
}

/* Présets de vitesse */
.voice-presets {
  margin-bottom: 28px;
}

.voice-presets h3 {
  margin: 0 0 16px 0;
  font-size: 18px;
  color: #374151;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.preset-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.preset-btn {
  padding: 20px 12px;
  border: 3px solid #E5E7EB;
  border-radius: 16px;
  background: white;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  font-family: 'Poppins', sans-serif;
}

.preset-btn i {
  font-size: 32px;
  color: #6B7280;
}

.preset-btn span {
  font-size: 15px;
  font-weight: 700;
  color: #374151;
}

.preset-btn small {
  font-size: 12px;
  color: #9CA3AF;
}

.preset-btn:hover {
  border-color: #3B82F6;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.preset-btn.active {
  border-color: #3B82F6;
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
}

.preset-btn.active i {
  color: #3B82F6;
}

/* Volume */
.volume-control {
  margin-bottom: 28px;
}

.volume-control h3 {
  margin: 0 0 16px 0;
  font-size: 18px;
  color: #374151;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.volume-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.volume-btn {
  padding: 18px 12px;
  border: 3px solid #E5E7EB;
  border-radius: 16px;
  background: white;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  font-family: 'Poppins', sans-serif;
}

.volume-btn i {
  font-size: 28px;
  color: #6B7280;
}

.volume-btn span {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.volume-btn:hover {
  border-color: #10B981;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.volume-btn.active {
  border-color: #10B981;
  background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
}

.volume-btn.active i {
  color: #10B981;
}

/* Bouton de test */
.test-voice-btn {
  width: 100%;
  padding: 18px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  color: white;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.test-voice-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.test-voice-btn:active {
  transform: translateY(0);
}

.test-voice-btn i {
  font-size: 24px;
}

/* Overlay */
.voice-settings-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 100;
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.voice-settings-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Responsive pour borne tactile */
@media (max-width: 768px) {
  .chat-home-btn {
    width: 85px;
    height: 85px;
    top: 16px;
    left: 16px;
  }

  .chat-home-btn i {
    font-size: 42px;
  }

  .chat-settings-btn,
  .chat-sound-btn {
    width: 65px;
    height: 65px;
    top: 16px;
  }

  .chat-sound-btn {
    right: 100px;
  }

  .chat-settings-btn {
    right: 16px;
  }

  .chat-sound-btn i,
  .chat-settings-btn i {
    font-size: 28px;
  }

  .voice-settings-panel {
    padding: 24px;
  }

  .voice-settings-header h2 {
    font-size: 22px;
  }

  .preset-buttons,
  .volume-buttons {
    gap: 10px;
  }
}

/* Amélioration du label de reconnaissance vocale */
.mic-listening-label {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  color: white;
  padding: 30px 50px;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(59, 130, 246, 0.5);
  z-index: 10000;
  font-size: 24px;
  font-weight: 600;
  animation: micPulse 1.5s ease-in-out infinite;
  min-width: 400px;
  text-align: center;
}

.mic-label-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.mic-label-content i {
  font-size: 48px;
  animation: micBounce 1s ease-in-out infinite;
}

.mic-label-text {
  font-size: 20px;
  line-height: 1.4;
  max-width: 350px;
  word-wrap: break-word;
}

.mic-listening-label.success {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  box-shadow: 0 20px 60px rgba(16, 185, 129, 0.5);
  animation: successPulse 0.5s ease-out;
}

@keyframes micPulse {
  0%, 100% {
    box-shadow: 0 20px 60px rgba(59, 130, 246, 0.5);
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    box-shadow: 0 25px 80px rgba(59, 130, 246, 0.7);
    transform: translate(-50%, -50%) scale(1.02);
  }
}

@keyframes micBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes successPulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Feedback d'erreur micro */
.mic-error-feedback {
  position: fixed;
  top: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  color: white;
  padding: 20px 40px;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(239, 68, 68, 0.4);
  z-index: 10001;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transition: all 0.3s ease-out;
}

.mic-error-feedback.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.mic-error-feedback i {
  font-size: 24px;
}

/* Responsive pour borne tactile */
@media (max-width: 768px) {
  .mic-listening-label {
    min-width: 90%;
    max-width: 90%;
    padding: 24px 30px;
    font-size: 20px;
  }

  .mic-label-content i {
    font-size: 40px;
  }

  .mic-label-text {
    font-size: 18px;
  }

  .mic-error-feedback {
    width: 90%;
    max-width: 90%;
    font-size: 16px;
    padding: 16px 24px;
  }
}
