/* ============================================
   NOTRE CARNET - Digital Intimate Journal
   ============================================ */

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

html {
  scroll-behavior: smooth;
}

::selection {
  background: rgba(201, 168, 124, 0.35);
  color: #4a3f35;
}

body {
  font-family: 'Lato', sans-serif;
  font-weight: 300;
  font-size: 16px;
  color: #4a3f35;
  background-color: #faf6f0;
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
}

/* Subtle paper texture overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(139, 119, 90, 0.012) 2px,
      rgba(139, 119, 90, 0.012) 4px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 2px,
      rgba(139, 119, 90, 0.008) 2px,
      rgba(139, 119, 90, 0.008) 4px
    ),
    radial-gradient(ellipse at 20% 50%, rgba(201, 168, 124, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(201, 168, 124, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(139, 119, 90, 0.02) 0%, transparent 50%);
}

body > * {
  position: relative;
  z-index: 1;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: 'Lato', sans-serif;
}

/* --- Typography --- */
h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  line-height: 1.3;
  color: #4a3f35;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.3rem; }

p {
  line-height: 1.7;
}

/* --- Navigation --- */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(250, 246, 240, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #e8ddd0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 1000;
  transition: transform 0.3s ease;
}

.nav-brand {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.4rem;
  font-weight: 600;
  color: #4a3f35;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-brand-img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #e8ddd0;
  flex-shrink: 0;
  image-rendering: high-quality;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #4a3f35;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.72rem;
  font-weight: 400;
  color: #4a3f35;
  padding: 0.5rem 0.75rem;
  border-bottom: 2px solid transparent;
  transition: color 0.3s ease, border-color 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: #c9a87c;
}

.nav-link.active {
  color: #c9a87c;
  border-bottom-color: #c9a87c;
}

.nav-logout {
  margin-left: 0.5rem;
  opacity: 0.6;
  font-size: 0.68rem;
}

.nav-logout:hover {
  opacity: 1;
  color: #c27c7c;
}

/* --- Cards --- */
.card {
  background: #fffdf9;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 15px rgba(139, 119, 90, 0.08);
  border: 1px solid #e8ddd0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(139, 119, 90, 0.14);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: #c9a87c;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1.5rem;
  font-family: 'Lato', sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.btn:hover {
  background: #b8956a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(201, 168, 124, 0.3);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-outline {
  background: transparent;
  border: 2px solid #c9a87c;
  color: #c9a87c;
}

.btn-outline:hover {
  background: rgba(201, 168, 124, 0.1);
  color: #b8956a;
  border-color: #b8956a;
}

.btn-danger {
  background: #c27c7c;
}

.btn-danger:hover {
  background: #b06a6a;
  box-shadow: 0 4px 12px rgba(194, 124, 124, 0.3);
}

.btn-small {
  padding: 0.35rem 0.9rem;
  font-size: 0.8rem;
}

/* --- Forms --- */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #4a3f35;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.7rem;
  border: 1px solid #e8ddd0;
  border-radius: 8px;
  background: #fffdf9;
  font-family: 'Lato', sans-serif;
  font-size: 0.95rem;
  color: #4a3f35;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #c9a87c;
  outline: none;
  box-shadow: 0 0 0 3px rgba(201, 168, 124, 0.15);
}

input::placeholder,
textarea::placeholder {
  color: #b8a99a;
}

textarea {
  min-height: 80px;
  resize: vertical;
}

input[type="file"] {
  padding: 0.5rem;
  font-size: 0.85rem;
  background: #fffdf9;
  cursor: pointer;
}

input[type="file"]::file-selector-button {
  background: #c9a87c;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.35rem 0.8rem;
  font-family: 'Lato', sans-serif;
  font-size: 0.8rem;
  cursor: pointer;
  margin-right: 0.5rem;
  transition: background 0.3s ease;
}

