/* GIRAFE Notes — carrousel public + modale + gestion owner. Cf. ADR-159. */

/* ===== Carrousel public (fiche /pin/) ===== */
.gp-notes { margin: 0 0 var(--g-space-6, 24px); }
.gp-notes-track {
  display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 12px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; cursor: grab;
  scrollbar-width: thin;
}
.gp-notes-track:active { cursor: grabbing; }
.gp-notes-track::-webkit-scrollbar { height: 6px; }
.gp-notes-track::-webkit-scrollbar-thumb { background: rgba(0,0,0,.12); border-radius: 999px; }

.gp-note-card {
  flex: 0 0 auto; width: 168px; height: 168px; scroll-snap-align: start;
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0; border: 1px solid rgba(0,0,0,.08); border-radius: 14px; overflow: hidden;
  background: var(--g-surface-2, #faf6f3); cursor: pointer; text-align: left;
  font: inherit; color: inherit; transition: box-shadow .15s ease, transform .15s ease;
}
.gp-note-card:hover { box-shadow: 0 8px 22px rgba(0,0,0,.10); transform: translateY(-1px); }
.gp-note-card:focus-visible { outline: 2px solid var(--g-coral-500, #ff7979); outline-offset: 2px; }

.gp-note-photo {
  position: absolute; inset: 0; background-size: cover; background-position: center;
}
.gp-note-more {
  position: absolute; right: 8px; bottom: 28px;
  background: rgba(31,35,48,.72); color: #fff; font-size: 12px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px; line-height: 1.4;
}
.gp-note-text {
  position: relative; padding: 14px; font-size: 14px; line-height: 1.45;
  color: var(--g-ink, #1f2330); overflow: hidden; display: block; flex: 1 1 auto;
}
.gp-note-time {
  position: relative; display: block; padding: 6px 12px; font-size: 12px;
  color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.45));
  z-index: 1;
}
.gp-note-card .gp-note-text + .gp-note-time { color: var(--g-ink-muted, #5b6172); background: none; padding-top: 0; }

/* ===== Modale (texte complet + toutes les photos) ===== */
.gp-note-modal-overlay {
  position: fixed; inset: 0; z-index: 100000; background: rgba(15,16,22,.55);
  display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto;
}
.gp-note-modal-overlay[hidden] { display: none; }
.gp-note-modal {
  position: relative; width: 100%; max-width: 620px; background: #fff;
  border-radius: 16px; padding: 28px 24px; box-shadow: 0 24px 60px rgba(0,0,0,.28);
}
.gp-note-modal-close {
  position: absolute; top: 12px; right: 12px; width: 34px; height: 34px;
  border: none; border-radius: 50%; background: var(--g-surface-2, #faf6f3);
  color: var(--g-ink, #1f2330); font-size: 16px; cursor: pointer;
}
.gp-note-modal-close:hover { background: #efe7e1; }
.gp-note-modal-time { margin: 0 0 8px; font-size: 13px; color: var(--g-ink-muted, #5b6172); }
.gp-note-modal-text { font-size: 16px; line-height: 1.6; color: var(--g-ink, #1f2330); white-space: pre-wrap; }
.gp-note-modal-photos { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.gp-note-modal-photo { width: 100%; height: auto; border-radius: 12px; display: block; }

/* ===== Gestion owner (/mon-projet) ===== */
.gp-notes-mgr { margin: 0 0 var(--g-space-6, 24px); }
.gp-note-add-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.gp-note-add-form textarea {
  width: 100%; min-height: 70px; padding: 10px 12px; border: 1px solid #e3d7d2;
  border-radius: 10px; font: inherit; color: var(--g-ink, #1f2330); resize: vertical;
}
.gp-note-add-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.gp-note-mgr-err { color: var(--g-coral-700, #d94545); font-size: 14px; min-height: 1em; }
.gp-note-mgr-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.gp-note-mgr-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  background: var(--g-surface-2, #faf6f3); border: 1px solid rgba(0,0,0,.06); border-radius: 10px;
}
.gp-note-mgr-thumb { width: 40px; height: 40px; border-radius: 8px; background: center/cover no-repeat #eee; flex: 0 0 auto; }
.gp-note-mgr-text { flex: 1 1 auto; font-size: 14px; color: var(--g-ink, #1f2330); min-width: 0; }
.gp-note-mgr-time { font-size: 12px; color: var(--g-ink-muted, #5b6172); flex: 0 0 auto; }
.gp-note-del {
  flex: 0 0 auto; border: none; background: none; color: var(--g-coral-700, #d94545);
  cursor: pointer; font-size: 18px; line-height: 1; padding: 4px 8px; border-radius: 8px;
}
.gp-note-del:hover { background: var(--g-coral-50, #fff5f6); }

@media (max-width: 600px) {
  .gp-note-card { width: 140px; height: 140px; }
}
