/* ============================================
   MAISON DU PEPS — Design System & Main Styles
   v2.0 — Major Design Overhaul
   ============================================ */

/* --- CSS 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: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg-pure);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol {
  list-style: none;
}

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

/* --- CSS Variables (Design Tokens) --- */
:root {
  /* Colors */
  --color-primary: #D13D21;
  --color-primary-dark: #B8341C;
  --color-primary-light: #E8654D;
  --color-bg: #F0F0E6;
  --color-bg-pure: #FFFFFF;
  --color-text: #1A1A1A;
  --color-text-light: #555555;
  --color-text-on-primary: #FFFFFF;
  --color-success: #2D8A4E;
  --color-border: #D4D4C8;
  --color-shadow: rgba(0, 0, 0, 0.08);
  --color-overlay: rgba(26, 26, 26, 0.6);

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans Pro', 'Segoe UI', sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3rem;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --space-4xl: 8rem;

  /* Layout */
  --max-width: 1200px;
  --header-height: 80px;

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

  /* Shadows */
  --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 8px 30px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 16px 50px rgba(0, 0, 0, 0.15);

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;
  --radius-full: 50%;
}

/* --- Keyframe Animations --- */
@keyframes heroGradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(209, 61, 33, 0.2); }
  50%      { box-shadow: 0 0 20px rgba(209, 61, 33, 0.4); }
}

@keyframes floatParticle {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.3; }
  50%      { transform: translateY(-20px) rotate(180deg); opacity: 0.6; }
}

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

h1 {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-lg);
}

h2 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-md);
}

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

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

p {
  margin-bottom: var(--space-sm);
  color: var(--color-text-light);
  line-height: 1.7;
}

.text-accent {
  color: var(--color-primary);
  font-style: italic;
}

h2 {
  position: relative;
}

.text-center h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
  margin: var(--space-sm) auto 0;
  border-radius: 2px;
}

.section-subtitle {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 300;
  color: var(--color-text-light);
  max-width: 700px;
  margin: var(--space-sm) auto var(--space-2xl);
  text-align: center;
}

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

.section {
  padding: var(--space-3xl) 0;
  position: relative;
}

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

/* Section wave separator via CSS ::before on .section-bg */
.section-bg::before {
  content: '';
  position: absolute;
  top: -40px;
  left: 0;
  right: 0;
  height: 40px;
  background: var(--color-bg);
  clip-path: ellipse(55% 100% at 50% 100%);
  z-index: 1;
}

.section-bg::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: 0;
  right: 0;
  height: 40px;
  background: var(--color-bg);
  clip-path: ellipse(55% 100% at 50% 0%);
  z-index: 1;
}

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

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

/* --- Header & Navigation --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--transition-base);
}

.header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  z-index: 1001;
}

.logo img {
  height: 45px;
  width: auto;
}

.logo span {
  color: var(--color-primary);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav-link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  padding: var(--space-xs) 0;
  position: relative;
  transition: color var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Dropdown */
.nav-item {
  position: relative;
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background: var(--color-bg-pure);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--space-xs) 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-base);
  z-index: 1002;
}

.nav-item:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown a {
  display: block;
  padding: var(--space-xs) var(--space-md);
  font-size: var(--text-sm);
  color: var(--color-text);
  transition: all var(--transition-fast);
}

.nav-dropdown a:hover {
  background: var(--color-bg);
  color: var(--color-primary);
  padding-left: var(--space-lg);
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.lang-btn {
  padding: 6px 12px;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-text-light);
  transition: all var(--transition-fast);
  letter-spacing: 0.5px;
}

.lang-btn.active {
  background: var(--color-primary);
  color: var(--color-text-on-primary);
}

.lang-btn:hover:not(.active) {
  background: var(--color-bg);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: all var(--transition-base);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero Section — Premium Animated Background --- */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: var(--header-height);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    #1a1a1a 0%, #2d1f1a 15%, #1a2a1f 30%,
    #1a1a2d 50%, #2d1a1a 70%, #1a2520 85%, #1a1a1a 100%);
  background-size: 300% 300%;
  animation: heroGradientShift 15s ease infinite;
}

