/* ============================================================
   RÉUNION PREMIÈRE — Pages détail (randonnée & espèce)
   ============================================================ */

.detail-body {
  cursor: auto;
  /* Halos chauds en fond de page : plus lumineux qu'un aplat */
  background:
    radial-gradient(ellipse 80% 40% at 20% 0%, rgba(255, 107, 53, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 70% 50% at 90% 60%, rgba(64, 145, 108, 0.05) 0%, transparent 60%),
    var(--shadow);
  background-attachment: fixed;
}
.detail-body .nav { position: sticky; }

.detail-loading {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(245, 230, 208, 0.5);
  letter-spacing: 0.1em;
}

.detail-notfound {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: center;
}

/* === HERO DÉTAIL === */
.detail-hero {
  position: relative;
  min-height: 62vh;
  display: flex;
  align-items: flex-end;
  padding: 140px 0 60px;
  overflow: hidden;
}

.detail-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  animation: detailHeroZoom 18s ease-in-out infinite alternate;
}

@keyframes detailHeroZoom {
  from { transform: scale(1.05) translate(0, 0); }
  to { transform: scale(1.15) translate(-1.5%, -1%); }
}

.detail-hero-gradient {
  /* Allégé : l'image du hero reste lumineuse, juste assez de sombre pour le texte */
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(21,21,42,0.32) 0%, rgba(21,21,42,0.14) 40%, rgba(21,21,42,0.94) 100%);
}

.detail-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

.breadcrumb {
  font-size: 0.8rem;
  color: rgba(245, 230, 208, 0.5);
  margin-bottom: 24px;
  letter-spacing: 0.05em;
}

.breadcrumb a {
  color: rgba(245, 230, 208, 0.7);
  text-decoration: none;
  transition: color 0.3s;
}

.breadcrumb a:hover { color: var(--lava); }
.breadcrumb span { margin: 0 6px; }
.breadcrumb-current { color: var(--lava); }

.detail-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 12px;
}

.detail-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(245, 230, 208, 0.7);
  margin-bottom: 28px;
}

.detail-badges {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.detail-badge {
  padding: 8px 16px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  font-size: 0.82rem;
  color: var(--sand);
}

/* === SECTIONS === */
.detail-section {
  padding: 50px 30px;
}

.detail-h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 18px;
}

/* Tiret lave éditorial (remplace les emojis de titres) */
.detail-h2::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 3px;
  background: var(--lava);
  border-radius: 2px;
  margin-right: 14px;
  vertical-align: middle;
  transform: translateY(-2px);
}

.detail-section-desc {
  color: rgba(245, 230, 208, 0.6);
  margin-bottom: 28px;
  max-width: 640px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 40px;
  align-items: start;
}

.detail-p {
  font-size: 1rem;
  line-height: 1.9;
  color: rgba(245, 230, 208, 0.75);
  margin-bottom: 18px;
}

.detail-features {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.detail-features span {
  padding: 6px 14px;
  background: rgba(255, 107, 53, 0.08);
  border: 1px solid rgba(255, 107, 53, 0.2);
  border-radius: 50px;
  font-size: 0.75rem;
  color: var(--lava-light);
}

/* === ASIDE INFO CARDS === */
.detail-aside {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 100px;
}

.detail-info-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 26px;
}

.detail-info-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--sand);
}

.detail-info-card dl { display: grid; gap: 4px; }

.detail-info-card dt {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--lava);
  margin-top: 10px;
}

.detail-info-card dd {
  font-size: 0.88rem;
  color: rgba(245, 230, 208, 0.75);
  margin: 0;
}

.detail-safety { border-color: rgba(248, 113, 113, 0.25); }

.detail-safety ul, .facts-list {
  list-style: none;
  display: grid;
  gap: 10px;
}

.detail-safety li, .facts-list li {
  position: relative;
  padding-left: 18px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: rgba(245, 230, 208, 0.7);
}

.detail-safety li::before {
  content: '!';
  position: absolute;
  left: 0;
  color: #F87171;
  font-weight: 700;
}

