/* SANA GROUPE - Custom Styles */

:root {
  --navy: #0A1929;
  --gold: #D4AF37;
  --light-gold: #F4E5B8;
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Hero Section Background Image - FORCE VISIBILITY MAXIMALE */
#accueil {
  position: relative !important;
}

/* Container de l'image - doit être visible */
#accueil > .absolute.inset-0.z-0 {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  z-index: 0 !important;
}

#accueil img {
  filter: brightness(1.2) contrast(1.2) saturate(1.1) !important;
  object-fit: cover !important;
  object-position: center center !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  max-width: none !important;
}

/* Gradient en bas uniquement - ne doit pas cacher l'image */
#accueil .absolute.inset-x-0.bottom-0 {
  pointer-events: none !important;
}

/* Text shadow TRÈS FORT pour lisibilité sur image claire */
#accueil h2 {
  text-shadow: 
    0 8px 30px rgba(0, 0, 0, 1),
    0 4px 20px rgba(0, 0, 0, 0.95),
    0 2px 10px rgba(0, 0, 0, 0.9),
    0 0 50px rgba(10, 25, 41, 0.95) !important;
  font-weight: 900 !important;
}

/* Gold text with VERY strong shadow */
#accueil .text-gold {
  text-shadow: 
    0 8px 30px rgba(0, 0, 0, 1),
    0 4px 20px rgba(0, 0, 0, 0.95),
    0 2px 10px rgba(0, 0, 0, 0.9) !important;
  font-weight: 900 !important;
  color: #D4AF37 !important;
}

/* Description text with strong shadow */
#accueil p {
  text-shadow: 
    0 6px 20px rgba(0, 0, 0, 1),
    0 3px 12px rgba(0, 0, 0, 0.95),
    0 0 40px rgba(10, 25, 41, 0.95) !important;
  font-weight: 800 !important;
}

/* Geometric Pattern Background */
.geometric-pattern {
  background-image: 
    repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(212, 175, 55, 0.05) 35px, rgba(212, 175, 55, 0.05) 70px),
    repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(212, 175, 55, 0.05) 35px, rgba(212, 175, 55, 0.05) 70px);
  width: 100%;
  height: 100%;
}

/* Custom Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Navigation Styling */
nav {
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

nav.scrolled {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Mobile Menu */
#mobile-menu {
  transition: max-height 0.3s ease-out;
}

#mobile-menu.active {
  display: block;
}

/* Step Headers */
.step-header {
  opacity: 0.5;
  transition: all 0.3s ease;
}

.step-header.active {
  opacity: 1;
}

.step-header.active .w-10 {
  background-color: var(--gold);
  color: var(--navy);
}

/* Step Content */
.step-content {
  animation: fadeInUp 0.5s ease;
}

/* Project Type Selection */
.project-type-btn {
  transition: all 0.3s ease;
  cursor: pointer;
}

.project-type-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.project-type-btn.selected {
  border-color: var(--gold);
  background-color: rgba(212, 175, 55, 0.1);
}

/* Form Inputs */
input, select, textarea {
  transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
  transform: scale(1.02);
}

/* Buttons */
button, a.button {
  transition: all 0.3s ease;
  cursor: pointer;
}

button:active, a.button:active {
  transform: scale(0.98);
}

/* Cards Hover Effects */
.hover\:shadow-2xl:hover {
  transform: translateY(-5px);
}

/* Scroll Top Button */
#scroll-top {
  transition: all 0.3s ease;
  display: none;
}

#scroll-top.show {
  display: flex;
}

/* Loading Spinner */
.spinner {
  border: 3px solid rgba(212, 175, 55, 0.3);
  border-top-color: var(--gold);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Success/Error Messages */
.message-success {
  background-color: #10b981;
  color: white;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-top: 1rem;
  animation: fadeInUp 0.5s ease;
}

.message-error {
  background-color: #ef4444;
  color: white;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-top: 1rem;
  animation: fadeInUp 0.5s ease;
}

.message-info {
  background-color: #3b82f6;
  color: white;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-top: 1rem;
  animation: fadeInUp 0.5s ease;
}

/* Certificate Verification Result */
.certificate-valid {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
  animation: fadeInUp 0.5s ease;
}

.certificate-invalid {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.3);
  animation: fadeInUp 0.5s ease;
}