input[type="file"]::file-selector-button:hover {
  background: #b8956a;
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%234a3f35' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

/* --- Login Page --- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.login-container {
  max-width: 380px;
  width: 100%;
  padding: 3rem 2rem;
  background: #fffdf9;
  border-radius: 12px;
  box-shadow: 0 2px 15px rgba(139, 119, 90, 0.08);
  border: 1px solid #e8ddd0;
  text-align: center;
}

.login-illustration {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #e8ddd0;
  margin: 0 auto 1.2rem;
  display: block;
  box-shadow: 0 4px 20px rgba(139, 119, 90, 0.15);
  image-rendering: high-quality;
}

.login-title {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 2.4rem;
  margin-bottom: 0.3rem;
  color: #4a3f35;
}

.login-subtitle {
  font-size: 0.95rem;
  color: #8b7a6a;
  margin-bottom: 2rem;
  font-style: italic;
}

.login-error {
  color: #c27c7c;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  animation: fadeIn 0.3s ease;
}

.login-container .form-group {
  text-align: left;
}

/* --- Page Container --- */
.page {
  max-width: 900px;
  margin: 80px auto 2rem;
  padding: 0 1.5rem;
}

.page-header {
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.page-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: #c9a87c;
  border-radius: 2px;
}

/* --- Add Form (collapsible) --- */
.add-form {
  background: #fffdf9;
  border-radius: 12px;
  box-shadow: 0 2px 15px rgba(139, 119, 90, 0.08);
  border: 1px solid #e8ddd0;
  margin-bottom: 2rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.3s ease;
  padding: 0 1.5rem;
  opacity: 0;
}

.add-form.open {
  max-height: 1000px;
  padding: 1.5rem;
  opacity: 1;
  overflow: visible;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.form-row > .form-group {
  flex: 1;
}

.form-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

/* --- Timeline --- */
.timeline {
  position: relative;
  padding-left: 30px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(201, 168, 124, 0.3);
  border-radius: 1px;
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -26px;
  top: 1.2rem;
  width: 16px;
  height: 16px;
  background: #c9a87c;
  border-radius: 50%;
  border: 3px solid #faf6f0;
  box-shadow: 0 0 0 1px rgba(201, 168, 124, 0.3);
}

.timeline-card {
  background: #fffdf9;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 15px rgba(139, 119, 90, 0.08);
  border: 1px solid #e8ddd0;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(139, 119, 90, 0.14);
}

.timeline-date {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #c9a87c;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.timeline-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.timeline-description {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #6b5e52;
}

.timeline-image,
.timeline-video {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
  border-radius: 8px;
  margin-top: 1rem;
  box-shadow: 0 2px 10px rgba(139, 119, 90, 0.12);
}

/* --- Timeline Media Collapsible --- */
.timeline-media-collapse {
  position: relative;
  margin-top: 1rem;
}

.timeline-media-inner {
  max-height: 250px;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

.timeline-media-collapse.expanded .timeline-media-inner {
  max-height: 2000px;
}

.timeline-media-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(transparent, #fffdf9);
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.timeline-media-collapse.expanded .timeline-media-fade {
  opacity: 0;
}

.timeline-media-toggle {
  display: block;
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.5rem;
  background: none;
  border: 1px solid #e8ddd0;
  border-radius: 8px;
  color: #c9a87c;
  font-family: 'Lato', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.timeline-media-toggle:hover {
  background: rgba(201, 168, 124, 0.08);
  border-color: #c9a87c;
}

/* --- Timeline Media Gallery (multiple images/videos) --- */
.timeline-media-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
}

.timeline-media-gallery .timeline-image,
.timeline-media-gallery .timeline-video {
  width: 100%;
  margin-top: 0;
}

.timeline-image,
.timeline-video {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.timeline-image:hover,
.timeline-video:hover {
  transform: scale(1.02);
}

/* --- Timeline Lightbox --- */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 1rem;
  cursor: pointer;
}

.lightbox-overlay.active {
  opacity: 1;
}

.lightbox-overlay img,
.lightbox-overlay video {
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
  cursor: default;
}

.lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s ease;
  z-index: 3001;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.lightbox-close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}

/* --- Image Upload Preview --- */
.image-preview-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.image-preview-item {
  width: 80px;
  text-align: center;
}

.image-preview-thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e8ddd0;
}

.image-preview-name {
  display: block;
  font-size: 0.65rem;
  color: #8b7a6a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 80px;
  margin-top: 0.2rem;
}

/* --- Upload Progress Bar --- */
.upload-progress {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.75rem 0;
}

.upload-progress-bar {
  flex: 1;
  height: 8px;
  background: #e8ddd0;
  border-radius: 4px;
  overflow: hidden;
}

.upload-progress-fill {
  height: 100%;
  width: 0%;
  background: #8b7a6a;
  border-radius: 4px;
  transition: width 0.2s ease;
}

.upload-progress-text {
  font-size: 0.8rem;
  color: #8b7a6a;
  min-width: 3em;
  text-align: right;
}

/* --- Media Gallery Page --- */
.media-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}

.media-gallery-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #fffdf9;
  box-shadow: 0 2px 10px rgba(139, 119, 90, 0.1);
  border: 1px solid #e8ddd0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.media-gallery-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 119, 90, 0.15);
}

.media-gallery-image,
.media-gallery-video {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

.media-source-badge {
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
  background: rgba(201, 168, 124, 0.9);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
  pointer-events: none;
}

.media-download-btn {
  position: absolute;
  top: 0.4rem;
  left: 0.4rem;
  width: 26px;
  height: 26px;
  background: rgba(201, 168, 124, 0.9);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  text-decoration: none;
}

.media-gallery-item:hover .media-download-btn {
  opacity: 1;
}

.media-download-btn:hover {
  background: #b8956a;
  transform: scale(1.1);
}

.media-delete-btn {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  width: 26px;
  height: 26px;
  background: rgba(194, 124, 124, 0.9);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.media-gallery-item:hover .media-delete-btn {
  opacity: 1;
}

.media-delete-btn:hover {
  background: #b06a6a;
  transform: scale(1.1);
}

/* --- Confirm Dialog --- */
.confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 1rem;
}

.confirm-overlay.active {
  opacity: 1;
}

.confirm-dialog {
  background: #fffdf9;
  border-radius: 12px;
  padding: 2rem;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.25);
  border: 1px solid #e8ddd0;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.confirm-overlay.active .confirm-dialog {
  transform: translateY(0);
}

.confirm-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.confirm-message {
  font-size: 0.9rem;
  color: #8b7a6a;
  margin-bottom: 1.5rem;
}

.confirm-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

/* --- Polaroid / Souvenirs Gallery --- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.polaroid {
  background: #fff;
  padding: 0.8rem 0.8rem 2.5rem;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
  transform: rotate(var(--rotation, 0deg));
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  position: relative;
}

.polaroid:hover {
  transform: rotate(0deg) scale(1.03);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  z-index: 2;
}

.polaroid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.polaroid-info {
  padding-top: 0.5rem;
  font-size: 0.85rem;
  color: #6b5e52;
}

.polaroid-lieu {
  font-weight: 700;
  color: #4a3f35;
}

.polaroid-date {
  font-size: 0.75rem;
  color: #a0937f;
  margin-top: 0.15rem;
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 1rem;
}

.modal-overlay.active {
  opacity: 1;
}

.modal-content {
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  background: #fffdf9;
  border-radius: 12px;
  padding: 2rem;
  position: relative;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.25);
  border: 1px solid #e8ddd0;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #4a3f35;
  opacity: 0.6;
  transition: opacity 0.3s ease;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.modal-close:hover {
  opacity: 1;
  background: rgba(139, 119, 90, 0.1);
}

.modal-image {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.modal-lieu {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  margin-bottom: 0.3rem;
}

.modal-date {
  font-size: 0.85rem;
  color: #a0937f;
  margin-bottom: 1rem;
}

.modal-description {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #6b5e52;
}

/* --- Autocomplete --- */
.autocomplete-wrap {
  position: relative;
}

