/*
 * AX-LES-THERMES.COM - Design Premium V2
 * Approche: Clair, Lumineux, Lisible, Éditorial
 * Version: 2.0 - Design Premium
 */

/* ==========================================================================
   1. VARIABLES CSS & DESIGN TOKENS
   ========================================================================== */

:root {
  /* Palette Claire & Naturelle */
  --color-primary: #2C7A7B;        /* Vert-bleu eau thermale */
  --color-primary-light: #81C5C4;  /* Turquoise clair */
  --color-primary-dark: #1F5958;   /* Vert-bleu profond */

  --color-secondary: #D4A574;      /* Beige chaud terre */
  --color-accent: #7FB8A7;         /* Vert doux nature */

  /* Palette de fond - CLAIRE */
  --color-bg: #FFFFFF;             /* Blanc pur */
  --color-bg-alt: #F9FAFB;         /* Gris très clair */
  --color-bg-cream: #FDFBF7;       /* Blanc cassé crème */
  --color-bg-soft: #F4F7F6;        /* Vert très pâle */

  /* Texte - Lisible mais doux */
  --color-text: #2D3748;           /* Gris anthracite (pas noir) */
  --color-text-light: #718096;     /* Gris moyen */
  --color-text-muted: #A0AEC0;     /* Gris clair */

  /* Bordures - Subtiles */
  --color-border: #E2E8F0;         /* Gris très clair */
  --color-border-light: #EDF2F7;   /* Gris ultra-clair */

  /* Couleurs sémantiques - Douces */
  --color-success: #68D391;        /* Vert doux */
  --color-info: #63B3ED;           /* Bleu clair */
  --color-warning: #F6AD55;        /* Orange doux */

  /* Typographie - LISIBLE */
  --font-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;

  /* Échelle typographique - GÉNÉREUSE (mobile) */
  --text-xs: 0.875rem;    /* 14px */
  --text-sm: 1rem;        /* 16px */
  --text-base: 1.125rem;  /* 18px - BASE LISIBLE */
  --text-lg: 1.25rem;     /* 20px */
  --text-xl: 1.5rem;      /* 24px */
  --text-2xl: 1.875rem;   /* 30px */
  --text-3xl: 2.25rem;    /* 36px */
  --text-4xl: 2.75rem;    /* 44px */

  /* Espacement - GÉNÉREUX */
  --space-xs: 0.5rem;     /* 8px */
  --space-sm: 1rem;       /* 16px */
  --space-md: 1.5rem;     /* 24px */
  --space-lg: 2rem;       /* 32px */
  --space-xl: 3rem;       /* 48px */
  --space-2xl: 4rem;      /* 64px */
  --space-3xl: 6rem;      /* 96px */

  /* Layout - Largeur optimale lecture */
  --content-width: 720px;          /* Largeur lecture confortable */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;

  /* Transitions */
  --transition-fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Ombres - Douces */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.12);

  /* Border radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

/* ==========================================================================
   2. RESET & BASE STYLES
   ========================================================================== */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   3. TYPOGRAPHIE - LISIBLE & HIÉRARCHIQUE
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-primary-dark);
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}

/* Mobile (base) */
h1 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-xl);
  line-height: 1.2;
}

h2 {
  font-size: var(--text-2xl);
  margin-top: var(--space-3xl);
  margin-bottom: var(--space-lg);
  padding-top: var(--space-lg);
}

h3 {
  font-size: var(--text-xl);
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
}

h4 {
  font-size: var(--text-lg);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
}

p {
  margin-bottom: var(--space-lg);
  line-height: 1.8;
  max-width: var(--content-width);
}

.intro {
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--color-text-light);
  margin-bottom: var(--space-2xl);
  max-width: var(--content-width);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
  border-bottom: 1px solid transparent;
}

a:hover {
  color: var(--color-primary-dark);
  border-bottom-color: var(--color-primary);
}

strong, b {
  font-weight: 600;
  color: var(--color-text);
}

/* Listes - Respirantes */
ul, ol {
  margin-bottom: var(--space-lg);
  padding-left: var(--space-xl);
  max-width: var(--content-width);
}

li {
  margin-bottom: var(--space-sm);
  line-height: 1.7;
  padding-left: var(--space-xs);
}

/* ==========================================================================
   4. LAYOUT & CONTENEURS
   ========================================================================== */

.container {
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  max-width: var(--container-lg);
}

