/**
 * ============================================
 * HERACLES AI - Styles Globaux V2
 * ============================================
 * 
 * Ce fichier contient :
 * - Reset CSS minimal
 * - Variables CSS V2 (couleurs premium, typographie, espacements)
 * - Styles de base (body, headings, paragraphs, links)
 * - Layout V2 (container 1120px, grid, flex utilities)
 * - Header V2 avec blur effect
 * - Footer
 * - Classes utilitaires
 */

/* ============================================
   RESET CSS MINIMAL
   ============================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: 1.5;
}

ul,
ol {
  list-style: none;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

/* ============================================
   VARIABLES CSS V2 - DESIGN PREMIUM
   ============================================ */

:root {
  /* Couleurs V2 - Premium Dark */
  --color-dark: #071A2B;
  --color-dark-alt: #0B2A4A;
  --color-primary: #071A2B;
  --color-primary-light: #0B2A4A;
  --color-accent: #C9A227;
  --color-accent-dark: #A68B1F;
  
  /* Backgrounds V2 */
  --color-bg-light: #F6F8FB;
  --color-background: #F6F8FB;
  --color-white: #FFFFFF;
  
  /* Couleurs de texte V2 */
  --color-text: #1A202C;
  --color-text-light: #4A5568;
  
  /* Couleurs neutres */
  --color-border: #E2E8F0;
  
  /* Typographie */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  
  /* Tailles de police */
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.25rem;    /* 20px */
  --font-size-2xl: 1.5rem;    /* 24px */
  --font-size-3xl: 1.875rem;  /* 30px */
  --font-size-4xl: 2.25rem;   /* 36px */
  --font-size-5xl: 3rem;      /* 48px */
  
  /* Poids de police */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  /* Hauteurs de ligne */
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  
  /* Espacements V2 (système 8px) */
  --spacing-1: 0.25rem;   /* 4px */
  --spacing-2: 0.5rem;    /* 8px */
  --spacing-3: 0.75rem;   /* 12px */
  --spacing-4: 1rem;      /* 16px */
  --spacing-5: 1.25rem;   /* 20px */
  --spacing-6: 1.5rem;    /* 24px */
  --spacing-8: 2rem;      /* 32px */
  --spacing-10: 2.5rem;   /* 40px */
  --spacing-12: 3rem;     /* 48px */
  --spacing-14: 3.5rem;   /* 56px */
  --spacing-16: 4rem;     /* 64px */
  --spacing-20: 5rem;     /* 80px */
  --spacing-24: 6rem;     /* 96px */
  
  /* Ombres V2 - Plus prononcées */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --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 20px 60px rgba(0, 0, 0, 0.3);
  
  /* Bordures et rayons */
  --border-radius-sm: 0.25rem;  /* 4px */
  --border-radius-md: 0.5rem;   /* 8px */
  --border-radius-lg: 0.75rem;  /* 12px */
  --border-radius-xl: 1rem;     /* 16px */
  --border-radius-full: 9999px; /* Boutons pilule */
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 350ms ease;
  
  /* Z-index */
  --z-header: 1000;
  --z-modal: 1100;
  --z-tooltip: 1200;
}

/* ============================================
   STYLES DE BASE
   ============================================ */

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-white);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-text);
  margin-bottom: var(--spacing-4);
}

h1 {
  font-size: var(--font-size-5xl);
}

h2 {
  font-size: var(--font-size-4xl);
}

h3 {
  font-size: var(--font-size-3xl);
}

h4 {
  font-size: var(--font-size-2xl);
}

h5 {
  font-size: var(--font-size-xl);
}

h6 {
  font-size: var(--font-size-lg);
}

/* Paragraphes */
p {
  margin-bottom: var(--spacing-4);
  line-height: var(--line-height-relaxed);
}

p:last-child {
  margin-bottom: 0;
}

/* Liens */
a {
  color: var(--color-primary);
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent);
}

/* Texte fort et emphase */
strong,
b {
  font-weight: var(--font-weight-semibold);
}

em,
i {
  font-style: italic;
}

/* Listes dans le contenu */
.content ul,
.content ol {
  margin-bottom: var(--spacing-4);
  padding-left: var(--spacing-6);
}

.content ul {
  list-style-type: disc;
}

.content ol {
  list-style-type: decimal;
}

.content li {
  margin-bottom: var(--spacing-2);
  line-height: var(--line-height-relaxed);
}

