/* ==========================================================================
   Tribu Roadtrip 2027 — assets/css/eclipse.css
   Styles exclusifs à la page Séquence 2 (eclipse-total-tanger.html) :
   Thème orange solaire (#page-eclipse), Bannière Tanger, Lecteur Audio Medi 1,
   Grille des ateliers 2026, Cadre Pr. Saïd Rachafi, Stats astrophysiques & Galerie.
   ========================================================================== */

/* --- THÈME COMPLET ORANGE ÉCLIPSE SOLAIRE --- */
#page-eclipse,
body[data-page="eclipse"] {
  --primary: #ff7a00;
  --primary-hover: #ff9100;
}

#page-eclipse .btn-primary,
body[data-page="eclipse"] .btn-primary {
  background: linear-gradient(135deg, #ff9100 0%, #ea580c 100%) !important;
  border-color: rgba(255, 145, 0, 0.65) !important;
  box-shadow: 0 4px 20px rgba(255, 102, 0, 0.42) !important;
}

#page-eclipse .btn-primary:hover,
body[data-page="eclipse"] .btn-primary:hover {
  background: linear-gradient(135deg, #ffa726 0%, #f97316 100%) !important;
  box-shadow: 0 8px 28px rgba(255, 102, 0, 0.65) !important;
}

#page-eclipse .badge-default,
body[data-page="eclipse"] .badge-default {
  border-color: rgba(255, 145, 0, 0.45) !important;
  color: #ff9800 !important;
  background: rgba(255, 122, 0, 0.1) !important;
}

#page-eclipse .hero-tag,
body[data-page="eclipse"] .hero-tag {
  color: #ff9800 !important;
}

#page-eclipse .hero-tanger-banner,
body[data-page="eclipse"] .hero-tanger-banner {
  border-color: rgba(255, 145, 0, 0.45) !important;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.75), 0 0 35px rgba(255, 122, 0, 0.22) !important;
}

#page-eclipse .astro-stat-card,
body[data-page="eclipse"] .astro-stat-card {
  border-color: rgba(255, 145, 0, 0.3) !important;
  background: rgba(255, 122, 0, 0.04) !important;
}

#page-eclipse .astro-stat-card:hover,
body[data-page="eclipse"] .astro-stat-card:hover {
  border-color: rgba(255, 145, 0, 0.65) !important;
  box-shadow: 0 10px 30px rgba(255, 102, 0, 0.25) !important;
}

#page-eclipse .astro-stat-value,
body[data-page="eclipse"] .astro-stat-value {
  color: #ff9800 !important;
  text-shadow: 0 0 20px rgba(255, 152, 0, 0.35) !important;
}

#page-eclipse .workshop-card:hover,
body[data-page="eclipse"] .workshop-card:hover {
  border-color: rgba(255, 145, 0, 0.65) !important;
  box-shadow: 0 12px 30px rgba(255, 102, 0, 0.3) !important;
}

#page-eclipse .workshop-tag,
body[data-page="eclipse"] .workshop-tag {
  color: #ff9800 !important;
}

#page-eclipse .audio-pulse-live,
body[data-page="eclipse"] .audio-pulse-live {
  background: #ff7a00 !important;
  box-shadow: 0 0 12px #ff7a00 !important;
}

#page-eclipse .audio-btn-primary,
body[data-page="eclipse"] .audio-btn-primary {
  background: linear-gradient(135deg, #ff9100 0%, #ea580c 100%) !important;
  border-color: rgba(255, 145, 0, 0.65) !important;
  box-shadow: 0 4px 18px rgba(255, 102, 0, 0.45) !important;
}

#page-eclipse .chronology-node.active,
#page-eclipse .timeline-node.active,
body[data-page="eclipse"] .chronology-node.active,
body[data-page="eclipse"] .timeline-node.active {
  border-color: #ff7a00 !important;
  box-shadow: 0 0 20px rgba(255, 122, 0, 0.6) !important;
}

/* --- BANNIÈRE TANGER NUIT EN HAUT DE PAGE ÉCLIPSE --- */
.hero-tanger-banner {
  margin-top: 2rem;
  margin-bottom: 2.5rem;
  width: 100%;
  border-radius: var(--radius-lg, 16px);
  overflow: hidden;
  border: 1px solid rgba(76, 201, 240, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 30px rgba(76, 201, 240, 0.15);
  background: #06040f;
}

.hero-tanger-img-wrap {
  position: relative;
  width: 100%;
  max-height: 480px;
  overflow: hidden;
  background: #06040f;
  cursor: zoom-in;
}

.hero-tanger-img-wrap img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.4s ease;
}

.hero-tanger-img-wrap:hover img {
  transform: scale(1.02);
}

/* --- COMPOSANT LECTEUR AUDIO INTÉGRÉ MEDI 1 RADIO --- */
.medi1-audio-card {
  background: linear-gradient(135deg, rgba(26, 18, 58, 0.85) 0%, rgba(13, 10, 28, 0.95) 100%);
  border: 1px solid rgba(224, 36, 195, 0.35);
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.7), 0 0 24px rgba(224, 36, 195, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.75rem;
  align-items: center;
}

@media (max-width: 768px) {
  .medi1-audio-card {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 1.25rem;
  }
}

.audio-thumb-wrapper {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.audio-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.4s ease;
  display: block;
}

.audio-thumb-wrapper:hover .audio-thumb-img {
  transform: scale(1.05);
  filter: brightness(0.9);
}

.audio-thumb-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 4, 15, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.audio-thumb-wrapper:hover .audio-thumb-play-overlay {
  background: rgba(6, 4, 15, 0.25);
}

.audio-thumb-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e024c3 0%, #7b2cbf 100%);
  border: 2px solid rgba(255, 255, 255, 0.9);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 0 20px rgba(224, 36, 195, 0.7);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
  cursor: pointer;
}

.audio-thumb-wrapper:hover .audio-thumb-btn {
  transform: scale(1.12);
  box-shadow: 0 0 30px rgba(224, 36, 195, 0.9);
}

.audio-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.audio-badge-line {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.audio-station-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #e11d48;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

@keyframes pulse-update-dot {
  0% { transform: scale(0.9); opacity: 0.75; }
  50% { transform: scale(1.35); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.75; }
}

.audio-pulse-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #ffffff;
  animation: pulse-update-dot 1.5s infinite;
}

.audio-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.35;
  margin: 0;
}