main {
  flex: 1;
  background: var(--color-bg);
  padding: var(--space-2xl) 0;
}

article {
  background: white;
  padding: var(--space-xl) var(--space-lg);
  border-radius: var(--radius-lg);
}

/* ==========================================================================
   5. HEADER & NAVIGATION - Clair et aéré
   ========================================================================== */

.site-header {
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--color-border-light);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  max-width: var(--container-xl);
  margin: 0 auto;
}

.site-logo {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-primary-dark);
  letter-spacing: -0.02em;
}

.site-logo:hover {
  border-bottom: none;
  color: var(--color-primary);
}

/* Menu mobile burger */
.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background-color: var(--color-primary-dark);
  border-radius: 2px;
  transition: var(--transition-fast);
}

/* Navigation */
.main-nav {
  position: fixed;
  top: 0;
  left: -100%;
  width: 85%;
  max-width: 360px;
  height: 100vh;
  background: white;
  box-shadow: var(--shadow-lg);
  transition: left var(--transition-base);
  overflow-y: auto;
  z-index: 2000;
  padding: var(--space-2xl) var(--space-lg);
}

.main-nav.active {
  left: 0;
}

.nav-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: none;
  border: none;
  font-size: var(--text-3xl);
  cursor: pointer;
  color: var(--color-text-muted);
  line-height: 1;
}

.main-nav ul {
  list-style: none;
  padding: 0;
  margin: var(--space-3xl) 0 0 0;
}

.main-nav li {
  margin-bottom: var(--space-xs);
  padding: 0;
}

.main-nav a {
  display: block;
  padding: var(--space-md);
  color: var(--color-text);
  font-weight: 500;
  font-size: var(--text-lg);
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  border-bottom: none;
}

.main-nav a:hover {
  background: var(--color-bg-soft);
  color: var(--color-primary);
}

.nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1500;
  backdrop-filter: blur(4px);
}

.nav-overlay.active {
  display: block;
}

/* ==========================================================================
   6. COMPOSANTS ÉDITORIAUX - Clairs et Respirants
   ========================================================================== */

/* Bloc "À retenir" - Vert doux */
.info-box {
  background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
  border-left: 4px solid var(--color-accent);
  padding: var(--space-xl);
  margin: var(--space-2xl) 0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.info-box h3 {
  margin-top: 0;
  color: #166534;
  font-size: var(--text-lg);
  margin-bottom: var(--space-md);
}

/* Bloc conseil - Beige chaud */
.info-box--tip {
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
  border-left-color: #D97706;
}

.info-box--tip h3 {
  color: #92400E;
}

/* Bloc warning - Orange doux */
.info-box--warning {
  background: linear-gradient(135deg, #FFF7ED 0%, #FFEDD5 100%);
  border-left-color: #EA580C;
}

.info-box--warning h3 {
  color: #9A3412;
}

/* Table des matières - Moderne */
.table-of-contents {
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin: var(--space-2xl) 0 var(--space-3xl) 0;
  box-shadow: var(--shadow-sm);
}

.table-of-contents h2 {
  font-size: var(--text-xl);
  margin: 0 0 var(--space-lg) 0;
  padding: 0;
  color: var(--color-primary-dark);
}

.table-of-contents ul {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: none;
}

.table-of-contents li {
  margin-bottom: var(--space-sm);
  padding: 0;
}

.table-of-contents a {
  display: block;
  padding: var(--space-sm) var(--space-md);
  color: var(--color-primary);
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  border-bottom: none;
  font-weight: 500;
}

.table-of-contents a:hover {
  background: white;
  color: var(--color-primary-dark);
  transform: translateX(4px);
}

.table-of-contents a.active {
  background: white;
  color: var(--color-primary-dark);
  font-weight: 600;
}

/* FAQ Section - Claire */
.faq-section {
  margin: var(--space-3xl) 0;
  background: var(--color-bg-cream);
  padding: var(--space-2xl);
  border-radius: var(--radius-lg);
}

.faq-section h2 {
  margin-top: 0;
  padding-top: 0;
}

.faq-item {
  background: white;
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
}

.faq-item:hover {
  box-shadow: var(--shadow-md);
}

.faq-item:last-child {
  margin-bottom: 0;
}

.faq-question {
  font-weight: 600;
  font-size: var(--text-lg);
  color: var(--color-primary-dark);
  margin-bottom: var(--space-md);
  line-height: 1.4;
}

.faq-answer {
  color: var(--color-text-light);
  line-height: 1.7;
}

/* CTA Box - Moderne et doux */
.cta-box {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: white;
  padding: var(--space-2xl);
  border-radius: var(--radius-xl);
  text-align: center;
  margin: var(--space-3xl) 0;
  box-shadow: var(--shadow-lg);
}

.cta-box h3 {
  color: white;
  margin-bottom: var(--space-md);
  font-size: var(--text-2xl);
}

.cta-box p {
  opacity: 0.95;
  margin-bottom: var(--space-xl);
  font-size: var(--text-lg);
  max-width: none;
}

.cta-button {
  display: inline-block;
  background: white;
  color: var(--color-primary-dark);
  padding: var(--space-md) var(--space-2xl);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--text-lg);
  transition: var(--transition-base);
  box-shadow: var(--shadow-md);
  border-bottom: none;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: var(--color-bg-cream);
}

/* Cartes de contenu - Élégantes */
.content-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
  transition: var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.content-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-light);
  transform: translateY(-2px);
}

