/**
 * DESIGN SYSTEM - CONSEIL CAPITAL PLUS
 * Version: 1.0
 * Date: 2025-11-10
 *
 * Intégration pixel-perfect basée sur les maquettes Figma
 */

/* ============================================
   CSS VARIABLES (Custom Properties)
   ============================================ */

:root {
  /* ========== COULEURS ========== */

  /* Couleurs principales */
  --color-blanc: #FFFFFF;
  --color-noir: #000000;
  --color-rouge: #FF2600;
  --color-orange: #FF8000;
  --color-bleu: #006DFF;
  --color-vert: #1A4945;

  /* Grises (si nécessaires) */
  --color-gris-clair: #F5F5F5;
  --color-gris-moyen: #CCCCCC;
  --color-gris-fonce: #333333;


  /* ========== TYPOGRAPHIE ========== */

  /* Font Families */
  --font-heading: 'PP Neue Machina', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'tt-commons-pro', 'TT Commons Pro', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Font Weights */
  --fw-thin: 300;
  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-bold: 700;

  /* Font Sizes - Desktop (base values) */
  --fs-h1: 84px;           /* Homepage "VOUS", titres majeurs */
  --fs-h1-alt: 83.13px;    /* Page Particuliers/Entreprises */
  --fs-h2: 64px;           /* "Chiffres clés" */
  --fs-h2-section: 50px;   /* Titres sections colorées */
  --fs-h3: 21px;           /* Sous-titres */
  --fs-body-large: 28.26px;
  --fs-body: 20px;
  --fs-body-small: 18px;
  --fs-small: 16px;
  --fs-tiny: 14px;

  /* Line Heights */
  --lh-tight: 1.0;
  --lh-snug: 1.15;
  --lh-normal: 1.4;
  --lh-relaxed: 1.58;
  --lh-loose: 2.18;

  /* Letter Spacing */
  --ls-tight: -0.02em;
  --ls-normal: 0;
  --ls-wide: 0.05em;


  /* ========== ESPACEMENTS ========== */

  /* Section Padding */
  --section-padding-y: 120px;
  --section-padding-x: 80px;

  /* Container */
  --container-max-width: 1600px;
  --container-padding-x: 80px;

  /* Grid Gaps */
  --grid-gap: 40px;
  --grid-gap-small: 20px;
  --grid-row-gap: 60px;

  /* Spacing Scale */
  --space-xs: 10px;
  --space-sm: 15px;
  --space-md: 20px;
  --space-lg: 30px;
  --space-xl: 40px;
  --space-2xl: 60px;
  --space-3xl: 80px;
  --space-4xl: 100px;
  --space-5xl: 120px;


  /* ========== BREAKPOINTS ========== */

  /* Utilisés dans les media queries */
  --breakpoint-mobile: 768px;
  --breakpoint-tablet: 1024px;
  --breakpoint-desktop: 1440px;


  /* ========== TRANSITIONS ========== */

  --transition-fast: 200ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;


  /* ========== BORDERS ========== */

  --border-width: 1px;
  --border-width-thick: 2px;
  --border-radius: 0; /* Design très rectangulaire */


  /* ========== Z-INDEX ========== */

  --z-header: 100;
  --z-overlay: 200;
  --z-modal: 300;
  --z-tooltip: 400;
}


/* ============================================
   RESPONSIVE VARIABLES (clamp)
   ============================================ */

/* Font Sizes Fluides (Desktop → Mobile) */
:root {
  /* H1: 84px desktop → 42px mobile */
  --fs-h1-fluid: clamp(42px, 5.5vw, 84px);

  /* H1 Alt: 83px desktop → 42px mobile */
  --fs-h1-alt-fluid: clamp(42px, 5.5vw, 83.13px);

  /* H2: 64px desktop → 36px mobile */
  --fs-h2-fluid: clamp(36px, 4.5vw, 64px);

  /* H2 Section: 50px desktop → 28px mobile */
  --fs-h2-section-fluid: clamp(28px, 3.5vw, 50px);

  /* H3: 21px desktop → 18px mobile */
  --fs-h3-fluid: clamp(18px, 1.5vw, 21px);

  /* Body Large: 28px desktop → 20px mobile */
  --fs-body-large-fluid: clamp(20px, 2vw, 28.26px);

  /* Body: 20px desktop → 16px mobile */
  --fs-body-fluid: clamp(16px, 1.25vw, 20px);

  /* Section Padding: 120px desktop → 60px mobile */
  --section-padding-y-fluid: clamp(60px, 8vw, 120px);

  /* Container Padding: 80px desktop → 20px mobile */
  --container-padding-x-fluid: clamp(20px, 5vw, 80px);

  /* Grid Gap: 40px desktop → 20px mobile */
  --grid-gap-fluid: clamp(20px, 3vw, 40px);
}


/* ============================================
   RESET & BASE STYLES
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 100%; /* 16px base */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
  font-size: var(--fs-body-fluid);
  line-height: var(--lh-relaxed);
  color: var(--color-noir);
  background-color: var(--color-blanc);
  padding-top: 100px; /* Compense le header fixe */
}

@media (max-width: 1024px) {
  body {
    padding-top: 80px;
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 70px;
  }
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-normal);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}


/* ============================================
   TYPOGRAPHY CLASSES
   ============================================ */

h1, .h1 {
  font-family: var(--font-heading);
  font-weight: var(--fw-regular);
  font-size: var(--fs-h1-fluid);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-normal);
  margin-bottom: var(--space-lg);
}

h2, .h2 {
  font-family: var(--font-heading);
  font-weight: var(--fw-regular);
  font-size: var(--fs-h2-fluid);
  line-height: var(--lh-normal);
  letter-spacing: var(--ls-normal);
  margin-bottom: var(--space-lg);
}

