/* Base optimisée */
:root {
  --bg: #0a0e14;
  --panel: #0f1621;
  --text: #e7eef8;
  --muted: #b6c2d0;
  --brand: #2c5aa0;
  --brand-2: #4a90e2;
  --accent: #00d68f;
  --card: #121a25;
  --border: #1f2a3a;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
  --grid-strong: rgba(44,90,160,0.25);
  --grid-fine: rgba(44,90,160,0.08);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { 
  box-sizing: border-box; 
}

html, body { 
  height: 100%; 
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color: var(--text);
  background: 
    linear-gradient(90deg, var(--grid-fine) 1px, transparent 1px),
    linear-gradient(var(--grid-fine) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-strong) 50px, transparent 50px),
    linear-gradient(var(--grid-strong) 50px, transparent 50px),
    radial-gradient(1000px 600px at 20% -10%, rgba(44,90,160,0.15), rgba(0,0,0,0)) no-repeat,
    radial-gradient(800px 500px at 80% -10%, rgba(0,214,143,0.12), rgba(0,0,0,0)) no-repeat,
    var(--bg);
  background-size: 10px 10px, 10px 10px, 50px 50px, 50px 50px, 100% 100%, 100% 100%, 100% 100%;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Accessibilité améliorée */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 9999;
}

.skip-link:focus {
  position: fixed;
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 12px 16px;
  background: #fff;
  color: #000;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}

:focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Container responsive */
.container {
  width: min(1120px, 92%);
  margin: 0 auto;
  padding: 0 16px;
}

/* Header optimisé */
.site-header {
  background: rgba(15,22,33,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 2px solid var(--brand);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 20px;
}

.brand { 
  display: flex; 
  align-items: center; 
  flex-shrink: 0;
}

.brand-logo {
  height: 80px;
  width: auto;
  max-width: 300px;
  transition: var(--transition);
}

.brand-logo:hover {
  transform: scale(1.02);
}

.nav { 
  display: flex; 
  gap: 20px; 
  flex-wrap: wrap;
}

.nav-link { 
  color: var(--text); 
  text-decoration: none; 
  opacity: .85;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 6px;
  transition: var(--transition);
}

.nav-link:hover { 
  opacity: 1; 
  background: rgba(255,255,255,0.05);
}

/* Boutons optimisés */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  border: 1px solid var(--border);
  transition: var(--transition);
  min-height: 48px; /* Zone de clic optimale */
  text-align: center;
}

.btn.primary { 
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); 
  color: #05121a; 
  border-color: transparent; 
}

.btn.primary:hover { 
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(44,90,160,0.3);
}

.btn.ghost { 
  color: var(--text); 
  background: rgba(255,255,255,0.03); 
  border-color: var(--border);
}

.btn.ghost:hover { 
  background: rgba(255,255,255,0.08); 
  border-color: var(--brand);
  transform: translateY(-1px);
}

/* Hero optimisé */
.hero { 
  padding: 60px 0 40px; 
  position: relative; 
  overflow: hidden; 
}

.hero::before {
  content: "";
  position: absolute; 
  inset: 0;
  background:
    repeating-linear-gradient(to right, var(--grid-fine) 0px, var(--grid-fine) 1px, transparent 1px, transparent 20px),
    repeating-linear-gradient(to bottom, var(--grid-fine) 0px, var(--grid-fine) 1px, transparent 1px, transparent 20px),
    repeating-linear-gradient(to right, var(--grid-strong) 0px, var(--grid-strong) 1px, transparent 1px, transparent 100px),
    repeating-linear-gradient(to bottom, var(--grid-strong) 0px, var(--grid-strong) 1px, transparent 1px, transparent 100px);
  opacity: 0.25;
  pointer-events: none;
}

.hero-wrap { 
  display: grid; 
  grid-template-columns: 1.2fr 1fr; 
  gap: 40px; 
  align-items: center; 
}

.hero-content { 
  max-width: 760px; 
}

