@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-serif: 'Playfair Display', ui-serif, Georgia, serif;

  --color-earth-50: #fbf9f6;
  --color-earth-100: #f5f0e6;
  --color-earth-200: #e6d8c3;
  --color-earth-300: #d4bc9b;
  --color-earth-400: #c19a6b;
  --color-earth-500: #aa7c45;
  --color-earth-600: #8b5a2b;
  --color-earth-700: #6f4422;
  --color-earth-800: #5c391f;
  --color-earth-900: #4b2f1b;
  --color-earth-950: #2d1a0e;

  --color-gold-400: #d4af37;
  --color-gold-500: #b8972e;

  --background: var(--color-earth-50);
  --foreground: var(--color-earth-900);
  --border: var(--color-earth-200);
  --header-bg: rgba(251, 249, 246, 0.8);
  --footer-bg: var(--color-earth-100);
}

.dark {
  --background: #12100d;
  --foreground: var(--color-earth-100);
  --border: var(--color-earth-800);
  --header-bg: rgba(18, 16, 13, 0.8);
  --footer-bg: #0f0e0c;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  transition: background-color 0.5s ease, color 0.5s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* Utilities */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

.italic { font-style: italic; }
.text-gold { color: var(--color-gold-400); }
.text-earth-600 { color: var(--color-earth-600); }
.text-earth-700 { color: var(--color-earth-700); }
.text-center { text-align: center; }

@media (min-width: 768px) {
  .container { padding: 0 2rem; }
}

/* Base Layout */
main {
  flex-grow: 1;
  padding-top: 6rem;
}

/* Header */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 50;
  padding: 1.25rem 0;
  transition: all 0.3s ease;
  border-bottom: 1px solid transparent;
}
header.scrolled {
  background-color: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: var(--border);
  padding: 0.75rem 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
}
.logo:hover {
  color: var(--color-earth-600);
}
.dark .logo:hover {
  color: var(--color-gold-400);
}

nav.desktop-nav {
  display: none;
  align-items: center;
  gap: 2rem;
}
@media (min-width: 1024px) {
  nav.desktop-nav { display: flex; }
}
.nav-link {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--foreground);
}
.nav-link:hover, .nav-link.active {
  color: var(--color-earth-600);
}
.dark .nav-link:hover, .dark .nav-link.active {
  color: var(--color-gold-400);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}
.btn-primary {
  background-color: var(--color-earth-900);
  color: var(--color-earth-50);
}
.btn-primary:hover {
  background-color: var(--color-earth-800);
}
.dark .btn-primary {
  background-color: var(--color-gold-500);
  color: #12100d;
}
.dark .btn-primary:hover {
  background-color: var(--color-gold-400);
}
.btn-outline {
  background-color: transparent;
  border: 1px solid var(--border);
  color: var(--foreground);
}
.btn-outline:hover {
  background-color: var(--color-earth-200);
}
.dark .btn-outline:hover {
  background-color: var(--color-earth-800);
}

/* Mobile Nav */
.mobile-toggle {
  display: flex;
  align-items: center;
  gap: 1rem;
}
@media (min-width: 1024px) {
  .mobile-menu-btn { display: none; }
}
.menu-icon, .close-icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  cursor: pointer;
}
.mobile-menu {
  position: fixed;
  inset: 0;
  background-color: var(--background);
  z-index: 40;
  padding: 6rem 1.5rem 2rem;
  display: none;
  flex-direction: column;
}
.mobile-menu.active {
  display: flex;
}
.mobile-nav-link {
  font-size: 1.125rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

/* Theme Toggle */
.theme-toggle {
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.theme-toggle svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.5;}
.theme-toggle .sun-icon { display: block; }
.theme-toggle .moon-icon { display: none; }
.dark .theme-toggle .sun-icon { display: none; }
.dark .theme-toggle .moon-icon { display: block; }

/* Hero Section */
.hero {
  padding: 3rem 0 4rem;
}
.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr 1fr; }
  .hero-content { order: 1; }
  .hero-image-wrapper { order: 2; }
}
.hero-title {
  font-size: 2.5rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}
@media (min-width: 768px) {
  .hero-title { font-size: 3.5rem; }
}
@media (min-width: 1024px) {
  .hero-title { font-size: 4.5rem; }
}
.hero-desc {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  max-width: 500px;
}
.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
@media (min-width: 640px) {
  .hero-actions { flex-direction: row; }
}
.hero-image {
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 2px;
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
  display: block;
}

/* CORRECTION DE L'AFFICHAGE DES IMAGES */
.smooth-img {
  opacity: 1; /* Force l'image à être visible tout le temps */
  transform: scale(1);
  transition: transform 0.8s ease-out;
}
.smooth-img.loaded {
  opacity: 1;
}