.autocomplete-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fffdf9;
  border: 1px solid #e8ddd0;
  border-top: none;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 8px 24px rgba(139, 119, 90, 0.15);
  z-index: 100;
  max-height: 320px;
  overflow-y: auto;
}

.autocomplete-dropdown.open {
  display: block;
}

.autocomplete-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.8rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.autocomplete-item:hover {
  background: rgba(201, 168, 124, 0.1);
}

.autocomplete-item + .autocomplete-item {
  border-top: 1px solid #f0e8dc;
}

.autocomplete-poster {
  width: 36px;
  height: 54px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f0e8dc;
}

.autocomplete-poster-empty {
  width: 36px;
  height: 54px;
  border-radius: 4px;
  flex-shrink: 0;
  background: #f0e8dc;
}

.autocomplete-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.autocomplete-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #4a3f35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.autocomplete-year {
  font-size: 0.75rem;
  color: #a0937f;
}

/* --- Watchlist --- */
.watched-filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.4rem 1rem;
  border: 1.5px solid #e8ddd0;
  border-radius: 20px;
  background: transparent;
  font-family: 'Lato', sans-serif;
  font-size: 0.8rem;
  color: #4a3f35;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-btn:hover {
  border-color: #c9a87c;
  color: #c9a87c;
}

.filter-btn.active {
  background: #c9a87c;
  border-color: #c9a87c;
  color: #fff;
}

.watched-type {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  flex-shrink: 0;
}

.watched-type[data-type="film"] {
  background: rgba(201, 168, 124, 0.2);
  color: #b8956a;
}

.watched-type[data-type="serie"] {
  background: rgba(124, 174, 201, 0.2);
  color: #5a9ab8;
}

.watched-type[data-type="anime"] {
  background: rgba(201, 124, 168, 0.2);
  color: #b86a96;
}

.watchlist-section {
  margin-bottom: 2rem;
}

.watchlist-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: #4a3f35;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.watchlist-count {
  font-family: 'Lato', sans-serif;
  font-size: 0.8rem;
  background: #e8ddd0;
  color: #8b7a6a;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  font-weight: 700;
}

.watchlist-grid {
  display: grid;
  gap: 0.75rem;
}

.watchlist-card {
  background: #fffdf9;
  border-radius: 12px;
  padding: 1.2rem 1.5rem;
  box-shadow: 0 2px 15px rgba(139, 119, 90, 0.08);
  border: 1px solid #e8ddd0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.watchlist-card.has-poster {
  display: flex;
  gap: 1rem;
  padding: 0;
  overflow: hidden;
  min-height: 140px;
}


.watchlist-poster-wrap {
  flex-shrink: 0;
  width: 95px;
  align-self: stretch;
  position: relative;
  overflow: hidden;
  border-radius: 12px 0 0 12px;
}

.watchlist-poster {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wl-vu-btn {
  margin-top: 0.8rem;
  width: 100%;
  padding: 0.45rem 0;
  border: 1.5px solid #c9a87c;
  border-radius: 8px;
  background: transparent;
  color: #c9a87c;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'Lato', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.03em;
}

.wl-vu-btn:hover {
  background: #c9a87c;
  color: #fff;
}

.wl-noter-btn {
  margin-top: 0.8rem;
  margin-bottom: 0.3rem;
  width: 100%;
  padding: 0.45rem 0;
  border: 1.5px solid #c9a87c;
  border-radius: 8px;
  background: transparent;
  color: #c9a87c;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'Lato', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.03em;
}

.wl-noter-btn:hover {
  background: #c9a87c;
  color: #fff;
}

.wl-corner-actions {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  gap: 0.2rem;
  z-index: 2;
}

.wl-edit-corner {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: #c9a87c;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  line-height: 1;
  transition: color 0.2s, background 0.2s;
}

.wl-edit-corner:hover {
  color: #8b775a;
  background: rgba(201, 168, 124, 0.1);
}

.watchlist-card-body {
  flex: 1;
  padding: 1.2rem 1.5rem 1.2rem 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.watchlist-card:not(.has-poster) .watchlist-card-body {
  padding: 0;
}

.watchlist-year {
  font-size: 0.7rem;
  color: #a0937f;
  font-weight: 600;
}

.watchlist-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(139, 119, 90, 0.14);
}

.watchlist-to-watch {
  border-left: 3px solid #c9a87c;
}

.watchlist-to-watch.has-poster {
  border-left: none;
}

.watchlist-to-watch.has-poster .watchlist-poster-wrap {
  border-left: 3px solid #c9a87c;
}

.watchlist-en-cours {
  border-left: 3px solid #e8a849;
}

.watchlist-en-cours.has-poster {
  border-left: none;
}

.watchlist-en-cours.has-poster .watchlist-poster-wrap {
  border-left: 3px solid #e8a849;
}

.progress-block {
  margin-top: 0.7rem;
  padding: 0.6rem 0.7rem;
  background: #fdf8f0;
  border: 1px solid #ecdcc6;
  border-radius: 8px;
}

.progress-block-info {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.3rem;
}

.progress-block-current {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: #4a3f35;
}

.progress-block-total {
  font-family: 'Lato', sans-serif;
  font-size: 0.78rem;
  color: #9a8a7a;
  font-weight: 500;
}

.progress-block-bar {
  width: 100%;
  height: 6px;
  background: #e8ddd0;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.35rem;
}

.progress-block-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #e8a849, #d4943a);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.progress-block-pct {
  text-align: right;
  font-family: 'Lato', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: #e8a849;
  margin-top: 0.2rem;
}