/* Geometric decorative pattern (sport/health theme) */
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    /* Diagonal lines */
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 80px,
      rgba(209, 61, 33, 0.03) 80px,
      rgba(209, 61, 33, 0.03) 81px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 120px,
      rgba(255, 255, 255, 0.02) 120px,
      rgba(255, 255, 255, 0.02) 121px
    ),
    /* Soft light orbs */
    radial-gradient(ellipse at 20% 50%, rgba(209, 61, 33, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(209, 61, 33, 0.12) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 80%, rgba(255, 255, 255, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(232, 101, 77, 0.08) 0%, transparent 35%);
  z-index: 1;
}

/* Particle / Light effect overlay */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 25%, rgba(209, 61, 33, 0.12) 0%, transparent 20%),
    radial-gradient(circle at 85% 75%, rgba(232, 101, 77, 0.08) 0%, transparent 25%),
    radial-gradient(circle at 50% 10%, rgba(255, 255, 255, 0.05) 0%, transparent 30%),
    linear-gradient(to bottom, rgba(26, 26, 26, 0.2) 0%, rgba(26, 26, 26, 0.5) 100%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  color: var(--color-bg-pure);
  padding: var(--space-2xl) var(--space-md);
  max-width: 850px;
}

.hero h1 {
  color: var(--color-bg-pure);
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: var(--space-md);
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.4);
  letter-spacing: -0.5px;
}

.hero p {
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 2vw, 1.25rem);
  margin-bottom: var(--space-xl);
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--color-primary-light);
  margin-bottom: var(--space-md);
  font-weight: 600;
  display: inline-block;
  padding: 8px 24px;
  border: 1px solid rgba(232, 101, 77, 0.4);
  border-radius: var(--radius-sm);
  background: rgba(209, 61, 33, 0.15);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Hero button glow effect */
.hero .btn-primary {
  box-shadow: 0 4px 20px rgba(209, 61, 33, 0.4), 0 0 40px rgba(209, 61, 33, 0.15);
}

.hero .btn-primary:hover {
  box-shadow: 0 8px 30px rgba(209, 61, 33, 0.5), 0 0 60px rgba(209, 61, 33, 0.25);
}

.hero .btn-secondary {
  border-color: rgba(255, 255, 255, 0.6);
  color: rgba(255, 255, 255, 0.95);
}

.hero .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.95);
  color: var(--color-primary);
  border-color: rgba(255, 255, 255, 0.95);
}

/* --- Buttons — Premium Effects --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  text-transform: uppercase;
  letter-spacing: 1px;
  min-height: 44px;
  min-width: 44px;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: var(--color-text-on-primary);
  box-shadow: 0 4px 15px rgba(209, 61, 33, 0.3);
}

/* Shimmer effect on btn-primary */
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    105deg,
    transparent 20%,
    rgba(255, 255, 255, 0.15) 40%,
    rgba(255, 255, 255, 0.25) 50%,
    rgba(255, 255, 255, 0.15) 60%,
    transparent 80%
  );
  background-size: 200% 100%;
  animation: shimmer 3s ease-in-out infinite;
  pointer-events: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(209, 61, 33, 0.45);
}

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(209, 61, 33, 0.25);
}

.btn-white {
  background: var(--color-bg-pure);
  color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-call {
  background: var(--color-success);
  color: var(--color-text-on-primary);
}

.btn-call:hover {
  background: #24724a;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45, 138, 78, 0.3);
}

.btn-doctolib {
  background: #0596DE;
  color: var(--color-text-on-primary);
}

.btn-doctolib:hover {
  background: #0480c0;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(5, 150, 222, 0.3);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
}

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

/* --- Cards — Rich Visual Fallbacks --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.card {
  background: var(--color-bg-pure);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  border: 1px solid var(--color-border);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  border-color: rgba(209, 61, 33, 0.2);
}

.card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: linear-gradient(135deg, #e8e4dc 0%, #d4d0c8 50%, #c8c4bc 100%);
  position: relative;
  display: flex;
  align-items: flex-start;
  padding: var(--space-sm);
  overflow: hidden;
}

/* Default card-img decorative pattern */
.card-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(209, 61, 33, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(209, 61, 33, 0.04) 0%, transparent 40%),
    linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.15) 50%, transparent 60%);
}

