/* ============================================================
   EXEMPLE-ANIMAL.CSS — Page mémoire animale (Nala) Atryvia
   ============================================================ */

/* ===== HERO ===== */
.animal-hero {
  position: relative;
  min-height: 580px;
  display: flex;
  align-items: center;
}

.animal-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.animal-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.animal-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(250, 248, 244, 1) 0%,
    rgba(250, 248, 244, 0.96) 45%,
    rgba(250, 248, 244, 0.4) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 48px;
  align-items: center;
  padding: 80px 0;
}

.hero-image-mask {
  position: relative;
  height: 480px;
  border-radius: 50% 50% 12px 12px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 4px solid white;
  flex-shrink: 0;
}

.hero-image-mask img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-details {
  padding-left: 20px;
}

.hero-tribute-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 16px;
}

.hero-tribute-label::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--gold);
  flex-shrink: 0;
}

.animal-name {
  font-size: clamp(3.5rem, 5vw, 5rem);
  font-weight: 700;
  color: var(--green-dark);
  line-height: 1;
  margin-bottom: 12px;
  font-family: 'Playfair Display', serif;
}

.animal-dates {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--text-light);
  font-style: italic;
  margin-bottom: 24px;
  display: block;
}

.animal-quote {
  font-size: 1.05rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 480px;
  background: rgba(255, 255, 255, 0.7);
  padding: 16px;
  border-radius: var(--radius);
  backdrop-filter: blur(4px);
}

.animal-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ===== BARRE ACTIONS + ONGLETS ===== */
.actions-bar {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-top: -40px;
  position: relative;
  z-index: 10;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
}

.tab {
  padding: 10px 16px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-light);
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  background: none;
  font-family: inherit;
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease;
  border-radius: 6px 6px 0 0;
}

.tab:hover {
  color: var(--navy);
  background: var(--cream-light);
}

.tab.active {
  color: var(--navy);
  border-bottom-color: var(--green);
  font-weight: 600;
}

.tab-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--cream);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease;
}

.action-btn:hover {
  background: var(--cream-warm);
}

/* ===== GRILLE CONTENU ===== */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  padding: 64px 0;
  align-items: start;
}

/* ===== ONGLETS CONTENU ===== */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== CARDS CONTENU ===== */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
}

.card-title {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Playfair Display', serif;
}

/* ===== HISTOIRE / STORY ===== */
.story-flex {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.story-text {
  flex: 1;
}

.story-text p {
  color: var(--text-light);
  margin-bottom: 12px;
  line-height: 1.7;
}

.story-image {
  flex: 0 0 240px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 3px solid white;
  box-shadow: var(--shadow);
}

.story-image img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.btn-read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold-dark);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  margin-top: 8px;
  background: none;
  border: none;
  font-family: inherit;
  padding: 0;
  transition: color 0.2s ease;
}

.btn-read-more:hover {
  color: var(--navy);
}

/* ===== TIMELINE ANIMALE ===== */
.timeline {
  position: relative;
  padding-left: 24px;
  border-left: 2px solid var(--border);
  margin-left: 8px;
}

.timeline-item {
  position: relative;
  margin-bottom: 24px;
  transition: transform 0.2s ease;
}

.timeline-item:hover {
  transform: translateX(4px);
}

.timeline-item::before {
  content: '🐾';
  position: absolute;
  left: -34px;
  top: 0;
  background: var(--white);
  font-size: 1rem;
  line-height: 1.5;
}

.timeline-date {
  font-weight: 700;
  color: var(--navy);
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.timeline-desc {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* ===== HOMMAGES COLLECTIFS ===== */
.collective-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.collective-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  border: 1px solid var(--border);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.collective-card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.collective-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--cream);
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
}

.collective-name {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 6px;
  color: var(--navy);
  font-family: 'Playfair Display', serif;
}

.collective-text {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 12px;
  line-height: 1.4;
}

.btn-small {
  font-size: 0.8rem;
  color: var(--gold-dark);
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 4px 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 42, 58, 0.6);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  animation: modalSlide 0.3s ease;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes modalSlide {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}

.modal-title {
  font-size: 1.6rem;
  margin: 0;
  font-family: 'Playfair Display', serif;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--text-muted);
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: var(--navy);
}

