*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --orange: #E8570A;
  --bg-dark: #0F0E0D;
  --bg: #F5F4F0;
  --white: #FFFFFF;
  --border: #E2DED7;
  --text: #1A1816;
  --muted: #7A746C;
  --muted2: #C0BBB4;
  --green: #16A34A;
  --red: #DC2626;
  --bebas: 'Bebas Neue', sans-serif;
  --outfit: 'Outfit', sans-serif;
  --mono: 'DM Mono', monospace;
}
body { font-family: var(--outfit); background: var(--bg); color: var(--text); }

/* ── NAV ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2.5rem; height: 54px;
  background: rgba(10,9,8,0.88); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.nav-brand { font-family: var(--bebas); font-size: 1.55rem; letter-spacing: 0.04em; color: #FAF8F5; }
.nav-brand span { color: var(--orange); }
.nav-right { display: flex; align-items: center; gap: 1.25rem; }
.nav-update { font-family: var(--mono); font-size: 0.6rem; color: #7A746C; }
.btn-subscribe {
  font-family: var(--mono); font-size: 0.65rem;
  padding: 6px 16px; border-radius: 3px;
  border: 1px solid var(--orange); background: transparent; color: var(--orange);
  cursor: pointer; transition: all 0.15s;
}
.btn-subscribe:hover { background: var(--orange); color: #fff; }

/* ── HERO ── */
/* Hauteur réduite : plus de min-height:70vh ni de centrage vertical.
   La hauteur est désormais dictée par le contenu + un padding compact. */
.hero {
  position: relative;
  padding-top: 54px;                 /* compense la nav fixe */
  background: url('toulouse.jpg') center 40%/cover no-repeat;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(8,6,4,0.88) 0%, rgba(18,10,4,0.78) 60%, rgba(28,14,6,0.72) 100%);
}
/* Layout 2 colonnes : contenu principal à gauche, panneau "Ce soir" à droite */
.hero-inner {
  position: relative; z-index: 1;
  max-width: 1100px; margin: 0 auto; width: 100%;
  padding: 1.75rem 2.5rem;
  display: flex; align-items: flex-start; gap: 2rem;
}
.hero-main {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-direction: column; gap: 1.25rem;
}

/* Title block — aligné à gauche, plus compact */
.hero-title-block { text-align: left; }
.hero-title {
  font-family: var(--bebas);
  font-size: clamp(3rem, 7vw, 5.5rem);   /* réduit pour gagner en hauteur */
  line-height: 0.9; letter-spacing: 0.02em;
  color: #FAF8F5; margin-bottom: 0.6rem;
}
.hero-title .dot { color: var(--orange); }
.hero-sub {
  font-size: 0.95rem; font-weight: 300; color: rgba(250,248,245,0.65);
  letter-spacing: 0.02em; margin-bottom: 1.1rem;
}
.hero-stats { display: flex; gap: 2.25rem; justify-content: flex-start; }
.stat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.stat-n { font-family: var(--bebas); font-size: 2rem; color: var(--orange); line-height: 1; }
.stat-l { font-family: var(--mono); font-size: 0.56rem; color: rgba(250,248,245,0.45); text-transform: uppercase; letter-spacing: 0.12em; }

/* Filter bar — typo agrandie */
.filter-bar {
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
  background: rgba(15,12,10,0.7); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; padding: 0.65rem 0.9rem;
  backdrop-filter: blur(12px);
}
#filter-search {
  font-family: var(--outfit); font-size: 0.9rem;     /* +0.1rem */
  padding: 7px 12px; border-radius: 5px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.07); color: #FAF8F5; outline: none;
  width: 200px; transition: border-color 0.15s;
}
#filter-search:focus { border-color: var(--orange); }
#filter-search::placeholder { color: rgba(255,255,255,0.3); }
.filter-buttons { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.filter-btn {
  font-family: var(--mono); font-size: 0.82rem;       /* nettement plus grand qu'avant (0.65) */
  padding: 7px 15px; border-radius: 5px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08); color: rgba(250,248,245,0.85);
  cursor: pointer; transition: all 0.15s;
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.filter-btn:hover, .filter-btn.active { border-color: var(--orange); color: var(--orange); background: rgba(232,87,10,0.12); }
.filter-arrow { font-size: 0.65rem; opacity: 0.6; }

.btn-reset {
  font-family: var(--mono); font-size: 0.75rem;       /* agrandi */
  padding: 7px 12px; border-radius: 5px;
  border: 1px solid rgba(255,255,255,0.1);
  background: transparent; color: rgba(250,248,245,0.45);
  cursor: pointer; transition: all 0.12s;
}
.btn-reset:hover { color: var(--orange); border-color: var(--orange); }

/* ── PANNEAU "CE SOIR / PROCHAIN" ── */
.tonight-panel {
  flex: 0 0 300px;
  height: 370px;
  display: flex; flex-direction: column;
  background: rgba(15,12,10,0.72);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  backdrop-filter: blur(12px);
  overflow: hidden;
}
.tonight-head {
  display: flex; align-items: center; gap: 8px;
  padding: 0.7rem 1rem;
  font-family: var(--mono); font-size: 0.68rem;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--orange);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}
