/*
 Theme Name:   Teatro Comico
 Theme URI:    https://teatrocomico.ch
 Description:  Child theme Kadence — design Teatro Comico (logo animé, turquoise, Helvetica), compatible WP-Theatre
 Author:       Teatro Comico
 Template:     kadence
 Version:      1.0.0
 Text Domain:  teatrocomico
*/

/* ============================================================
   VARIABLES — design system Claude Design
   ============================================================ */
:root {
  --tc-accent:      #159b9b;
  --tc-accent-dark: #0f7d7d;
  --tc-ink:         #141414;
  --tc-bg:          #ffffff;
  --tc-bg-soft:     #f8f7f4;
  --tc-line:        #e9e7e2;
  --tc-muted:       #6b6b6b;
  --tc-white:       #ffffff;

  --tc-font: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --tc-header-h: 74px;
  --tc-max: 1280px;
  --tc-ease: cubic-bezier(0.25,0.46,0.45,0.94);
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body { font-family: var(--tc-font); background: var(--tc-bg); color: var(--tc-ink); margin: 0; }
img  { max-width: 100%; height: auto; display: block; }
a    { color: inherit; text-decoration: none; transition: color .18s; }
a:hover { color: var(--tc-accent); }

/* ============================================================
   KADENCE — neutraliser header natif
   ============================================================ */
#masthead,
.site-header,
.kadence-sticky-header { display: none !important; }

/* Rétablir le scroll du body (Kadence parfois le gère) */
body { overflow-x: hidden; }

/* Push content sous notre header fixe */
.site-main, #content, .wp-site-blocks {
  padding-top: var(--tc-header-h);
}
body.has-carousel .site-main,
body.has-carousel #content { padding-top: 0; }

/* ============================================================
   HEADER — Teatro Comico (Claude Design)
   ============================================================ */
.tc-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(18px,4vw,44px);
  height: var(--tc-header-h);
  background: rgba(255,255,255,0.94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--tc-line);
  font-family: var(--tc-font);
  transition: background .3s, border-color .3s;
}