/* Large decorative SVG icon (::after) — default gym dumbbell */
.card-img::after {
  content: '';
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 80px;
  height: 80px;
  opacity: 0.12;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  /* Default: dumbbell icon */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='%23D13D21'%3E%3Crect x='4' y='22' width='8' height='20' rx='2'/%3E%3Crect x='52' y='22' width='8' height='20' rx='2'/%3E%3Crect x='12' y='18' width='6' height='28' rx='2'/%3E%3Crect x='46' y='18' width='6' height='28' rx='2'/%3E%3Crect x='18' y='28' width='28' height='8' rx='2'/%3E%3C/svg%3E");
}

/* --- Card Type-Specific Visuals --- */

/* Salle de Sport — Blue-Red gradient + dumbbell */
.card-img--gym {
  background: linear-gradient(135deg, #2c3e7a 0%, #6b2fa0 40%, #c0392b 100%);
}
.card-img--gym::before {
  background:
    radial-gradient(circle at 25% 35%, rgba(255, 255, 255, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 75% 65%, rgba(255, 255, 255, 0.06) 0%, transparent 35%),
    linear-gradient(135deg, transparent 30%, rgba(255, 255, 255, 0.08) 50%, transparent 70%);
}

/* Balnéothérapie — Blue-Turquoise gradient + wave */
.card-img--balneo {
  background: linear-gradient(135deg, #1a6b8a 0%, #20a4b6 50%, #48d1cc 100%);
}
.card-img--balneo::before {
  background:
    radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.06) 0%, transparent 35%),
    linear-gradient(135deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
}
.card-img--balneo::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='%23FFFFFF'%3E%3Cpath d='M4 36c4-4 8-4 12 0s8 4 12 0 8-4 12 0 8 4 12 0 8-4 12 0' stroke='%23FFFFFF' stroke-width='3' fill='none' stroke-linecap='round'/%3E%3Cpath d='M4 44c4-4 8-4 12 0s8 4 12 0 8-4 12 0 8 4 12 0 8-4 12 0' stroke='%23FFFFFF' stroke-width='2' fill='none' stroke-linecap='round' opacity='0.6'/%3E%3Cpath d='M4 28c4-4 8-4 12 0s8 4 12 0 8-4 12 0 8 4 12 0 8-4 12 0' stroke='%23FFFFFF' stroke-width='2' fill='none' stroke-linecap='round' opacity='0.4'/%3E%3C/svg%3E");
  opacity: 0.2;
}

/* Kiné Sport — Orange-Red gradient + running */
.card-img--sport {
  background: linear-gradient(135deg, #e67e22 0%, #e74c3c 60%, #c0392b 100%);
}
.card-img--sport::before {
  background:
    radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.06) 0%, transparent 35%),
    linear-gradient(135deg, transparent 30%, rgba(255, 255, 255, 0.08) 50%, transparent 70%);
}
.card-img--sport::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='%23FFFFFF'%3E%3Ccircle cx='36' cy='10' r='5'/%3E%3Cpath d='M24 22l6-4 8 6 8-2M20 38l8-12 6 4 6-6M18 52l6-12M32 30l4 14 8 6' stroke='%23FFFFFF' stroke-width='3' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  opacity: 0.18;
}