.hero h1 { 
  font-size: clamp(32px, 5vw, 48px); 
  line-height: 1.2; 
  margin: 0 0 16px; 
  font-weight: 700;
  background: linear-gradient(135deg, var(--text), var(--brand-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p { 
  color: var(--muted); 
  margin: 0 0 24px; 
  font-size: 18px;
  line-height: 1.6;
}

.hero-cta { 
  display: flex; 
  gap: 16px; 
  flex-wrap: wrap; 
}

.hero-media { 
  display: none; 
}

.hero-media img { 
  width: 100%; 
  height: auto; 
  border-radius: 16px; 
  border: 1px solid var(--border); 
  box-shadow: var(--shadow); 
  background: var(--panel);
  transition: var(--transition);
}

.hero-media img:hover {
  transform: scale(1.02);
}

.hero-annotations { 
  position: absolute; 
  inset: 0; 
  pointer-events: none; 
}

/* Animations optimisées */
@keyframes drawLine {
  from { 
    opacity: 0; 
    transform: scale(0.8); 
  }
  to { 
    opacity: 1; 
    transform: scale(1); 
  }
}

@keyframes fadeInUp {
  from { 
    opacity: 0; 
    transform: translateY(30px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

.hero-annotations line,
.hero-annotations polygon {
  opacity: 0;
  transform: scale(0.8);
  animation: drawLine 1.5s ease-out forwards;
}

.hero-annotations line:first-child,
.hero-annotations polygon:nth-child(2),
.hero-annotations polygon:nth-child(3) {
  animation-delay: 0.5s;
}

.hero-annotations line:last-child {
  animation-delay: 1s;
}

.hero-annotations text {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
}

.hero-annotations text:nth-child(2) { animation-delay: 1.2s; }
.hero-annotations text:nth-child(4) { animation-delay: 1.7s; }

/* Sections */
.about { 
  padding: 40px 0; 
}

.about-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
  gap: 24px; 
}

.about-card { 
  background: var(--card); 
  border: 1px solid var(--border); 
  border-radius: 12px; 
  padding: 24px; 
  transition: var(--transition);
}

.about-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.about-card h4 { 
  margin: 0 0 12px; 
  color: var(--brand-2);
  font-size: 18px;
}

.section-hatched {
  position: relative;
}

.section-hatched::before {
  content: "";
  position: absolute; 
  inset: 0;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,0.03) 0px, rgba(255,255,255,0.03) 2px, transparent 2px, transparent 10px);
  opacity: 0.5;
  pointer-events: none;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header .eyebrow {
  display: inline-block;
  color: var(--brand-2);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 14px;
  margin-bottom: 8px;
}

.section-header h2,
.section-header h3 { 
  font-size: clamp(28px, 4vw, 36px); 
  margin: 0 0 12px; 
  letter-spacing: 0.02em; 
  font-weight: 700;
}

.section-header p { 
  margin: 0; 
  color: var(--muted); 
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto;
}

/* Pricing optimisé */
.pricing { 
  padding: 60px 0; 
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
  position: relative;
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card::before,
.card::after {
  content: "";
  position: absolute;
  width: 20px; 
  height: 20px;
  border-color: rgba(110,170,220,0.6);
}

.card::before {
  top: 12px; 
  left: 12px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
}

.card::after {
  bottom: 12px; 
  right: 12px;
  border-bottom: 2px solid currentColor;
  border-right: 2px solid currentColor;
}

.card h4 { 
  margin: 0 0 12px; 
  font-size: 20px; 
  font-weight: 600;
}

.price { 
  margin: 0 0 16px; 
  color: var(--brand-2); 
  font-size: 18px;
  font-weight: 600;
}

.features { 
  margin: 0; 
  padding-left: 0; 
  color: var(--muted); 
  list-style: none; 
  flex-grow: 1;
}

.features li { 
  position: relative; 
  padding-left: 24px; 
  margin-bottom: 8px;
  line-height: 1.5;
}

.features li::before {
  content: "";
  position: absolute; 
  left: 0; 
  top: 0.6em;
  width: 8px; 
  height: 8px; 
  border: 2px solid var(--brand-2);
  transform: translateY(-50%) rotate(45deg);
}

.highlight { 
  outline: 2px solid rgba(46,168,255,0.35); 
  transform: scale(1.02);
}

.card:hover { 
  outline: 2px solid rgba(46,168,255,0.35); 
  transform: translateY(-4px); 
  box-shadow: 0 16px 36px rgba(0,0,0,0.45); 
}

.badge {
  position: absolute; 
  top: -12px; 
  right: 16px;
  background: var(--accent); 
  color: #04251a;
  font-size: 12px; 
  font-weight: 700; 
  padding: 8px 12px; 
  border-radius: 999px;
}

.legal-note { 
  color: var(--muted); 
  font-size: 14px; 
  margin-top: 20px; 
  text-align: center;
  line-height: 1.5;
}

/* Contact optimisé */
.contact { 
  padding: 60px 0; 
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.contact-item { 
  background: var(--card); 
  border: 1px solid var(--border); 
  border-radius: 12px; 
  padding: 24px; 
  text-align: center;
  transition: var(--transition);
}

.contact-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.contact-label { 
  color: var(--muted); 
  font-size: 14px; 
  text-transform: uppercase; 
  letter-spacing: .6px; 
  margin-bottom: 8px;
  font-weight: 600;
}

.contact-link { 
  color: var(--text); 
  text-decoration: none; 
  font-weight: 600; 
  font-size: 16px;
  transition: var(--transition);
}

.contact-link:hover { 
  color: var(--brand-2);
  text-decoration: underline; 
}

.cta-row { 
  display: flex; 
  gap: 16px; 
  flex-wrap: wrap; 
  justify-content: center;
}

/* Footer */
.site-footer { 
  border-top: 1px solid var(--border); 
  padding: 24px 0; 
  background: rgba(255,255,255,0.02); 
  margin-top: 60px;
}

.site-footer p { 
  margin: 0 0 8px 0; 
  color: var(--muted); 
  font-size: 14px; 
  text-align: center; 
  line-height: 1.5;
}

.footer-link {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--brand-2);
  text-decoration: underline;
}

/* Main content */
.main {
  min-height: calc(100vh - 200px);
  padding: 40px 0;
}

.section {
  padding: 60px 0;
}

/* Legal pages */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
}

.legal-content h2 {
  color: var(--brand-2);
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p {
  margin-bottom: 1rem;
}

.legal-content a {
  color: var(--brand-2);
  text-decoration: none;
}

.legal-content a:hover {
  text-decoration: underline;
}

/* Galerie de projets */
.projects-gallery {
  padding: 80px 0;
  background: var(--panel);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: var(--transition);
  position: relative;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  border-color: var(--brand);
}

.project-preview {
  height: 200px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.project-icon {
  font-size: 48px;
  opacity: 0.8;
}

.project-overlay {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0,0,0,0.7);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: bold;
  color: var(--brand-2);
}

.project-info {
  padding: 20px;
}

.project-info h3 {
  margin: 0 0 8px 0;
  color: var(--text);
  font-size: 18px;
}

.project-info p {
  margin: 0 0 8px 0;
  color: var(--muted);
  font-size: 14px;
}

.project-year {
  color: var(--brand);
  font-size: 12px;
  font-weight: bold;
}

/* Timeline */
.timeline {
  padding: 80px 0;
  background: var(--bg);
}

.timeline-container {
  margin-top: 40px;
  position: relative;
}

.timeline-container::before {
  content: '';
  position: absolute;
  left: 30px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--brand);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
  padding-left: 80px;
}

.timeline-marker {
  position: absolute;
  left: 22px;
  top: 8px;
  width: 16px;
  height: 16px;
  background: var(--brand);
  border: 3px solid var(--bg);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--brand);
}

.timeline-content {
  background: var(--card);
  padding: 25px;
  border-radius: 12px;
  border: 1px solid var(--border);
  position: relative;
}

.timeline-content::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 20px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 8px solid var(--card);
}

.timeline-content h3 {
  color: var(--brand);
  font-size: 14px;
  margin: 0 0 8px 0;
  font-weight: 600;
}

.timeline-content h4 {
  color: var(--text);
  font-size: 18px;
  margin: 0 0 12px 0;
}

.timeline-content p {
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}

/* References et Skills */
.references { 
  padding: 60px 0; 
}

.list-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
  gap: 24px; 
}

.list-card { 
  background: var(--card); 
  border: 1px solid var(--border); 
  border-radius: 12px; 
  padding: 24px; 
  transition: var(--transition);
}

.list-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.list-card h4 { 
  margin: 0 0 12px; 
  color: var(--brand-2);
  font-size: 18px;
}

.list-card ul { 
  margin: 0; 
  padding-left: 20px; 
  color: var(--muted); 
  line-height: 1.6;
}

.skills { 
  padding: 60px 0; 
}

.skills-section {
  margin-bottom: 40px;
}

.skills-section h4 {
  color: var(--brand-2);
  font-size: 18px;
  margin-bottom: 16px;
  text-align: center;
  font-weight: 600;
}

.chips { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 12px; 
  margin-bottom: 20px; 
  justify-content: center;
}

.chip { 
  background: rgba(255,255,255,0.06); 
  border: 1px solid var(--border); 
  color: var(--text); 
  padding: 10px 16px; 
  border-radius: 999px; 
  font-weight: 600; 
  font-size: 14px;
  transition: var(--transition);
}

.chip:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-1px);
  border-color: var(--brand-2);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero-wrap { 
    grid-template-columns: 1fr; 
    gap: 30px;
    text-align: center;
  }
  
  .pricing-grid { 
    grid-template-columns: repeat(2, 1fr); 
  }
  
  .container {
    padding: 0 20px;
  }
}

