/* Styles modernes & élégants — Application Locatif Mairie de Grimaud */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4, .font-heading {
  font-family: 'Outfit', 'Plus Jakarta Sans', system-ui, sans-serif;
}

/* Scrollbars modernes */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Animation douce */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.985); }
  to { opacity: 1; transform: scale(1); }
}
.animate-fadeIn {
  animation: fadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Sidebar Navigation Items */
.sidebar-item {
  color: #94a3b8;
  position: relative;
  transition: all 0.15s ease;
}
.sidebar-item:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.06);
}
.sidebar-item.active {
  color: #ffffff;
  background-color: #1e3a8a;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.35);
}
.sidebar-item.active i {
  color: #93c5fd !important;
}

/* Toast notifications */
.toast-msg {
  pointer-events: auto;
  animation: fadeIn 0.2s ease-out;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* Canvas de signature */
canvas {
  touch-action: none;
}

/* Timeline Booking Interactive */
.booking-timeline-table {
  table-layout: fixed;
  width: max-content;
  min-width: 1400px;
  border-collapse: separate;
  border-spacing: 0;
}

.booking-day-cell {
  width: 36px;
  min-width: 36px;
  max-width: 36px;
  height: 38px;
  padding: 0 !important;
  text-align: center;
  vertical-align: middle;
  border-right: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
}

.booking-day-cell > .cell-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  transition: all 0.12s ease;
}

.booking-day-cell > .cell-inner.occupied {
  background-color: #ffe4e6;
  color: #e11d48;
  cursor: pointer;
}
.booking-day-cell > .cell-inner.occupied:hover {
  background-color: #fecdd3;
}

.booking-day-cell > .cell-inner.free {
  background-color: #f0fdf4;
  color: #16a34a;
  cursor: pointer;
}
.booking-day-cell > .cell-inner.free:hover {
  background-color: #bbf7d0;
}

.booking-day-cell > .cell-inner.maintenance {
  background-color: #fef3c7;
  color: #d97706;
}

/* Grille Calendrier Mensuel Type Booking / Airbnb (Par Logement) */
.calendar-day-box {
  min-height: 85px;
  padding: 8px;
  transition: all 0.15s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.calendar-day-box:hover {
  box-shadow: inset 0 0 0 2px #3b82f6;
  z-index: 2;
}
.calendar-day-box.is-occupied {
  background-color: #fff1f2;
  border-color: #fecdd3;
}
.calendar-day-box.is-free {
  background-color: #f0fdf4;
  border-color: #bbf7d0;
}
.calendar-day-box.is-maintenance {
  background-color: #fefce8;
  border-color: #fef08a;
}
.calendar-day-box.is-other-month {
  background-color: #f8fafc;
  opacity: 0.45;
}

/* Photo Thumbnail */
.photo-thumb-container {
  position: relative;
  display: inline-block;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  border: 1px solid #e2e8f0;
}

.photo-thumb-container img {
  width: 80px;
  height: 80px;
  object-fit: cover;
}

.photo-thumb-container .delete-photo-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0,0,0,0.65);
  color: white;
  border-radius: 9999px;
  padding: 3px;
  cursor: pointer;
}

/* ========================================================== */
/* IMPRESSION OFFICIELLE DE L'ÉTAT DES LIEUX                  */
/* ========================================================== */
@media print {
  body {
    background: white !important;
    color: black !important;
  }

  aside, header, .no-print, nav, #authScreen, #sidebarBackdrop {
    display: none !important;
  }

  main {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
  }

  #modalViewInspection {
    position: static !important;
    background: transparent !important;
    padding: 0 !important;
    display: block !important;
  }

  #modalViewInspection > div {
    max-width: 100% !important;
    box-shadow: none !important;
    border: none !important;
  }

  .print-area {
    padding: 0 !important;
    margin: 0 !important;
    font-size: 10pt !important;
  }

  .print-break-inside-avoid {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