/* Kiné Générale — Green-Teal gradient + medical cross */
.card-img--kine {
  background: linear-gradient(135deg, #1a8a6b 0%, #2d8a4e 50%, #48b983 100%);
}
.card-img--kine::before {
  background:
    radial-gradient(circle at 25% 45%, rgba(255, 255, 255, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 75% 55%, rgba(255, 255, 255, 0.06) 0%, transparent 35%),
    linear-gradient(135deg, transparent 30%, rgba(255, 255, 255, 0.08) 50%, transparent 70%);
}
.card-img--kine::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='%23FFFFFF'%3E%3Crect x='24' y='8' width='16' height='48' rx='4'/%3E%3Crect x='8' y='24' width='48' height='16' rx='4'/%3E%3C/svg%3E");
  opacity: 0.15;
}

.card-body {
  padding: var(--space-lg);
}

.card-tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-primary);
  padding: 5px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-sm);
  position: relative;
  z-index: 1;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(209, 61, 33, 0.15);
}

/* White tag variant for colored card backgrounds */
.card-img--balneo .card-tag,
.card-img--sport .card-tag,
.card-img--kine .card-tag,
.card-img--gym .card-tag {
  background: rgba(255, 255, 255, 0.92);
}

.card h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-xs);
}

.card p {
  font-size: var(--text-sm);
  margin-bottom: var(--space-md);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border);
}

.card-address {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
  font-size: var(--text-sm);
  color: var(--color-text-light);
}

.card-address svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  fill: var(--color-primary);
}

/* --- Service Cards --- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-lg);
}

.service-card {
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
  border-radius: var(--radius-lg);
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  background: var(--color-bg-pure);
  border: 1px solid var(--color-border);
}

.service-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  transform: translateY(-6px);
  border-color: rgba(209, 61, 33, 0.2);
}

.service-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(209, 61, 33, 0.08) 0%, rgba(209, 61, 33, 0.15) 100%);
  border-radius: var(--radius-full);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.service-card:hover .service-icon {
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(209, 61, 33, 0.15);
}

.service-icon svg {
  width: 28px;
  height: 28px;
  fill: var(--color-primary);
}

.service-card h3 {
  font-size: var(--text-lg);
  font-family: var(--font-body);
  font-weight: 600;
}

/* --- Feature Section — "Pourquoi Maison du Peps" --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-xl);
  counter-reset: feature;
}

.feature-item {
  position: relative;
  padding: var(--space-lg);
  padding-left: calc(var(--space-2xl) + var(--space-lg));
  border-radius: var(--radius-lg);
  background: var(--color-bg-pure);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.feature-item:hover {
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.08);
  border-color: rgba(209, 61, 33, 0.2);
  border-left-color: var(--color-primary-light);
  transform: translateY(-4px);
}

.feature-item::before {
  counter-increment: feature;
  content: counter(feature, decimal-leading-zero);
  position: absolute;
  left: var(--space-lg);
  top: var(--space-lg);
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: 700;
  color: rgba(209, 61, 33, 0.15);
  line-height: 1;
}

.feature-item h3 {
  font-size: var(--text-lg);
  font-family: var(--font-body);
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

/* --- Contact Section — Grid 2x2 Info Cards --- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.contact-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--color-bg-pure);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.contact-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  border-color: rgba(209, 61, 33, 0.15);
  transform: translateY(-3px);
}

.contact-card-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(209, 61, 33, 0.1) 0%, rgba(209, 61, 33, 0.2) 100%);
  border-radius: var(--radius-md);
}

.contact-card-icon svg {
  width: 24px;
  height: 24px;
  fill: var(--color-primary);
}

.contact-card h4 {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--color-text);
}

.contact-card p,
.contact-card address,
.contact-card a {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  font-style: normal;
  margin-bottom: 0;
  line-height: 1.6;
}

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

/* --- Establishment Info Block --- */
.info-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

.info-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  transition: background-color var(--transition-fast);
}

.info-item:hover {
  background: rgba(209, 61, 33, 0.03);
}

.info-item svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  fill: var(--color-primary);
  margin-top: 2px;
}

.info-item h4 {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: 4px;
}

.info-item p {
  font-size: var(--text-sm);
  margin-bottom: 0;
}

/* Hours Table */
.hours-table {
  width: 100%;
  border-collapse: collapse;
}

.hours-table tr {
  border-bottom: 1px solid var(--color-border);
}

