:root {
  --bg-1: #080d2a;
  --bg-2: #26114f;
  --bg-3: #3b1a66;
  --card: rgba(255,255,255,0.09);
  --card-strong: rgba(255,255,255,0.14);
  --text: #ffffff;
  --muted: #d9d2ef;
  --gold: #f5c76b;
  --orange: #ff9b3d;
  --border: rgba(255,255,255,0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(255,155,61,0.24), transparent 28%),
    radial-gradient(circle at 88% 88%, rgba(116,76,255,0.30), transparent 34%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2), var(--bg-3));
}

body {
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.tv-shell {
  min-height: 100vh;
  padding: 42px 54px 86px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 32px;
}

.tv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.logo-badge {
  width: 82px;
  height: 82px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  color: #1c1138;
  font-size: 42px;
  font-weight: 900;
  box-shadow: 0 20px 60px rgba(255,155,61,0.24);
}

.brand h1 {
  margin: 0;
  font-size: clamp(2.4rem, 4vw, 4.8rem);
  line-height: 1;
  color: var(--gold);
}

.brand p {
  margin: 8px 0 0;
  font-size: clamp(1rem, 1.4vw, 1.55rem);
  color: var(--muted);
}

.clock {
  text-align: right;
  color: var(--muted);
  font-size: 1.35rem;
}

.clock strong {
  display: block;
  font-size: 2.8rem;
  color: var(--gold);
}

.tv-main {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 32px;
  align-items: stretch;
}

.hero-card,
.side-card,
.mobile-card,
.mobile-hero {
  border: 1px solid var(--border);
  background: var(--card);
  backdrop-filter: blur(12px);
  border-radius: 34px;
  box-shadow: 0 24px 90px rgba(0,0,0,0.22);
}

.hero-card {
  padding: 44px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.label {
  display: inline-flex;
  width: fit-content;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(245,199,107,0.14);
  color: var(--gold);
  border: 1px solid rgba(245,199,107,0.35);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-card h2 {
  margin: 24px 0 18px;
  font-size: clamp(3rem, 6vw, 7rem);
  line-height: 0.95;
}

.hero-card h2 span {
  color: var(--gold);
}

.hero-card .intro {
  max-width: 940px;
  font-size: clamp(1.25rem, 2vw, 2.15rem);
  color: var(--muted);
  line-height: 1.35;
}

.event-focus {
  margin-top: 34px;
  padding: 26px;
  background: var(--card-strong);
  border: 1px solid var(--border);
  border-radius: 26px;
}

.event-focus h3 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 2.3vw, 2.5rem);
  color: var(--gold);
}

.event-focus p {
  margin: 6px 0;
  font-size: clamp(1rem, 1.45vw, 1.45rem);
  color: var(--muted);
}

.side-card {
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
}

.side-card h3 {
  margin: 0;
  color: var(--gold);
  font-size: clamp(1.8rem, 2.4vw, 3rem);
}

.side-card p {
  color: var(--muted);
  font-size: clamp(1.1rem, 1.5vw, 1.65rem);
  line-height: 1.35;
}

.qr-img {
  width: 100%;
  border-radius: 28px;
  background: white;
  padding: 18px;
}

.qr-fallback {
  aspect-ratio: 1 / 1;
  width: 100%;
  border-radius: 28px;
  background: white;
  color: #1c1138;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  font-weight: 900;
  font-size: 1.4rem;
}

.quick-links {
  display: grid;
  gap: 14px;
}

.quick-links span,
.button-link {
  display: block;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255,255,255,0.11);
  border: 1px solid var(--border);
  font-weight: 800;
}

.ticker {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 58px;
  background: linear-gradient(90deg, var(--gold), var(--orange));
  color: #1b1234;
  overflow: hidden;
  display: flex;
  align-items: center;
  font-weight: 900;
  font-size: 1.45rem;
}

.ticker-content {
  white-space: nowrap;
  animation: scrollTicker 30s linear infinite;
}

@keyframes scrollTicker {
  from { transform: translateX(100vw); }
  to { transform: translateX(-100%); }
}

