/* =============================================================
   DESIGN SYSTEM — SD Électricité
   Variables CSS + Reset + Base
   ============================================================= */

@import url('./fonts.css');

/* --- Variables --- */
:root {
  /* Couleurs */
  --color-blue:        #1B5EC7;
  --color-blue-dark:   #0D1B3E;
  --color-orange:      #F47B20;
  --color-white:       #FFFFFF;
  --color-gray-light:  #F4F5F7;
  --color-gray-mid:    #E8EAED;
  --color-gray-text:   #6B7280;
  --color-dark:        #111827;
  --color-success:     #16A34A;
  --color-error:       #DC2626;

  /* Typographie */
  --font-heading: 'Barlow Condensed', sans-serif;
  --font-body:    'Inter', sans-serif;

  /* Espacements */
  --space-xs:   8px;
  --space-sm:   16px;
  --space-md:   24px;
  --space-lg:   40px;
  --space-xl:   64px;
  --space-2xl:  96px;
  --space-3xl:  120px;

  /* Border radius */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   20px;
  --radius-full: 9999px;

  /* Ombres */
  --shadow-sm:     0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:     0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg:     0 12px 40px rgba(0,0,0,0.10), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-xl:     0 24px 60px rgba(0,0,0,0.12), 0 8px 20px rgba(0,0,0,0.06);
  --shadow-blue:   0 8px 24px rgba(27, 94, 199, 0.25);
  --shadow-orange: 0 8px 24px rgba(244, 123, 32, 0.30);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-mid:  0.3s ease;
  --transition-slow: 0.5s ease;

  /* Container */
  --container-max: 1200px;
  --container-px:  24px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-dark);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font-family: inherit; font-size: inherit; }
ul, ol { list-style: none; }

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-px);
}

/* --- Typographie --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.1;
  font-weight: 700;
  color: var(--color-dark);
}
h1 { font-size: clamp(40px, 6vw, 72px); font-weight: 800; }
h2 { font-size: clamp(30px, 4vw, 44px); }
h3 { font-size: clamp(22px, 3vw, 28px); }
p { line-height: 1.65; }
.text-large { font-size: 18px; }
.text-small { font-size: 14px; }

/* --- Sections --- */
.section { padding: var(--space-3xl) 0; }
.section--gray { background: var(--color-gray-light); }
.section--dark {
  background: var(--color-blue-dark);
  color: var(--color-white);
}
.section--dark h1,
.section--dark h2,
.section--dark h3 { color: var(--color-white); }

.section__header { text-align: center; margin-bottom: var(--space-xl); }
.section__label {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-blue);
  background: rgba(27, 94, 199, 0.08);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-sm);
}
.section--dark .section__label {
  color: var(--color-orange);
  background: rgba(244, 123, 32, 0.15);
}
.section__subtitle {
  font-size: 18px;
  color: var(--color-gray-text);
  margin-top: var(--space-sm);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.section--dark .section__subtitle { color: rgba(255,255,255,0.7); }

/* --- Boutons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--color-orange);
  color: var(--color-white);
  box-shadow: var(--shadow-orange);
}
.btn-primary:hover { box-shadow: 0 12px 32px rgba(244, 123, 32, 0.40); }

.btn-blue {
  background: var(--color-blue);
  color: var(--color-white);
  box-shadow: var(--shadow-blue);
}
.btn-blue:hover { box-shadow: 0 12px 32px rgba(27, 94, 199, 0.35); }

.btn-ghost {
  background: transparent;
  color: var(--color-white);
  border: 1.5px solid rgba(255,255,255,0.4);
  box-shadow: none;
}
.btn-ghost:hover {
  border-color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.08);
  transform: translateY(-2px);
}

.btn-lg { padding: 18px 36px; font-size: 17px; }
.btn-sm { padding: 10px 20px; font-size: 14px; }

/* --- Grilles --- */
.grid-2 { display: grid; grid-template-columns: 1fr; gap: var(--space-md); }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: var(--space-md); }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .section { padding: var(--space-2xl) 0; }
  :root { --container-px: 40px; }
}
@media (min-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .section { padding: var(--space-3xl) 0; }
}

/* --- Animations scroll --- */
.animate {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Respect des préférences de mouvement --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .animate {
    opacity: 1;
    transform: none;
  }
}

/* --- Skip link accessibilité --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 10px 16px;
  background: var(--color-blue-dark);
  color: var(--color-white);
  font-weight: 600;
  font-size: 14px;
  border-radius: 0 0 6px 6px;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}

/* --- Utilitaires --- */
.text-center { text-align: center; }
.text-white { color: var(--color-white); }
.text-orange { color: var(--color-orange); }
.text-blue { color: var(--color-blue); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* --- Icônes inline SVG --- */
.icon { width: 24px; height: 24px; flex-shrink: 0; }
.icon-lg { width: 32px; height: 32px; }

@media (max-width: 767px) {
  .section { padding: var(--space-xl) 0; }
  h1 { font-size: clamp(36px, 8vw, 52px); }
  h2 { font-size: clamp(26px, 6vw, 36px); }
}