/* Header transparent sur le carousel */
.tc-header.is-transparent {
  background: transparent;
  border-bottom-color: transparent;
}
.tc-header.is-transparent .tc-logo,
.tc-header.is-transparent .tc-nav a,
.tc-header.is-transparent .tc-search { color: #fff; }
.tc-header.is-transparent .tc-burger span { background: #fff; }

/* Redevient blanc au scroll */
.tc-header.is-scrolled {
  background: rgba(255,255,255,0.97);
  border-bottom-color: var(--tc-line);
}
.tc-header.is-scrolled .tc-logo,
.tc-header.is-scrolled .tc-nav a,
.tc-header.is-scrolled .tc-search { color: var(--tc-ink); }
.tc-header.is-scrolled .tc-burger span { background: var(--tc-ink); }

/* Logo animé */
.tc-logo {
  display: inline-flex; align-items: center;
  text-decoration: none; white-space: nowrap;
  color: var(--tc-ink);
  font-weight: 500; font-size: 22px;
  letter-spacing: 0.28em; padding-left: 0.28em;
  line-height: 1;
  flex-shrink: 0;
}
.tc-logo span { display: inline-block; opacity: 0; }
.tc-logo .tc-pipe { font-weight: 300; margin: 0 0.05em; color: var(--tc-accent); }

/* Nav desktop */
.tc-nav { display: flex; align-items: center; gap: clamp(16px,2.2vw,30px); }
.tc-nav ul { display: flex; align-items: center; gap: clamp(16px,2.2vw,30px);
  list-style: none; margin: 0; padding: 0; }
.tc-nav a {
  color: var(--tc-ink); text-decoration: none;
  font-size: 13px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  transition: color .18s;
}
.tc-nav a:hover, .tc-nav .current-menu-item > a { color: var(--tc-accent); }

.tc-tickets {
  display: inline-flex; align-items: center;
  padding: 10px 22px;
  background: var(--tc-accent); color: #fff !important;
  font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap;
  transition: background .18s;
}
.tc-tickets:hover { background: var(--tc-accent-dark); color: #fff; }

.tc-search {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; color: var(--tc-ink);
  transition: color .18s;
}
.tc-search:hover { color: var(--tc-accent); }

/* Burger */
.tc-burger {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 0 10px;
  background: none; border: none; cursor: pointer;
}
.tc-burger span { display: block; height: 2px; width: 100%; background: var(--tc-ink); transition: background .18s; }

/* Overlay mobile */
.tc-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: var(--tc-bg);
  display: flex; flex-direction: column;
  padding: 22px clamp(18px,6vw,40px);
  font-family: var(--tc-font);
}
.tc-overlay[hidden] { display: none; }
.tc-overlay-top { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.tc-overlay-brand { font-weight: 500; font-size: 18px; letter-spacing: 0.26em; padding-left: 0.26em; }
.tc-overlay-brand .tc-pipe { color: var(--tc-accent); font-weight: 300; }
.tc-close {
  width: 44px; height: 44px; background: none; border: none; cursor: pointer;
  font-size: 15px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--tc-ink);
}
.tc-overlay nav ul { list-style: none; margin: 36px 0 0; padding: 0; display: flex; flex-direction: column; }
.tc-overlay nav a {
  display: block; color: var(--tc-ink); text-decoration: none;
  font-size: clamp(28px,9vw,44px); font-weight: 500; letter-spacing: -0.01em; text-transform: uppercase;
  padding: 10px 0; border-bottom: 1px solid var(--tc-line);
  transition: color .18s;
}
.tc-overlay nav a:hover { color: var(--tc-accent); }
.tc-overlay .tc-tickets { margin-top: auto; justify-content: center; padding: 18px; font-size: 15px; }

@media (max-width: 860px) {
  .tc-nav { display: none; }
  .tc-burger { display: inline-flex; }
  .tc-logo { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .tc-logo span { opacity: 1 !important; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.tc-footer {
  background: var(--tc-ink);
  color: rgba(255,255,255,0.55);
  padding: 56px clamp(18px,4vw,44px) 36px;
}
.tc-footer__inner {
  max-width: var(--tc-max);
  margin: 0 auto;
}
.tc-footer__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 2rem;
}
.tc-footer__brand-name {
  font-size: 15px; font-weight: 500; letter-spacing: 0.26em;
  color: #fff; display: block; margin-bottom: .75rem;
}
.tc-footer__brand-name .tc-pipe { color: var(--tc-accent); font-weight: 300; }
.tc-footer__tagline {
  font-size: 13px; line-height: 1.6;
  color: rgba(255,255,255,0.35); margin: 0;
}
.tc-footer__col-title {
  font-size: 10px; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: rgba(255,255,255,0.35);
  display: block; margin-bottom: 1rem;
}
.tc-footer__links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.tc-footer__links a { font-size: 13px; color: rgba(255,255,255,0.55); transition: color .18s; }
.tc-footer__links a:hover { color: #fff; }
.tc-footer__bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}
.tc-footer__copy { font-size: 12px; color: rgba(255,255,255,0.3); margin: 0; }
.tc-footer__legal { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.5rem; }
.tc-footer__legal a { font-size: 12px; color: rgba(255,255,255,0.3); transition: color .18s; }
.tc-footer__legal a:hover { color: rgba(255,255,255,.7); }

/* Newsletter footer */
.tc-footer__newsletter {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 2rem; margin-top: 2rem;
  display: flex; align-items: center; gap: 2rem; flex-wrap: wrap;
}
.tc-footer__newsletter-label { font-size: 14px; color: rgba(255,255,255,.7); white-space: nowrap; }
.tc-footer__newsletter-form { display: flex; flex: 1; min-width: 220px; max-width: 380px; }
.tc-footer__newsletter-input {
  flex: 1; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.15);
  border-right: none; color: #fff; font-family: var(--tc-font); font-size: 13px;
  padding: 10px 14px; outline: none; transition: border-color .18s;
}
.tc-footer__newsletter-input::placeholder { color: rgba(255,255,255,.3); }
.tc-footer__newsletter-input:focus { border-color: var(--tc-accent); }
.tc-footer__newsletter-btn {
  background: var(--tc-accent); color: #fff; border: none;
  font-family: var(--tc-font); font-size: 12px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 10px 18px; cursor: pointer; transition: background .18s; white-space: nowrap;
}
.tc-footer__newsletter-btn:hover { background: var(--tc-accent-dark); }

@media (max-width: 720px) {
  .tc-footer__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .tc-footer__top { grid-template-columns: 1fr; }
  .tc-footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   HOMEPAGE CAROUSEL VERTICAL
   ============================================================ */
body.has-carousel { overflow: hidden; }

.tc-carousel {
  position: fixed; inset: 0;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
}
.tc-carousel::-webkit-scrollbar { display: none; }
.tc-carousel { scrollbar-width: none; }

/* Slide */
.tc-slide {
  position: relative;
  height: 100svh; width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  display: flex; align-items: flex-end;
}
.tc-slide__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 25%;
}
.tc-slide__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,10,10,.85) 0%, rgba(10,10,10,.2) 55%, transparent 100%);
}
.tc-slide__body {
  position: relative; z-index: 2;
  padding: 0 clamp(18px,4vw,64px) clamp(3rem,8vh,5rem);
  max-width: var(--tc-max); margin: 0 auto; width: 100%;
}
.tc-slide__tag {
  font-size: 11px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--tc-accent); display: block; margin-bottom: .6rem;
}
.tc-slide__title {
  font-size: clamp(2.6rem,7vw,6rem); font-weight: 500;
  color: #fff; margin: 0 0 .5rem; line-height: 1.0;
  letter-spacing: -0.02em; max-width: 14ch;
}
.tc-slide__dates {
  font-size: 13px; color: rgba(255,255,255,.5); letter-spacing: .04em;
  margin-bottom: 1.8rem; display: block;
}
.tc-slide__actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* Dots nav */
.tc-dots {
  position: fixed; right: 1.2rem; top: 50%;
  transform: translateY(-50%); z-index: 150;
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: .55rem;
}
.tc-dots li button {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,.3); border: none; cursor: pointer; padding: 0;
  transition: background .2s, transform .2s; display: block;
}
.tc-dots li.is-active button, .tc-dots li button:hover {
  background: #fff; transform: scale(1.4);
}

