:root {
  --color-gold: #c9a961;
  --color-dark: #0d0d0d;
  --color-darker: #1a1a1a;
  --color-grey-dark: #2a2a2a;
  --color-grey-medium: #666666;
  --color-grey-light: #cccccc;
  --color-light: #f5f5f5;
  --color-white: #ffffff;

  --font-serif: 'Cormorant Garamond', serif;
  --font-sans: 'Montserrat', sans-serif;

  --transition-smooth: all 0.3s ease;
  --transition-medium: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-contact: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);

  --shadow-light: 0 5px 15px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 10px 30px rgba(0, 0, 0, 0.15);
  --shadow-strong: 0 20px 60px rgba(0, 0, 0, 0.3);
  --glow-gold: 0 0 30px rgba(201, 169, 97, 0.3);

  /* New: Consistent spacing variables for responsive margins/paddings */
  --spacing-section-py: clamp(4rem, 10vw, 8rem);
  /* Padding top/bottom for sections */
  --spacing-section-px: 5%;
  /* Horizontal padding for sections */
  --max-width-content: 1200px;
  /* Max width for main content */
  --max-width-header: 1400px;
  /* Max width for header/footer */
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  /* Base size. Fluid type later can adjust this */
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--color-darker);
  background: var(--color-white);
  overflow-x: hidden;
  /* Prevent horizontal scroll */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Universal media responsiveness */
img,
svg,
video,
canvas,
iframe,
embed,
object {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Preloader */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--color-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.logo-letters {
  display: flex;
  gap: 1rem;
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 8vw, 4rem);
  /* Fluid font size */
  font-weight: 300;
  color: var(--color-gold);
  letter-spacing: clamp(0.25rem, 1vw, 0.5rem);
  /* Fluid letter spacing */
}

.logo-letters span {
  animation: pulse 2s ease-in-out infinite;
  display: inline-block;
}

.logo-letters span:nth-child(1) {
  animation-delay: 0s;
}

.logo-letters span:nth-child(2) {
  animation-delay: 0.2s;
}

.logo-letters span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.6;
    transform: scale(0.95);
  }
}

/* Scroll Progress Bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--color-gold);
  z-index: 9999;
  transition: width 0.1s ease;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 0;
  z-index: 1000;
  transition: var(--transition-smooth);
}

.header.scrolled {
  background: rgba(13, 13, 13, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
  padding: 1rem 0;
}

.header-container {
  max-width: var(--max-width-header);
  margin: 0 auto;
  padding: 0 var(--spacing-section-px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  /* Added gap */
  flex-wrap: wrap;
  /* Allow wrapping on smaller screens */
}

.logo {
  flex-shrink: 0;
  /* Prevent logo from shrinking */
}

.logo h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  /* Fluid font size */
  font-weight: 400;
  color: var(--color-white);
  letter-spacing: 3px;
  margin: 0;
}

.logo-subtitle {
  font-family: var(--font-sans);
  font-size: clamp(0.6rem, 2vw, 0.75rem);
  /* Fluid font size */
  color: var(--color-gold);
  letter-spacing: 2px;
  margin-top: 0.25rem;
  font-weight: 300;
  text-transform: uppercase;
}

.nav-desktop {
  display: flex;
  gap: 2.5rem;
}

.nav-link {
  font-family: var(--font-sans);
  font-size: clamp(0.75rem, 1.5vw, 0.875rem);
  /* Fluid font size */
  font-weight: 500;
  color: var(--color-white);
  text-decoration: none;
  letter-spacing: 2px;
  text-transform: uppercase;
  position: relative;
  transition: color var(--transition-smooth);
  white-space: nowrap;
  /* Prevent links from breaking */
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-gold);
  transition: width var(--transition-smooth);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-gold);
}

/* Burger Menu */
.burger-menu {
  display: none;
  /* Hidden by default for desktop */
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
  /* Above header content */
}

