/* CSS spécifique à la page programme (hérite de base.css) */

:root {
  --green: #4CAF50;
  --orange: #ff9800;
  --red: #e74c3c;
  --cancelled: #7B2FBE;
}

.hero {
  height: 50vh;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  margin-top: 110px;
  background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.6)), url('/assets/spectacle/spectacle2.jpg') center/cover no-repeat fixed;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 100px;
  background: linear-gradient(to bottom, transparent, var(--bg-light));
  pointer-events: none;
}

.hero-content { position: relative; z-index: 2; text-align: center; color: white; padding: 20px; }
.hero h1 { font-family: 'Cinzel', serif; font-size: 3.5rem; font-weight: 700; margin-bottom: 20px; text-shadow: 0 6px 25px rgba(0,0,0,0.7); letter-spacing: 2px; }
.hero p  { font-size: 1.25rem; font-weight: 300; text-shadow: 0 3px 15px rgba(0,0,0,0.7); max-width: 700px; margin: 0 auto; }

main { max-width: 1600px; margin: 0 auto; padding: 80px 5%; }
.section-title { font-family: 'Cinzel', serif; font-size: 2.5rem; font-weight: 700; color: var(--dark); margin: 60px 0 20px; letter-spacing: 1px; text-align: center; }
.section-title:first-child { margin-top: 0; }
.date-heading { font-family: 'Cinzel', serif; color: var(--primary); font-size: 2.2rem; font-weight: 600; margin: 50px 0 30px; text-align: center; letter-spacing: 1px; }

.date-selector-wrapper { margin: 40px 0 50px; }
.date-selector { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; padding: 10px; }
.date-button { background: white; border: 2px solid var(--border); border-radius: 12px; padding: 20px 25px; cursor: pointer; transition: all 0.3s ease; min-width: 140px; text-align: center; font-family: 'Lato', sans-serif; }
.date-button:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: 0 6px 20px rgba(139,0,0,0.15); }
.date-button.active { background: var(--primary); border-color: var(--primary); box-shadow: 0 6px 20px rgba(139,0,0,0.25); }
.date-button.active .date-button-day,
.date-button.active .date-button-number,
.date-button.active .date-button-month { color: white; }
.date-button-day    { font-size: 13px; font-weight: 600; text-transform: uppercase; color: var(--text-light); letter-spacing: 0.5px; margin-bottom: 8px; }
.date-button-number { font-size: 32px; font-weight: 700; color: var(--primary); font-family: 'Cinzel', serif; margin: 5px 0; }
.date-button-month  { font-size: 13px; color: var(--text-light); text-transform: capitalize; margin-top: 5px; }
.date-schedule-container { display: none; }
.date-schedule-container.active { display: block; }

.no-spectacles { text-align: center; padding: 80px 30px; background: white; border-radius: 16px; box-shadow: 0 5px 20px rgba(0,0,0,0.08); max-width: 700px; margin: 0 auto; }
.no-spectacles h3 { font-family: 'Cinzel', serif; color: var(--primary); font-size: 2rem; margin-bottom: 20px; }
.no-spectacles p  { color: var(--text-light); font-size: 1.1rem; line-height: 1.7; }

.schedule-grid-wrapper { background: white; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); overflow: hidden; margin-bottom: 60px; }
.schedule-grid { display: grid; overflow-x: auto; min-width: 100%; }
.schedule-header { display: grid; grid-template-columns: 250px repeat(16, 70px); background: var(--bg-gray); border-bottom: 2px solid var(--border); position: sticky; top: 0; z-index: 10; }
.schedule-header-cell { padding: 15px 10px; text-align: center; font-weight: 600; font-size: 14px; color: var(--text-dark); border-right: 1px solid var(--border); }
.schedule-header-cell:first-child { text-align: left; padding-left: 20px; font-family: 'Cinzel', serif; font-size: 15px; color: var(--primary); }
.schedule-row { display: grid; grid-template-columns: 250px repeat(16, 70px); border-bottom: 1px solid var(--border); transition: background 0.2s ease; }
.schedule-row:hover { background: #FCFCFC; }
.schedule-row-name { padding: 20px; font-weight: 600; font-size: 14px; color: var(--text-dark); border-right: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.schedule-number { background: var(--primary); color: white; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.schedule-cell { border-right: 1px solid #F0F0F0; position: relative; }
.schedule-block { position: absolute; top: 8px; bottom: 8px; background: var(--primary); border-radius: 4px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 2px 8px rgba(139,0,0,0.3); }
.schedule-block:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(139,0,0,0.4); }
.schedule-block.open    { background: var(--green); box-shadow: 0 2px 8px rgba(76,175,80,0.3); }
.schedule-block.open:hover { box-shadow: 0 4px 12px rgba(76,175,80,0.4); }
.schedule-block.running { background: var(--orange); animation: scheduleBlockPulse 1.5s infinite; }
.schedule-block.cancelled {
  background: repeating-linear-gradient(45deg, rgba(123,47,190,0.7), rgba(123,47,190,0.7) 6px, rgba(123,47,190,0.45) 6px, rgba(123,47,190,0.45) 12px);
  box-shadow: 0 2px 8px rgba(123,47,190,0.3); cursor: pointer;
}
.schedule-block.cancelled:hover { box-shadow: 0 4px 12px rgba(123,47,190,0.45); }
@keyframes scheduleBlockPulse { 0%,100%{box-shadow:0 2px 8px rgba(255,152,0,0.3)} 50%{box-shadow:0 6px 20px rgba(255,152,0,0.6);transform:scale(1.02)} }
.schedule-block-time { color: white; font-size: 11px; font-weight: 700; text-align: center; line-height: 1.2; white-space: nowrap; }

.legend { display: flex; justify-content: center; gap: 40px; margin: 30px 0; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-light); }
.legend-box  { width: 30px; height: 20px; border-radius: 4px; }
.legend-box.closed    { background: var(--primary); }
.legend-box.open      { background: var(--green); }
.legend-box.running   { background: var(--orange); }
.legend-box.cancelled { background: repeating-linear-gradient(45deg, rgba(123,47,190,0.7), rgba(123,47,190,0.7) 6px, rgba(123,47,190,0.45) 6px, rgba(123,47,190,0.45) 12px); }

.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; z-index: 2000; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; padding: 20px; }
.modal-overlay.show { opacity: 1; pointer-events: all; }
.modal-content { background: white; border-radius: 16px; max-width: 600px; width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.3); transform: scale(0.9); transition: transform 0.3s ease; }
.modal-overlay.show .modal-content { transform: scale(1); }