.hours-table td {
  padding: 8px 0;
  font-size: var(--text-sm);
}

.hours-table td:first-child {
  font-weight: 600;
  color: var(--color-text);
}

.hours-table td:last-child {
  text-align: right;
  color: var(--color-text-light);
}

/* Google Maps */
.map-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

.map-container iframe {
  width: 100%;
  height: 350px;
  border: 0;
}

/* --- FAQ Accordion --- */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
  transition: background-color var(--transition-fast);
}

.faq-item.active {
  background: rgba(209, 61, 33, 0.02);
  margin: 0 calc(-1 * var(--space-md));
  padding: 0 var(--space-md);
  border-radius: var(--radius-md);
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: var(--space-md) 0;
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
  transition: color var(--transition-fast);
}

.faq-question:hover {
  color: var(--color-primary);
}

.faq-question svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform var(--transition-base);
  fill: var(--color-primary);
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow);
}

.faq-answer-inner {
  padding: 0 0 var(--space-md);
  color: var(--color-text-light);
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

/* --- Footer — Premium Finish --- */
.footer {
  background: linear-gradient(135deg, #1a1a1a 0%, #252525 50%, #1a1a1a 100%);
  color: rgba(255, 255, 255, 0.8);
  padding: var(--space-3xl) 0 var(--space-lg);
  position: relative;
}

/* SVG wave separator at footer top */
.footer::before {
  content: '';
  position: absolute;
  top: -30px;
  left: 0;
  right: 0;
  height: 30px;
  background: linear-gradient(135deg, #1a1a1a 0%, #252525 50%, #1a1a1a 100%);
  clip-path: ellipse(55% 100% at 50% 100%);
}

/* Gradient accent line */
.footer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-primary), var(--color-primary-light), var(--color-primary), transparent);
  border-radius: 2px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer h4 {
  color: var(--color-bg-pure);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-md);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer a {
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition-fast), padding-left var(--transition-fast);
  font-size: var(--text-sm);
}

.footer a:hover {
  color: var(--color-primary-light);
  padding-left: 4px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
  font-size: var(--text-sm);
}

.footer-contact-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: var(--color-primary-light);
  margin-top: 3px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.5);
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  color: var(--color-bg-pure);
  margin-bottom: var(--space-sm);
  display: block;
}

.footer-logo span {
  color: var(--color-primary-light);
}

/* --- Sticky Mobile CTA --- */
.sticky-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  background: var(--color-bg-pure);
  border-top: 1px solid var(--color-border);
  padding: var(--space-xs) var(--space-sm);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
}

.sticky-cta .btn-group {
  display: flex;
  gap: var(--space-xs);
}

.sticky-cta .btn {
  flex: 1;
  padding: 12px;
  font-size: var(--text-sm);
}

/* --- Breadcrumb --- */
.breadcrumb {
  padding: var(--space-sm) 0;
  margin-top: var(--header-height);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-sm);
  color: var(--color-text-light);
  flex-wrap: wrap;
}

.breadcrumb-list a {
  color: var(--color-primary);
  transition: color var(--transition-fast);
}

.breadcrumb-list a:hover {
  color: var(--color-primary-dark);
}

.breadcrumb-separator {
  color: var(--color-border);
}

/* --- Page Hero (smaller, for sub-pages) --- */
.page-hero {
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: center;
  margin-top: var(--header-height);
  overflow: hidden;
}

.page-hero .hero-bg {
  background: linear-gradient(135deg, #1a1a1a 0%, #2a1a1a 30%, #1a2520 60%, #1a1a2d 100%);
  background-size: 200% 200%;
  animation: heroGradientShift 20s ease infinite;
}

.page-hero .hero-bg::after {
  background: linear-gradient(
    135deg,
    rgba(26, 26, 26, 0.5) 0%,
    rgba(26, 26, 26, 0.3) 100%
  );
}

.page-hero .hero-content {
  text-align: left;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-md);
}

.page-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
}

