
:root{
  --page-bg:#f6f4ef;
  --paper:#fffdf8;
  --ink:#1d1d1f;
  --muted:#68645f;
  --line:#e2ded6;
  --shadow:0 18px 50px rgba(30,28,24,.10);
  --radius:22px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  color:var(--ink);
  background:
    radial-gradient(circle at 12% 10%, rgba(255,255,255,.85), transparent 32rem),
    linear-gradient(135deg,#f7f3ec 0%,#efebe4 100%);
  font-family:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height:1.35;
}
.schedule-page{
  width:min(1420px, calc(100% - 32px));
  margin:32px auto 60px;
}
.hero{
  background:var(--paper);
  border:1px solid rgba(0,0,0,.06);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:clamp(24px,4vw,46px);
  margin-bottom:18px;
}
.eyebrow{
  margin:0 0 10px;
  text-transform:uppercase;
  letter-spacing:.14em;
  font-size:.78rem;
  font-weight:800;
  color:#a36b20;
}
h1{
  margin:0;
  font-size:clamp(2rem,4vw,4.25rem);
  line-height:.96;
  letter-spacing:-.06em;
}
.intro{
  max-width:760px;
  margin:18px 0 0;
  color:var(--muted);
  font-size:clamp(1rem,1.3vw,1.18rem);
}
.legend{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:18px 0;
}
.legend span{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:9px 13px;
  background:rgba(255,255,255,.74);
  border:1px solid rgba(0,0,0,.07);
  border-radius:999px;
  color:#4a4640;
  font-size:.9rem;
  font-weight:650;
}
.legend i{
  width:13px;
  height:13px;
  border-radius:50%;
  background:var(--swatch);
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.14);
}
.timeline-wrap{
  position:relative;
  background:rgba(255,255,255,.76);
  border:1px solid rgba(0,0,0,.08);
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:var(--shadow);
}
.time-axis{
  position:sticky;
  top:0;
  z-index:5;
  height:50px;
  margin-left:112px;
  background:rgba(255,253,248,.94);
  border-bottom:1px solid var(--line);
}
.time-axis span{
  position:absolute;
  top:15px;
  transform:translateX(-50%);
  color:#504b45;
  font-size:.86rem;
  font-weight:800;
}
.time-axis span:before{
  content:"";
  position:absolute;
  left:50%;
  top:28px;
  width:1px;
  height:9999px;
  background:rgba(0,0,0,.055);
  z-index:-1;
}
.day-line{
  display:grid;
  grid-template-columns:112px 1fr;
  min-height:var(--day-height);
  border-bottom:1px solid var(--line);
}
.day-line:last-child{border-bottom:0}
.day-line h2{
  margin:0;
  padding:22px 16px;
  background:#1e1d1b;
  color:white;
  text-transform:uppercase;
  letter-spacing:.08em;
  font-size:.78rem;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  writing-mode:vertical-rl;
  transform:rotate(180deg);
}
.day-events{
  position:relative;
  min-height:var(--day-height);
  padding:0 8px;
}
.event{
  position:absolute;
  min-width:118px;
  min-height:78px;
  padding:12px 13px;
  border-radius:15px;
  background:var(--event-bg);
  color:#171717;
  border:1px solid rgba(0,0,0,.18);
  box-shadow:0 8px 18px rgba(28,24,18,.12);
  overflow:hidden;
}
.event:after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(135deg,rgba(255,255,255,.25),transparent 55%);
  pointer-events:none;
}
.event.is-dark{
  color:white;
  text-shadow:0 1px 1px rgba(0,0,0,.18);
}
.event time,
.card time{
  display:inline-flex;
  padding:4px 7px;
  border-radius:999px;
  background:rgba(255,255,255,.42);
  color:inherit;
  font-size:.72rem;
  font-weight:900;
  letter-spacing:.02em;
}
.event h3,
.card h3{
  margin:8px 0 4px;
  font-size:.86rem;
  line-height:1.12;
  letter-spacing:-.02em;
}
.event p,
.card p{
  margin:0;
  font-size:.73rem;
  font-weight:600;
  opacity:.88;
}
.cards{display:none}

@media (max-width: 980px){
  .schedule-page{width:min(100% - 22px,760px); margin-top:16px}
  .legend{display:none}
  .timeline-wrap{display:none}
  .cards{
    display:block;
  }
  .cards h2{
    margin:26px 0 10px;
    font-size:1.15rem;
    text-transform:uppercase;
    letter-spacing:.08em;
  }
  .card{
    background:var(--event-bg);
    color:#171717;
    border:1px solid rgba(0,0,0,.13);
    border-radius:18px;
    padding:16px;
    margin:10px 0;
    box-shadow:0 12px 30px rgba(30,28,24,.10);
  }
  .card.is-dark{
    color:#fff;
    text-shadow:0 1px 1px rgba(0,0,0,.18);
  }
  .card h3{
    font-size:1rem;
  }
  .card p{
    font-size:.9rem;
  }
}
@media print{
  body{background:white}
  .schedule-page{width:100%; margin:0}
  .hero,.timeline-wrap{box-shadow:none}
  .cards{display:none}
}

/* Interaction : le bloc cliqué passe au premier plan */
.event,
.card{
  cursor:pointer;
  transition:transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.event.is-front,
.card.is-front{
  z-index:9999;
  transform:translateY(-3px) scale(1.025);
  box-shadow:0 18px 42px rgba(20,18,15,.28);
  filter:saturate(1.04);
}
.event:focus-visible,
.card:focus-visible{
  outline:3px solid rgba(0,0,0,.45);
  outline-offset:3px;
}
.event.is-dark:focus-visible,
.card.is-dark:focus-visible{
  outline-color:rgba(255,255,255,.9);
}

/* Filtres de catégories */
.legend button{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:9px 13px;
  background:rgba(255,255,255,.74);
  border:1px solid rgba(0,0,0,.07);
  border-radius:999px;
  color:#4a4640;
  font:inherit;
  font-size:.9rem;
  font-weight:650;
  line-height:1;
  cursor:pointer;
  box-shadow:0 2px 8px rgba(30,28,24,.04);
  transition:background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.legend button:hover,
.legend button.is-active{
  background:#fff;
  border-color:rgba(0,0,0,.18);
  box-shadow:0 8px 20px rgba(30,28,24,.10);
}
.legend button.is-active{
  transform:translateY(-1px);
}
.legend button:focus-visible{
  outline:3px solid rgba(0,0,0,.35);
  outline-offset:3px;
}
.filtered-out,
.day-line.is-empty-filtered{
  display:none !important;
}

@media (max-width: 980px){
  .legend{
    display:flex;
    flex-wrap:nowrap;
    overflow-x:auto;
    gap:8px;
    padding-bottom:6px;
    -webkit-overflow-scrolling:touch;
  }
  .legend button{
    flex:0 0 auto;
  }
}