.audio-desc {
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.55;
  margin: 0;
}

.audio-player-controls {
  margin-top: 0.5rem;
  background: rgba(8, 5, 20, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.audio-progress-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.audio-time {
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-weight: 600;
  min-width: 38px;
}

.audio-progress-bar {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.15);
  outline: none;
  cursor: pointer;
}

.audio-progress-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f72585;
  cursor: pointer;
  box-shadow: 0 0 8px #f72585;
  transition: transform 0.15s ease;
}

.audio-progress-bar::-webkit-slider-thumb:hover {
  transform: scale(1.3);
}

.audio-buttons-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.audio-ctrl-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.audio-btn-icon {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.audio-btn-icon:hover {
  background: rgba(224, 36, 195, 0.3);
  border-color: rgba(224, 36, 195, 0.6);
  transform: scale(1.05);
}

.audio-btn-primary {
  background: linear-gradient(135deg, #e024c3, #7b2cbf);
  border: none;
  color: #ffffff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.15rem;
  box-shadow: 0 0 12px rgba(224, 36, 195, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.audio-btn-primary:hover {
  transform: scale(1.08);
  box-shadow: 0 0 18px rgba(224, 36, 195, 0.8);
}

.audio-ext-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #c77dff;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.audio-ext-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* --- GRILLE DES ATELIERS 2026 (2 CARTES MAX SUR GRAND ÉCRAN) --- */
.workshops-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 1.75rem !important;
  margin-top: 2rem !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

@media (max-width: 768px) {
  .workshops-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }
}

.workshop-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.workshop-card:hover {
  transform: translateY(-4px);
  border-color: var(--violet-light);
  box-shadow: 0 12px 30px rgba(123, 44, 191, 0.35);
}

.workshop-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #080512;
}

.workshop-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.workshop-card:hover .workshop-img {
  transform: scale(1.06);
}

.workshop-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
}

.workshop-tag {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ff9e00;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.workshop-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.35;
  margin: 0;
}

.workshop-text {
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.55;
  margin: 0;
}

/* Portrait Pr. Saïd Rachafi (Atelier 4) sans coupure */
.workshop-card:has(img[src*="said_rachafi"]) .workshop-img-wrap,
.workshop-img-wrap.portrait-wrap {
  aspect-ratio: 16 / 11 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: radial-gradient(circle, #1a123a 0%, #080512 85%) !important;
}

.workshop-card img[src*="said_rachafi"],
.workshop-img-portrait {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  background: transparent !important;
  cursor: zoom-in;
}

/* --- CADRE DONNÉES ASTROPHYSIQUES --- */
.astro-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.astro-stat-card {
  background: linear-gradient(135deg, rgba(22, 16, 51, 0.8) 0%, rgba(10, 6, 22, 0.9) 100%);
  border: 1px solid rgba(199, 125, 255, 0.25);
  border-radius: 14px;
  padding: 1.25rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.astro-stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #ff007f, #4cc9f0);
}

.astro-stat-value {
  font-size: 1.75rem;
  font-weight: 900;
  color: #ffffff;
  background: linear-gradient(90deg, #ffffff, #f72585);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.astro-stat-label {
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.4rem;
  font-weight: 700;
}

/* --- CADRE PR. SAÏD RACHAFI - COOPÉRATION INTERNATIONALE --- */
.rachafi-feature-card {
  background: linear-gradient(135deg, rgba(26, 18, 58, 0.9) 0%, rgba(13, 10, 28, 0.98) 100%) !important;
  border: 1px solid rgba(76, 201, 240, 0.35) !important;
  border-radius: var(--radius-lg, 16px) !important;
  padding: 2rem !important;
  display: grid !important;
  grid-template-columns: 280px minmax(0, 1fr) !important;
  gap: 2rem !important;
  align-items: center !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

.rachafi-feature-card .rachafi-img-col {
  width: 100% !important;
  max-width: 280px !important;
  margin: 0 auto !important;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
}

.rachafi-feature-card .rachafi-content-col {
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
}

@media (max-width: 992px) {
  .rachafi-feature-card {
    grid-template-columns: 240px minmax(0, 1fr) !important;
    gap: 1.5rem !important;
    padding: 1.5rem !important;
  }
}

@media (max-width: 768px) {
  .rachafi-feature-card {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
    padding: 1.25rem !important;
    align-items: stretch !important;
  }
  .rachafi-feature-card .rachafi-img-col {
    max-width: 260px !important;
    width: 100% !important;
  }
  .rachafi-feature-card .rachafi-content-col {
    display: block !important;
    width: 100% !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  .rachafi-feature-card .rachafi-content-col h3 {
    font-size: 1.25rem !important;
  }
  .rachafi-feature-card .rachafi-content-col p {
    font-size: 0.92rem !important;
  }
}

/* --- GALERIE PHOTO INTERACTIVE DE LA RÉPÉTITION (12 AOÛT 2026) --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.gallery-item-card {
  background: rgba(22, 16, 51, 0.7);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.gallery-item-card:hover {
  transform: translateY(-4px);
  border-color: var(--violet-neon);
  box-shadow: 0 12px 30px rgba(123, 44, 191, 0.3);
}

.gallery-img-container {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background-color: #0e0a1f;
}

.gallery-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item-card:hover .gallery-img-container img {
  transform: scale(1.06);
}

.gallery-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(6, 4, 15, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  color: var(--violet-light);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  text-transform: uppercase;
}

.gallery-caption {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
}

.gallery-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
}

.gallery-desc {
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.5;
}
