/*
 * SITE: 2 MMO - Réparation de machines et équipements mécaniques
 * THEME: Sophisticated Professional Design for High-End Industrial Craftsmanship
 * COLOR SCHEME: Deep Slates, Charcoals, and Metallic Accents (Gold/Silver)
 * TYPOGRAPHY: Elegant Serif for Titles, Clean Sans-Serif for Body
 */

/* ===================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   =================================== */
:root {
  /* Deep Slate & Charcoal Color Palette */
  --color-primary: #2b2d42;
  --color-primary-dark: #1a1b26;
  --color-primary-light: #3d3f52;

  --color-secondary: #8d99ae;
  --color-secondary-dark: #6b7a94;
  --color-secondary-light: #a8b3c4;

  --color-accent: #edf2f4;
  --color-accent-dark: #d8e1e5;

  --color-neutral: #ef233c;
  --color-neutral-dark: #c71a2e;

  --color-bg: #ffffff;
  --color-bg-alt: #f8f9fa;
  --color-text: #1a1a1a;
  --color-text-light: #6c757d;

  /* Metallic Accents */
  --color-gold: #c9a961;
  --color-gold-light: #d4b87a;
  --color-gold-dark: #b8944f;
  --color-silver: #c0c0c0;
  --color-silver-light: #e0e0e0;
  --color-silver-dark: #a0a0a0;

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.3);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);

  /* Navigation Colors (Professional Industrial Theme) */
  --nav-bg: var(--color-primary-dark);
  --nav-text: #ffffff;
  --nav-hover-bg: var(--color-gold);
  --nav-hover-text: var(--color-primary-dark);

  /* Typography */
  --font-primary: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-secondary: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-xxl: 5rem;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 16px 32px rgba(0, 0, 0, 0.2);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #1a1b26;
    --color-bg-alt: #242636;
    --color-text: #f8f9fa;
    --color-text-light: #adb5bd;
    --glass-bg: rgba(26, 27, 38, 0.85);
  }
}

/* ===================================
   RESET & BASE STYLES
   =================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-secondary);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===================================
   TYPOGRAPHY
   =================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-primary);
  margin-bottom: var(--spacing-md);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: clamp(1rem, 2.5vw, 1.25rem); }

p {
  margin-bottom: var(--spacing-md);
  max-width: 70ch;
}

a {
  color: var(--color-gold);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-gold-dark);
}

/* ===================================
   LAYOUT UTILITIES
   =================================== */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.container-narrow {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.section {
  padding: var(--spacing-xxl) 0;
  position: relative;
}

.section-alt {
  background-color: var(--color-bg-alt);
}

.grid {
  display: grid;
  gap: var(--spacing-lg);
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ===================================
   NAVIGATION (FOREST ZEN THEME)
   =================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--nav-bg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md) var(--spacing-lg);
  max-width: 1280px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.logo img {
  width: auto;
  height: 60px;
  object-fit: contain;
}

.logo__text {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--nav-text);
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.nav__list {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  list-style: none;
}

.nav__link {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-sm) var(--spacing-md);
  color: var(--nav-text);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.nav__link:hover {
  background-color: var(--nav-hover-bg);
  color: var(--nav-hover-text);
  transform: translateY(-2px);
}

.nav__icon {
  font-size: 1.25rem;
}

/* Mobile Menu */
@media (max-width: 768px) {
  .nav__list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--nav-bg);
    flex-direction: column;
    padding: var(--spacing-md);
    box-shadow: var(--shadow-lg);
  }

  .nav__list.active {
    display: flex;
  }

  .nav__toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: var(--spacing-sm);
  }

  .nav__toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--nav-text);
    transition: all var(--transition-base);
  }
}

@media (min-width: 769px) {
  .nav__toggle {
    display: none;
  }
}

/* ===================================
   HERO SECTION
   =================================== */
.hero {
  position: relative;
  height: 90vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(3px);
  transform: scale(1.03);
}

.hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(26, 27, 38, 0.5), rgba(26, 27, 38, 0.7));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-lg);
}

.hero__content {
  position: relative;
  z-index: 10;
  text-align: center;
  color: #ffffff;
  max-width: 900px;
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  color: #ffffff;
  margin-bottom: var(--spacing-lg);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  letter-spacing: -0.02em;
}