.mobile-page {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 18px 60px;
}

.mobile-hero {
  padding: 34px 24px;
  margin-bottom: 20px;
}

.mobile-hero h1 {
  color: var(--gold);
  margin: 14px 0 10px;
  font-size: 2.4rem;
}

.mobile-hero p,
.mobile-card p,
.mobile-card li {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.58;
}

.mobile-grid {
  display: grid;
  gap: 16px;
}

.mobile-card {
  padding: 22px;
}

.mobile-card h2,
.mobile-card h3 {
  color: var(--gold);
  margin-top: 0;
}

.nav-pills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 18px 0 0;
}

.nav-pills a {
  padding: 14px;
  border-radius: 16px;
  background: rgba(245,199,107,0.14);
  border: 1px solid rgba(245,199,107,0.3);
  color: var(--gold);
  font-weight: 800;
  text-align: center;
}

.event-list {
  display: grid;
  gap: 14px;
}

.event-item {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255,255,255,0.09);
  border: 1px solid var(--border);
}

.event-item strong {
  color: var(--gold);
  font-size: 1.2rem;
}

.footer-note {
  margin-top: 22px;
  color: var(--muted);
  text-align: center;
  font-size: 0.95rem;
}

@media (max-width: 900px) {
  .tv-shell {
    padding: 24px 18px 76px;
  }

  .tv-header,
  .tv-main {
    display: block;
  }

  .clock {
    text-align: left;
    margin-top: 18px;
  }

  .hero-card,
  .side-card {
    margin-bottom: 18px;
    padding: 24px;
  }

  .hero-card h2 {
    font-size: 3rem;
  }

  .nav-pills {
    grid-template-columns: 1fr;
  }
}

.fade-in {
  animation: fadeInEvent 0.55s ease both;
}

