/* ============================================================
   SUMMER BODY — Styles dédiés
   ============================================================ */

.sb-page {
  background: linear-gradient(180deg, var(--sand-light) 0%, #ffeeda 60%, var(--sand-light) 100%);
  min-height: 100vh;
  padding-bottom: 60px;
}

/* === HEADER === */
.sb-header {
  position: relative;
  padding: 30px 20px 20px;
  text-align: center;
  background: linear-gradient(135deg, #1fb8d4 0%, #053b52 100%);
  color: white;
  border-radius: 0 0 28px 28px;
  margin-bottom: 24px;
  padding-top: calc(30px + var(--safe-top));
}

.sb-back {
  position: absolute;
  top: calc(20px + var(--safe-top));
  left: 16px;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.2);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.4rem;
  font-weight: 700;
  transition: background 0.2s;
}
.sb-back:hover { background: rgba(255,255,255,0.3); }

.sb-tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--sunset);
}

.sb-title h1 {
  font-family: 'Fraunces', serif;
  font-weight: 900;
  font-size: clamp(2rem, 7vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-top: 6px;
}
.sb-title h1 em {
  font-family: 'Caveat', cursive;
  font-style: italic;
  color: var(--sunset);
}

.sb-sub {
  font-family: 'Caveat', cursive;
  font-size: 1.1rem;
  color: rgba(255,255,255,0.9);
  margin-top: 4px;
}

/* === BANDEAU IDENTITÉ === */
.sb-identity-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 460px;
  margin: 0 auto 16px;
  padding: 10px 16px;
  background: white;
  border-radius: 100px;
  box-shadow: 0 8px 24px var(--shadow);
}

.sb-id-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ocean);
  opacity: 0.7;
}

.sb-id-name {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--coral-deep);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 4px;
}

.sb-id-meta {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: var(--ocean);
  opacity: 0.6;
  letter-spacing: 0.05em;
}

.sb-id-change {
  background: var(--sand-deep);
  color: var(--ocean);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  padding: 0;
}
.sb-id-change:hover { background: var(--coral); color: white; }

/* === MESSAGE BIENVEILLANT === */
.sb-care-note {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 600px;
  margin: 0 auto 16px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #e8f4f0, #d4ebe1);
  border-left: 4px solid var(--palm-light);
  border-radius: 12px;
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  color: var(--ocean);
}
.sb-care-note span:first-child { font-size: 1.4rem; flex-shrink: 0; }
.sb-care-note p { line-height: 1.5; flex: 1; }
.sb-care-close {
  background: transparent;
  border: none;
  color: var(--ocean);
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0.5;
  padding: 0 4px;
}
.sb-care-close:hover { opacity: 1; }

/* === ACTIONS === */
.sb-actions {
  max-width: 600px;
  margin: 0 auto 24px;
  padding: 0 16px;
}

.sb-add-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--coral), var(--sunset));
  color: white;
  border: none;
  border-radius: 16px;
  font-family: 'DM Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 8px 24px rgba(255, 107, 74, 0.35);
}
.sb-add-btn:hover { box-shadow: 0 12px 32px rgba(255, 107, 74, 0.5); }
.sb-add-btn:active { transform: scale(0.98); }
.sb-add-icon { font-size: 1.3rem; }

/* === TIMELINE === */
.sb-timeline {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 16px;
}

.sb-loading {
  text-align: center;
  padding: 40px 20px;
  font-family: 'Caveat', cursive;
  font-size: 1.4rem;
  color: var(--ocean);
  opacity: 0.6;
}

.sb-empty {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 8px 24px var(--shadow);
}

.sb-empty-icon {
  font-size: 4rem;
  margin-bottom: 12px;
  display: block;
}

.sb-empty-title {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--ocean);
  margin-bottom: 8px;
}

.sb-empty-text {
  font-family: 'Caveat', cursive;
  font-size: 1.2rem;
  color: var(--ocean);
  opacity: 0.7;
  line-height: 1.4;
}

/* === ENTRÉE TIMELINE === */
.sb-entry {
  position: relative;
  background: white;
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px var(--shadow);
  border-left: 4px solid var(--turquoise);
}

.sb-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}

.sb-entry-date {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ocean);
}

.sb-entry-relative {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: var(--ocean);
  opacity: 0.6;
  letter-spacing: 0.05em;
  display: block;
  margin-top: 2px;
}

.sb-entry-actions {
  display: flex;
  gap: 6px;
}

