/* ============================================================
   FAVEL — Global Styles, Reset & Base Typography
   ============================================================ */

/* ─── IMPORT FONTS ─── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Inter:wght@400;500;600;700&display=swap');
@import url('variables.css');

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden !important;
  width: 100%;
  max-width: 100vw !important;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-relaxed);
  color: var(--color-dark);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden !important;
  width: 100%;
  max-width: 100vw !important;
  position: relative;
}

/* ─── SELECTION ─── */
::selection {
  background-color: var(--color-primary-pale);
  color: var(--color-primary-dark);
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-gray-100); }
::-webkit-scrollbar-thumb {
  background: var(--color-primary-light);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--color-primary); }

/* ─── TYPOGRAPHIE DE BASE ─── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-black);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(var(--text-3xl), 5vw, var(--text-6xl)); }
h2 { font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl)); }
h3 { font-size: clamp(var(--text-xl), 3vw, var(--text-2xl)); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
  color: var(--color-gray-700);
  line-height: var(--line-height-relaxed);
  max-width: 65ch;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover { color: var(--color-primary-dark); }

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol { list-style: none; }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

button { cursor: pointer; }

/* ─── CONTENEUR ─── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

@media (min-width: 640px) {
  .container { padding-inline: var(--space-6); }
}

@media (min-width: 1024px) {
  .container { padding-inline: var(--space-8); }
}

.container--narrow {
  max-width: var(--container-narrow);
  margin-inline: auto;
}

/* ─── UTILITAIRES DE TEXTE ─── */
.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-right   { text-align: right; }
.text-white   { color: var(--color-white) !important; }
.text-primary { color: var(--color-primary); }
.text-muted   { color: var(--color-gray-500); }

/* ─── SECTION HEADER (TITRE DE SECTION) ─── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  font-family: var(--font-heading);
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--color-primary-pale);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
}

.section-label--dark {
  background: rgba(124, 58, 237, 0.15);
  color: var(--color-primary-light);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-header .section-label { margin-bottom: var(--space-4); }

.section-header h2 {
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  font-weight: var(--font-weight-extrabold);
  margin-bottom: var(--space-4);
  color: var(--color-black);
}

.section-header h2.text-white { color: var(--color-white); }

.section-header p {
  font-size: clamp(var(--text-base), 2vw, var(--text-lg));
  color: var(--color-gray-500);
  max-width: 560px;
  margin-inline: auto;
}

.section-header p.text-white { color: rgba(255,255,255,0.75); }

/* ─── BADGE ─── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  padding: 3px var(--space-2);
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge--primary {
  background: var(--color-primary-pale);
  color: var(--color-primary);
}

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

.badge--hot {
  background: linear-gradient(135deg, #F59E0B, #EF4444);
  color: var(--color-white);
}

.badge--popular {
  background: var(--gradient-primary);
  color: var(--color-white);
}

/* ─── SKIP LINK (ACCESSIBILITÉ) ─── */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--color-primary);
  color: var(--color-white);
  padding: var(--space-2) var(--space-4);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-weight: var(--font-weight-semibold);
  z-index: var(--z-toast);
  transition: top var(--transition-fast);
}

.skip-link:focus { top: 0; }

/* ─── ANIMATIONS DE BASE ─── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

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

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

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

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

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

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

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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

@keyframes whatsappPulse {
  0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
  70%  { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ─── CLASSES D'ANIMATION ─── */
.animate-fade-in     { animation: fadeIn 0.6s ease forwards; }
.animate-slide-up    { animation: slideUp 0.7s ease forwards; }
.animate-scale-in    { animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
.animate-float       { animation: float 4s ease-in-out infinite; }

/* ─── SCROLL REVEAL ─── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ─── UTILITAIRES DE MISE EN PAGE ─── */
.flex           { display: flex; }
.flex-col       { flex-direction: column; }
.items-center   { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2          { gap: var(--space-2); }
.gap-4          { gap: var(--space-4); }
.gap-6          { gap: var(--space-6); }
.gap-8          { gap: var(--space-8); }
.grid           { display: grid; }
.w-full         { width: 100%; }
.hidden         { display: none; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ─── OVERLAY ─── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 10, 30, 0.75);
  backdrop-filter: blur(4px);
  z-index: var(--z-overlay);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* ─── DIVIDER ─── */
.divider {
  width: 60px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  margin: var(--space-4) auto var(--space-6);
}

/* ─── MEDIA QUERIES PRINT ─── */
@media print {
  .no-print { display: none !important; }
}

/* ─── PRÉFÈRE PAS D'ANIMATIONS ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