.burger-menu span {
  width: 28px;
  height: 1px;
  background: var(--color-white);
  transition: var(--transition-smooth);
}

.burger-menu.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.burger-menu.active span:nth-child(2) {
  opacity: 0;
}

.burger-menu.active span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(13, 13, 13, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  overflow-y: auto;
  /* Allow scrolling if content overflows */
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  text-align: center;
  padding: 2rem;
  /* Added padding for better spacing */
}

.mobile-link {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 8vw, 3rem);
  /* Fluid font size */
  font-weight: 300;
  color: var(--color-white);
  text-decoration: none;
  letter-spacing: 3px;
  transition: color var(--transition-smooth);
}

.mobile-link:hover {
  color: var(--color-gold);
}

/* HERO SECTION */
.hero-section {
  position: relative;
  height: 100vh;
  /* Fallback */
  height: 100svh;
  /* Modern mobile browsers */
  min-height: 550px;
  /* Minimum height for small screens content */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--color-dark);
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
  /* Ensure image doesn't bleed */
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: grayscale(100%) brightness(0.4);
  transform: scale(1.1);
  will-change: transform;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg,
      rgba(13, 13, 13, 0.3) 0%,
      rgba(13, 13, 13, 0.7) 100%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 1000px;
  padding: 0 var(--spacing-section-px);
  width: 100%;
}

.hero-line {
  width: clamp(60px, 8vw, 80px);
  /* Fluid width */
  height: 1px;
  background: var(--color-gold);
  margin: 0 auto 3rem;
  opacity: 0;
  animation: fadeIn 1s ease 0.3s forwards;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 8vw, 6rem);
  /* Fluid typography */
  font-weight: 300;
  color: var(--color-white);
  letter-spacing: clamp(2px, 1vw, 8px);
  margin-bottom: clamp(1rem, 3vw, 2rem);
  /* Fluid margin */
  line-height: 1.1;
  opacity: 0;
  transform: translateY(30px);
}

.hero-title.animated {
  animation: fadeInUp 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.5s forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.hero-subtitle {
  font-family: var(--font-sans);
  font-size: clamp(0.875rem, 2vw, 1.5rem);
  color: var(--color-gold);
  font-weight: 300;
  letter-spacing: clamp(1px, 0.5vw, 3px);
  margin-bottom: 1rem;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(30px);
}

.hero-subtitle.animated {
  animation: fadeInUp 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.8s forwards;
}

.hero-tagline {
  font-family: var(--font-sans);
  font-size: clamp(0.75rem, 1.5vw, 1.125rem);
  color: var(--color-grey-light);
  font-weight: 300;
  margin-bottom: clamp(2rem, 4vw, 3rem);
  /* Fluid margin */
  opacity: 0;
  transform: translateY(30px);
}

.hero-tagline.animated {
  animation: fadeInUp 1.2s cubic-bezier(0.4, 0, 0.2, 1) 1.1s forwards;
}

.cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: transparent;
  color: var(--color-gold);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(0.75rem, 1.5vw, 0.875rem);
  /* Fluid font size */
  letter-spacing: 2px;
  text-decoration: none;
  text-transform: uppercase;
  border: 2px solid var(--color-gold);
  transition: var(--transition-smooth);
  opacity: 0;
  transform: translateY(30px);
}

.cta-button.animated {
  animation: fadeInUp 1.2s cubic-bezier(0.4, 0, 0.2, 1) 1.4s forwards;
}

.cta-button:hover {
  background: var(--color-gold);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--glow-gold);
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  z-index: 3;
  opacity: 0;
  animation: fadeIn 1s ease 2s forwards;
}

.scroll-indicator span {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--color-grey-light);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.scroll-arrow {
  width: 1px;
  height: 40px;
  background: var(--color-gold);
  position: relative;
  animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-arrow::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  border-right: 1px solid var(--color-gold);
  border-bottom: 1px solid var(--color-gold);
  transform: translateX(-50%) rotate(45deg);
}