.wl-action-btns {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.wl-action-btns .wl-vu-btn,
.wl-action-btns .wl-encours-btn {
  margin-top: 0;
  flex: 1;
}

.wl-encours-btn {
  padding: 0.45rem 0;
  border: 1.5px solid #e8a849;
  border-radius: 8px;
  background: transparent;
  color: #e8a849;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'Lato', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.03em;
}

.wl-encours-btn:hover {
  background: #e8a849;
  color: #fff;
}

.progress-hint {
  font-weight: 400;
  font-size: 0.8rem;
  color: #9a8a7a;
}

.progress-season-select {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1.5px solid #d4c5b0;
  border-radius: 8px;
  background: #faf6f0;
  color: #4a3f35;
  font-family: 'Lato', sans-serif;
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.progress-season-select:focus {
  outline: none;
  border-color: #e8a849;
}

.progress-slider-group {
  margin-top: 1.2rem;
  margin-bottom: 1rem;
}

.progress-ep-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 0.8rem;
}

.progress-ep-label {
  font-family: 'Lato', sans-serif;
  font-size: 0.85rem;
  color: #9a8a7a;
  font-weight: 600;
}

.progress-ep-value {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: #e8a849;
  line-height: 1;
}

.progress-ep-max {
  font-family: 'Lato', sans-serif;
  font-size: 0.95rem;
  color: #b8a99a;
}

.progress-ep-slider {
  --fill: 50%;
  background: linear-gradient(to right, #e8a849 0%, #e8a849 var(--fill), #e8ddd0 var(--fill), #e8ddd0 100%) !important;
}

.progress-ep-slider::-webkit-slider-thumb {
  border-color: #e8a849 !important;
}

.progress-ep-slider::-moz-range-thumb {
  border-color: #e8a849 !important;
}

.watchlist-card-main {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  min-width: 0;
}

.watchlist-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: #4a3f35;
}


.wl-delete-btn {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: #c9a87c;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  line-height: 1;
  transition: color 0.2s, background 0.2s;
}

.wl-delete-btn:hover {
  color: #c27c7c;
  background: rgba(194, 124, 124, 0.1);
}

.wl-delete-corner {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
}

.wl-corner-actions .wl-delete-corner {
  position: static;
}

.watchlist-watched-date {
  font-size: 0.75rem;
  color: #a0937f;
  font-style: italic;
  margin-top: 0.3rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.watchlist-watched-date:hover {
  color: #c9a87c;
}

.watchlist-ratings {
  display: flex;
  gap: 1.2rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #f0e8dc;
  flex-wrap: wrap;
}

.watchlist-rating-block {
  flex: 1;
  min-width: 60px;
}

.watchlist-rating-block.watchlist-rating-moyenne {
  flex: 0.3;
  min-width: 30px;
}

.watchlist-rating-name {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #a0937f;
  margin-bottom: 0.3rem;
  font-weight: 700;
}

.watchlist-rating-note {
  font-size: 1.8rem;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
  color: #4a3f35;
  line-height: 1;
}

.watchlist-rating-note span {
  font-size: 0.8rem;
  color: #a0937f;
  font-weight: 400;
}

.watchlist-rating-empty {
  font-size: 1.5rem;
  color: #d4c9ba;
  font-family: 'Playfair Display', serif;
}

.watchlist-rating-comment {
  font-style: italic;
  font-size: 0.85rem;
  color: #8b7a6a;
  margin-top: 0.4rem;
  line-height: 1.4;
}

.watchlist-rating-divider {
  width: 1px;
  background: #e8ddd0;
  align-self: stretch;
}

.watchlist-rating-moyenne .watchlist-rating-note {
  color: #c9a87c;
}

.watchlist-coup-de-coeur {
  color: #c27c7c;
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 0.8rem;
}

.watchlist-sort-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.sort-label {
  font-size: 0.8rem;
  color: #a0937f;
  margin-right: 0.2rem;
}

.sort-btn {
  padding: 0.3rem 0.7rem;
  border: 1px solid #e8ddd0;
  border-radius: 15px;
  background: transparent;
  font-family: 'Lato', sans-serif;
  font-size: 0.75rem;
  color: #8b7a6a;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sort-btn:hover {
  border-color: #c9a87c;
  color: #c9a87c;
}

.sort-btn.active {
  background: #c9a87c;
  border-color: #c9a87c;
  color: #fff;
}

.rate-modal {
  max-width: 400px;
}

.rate-modal-user {
  font-size: 0.9rem;
  color: #8b7a6a;
  margin-bottom: 1.2rem;
}

.rate-slider-group {
  margin-bottom: 1.2rem;
}

.rate-value-display {
  text-align: center;
  margin-bottom: 1rem;
}

.rate-value-number {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 700;
  color: #c9a87c;
  line-height: 1;
}

.rate-value-max {
  font-family: 'Lato', sans-serif;
  font-size: 1.1rem;
  color: #b8a99a;
  font-weight: 400;
}

.rate-slider-wrap {
  padding: 0 0.25rem;
}

.rate-slider {
  --fill: 50%;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(to right, #c9a87c 0%, #c9a87c var(--fill), #e8ddd0 var(--fill), #e8ddd0 100%);
  outline: none;
  cursor: pointer;
  border: none;
  padding: 0;
  margin: 0;
  transition: background 0.1s ease;
}

.rate-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #c9a87c;
  box-shadow: 0 2px 8px rgba(139, 119, 90, 0.25);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.rate-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 3px 12px rgba(139, 119, 90, 0.35);
}

.rate-slider::-webkit-slider-thumb:active {
  transform: scale(1.05);
  background: #faf6f0;
}

.rate-slider::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #c9a87c;
  box-shadow: 0 2px 8px rgba(139, 119, 90, 0.25);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.rate-slider::-moz-range-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 3px 12px rgba(139, 119, 90, 0.35);
}

.rate-slider::-moz-range-track {
  height: 8px;
  border-radius: 4px;
  background: transparent;
  border: none;
}

.rate-slider:focus {
  box-shadow: none;
}

.rate-slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.4rem;
  font-size: 0.7rem;
  color: #b8a99a;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 0 2px;
}