.facts-list li::before {
  content: '◆';
  position: absolute;
  left: 0;
  color: var(--lava);
  font-size: 0.6rem;
  top: 5px;
}

/* === EMBEDS (Street View / YouTube) === */
.embed-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  overflow: hidden;
}

.embed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--glass-border);
  flex-wrap: wrap;
}

.embed-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
}

.embed-hint {
  font-size: 0.72rem;
  color: rgba(245, 230, 208, 0.4);
  letter-spacing: 0.05em;
}

.embed-ratio {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
}

.embed-ratio iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* === LITE YOUTUBE (miniature + play) === */
.yt-lite {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #000;
  display: block;
}

.yt-lite img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: opacity 0.3s, transform 0.6s var(--ease-out-expo);
}

.yt-lite:hover img {
  opacity: 1;
  transform: scale(1.04);
}

.yt-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 248, 240, 0.95);
  color: var(--shadow);
  font-size: 1.5rem;
  padding-left: 6px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  transition: transform 0.3s var(--ease-out-expo), background 0.3s;
}

.yt-lite:hover .yt-play { background: #FFFFFF; }

.yt-lite:hover .yt-play {
  transform: translate(-50%, -50%) scale(1.12);
}

.yt-label {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  background: rgba(13, 13, 26, 0.7);
  padding: 8px 18px;
  border-radius: 50px;
  backdrop-filter: blur(10px);
}

/* === PROFIL D'ALTITUDE === */
.elevation-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 24px;
}

.elevation-card canvas {
  width: 100%;
  display: block;
}

.elevation-legend {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
  font-size: 0.78rem;
  color: rgba(245, 230, 208, 0.5);
}

/* === CONSEILS === */
.tips-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.tips-list li {
  padding: 18px 20px 18px 46px;
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.6;
  color: rgba(245, 230, 208, 0.75);
}

.tips-list li::before {
  content: '✓';
  position: absolute;
  left: 18px;
  top: 16px;
  color: #52B788;
  font-weight: 700;
}

/* === NAV PREV/NEXT === */
.detail-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid var(--glass-border);
}

.detail-nav-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  transition: transform 0.3s var(--ease-out-expo);
}

.detail-nav-link:hover { transform: translateY(-3px); }
.detail-nav-right { text-align: right; }

.detail-nav-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(245, 230, 208, 0.4);
}

.detail-nav-name {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--lava);
}

/* === SPÉCIFIQUE ESPÈCES === */
.species-hero-emoji {
  font-size: 3.4rem;
  margin-bottom: 10px;
}

.species-status {
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.status-critical {
  background: rgba(220, 38, 38, 0.18);
  border: 1px solid rgba(248, 113, 113, 0.45);
  color: #F87171;
}

.status-warning {
  background: rgba(255, 107, 53, 0.15);
  border: 1px solid rgba(255, 107, 53, 0.4);
  color: var(--lava-light);
}

.status-ok {
  background: rgba(76, 175, 80, 0.15);
  border: 1px solid rgba(76, 175, 80, 0.4);
  color: #4CAF50;
}

.species-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.species-photo {
  margin: 0;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
}

.species-photo img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease-out-expo);
}

.species-photo:hover img { transform: scale(1.06); }

.species-photo figcaption {
  padding: 12px 16px;
  font-size: 0.75rem;
  color: rgba(245, 230, 208, 0.5);
}

.species-photo figcaption span { color: var(--lava-light); }

/* === LIENS CLIQUABLES ACCUEIL (cartes espèces) === */
a.species-card {
  text-decoration: none;
  color: inherit;
  display: block;
  cursor: pointer;
}

a.species-card .card-link {
  display: inline-flex;
  margin-top: 16px;
  font-size: 0.85rem;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-aside { position: static; }
  .detail-hero { min-height: 50vh; padding-top: 120px; }
  .detail-nav { justify-content: center; text-align: center; }
  .detail-nav-right { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .detail-hero-bg { animation: none; }
}