@media (max-width: 768px) {
  .site-header .container { 
    flex-direction: column;
    gap: 16px;
  }
  
  .brand-logo { 
    height: 60px; 
    max-width: 250px; 
  }
  
  .nav { 
    gap: 16px; 
    justify-content: center;
  }
  
  .hero { 
    padding: 40px 0 30px; 
  }
  
  .hero h1 {
    font-size: 28px;
  }
  
  .hero p {
    font-size: 16px;
  }
  
  .hero-cta {
    justify-content: center;
  }
  
  .btn {
    padding: 12px 16px;
    font-size: 14px;
    min-height: 44px;
  }
  
  .pricing-grid { 
    grid-template-columns: 1fr; 
  }
  
  .contact-grid { 
    grid-template-columns: 1fr; 
  }
  
  .cta-row {
    flex-direction: column;
    align-items: center;
  }
  
  .about-grid, 
  .list-grid { 
    grid-template-columns: 1fr; 
  }
  
  .gallery-grid { 
    grid-template-columns: 1fr; 
  }
  
  .timeline-container::before { 
    left: 15px; 
  }
  
  .timeline-item { 
    padding-left: 50px; 
  }
  
  .timeline-marker { 
    left: 7px; 
  }
  
  .section-header h2,
  .section-header h3 {
    font-size: 24px;
  }
  
  .section-header p {
    font-size: 16px;
  }
}

