/* ============================================
   COPEAUX & CRÉATIONS - Style Principal
   ============================================ */

:root {
  /* Palette naturelle et chaleureuse */
  --wood-dark: #2c1810;
  --wood-medium: #5c3d2e;
  --wood-light: #8b6914;
  --cream: #faf6f0;
  --cream-dark: #ede4d3;
  --accent: #a67c52;
  --text: #1a1612;
  --text-light: #6b5b4f;

  /* Typographie */
  --font-display: "Karla", -apple-system, sans-serif;
  --font-body: "Karla", -apple-system, sans-serif;

  /* Espacements */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--cream);
}

/* ============================================
   TYPOGRAPHIE
   ============================================ */

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--wood-dark);
}

h3 {
  font-size: 1.5rem;
  color: var(--wood-medium);
}

p {
  color: var(--text-light);
  max-width: 60ch;
}

/* ============================================
   NAVIGATION
   ============================================ */

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 246, 240, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(44, 24, 16, 0.08);
}

nav {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-sm) var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--wood-dark);
  text-decoration: none;
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: var(--space-md);
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--text-light);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--wood-dark);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Share Button */
.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid rgba(44, 24, 16, 0.15);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-left: var(--space-sm);
}

.share-btn svg {
  width: 18px;
  height: 18px;
  color: var(--text-light);
  transition: color 0.3s ease;
}

.share-btn:hover {
  background: var(--wood-dark);
  border-color: var(--wood-dark);
}

.share-btn:hover svg {
  color: var(--cream);
}

.share-btn:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Share toast notification */
.share-toast {
  position: fixed;
  bottom: var(--space-md);
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--wood-dark);
  color: var(--cream);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  box-shadow: 0 10px 30px rgba(44, 24, 16, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}

.share-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}

/* ============================================
   BOUTONS
   ============================================ */

.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: var(--wood-dark);
  color: var(--cream);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn:hover {
  background: var(--wood-medium);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(44, 24, 16, 0.2);
}

/* ============================================
   SECTIONS COMMUNES
   ============================================ */

section {
  padding: var(--space-xl) var(--space-md);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  min-height: 100vh;
  display: flex;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
  justify-content: space-around;
  padding-top: calc(var(--space-xl) + 60px);
  max-width: 1400px;
  margin: 0 auto;
  background:
    linear-gradient(rgba(250, 246, 240, 0.92), rgba(250, 246, 240, 0.92)),
    url("images/fond/bois-1.jpg") center/cover no-repeat;
}

/* Wrapper pour que le fond prenne toute la largeur */
#accueil {
  background:
    linear-gradient(rgba(250, 246, 240, 0.92), rgba(250, 246, 240, 0.92)),
    url("images/fond/bois-1.jpg") center/cover no-repeat;
  max-width: none;
}

#accueil.hero {
  max-width: none;
}

#accueil .hero-content,
#accueil .hero-visual {
  max-width: 700px;
}

#accueil .hero-content {
  justify-self: end;
}

#accueil .hero-visual {
  justify-self: start;
}

.hero-content {
  animation: fadeInUp 1s ease forwards;
}

.hero-tag {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-md);
  position: relative;
  padding-left: 50px;
}

.hero-tag::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 35px;
  height: 1px;
  background: var(--accent);
}

.hero h1 {
  color: var(--wood-dark);
  margin-bottom: var(--space-md);
}

.hero p {
  font-size: 1.1rem;
  margin-bottom: var(--space-md);
}

.hero-visual {
  position: relative;
  height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo {
  max-width: 90%;
  max-height: 80%;
  object-fit: contain;
  animation: fadeInUp 1s ease 0.3s forwards;
  opacity: 0;
  filter: drop-shadow(0 20px 40px rgba(44, 24, 16, 0.15));
  border-radius: 10px;
  box-shadow: 0 20px 40px rgba(44, 24, 16, 0.15);
}

/* ============================================
   SAVOIR-FAIRE SECTION
   ============================================ */

.savoir-faire {
  background:
    linear-gradient(rgba(237, 228, 211, 0.85), rgba(237, 228, 211, 0.85)),
    url("images/fond/bois-3.jpg") center/cover no-repeat;
}

.savoir-faire-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  max-width: 1400px;
  margin: 0 auto;
  align-items: center;
}