/* --- Scroll Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.slide-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.slide-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Staggered animation delay for grid children */
.pillars-grid .pillar.fade-in:nth-child(2) { transition-delay: 0.1s; }
.pillars-grid .pillar.fade-in:nth-child(3) { transition-delay: 0.2s; }
.pillars-grid .pillar.fade-in:nth-child(4) { transition-delay: 0.3s; }
.card-grid .card:nth-child(2) { transition-delay: 0.1s; }
.card-grid .card:nth-child(3) { transition-delay: 0.15s; }
.card-grid .card:nth-child(4) { transition-delay: 0.2s; }
.card-grid .card:nth-child(5) { transition-delay: 0.25s; }
.service-grid .service-card.fade-in:nth-child(2) { transition-delay: 0.08s; }
.service-grid .service-card.fade-in:nth-child(3) { transition-delay: 0.16s; }
.service-grid .service-card.fade-in:nth-child(4) { transition-delay: 0.24s; }
.service-grid .service-card.fade-in:nth-child(5) { transition-delay: 0.32s; }
.service-grid .service-card.fade-in:nth-child(6) { transition-delay: 0.4s; }
.features-grid .feature-item:nth-child(2) { transition-delay: 0.1s; }
.features-grid .feature-item:nth-child(3) { transition-delay: 0.2s; }
.features-grid .feature-item:nth-child(4) { transition-delay: 0.3s; }
.contact-grid .contact-card:nth-child(2) { transition-delay: 0.08s; }
.contact-grid .contact-card:nth-child(3) { transition-delay: 0.16s; }
.contact-grid .contact-card:nth-child(4) { transition-delay: 0.24s; }

/* Noscript / reduced-motion fallback */
@media (prefers-reduced-motion: reduce) {
  .fade-in, .slide-left, .slide-right {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-bg {
    animation: none;
  }
  .btn-primary::after {
    animation: none;
  }
}

/* --- Equipment / Tech Section --- */
.tech-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

.tech-grid.reverse {
  direction: rtl;
}

.tech-grid.reverse > * {
  direction: ltr;
}

.tech-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, #e8e4dc 0%, #d4d0c8 50%, #c8c4bc 100%);
  position: relative;
}

.tech-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(209, 61, 33, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(209, 61, 33, 0.04) 0%, transparent 40%),
    linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.2) 50%, transparent 60%);
  z-index: 1;
  pointer-events: none;
}

.tech-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  position: relative;
  z-index: 2;
}

/* --- PMR / Accessibility Badge --- */
.pmr-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 8px 16px;
  background: rgba(45, 138, 78, 0.1);
  color: var(--color-success);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 600;
}

.pmr-badge svg {
  width: 18px;
  height: 18px;
  fill: var(--color-success);
}

/* --- Team Section --- */
.team-stat {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background: var(--color-bg);
  border-radius: var(--radius-lg);
}

.team-number {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}

/* --- Pillar / Why Section — Enhanced --- */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

.pillar {
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  border-radius: var(--radius-lg);
  background: var(--color-bg-pure);
  box-shadow: var(--shadow-sm);
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  border: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}

/* Always-visible top border */
.pillar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
  opacity: 1;
  transition: height var(--transition-base);
}

.pillar:hover {
  box-shadow: 0 8px 35px rgba(209, 61, 33, 0.15);
  transform: translateY(-6px);
  border-color: rgba(209, 61, 33, 0.25);
}

.pillar:hover::before {
  height: 4px;
}

.pillar-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(209, 61, 33, 0.1) 0%, rgba(209, 61, 33, 0.2) 100%);
  border-radius: var(--radius-full);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.pillar:hover .pillar-icon {
  transform: scale(1.1);
  box-shadow: 0 4px 25px rgba(209, 61, 33, 0.25);
}

.pillar-icon svg {
  width: 36px;
  height: 36px;
  fill: var(--color-primary);
}

.pillar h3 {
  font-size: var(--text-base);
  font-family: var(--font-body);
  font-weight: 600;
}

/* --- Utility Classes --- */
.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;
}

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

.mt-header { margin-top: var(--header-height); }