@keyframes scrollBounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-10px);
  }

  60% {
    transform: translateY(-5px);
  }
}

/* SECTIONS COMMUNES */
.etude-section,
.avocat-section,
.contact-section {
  padding: var(--spacing-section-py) 0;
  /* Responsive padding */
  position: relative;
  z-index: 10;
}

.etude-section {
  background: var(--color-white);
}

/* Modifiez l'arrière-plan de la section 'avocat' pour une image plus neutre */
.avocat-section {
  background: var(--color-darker);
  color: var(--color-white);
}

.contact-section {
  background: var(--color-light);
}

.etude-background,
.avocat-background,
.contact-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* Ensure background images always fill their container */
.section-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.03;
  filter: grayscale(100%);
  position: absolute;
  /* Ensures it acts as a background */
  top: 0;
  left: 0;
}

.section-container {
  max-width: var(--max-width-content);
  margin: 0 auto;
  padding: 0 var(--spacing-section-px);
  position: relative;
  z-index: 2;
  width: 100%;
}

.section-header {
  text-align: center;
  margin-bottom: clamp(3rem, 5vw, 5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 2vw, 2rem);
  flex-wrap: wrap;
  /* Allow wrapping */
}

.decorative-line {
  width: clamp(40px, 5vw, 80px);
  height: 1px;
  background: var(--color-gold);
  opacity: 0.3;
  flex-shrink: 1;
  /* Allow line to shrink */
  min-width: 20px;
  /* Minimum width for line */
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 400;
  color: var(--color-darker);
  letter-spacing: clamp(2px, 1vw, 4px);
  margin: 0;
  text-align: center;
  flex-shrink: 0;
  /* Prevent title from shrinking */
  white-space: normal;
  /* Allow title to wrap */
}

.avocat-section .section-title,
.section-title.gold {
  color: var(--color-gold);
}

.section-subtitle {
  font-family: var(--font-sans);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  color: var(--color-gold);
  font-weight: 300;
  letter-spacing: 2px;
  text-align: center;
  margin-bottom: 4rem;
  text-transform: uppercase;
}

.intro-text {
  max-width: 800px;
  margin: 0 auto clamp(3rem, 5vw, 5rem);
  text-align: center;
  font-family: var(--font-sans);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.8;
  color: var(--color-grey-medium);
  font-weight: 300;
}

/* EXPERTISE GRID */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1.5rem, 2.5vw, 2.5rem);
  margin-bottom: 5rem;
}

.expertise-card {
  background: var(--color-white);
  padding: clamp(2rem, 3vw, 3rem) clamp(1.5rem, 2vw, 2rem);
  text-align: center;
  transition: var(--transition-medium);
  box-shadow: var(--shadow-light);
  border: 1px solid rgba(201, 169, 97, 0.1);
  cursor: pointer;
  height: 100%;
  /* Ensure cards with varying content heights align */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  /* Space out content vertically */
}

.expertise-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-medium);
  border-color: var(--color-gold);
}

.card-icon {
  margin-bottom: 2rem;
  line-height: 1;
  /* Fixes potential SVG extra space */
}

.card-icon svg {
  width: 60px;
  height: 60px;
  color: var(--color-gold);
  transition: transform var(--transition-smooth);
  display: inline-block;
  /* Ensure it's centered easily */
}

.expertise-card:hover .card-icon svg {
  transform: scale(1.1);
}

.expertise-card h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 600;
  color: var(--color-darker);
  margin-bottom: 1rem;
  line-height: 1.4;
}

.expertise-card p {
  font-family: var(--font-sans);
  font-size: clamp(0.875rem, 1vw, 0.9375rem);
  font-weight: 300;
  color: var(--color-grey-medium);
  line-height: 1.7;
}

