/**
 * main.css - Styles globaux et système de design
 * Groupement des Artisans de Lubumbashi (GAL)
 * Design moderne avec palette rouge et blanc
 */

/* ===== IMPORTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
  /* Couleurs principales - Thème GAL */
  --color-primary: #DC2626;
  --color-primary-dark: #B91C1C;
  --color-primary-light: #FECACA;
  --color-secondary: #FFFFFF;
  --color-accent: #FF6F00;

  /* Couleurs de fond */
  --color-bg: #F7F9FC;
  --color-bg-alt: #FFFFFF;
  --color-bg-dark: #111827;

  /* Couleurs de texte */
  --color-text: #1F2937;
  --color-text-light: #FFFFFF;
  --color-muted: #6B7280;
  --color-muted-light: #9CA3AF;

  /* Couleurs système */
  --color-success: #10B981;
  --color-warning: #F59E0B;
  --color-error: #EF4444;
  --color-info: #3B82F6;

  /* Typographie */
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Tailles de police */
  --text-xs: 0.75rem;
  /* 12px */
  --text-sm: 0.875rem;
  /* 14px */
  --text-base: 1rem;
  /* 16px */
  --text-lg: 1.125rem;
  /* 18px */
  --text-xl: 1.25rem;
  /* 20px */
  --text-2xl: 1.5rem;
  /* 24px */
  --text-3xl: 1.875rem;
  /* 30px */
  --text-4xl: 2.25rem;
  /* 36px */
  --text-5xl: 3rem;
  /* 48px */
  --text-6xl: 3.75rem;
  /* 60px */

  /* Espacements */
  --space-1: 0.25rem;
  /* 4px */
  --space-2: 0.5rem;
  /* 8px */
  --space-3: 0.75rem;
  /* 12px */
  --space-4: 1rem;
  /* 16px */
  --space-5: 1.25rem;
  /* 20px */
  --space-6: 1.5rem;
  /* 24px */
  --space-8: 2rem;
  /* 32px */
  --space-10: 2.5rem;
  /* 40px */
  --space-12: 3rem;
  /* 48px */
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;

  /* Z-index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;

  /* Largeurs max */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1536px;
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

/* ===== TYPOGRAPHIE ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

h1 {
  font-size: var(--text-5xl);
}

h2 {
  font-size: var(--text-4xl);
}

h3 {
  font-size: var(--text-3xl);
}

h4 {
  font-size: var(--text-2xl);
}

h5 {
  font-size: var(--text-xl);
}

h6 {
  font-size: var(--text-lg);
}

p {
  margin-bottom: var(--space-4);
  line-height: 1.7;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-dark);
}

a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ===== LISTES ===== */
ul,
ol {
  margin-left: var(--space-6);
  margin-bottom: var(--space-4);
}

li {
  margin-bottom: var(--space-2);
}

/* ===== IMAGES ===== */
img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== FORMULAIRES ===== */
input,
textarea,
select,
button {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* ===== LAYOUT ===== */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.container-sm {
  max-width: var(--container-sm);
}

.container-md {
  max-width: var(--container-md);
}

.container-lg {
  max-width: var(--container-lg);
}

.container-2xl {
  max-width: var(--container-2xl);
}

/* ===== HEADER & NAVIGATION ===== */
.header {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: var(--color-text-light);
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  transition: all var(--transition-base);
}

.header.scrolled {
  box-shadow: var(--shadow-xl);
}

.header__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-4);
  max-width: var(--container-2xl);
  margin: 0 auto;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text-light);
  text-decoration: none;
}

.header__logo-img {
  height: 50px;
  width: auto;
  border-radius: var(--radius-md);
  object-fit: contain;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav__menu {
  display: flex;
  list-style: none;
  gap: var(--space-6);
  margin: 0;
}

.nav__link {
  color: var(--color-text-light);
  font-weight: 500;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--color-text-light);
  transition: all var(--transition-base);
  transform: translateX(-50%);
}

.nav__link:hover::after,
.nav__link.active::after {
  width: 80%;
}

.nav__link:hover {
  background: rgba(255, 255, 255, 0.1);
}

.nav__link.active {
  background: rgba(255, 255, 255, 0.2);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.nav__toggle {
  display: none;
  background: transparent;
  color: var(--color-text-light);
  font-size: var(--text-2xl);
  padding: var(--space-2);
  border-radius: var(--radius-md);
}

.nav__toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ===== FOOTER ===== */
.footer {
  background: linear-gradient(135deg, #111827 0%, #1F2937 100%);
  color: var(--color-text-light);
  padding: var(--space-16) 0 var(--space-8);
  margin-top: var(--space-24);
}

.footer__container {
  max-width: var(--container-2xl);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}

.footer__section h4 {
  color: var(--color-text-light);
  margin-bottom: var(--space-4);
  font-size: var(--text-lg);
}

.footer__links {
  list-style: none;
  margin: 0;
}

.footer__link {
  color: var(--color-muted-light);
  display: block;
  padding: var(--space-2) 0;
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: var(--color-text-light);
  padding-left: var(--space-2);
}

.footer__social {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.footer__social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  color: var(--color-text-light);
  transition: all var(--transition-base);
}

.footer__social-link:hover {
  background: var(--color-primary);
  transform: translateY(-3px);
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-6);
  text-align: center;
  color: var(--color-muted-light);
  font-size: var(--text-sm);
}

/* ===== HERO SECTION ===== */
.hero {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: var(--color-text-light);
  overflow: hidden;
  padding: var(--space-20) 0;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></svg>');
  opacity: 0.5;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: var(--container-lg);
}

.hero__title {
  font-size: var(--text-6xl);
  font-weight: 800;
  margin-bottom: var(--space-6);
  color: var(--color-text-light);
  line-height: 1.1;
  animation: fadeInUp 0.8s ease-out;
}

.hero__subtitle {
  font-size: var(--text-xl);
  margin-bottom: var(--space-8);
  opacity: 0.95;
  max-width: 600px;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero__cta {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* ===== SECTIONS ===== */
.section {
  padding: var(--space-20) 0;
}

.section--alt {
  background: var(--color-bg-alt);
}

.section__header {
  text-align: center;
  max-width: var(--container-md);
  margin: 0 auto var(--space-12);
}

.section__title {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-4);
  position: relative;
  display: inline-block;
}

.section__title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--color-primary);
  border-radius: var(--radius-full);
}

.section__subtitle {
  color: var(--color-muted);
  font-size: var(--text-lg);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

/* ===== ACCESSIBILITÉ ===== */
.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;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: var(--color-text-light);
  padding: var(--space-2) var(--space-4);
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* Respect pour prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  :root {
    --text-6xl: 2.5rem;
    --text-5xl: 2rem;
    --text-4xl: 1.75rem;
  }

  .nav__menu {
    display: none;
  }

  .nav__toggle {
    display: block;
  }

  .nav__menu.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-primary);
    padding: var(--space-4);
    box-shadow: var(--shadow-xl);
  }
}

@media (max-width: 768px) {
  :root {
    --text-6xl: 2rem;
    --text-5xl: 1.75rem;
    --text-4xl: 1.5rem;
  }

  .hero {
    min-height: 500px;
    padding: var(--space-12) 0;
  }

  .hero__cta {
    flex-direction: column;
  }

  .footer__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  :root {
    --text-6xl: 1.75rem;
    --text-5xl: 1.5rem;
    --text-4xl: 1.25rem;
  }

  .section {
    padding: var(--space-12) 0;
  }
}