/* --- Roulette FAB & Modal --- */
.roulette-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #e8a849, #d4943a);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(200, 148, 58, 0.4);
  z-index: 1000;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.roulette-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 22px rgba(200, 148, 58, 0.55);
}

.roulette-fab:active {
  transform: scale(0.95);
}

.roulette-modal {
  max-width: 420px;
  padding: 1.5rem;
  overflow: hidden;
}

.roulette-viewport {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #faf6f0;
  border: 1px solid #e8ddd0;
  margin: 1rem 0;
}

.roulette-indicator {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 72px;
  transform: translateY(-50%);
  border-top: 2px solid #e8a849;
  border-bottom: 2px solid #e8a849;
  background: rgba(232, 168, 73, 0.08);
  z-index: 10;
  pointer-events: none;
}

.roulette-strip {
  will-change: transform;
}

.roulette-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0 1rem;
  box-sizing: border-box;
  transition: opacity 0.3s ease;
}

.roulette-item-poster {
  width: 40px;
  height: 56px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.roulette-item-poster-empty {
  width: 40px;
  height: 56px;
  border-radius: 4px;
  background: #e8ddd0;
  flex-shrink: 0;
}

.roulette-item-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.roulette-item-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #4a3f35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.roulette-item-type {
  font-family: 'Lato', sans-serif;
  font-size: 0.75rem;
  color: #9a8a7a;
}

.roulette-item-winner {
  background: rgba(232, 168, 73, 0.12);
}

.roulette-spin-btn {
  width: 100%;
  padding: 0.7rem;
  font-size: 1rem;
  background: linear-gradient(135deg, #e8a849, #d4943a);
  border: none;
  color: #fff;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 0.03em;
}

.roulette-spin-btn:hover {
  filter: brightness(1.05);
}

.roulette-result {
  animation: fadeInScale 0.4s ease;
}

.roulette-result-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #fdf8f0;
  border: 2px solid #e8a849;
  border-radius: 10px;
  margin: 1rem 0;
}

.roulette-result-poster {
  width: 60px;
  height: 85px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.roulette-result-info {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.roulette-result-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #4a3f35;
}

.roulette-result-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.roulette-result-actions .btn,
.roulette-result-actions .wl-vu-btn,
.roulette-result-actions .wl-encours-btn {
  flex: 1;
  min-width: 80px;
  text-align: center;
  width: auto;
  margin: 0;
  padding: 0.55rem 0.6rem;
  box-sizing: border-box;
  font-size: 0.85rem;
  line-height: 1.2;
}

.roulette-actions {
  padding: 0 0 0.3rem;
}

/* --- Sorties Page --- */
.sortie-card {
  padding: 1.2rem 1.5rem;
}

.sortie-to-do {
  border-left: 3px solid #7aab7a;
}

.sortie-done {
  border-left: 3px solid #c9a87c;
}

.sortie-category-badge {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  flex-shrink: 0;
  background: rgba(122, 171, 122, 0.2);
  color: #5a8a5a;
}

.sortie-category-badge[data-category="resto"] {
  background: rgba(201, 124, 124, 0.2);
  color: #b86a6a;
}

.sortie-category-badge[data-category="expo"] {
  background: rgba(124, 154, 201, 0.2);
  color: #5a7ab8;
}

.sortie-category-badge[data-category="balade"] {
  background: rgba(122, 171, 122, 0.2);
  color: #5a8a5a;
}

.sortie-lieu {
  font-size: 0.85rem;
  color: #8b7a6a;
  margin-top: 0.3rem;
  font-style: italic;
}

.sortie-desc {
  font-size: 0.88rem;
  color: #6b5e52;
  margin-top: 0.3rem;
  line-height: 1.5;
}

.sortie-done-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.sortie-done-actions .wl-noter-btn,
.sortie-done-actions .sortie-photos-btn {
  flex: 1;
}

.sortie-photos-btn {
  padding: 0.45rem 0;
  border: 1.5px solid #8b7a6a;
  border-radius: 8px;
  background: transparent;
  color: #8b7a6a;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'Lato', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.03em;
}

.sortie-photos-btn:hover {
  background: #8b7a6a;
  color: #fff;
}

.sortie-media-preview {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.7rem;
  align-items: center;
}

.sortie-media-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e8ddd0;
}

.sortie-media-more {
  font-size: 0.8rem;
  color: #a0937f;
  font-weight: 600;
}

.sortie-media-modal {
  max-width: 550px;
}

.sortie-modal-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.sortie-modal-media-item {
  position: relative;
  cursor: pointer;
}

.sortie-modal-media-thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e8ddd0;
  display: block;
}

.sortie-modal-media-delete {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  background: #c27c7c;
  color: #fff;
  border: 2px solid #fffdf9;
  border-radius: 50%;
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.sortie-modal-media-item:hover .sortie-modal-media-delete {
  opacity: 1;
}

.sortie-modal-media-delete:hover {
  background: #b06a6a;
  transform: scale(1.1);
}

/* --- Sortie Polaroid Cards --- */
.sortie-section {
  margin-bottom: 2rem;
}

.sortie-polaroid-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
}