/* QUOTE */
.quote-section {
  max-width: 800px;
  margin: 0 auto;
  padding: clamp(3rem, 5vw, 4rem) 0;
  text-align: center;
}

.quote-line {
  width: 60px;
  height: 1px;
  background: var(--color-gold);
  margin: 0 auto 2rem;
  opacity: 0.7;
  /* Slightly more visible */
}

.quote-text {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 300;
  font-style: italic;
  color: var(--color-darker);
  line-height: 1.8;
  margin-bottom: 2rem;
}

/* AVOCAT CONTENT */
.avocat-content {
  max-width: 900px;
  margin: 0 auto;
}

.avocat-photo-section {
  display: flex;
  justify-content: center;
  margin-bottom: clamp(3rem, 5vw, 5rem);
}

/* Photo fluide et responsive */
.photo-frame {
  width: 100%;
  max-width: 300px;
  /* Increased max-width slightly */
  aspect-ratio: 1 / 1.25;
  /* Using common portrait aspect ratio. This is CRITICAL for predictable image height */
  border: 3px solid var(--color-gold);
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  /* Lighter background */
  transition: var(--transition-medium);
  position: relative;
  overflow: hidden;
  /* Ensure profile photo stays within bounds */
}

.photo-frame:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(201, 169, 97, 0.3);
}

.profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  /* Center horizontally, top vertically */
  filter: grayscale(30%);
  transition: var(--transition-medium);
  display: block;
}

.photo-frame:hover .profile-photo {
  filter: grayscale(0%);
}

.qualifications-section,
.experience-section,
.languages-section {
  margin-bottom: clamp(3rem, 5vw, 5rem);
  padding-left: var(--spacing-section-px);
  /* Align contents better */
  padding-right: var(--spacing-section-px);
  max-width: 800px;
  /* Constrain text width */
  margin-left: auto;
  margin-right: auto;
}

.subsection-title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 400;
  color: var(--color-gold);
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  letter-spacing: 2px;
  text-align: center;
}

.qualification-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.qualification-item {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.qualification-icon {
  width: 12px;
  height: 12px;
  background: var(--color-gold);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.5rem;
}

.qualification-content p {
  font-family: var(--font-sans);
  font-size: clamp(0.9375rem, 1.25vw, 1rem);
  font-weight: 300;
  line-height: 1.7;
  color: var(--color-white);
}

.small-text {
  display: block;
  font-size: clamp(0.75rem, 1vw, 0.875rem);
  color: var(--color-grey-light);
  margin-top: 0.5rem;
}

/* TIMELINE */
.timeline {
  position: relative;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(201, 169, 97, 0.3);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
  align-items: center;
}

.timeline-left .timeline-content {
  grid-column: 1;
  text-align: right;
  padding-right: 1.5rem;
  /* Add padding to prevent content touching line */
}

.timeline-left .timeline-dot {
  grid-column: 2;
}

.timeline-right .timeline-content {
  grid-column: 3;
  text-align: left;
  padding-left: 1.5rem;
  /* Add padding to prevent content touching line */
}

.timeline-right .timeline-dot {
  grid-column: 2;
}

.timeline-dot {
  width: 16px;
  height: 16px;
  background: var(--color-gold);
  border-radius: 50%;
  border: 4px solid var(--color-darker);
  z-index: 2;
  box-shadow: 0 0 20px rgba(201, 169, 97, 0.5);
}

.timeline-content p {
  font-family: var(--font-sans);
  font-size: clamp(0.9375rem, 1.25vw, 1rem);
  font-weight: 300;
  line-height: 1.7;
  color: var(--color-white);
  margin-bottom: 0.5rem;
}

.timeline-date {
  font-size: clamp(0.75rem, 1vw, 0.875rem);
  color: var(--color-gold);
  font-style: italic;
}

/* LANGUAGES */
.languages-section {
  text-align: center;
}

.language-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  /* Allow badges to wrap */
  gap: 1.5rem;
}