/* ============================================
   LAYOUT V2 - CONTAINER 1120px
   ============================================ */

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--spacing-4);
}

/* Container étroit pour texte */
.container--narrow {
  max-width: 800px;
}

/* Container large */
.container--wide {
  max-width: 1280px;
}

/* ============================================
   LAYOUT V2 - SECTIONS (80px desktop, 56px mobile)
   ============================================ */

.section {
  padding: var(--spacing-20) 0;
}

.section--sm {
  padding: var(--spacing-12) 0;
}

.section--lg {
  padding: var(--spacing-24) 0;
}

/* Fond clair alterné */
.section--alt {
  background-color: var(--color-bg-light);
}

/* Fond blanc */
.section--white {
  background-color: var(--color-white);
}

/* Fond sombre */
.section--dark {
  background-color: var(--color-dark);
  color: var(--color-white);
}

.section--dark .section__title {
  color: var(--color-white);
}

.section--dark .section__subtitle {
  color: rgba(255, 255, 255, 0.85);
}

/* Section title V2 - Aligné à GAUCHE par défaut */
.section__title {
  font-size: var(--font-size-3xl);
  text-align: left;
  margin-bottom: var(--spacing-6);
  color: var(--color-text);
}

/* Centré uniquement pour CTA final */
.section--centered .section__title {
  text-align: center;
}

.section__subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-light);
  text-align: left;
  max-width: 700px;
  margin-bottom: var(--spacing-8);
}

.section--centered .section__subtitle {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   LAYOUT - GRID
   ============================================ */

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

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

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

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

/* ============================================
   LAYOUT - FLEXBOX UTILITIES
   ============================================ */

.flex {
  display: flex;
}

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

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

.flex--start {
  align-items: flex-start;
}

.flex--end {
  align-items: flex-end;
}

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

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

.gap-2 {
  gap: var(--spacing-2);
}

.gap-4 {
  gap: var(--spacing-4);
}

.gap-6 {
  gap: var(--spacing-6);
}

.gap-8 {
  gap: var(--spacing-8);
}

/* ============================================
   HEADER V2 - BLUR EFFECT AU SCROLL
   ============================================ */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  background-color: transparent;
  transition: all var(--transition-normal);
}

/* État au scroll - Blanc avec blur */
.header--scrolled {
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.header--scrolled .nav__link {
  color: var(--color-dark) !important;
}

.header--scrolled .nav__link:hover {
  color: var(--color-accent) !important;
}

.header--scrolled .nav__link--active {
  color: var(--color-accent) !important;
}

.header--scrolled .nav__toggle-bar {
  background-color: var(--color-dark) !important;
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-4) 0;
}

.nav__logo {
  display: flex;
  align-items: center;
}

.nav__logo-img {
  height: 40px;
  width: auto;
  transition: opacity var(--transition-normal);
}

/* Fix pour le logo qui change au scroll */
.header:not(.header--scrolled) .nav__logo-img {
  filter: brightness(1);
}

.header--scrolled .nav__logo-img {
  filter: brightness(1);
}

/* Menu de navigation */
.nav__menu {
  display: flex;
  align-items: center;
  gap: var(--spacing-4);
  pointer-events: auto;
}

.nav__item {
  position: relative;
  display: flex;
  align-items: center;
}

.nav__link {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  color: var(--color-white);
  padding: var(--spacing-2) var(--spacing-1);
  transition: color var(--transition-fast);
  cursor: pointer;
  pointer-events: auto;
  white-space: nowrap;
  display: flex;
  align-items: center;
  height: 100%;
}

.nav__link:hover {
  color: var(--color-accent);
}

.nav__link--active {
  color: var(--color-accent);
}

/* CTA dans le header */
.nav__cta {
  margin-left: var(--spacing-4);
  pointer-events: auto;
}

/* ============================================
   DROPDOWNS NAVIGATION
   ============================================ */

.nav__item--dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.nav__dropdown-toggle {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: var(--spacing-1);
}

.nav__dropdown-toggle::after {
  content: '▼';
  font-size: 10px;
  margin-left: 4px;
  transition: transform var(--transition-fast);
  display: inline-block;
}

.nav__item--dropdown.is-open .nav__dropdown-toggle::after {
  transform: rotate(180deg);
}

.nav__dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 200px;
  background-color: var(--color-white);
  border-radius: var(--border-radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  padding: var(--spacing-2) 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  z-index: 1050;
  border: 1px solid var(--color-border);
}