.savoir-faire-text {
  padding-right: var(--space-md);
}

.savoir-faire-intro {
  font-size: 1.15rem;
  line-height: 1.8;
  margin-bottom: var(--space-lg);
  max-width: none;
}

.savoir-faire-intro strong {
  color: var(--wood-dark);
  font-weight: 500;
}

.savoir-faire-points {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.savoir-faire-point {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
}

.point-icon {
  color: var(--accent);
  font-size: 1.2rem;
  line-height: 1.4;
  flex-shrink: 0;
}

.savoir-faire-point h4 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--wood-dark);
  margin-bottom: 0.3rem;
  font-weight: 400;
}

.savoir-faire-point p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin: 0;
}

/* Galerie Savoir-faire */
.savoir-faire-gallery {
  display: flex;
  gap: var(--space-sm);
  align-items: stretch;
}

.sf-gallery-column {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  flex: 1;
  min-width: 0;
}

.sf-gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  flex: 1;
  min-height: 0;
  cursor: pointer;
  /* Reset button styles */
  border: none;
  padding: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  text-align: left;
}

.sf-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.sf-gallery-item:hover img,
.sf-gallery-item:focus img {
  transform: scale(1.05);
}

.sf-gallery-item:focus {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.sf-gallery-item:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ============================================
   À PROPOS SECTION
   ============================================ */

.a-propos {
  background:
    linear-gradient(rgba(248, 246, 240, 0.93), rgba(248, 246, 240, 0.93)),
    url("images/fond/bois-2.jpg") center/cover no-repeat;
}

.a-propos-content {
  max-width: 800px;
  margin: 0 auto;
}

.a-propos-content p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: var(--space-md);
  max-width: none;
}

.a-propos-content p:last-child {
  margin-bottom: 0;
}

.a-propos-content strong {
  color: var(--wood-dark);
  font-weight: 500;
}

.a-propos-content a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.a-propos-content a:hover {
  border-bottom-color: var(--accent);
}

.a-propos-conclusion {
  text-align: center;
  font-size: 1.25rem !important;
  margin-top: var(--space-lg) !important;
  padding-top: var(--space-md);
  border-top: 1px solid rgba(44, 24, 16, 0.1);
}

/* ============================================
   RÉALISATIONS SECTION
   ============================================ */

.realisations {
  background:
    linear-gradient(rgba(250, 246, 240, 0.93), rgba(250, 246, 240, 0.93)),
    url("images/fond/bois-1.jpg") center/cover no-repeat;
}

.realisations .section-header,
.realisations .gallery {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

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

.gallery-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: var(--wood-dark);
  border-radius: 4px;
  flex-grow: 1;
  height: 200px;
  /* Reset button styles */
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition:
    transform 0.5s ease,
    filter 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
  filter: brightness(0.7);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  background: linear-gradient(
    to top,
    rgba(44, 24, 16, 0.85) 0%,
    rgba(44, 24, 16, 0.3) 40%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gallery-item:hover .gallery-overlay,
.gallery-item:focus .gallery-overlay {
  opacity: 1;
}

.gallery-item:focus {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.gallery-item:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.gallery-overlay span {
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 400;
  text-align: left;
  padding: var(--space-sm);
  transform: translateY(10px);
  transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-overlay span {
  transform: translateY(0);
}

/* Fallback pour les anciennes placeholders */
.gallery-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, var(--wood-medium), var(--wood-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s ease;
}

.gallery-placeholder span {
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  text-align: center;
  padding: var(--space-sm);
}

.gallery-item:hover .gallery-placeholder {
  transform: scale(1.05);
}

/* ============================================
   CONTACT SECTION
   ============================================ */

.contact {
  background:
    linear-gradient(rgba(237, 228, 211, 0.8), rgba(237, 228, 211, 0.8)),
    url("images/fond/bois-2.jpg") center/cover no-repeat;
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  max-width: 1200px;
  margin: 0 auto;
  align-items: start;
}

.contact-info h2 {
  margin-bottom: var(--space-sm);
}

.contact-info > p {
  margin-bottom: var(--space-md);
}

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

.contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-light);
}

.contact-item svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

.contact-form {
  background: var(--cream);
  padding: var(--space-md);
  border: 1px solid rgba(44, 24, 16, 0.08);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(44, 24, 16, 0.1);
}

.form-group {
  margin-bottom: var(--space-md);
}

.contact-form label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--wood-dark);
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(44, 24, 16, 0.15);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.6);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  transition:
    border-color 0.3s ease,
    background-color 0.3s ease,
    box-shadow 0.3s ease;
}

