/*--------------------------------------------------------------
  OPUX360 — Base Styles
  Contient : variables CSS, typographie, reset custom, preloader,
             grain texture overlay, utilitaires couleur/espacement.
  Charger APRÈS style.css, AVANT opux360-components.css
--------------------------------------------------------------*/

/* ============================================================
   1. GOOGLE FONTS IMPORT
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=DM+Serif+Display:ital@0;1&display=swap');

/* ============================================================
   2. CSS VARIABLES
   ============================================================ */
:root {
  /* Primary — Deep sophisticated navy */
  --premium-primary: #0d1b2a;
  --premium-primary-light: #133659;

  /* Accent — Cyan */
  --premium-accent: #60c4e3;
  --premium-accent-light: #76d8f7;
  --premium-accent-subtle: rgba(112, 91, 21, 0.08);

  /* Neutrals — Warm undertones */
  --premium-white: #fafaf8;
  --premium-cream: #f5f4f0;
  --premium-gray-100: #e8e6e1;
  --premium-gray-200: #d4d2cd;
  --premium-gray-400: #9a9890;
  --premium-gray-600: #5c5a54;
  --premium-gray-800: #2d2b28;

  /* Typography */
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, sans-serif;

  /* Spacing scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-elegant: 0.6s cubic-bezier(0.22, 1, 0.36, 1);

  /* Header heights */
  --header-height-desktop: 80px;
  --header-height-mobile: 70px;
  --container-padding-mobile: 20px;
  --section-spacing-desktop: 130px;
  --section-spacing-mobile: 80px;
}

/* ============================================================
   3. BASE TYPOGRAPHY & RESET
   ============================================================ */
body,
html {
  font-family: var(--font-body);
  background-color: var(--premium-white);
  color: var(--premium-gray-600);
  font-size: 17px;
  line-height: 1.8;
  font-weight: 400;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings — DM Serif Display pour h1/h2, DM Sans pour h3-h6 */
h1, h2 {
  font-family: var(--font-display);
  color: var(--premium-primary);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

h3, h4, h5, h6 {
  font-family: var(--font-body);
  color: var(--premium-primary);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
  color: var(--premium-gray-600);
  line-height: 1.75;
}

img {
  max-width: 100%;
  height: auto;
}

/* Elegant text selection */
::selection {
  background-color: var(--premium-accent);
  color: var(--premium-primary);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--premium-cream);
}
::-webkit-scrollbar-thumb {
  background: var(--premium-gray-200);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--premium-gray-400);
}

/* ============================================================
   4. PRELOADER — Refined
   ============================================================ */
.cs_preloader {
  background-color: var(--premium-primary);
}

.cs_preloader_in::after {
  border-top-color: var(--premium-accent);
  border-bottom-color: var(--premium-accent);
}

.cs_preloader_in::before {
  border-color: rgba(201, 162, 39, 0.15);
}

.cs_preloader_in span {
  background-color: var(--premium-accent);
}

/* ============================================================
   5. UTILITY — Color & Spacing helpers
   ============================================================ */

/* Override default purple/accent utilities */
.cs_accent_bg {
  background-color: var(--premium-primary) !important;
}

.cs_purple_bg {
  background-color: var(--premium-accent) !important;
}

.cs_purple_color {
  color: var(--premium-accent) !important;
}

/* Border radius override — sharp edges for luxury feel */
.cs_radius_20,
.cs_radius_40,
.cs_radius_50,
.cs_radius_100 {
  border-radius: 0 !important;
}

/* Row gaps */
.cs_gap_y_24 {
  row-gap: 24px;
}

.cs_gap_y_40 {
  row-gap: 40px;
}

/* Section height spacers */
.cs_height_130 {
  height: 130px;
}

.cs_height_lg_80 {
  height: 80px;
}

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

.wow {
  animation: fadeInUp 0.8s var(--transition-elegant) both;
}

/* ============================================================
   7. SUBTLE GRAIN TEXTURE OVERLAY
   ============================================================ */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.018;
  pointer-events: none;
  z-index: 9999;
}

/* ============================================================
   8. ACCESSIBILITY
   ============================================================ */

/* Focus visible pour navigation au clavier */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--premium-accent);
  outline-offset: 2px;
}

/* i18n smooth transition */
[data-i18n] {
  transition: opacity 0.2s ease;
}