.tonight-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--orange); animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }
.tonight-list { flex: 1; overflow-y: auto; }
.tonight-list::-webkit-scrollbar { width: 4px; }
.tonight-list::-webkit-scrollbar-track { background: transparent; }
.tonight-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }
.tn-item {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.tn-item:last-child { border-bottom: none; }
.tn-venue { font-family: var(--mono); font-size: 0.55rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--orange); margin-bottom: 3px; }
.tn-show { font-size: 0.82rem; font-weight: 500; color: #FAF8F5; line-height: 1.3; }
.tn-meta { font-family: var(--mono); font-size: 0.58rem; color: rgba(250,248,245,0.4); margin-top: 2px; }
.tn-empty { padding: 1rem; color: rgba(250,248,245,0.4); font-family: var(--mono); font-size: 0.72rem; }

/* ── CONTENT ── */
/* padding-bottom large : laisse passer les derniers événements au-dessus du footer fixe */
.content { max-width: 1100px; margin: 0 auto; padding: 2rem 2.5rem 5rem; }

/* Chips */
.active-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 1rem; min-height: 0; }
.chip {
  font-family: var(--mono); font-size: 0.6rem;
  padding: 3px 8px 3px 10px; border-radius: 100px;
  background: var(--orange); color: #fff;
  display: flex; align-items: center; gap: 4px; cursor: pointer;
}
.chip:hover { opacity: 0.85; }

/* Tabs */
.tabs-bar {
  display: flex; align-items: center; gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.5rem; position: relative;
}
.tab {
  font-family: var(--outfit); font-size: 0.88rem; font-weight: 500;
  padding: 0.7rem 1.5rem; border: none; background: transparent;
  color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: all 0.15s;
  display: flex; align-items: center; gap: 0.5rem;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--orange); border-bottom-color: var(--orange); }
.tab-count {
  font-family: var(--mono); font-size: 0.6rem;
  background: rgba(232,87,10,0.12); color: var(--orange);
  border: 1px solid rgba(232,87,10,0.25);
  padding: 1px 7px; border-radius: 100px;
}
.date-nav {
  margin-left: auto; display: flex; align-items: center; gap: 0.35rem;
  padding-bottom: 0.5rem;
}
.date-nav button {
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); width: 24px; height: 24px; border-radius: 4px;
  cursor: pointer; font-size: 0.75rem; display: flex; align-items: center; justify-content: center;
  transition: all 0.12s;
}
.date-nav button:hover { border-color: var(--orange); color: var(--orange); }
.date-nav span { font-family: var(--mono); font-size: 0.68rem; min-width: 95px; text-align: center; }
.date-nav input[type="date"] {
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); font-family: var(--mono); font-size: 0.65rem;
  padding: 2px 6px; border-radius: 4px; cursor: pointer;
}

/* Views */
.view { display: none; }
.view.active { display: block; }

