﻿/**
 * CUSTOM STYLES - Poissonnerie Al Maktoum
 * Styles personnalisÃ©s complÃ©mentaires Ã  Tailwind CSS
 * Charte graphique: Bleu marine + Bleu ciel
 */

/* ===== ROOT VARIABLES ===== */
:root {
  --color-primary: #0D2E45;        /* Bleu marine foncÃ© */
  --color-primary-dark: #081A28;   /* Bleu marine trÃ¨s foncÃ© */
  --color-secondary: #5BA3D0;      /* Bleu ciel */
  --color-secondary-dark: #4A8FBD; /* Bleu ciel foncÃ© */
  --color-accent: #FFD700;         /* Or/Jaune pour accents */
}

/* ===== GLOBAL STYLES ===== */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ===== LINE CLAMP UTILITIES ===== */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

/* ===== ANIMATIONS ===== */
@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

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

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-fade-in {
  animation: fade-in 0.3s ease-out;
}

.animate-slide-up {
  animation: slide-up 0.5s ease-out;
}

.animate-slide-down {
  animation: slide-down 0.5s ease-out;
}

.animate-scale-in {
  animation: scale-in 0.3s ease-out;
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

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

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

::-webkit-scrollbar-thumb:hover {
  background: var(--color-secondary-dark);
}

/* ===== PRODUCT CARD HOVER EFFECTS ===== */
.product-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
  transform: translateY(-4px);
}

/* ===== CUSTOM FOCUS STYLES ===== */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(47, 184, 170, 0.1);
}

/* ===== BUTTON LOADING STATE ===== */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spinner 0.6s linear infinite;
}

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

/* ===== BADGE PULSE ANIMATION ===== */
.badge-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

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

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

/* ===== TOAST NOTIFICATIONS ===== */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  min-width: 300px;
  max-width: 500px;
  padding: 16px 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  animation: slide-up 0.3s ease-out;
  transition: opacity 0.3s ease, transform 0.3s ease;
  font-size: 14px;
  line-height: 1.5;
}

.toast.success {
  border-left: 5px solid #10b981;
  background: linear-gradient(to right, #ecfdf5 0%, #ffffff 10%);
}

.toast.error {
  border-left: 5px solid #ef4444;
  background: linear-gradient(to right, #fef2f2 0%, #ffffff 10%);
}

.toast.info {
  border-left: 5px solid #3b82f6;
  background: linear-gradient(to right, #eff6ff 0%, #ffffff 10%);
}

@media (max-width: 640px) {
  .toast {
    right: 10px;
    left: 10px;
    min-width: auto;
    bottom: 10px;
  }
}

/* ===== SMOOTH TRANSITIONS ===== */
* {
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

a, button {
  transition: all 0.3s ease;
}

/* ===== RESPONSIVE UTILITIES ===== */
@media (max-width: 640px) {
  /* Augmenter la taille des boutons tactiles sur mobile */
  button,
  a.btn,
  .add-to-cart-btn,
  .qty-increase,
  .qty-decrease {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Améliorer l'espacement des cartes produits */
  .product-card {
    margin-bottom: 1rem;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  header,
  footer,
  .no-print {
    display: none !important;
  }
  
  body {
    background: white;
  }
  
  a[href]:after {
    content: " (" attr(href) ")";
  }
}

/* ===== UTILITY CLASSES ===== */
.text-shadow {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filter-blur {
  filter: blur(4px);
}

.backdrop-blur {
  backdrop-filter: blur(10px);
}

/* ===== CUSTOM GRADIENTS ===== */
.gradient-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
}

.gradient-overlay {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.7) 100%);
}

/* ===== IMAGE LOADING PLACEHOLDER ===== */
img[src=""],
img:not([src]) {
  background: #e5e7eb;
  min-height: 200px;
  display: block;
}

/* ===== ACCESSIBLE FOCUS INDICATOR ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

/* ===== PRIX FORMATTING ===== */
.price {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
