/* ==============================================
   Carte Publicitaire - Styles CSS
   Xtranumerik - Affichage Dynamique
   ============================================== */

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  color: #ffffff;
  background-color: #190544;
  line-height: 1.6;
}

/* Hero Section */
.hero-section {
  background: #190544;
  padding: 8rem 1.5rem 4rem;
  color: #ffffff;
  text-align: center;
  position: relative;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 30% 70%, rgba(255,169,26,0.1), transparent);
}

.hero-section .container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-section h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #ffffff 0%, #ffa91a 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-section p {
  font-size: 1.4rem;
  margin-bottom: 2.5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.95;
}

/* Statistics Section */
.stats-section {
  padding: 4rem 1.5rem;
  background: #190544;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto 4rem;
}

.stat-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(255, 169, 26, 0.2);
  padding: 2.5rem 2rem;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  backdrop-filter: blur(20px);
  transition: transform 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(135deg, #ffa91a 0%, #190544 100%);
}

.stat-card:hover {
  transform: translateY(-5px);
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: #ffa91a;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

/* Section & Container */
.section {
  width: 100%;
  padding: 60px 20px;
}

.content-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Map Styles */
.map-container {
  height: 550px;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  position: relative;
  z-index: 1;
}

#map-fr {
  height: 100%;
  width: 100%;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
}

.leaflet-popup-content-wrapper {
  background-color: #190544 !important;
  color: #fff !important;
  border-radius: 6px !important;
}

.leaflet-popup-tip {
  background-color: #190544 !important;
}

.ad-popup {
  text-align: center;
  padding: 12px;
  max-width: 250px;
}

.ad-popup h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: #ffa91a;
}

.ad-popup img {
  max-width: 100%;
  max-height: 120px;
  margin-bottom: 10px;
  border-radius: 4px;
}

.ad-popup button {
  background-color: #ffa91a;
  color: #190544;
  padding: 8px 12px;
  font-size: 0.9rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin: 5px;
  font-weight: 600;
}

.ad-popup button:hover {
  background-color: #fff;
  color: #190544;
}

.map-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.map-control-btn {
  background: rgba(255, 169, 26, 0.15);
  color: #ffa91a;
  border: 1px solid rgba(255, 169, 26, 0.3);
  border-radius: 5px;
  padding: 0.5rem;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.map-control-btn:hover {
  background: rgba(255, 169, 26, 0.25);
  border-color: rgba(255, 169, 26, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 169, 26, 0.3);
}

.map-wrapper {
  position: relative;
}

.xtranumerik-watermark {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(25, 5, 68, 0.8);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  font-size: 0.7rem;
  z-index: 1000;
}

/* Floating Add to Cart Button */
.floating-add-to-cart {
  position: absolute;
  bottom: -60px;
  right: 0;
  z-index: 1500;
  background: linear-gradient(135deg, #ffa91a 0%, #ff8c00 100%);
  color: #190544;
  border: none;
  border-radius: 50px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(255, 169, 26, 0.4);
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  display: flex;
  align-items: center;
  gap: 8px;
}

.floating-add-to-cart.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.floating-add-to-cart:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(255, 169, 26, 0.6);
  background: linear-gradient(135deg, #190544 0%, #2a0845 100%);
  color: #ffffff;
}

.floating-add-to-cart:active {
  transform: translateY(-1px);
}

.floating-add-to-cart .cart-icon {
  font-size: 1.1rem;
}

/* Location List */
.location-list {
  max-height: 700px;
  overflow-y: auto;
  padding-right: 1rem;
}

.location-item {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(255, 169, 26, 0.3);
  border-radius: 8px;
  padding: 1.2rem;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(20px);
}

.location-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(255, 169, 26, 0.3);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.08) 100%);
  border-color: rgba(255, 169, 26, 0.5);
}

.location-item.selected {
  border-color: #ffa91a;
  background: rgba(255, 169, 26, 0.1);
  box-shadow: 0 3px 10px rgba(255, 169, 26, 0.2);
}

.location-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 0.8rem;
}

.location-title {
  margin-bottom: 0.3rem;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
}