.language-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-gold);
  transition: var(--transition-smooth);
  cursor: pointer;
  flex-shrink: 0;
  /* Prevent badges from shrinking */
}

.language-badge:hover {
  background: var(--color-gold);
  color: var(--color-darker);
  transform: translateY(-3px);
  box-shadow: var(--glow-gold);
}

.language-badge .flag {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(0.9rem, 1.25vw, 1rem);
  letter-spacing: 1px;
}

.language-badge span:last-child {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(0.875rem, 1.1vw, 0.9375rem);
  /* Fluid font size */
  letter-spacing: 1px;
}

/* CONTACT */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  /* Une seule colonne qui prend toute la largeur */
  /* Ou mieux un max-width sur l'élément lui-même pour ne pas qu'il soit trop large */
  gap: 0;
  /* Plus besoin de gap entre les colonnes s'il n'y en a qu'une */
  margin-top: 5rem;
  align-items: stretch;
  justify-content: center;
  /* Centre le contenu de la grille si l'élément est plus petit que la colonne */
}

.offices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.office-card {
  background: var(--color-white);
  padding: clamp(2rem, 3vw, 3rem) clamp(1.5rem, 2vw, 2rem);
  text-align: center;
  box-shadow: var(--shadow-light);
  transition: var(--transition-medium);
  border: 1px solid rgba(201, 169, 97, 0.1);
  cursor: pointer;
  height: 100%;
  display: flex;
  /* Added for vertical alignment if content heights vary */
  flex-direction: column;
  justify-content: space-between;
}

.office-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
  border-color: var(--color-gold);
}

.office-icon {
  line-height: 1;
  /* Fixes potential SVG extra space */
  margin-bottom: 1.5rem;
}

.office-icon svg {
  width: 50px;
  height: 50px;
  color: var(--color-gold);
  display: inline-block;
  /* Ensure it's centered easily */
}

.office-card h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 600;
  color: var(--color-darker);
  letter-spacing: 2px;
  margin-bottom: 1rem;
}

.office-address {
  font-family: var(--font-sans);
  font-size: clamp(0.9375rem, 1.25vw, 1rem);
  font-weight: 300;
  color: var(--color-grey-medium);
  margin-bottom: 1.5rem;
}

.map-link {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: clamp(0.75rem, 1vw, 0.875rem);
  font-weight: 500;
  color: var(--color-gold);
  text-decoration: none;
  letter-spacing: 1px;
  text-transform: uppercase;
  position: relative;
}

.map-link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-gold);
  transition: width var(--transition-smooth);
}

.map-link:hover::after {
  width: 100%;
}

.contact-details {
  background: var(--color-white);
  padding: clamp(2rem, 3vw, 3rem);
  box-shadow: var(--shadow-light);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  /* Align icon and text at the top */
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(201, 169, 97, 0.1);
}

.contact-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.contact-icon {
  width: 24px;
  height: 24px;
  color: var(--color-gold);
  flex-shrink: 0;
  /* Prevent icon from shrinking */
  margin-top: 0.25rem;
}

.contact-text {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  /* Allows text to shrink */
  flex-grow: 1;
  /* Allows text container to grow and take space */
}