.modal-header { position: relative; height: 220px; overflow: hidden; border-radius: 16px 16px 0 0; background: linear-gradient(135deg, #1a1a2e, #16213e); flex-shrink: 0; }
.modal-header-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity 0.3s ease; }
.modal-header-img.hidden { display: none; }
.modal-header-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #2C2416, #8B0000);
  color: rgba(255,255,255,0.4); font-size: 56px; gap: 12px;
}
.modal-header-placeholder span { font-family: 'Cinzel', serif; font-size: 14px; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,0.3); }
.modal-close { position: absolute; top: 15px; right: 15px; background: rgba(0,0,0,0.5); border: none; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 20px; color: white; display: flex; align-items: center; justify-content: center; transition: all 0.3s ease; z-index: 10; backdrop-filter: blur(4px); }
.modal-close:hover { background: rgba(0,0,0,0.75); transform: rotate(90deg); }
.modal-badge { position: absolute; top: 15px; left: 15px; padding: 8px 16px; border-radius: 20px; color: white; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; backdrop-filter: blur(4px); }
.modal-badge.closed    { background: rgba(139,0,0,0.85); }
.modal-badge.open      { background: rgba(76,175,80,0.9); }
.modal-badge.running   { background: rgba(255,152,0,0.9); animation: badgePulse 1.5s infinite; }
.modal-badge.cancelled { background: rgba(123,47,190,0.9); }
@keyframes badgePulse { 0%,100%{opacity:1} 50%{opacity:0.7} }

.modal-body { padding: 30px; }
.modal-body h2 { font-family: 'Cinzel', serif; color: var(--primary); font-size: 1.8rem; margin-bottom: 20px; line-height: 1.3; }
.modal-info-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 15px; margin: 20px 0; }
.modal-info-item { background: var(--bg-gray); padding: 15px; border-radius: 8px; }
.modal-info-label { font-size: 11px; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; margin-bottom: 6px; }
.modal-info-value { font-size: 17px; color: var(--text-dark); font-weight: 700; font-family: 'Cinzel', serif; }
.modal-countdown { padding: 18px 20px; border-radius: 10px; text-align: center; margin: 20px 0; font-size: 15px; font-weight: 600; }
.modal-countdown.closed    { background: linear-gradient(135deg, var(--primary), var(--primary-hover)); color: white; }
.modal-countdown.open      { background: linear-gradient(135deg, var(--green), #45a049); color: white; }
.modal-countdown.running   { background: linear-gradient(135deg, var(--orange), #f57c00); color: white; animation: badgePulse 2s infinite; }
.modal-countdown.cancelled { background: linear-gradient(135deg, var(--cancelled), #5a1a9a); color: white; }

.programme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 25px; margin-bottom: 60px; }
.card { background: white; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.08); transition: all 0.3s ease; }
.card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.15); }
.card-img { position: relative; height: 180px; overflow: hidden; background: #f0f0f0; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.card:hover .card-img img { transform: scale(1.08); }
.card-img-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #ccc; font-size: 40px; }
.card-body { padding: 20px; }
.card-body h3 { font-family: 'Cinzel', serif; margin-bottom: 12px; color: var(--primary); font-size: 1.3rem; font-weight: 600; }
.card-body p  { font-size: 0.9rem; color: var(--text-light); margin-bottom: 8px; line-height: 1.6; }
.card-body p strong { color: var(--text-dark); font-weight: 600; }

@media (max-width: 1200px) { .schedule-grid { overflow-x: scroll; } }

@media (max-width: 968px) {
  .hero { min-height: 350px; margin-top: 95px; }
  .hero h1 { font-size: 2.5rem; }
  .hero p  { font-size: 1.1rem; }
  main { padding: 60px 20px; }
  .section-title { font-size: 2rem; }
  .schedule-header, .schedule-row { grid-template-columns: 200px repeat(16, 60px); }
  .schedule-row-name { padding: 15px; font-size: 13px; }
  .schedule-number   { width: 24px; height: 24px; font-size: 11px; }
  .programme-grid    { grid-template-columns: 1fr; gap: 20px; }
  .modal-info-grid   { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .hero h1 { font-size: 2rem; }
  .hero p  { font-size: 1rem; }
  .section-title { font-size: 1.8rem; }
  .date-heading  { font-size: 1.6rem; }
  .schedule-header, .schedule-row { grid-template-columns: 150px repeat(16, 50px); }
  .schedule-row-name { padding: 12px; font-size: 12px; gap: 8px; }
  .legend { flex-direction: column; align-items: center; gap: 15px; }
}
