html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  overflow-x: clip;
}

::selection {
  background-color: rgba(232, 160, 191, 0.4);
  color: #1E1B2E;
}

/* ——— Header ——— */

#site-header {
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

#site-header nav {
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: min-height 0.3s ease, padding 0.3s ease;
}

#site-header .site-logo {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

#site-header.scrolled {
  background: rgba(253, 248, 243, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(30, 27, 46, 0.07);
}

#site-header.scrolled nav {
  min-height: 3.75rem;
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: #1E1B2E;
  transition: width 0.35s ease;
}

.nav-link:hover::after { width: 100%; }
.nav-link.active { color: #1E1B2E; }
.nav-link.active::after { width: 100%; }

/* ——— Menu mobile ——— */

/* Burger button — 3 barres animées en croix */
#menu-btn {
  position: relative;
  z-index: 10;
}

.burger-line {
  position: absolute;
  left: 50%;
  height: 1.5px;
  background: #1E1B2E;
  border-radius: 2px;
  transform-origin: center;
  transition:
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    opacity   0.2s  ease,
    top       0.3s  cubic-bezier(0.4, 0, 0.2, 1),
    width     0.3s  ease;
}

.burger-line:nth-child(1) { width: 22px; top: calc(50% - 6px); transform: translateX(-50%); }
.burger-line:nth-child(2) { width: 14px; top: 50%;              transform: translateX(-1px); }
.burger-line:nth-child(3) { width: 22px; top: calc(50% + 6px);  transform: translateX(-50%); }

#menu-btn[aria-expanded="true"] .burger-line:nth-child(1) { top: 50%; transform: translateX(-50%) rotate(45deg); }
#menu-btn[aria-expanded="true"] .burger-line:nth-child(2) { opacity: 0; transform: translateX(10px) scaleX(0); }
#menu-btn[aria-expanded="true"] .burger-line:nth-child(3) { top: 50%; transform: translateX(-50%) rotate(-45deg); }

/* Backdrop */
#nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 48;
  background: rgba(30, 27, 46, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

#nav-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

/* Drawer depuis la droite */
#nav-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 49;
  width: min(100%, 360px);
  max-width: 360px;
  background: #FDF8F3;
  padding: 5.5rem 2rem 2.5rem;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transform: translateX(100%);
  visibility: hidden;
  transition:
    transform 0.42s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0s linear 0.42s;
  box-shadow: -1px 0 0 rgba(30, 27, 46, 0.06), -24px 0 64px rgba(30, 27, 46, 0.10);
  pointer-events: none;
}

#nav-panel.is-open {
  transform: translateX(0);
  visibility: visible;
  transition:
    transform 0.42s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0s linear 0s;
  pointer-events: auto;
}

/* Liens — apparition décalée */
.nav-mobile-link {
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

#nav-panel.is-open .nav-mobile-link:nth-child(1) { opacity: 1; transform: none; transition-delay: 0.12s; }
#nav-panel.is-open .nav-mobile-link:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.18s; }
#nav-panel.is-open .nav-mobile-link:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.24s; }
#nav-panel.is-open .nav-mobile-link:nth-child(4) { opacity: 1; transform: none; transition-delay: 0.30s; }

/* Page active dans le menu mobile */
#nav-panel a[aria-current="page"] .nav-mobile-page-label { color: #5B7DB1; }

/* ——— Hero ——— */

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

.fade-up-1 { animation: fadeUp 0.8s ease both; }
.fade-up-2 { animation: fadeUp 0.8s ease 0.15s both; }
.fade-up-3 { animation: fadeUp 0.8s ease 0.3s both; }

@keyframes scaleIn {
  from { opacity: 0; transform: scale(1.04); }
  to   { opacity: 1; transform: scale(1); }
}

.hero-img-anim { animation: scaleIn 1.1s ease both; }

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.4; }
  50%       { transform: translateX(-50%) translateY(6px); opacity: 0.9; }
}

.scroll-indicator { animation: scrollBounce 2.2s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .fade-up-1, .fade-up-2, .fade-up-3, .hero-img-anim, .scroll-indicator {
    animation: none;
  }
}