.contact-label {
  font-family: var(--font-sans);
  font-size: clamp(0.75rem, 1vw, 0.875rem);
  font-weight: 500;
  color: var(--color-grey-medium);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.contact-text a,
.contact-text span {
  font-family: var(--font-sans);
  font-size: clamp(0.9375rem, 1.25vw, 1rem);
  font-weight: 300;
  color: var(--color-darker);
  text-decoration: none;
  transition: color var(--transition-smooth);
  word-wrap: break-word;
  /* Allows long email addresses/phone numbers to wrap */
  overflow-wrap: break-word;
  /* Standard property for wrapping */
}

.contact-text a:hover {
  color: var(--color-gold);
}

.contact-form-container {
  background: var(--color-white);
  padding: clamp(2rem, 3vw, 3rem);
  box-shadow: var(--shadow-light);
  height: 100%;
  /* Ensure it takes full height within grid */
}

.form-wrapper {
  width: 100%;
  height: 100%;
  min-height: 500px;
}

.iframe-wrapper {
  width: 100%;
  height: 100%;
  min-height: 500px;
  border: 2px dashed rgba(201, 169, 97, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  background: var(--color-light);
}

.form-placeholder {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 600;
  color: var(--color-darker);
  margin-bottom: 1rem;
}

.form-instructions {
  font-family: var(--font-sans);
  font-size: clamp(0.875rem, 1vw, 0.9375rem);
  font-weight: 300;
  color: var(--color-grey-medium);
}

/* LEGAL PAGES */
.legal-section {
  padding: var(--spacing-section-py) 0;
  background: var(--color-white);
  position: relative;
  z-index: 10;
}

.legal-content {
  max-width: 900px;
  margin: 0 auto;
  font-family: var(--font-sans);
  font-size: clamp(0.9375rem, 1.2vw, 1rem);
  line-height: 1.8;
  color: var(--color-grey-medium);
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 3vw, 3rem);
}

.legal-intro {
  font-size: clamp(1rem, 1.4vw, 1.0625rem);
}

.legal-block h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  font-weight: 600;
  color: var(--color-darker);
  margin-bottom: 0.75rem;
}

.legal-block p {
  margin-bottom: 0.75rem;
}

.legal-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.legal-list li {
  margin-bottom: 0.5rem;
}

.legal-list strong {
  font-weight: 500;
  color: var(--color-darker);
}

.legal-note {
  font-size: 0.875rem;
  color: var(--color-grey-medium);
}

/* FOOTER */
.footer {
  background: var(--color-darker);
  padding: clamp(2rem, 5vw, 3rem) 0;
  /* Fluid padding */
}

.footer-separator {
  max-width: var(--max-width-header);
  margin: 0 auto clamp(1rem, 3vw, 2rem);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 169, 97, 0.3), transparent);
}

.footer-content {
  max-width: var(--max-width-header);
  margin: 0 auto;
  padding: 0 var(--spacing-section-px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  text-align: center;
  /* For smaller screens */
}

.copyright {
  font-family: var(--font-sans);
  font-size: clamp(0.75rem, 1vw, 0.875rem);
  font-weight: 300;
  color: var(--color-grey-light);
  flex-basis: 100%;
  /* Take full width on small screens */
  order: 2;
  /* Move to bottom on small screens */
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: center;
  /* Center links on smaller screens */
  flex-grow: 1;
  /* Allow links to grow and take space */
  order: 1;
  /* Keep at top on small screens */
}

.footer-links a {
  font-family: var(--font-sans);
  font-size: clamp(0.75rem, 1vw, 0.875rem);
  font-weight: 300;
  color: var(--color-grey-light);
  text-decoration: none;
  transition: color var(--transition-smooth);
  position: relative;
  white-space: nowrap;
  /* Prevent links from breaking */
}

.footer-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-gold);
  transition: width var(--transition-smooth);
}

.footer-links a:hover {
  color: var(--color-gold);
}

.footer-links a:hover::after {
  width: 100%;
}

.separator-dot {
  color: var(--color-grey-medium);
  font-size: 0.5rem;
}

/* ANIMATIONS */
[data-scroll-animate],
[data-hero-animate] {
  opacity: 0;
  transform: translateY(50px);
  transition: var(--transition-slow);
}

[data-scroll-animate].is-visible,
[data-hero-animate].animated {
  opacity: 1;
  transform: translateY(0);
}

[data-scroll-animate-contact] {
  opacity: 0;
  transform: translateY(40px);
  transition: var(--transition-contact);
}

[data-scroll-animate-contact].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* RESPONSIVE MEDIA QUERIES */