@keyframes fadeInEvent {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mini-label {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 155, 61, 0.16);
  border: 1px solid rgba(255, 155, 61, 0.35);
  color: var(--orange);
  font-size: 0.9rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.actions-strip {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.action-item {
  min-height: 122px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255,255,255,0.09);
  border: 1px solid var(--border);
}

.action-item strong {
  display: block;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 1.15rem;
}

.action-item span {
  display: block;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.35;
}

.qr-url {
  margin-top: 10px;
  text-align: center;
  color: var(--gold);
  font-weight: 900;
  font-size: 1.05rem;
  word-break: break-word;
}

@media (max-width: 1200px) {
  .actions-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .actions-strip {
    grid-template-columns: 1fr;
  }
}

.event-link {
  display: inline-flex;
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(245,199,107,0.14);
  border: 1px solid rgba(245,199,107,0.35);
  color: var(--gold);
  font-weight: 900;
}

.event-link {
  display: inline-flex;
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(245,199,107,0.14);
  border: 1px solid rgba(245,199,107,0.35);
  color: var(--gold);
  font-weight: 900;
}

.sync-status {
  margin: 0 0 18px;
}

.sync-badge {
  display: inline-flex;
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(245,199,107,0.12);
  border: 1px solid rgba(245,199,107,0.32);
  color: var(--gold);
  font-size: 0.95rem;
  font-weight: 800;
}

.sync-warning {
  color: #ffdf8a;
  border-color: rgba(255,223,138,0.35);
}

.sync-error {
  color: #ffb4b4;
  border-color: rgba(255,180,180,0.35);
}

.portland-shell {
  padding-bottom: 92px;
}

.portland-main {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 32px;
}

.portland-focus {
  min-height: 520px;
}

.portland-focus h2 {
  margin: 24px 0 18px;
  font-size: clamp(2.8rem, 5.2vw, 6.2rem);
  line-height: 0.96;
  color: var(--gold);
}

.portland-side {
  min-height: 520px;
}

.portland-list-card {
  margin-top: 32px;
  padding: 28px;
  border: 1px solid var(--border);
  background: var(--card);
  backdrop-filter: blur(12px);
  border-radius: 34px;
  box-shadow: 0 24px 90px rgba(0,0,0,0.22);
}

.portland-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.portland-list-header h2 {
  margin: 0;
  color: var(--gold);
  font-size: clamp(1.6rem, 2.2vw, 2.4rem);
}

.portland-events {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.portland-event-mini {
  min-height: 150px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255,255,255,0.09);
  border: 1px solid var(--border);
}

.portland-event-mini strong {
  display: block;
  color: var(--gold);
  font-size: 1.08rem;
  line-height: 1.25;
  margin-bottom: 12px;
}

.portland-event-mini span {
  display: block;
  color: var(--text);
  font-weight: 800;
  margin-bottom: 10px;
}

.portland-event-mini small {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
}

@media (max-width: 1200px) {
  .portland-main {
    grid-template-columns: 1fr;
  }

  .portland-events {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .portland-events {
    grid-template-columns: 1fr;
  }
}

.nav-pills {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

/* =========================================================
   Mode Portland compact TV - V1.4.1
   ========================================================= */

body[data-page="tv"] {
  overflow: hidden;
}

.portland-shell {
  height: 100vh;
  min-height: 100vh;
  padding: 24px 34px 62px;
  gap: 18px;
  overflow: hidden;
}

.portland-shell .tv-header {
  min-height: 78px;
}

.portland-shell .logo-badge {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  font-size: 34px;
}

.portland-shell .brand {
  gap: 14px;
}

.portland-shell .brand h1 {
  font-size: clamp(2.5rem, 4vw, 4.1rem);
}

.portland-shell .brand p {
  margin-top: 4px;
  font-size: clamp(1rem, 1.25vw, 1.35rem);
}

.portland-shell .clock {
  font-size: 1rem;
}

.portland-shell .clock strong {
  font-size: 2rem;
}

.portland-main {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 22px;
  height: 42vh;
  min-height: 360px;
}

.portland-focus,
.portland-side {
  min-height: 0;
  height: 100%;
  padding: 26px 30px;
}

.portland-focus h2 {
  margin: 18px 0 14px;
  font-size: clamp(2.1rem, 3.7vw, 4.2rem);
  line-height: 0.98;
}

.portland-focus .intro {
  font-size: clamp(1.05rem, 1.45vw, 1.45rem);
  line-height: 1.35;
}

.portland-focus .event-focus {
  margin-top: 20px;
  padding: 18px;
  border-radius: 22px;
}

.portland-focus .event-focus h3 {
  font-size: clamp(1.25rem, 1.7vw, 1.8rem);
}

.portland-focus .event-focus p {
  font-size: clamp(0.95rem, 1.2vw, 1.2rem);
  line-height: 1.35;
}

.portland-side {
  gap: 16px;
}

.portland-side h3 {
  font-size: clamp(1.8rem, 2.4vw, 2.6rem);
}

.portland-side p {
  font-size: clamp(1rem, 1.25vw, 1.25rem);
  line-height: 1.35;
}

.portland-side .qr-img {
  display: block;
  width: min(100%, 300px);
  max-height: 300px;
  margin: 0 auto;
  padding: 12px;
  border-radius: 22px;
}

.portland-side .qr-url {
  margin-top: 8px;
  font-size: 0.92rem;
}

.portland-side .quick-links {
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.portland-side .quick-links span {
  padding: 11px 12px;
  border-radius: 14px;
  font-size: 0.95rem;
}

.portland-list-card {
  margin-top: 18px;
  padding: 20px 22px;
  border-radius: 26px;
}

.portland-list-header {
  margin-bottom: 14px;
}

.portland-list-header h2 {
  font-size: clamp(1.35rem, 1.8vw, 2rem);
}

.portland-events {
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.portland-event-mini {
  min-height: 112px;
  padding: 14px;
  border-radius: 18px;
}

.portland-event-mini strong {
  font-size: 0.98rem;
  margin-bottom: 8px;
}

.portland-event-mini span {
  font-size: 0.9rem;
  margin-bottom: 7px;
}

.portland-event-mini small {
  font-size: 0.78rem;
  line-height: 1.3;
}

.portland-shell .ticker {
  height: 46px;
  font-size: 1.15rem;
}

@media (max-width: 1200px) {
  .portland-main {
    height: auto;
    min-height: auto;
  }

  .portland-events {
    grid-template-columns: repeat(2, 1fr);
  }

  body[data-page="tv"] {
    overflow-y: auto;
  }
}

/* =========================================================
   Mode Portland Dashboard compact - V1.4.2
   ========================================================= */

.portland-shell {
  height: 100vh;
  min-height: 100vh;
  padding: 18px 28px 54px;
  gap: 14px;
  overflow: hidden;
}

.portland-shell .tv-header {
  min-height: 64px;
}

.portland-shell .logo-badge {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  font-size: 28px;
}

.portland-shell .brand h1 {
  font-size: clamp(2rem, 3.3vw, 3.4rem);
}

.portland-shell .brand p {
  font-size: clamp(0.9rem, 1.05vw, 1.15rem);
}

.portland-shell .clock strong {
  font-size: 1.65rem;
}

.portland-shell .clock {
  font-size: 0.85rem;
}

.portland-main {
  grid-template-columns: 1.35fr 0.65fr;
  gap: 18px;
  height: 48vh;
  min-height: 0;
}

.portland-focus,
.portland-side {
  padding: 22px 26px;
  border-radius: 24px;
}

.portland-focus h2 {
  margin: 14px 0 12px;
  font-size: clamp(2rem, 3.2vw, 3.35rem);
  line-height: 1.02;
}

.portland-focus .intro {
  font-size: clamp(0.98rem, 1.18vw, 1.25rem);
  line-height: 1.32;
}

.portland-focus .event-focus {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 18px;
}

.portland-focus .event-focus h3 {
  font-size: 1.35rem;
  margin-bottom: 6px;
}

.portland-focus .event-focus p {
  font-size: 0.98rem;
  line-height: 1.35;
}

.portland-side h3 {
  font-size: clamp(1.6rem, 2vw, 2.15rem);
}

.portland-side p {
  font-size: 0.98rem;
  line-height: 1.32;
}

.portland-side .qr-img {
  width: min(100%, 240px);
  max-height: 240px;
  padding: 10px;
  border-radius: 18px;
}

.portland-side .qr-url {
  font-size: 0.78rem;
}

.portland-side .quick-links {
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.portland-side .quick-links span {
  padding: 8px 10px;
  font-size: 0.82rem;
  border-radius: 12px;
}

.portland-list-card {
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: 22px;
  min-height: 0;
}

.portland-list-header {
  margin-bottom: 12px;
}

.portland-list-header h2 {
  font-size: clamp(1.25rem, 1.55vw, 1.65rem);
}

.portland-list-header .sync-badge {
  font-size: 0.78rem;
  padding: 7px 11px;
}

.portland-events {
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.portland-event-mini {
  min-height: 94px;
  padding: 11px 12px;
  border-radius: 16px;
}

.portland-event-mini strong {
  font-size: 0.82rem;
  margin-bottom: 6px;
}

.portland-event-mini span {
  font-size: 0.76rem;
  margin-bottom: 5px;
}

.portland-event-mini small {
  font-size: 0.68rem;
  line-height: 1.25;
}

.portland-shell .ticker {
  height: 38px;
  font-size: 0.98rem;
}

.portland-shell .ticker-content {
  animation-duration: 34s;
}

/* Quand il n’y a qu’un seul événement Portland, on évite une carte géante perdue dans le vide */
.portland-events:has(.portland-event-mini:only-child) {
  grid-template-columns: minmax(320px, 520px);
}

@media (max-width: 1200px) {
  .portland-main {
    grid-template-columns: 1fr;
    height: auto;
  }

  .portland-events {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* Logo officiel Les Étincelles 72 */
.brand-logo-img {
  width: 74px;
  height: 74px;
  object-fit: contain;
  border-radius: 16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
  padding: 6px;
}

.portland-shell .brand-logo-img {
  width: 58px;
  height: 58px;
  border-radius: 14px;
}