/* ——— Formulaire contact ——— */

.form-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(30, 27, 46, 0.45);
  margin-bottom: 0.5rem;
}

.form-input {
  display: block;
  width: 100%;
  padding: 0.875rem 1rem;
  background: white;
  border: 1px solid rgba(30, 27, 46, 0.12);
  border-radius: 0.75rem;
  font-size: 0.9rem;
  color: #1E1B2E;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  appearance: none;
}

.form-input::placeholder { color: rgba(30, 27, 46, 0.3); }

.form-input:focus {
  border-color: #5B7DB1;
  box-shadow: 0 0 0 3px rgba(91, 125, 177, 0.12);
}

.form-field.has-error .form-input {
  border-color: #D946EF;
  box-shadow: 0 0 0 3px rgba(217, 70, 239, 0.1);
}

.form-error {
  margin-top: 0.4rem;
  font-size: 0.72rem;
  color: #D946EF;
}

select.form-input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231E1B2E' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; cursor: pointer; }

/* ——— Galerie ——— */

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.1rem;
  border-radius: 9999px;
  border: 1px solid rgba(30, 27, 46, 0.12);
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(30, 27, 46, 0.55);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: rgba(30, 27, 46, 0.3);
  color: #1E1B2E;
}

.filter-btn.active {
  background: #1E1B2E;
  border-color: #1E1B2E;
  color: #FDF8F3;
}

.filter-btn .count {
  font-size: 0.68rem;
  opacity: 0.6;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 260px;
  gap: 1rem;
}

@media (max-width: 1023px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 220px;
  }
}

@media (max-width: 639px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 280px;
  }
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  cursor: pointer;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.gallery-item.tall {
  grid-row: span 2;
}

.gallery-item.hidden-item {
  display: none;
}

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

.gallery-item:hover img {
  transform: scale(1.04);
}

.gallery-item-caption {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(30,27,46,0.75) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem;
}

.gallery-item:hover .gallery-item-caption {
  opacity: 1;
}

.gallery-item-caption p {
  color: white;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

.gallery-item-caption span {
  display: block;
  color: rgba(255,255,255,0.55);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-top: 0.25rem;
}

/* ——— Lightbox ——— */

#lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(30, 27, 46, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#lightbox.open {
  opacity: 1;
  visibility: visible;
}

#lightbox-img {
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 0.75rem;
  transition: opacity 0.2s ease;
}

#lightbox-info {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  white-space: nowrap;
}

#lightbox-title {
  color: white;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
}

#lightbox-technique {
  color: rgba(255,255,255,0.45);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-top: 0.25rem;
}

#lightbox-counter {
  color: rgba(255,255,255,0.3);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  margin-top: 0.4rem;
}

.lb-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.lb-btn:hover {
  background: rgba(255,255,255,0.15);
  color: white;
}

#lb-prev { left: 1rem; }
#lb-next { right: 1rem; }

#lb-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

#lb-close:hover { background: rgba(255,255,255,0.15); color: white; }

/* SweetAlert2 — contact Anne Bretel */
.anne-swal-popup {
  font-family: "Source Sans 3", system-ui, sans-serif !important;
  border-radius: 1rem !important;
  padding: 1.75rem 1.5rem 1.5rem !important;
}

.anne-swal-title {
  font-family: Fraunces, Georgia, serif !important;
  font-size: 1.35rem !important;
  font-weight: 600 !important;
  color: #1E1B2E !important;
}

.anne-swal-text {
  font-size: 0.95rem !important;
  line-height: 1.6 !important;
  color: rgba(30, 27, 46, 0.65) !important;
}

.anne-swal-btn {
  border-radius: 9999px !important;
  padding: 0.65rem 1.5rem !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
}

.swal2-icon.swal2-success {
  border-color: #5B7DB1 !important;
  color: #5B7DB1 !important;
}

.swal2-icon.swal2-success [class^='swal2-success-line'] {
  background-color: #5B7DB1 !important;
}

.swal2-icon.swal2-success .swal2-success-ring {
  border-color: rgba(91, 125, 177, 0.3) !important;
}