/* Quote Result Styling */
.quote-result-card {
  background: linear-gradient(135deg, var(--navy), #1e3a5f);
  color: white;
  padding: 1.5rem;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.quote-total {
  background: linear-gradient(135deg, var(--gold), #c4992b);
  color: var(--navy);
  padding: 2rem;
  border-radius: 0.75rem;
  text-align: center;
  font-size: 1.5rem;
  font-weight: bold;
  box-shadow: 0 10px 20px rgba(212, 175, 55, 0.3);
  animation: pulse 2s infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
  .step-header span {
    display: none;
  }
  
  .step-header .w-10 {
    margin-right: 0;
  }
}

/* Print Styles */
@media print {
  nav, footer, #scroll-top, .floating-whatsapp {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus Styles */
*:focus {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

button:focus, a:focus {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #c4992b;
}

/* Academy Select Fix */
.academy-select option {
  background-color: white;
  color: #000;
  padding: 10px;
}

.academy-select option:first-child {
  color: #666;
}

/* ============================================ */
/* BOUTIQUE & SHOPPING STYLES */
/* ============================================ */

/* Product Cards */
.product-card {
  cursor: pointer;
  transition: all 0.3s ease;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Filter Buttons */
.filter-btn {
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn.active {
  background: var(--gold);
  color: var(--navy);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(212, 175, 55, 0.3);
}

.filter-btn:not(.active):hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Cart Icon Animation */
#cart-btn {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

#cart-count {
  animation: pulse 1s infinite;
}

/* Modal Styles */
#product-modal, #cart-modal {
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease;
}

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

#product-modal > div, #cart-modal > div {
  animation: slideUp 0.3s ease;
}

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

/* Payment Options */
.payment-option .payment-card {
  cursor: pointer;
  transition: all 0.3s ease;
}

.payment-option .payment-card:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.payment-radio:checked + .payment-card {
  border-color: var(--gold) !important;
  background-color: rgba(212, 175, 55, 0.1);
  transform: scale(1.05);
}

/* Product Badge Animations */
.product-card .absolute {
  animation: slideInRight 0.5s ease;
}

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

/* Notification Styles */
.notification-enter {
  animation: slideInRight 0.3s ease;
}

.notification-exit {
  animation: slideOutRight 0.3s ease;
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Checkout Form Animations */
#checkout-form {
  animation: fadeInUp 0.5s ease;
}

/* Stock Badge Colors */
.stock-badge-high {
  background: #10b981;
  color: white;
}

.stock-badge-medium {
  background: #f59e0b;
  color: white;
}

.stock-badge-low {
  background: #ef4444;
  color: white;
}

/* Button States */
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button:disabled:hover {
  transform: none !important;
}

/* Cart Items Hover */
#cart-items > div:hover {
  background: #e5e7eb;
  transform: scale(1.02);
  transition: all 0.2s ease;
}

/* Responsive Boutique */
@media (max-width: 768px) {
  #cart-btn {
    width: 50px;
    height: 50px;
  }
  
  .filter-btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
  }
  
  .product-card h3 {
    font-size: 1.125rem;
  }
  
  #product-modal > div,
  #cart-modal > div {
    max-height: 100vh;
    border-radius: 0;
  }
}

/* Loading State */
.loading-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Success Checkmark Animation */
.success-checkmark {
  animation: scaleIn 0.5s ease;
}

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

/* ============================================
   RESPONSIVE DESIGN - MOBILE OPTIMIZATIONS
   ============================================ */

/* Hero Section Responsive */
@media (max-width: 640px) {
  #accueil h2 {
    font-size: 1.875rem !important; /* 30px */
    line-height: 1.2;
    padding: 0 1rem;
  }
  
  #accueil .text-gold {
    display: inline-block;
    margin: 0.25rem 0;
  }
}

@media (min-width: 641px) and (max-width: 768px) {
  #accueil h2 {
    font-size: 2.5rem !important; /* 40px */
  }
}

/* Image Background Optimization */
#accueil img {
  object-fit: cover;
  object-position: center;
}

@media (max-width: 768px) {
  #accueil img {
    object-position: 60% center; /* Focus on professionals */
  }
  
  #accueil {
    min-height: 100vh;
  }
}

/* Button Responsive */
@media (max-width: 640px) {
  #accueil a {
    width: 100%;
    text-align: center;
    padding: 0.875rem 1.5rem !important;
    font-size: 0.875rem !important;
  }
}

/* Navigation Mobile Improvements */
@media (max-width: 768px) {
  nav .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  nav h1 {
    font-size: 1.125rem;
  }
  
  #mobile-menu a {
    padding: 0.75rem 0;
    font-size: 1rem;
  }
}

/* Text Readability on Background */
#accueil h2,
#accueil p {
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Overlay gradient adjustments for mobile */
@media (max-width: 768px) {
  #accueil .absolute.inset-0.bg-gradient-to-br {
    background: linear-gradient(
      to bottom right,
      rgba(10, 25, 41, 0.97),
      rgba(10, 25, 41, 0.93),
      rgba(30, 58, 138, 0.95)
    ) !important;
  }
}

/* Prevent horizontal scroll on mobile */
body {
  overflow-x: hidden;
}

/* Container responsive padding */
.container {
  max-width: 100%;
}

@media (max-width: 640px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Image lazy loading optimization */
img[loading="eager"] {
  content-visibility: auto;
}

/* Touch-friendly buttons */
@media (hover: none) {
  a, button {
    -webkit-tap-highlight-color: rgba(212, 175, 55, 0.3);
  }
}

/* Improve text scaling on small devices */
@media (max-width: 375px) {
  #accueil h2 {
    font-size: 1.5rem !important; /* 24px for very small devices */
  }
  
  #accueil p {
    font-size: 0.875rem !important;
  }
}

/* High DPI displays optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  #accueil img {
    image-rendering: -webkit-optimize-contrast;
  }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
  #accueil .bg-gradient-to-br {
    background: linear-gradient(
      to bottom right,
      rgba(10, 25, 41, 0.98),
      rgba(10, 25, 41, 0.95),
      rgba(30, 58, 138, 0.97)
    ) !important;
  }
}

/* Accessibility: Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Loading state for background image */
#accueil img[src*="genspark"] {
  background: linear-gradient(135deg, var(--navy) 0%, #1e3a8a 100%);
}

/* Ensure proper stacking context */
#accueil {
  position: relative;
  isolation: isolate;
}

/* Fix for iOS Safari */
@supports (-webkit-touch-callout: none) {
  #accueil {
    min-height: -webkit-fill-available;
  }
}