@media (max-width: 1024px) {

  /* Header: Adjust spacing for desktop nav */
  .nav-desktop {
    gap: 1.5rem;
    /* Reduce gap */
  }

  /* Timeline becomes vertical on tablet */
  .timeline::before {
    left: 0;
    transform: translateX(calc(var(--spacing-section-px) - 50% + 8px));
    /* Adjust to match left grid column */
  }

  .timeline-item {
    grid-template-columns: auto 1fr;
    gap: 1.5rem;
  }

  .timeline-left .timeline-content,
  .timeline-right .timeline-content {
    grid-column: 2;
    text-align: left;
    padding-left: 0;
    /* Remove specific padding for left/right content */
    padding-right: 0;
  }

  .timeline-left .timeline-dot,
  .timeline-right .timeline-dot {
    grid-column: 1;
  }

  .timeline-left .timeline-dot {
    margin-right: -8px;
    /* Offset to align with line */
  }

  .timeline-right .timeline-dot {
    margin-left: -8px;
    /* Offset to align with line */
  }

  .footer-content {
    flex-direction: column;
    gap: 1rem;
  }

  .copyright,
  .footer-links {
    flex-basis: auto;
    /* Revert basis */
    order: unset;
    /* Revert order */
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }

  .burger-menu {
    display: flex;
  }

  /* Header adjustments for smaller screen, when not scrolled */
  .header:not(.scrolled) .header-container {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .hero-line {
    margin-bottom: 2rem;
  }

  .scroll-indicator {
    bottom: 2rem;
  }

  .expertise-grid {
    /* 1 column on mobile */
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .offices-grid {
    grid-template-columns: 1fr;
  }

  /* Important: cacher les grandes images Unsplash sur mobile
     pour éviter qu'elles ne prennent trop de place et ne cassent le layout */
  .hero-background .hero-image,
  .section-bg-image {
    display: none;
  }

  /* Ajustements pour le texte qualifications/expérience sur mobile */
  .qualification-content p,
  .timeline-content p {
    font-size: 0.9rem;
  }

  .small-text,
  .timeline-date {
    font-size: 0.75rem;
  }

  /* Contact and form */
  .contact-details,
  .contact-form-container {
    padding: 2rem;
    /* Reduce padding */
  }

  .form-wrapper,
  .iframe-wrapper {
    min-height: 400px;
    /* Smaller min-height for forms */
  }
}

@media (max-width: 480px) {
  .header-container {
    padding-left: 4%;
    /* Slightly less padding */
    padding-right: 4%;
  }

  .hero-line {
    width: 60px;
    margin-bottom: 1.5rem;
  }

  .cta-button {
    padding: 12px 30px;
    font-size: 0.8125rem;
  }

  .expertise-card {
    padding: 2rem 1.5rem;
  }

  .card-icon svg {
    width: 50px;
    height: 50px;
  }

  /* Photo smaller on mobile */
  .photo-frame {
    padding: 10px;
    max-width: 250px;
    /* Slight reduction */
  }

  /* Alignement spécifique du titre "ME JEAN-BAPTISTE VAUDAN" sur iPhone */
  .avocat-section .section-header {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .contact-item {
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    /* Center text on mobile contact items */
    text-align: center;
  }

  .contact-icon {
    margin-top: 0;
  }

  .contact-text {
    text-align: center;
    /* Ensure text is centered */
  }

  .footer-links {
    gap: 1rem;
    /* Reduce gap between footer links */
    flex-wrap: wrap;
    /* Allow links to wrap to new line */
  }

  .separator-dot {
    display: none;
    /* Hide dots on very small screens */
  }
}

@media (max-width: 360px) {
  .hero-content {
    padding: 0 1rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .logo-letters {
    font-size: 2rem;
    /* Smaller font for preloader letters */
    gap: 0.75rem;
  }

  .mobile-link {
    font-size: 2.2rem;
    /* Smaller mobile nav links */
  }
}