@media (min-width: 720px) {
  .hero-media { 
    display: block; 
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  
  .hero h1 {
    font-size: 24px;
  }
  
  .card {
    padding: 20px;
  }
  
  .contact-item {
    padding: 20px;
  }
  
  .btn {
    width: 100%;
    max-width: 300px;
  }
}

/* Animations réduites pour les utilisateurs qui le préfèrent */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.2s !important; /* garder un léger feedback */
  }
  
  .card:hover { 
    transform: none; 
  }
  
  .project-card:hover {
    transform: none;
  }
  
  .carousel-track {
    transition: transform 0.2s ease-out !important;
  }
}

/* Carrousel des références */
.carousel-container {
  margin-top: 40px;
  position: relative;
}

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

.carousel-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  min-height: 500px;
  width: 100%;
}

.carousel-track {
  display: flex;
  transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
  width: 100%;
  will-change: transform;
  backface-visibility: hidden;
}

.carousel-slide {
  min-width: 100%;
  width: 100%;
  flex-shrink: 0;
  flex-grow: 0;
}

.reference-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  padding: 40px;
  align-items: start;
  min-height: 400px;
  overflow: visible;
  box-sizing: border-box;
}

.reference-image {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--border);
}

.reference-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.reference-image:hover img {
  transform: scale(1.05);
}

.reference-content h4 {
  font-size: 28px;
  margin: 0 0 12px 0;
  color: var(--text);
  font-weight: 700;
}

.reference-location {
  color: var(--brand-2);
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px 0;
}

.reference-period {
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 16px 0;
}

.reference-description {
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 20px 0;
  font-size: 16px;
}

.reference-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reference-tags .tag {
  background: rgba(44, 90, 160, 0.2);
  color: var(--brand-2);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(44, 90, 160, 0.3);
}

/* Contrôles du carrousel */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 22, 33, 0.9);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 100;
  backdrop-filter: blur(10px);
  pointer-events: auto;
}

.carousel-btn:hover {
  background: var(--brand);
  border-color: var(--brand);
  transform: translateY(-50%) scale(1.1);
}

.carousel-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.carousel-prev {
  left: 20px;
}

.carousel-next {
  right: 20px;
}

.carousel-btn svg {
  width: 20px;
  height: 20px;
}

/* Indicateurs */
.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

.indicator.active {
  background: var(--brand-2);
  border-color: var(--brand-2);
  transform: scale(1.2);
}

.indicator:hover {
  border-color: var(--brand-2);
  transform: scale(1.1);
}

/* Responsive carrousel */
@media (max-width: 768px) {
  .reference-card {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 30px 20px;
  }
  
  .reference-content h4 {
    font-size: 24px;
  }
  
  .carousel-btn {
    width: 40px;
    height: 40px;
  }
  
  .carousel-prev {
    left: 10px;
  }
  
  .carousel-next {
    right: 10px;
  }
  
  .carousel-btn svg {
    width: 16px;
    height: 16px;
  }
}

/* Mode sombre forcé pour les navigateurs qui le supportent */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
  }
}

/* Amélioration de l'impression */
/* Grille des références */
.references-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.reference-item {
  background: var(--card);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border);
}

.reference-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.4);
  border-color: var(--brand);
}

.reference-item h4 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.reference-location {
  color: var(--brand-2);
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 16px;
}

.reference-period {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 12px;
}

.reference-description {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.reference-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reference-tags .tag {
  background: var(--brand);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

@media (max-width: 768px) {
  .references-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .reference-item {
    padding: 20px;
  }
  
  .reference-item h4 {
    font-size: 20px;
  }
}

@media print {
  .site-header,
  .site-footer,
  .hero-cta,
  .cta-row {
    display: none;
  }
  
  .hero {
    padding: 20px 0;
  }
  
  .card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
}