/* Hint scroll */
.tc-scroll-hint {
  position: fixed; bottom: 1.6rem; left: 50%; transform: translateX(-50%);
  z-index: 150; display: flex; flex-direction: column; align-items: center; gap: .35rem;
  transition: opacity .4s;
}
.tc-scroll-hint.gone { opacity: 0; pointer-events: none; }
.tc-scroll-hint__bar { width: 1px; height: 32px; background: rgba(255,255,255,.35); overflow: hidden; }
.tc-scroll-hint__bar::after {
  content: ''; display: block; width: 100%; height: 50%;
  background: #fff; animation: scrollbar 1.5s ease-in-out infinite;
}
@keyframes scrollbar { from { transform: translateY(-100%); } to { transform: translateY(200%); } }
.tc-scroll-hint__txt {
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255,255,255,.4);
}

@media (max-width: 480px) {
  .tc-dots { display: none; }
  .tc-slide__actions { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   BOUTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: .35rem;
  font-family: var(--tc-font); font-size: 13px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 12px 24px; cursor: pointer; border: none;
  transition: background .18s, color .18s;
  text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--tc-accent); color: #fff; }
.btn-primary:hover { background: var(--tc-accent-dark); color: #fff; }
.btn-outline { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.45); }
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.1); color: #fff; }
.btn-outline-dark { background: transparent; color: var(--tc-ink); border: 1px solid var(--tc-line); }
.btn-outline-dark:hover { border-color: var(--tc-ink); }
.btn-text {
  background: none; padding-left: 0; color: var(--tc-accent);
  font-size: 12px;
}
.btn-text::after { content: ' →'; transition: letter-spacing .18s; }
.btn-text:hover { color: var(--tc-accent-dark); }
.btn-text:hover::after { letter-spacing: .05em; }