.modal-body {
  color: var(--text-light);
  line-height: 1.7;
}

.modal-body p + p {
  margin-top: 12px;
}

.modal-footer {
  margin-top: 24px;
  text-align: right;
}

.btn-modal-close {
  padding: 10px 20px;
  background: var(--cream);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease;
}

.btn-modal-close:hover {
  background: var(--cream-warm);
}

/* ===== FORMULAIRE MESSAGES ===== */
.message-form {
  background: var(--cream);
  padding: 20px;
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.message-form textarea {
  width: 100%;
  min-height: 90px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  margin-bottom: 12px;
  background: white;
  color: var(--text);
  transition: border-color 0.2s ease;
}

.message-form textarea:focus {
  outline: none;
  border-color: var(--green);
}

.message-form input[type="text"] {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  margin-bottom: 12px;
  background: white;
  color: var(--text);
  transition: border-color 0.2s ease;
}

.message-form input[type="text"]:focus {
  outline: none;
  border-color: var(--green);
}

.btn-submit {
  background: var(--green);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease;
}

.btn-submit:hover {
  background: var(--green-dark);
}

.form-error {
  color: #b91c1c;
  font-size: 0.85rem;
  margin-top: 8px;
  display: none;
}

.form-error.visible {
  display: block;
}

/* ===== MESSAGES ===== */
.message-item {
  display: flex;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--cream);
  margin-bottom: 16px;
  animation: fadeInUp 0.4s ease;
}

.message-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--cream);
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  color: var(--navy);
  user-select: none;
}

.message-content {
  flex: 1;
  min-width: 0;
}

.message-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
  gap: 8px;
}

.message-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--navy);
}

.message-time {
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.message-text {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.5;
  word-break: break-word;
}

.like-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  margin-top: 8px;
  padding: 0;
  transition: color 0.2s ease;
}

.like-btn:hover,
.like-btn.active {
  color: #e63946;
}

/* ===== GALERIE ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* ===== VIDÉOS ===== */
.video-card {
  background: var(--cream);
  padding: 20px;
  border-radius: var(--radius);
  cursor: pointer;
  margin-bottom: 16px;
  transition: background 0.2s ease;
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}

.video-card:hover {
  background: var(--cream-warm);
}

.video-title {
  font-weight: 600;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

.video-duration {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-left: auto;
  font-weight: 400;
}

/* ===== SIDEBAR ===== */
.bougie-widget {
  background: var(--white);
  padding: 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  text-align: center;
  border: 1px solid var(--border);
  margin-bottom: 32px;
}

.bougie-widget .icon {
  font-size: 2rem;
  margin-bottom: 8px;
  display: block;
}

.bougie-count {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
  display: block;
}

.bougie-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  display: block;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background: var(--green);
  color: white;
  border-radius: 8px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease;
  font-size: 0.95rem;
}

.btn-primary:hover {
  background: var(--green-dark);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 600;
  margin-top: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease, border-color 0.2s ease;
  font-size: 0.9rem;
}

.btn-outline:hover {
  background: var(--cream);
  border-color: var(--green);
}

/* ===== CTA BAS ===== */
.bottom-cta {
  background: var(--navy-dark);
  padding: 64px 0;
  text-align: center;
  color: white;
}

.bottom-cta h2 {
  color: white;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 16px;
}

.bottom-cta p {
  color: rgba(255, 255, 255, 0.8);
  max-width: 600px;
  margin: 0 auto 32px;
  font-size: 1rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .hero-content { grid-template-columns: 1fr; padding: 48px 0; }
  .hero-image-mask { height: 400px; max-width: 400px; margin: 0 auto; }
  .hero-details { text-align: center; padding-left: 0; }
  .animal-quote { margin: 0 auto 20px; }
  .content-grid { grid-template-columns: 1fr; }
  .story-flex { flex-direction: column-reverse; }
  .story-image { flex: auto; width: 100%; }
  .collective-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .hero-image-mask { height: 300px; }
  .animal-name { font-size: 3rem; }
  .actions-bar { flex-direction: column; align-items: stretch; }
  .tabs { justify-content: flex-start; }
  .collective-grid, .gallery-grid { grid-template-columns: 1fr; }
  .modal-content { padding: 24px 20px; }
}
