/* ============================================
   CABINET LEMAIRE — Global Styles
   ============================================ */

/* --- CSS Variables --- */
:root {
  /* Colors */
  --primary: #1B3A5C;
  --primary-light: #2a5280;
  --primary-dark: #122840;
  --secondary: #7A9E7E;
  --secondary-light: #96b89a;
  --accent: #C8A96E;
  --accent-light: #d4bc8e;
  --accent-dark: #b8954e;
  --bg-main: #FAFAF7;
  --bg-alt: #F0EDE8;
  --text-primary: #2D2D2D;
  --text-secondary: #6B6B6B;
  --white: #FFFFFF;
  --black: #000000;

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --section-padding: 80px;
  --container-width: 1200px;
  --gap: 24px;

  /* Borders & Shadows */
  --radius-card: 12px;
  --radius-btn: 8px;
  --shadow-sm: 0 2px 8px rgba(27, 58, 92, 0.06);
  --shadow-md: 0 4px 20px rgba(27, 58, 92, 0.1);
  --shadow-lg: 0 8px 40px rgba(27, 58, 92, 0.12);

  /* Transitions */
  --transition: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-main);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Typography --- */
h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary);
}

h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 600;
  line-height: 1.3;
  color: var(--primary);
}

h1 { font-size: 3.5rem; margin-bottom: 1rem; }
h2 { font-size: 2.5rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.75rem; margin-bottom: 0.5rem; }
h4 { font-size: 1.25rem; margin-bottom: 0.5rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

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

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

ul, ol {
  list-style: none;
}

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

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

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

.section--alt {
  background-color: var(--bg-alt);
}

.section__header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
}

.section__header p {
  font-size: 1.1rem;
  margin-top: 16px;
}

.section__subtitle {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--secondary);
  margin-bottom: 12px;
}

/* --- Grid --- */
.grid {
  display: grid;
  gap: var(--gap);
}

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

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border: 2px solid transparent;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.btn--primary {
  background-color: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.btn--primary:hover {
  background-color: var(--accent-dark);
  border-color: var(--accent-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--secondary {
  background-color: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.btn--secondary:hover {
  background-color: var(--primary-light);
  border-color: var(--primary-light);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

.btn--outline:hover {
  background-color: var(--white);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn--outline-dark {
  background-color: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn--outline-dark:hover {
  background-color: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

.btn--small {
  padding: 10px 24px;
  font-size: 0.875rem;
}

.btn svg {
  width: 18px;
  height: 18px;
}

/* --- Cards --- */
.card {
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.card__body {
  padding: 32px;
}

.card__icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-card);
  margin-bottom: 20px;
  color: var(--white);
}

.card__icon svg {
  width: 28px;
  height: 28px;
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(27, 58, 92, 0.85) 0%, rgba(27, 58, 92, 0.6) 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 0 24px;
}

.hero__content h1 {
  color: var(--white);
  margin-bottom: 20px;
}

.hero__content p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  margin-bottom: 32px;
}

.hero__buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  padding: 10px 24px;
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Hero compact (pages intérieures) */
.hero--compact {
  min-height: 320px;
  padding-top: 100px;
}

.hero--compact .hero__content h1 {
  font-size: 2.8rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.7);
}

.breadcrumb a:hover {
  color: var(--white);
}

.breadcrumb span {
  color: var(--accent);
}

.breadcrumb .separator {
  color: rgba(255, 255, 255, 0.4);
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* --- Badge/Tag --- */
.tag {
  display: inline-block;
  padding: 4px 14px;
  background: var(--bg-alt);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 50px;
  margin: 3px;
}

.tag--primary {
  background: rgba(27, 58, 92, 0.1);
  color: var(--primary);
}

.tag--secondary {
  background: rgba(122, 158, 126, 0.15);
  color: var(--secondary);
}

/* --- Preloader --- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg-main);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.loaded {
  opacity: 0;
  visibility: hidden;
}

.preloader__spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--bg-alt);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Selection --- */
::selection {
  background: var(--primary);
  color: var(--white);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-alt);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}