/* --- Flip Card (todo) --- */
.sortie-flip-wrapper {
  perspective: 800px;
  transform: rotate(var(--rotation, 0deg));
  transition: transform 0.3s ease;
  cursor: pointer;
  position: relative;
}

.sortie-flip-wrapper:hover {
  transform: rotate(0deg) scale(1.03);
  z-index: 2;
}

.sortie-flip-inner {
  position: relative;
  transition: transform 0.6s ease;
  transform-style: preserve-3d;
}

.sortie-flip-wrapper.flipped .sortie-flip-inner {
  transform: rotateY(180deg);
}

.sortie-flip-front,
.sortie-flip-back {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.sortie-flip-front {
  position: relative;
}

.sortie-flip-back.sortie-polaroid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sortie-flip-front .sortie-polaroid-delete,
.sortie-flip-back .sortie-polaroid-delete {
  top: 0.3rem;
  right: 0.3rem;
}

.sortie-flip-back-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 0.6rem;
  text-align: center;
  gap: 0.4rem;
  overflow: hidden;
}

.sortie-flip-back .sortie-category-badge {
  position: static;
}

.sortie-flip-back-title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: #4a3f35;
  line-height: 1.3;
}

.sortie-flip-back-lieu {
  font-size: 0.8rem;
  color: #8b7a6a;
  font-style: italic;
}