.hero__subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  margin-bottom: var(--spacing-xl);
  opacity: 0.95;
  font-weight: 400;
}

/* ===================================
   CARDS (GLASSMORPHISM)
   =================================== */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  box-shadow: var(--glass-shadow);
  transition: all var(--transition-base);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card__icon {
  font-size: 2.5rem;
  color: var(--color-gold);
  margin-bottom: var(--spacing-md);
}

.card__title {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
}

.card__content {
  flex: 1;
  color: var(--color-text-light);
}

.card__image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-md);
}

/* ===================================
   BUTTONS
   =================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) var(--spacing-xl);
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn--primary {
  background-color: var(--color-gold);
  color: #ffffff;
}

.btn--primary:hover {
  background-color: var(--color-gold-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: #ffffff;
}

.btn--secondary {
  background-color: transparent;
  color: var(--color-gold);
  border: 2px solid var(--color-gold);
}

.btn--secondary:hover {
  background-color: var(--color-gold);
  color: #ffffff;
}

.btn--large {
  padding: var(--spacing-lg) var(--spacing-xxl);
  font-size: 1.1rem;
}

/* ===================================
   FORMS
   =================================== */
.form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
  max-width: 600px;
  margin: 0 auto;
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.form__label {
  font-weight: 600;
  color: var(--color-primary);
  font-size: 0.9rem;
}

.form__input,
.form__textarea {
  padding: var(--spacing-md);
  border: 2px solid var(--color-secondary);
  border-radius: var(--radius-md);
  font-family: var(--font-secondary);
  font-size: 1rem;
  color: var(--color-text);
  background-color: var(--color-bg);
  transition: all var(--transition-base);
}

.form__input:focus,
.form__textarea:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.1);
}

.form__textarea {
  resize: vertical;
  min-height: 150px;
}

.form__checkbox {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
}

.form__checkbox input {
  margin-top: 4px;
}

.form__checkbox label {
  font-size: 0.9rem;
  color: var(--color-text-light);
}

/* ===================================
   BACKGROUND SECTIONS WITH IMAGES
   =================================== */
.bg-image {
  position: relative;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.bg-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: inherit;
  filter: blur(3px);
  z-index: -1;
}

.bg-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 27, 38, 0.85);
  z-index: 0;
}

.bg-image > * {
  position: relative;
  z-index: 1;
}

.bg-image--light::after {
  background: rgba(255, 255, 255, 0.9);
}

/* ===================================
   IMAGES
   =================================== */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

.img--rounded {
  border-radius: var(--radius-lg);
}

.img--shadow {
  box-shadow: var(--shadow-lg);
}

/* ===================================
   FOOTER
   =================================== */
.footer {
  background-color: var(--color-primary-dark);
  color: var(--color-accent);
  padding: var(--spacing-xxl) 0 var(--spacing-lg);
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.footer__title {
  color: var(--color-gold);
  font-size: 1.25rem;
  margin-bottom: var(--spacing-md);
}

.footer__content {
  color: var(--color-accent);
  line-height: 1.8;
}

.footer__links {
  list-style: none;
}

.footer__link {
  color: var(--color-accent);
  margin-bottom: var(--spacing-sm);
  display: block;
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: var(--color-gold);
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--spacing-lg);
  text-align: center;
  color: var(--color-secondary-light);
  font-size: 0.9rem;
}

/* ===================================
   UTILITY CLASSES
   =================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-gold { color: var(--color-gold); }
.text-muted { color: var(--color-text-light); }

.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

.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;
}

/* ===================================
   ACCESSIBILITY
   =================================== */
:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 2px;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-gold);
  color: #ffffff;
  padding: var(--spacing-sm) var(--spacing-md);
  z-index: 1001;
  transition: top var(--transition-base);
}

.skip-link:focus {
  top: 0;
}

/* ===================================
   ANIMATIONS
   =================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeInUp 0.6s ease forwards;
}

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 768px) {
  .section {
    padding: var(--spacing-xl) 0;
  }

  .hero {
    height: 70vh;
    min-height: 500px;
  }

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }

  .btn--large {
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 1rem;
  }
}

/* ===================================
   PRINT STYLES
   =================================== */
@media print {
  .header,
  .footer,
  .btn,
  .nav {
    display: none;
  }

  body {
    color: #000000;
    background-color: #ffffff;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}