.contact-form input:hover,
.contact-form textarea:hover {
  border-color: rgba(44, 24, 16, 0.25);
  background: rgba(255, 255, 255, 0.8);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 3px rgba(166, 124, 82, 0.15);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--text-light);
  opacity: 0.5;
  font-style: italic;
}

.contact-form .btn {
  width: 100%;
}

.contact-form .required {
  color: #c0392b;
  font-weight: 500;
}

.form-required-note {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: var(--space-sm);
  text-align: right;
}

/* Messages d'erreur des champs */
.field-error {
  display: none;
  font-size: 0.85rem;
  color: #c0392b;
  margin-top: 0.4rem;
  padding-left: 0.25rem;
}

.field-error.visible {
  display: block;
}

.contact-form input:invalid:not(:placeholder-shown),
.contact-form input.invalid {
  border-color: #c0392b;
  background: rgba(192, 57, 43, 0.05);
}

.contact-form input:invalid:not(:placeholder-shown):focus,
.contact-form input.invalid:focus {
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.15);
}

/* Consentement RGPD */
fieldset.form-group-consent {
  margin: 0;
  margin-bottom: var(--space-md);
  padding: 1rem;
  padding-top: 0.5rem;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(44, 24, 16, 0.1);
  border-radius: 6px;
  min-width: 0;
}

legend.consent-label {
  float: left;
  width: 100%;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-light);
  margin-bottom: 0.75rem;
  line-height: 1.6;
  padding: 0;
}

.consent-label a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px dotted var(--accent);
  transition: border-color 0.3s ease;
}

.consent-label a:hover {
  border-bottom-style: solid;
}

.consent-options {
  clear: both;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-form .radio-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text);
  padding: 0.6rem 0.75rem;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  margin-bottom: 0;
}

.contact-form .radio-label:hover {
  background: rgba(166, 124, 82, 0.08);
}

.contact-form .radio-label input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-custom {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(44, 24, 16, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.radio-custom::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  transform: scale(0);
  transition: transform 0.15s ease;
}

.contact-form .radio-label:has(input[type="radio"]:checked) {
  background: rgba(166, 124, 82, 0.1);
  border-color: rgba(166, 124, 82, 0.3);
}

.contact-form .radio-label input[type="radio"]:checked + .radio-custom {
  border-color: var(--accent);
}

.contact-form .radio-label input[type="radio"]:checked + .radio-custom::after {
  transform: scale(1);
}

.contact-form .radio-label input[type="radio"]:focus + .radio-custom {
  box-shadow: 0 0 0 3px rgba(166, 124, 82, 0.15);
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  background: var(--wood-dark);
  color: var(--cream);
  padding: var(--space-lg) var(--space-md) var(--space-md);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-lg);
}

.footer-brand .logo {
  color: var(--cream);
  display: block;
  margin-bottom: var(--space-sm);
}

.footer-brand p {
  color: rgba(250, 246, 240, 0.6);
  font-size: 0.9rem;
  max-width: 400px;
}