.sortie-flip-back-desc {
  font-size: 0.78rem;
  color: #6b5e52;
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* Done date on flip back */
.sortie-done-date {
  font-size: 0.75rem;
  color: #a0937f;
  font-style: italic;
  margin-top: 0.3rem;
  cursor: pointer;
  transition: color 0.2s ease;
}
.sortie-done-date:hover {
  color: #c9a87c;
}

/* Compact ratings on flip back */
.sortie-flip-ratings {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.3rem;
  padding-top: 0.3rem;
  border-top: 1px solid #f0e8dc;
  width: 100%;
}

.sortie-flip-rating {
  text-align: center;
  flex: 1;
  min-width: 0;
}

.sortie-flip-rating-avg {
  flex: 0.6;
}

.sortie-flip-rating-name {
  display: block;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #a0937f;
  font-weight: 700;
}

.sortie-flip-rating-note {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #4a3f35;
  line-height: 1.2;
}

.sortie-flip-rating-avg .sortie-flip-rating-note {
  color: #c9a87c;
}

.sortie-flip-rating-comment {
  display: block;
  font-size: 0.65rem;
  font-style: italic;
  color: #8b7a6a;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Action buttons on flip back */
.sortie-flip-back-actions {
  display: flex;
  gap: 0.3rem;
  padding: 0 0.6rem 0.5rem;
}

.sortie-flip-action-btn {
  flex: 1;
  padding: 0.25rem 0;
  border: 1.5px solid #c9a87c;
  border-radius: 6px;
  background: transparent;
  color: #c9a87c;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: 'Lato', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sortie-flip-action-btn:hover {
  background: #c9a87c;
  color: #fff;
}

/* Comments tooltip — appears on hover, to the right of the card */
.sortie-comments-tooltip {
  position: absolute;
  top: 0.5rem;
  left: 100%;
  margin-left: 0.6rem;
  width: 180px;
  background: #fffdf9;
  border: 1px solid #e8ddd0;
  border-radius: 8px;
  padding: 0.6rem 0.7rem;
  box-shadow: 0 4px 16px rgba(139, 119, 90, 0.15);
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.sortie-comments-tooltip::before {
  content: '';
  position: absolute;
  top: 1rem;
  left: -6px;
  width: 10px;
  height: 10px;
  background: #fffdf9;
  border-left: 1px solid #e8ddd0;
  border-bottom: 1px solid #e8ddd0;
  transform: rotate(45deg);
}

.sortie-flip-wrapper:hover > .sortie-comments-tooltip {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.sortie-comment-item + .sortie-comment-item {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #f0e8dc;
}

.sortie-comment-name {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #a0937f;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.sortie-comment-text {
  font-size: 0.78rem;
  font-style: italic;
  color: #6b5e52;
  line-height: 1.4;
}

/* --- Polaroid base --- */
.sortie-polaroid {
  background: #fff;
  padding: 0.6rem 0.6rem 0.5rem;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
  position: relative;
}

.sortie-polaroid:not(.sortie-flip-front):not(.sortie-flip-back) {
  transform: rotate(var(--rotation, 0deg));
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sortie-polaroid:not(.sortie-flip-front):not(.sortie-flip-back):hover {
  transform: rotate(0deg) scale(1.03);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  z-index: 2;
}

.sortie-polaroid-photo {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  position: relative;
  background: #faf6f0;
}

.sortie-polaroid-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #e0d5c5;
}

.sortie-polaroid-placeholder {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  color: #d4c4b0;
  user-select: none;
}

.sortie-polaroid-placeholder-done {
  font-size: 2rem;
  color: #c9a87c;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.sortie-polaroid-placeholder-done:hover {
  color: #b8956a;
  transform: translate(-50%, -50%) scale(1.2);
}

.sortie-polaroid-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sortie-polaroid-text {
  padding: 0.5rem 0.2rem 0.2rem;
  text-align: center;
}

.sortie-polaroid-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.9rem;
  color: #4a3f35;
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sortie-polaroid-lieu {
  font-size: 0.75rem;
  color: #8b7a6a;
  font-style: italic;
  margin-top: 0.1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sortie-polaroid-done-btn {
  display: block;
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.3rem 0;
  border: 1.5px solid #7aab7a;
  border-radius: 6px;
  background: transparent;
  color: #7aab7a;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: 'Lato', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sortie-polaroid-done-btn:hover {
  background: #7aab7a;
  color: #fff;
}

.sortie-polaroid-delete {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  background: rgba(194, 124, 124, 0.9);
  color: #fff;
  border: 2px solid #fff;
  border-radius: 50%;
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 3;
}

.sortie-polaroid:hover .sortie-polaroid-delete {
  opacity: 1;
}

.sortie-polaroid-delete:hover {
  background: #b06a6a;
  transform: scale(1.1);
}

.sortie-polaroid-note {
  position: absolute;
  top: -8px;
  left: -8px;
  width: 30px;
  height: 30px;
  background: #c9a87c;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: 'Lato', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.sortie-polaroid-done {
  cursor: pointer;
}

.sortie-polaroid .sortie-category-badge {
  position: absolute;
  top: 0.4rem;
  left: 0.4rem;
  z-index: 2;
  font-size: 0.55rem;
  padding: 0.15rem 0.4rem;
}

/* --- Sortie Media Add Options --- */
.sortie-media-add-options {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Sortie Gallery Picker --- */
.sortie-gallery-picker {
  margin-top: 1rem;
}

.sortie-gallery-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 0.4rem;
  max-height: 280px;
  overflow-y: auto;
  padding: 0.5rem;
  background: #faf6f0;
  border: 1px solid #e8ddd0;
  border-radius: 8px;
}

.sortie-picker-item {
  position: relative;
  cursor: pointer;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.sortie-picker-item:hover {
  border-color: #d4c4b0;
}

.sortie-picker-item.selected {
  border-color: #c9a87c;
}

.sortie-picker-item.selected .sortie-picker-check {
  opacity: 1;
}

.sortie-picker-thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.sortie-picker-check {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  background: #c9a87c;
  border: 2px solid #fff;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.sortie-picker-check::after {
  content: '\2713';
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* --- Sortie Detail Modal --- */
.sortie-detail-modal {
  max-width: 480px;
}

.sortie-detail-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.sortie-detail-lieu {
  font-size: 0.9rem;
  color: #8b7a6a;
  font-style: italic;
}

.sortie-detail-desc {
  font-size: 0.9rem;
  color: #6b5e52;
  line-height: 1.6;
  text-align: center;
  margin-bottom: 1rem;
}

.sortie-detail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.sortie-detail-gallery-item {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s ease;
  border: 1px solid #e8ddd0;
}

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

.sortie-detail-ratings {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid #f0e8dc;
  border-bottom: 1px solid #f0e8dc;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.sortie-detail-rating {
  text-align: center;
  flex: 1;
  min-width: 60px;
}

.sortie-detail-rating-avg {
  flex: 0.5;
  min-width: 40px;
}

.sortie-detail-rating-name {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #a0937f;
  font-weight: 700;
  display: block;
  margin-bottom: 0.3rem;
}

.sortie-detail-rating-note {
  font-size: 1.6rem;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
  color: #4a3f35;
  line-height: 1;
}

.sortie-detail-rating-note span {
  font-size: 0.75rem;
  color: #a0937f;
  font-weight: 400;
}

.sortie-detail-rating-avg .sortie-detail-rating-note {
  color: #c9a87c;
}

.sortie-detail-rating-empty {
  font-size: 1.3rem;
  color: #d4c9ba;
  font-family: 'Playfair Display', serif;
}

.sortie-detail-rating-comment {
  font-style: italic;
  font-size: 0.8rem;
  color: #8b7a6a;
  margin-top: 0.3rem;
  line-height: 1.4;
}

.sortie-detail-rating-divider {
  width: 1px;
  background: #e8ddd0;
  align-self: stretch;
}

.sortie-detail-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Roulette category checkboxes */
.sortie-roulette-modal {
  max-width: 420px;
}

.sortie-roulette-categories {
  margin: 0.8rem 0;
}

.sortie-roulette-cat-label {
  font-size: 0.82rem;
  color: #8b7a6a;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.sortie-roulette-cat-check {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-right: 0.8rem;
  margin-bottom: 0.3rem;
  font-size: 0.85rem;
  color: #4a3f35;
  cursor: pointer;
}

.sortie-roulette-cat-check input[type="checkbox"] {
  width: auto;
  accent-color: #c9a87c;
}

/* Timeline-Sorties badges */
.timeline-sorties-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.timeline-sortie-badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  background: rgba(122, 171, 122, 0.15);
  color: #5a8a5a;
  cursor: pointer;
  transition: background 0.2s ease;
}

.timeline-sortie-badge:hover {
  background: rgba(122, 171, 122, 0.3);
}

/* Edit modal sorties select */
.edit-sorties-select {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.edit-sortie-check {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: #4a3f35;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border: 1px solid #e8ddd0;
  border-radius: 8px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.edit-sortie-check:hover {
  border-color: #c9a87c;
  background: rgba(201, 168, 124, 0.05);
}

.edit-sortie-check input[type="checkbox"] {
  width: auto;
  accent-color: #c9a87c;
}

/* --- Messages Page --- */
.message-container {
  text-align: center;
  max-width: 500px;
  margin: 3rem auto;
}

.message-card {
  background: #fffdf9;
  border-radius: 12px;
  padding: 3rem 2rem;
  box-shadow: 0 2px 15px rgba(139, 119, 90, 0.08);
  border: 1px solid #e8ddd0;
  position: relative;
  overflow: hidden;
}

.message-card::before {
  content: '\201C';
  position: absolute;
  top: -0.2rem;
  left: 0.8rem;
  font-size: 8rem;
  font-family: 'Playfair Display', serif;
  color: #c9a87c;
  opacity: 0.12;
  line-height: 1;
  pointer-events: none;
}

.message-card::after {
  content: '\201D';
  position: absolute;
  bottom: -2rem;
  right: 0.8rem;
  font-size: 8rem;
  font-family: 'Playfair Display', serif;
  color: #c9a87c;
  opacity: 0.12;
  line-height: 1;
  pointer-events: none;
}

.message-text {
  font-size: 1.4rem;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  line-height: 1.6;
  color: #4a3f35;
  position: relative;
  z-index: 1;
  transition: opacity 0.3s ease;
}

.message-author {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: #a0937f;
  font-style: italic;
}

.message-actions {
  margin-top: 2rem;
}

.message-empty {
  font-style: italic;
  color: #a0937f;
  font-size: 1.1rem;
}

/* --- Stats Page --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.stat-card {
  background: #fffdf9;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 15px rgba(139, 119, 90, 0.08);
  border: 1px solid #e8ddd0;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(139, 119, 90, 0.14);
}

.stat-number {
  font-size: 2.5rem;
  font-family: 'Playfair Display', serif;
  color: #c9a87c;
  font-weight: 700;
  line-height: 1.2;
}

.stat-label {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.8rem;
  opacity: 0.7;
  margin-top: 0.3rem;
}

.stat-sublabel {
  font-size: 0.75rem;
  color: #a0937f;
  font-style: italic;
  margin-top: 0.2rem;
}

/* --- Card Action Buttons --- */
.timeline-card-actions {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  gap: 0.25rem;
}

.edit-btn,
.delete-btn {
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  opacity: 0.3;
  transition: opacity 0.3s ease, transform 0.2s ease;
  padding: 0.25rem;
  line-height: 1;
  border-radius: 4px;
}

.delete-btn {
  color: #c27c7c;
}

.edit-btn {
  color: #c9a87c;
}

.edit-btn:hover {
  opacity: 1;
  transform: scale(1.1);
  background: rgba(201, 168, 124, 0.08);
}

.delete-btn:hover {
  opacity: 1;
  transform: scale(1.1);
  background: rgba(194, 124, 124, 0.08);
}

/* --- Edit Dialog --- */
.edit-dialog {
  text-align: left;
  max-width: 500px;
  max-height: 85vh;
  overflow-y: auto;
}

.edit-dialog .confirm-title {
  text-align: center;
  margin-bottom: 1rem;
}

.edit-media-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.edit-media-item {
  position: relative;
  width: 90px;
  height: 90px;
}

.edit-media-thumb {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e8ddd0;
}

.edit-media-delete {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  background: #c27c7c;
  color: #fff;
  border: 2px solid #fffdf9;
  border-radius: 50%;
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.edit-media-delete:hover {
  background: #b06a6a;
  transform: scale(1.1);
}

.edit-media-empty {
  font-size: 0.85rem;
  color: #a0937f;
  font-style: italic;
}

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

.fade-in-up {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.fade-in-scale {
  animation: fadeInScale 0.5s ease forwards;
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  opacity: 0.6;
  font-style: italic;
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}

.empty-state-text {
  font-size: 1.05rem;
  line-height: 1.6;
}

/* --- Loading --- */
.loading {
  text-align: center;
  padding: 3rem;
  color: #a0937f;
}

.loading::after {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #e8ddd0;
  border-top-color: #c9a87c;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-left: 0.5rem;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Utility Classes --- */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* --- Scrollbar Styling --- */
::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: #d4c4b0;
  border-radius: 4px;
}

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

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

/* Tablet and below */
@media (max-width: 768px) {
  .page {
    margin-top: 70px;
    padding: 0 1rem;
  }

  h1, .page-title {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(250, 246, 240, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    flex-direction: column;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e8ddd0;
    box-shadow: 0 4px 15px rgba(139, 119, 90, 0.1);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-link {
    padding: 0.8rem 2rem;
    border-bottom: none;
    width: 100%;
  }

  .nav-link.active {
    border-bottom: none;
    background: rgba(201, 168, 124, 0.08);
  }

  .nav-logout {
    margin-left: 0;
    border-top: 1px solid #e8ddd0;
    margin-top: 0.25rem;
    padding-top: 0.8rem;
  }

  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
  }

  .polaroid {
    padding: 0.5rem 0.5rem 1.8rem;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .sortie-polaroid-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
  }

  .sortie-polaroid {
    padding: 0.4rem 0.4rem 0.4rem;
  }

  .sortie-comments-tooltip {
    left: auto;
    right: 0;
    top: auto;
    bottom: 100%;
    margin-left: 0;
    margin-bottom: 0.5rem;
    width: 170px;
  }

  .sortie-comments-tooltip::before {
    display: none;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .timeline {
    padding-left: 24px;
  }

  .timeline-item::before {
    left: -20px;
    width: 12px;
    height: 12px;
  }

  .timeline::before {
    left: 6px;
  }

  .timeline-media-gallery {
    grid-template-columns: 1fr;
  }

  .watchlist-ratings {
    gap: 0.8rem;
  }

  .watchlist-rating-divider {
    display: none;
  }

  .modal-content {
    padding: 1.5rem;
    margin: 1rem;
  }

  .message-card {
    padding: 2rem 1.5rem;
  }

  .message-text {
    font-size: 1.2rem;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .media-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.5rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .polaroid {
    padding: 0.4rem 0.4rem 1.5rem;
  }

  .message-text {
    font-size: 1.1rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  .login-container {
    padding: 2rem 1.5rem;
  }

  .login-illustration {
    width: 110px;
    height: 110px;
    margin-bottom: 1rem;
  }

  .login-title {
    font-size: 2rem;
  }

  .sortie-polaroid-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .sortie-detail-ratings {
    flex-direction: column;
    gap: 0.5rem;
  }

  .sortie-detail-rating-divider {
    display: none;
  }

  .watchlist-ratings {
    flex-direction: column;
    gap: 0.6rem;
  }


  .watchlist-card-body {
    padding: 1rem 1rem 1rem 0;
  }
}
