/* =============================================
   MAIN.CSS — Styles globaux & variables
   Projet : Marketplace Digital + Physique
============================================= */

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

/* === VARIABLES === */
:root {
  --yellow:        #FFC107;
  --yellow-dark:   #FF8F00;
  --yellow-light:  #FFF8E1;
  --yellow-mid:    #FFE082;
  --black:         #1A1A1A;
  --black-soft:    #2C2C2C;
  --gray-dark:     #4A4A4A;
  --gray-mid:      #757575;
  --gray-light:    #F5F5F5;
  --white:         #FFFFFF;
  --border:        #E8E8E8;
  --border-yellow: #FFD54F;
  --success:       #2E7D32;
  --success-light: #E8F5E9;
  --danger:        #C62828;
  --danger-light:  #FFEBEE;

  --font-display: 'Poppins', sans-serif;
  --font-body:    'Inter', sans-serif;

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  32px;

  --shadow-sm:  0 1px 4px rgba(0,0,0,0.07);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.12);
  --shadow-yellow: 0 4px 20px rgba(255,193,7,0.30);

  --transition: 0.25s ease;
  --max-width:  1200px;
}

/* === RESET === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
}

img { max-width: 100%; display: block; }
a   { text-decoration: none; color: inherit; }
ul  { list-style: none; }

/* === TYPOGRAPHIE === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--black);
}

/* === LAYOUT === */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section--sm {
  padding: 48px 0;
}

/* === BOUTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  text-align: center;
}

.btn--primary {
  background: var(--yellow);
  color: var(--black);
  border-color: var(--yellow);
}

.btn--primary:hover {
  background: var(--yellow-dark);
  border-color: var(--yellow-dark);
  box-shadow: var(--shadow-yellow);
  transform: translateY(-1px);
}

.btn--outline {
  background: transparent;
  color: var(--black);
  border-color: var(--black);
}

.btn--outline:hover {
  background: var(--black);
  color: var(--white);
  transform: translateY(-1px);
}

.btn--outline-white {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn--outline-white:hover {
  background: var(--white);
  color: var(--black);
}

.btn--lg {
  padding: 16px 36px;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn--sm {
  padding: 8px 18px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

/* === BADGES === */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-display);
}

.badge--yellow {
  background: var(--yellow);
  color: var(--black);
}

.badge--black {
  background: var(--black);
  color: var(--white);
}

.badge--outline {
  background: transparent;
  color: var(--black);
  border: 1.5px solid var(--border);
}

.badge--success {
  background: var(--success-light);
  color: var(--success);
}

/* === CARDS === */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border);
  padding: 28px;
  transition: all var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--yellow);
  transform: translateY(-2px);
}

.card--yellow {
  background: var(--yellow-light);
  border-color: var(--border-yellow);
}

.card--dark {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

/* === SECTION HEADERS === */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--yellow-dark);
  margin-bottom: 12px;
}

.section-header__title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.section-header__title span {
  position: relative;
  display: inline-block;
}

.section-header__title span::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--yellow);
  z-index: -1;
  border-radius: 3px;
}

.section-header__sub {
  font-size: 1.05rem;
  color: var(--gray-mid);
  max-width: 580px;
  margin: 0 auto;
}

/* === DIVIDER === */
.divider {
  width: 48px;
  height: 4px;
  background: var(--yellow);
  border-radius: 2px;
  margin: 20px auto;
}

/* === GRIDS === */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* === UTILITAIRES === */
.text-center { text-align: center; }
.text-yellow { color: var(--yellow-dark); }
.bg-yellow-light { background: var(--yellow-light); }
.bg-black { background: var(--black); }
.fw-700 { font-weight: 700; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

/* === SCROLL BAR === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--gray-light); }
::-webkit-scrollbar-thumb { background: var(--yellow); border-radius: 3px; }

/* === ANIMATIONS === */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-yellow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,193,7,0.4); }
  50%       { box-shadow: 0 0 0 12px rgba(255,193,7,0); }
}

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

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

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* === RESPONSIVE HELPERS === */
@media (max-width: 992px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 60px 0; }
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
  .container { padding: 0 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
/* =============================================================
   RESPONSIVE GLOBAL — tout le site (grilles, conteneurs, tableaux)
============================================================= */
img, video, svg { max-width: 100%; }

@media (max-width: 992px) {
  .products-grid, .product-grid, .boutiques-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 640px) {
  .container { padding-left: 14px; padding-right: 14px; }
  .products-grid, .product-grid, .boutiques-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
  /* Titres géants ramenés à une taille lisible sur mobile */
  h1 { font-size: clamp(1.5rem, 7vw, 2.2rem); }
  h2 { font-size: clamp(1.3rem, 6vw, 1.8rem); }
}
@media (max-width: 400px) {
  .products-grid, .product-grid, .boutiques-grid { grid-template-columns: 1fr !important; }
}

/* Les tableaux larges défilent horizontalement au lieu de déborder la page */
@media (max-width: 768px) {
  .table-scroll, .dash-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ===== SÉCURITÉ FLEX GLOBALE (évite les débordements de texte long) ===== */
.container > *, .grid-2 > *, .grid-3 > *, .grid-4 > *,
.products-grid > *, .product-grid > *, .boutiques-grid > * { min-width: 0; }