.visitors-count {
  color: #ffa91a;
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.location-description {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.8rem;
  line-height: 1.4;
}

.location-facing {
  font-size: 0.85rem;
  color: #ffa91a;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.location-stats {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.stat-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.traffic-badge {
  background: #ffc107;
  color: white;
}

.status-badge {
  background: #28a745;
  color: white;
}

/* Floating Cart */
.floating-cart {
  position: fixed;
  bottom: 100px;
  left: 50px;
  width: 60px;
  height: 60px;
  background: #ffa91a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
  z-index: 999;
}

.floating-cart:hover {
  transform: scale(1.1);
  background: #190544;
}

.cart-icon {
  color: white;
  font-size: 24px;
}

.cart-notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff4444;
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  animation: pulse 2s infinite;
  display: none;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Cart Dropdown */
.cart-dropdown {
  position: absolute;
  bottom: 70px;
  left: 0;
  width: 380px;
  background: rgba(25, 5, 68, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 169, 26, 0.3);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.floating-cart:hover .cart-dropdown,
.floating-cart.active .cart-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cart-header {
  padding: 15px 20px;
  background: linear-gradient(135deg, #ffa91a, #190544);
  color: white;
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-body {
  max-height: 400px;
  overflow-y: auto;
  padding: 10px;
}

.cart-item {
  display: flex;
  align-items: center;
  padding: 12px;
  margin: 5px 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 169, 26, 0.2);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.cart-item:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 169, 26, 0.4);
  transform: translateX(5px);
}

.cart-item-image {
  width: 50px;
  height: 50px;
  border-radius: 4px;
  margin-right: 12px;
  object-fit: cover;
  background: #ddd;
}

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 4px;
}

.cart-item-details {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.cart-item-remove {
  width: 30px;
  height: 30px;
  border: none;
  background: #ff4444;
  color: white;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 18px;
  font-weight: bold;
}

.cart-item-remove:hover {
  background: #cc0000;
  transform: rotate(90deg);
}

.cart-footer {
  padding: 15px;
  border-top: 1px solid rgba(255, 169, 26, 0.2);
  display: flex;
  gap: 10px;
}

.btn-reset, .btn-order {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-reset {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.btn-reset:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-order {
  background: #ffa91a;
  color: #190544;
}

.btn-order:hover {
  background: #190544;
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-order:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

.empty-cart-message {
  text-align: center;
  padding: 40px 20px;
  color: rgba(255, 255, 255, 0.6);
}

.empty-cart-message svg {
  font-size: 48px;
  opacity: 0.3;
}

/* Order Modal */
.order-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.order-modal.show {
  opacity: 1;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
}

.modal-content {
  background: #190544;
  border: 1px solid rgba(255, 169, 26, 0.3);
  border-radius: 12px;
  padding: 30px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.order-modal.show .modal-content {
  transform: scale(1);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: #ffffff;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(255, 169, 26, 0.3);
  border-radius: 6px;
  font-size: 14px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.modal-summary {
  background: rgba(255, 169, 26, 0.1);
  border: 1px solid rgba(255, 169, 26, 0.3);
  padding: 15px;
  border-radius: 8px;
  margin: 20px 0;
}

.modal-summary h3 {
  margin: 0 0 10px 0;
  color: #190544;
}

.modal-summary ul {
  margin: 0;
  padding-left: 20px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.modal-actions button {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-actions button[type="button"] {
  background: #e9ecef;
  color: #495057;
}

.modal-actions button[type="submit"] {
  background: #ffa91a;
  color: #190544;
}

.modal-actions button:hover {
  transform: translateY(-2px);
}

/* Animations */
@keyframes bounce {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.2); }
  50% { transform: scale(0.9); }
  75% { transform: scale(1.1); }
}

.floating-cart.bounce {
  animation: bounce 0.6s ease;
}

/* Notification Toast */
.cart-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #28a745;
  color: white;
  padding: 15px 25px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transform: translateX(400px);
  transition: transform 0.3s ease;
  z-index: 9999;
}

.cart-notification.show {
  transform: translateX(0);
}

.cart-notification.error {
  background: #dc3545;
}

/* Process Steps */
.process-steps {
  display: flex !important;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 4rem;
  flex-wrap: nowrap;
}

.step-card {
  flex: 1;
  text-align: center;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(255, 169, 26, 0.2);
  backdrop-filter: blur(20px);
  border-radius: 8px;
  min-width: 0;
}

.step-number {
  background: linear-gradient(135deg, #ffa91a, #190544);
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0 auto 1rem;
}

.step-title {
  font-size: 1.2rem;
  color: #ffa91a;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.step-description {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
}

/* CTA Section */
.cta-section {
  padding: 5rem 1.5rem;
  background: #190544;
  color: #ffffff;
  text-align: center;
}

.cta-section h2 {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.cta-section p {
  font-size: 1.3rem;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-button-light {
  background: linear-gradient(135deg, #ffa91a 0%, #ff8c00 100%);
  color: #0a0520;
  padding: 1.2rem 2.5rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(255, 169, 26, 0.4);
}

.cta-button-light:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(255, 169, 26, 0.5);
}

/* PDF Viewer Styles */
.pdf-viewer-section {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
  backdrop-filter: blur(20px);
  border-radius: 12px;
  padding: 2rem;
  margin: 4rem auto;
  max-width: 1200px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 169, 26, 0.2);
}

.pdf-viewer-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(255, 169, 26, 0.2);
}

.pdf-viewer-header h3 {
  color: #ffa91a;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.pdf-viewer-header p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  margin: 0;
}

.pdf-canvas-container {
  position: relative;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  text-align: center;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 169, 26, 0.2);
}

.pdf-canvas {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.pdf-canvas:hover {
  transform: scale(1.02);
}

.pdf-loading {
  color: #ffa91a;
  font-size: 1rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pdf-loading::before {
  content: "📄";
  animation: pulse 1.5s infinite;
}

.pdf-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.pdf-nav-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pdf-zoom-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pdf-btn {
  background: linear-gradient(135deg, #ffa91a 0%, #ff8c00 100%);
  color: #190544;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.pdf-btn:hover {
  background: linear-gradient(135deg, #190544 0%, #2a0845 100%);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 169, 26, 0.3);
}

.pdf-btn:disabled {
  background: #e9ecef;
  color: #999;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.pdf-page-info {
  color: #190544;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 169, 26, 0.1);
  border-radius: 6px;
  border: 1px solid rgba(255, 169, 26, 0.3);
}

.pdf-download-section {
  text-align: center;
  padding-top: 1rem;
  border-top: 2px solid rgba(255, 169, 26, 0.2);
}

.pdf-download-btn {
  background: linear-gradient(135deg, #190544 0%, #2a0845 100%);
  color: #ffffff;
  text-decoration: none;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(25, 5, 68, 0.3);
}

.pdf-download-btn:hover {
  background: linear-gradient(135deg, #ffa91a 0%, #ff8c00 100%);
  color: #190544;
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(255, 169, 26, 0.4);
  text-decoration: none;
}

.pdf-error {
  color: #dc3545;
  background: rgba(220, 53, 69, 0.1);
  padding: 1rem;
  border-radius: 6px;
  border: 1px solid rgba(220, 53, 69, 0.3);
  text-align: center;
  font-weight: 500;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .section {
    padding: 40px 20px;
  }
  
  .map-layout {
    grid-template-columns: 1fr !important;
  }
  
  #map-fr {
    height: 400px;
  }
  
  .location-list {
    max-height: 400px;
  }
  
  .process-steps {
    flex-direction: column;
  }
  
  .step-card {
    width: 100%;
  }
  
  .floating-cart {
    bottom: 80px;
    left: 20px;
  }
  
  .cart-dropdown {
    width: calc(100vw - 40px);
    max-width: 380px;
  }
  
  .floating-add-to-cart {
    bottom: -50px;
    right: 0;
    padding: 10px 20px;
    font-size: 0.9rem;
  }
  
  .hero-section h1 {
    font-size: 2.5rem;
  }
  
  .hero-section p {
    font-size: 1.2rem;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  /* PDF Viewer Mobile */
  .pdf-viewer-section {
    padding: 1.5rem;
    margin: 2rem 1rem;
  }
  
  .pdf-controls {
    flex-direction: column;
    gap: 1rem;
  }
  
  .pdf-nav-controls,
  .pdf-zoom-controls {
    width: 100%;
    justify-content: center;
  }
  
  .pdf-canvas-container {
    min-height: 250px;
    padding: 0.5rem;
  }
  
  .pdf-viewer-header h3 {
    font-size: 1.2rem;
  }
  
  .pdf-download-btn {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 992px) and (min-width: 769px) {
  .step-card {
    padding: 1.5rem;
  }
  
  .step-description {
    font-size: 0.85rem;
  }
}