/* Pont invisible pour éviter la perte du hover */
.nav__dropdown::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}

.nav__item--dropdown.is-open .nav__dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav__dropdown li {
  list-style: none;
}

.nav__dropdown-link {
  display: block;
  padding: var(--spacing-3) var(--spacing-4);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav__dropdown-link:hover {
  background-color: var(--color-bg-light);
  color: var(--color-accent);
}

.nav__dropdown-link.nav__link--active {
  color: var(--color-accent);
  background-color: rgba(201, 162, 39, 0.08);
}

/* Toggle mobile */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  padding: var(--spacing-2);
  cursor: pointer;
  position: relative;
  z-index: calc(var(--z-header) + 10);
}

.nav__toggle-bar {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-white);
  border-radius: 2px;
  transition: all 0.3s ease;
  position: absolute;
}

.nav__toggle-bar:nth-child(1) {
  top: 14px;
}

.nav__toggle-bar:nth-child(2) {
  top: 21px;
}

.nav__toggle-bar:nth-child(3) {
  top: 28px;
}

.header--scrolled .nav__toggle-bar {
  background-color: var(--color-text);
}

/* Menu mobile ouvert - croix */
.nav__toggle.is-active .nav__toggle-bar {
  background-color: var(--color-white);
}

.nav__toggle.is-active .nav__toggle-bar:nth-child(1) {
  top: 21px;
  transform: rotate(45deg);
}

.nav__toggle.is-active .nav__toggle-bar:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}

.nav__toggle.is-active .nav__toggle-bar:nth-child(3) {
  top: 21px;
  transform: rotate(-45deg);
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main {
  min-height: 100vh;
  padding-top: 80px; /* Hauteur du header */
}

/* Pages sans hero (fond sombre) */
.main--no-hero {
  padding-top: 80px;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  background-color: var(--color-dark);
  color: var(--color-white);
  padding-top: var(--spacing-16);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--spacing-8);
  padding-bottom: var(--spacing-12);
}

.footer__brand {
  max-width: 300px;
}

.footer__logo {
  display: block;
  margin-bottom: var(--spacing-4);
}

.footer__logo img {
  height: 40px;
  width: auto;
}

.footer__description {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.8);
  line-height: var(--line-height-relaxed);
}

.footer__title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--spacing-4);
  color: var(--color-white);
}

.footer__list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-3);
}

.footer__link {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.8);
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: var(--color-accent);
}

.footer__contact {
  display: flex;
  flex-direction: column;
}

.footer__text {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--spacing-2);
}

/* Footer bottom */
.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-6) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__copyright {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.6);
}

.footer__legal {
  display: flex;
  gap: var(--spacing-6);
}

.footer__legal-link {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--transition-fast);
}

.footer__legal-link:hover {
  color: var(--color-white);
}

/* ============================================
   CLASSES UTILITAIRES
   ============================================ */

/* Texte */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.text-primary {
  color: var(--color-primary);
}

.text-accent {
  color: var(--color-accent);
}

.text-light {
  color: var(--color-text-light);
}

.text-white {
  color: var(--color-white);
}

/* Tailles de texte */
.text-sm {
  font-size: var(--font-size-sm);
}

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

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

/* Poids de texte */
.font-medium {
  font-weight: var(--font-weight-medium);
}

.font-semibold {
  font-weight: var(--font-weight-semibold);
}

.font-bold {
  font-weight: var(--font-weight-bold);
}

/* Marges */
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--spacing-2); }
.mb-4 { margin-bottom: var(--spacing-4); }
.mb-6 { margin-bottom: var(--spacing-6); }
.mb-8 { margin-bottom: var(--spacing-8); }
.mb-12 { margin-bottom: var(--spacing-12); }
.mb-16 { margin-bottom: var(--spacing-16); }

.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--spacing-2); }
.mt-4 { margin-top: var(--spacing-4); }
.mt-6 { margin-top: var(--spacing-6); }
.mt-8 { margin-top: var(--spacing-8); }
.mt-12 { margin-top: var(--spacing-12); }

/* Affichage */
.hidden {
  display: none;
}

.block {
  display: block;
}

.inline-block {
  display: inline-block;
}

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

.max-w-prose {
  max-width: 65ch;
}

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

.absolute {
  position: absolute;
}

/* Overflow */
.overflow-hidden {
  overflow: hidden;
}

/* Screen reader only */
.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;
}