/* ── TABLE ── */
.table-wrap { background: var(--white); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
thead th {
  font-family: var(--mono); font-size: 0.58rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted);
  padding: 8px 14px; text-align: left;
  border-bottom: 1px solid var(--border); background: #FAFAF8; white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--border); transition: background 0.1s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #FFF9F6; }
td { padding: 9px 14px; vertical-align: middle; }
.td-title { font-weight: 500; }
.td-date { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); white-space: nowrap; }
.td-venue { font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
.td-link a { color: var(--orange); text-decoration: none; font-family: var(--mono); font-size: 0.65rem; }
.td-link a:hover { text-decoration: underline; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 0.6rem; font-family: var(--mono); border: 1px solid; }
.pill.concert    { color: #2563EB; border-color: #BFDBFE; background: #EFF6FF; }
.pill.theatre    { color: #16A34A; border-color: #BBF7D0; background: #F0FDF4; }
.pill.oneman     { color: #D97706; border-color: #FDE68A; background: #FFFBEB; }
.pill.onewoman   { color: #DB2777; border-color: #FBCFE8; background: #FDF2F8; }
.pill.spectacle  { color: #7C3AED; border-color: #DDD6FE; background: #F5F3FF; }
.pill.festival   { color: #0891B2; border-color: #A5F3FC; background: #ECFEFF; }
.pill.autre      { color: var(--muted); border-color: var(--border); background: var(--bg); }
.badge-new {
  font-family: var(--mono); font-size: 0.55rem; padding: 1px 5px;
  border-radius: 2px; background: rgba(232,87,10,0.1);
  border: 1px solid rgba(232,87,10,0.25); color: var(--orange);
  margin-left: 6px; vertical-align: middle;
}
.empty { padding: 2.5rem; text-align: center; color: var(--muted); font-family: var(--mono); font-size: 0.72rem; }

/* ── FOOTER ── */
.footer {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: var(--white); border-top: 1px solid var(--border);
  padding: 1rem 2.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
}
.footer-status {
  display: flex;
  gap: 1rem;
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;            /* Firefox */
  -ms-overflow-style: none;         /* IE/Edge legacy */
}
.footer-status::-webkit-scrollbar { display: none; }
.site-item { flex-shrink: 0; }
.site-item { display: flex; align-items: center; gap: 5px; position: relative; cursor: default; }
/* Tooltip au survol : s'affiche AU-DESSUS de l'item (le footer est collé en bas) */
.site-item[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 8px); left: 0;
  white-space: nowrap;
  background: #1A1612; color: #FAF8F5;
  font-family: var(--mono); font-size: 0.62rem;
  padding: 5px 9px; border-radius: 5px;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  z-index: 300; pointer-events: none;
}
.site-name { font-family: var(--mono); font-size: 0.6rem; color: var(--muted); }
.dot-s { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.dot-s.green { background: var(--green); }
.dot-s.red   { background: var(--red); }
.footer-copy { font-family: var(--mono); font-size: 0.6rem; color: var(--muted2); white-space: nowrap; }

/* ── MODAL (commun abonnement + filtre) ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 400; display: none; }
.modal-overlay.open { display: block; }
.modal {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%,-50%) scale(0.97);
  width: 420px; max-width: calc(100vw - 2rem);
  background: var(--white);
  border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  z-index: 500; opacity: 0; pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
}
.modal.open { opacity: 1; pointer-events: all; transform: translate(-50%,-50%) scale(1); }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--border);
}
.modal-title { font-family: var(--bebas); font-size: 1.2rem; letter-spacing: 0.05em; color: var(--orange); }
.modal-close { background: none; border: none; font-size: 1.3rem; color: var(--muted); cursor: pointer; }
.modal-body { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.9rem; }
.modal-desc { font-size: 0.8rem; color: var(--muted); line-height: 1.5; }
.modal-field { display: flex; flex-direction: column; gap: 0.4rem; }
.modal-field label { font-family: var(--mono); font-size: 0.58rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.modal-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.sub-tag { font-family: var(--mono); font-size: 0.62rem; padding: 3px 10px; border-radius: 3px; border: 1px solid var(--border); color: var(--muted); cursor: pointer; transition: all 0.12s; user-select: none; }
.sub-tag:hover { border-color: var(--orange); color: var(--orange); }
.sub-tag.active { background: var(--orange); border-color: var(--orange); color: #fff; }
.modal-field input { font-family: var(--outfit); font-size: 0.82rem; padding: 7px 10px; border: 1px solid var(--border); border-radius: 5px; background: var(--bg); color: var(--text); outline: none; }
.modal-field input:focus { border-color: var(--orange); }
.btn-sub-submit { font-family: var(--outfit); font-size: 0.85rem; font-weight: 600; padding: 10px; background: var(--orange); color: #fff; border: none; border-radius: 5px; cursor: pointer; }
.btn-sub-submit:hover { opacity: 0.9; }
.sub-msg { font-family: var(--mono); font-size: 0.65rem; text-align: center; min-height: 1rem; color: var(--green); }
.sub-msg.err { color: var(--red); }

/* ── MODAL FILTRE (spécifique) ── */
.filter-modal-search {
  width: 100%; font-family: var(--outfit); font-size: 0.85rem;
  padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg); color: var(--text); outline: none;
  margin-bottom: 0.75rem;
}
.filter-modal-search:focus { border-color: var(--orange); }
.filter-modal-search::placeholder { color: var(--muted2); }
.filter-options {
  display: flex; flex-wrap: wrap; gap: 0.45rem;
  max-height: 50vh; overflow-y: auto;
}
.filter-opt {
  font-family: var(--mono); font-size: 0.78rem;
  padding: 6px 14px; border-radius: 5px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  cursor: pointer; transition: all 0.12s; user-select: none;
}
.filter-opt:hover { border-color: var(--orange); color: var(--orange); }
.filter-opt.active { background: var(--orange); border-color: var(--orange); color: #fff; }
.filter-empty { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); padding: 0.5rem 0; }
.modal-footer {
  display: flex; gap: 0.6rem;
  padding: 1rem 1.25rem; border-top: 1px solid var(--border);
}
.btn-filter-all {
  font-family: var(--mono); font-size: 0.75rem;
  padding: 9px 16px; border-radius: 5px;
  border: 1px solid var(--border); background: transparent; color: var(--muted);
  cursor: pointer; transition: all 0.12s; flex: 0 0 auto;
}
.btn-filter-all:hover, .btn-filter-all.active { border-color: var(--orange); color: var(--orange); }
.btn-filter-apply {
  flex: 1;
  font-family: var(--outfit); font-size: 0.85rem; font-weight: 600;
  padding: 9px; background: var(--orange); color: #fff;
  border: none; border-radius: 5px; cursor: pointer;
}
.btn-filter-apply:hover { opacity: 0.9; }

/* Le chooser doit passer AU-DESSUS du modal d'abonnement quand on l'ouvre depuis celui-ci */
#filter-overlay { z-index: 600; }
#filter-modal   { z-index: 700; }

/* ── ABONNEMENT : 3 boutons + chips de sélection ── */
.sub-buttons { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.sub-btn {
  font-family: var(--mono); font-size: 0.72rem;
  padding: 6px 14px; border-radius: 5px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  cursor: pointer; transition: all 0.12s;
  display: flex; align-items: center; gap: 5px;
}
.sub-btn:hover { border-color: var(--orange); color: var(--orange); }
.sub-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.55rem; min-height: 1.4rem; }
.sub-chip {
  font-family: var(--mono); font-size: 0.62rem;
  padding: 3px 9px; border-radius: 100px;
  background: var(--orange); color: #fff;
  cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; gap: 5px;
}
.sub-chip:hover { opacity: 0.85; }
.sub-chip b { font-weight: 700; }
.sub-chip-all {
  background: transparent; color: var(--muted);
  border: 1px dashed var(--border); cursor: default;
}
.sub-chip-all:hover { opacity: 1; }

/* ── RESPONSIVE ── */
@media (max-width: 760px) {
  /* Pas de scroll horizontal sur la page */
  html, body { overflow-x: hidden; max-width: 100vw; }

  /* NAV : cacher la date de màj pour faire de la place */
  .nav { padding: 0 1.25rem; }
  .nav-update { display: none; }

  /* HERO */
  .hero-inner { flex-direction: column; gap: 1.25rem; padding: 1.5rem 1.25rem; }
  .tonight-panel { flex: 1 1 auto; max-height: 260px; }

  /* CONTENT */
  .content { padding: 1.5rem 1rem 5rem; overflow-x: hidden; }

  /* TABS : la date-nav passe sur une deuxième ligne */
  .tabs-bar { flex-wrap: wrap; }
  .date-nav {
    width: 100%; margin-left: 0;
    padding: 0.5rem 0 0.75rem;
    border-top: 1px solid var(--border);
    justify-content: flex-start;
  }

  /* TABLE : scroll horizontal dans la liste uniquement, pas sur la page */
  .table-wrap { overflow-x: auto; }

  /* FOOTER : une seule ligne compacte, statuts scrollables horizontalement */
  .footer {
    flex-direction: row; flex-wrap: nowrap;
    align-items: center; justify-content: flex-start;
    padding: 0 1rem; height: 40px; gap: 0;
  }
  .footer-status {
    flex-wrap: nowrap; overflow-x: auto;
    gap: 0.75rem; flex: 1;
    -webkit-overflow-scrolling: touch;
  }
  .footer-status::-webkit-scrollbar { display: none; }
  .footer-copy { display: none; }
}