/* ============================================================
   PAGE PROGRAMME (À L'AFFICHE)
   ============================================================ */
.prog-hero {
  background: var(--tc-ink);
  padding: calc(var(--tc-header-h) + 3rem) clamp(18px,4vw,44px) 2.5rem;
}
.prog-hero__inner { max-width: var(--tc-max); margin: 0 auto; }
.prog-hero__sub {
  font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: var(--tc-accent); display: block; margin-bottom: .5rem;
}
.prog-hero__title {
  font-size: clamp(2rem,5vw,3.5rem); font-weight: 500; color: #fff;
  margin: 0; letter-spacing: -0.02em; line-height: 1.05;
}

/* Filtres */
.prog-filters {
  background: var(--tc-bg); border-bottom: 1px solid var(--tc-line);
  position: sticky; top: var(--tc-header-h); z-index: 50;
}
.prog-filters__inner {
  max-width: var(--tc-max); margin: 0 auto;
  padding: 0 clamp(18px,4vw,44px);
  display: flex; overflow-x: auto; scrollbar-width: none;
}
.prog-filters__inner::-webkit-scrollbar { display: none; }
.prog-filter {
  font-family: var(--tc-font); font-size: 12px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--tc-muted); background: none; border: none;
  padding: 1rem 1.1rem; cursor: pointer; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .18s, border-color .18s;
}
.prog-filter:hover { color: var(--tc-ink); }
.prog-filter.is-on { color: var(--tc-accent); border-bottom-color: var(--tc-accent); }

/* Grille */
.prog-grid {
  max-width: var(--tc-max); margin: 0 auto;
  padding: 2rem clamp(18px,4vw,44px) 5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px,1fr));
  gap: 1.5rem;
}

/* ============================================================
   CARTE SPECTACLE (WP-Theatre + custom)
   ============================================================ */
.show-card {
  display: flex; flex-direction: column;
  background: var(--tc-bg);
  border: 1px solid var(--tc-line);
  overflow: hidden;
  text-decoration: none; color: var(--tc-ink);
  transition: box-shadow .22s var(--tc-ease), transform .22s var(--tc-ease);
}
.show-card:hover {
  box-shadow: 0 8px 32px rgba(20,20,20,.1);
  transform: translateY(-3px);
  color: var(--tc-ink);
}

/* Thumb */
.show-card__thumb { position: relative; overflow: hidden; }
.show-card__img {
  width: 100%; aspect-ratio: 3/2;
  object-fit: cover; display: block;
  transition: transform .5s var(--tc-ease);
}
.show-card:hover .show-card__img { transform: scale(1.04); }
.show-card__badge {
  position: absolute; top: .7rem; left: .7rem;
  font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  background: var(--tc-accent); color: #fff;
  padding: .25rem .55rem;
}
.show-card__no-img {
  width: 100%; aspect-ratio: 3/2;
  background: var(--tc-bg-soft); display: flex;
  align-items: center; justify-content: center;
  color: var(--tc-line); font-size: 2rem;
}

/* Body */
.show-card__body { padding: 1.1rem 1.2rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.show-card__dates {
  font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--tc-accent); margin-bottom: .3rem; display: block;
}
.show-card__venue {
  font-size: 12px; color: var(--tc-muted); margin-bottom: .55rem; display: block;
}
.show-card__title {
  font-size: 1.15rem; font-weight: 500; color: var(--tc-ink);
  margin: 0 0 .5rem; line-height: 1.2; letter-spacing: -0.01em;
}
.show-card__excerpt {
  font-size: 13px; color: var(--tc-muted); line-height: 1.55;
  margin: 0 0 1rem; flex: 1;
}
.show-card__cta {
  font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--tc-accent); display: inline-flex; align-items: center; gap: .3rem;
  transition: gap .18s;
}
.show-card:hover .show-card__cta { gap: .55rem; }
.show-card__cta::after { content: '→'; }

