/* ==========================================================================
   WAVERLY ATELIER — ARCHITECTURAL STYLESHEET
   ========================================================================== */

/* Modern Dialog & Modal Scroll Containment (per modern-web-guidance) */
dialog:modal {
  overscroll-behavior: contain;
  margin: auto;
  border: none;
  padding: 0;
  background: transparent;
}

dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background-color: rgba(18, 18, 17, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Subtle Architectural Grid & Paper Grain Texture */
.bg-grain {
  background-image: radial-gradient(rgba(18, 18, 17, 0.045) 1px, transparent 1px);
  background-size: 20px 20px;
}

.bg-dark-grid {
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Fine architectural border lines (calque d'architecte) */
.tech-border {
  border-color: #DDD7CD;
}

.tech-border-dark {
  border-color: #2E2E2B;
}

/* Before / After Split Slider */
.comparison-container {
  position: relative;
  overflow: hidden;
  user-select: none;
  touch-action: pan-y;
}

.comparison-slider {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #FFFFFF;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.5);
  cursor: ew-resize;
  z-index: 25;
}

/* Custom Scrollbar for Project & Drawer panels */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #F8F6F0;
}

::-webkit-scrollbar-thumb {
  background: #C8C2B6;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #C25E2E;
}

/* Subtle animation states */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Print styles for technical estimates / Wavy Factu sheets */
@media print {
  header, footer, aside, .no-print {
    display: none !important;
  }
  body {
    background: white !important;
    color: black !important;
  }
  .print-only {
    display: block !important;
  }
}