.sb-entry-action {
  background: var(--sand-light);
  color: var(--ocean);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.sb-entry-action:hover { background: var(--sand-deep); }
.sb-entry-action.danger:hover { background: var(--coral); color: white; }

.sb-entry-photo {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 14px;
  background: var(--sand-light);
  cursor: pointer;
  overflow: hidden;
  margin-bottom: 14px;
  position: relative;
}
.sb-entry-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sb-entry-photo:hover img { transform: scale(1.02); }
.sb-entry-photo img { transition: transform 0.3s; }

.sb-entry-data {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.sb-data-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  background: var(--sand-light);
  padding: 8px 14px;
  border-radius: 100px;
  font-family: 'Fraunces', serif;
}

.sb-data-pill strong {
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--coral-deep);
}
.sb-data-pill span {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: var(--ocean);
  opacity: 0.7;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sb-entry-note {
  background: linear-gradient(135deg, var(--sand-light), #faf2dd);
  padding: 12px 14px;
  border-radius: 12px;
  font-family: 'Caveat', cursive;
  font-size: 1.1rem;
  color: var(--ocean);
  line-height: 1.4;
  border-left: 3px solid var(--sunset);
}

/* === MODAL AJOUT ENTRÉE === */
.sb-add-modal {
  max-width: 500px;
}

.sb-field {
  display: block;
  margin-bottom: 16px;
}

.sb-field-label {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ocean);
  opacity: 0.8;
  margin-bottom: 6px;
}

.sb-field input[type="date"],
.sb-field input[type="number"],
.sb-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--sand-deep);
  border-radius: 12px;
  font-size: 1rem;
  font-family: 'DM Mono', monospace;
  background: white;
  -webkit-appearance: none;
}

.sb-field input:focus,
.sb-field textarea:focus {
  outline: none;
  border-color: var(--coral);
}

.sb-field textarea {
  font-family: 'Fraunces', serif;
  resize: vertical;
  min-height: 70px;
}

.sb-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* === ZONE PHOTO === */
.sb-photo-zone {
  position: relative;
  aspect-ratio: 4/3;
  border: 2px dashed var(--sand-deep);
  border-radius: 14px;
  background: var(--sand-light);
  cursor: pointer;
  overflow: hidden;
}

.sb-photo-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.sb-photo-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ocean);
  opacity: 0.6;
}

.sb-photo-icon { font-size: 2.5rem; }

.sb-photo-text {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sb-photo-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.sb-photo-zone.has-photo .sb-photo-preview { display: block; }
.sb-photo-zone.has-photo .sb-photo-placeholder { display: none; }

.sb-photo-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(5, 59, 82, 0.85);
  color: white;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3;
}
.sb-photo-zone.has-photo .sb-photo-remove { display: flex; }

/* === VISIONNEUSE PHOTO === */
.sb-photo-viewer-overlay {
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(10px);
}

.sb-photo-viewer {
  position: relative;
  max-width: 95vw;
  max-height: 95vh;
}

.sb-photo-viewer img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 10px;
  display: block;
}

.sb-viewer-close {
  position: absolute;
  top: -50px;
  right: 0;
  background: rgba(255,255,255,0.15);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
}
.sb-viewer-close:hover { background: rgba(255,255,255,0.3); }

.sb-viewer-caption {
  position: absolute;
  bottom: -40px;
  left: 0;
  right: 0;
  text-align: center;
  color: white;
  font-family: 'Caveat', cursive;
  font-size: 1.2rem;
}

/* ============================================================
   TOGGLE PUBLIC/PRIVÉ GLOBAL (owner only)
   ============================================================ */
.sb-public-toggle {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 600px;
  margin: 0 auto 18px;
  padding: 14px 18px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 24px var(--shadow);
  border-left: 4px solid var(--coral);
  flex-wrap: wrap;
}

.sb-public-toggle.is-public {
  border-left-color: var(--palm-light);
  background: linear-gradient(135deg, white, #e8f4ed);
}

.sb-public-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.sb-public-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.sb-public-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sb-public-text strong {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ocean);
}

.sb-public-text span {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: var(--ocean);
  opacity: 0.7;
  letter-spacing: 0.03em;
  margin-top: 2px;
}

.sb-public-btn {
  background: linear-gradient(135deg, var(--coral), var(--sunset));
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 100px;
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 12px rgba(255, 107, 74, 0.3);
  flex-shrink: 0;
}
.sb-public-btn:hover { box-shadow: 0 6px 18px rgba(255, 107, 74, 0.5); }
.sb-public-btn:active { transform: scale(0.97); }

.sb-public-toggle.is-public .sb-public-btn {
  background: var(--ocean);
  box-shadow: 0 4px 12px rgba(5, 59, 82, 0.3);
}

@media (max-width: 480px) {
  .sb-public-toggle { padding: 12px 14px; }
  .sb-public-btn { width: 100%; padding: 12px; font-size: 0.75rem; }
}

/* ============================================================
   GRAPHIQUES D'ÉVOLUTION
   ============================================================ */
.sb-charts {
  max-width: 600px;
  margin: 0 auto 28px;
  padding: 0 16px;
  display: grid;
  gap: 16px;
}

.sb-chart-card {
  background: white;
  border-radius: 18px;
  padding: 18px 18px 14px;
  box-shadow: 0 8px 24px var(--shadow);
}

.sb-chart-title {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--ocean);
  margin-bottom: 12px;
}

.sb-chart-card canvas {
  max-height: 240px;
  width: 100% !important;
}

.sb-chart-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 16px;
  font-family: 'Caveat', cursive;
  font-size: 1.1rem;
  color: var(--ocean);
  opacity: 0.5;
}

/* ============================================================
   GRILLE DES 8 PERSONNES (réutilise .people-grid de la home)
   ============================================================ */
.people-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 18px 0 8px;
}