.content-card h3 {
  margin-top: 0;
  font-size: var(--text-xl);
  color: var(--color-primary-dark);
}

.content-card h3 a {
  color: var(--color-primary-dark);
  border-bottom: none;
}

.content-card h3 a:hover {
  color: var(--color-primary);
}

/* ==========================================================================
   7. GRILLE DE CONTENU
   ========================================================================== */

.content-grid {
  display: grid;
  gap: var(--space-xl);
  margin: var(--space-2xl) 0;
}

/* ==========================================================================
   8. FOOTER - Clair mais structuré
   ========================================================================== */

.site-footer {
  background: var(--color-bg-soft);
  color: var(--color-text);
  padding: var(--space-3xl) 0 var(--space-xl);
  margin-top: var(--space-3xl);
  border-top: 1px solid var(--color-border);
}

.footer-content {
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.footer-grid {
  display: grid;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer-section h4 {
  color: var(--color-primary-dark);
  font-size: var(--text-lg);
  margin-bottom: var(--space-md);
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section li {
  margin-bottom: var(--space-sm);
  padding: 0;
}

.footer-section a {
  color: var(--color-text-light);
  transition: var(--transition-fast);
  border-bottom: none;
}

.footer-section a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ==========================================================================
   9. IMAGES - Intégration Premium
   ========================================================================== */

img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

figure {
  margin: var(--space-2xl) 0;
}

figcaption {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: center;
  margin-top: var(--space-sm);
  font-style: italic;
}

/* Hero Image */
.hero-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--radius-xl);
  margin: var(--space-2xl) 0 var(--space-3xl) 0;
  box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   10. UTILITAIRES
   ========================================================================== */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

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

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ==========================================================================
   11. MEDIA QUERIES - PROGRESSIVE ENHANCEMENT
   ========================================================================== */

/* Tablettes (768px+) */
@media (min-width: 768px) {
  :root {
    --text-3xl: 2.75rem;   /* 44px */
    --text-4xl: 3.5rem;    /* 56px */
  }

  .container {
    padding: 0 var(--space-2xl);
  }

  article {
    padding: var(--space-2xl) var(--space-3xl);
  }

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

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

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

  /* Navigation desktop */
  .menu-toggle {
    display: none;
  }

  .main-nav {
    position: static;
    width: auto;
    max-width: none;
    height: auto;
    background: none;
    box-shadow: none;
    padding: 0;
    overflow: visible;
  }

  .nav-close {
    display: none;
  }

  .main-nav ul {
    display: flex;
    gap: var(--space-sm);
    margin: 0;
  }

  .main-nav li {
    margin: 0;
  }

  .main-nav a {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-base);
  }

  .hero-image {
    height: 500px;
  }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
  .content-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .hero-image {
    height: 600px;
  }
}

/* Large desktop (1280px+) */
@media (min-width: 1280px) {
  .container {
    max-width: var(--container-xl);
  }
}

/* ==========================================================================
   12. ACCESSIBILITÉ & PRÉFÉRENCES
   ========================================================================== */

@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;
  }
}

:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   13. PRINT STYLES
   ========================================================================== */

@media print {
  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }

  .site-header,
  .site-footer,
  .nav-overlay,
  .cta-box,
  .menu-toggle {
    display: none;
  }

  a {
    text-decoration: underline;
    color: #000;
  }

  img {
    max-width: 100%;
    page-break-inside: avoid;
  }
}