.footer-links {
  display: flex;
  gap: var(--space-md);
}

.footer-links a {
  color: rgba(250, 246, 240, 0.6);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--cream);
}

.footer-legal {
  width: 100%;
  margin: auto;
  margin-bottom: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(250, 246, 240, 0.1);
  max-width: 1200px;
}

.footer-legal h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  color: rgba(250, 246, 240, 0.7);
  margin-bottom: var(--space-sm);
}

.footer-legal p {
  max-width: 1200px;
  font-size: 0.8rem;
  line-height: 1.6;
  color: rgba(250, 246, 240, 0.45);
  text-align: justify;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: var(--space-md);
  border-top: 1px solid rgba(250, 246, 240, 0.1);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: rgba(250, 246, 240, 0.4);
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: calc(var(--space-lg) + 60px);
  }

  .hero-tag {
    padding-left: 0;
  }

  .hero-tag::before {
    display: none;
  }

  .hero-visual {
    height: 50vh;
    order: -1;
  }

  .hero p {
    margin-left: auto;
    margin-right: auto;
  }

  .savoir-faire-content {
    grid-template-columns: 1fr;
  }

  .savoir-faire-text {
    padding-right: 0;
  }

  .savoir-faire-gallery {
    flex-direction: row;
  }

  .contact-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --space-lg: 3rem;
    --space-xl: 5rem;
  }

  .nav-links {
    display: none;
  }

  .share-btn {
    margin-left: auto;
  }

  .savoir-faire-gallery {
    flex-direction: column;
  }

  .sf-gallery-column {
    flex-direction: row;
  }

  .sf-gallery-item {
    max-height: 200px;
  }

  .gallery-row {
    flex-wrap: wrap;
  }

  .gallery-item {
    flex-basis: calc(50% - 4px);
    flex-grow: 0 !important;
  }

  /* Gallery item aspect ratio classes for mobile */
  .gallery-item.vertical {
    flex-basis: 100%;
    height: 400px;
  }

  .gallery-item.horizontal {
    flex-basis: 100%;
    height: 180px;
  }

  .gallery-item.square {
    flex-basis: 100%;
    height: 320px;
  }

  .gallery-overlay {
    opacity: 1;
    background: linear-gradient(
      to top,
      rgba(44, 24, 16, 0.7) 0%,
      transparent 60%
    );
    pointer-events: none;
  }

  .gallery-overlay span {
    transform: translateY(0);
  }

  /* Disable hover effects on mobile */
  .gallery-item:hover img {
    transform: none;
    filter: none;
  }

  .sf-gallery-item:hover img {
    transform: none;
  }

  .footer-content {
    flex-direction: column;
    gap: var(--space-md);
  }

  .footer-links {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .gallery-item {
    flex-basis: 100%;
  }
}

/* Form Messages */
.form-message {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.form-message.success {
  background-color: rgba(76, 175, 80, 0.15);
  border: 1px solid rgba(76, 175, 80, 0.4);
  color: #2e7d32;
}

.form-message.error {
  background-color: rgba(244, 67, 54, 0.15);
  border: 1px solid rgba(244, 67, 54, 0.4);
  color: #c62828;
}

/* ============================================
   IMAGE MODAL
   ============================================ */

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(26, 22, 18, 0.95);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.image-modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: var(--space-md);
}

.image-modal img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.image-modal.active img {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 48px;
  height: 48px;
  background: rgba(250, 246, 240, 0.1);
  border: 1px solid rgba(250, 246, 240, 0.2);
  border-radius: 50%;
  color: var(--cream);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 1001;
}

.modal-close:hover {
  background: rgba(250, 246, 240, 0.2);
  transform: rotate(90deg);
}

@media (max-width: 768px) {
  .modal-close {
    top: var(--space-sm);
    right: var(--space-sm);
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }

  .image-modal img {
    max-width: 95vw;
    max-height: 85vh;
  }
}