/* WP-Theatre native selectors → mapped to show-card style */
.wpt_productions_list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 1.5rem; }
.wpt_production { /* hérite de .show-card via classes ajoutées en PHP */ }

/* ============================================================
   PAGE SPECTACLE (single-wpt_production)
   ============================================================ */
.show-banner {
  position: relative; height: 65vh; min-height: 380px;
  background: var(--tc-ink); overflow: hidden;
  display: flex; align-items: flex-end;
}
.show-banner__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.show-banner__grad { position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,10,10,.9) 0%, transparent 55%); }
.show-banner__body {
  position: relative; z-index: 2;
  padding: 0 clamp(18px,4vw,44px) 2.5rem;
  max-width: var(--tc-max); margin: 0 auto; width: 100%;
}
.show-banner__tag {
  font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: var(--tc-accent); display: block; margin-bottom: .5rem;
}
.show-banner__title {
  font-size: clamp(2rem,5vw,4rem); font-weight: 500; color: #fff;
  margin: 0; letter-spacing: -0.02em; line-height: 1.05;
}

/* Layout 2 colonnes */
.show-layout {
  max-width: var(--tc-max); margin: 0 auto;
  padding: 2.5rem clamp(18px,4vw,44px) 5rem;
  display: grid; grid-template-columns: 1fr 320px; gap: 3rem; align-items: start;
}
.show-content { font-size: 15px; line-height: 1.75; color: #2a2a2a; }
.show-content p { margin: 0 0 1.2em; }
.show-content h2, .show-content h3 {
  font-size: 1rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--tc-ink); margin: 2em 0 .6em;
}
.show-content ul { padding-left: 1.2em; margin: 0 0 1.2em; }
.show-content li { margin-bottom: .3em; }

/* Sidebar billets */
.show-sidebar {
  position: sticky; top: calc(var(--tc-header-h) + 1.5rem);
  border: 1px solid var(--tc-line); padding: 1.5rem;
}
.show-sidebar .tc-tickets { width: 100%; justify-content: center; font-size: 14px; padding: 14px; margin-bottom: 1.5rem; }
.show-sidebar__block { margin-bottom: 1.2rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--tc-line); }
.show-sidebar__block:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.show-sidebar__label {
  font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: var(--tc-muted); display: block; margin-bottom: .35rem;
}
.show-sidebar__val { font-size: 14px; color: var(--tc-ink); display: block; }

/* Dates WP-Theatre dans sidebar */
.wpt_events_list { list-style: none; margin: 0; padding: 0; }
.wpt_events_list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: .5rem 0; border-bottom: 1px solid var(--tc-line); gap: .5rem; font-size: 13px;
}
.wpt_events_list li:last-child { border-bottom: none; }
.wpt_event_date { color: var(--tc-ink); }
.wpt_event_time { color: var(--tc-muted); }
.wpt_event_tickets a {
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--tc-accent); white-space: nowrap;
}
.wpt_event_tickets a:hover { color: var(--tc-accent-dark); }

@media (max-width: 860px) {
  .show-layout { grid-template-columns: 1fr; }
  .show-sidebar { position: static; order: -1; }
}

/* ============================================================
   RESPONSIVE PROGRAMME
   ============================================================ */
@media (max-width: 600px) {
  .prog-grid { grid-template-columns: 1fr; padding: 1.5rem 1rem 4rem; }
  .show-banner { height: 50vh; }
}

/* ============================================================
   TYPOGRAPHIE GÉNÉRALE
   ============================================================ */
h1,h2,h3,h4,h5,h6 {
  font-family: var(--tc-font);
  font-weight: 500; letter-spacing: -0.015em; line-height: 1.15;
  margin: 0 0 .75em; color: var(--tc-ink);
}
p { margin: 0 0 1em; color: var(--tc-muted); line-height: 1.7; }

/* ============================================================
   UTILITAIRES
   ============================================================ */
.visually-hidden { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }
.tc-max { max-width: var(--tc-max); margin: 0 auto; }
.tc-pad { padding: 0 clamp(18px,4vw,44px); }