.h2-section {
  font-family: var(--font-body);
  font-weight: var(--fw-light);
  font-size: var(--fs-h2-section-fluid);
  line-height: var(--lh-normal);
  letter-spacing: var(--ls-normal);
}

h3, .h3 {
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
  font-size: var(--fs-h3-fluid);
  line-height: var(--lh-normal);
  letter-spacing: var(--ls-normal);
  margin-bottom: var(--space-md);
}

.body-large {
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
  font-size: var(--fs-body-large-fluid);
  line-height: var(--lh-relaxed);
}

p {
  margin-bottom: var(--space-md);
}

.text-small {
  font-size: var(--fs-small);
}

.text-tiny {
  font-size: var(--fs-tiny);
}

/* Font Weights Utilities */
.fw-thin { font-weight: var(--fw-thin); }
.fw-light { font-weight: var(--fw-light); }
.fw-regular { font-weight: var(--fw-regular); }
.fw-medium { font-weight: var(--fw-medium); }
.fw-bold { font-weight: var(--fw-bold); }

/* Text Transforms */
.uppercase { text-transform: uppercase; }
.capitalize { text-transform: capitalize; }


/* ============================================
   LAYOUT - CONTAINER
   ============================================ */

.container {
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding-x-fluid);
  padding-right: var(--container-padding-x-fluid);
}

.container-full {
  width: 100%;
  padding-left: var(--container-padding-x-fluid);
  padding-right: var(--container-padding-x-fluid);
}


/* ============================================
   SECTIONS
   ============================================ */

section {
  padding-top: var(--section-padding-y-fluid);
  padding-bottom: var(--section-padding-y-fluid);
}

/* Section Colors */
.section-rouge { background-color: var(--color-rouge); color: var(--color-blanc); }
.section-orange { background-color: var(--color-orange); color: var(--color-blanc); }
.section-bleu { background-color: var(--color-bleu); color: var(--color-blanc); }
.section-vert { background-color: var(--color-vert); color: var(--color-blanc); }
.section-noir { background-color: var(--color-noir); color: var(--color-blanc); }
.section-blanc { background-color: var(--color-blanc); color: var(--color-noir); }
.section-gris { background-color: var(--color-gris-clair); color: var(--color-noir); }


/* ============================================
   GRIDS
   ============================================ */

.grid {
  display: grid;
  gap: var(--grid-gap-fluid);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Auto-fit responsive grids */
.grid-auto-fit {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-auto-fill {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* Gap variations */
.gap-small { gap: var(--space-md); }
.gap-medium { gap: var(--grid-gap-fluid); }
.gap-large { gap: var(--space-3xl); }


/* ============================================
   FLEXBOX UTILITIES
   ============================================ */

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}


/* ============================================
   BUTTONS
   ============================================ */

.btn {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: var(--fw-regular);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  padding: 15px 40px;
  border: var(--border-width-thick) solid transparent;
  border-radius: var(--border-radius);
  transition: var(--transition-normal);
  cursor: pointer;
  display: inline-block;
  text-align: center;
}

/* Outline Button (style principal) */
.btn-outline {
  background: transparent;
  border-color: currentColor;
  color: inherit;
}

.btn-outline:hover {
  background-color: currentColor;
  color: var(--color-noir);
}

.btn-outline-white {
  border-color: var(--color-blanc);
  color: var(--color-blanc);
}

.btn-outline-white:hover {
  background-color: var(--color-blanc);
  color: var(--color-noir);
}

/* Solid Button */
.btn-solid {
  background-color: var(--color-noir);
  color: var(--color-blanc);
  border-color: var(--color-noir);
}

.btn-solid:hover {
  background-color: transparent;
  color: var(--color-noir);
}

/* Button Sizes */
.btn-small {
  padding: 10px 30px;
  font-size: var(--fs-tiny);
}

.btn-large {
  padding: 20px 50px;
  font-size: var(--fs-body-small);
}


/* ============================================
   TAGS / PILLS
   ============================================ */

.tag {
  font-family: var(--font-body);
  font-size: var(--fs-tiny);
  font-weight: var(--fw-regular);
  padding: 8px 16px;
  border: 1px solid currentColor;
  border-radius: 20px;
  display: inline-block;
  background: transparent;
}

.tags-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}


/* ============================================
   UTILITIES
   ============================================ */

/* Colors */
.text-blanc { color: var(--color-blanc); }
.text-noir { color: var(--color-noir); }
.text-rouge { color: var(--color-rouge); }
.text-orange { color: var(--color-orange); }
.text-bleu { color: var(--color-bleu); }

.bg-blanc { background-color: var(--color-blanc); }
.bg-noir { background-color: var(--color-noir); }
.bg-rouge { background-color: var(--color-rouge); }
.bg-orange { background-color: var(--color-orange); }
.bg-bleu { background-color: var(--color-bleu); }
.bg-vert { background-color: var(--color-vert); }

/* Spacing */
.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

/* Text Align */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Display */
.block { display: block; }
.inline-block { display: inline-block; }
.hidden { display: none; }

/* Width */
.w-full { width: 100%; }
.w-auto { width: auto; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }


/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Tablet (< 1024px) */
@media (max-width: 1024px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .hide-tablet {
    display: none;
  }
}

/* Mobile (< 768px) */
@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .flex-between {
    flex-direction: column;
    gap: var(--space-md);
  }

  .hide-mobile {
    display: none;
  }

  /* Stack buttons on mobile */
  .btn {
    width: 100%;
  }
}


/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  * {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  img {
    max-width: 100% !important;
  }

  @page {
    margin: 2cm;
  }
}