/* Reassurance Section */
.reassurance {
  background-color: var(--footer-bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 3rem 0;
}
.reassurance-grid {
  display: grid;
  gap: 2rem;
  text-align: center;
}
@media (min-width: 768px) {
  .reassurance-grid { 
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
  }
  .reassurance-item {
    border-right: 1px solid var(--border);
    padding: 0 1rem;
  }
  .reassurance-item:last-child {
    border-right: none;
  }
}
.reassurance-item h3 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 1rem 0 0.5rem;
}
.reassurance-item p {
  font-size: 0.875rem;
  opacity: 0.8;
}

/* Sections */
.section {
  padding: 6rem 0;
}
.section-title {
  font-size: 2rem;
  margin-bottom: 1rem;
}
.section-desc {
  opacity: 0.8;
  margin-bottom: 3rem;
  max-width: 600px;
}
@media (min-width: 768px) {
  .section-title { font-size: 2.5rem; }
  .text-center-md { text-align: center; margin-left: auto; margin-right: auto;}
}

/* Feature Grid */
.feature-grid {
  display: grid;
  gap: 2rem;
}
@media (min-width: 768px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
}
.feature-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.feature-img-wrapper {
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 2px;
}
.feature-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}
.feature-card:hover .feature-img {
  transform: scale(1.05); /* Garde uniquement l'effet de zoom au survol */
}

/* Realisations Grid */
.realisations-grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 640px) { .realisations-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .realisations-grid { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }
.aspect-square { aspect-ratio: 1/1; }
.aspect-3-4 { aspect-ratio: 3/4; }
.aspect-4-5 { aspect-ratio: 4/5; }

/* Services List */
.service-category {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  margin-bottom: 4rem;
}
.service-category h2 {
  color: var(--color-earth-900);
  margin-bottom: 2rem;
  font-size: 1.5rem;
}
.dark .service-category h2 {
  color: var(--color-gold-400);
}
.service-items {
  display: grid;
  gap: 2.5rem;
}
@media (min-width: 768px) {
  .service-items { grid-template-columns: repeat(2, 1fr); gap: 2.5rem 3rem; }
}
.service-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
}
.service-name { font-weight: 500; font-size: 1.125rem; }
.service-price { font-weight: 600; font-size: 0.875rem; color: var(--color-earth-800); margin-left: 1rem;}
.dark .service-price { color: var(--color-gold-500); }
.service-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
}
.service-time {
  background-color: var(--color-earth-100);
  padding: 0.125rem 0.5rem;
  border-radius: 2px;
}
.dark .service-time { background-color: var(--color-earth-900); }
.service-desc { opacity: 0.8; }

/* Contact Form */
.contact-grid {
  display: grid;
  gap: 4rem;
}
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 1fr 1fr; gap: 6rem; } }
.form-group {
  margin-bottom: 1.5rem;
}
.form-row {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 768px) { .form-row { grid-template-columns: 1fr 1fr; } }
label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}
input, select {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 1rem;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--color-earth-600);
}
.dark input:focus, .dark select:focus {
  border-color: var(--color-gold-500);
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}
@media (min-width: 1024px) {
  .contact-info { padding-left: 3rem; border-left: 1px solid var(--border); }
}
.info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.emergency-box {
  background-color: rgba(230, 216, 195, 0.5);
  border: 1px solid var(--border);
  padding: 1.5rem;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}
.dark .emergency-box {
  background-color: rgba(184, 151, 46, 0.1);
}
.emergency-box::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background-color: var(--color-earth-700);
}
.dark .emergency-box::before {
  background-color: var(--color-gold-500);
}
.emergency-box a:hover {
  text-decoration: underline;
}

/* Footer */
footer {
  background-color: var(--footer-bg);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
  margin-top: 5rem;
}
.footer-grid {
  display: grid;
  gap: 3rem;
  margin-bottom: 4rem;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 2fr; gap: 4rem; }
}
.footer-brand p {
  opacity: 0.8;
  font-size: 0.875rem;
  margin-top: 1rem;
  max-width: 300px;
}
.footer-nav h4 {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
  opacity: 0.9;
}
.footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 2rem;
}
@media (min-width: 640px) {
  .footer-links { grid-template-columns: repeat(3, 1fr); }
}
.footer-links a {
  font-size: 0.875rem;
  opacity: 0.8;
}
.footer-links a:hover {
  opacity: 1;
  color: var(--color-earth-600);
}
.dark .footer-links a:hover {
  color: var(--color-gold-400);
}
.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 0.75rem;
  opacity: 0.8;
  align-items: center;
  text-align: center;
}
@media (min-width: 768px) {
  .footer-bottom { 
    flex-direction: row; 
    justify-content: space-between;
    text-align: left;
  }
}
.footer-bottom a {
  font-weight: 500;
}
.footer-bottom a:hover {
  text-decoration: underline;
  color: var(--color-earth-800);
}
.dark .footer-bottom a:hover {
  color: var(--color-gold-500);
}

/* Animations */
.animate-fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}