:root {
  --orange: #e65c3c;
  --orange-dark: #b43e27;
  --orange-soft: #fff0eb;
  --bg: #f5f7f8;
  --white: #ffffff;
  --text: #173541;
  --text-light: #506671;
  --border-soft: #dbe3e6;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.09);
  --shadow-lift: 0 18px 38px rgba(15, 23, 42, 0.14);
  --radius-card: 16px;
  --radius-pill: 999px;
  --radius-input: 10px;
  --nav-height: 76px;
  --font-display: "Barlow Condensed", Impact, sans-serif;
  --font-body: "DM Sans", "Segoe UI", sans-serif;
  --ink: #153442;
  --olive: #176a4b;
  --focus: #087a86;
}

html {
  scroll-padding-top: calc(var(--nav-height) + 20px);
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  overflow-x: clip;
}

::selection {
  background: var(--orange-soft);
  color: var(--text);
}

img {
  height: auto;
}

a {
  color: var(--orange-dark);
  text-underline-offset: 0.2em;
}

h1,
h2,
h3,
h4 {
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.7rem, 6.4vw, 5.8rem);
  line-height: 0.98;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.02;
}

p {
  text-wrap: pretty;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

button,
a,
input,
select,
textarea {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(232, 109, 47, 0.18);
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 2000;
  padding: 10px 16px;
  transform: translateY(-160%);
  border-radius: 8px;
  background: var(--ink);
  color: #fffdf8;
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

header {
  background: rgba(255, 253, 248, 0.97);
  border-bottom: 1px solid var(--border-soft);
  box-shadow: 0 3px 12px rgba(32, 36, 31, 0.04);
  backdrop-filter: blur(12px);
}

.top-nav {
  max-width: 1440px;
  padding: 0 clamp(16px, 4vw, 52px);
}

.top-nav .logo {
  width: auto;
  max-width: 172px;
  object-fit: contain;
}

.nav-links a {
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.94rem;
  font-weight: 600;
  text-underline-offset: 5px;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--orange-dark);
}

.nav-actions {
  gap: 8px;
}

.nav-actions .btn-1,
.nav-actions .btn-2 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.btn-1,
.btn-2,
.hero-content .btn,
.ticket-btn,
.submit-btn,
.btn-new,
.modal-submit,
.btn-download-pdf {
  min-height: 44px;
  border-radius: 8px;
  box-shadow: none;
  font-family: var(--font-body);
  font-weight: 700;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.btn-1 {
  border-color: var(--border-soft);
  background: transparent;
}

.btn-1:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.btn-2,
.hero-content .btn,
.ticket-btn,
.submit-btn,
.btn-new,
.modal-submit,
.btn-download-pdf {
  background: var(--orange-dark);
  color: #fffdf8;
}

.btn-2:hover,
.hero-content .btn:hover,
.ticket-btn:hover,
.submit-btn:hover:not(:disabled),
.btn-new:hover,
.modal-submit:hover:not(:disabled),
.btn-download-pdf:hover {
  background: #813317;
  transform: translateY(-1px);
}

.nav-burger {
  min-width: 44px;
  min-height: 44px;
  border-radius: 8px;
}

.nav-burger span {
  background: var(--ink);
}

.hero {
  min-height: min(760px, calc(100svh - var(--nav-height)));
  padding: calc(var(--nav-height) + 48px) clamp(20px, 8vw, 112px) 68px;
  justify-content: flex-start;
  text-align: left;
  color: var(--white);
  background-color: var(--ink);
  background-image:
    linear-gradient(90deg, rgba(20, 24, 26, 0.9) 0%, rgba(20, 24, 26, 0.72) 49%, rgba(20, 24, 26, 0.14) 100%),
    url("images/fest.jpg");
  background-position: center, 58% 45%;
  background-size: cover;
  isolation: isolate;
  animation: sign-arrive 620ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-overlay {
  display: none;
}

.hero-content {
  width: min(100%, 760px);
  max-width: 760px;
  padding: 0;
}

.hero-content h1 {
  max-width: 10ch;
  margin-bottom: 20px;
  color: var(--white);
  font-size: clamp(3.25rem, 7.2vw, 6.4rem);
  letter-spacing: -0.02em;
  line-height: 0.91;
}

.hero-content p {
  max-width: 56ch;
  margin-bottom: 26px;
  color: #f4efe6;
  font-size: clamp(1rem, 1.8vw, 1.22rem);
}

.hero-content .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 0.95rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 18px;
}

.hero-organizer-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid rgba(255, 253, 248, 0.55);
  border-radius: 7px;
  background: rgba(21, 52, 66, 0.82);
  color: var(--white);
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.hero-organizer-link:hover {
  color: #ffd8bd;
}

.hero-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  width: min(100%, 660px);
  margin-top: 28px;
  padding: 8px;
  border: 1px solid rgba(255, 253, 248, 0.38);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.98);
}

.hero-search label {
  grid-column: 1 / -1;
  padding: 4px 10px 0;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
}

.hero-search input {
  min-width: 0;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.hero-search input::placeholder {
  color: #5d6259;
  opacity: 1;
}

.hero-search input:focus {
  border-color: var(--focus);
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

.hero-search button {
  min-width: 132px;
  min-height: 46px;
  padding: 10px 16px;
  border: 0;
  border-radius: 7px;
  background: var(--orange-dark);
  color: #fffdf8;
  cursor: pointer;
  font: 700 0.92rem var(--font-body);
}

.hero-search button:hover {
  background: #813317;
}

.hero-event {
  width: min(100%, 660px);
  margin-top: 24px;
  padding: 15px 18px;
  border: 1px solid rgba(255, 253, 248, 0.35);
  border-radius: 10px;
  background: rgba(32, 36, 43, 0.84);
  color: var(--white);
}

.hero-event[hidden] {
  display: none;
}

.hero-event h2 {
  margin-bottom: 4px;
  color: var(--white);
  font-size: 1.55rem;
}

.hero-event p {
  margin: 0;
  color: #f4efe6;
  font-size: 0.88rem;
}

.hero-event a {
  display: inline-block;
  margin-top: 8px;
  color: #ffd8bd;
  font-weight: 700;
}

.section {
  width: min(100%, 1480px);
  padding: clamp(48px, 7vw, 96px) clamp(20px, 5vw, 72px);
}

.section-title {
  margin-bottom: 24px;
  font-size: clamp(2.15rem, 4vw, 3.2rem);
  letter-spacing: -0.015em;
}

.section-intro {
  max-width: 62ch;
  margin: -12px 0 28px;
  color: var(--text-light);
}

.filters {
  gap: 8px;
}

.filter-btn {
  min-height: 42px;
  padding: 9px 16px;
  border-color: #bdb5a7;
  border-radius: 7px;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 600;
}

.filter-btn:hover {
  border-color: var(--orange-dark);
  color: var(--orange-dark);
}

.filter-btn.active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.search-bar input {
  min-height: 48px;
  border-color: var(--border-soft);
  border-radius: 8px;
  color: var(--text);
}

.search-bar input::placeholder {
  color: var(--text-light);
  opacity: 1;
}

.events-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  align-items: stretch;
  gap: 22px;
}

.event-card {
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: var(--white);
  box-shadow: none;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.event-card:hover,
.event-card:focus-within {
  transform: translateY(-3px);
  border-color: #bcb3a3;
  box-shadow: var(--shadow);
}

.event-img-wrap {
  overflow: hidden;
  background: #ded8cb;
}

.event-card img {
  height: 220px;
  border-radius: 0;
  object-fit: cover;
  transition: transform 260ms ease;
}

.event-card:hover img {
  transform: scale(1.025);
}

.event-card .badge {
  top: 12px;
  left: 12px;
  border-radius: 5px;
  box-shadow: none;
  font-family: var(--font-body);
  text-transform: none;
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin-bottom: 10px;
  font-size: 1.55rem;
  line-height: 1.08;
}

.event-meta {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--text-light);
  font-size: 0.85rem;
}

.event-meta span {
  margin: 0;
  align-items: flex-start;
}

.meta-icon {
  color: var(--orange-dark);
}

.card-desc {
  margin-bottom: 14px;
  color: var(--text-light);
  line-height: 1.55;
}

.card-footer {
  gap: 12px;
  padding-top: 14px;
  border-color: var(--border-soft);
}

.event-price {
  color: var(--text);
  font-size: 1.02rem;
  font-variant-numeric: tabular-nums;
}

.ticket-btn {
  justify-content: center;
  padding: 10px 14px;
  font-size: 0.84rem;
  text-align: center;
}

.event-card-link {
  color: inherit;
  text-decoration: none;
}

.event-card-link:focus-visible {
  outline: 0;
}

.event-card-link:focus-visible .event-card {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.no-results {
  grid-column: 1 / -1;
  width: 100%;
  padding: 34px 24px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: var(--white);
  color: var(--text-light);
  text-align: left;
}

.no-results strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.no-results a {
  display: inline-block;
  margin-top: 8px;
  font-weight: 700;
}

.categories-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.category-card {
  min-width: 0;
  padding: 0;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--white);
  box-shadow: none;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.category-card:hover {
  transform: translateY(-2px);
  border-color: #bcb3a3;
  box-shadow: var(--shadow);
}

.category-card img {
  aspect-ratio: 5 / 3;
  height: auto;
  object-fit: cover;
}

.category-card h3 {
  padding: 12px 14px 14px;
  font-size: 1.35rem;
}

.collabs-grid {
  gap: 14px;
}

.collab-card {
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: var(--white);
  box-shadow: none;
}

.collab-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

#contact {
  background: var(--ink);
  color: var(--white);
}

#contact .section {
  max-width: 1000px;
}

#contact .section-title,
#contact p {
  color: var(--white);
}

#contact a[href^="https://wa.me"] {
  display: inline-flex !important;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 20px !important;
  border-radius: 7px !important;
  background: var(--orange-dark) !important;
  font-weight: 700;
}

footer {
  padding: 30px 20px;
  background: #171a1e;
  color: var(--white);
}

footer p {
  font-family: var(--font-body);
}

footer a {
  min-height: 40px;
  color: #fffdf8;
}

.toast {
  right: 20px;
  bottom: 20px;
  max-width: min(90vw, 440px);
  border-radius: 8px;
  background: var(--ink);
  box-shadow: var(--shadow-lift);
}

.skeleton {
  border-radius: 12px;
  background: #e2dccf;
  animation: none;
}

.booking-wrap {
  max-width: 1160px;
  gap: clamp(22px, 4vw, 52px);
  padding-top: calc(var(--nav-height) + 48px);
}

.form-card,
.event-card-preview,
.return-card,
.admin-wrap .event-row,
.admin-wrap .collab-row,
.dashboard-wrap .user-card,
.dashboard-wrap .section-card,
.dashboard-wrap .ticket-card {
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: var(--white);
  box-shadow: none;
}

.form-card {
  padding: clamp(24px, 4vw, 42px);
}

.form-card h2,
.event-info h3,
.admin-header h2,
.admin-wrap .event-row-info h4,
.admin-wrap .collab-row-info h4,
.dashboard-wrap h2,
.dashboard-wrap h3 {
  color: var(--text);
  font-family: var(--font-display);
}

.form-card .subtitle,
.form-group label,
.event-detail,
.event-info .price-box .label,
.secure-badge {
  color: var(--text-light);
}

.form-group input,
.form-group select,
.admin-wrap .form-group input,
.admin-wrap .form-group select,
.admin-wrap .form-group textarea {
  min-height: 46px;
  border: 1px solid #bdb5a7;
  border-radius: 7px;
  background: #fffefa;
  color: var(--text);
  font-family: var(--font-body);
}

.form-group input::placeholder,
.admin-wrap input::placeholder,
.admin-wrap textarea::placeholder {
  color: #62665e;
  opacity: 1;
}

.form-group input:focus,
.form-group select:focus,
.admin-wrap .form-group input:focus,
.admin-wrap .form-group select:focus,
.admin-wrap .form-group textarea:focus {
  border-color: var(--focus);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(23, 103, 91, 0.16);
  outline: 2px solid transparent;
}

.payment-info-box,
.price-box {
  border: 1px solid #e0b28f;
  border-radius: 8px;
  background: #fff2e8;
}

.payment-info-box strong,
.event-info h3,
.price-box .amount {
  color: var(--text);
  font-family: var(--font-display);
}

.price-box .amount,
.total-line strong {
  color: var(--orange-dark);
}

.event-card-preview {
  overflow: hidden;
}

.event-card-preview img {
  aspect-ratio: 16 / 10;
  height: auto;
}

.event-info {
  padding: 22px;
}

.back-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  margin: calc(var(--nav-height) + 12px) 20px 0;
  color: var(--text);
  font-weight: 700;
}

.event-detail-wrap {
  width: min(100% - 40px, 1260px);
  margin: 24px auto 88px;
}

.event-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: clamp(24px, 5vw, 70px);
  align-items: start;
}

.event-detail-media {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background: #ded8cb;
}

.event-detail-media img {
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
}

.event-detail-copy {
  padding: clamp(4px, 2vw, 18px) 0;
}

.event-detail-copy h1 {
  margin-bottom: 22px;
  font-size: clamp(2.8rem, 6vw, 5.4rem);
}

.event-detail-description {
  margin-top: 24px;
  color: var(--text-light);
  font-size: 1rem;
  line-height: 1.75;
  white-space: pre-line;
}

.event-detail-info {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.event-detail-info li {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
}

.event-detail-info strong {
  color: var(--text-light);
  font-size: 0.85rem;
  font-weight: 600;
}

.event-detail-info span {
  min-width: 0;
  color: var(--text);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.event-detail-booking {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
  padding: 22px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: var(--white);
}

.event-detail-booking .event-price {
  display: block;
  margin-bottom: 16px;
  font-family: var(--font-display);
  font-size: 2rem;
}

.event-detail-booking .ticket-btn {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  font-size: 0.94rem;
}

.event-detail-booking .ticket-btn[aria-disabled="true"] {
  background: #5d615a;
  cursor: not-allowed;
}

.detail-note {
  margin-top: 14px;
  color: var(--text-light);
  font-size: 0.82rem;
}

.detail-state {
  width: min(100% - 40px, 720px);
  margin: calc(var(--nav-height) + 60px) auto 100px;
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: var(--white);
}

.detail-state h1 {
  margin-bottom: 16px;
  font-size: clamp(2.3rem, 5vw, 4rem);
}

.detail-state p {
  color: var(--text-light);
}

.admin-wrap {
  max-width: 1240px;
  padding-top: calc(var(--nav-height) + 34px);
}

.admin-wrap .admin-tabs {
  border-color: var(--border-soft);
}

.admin-wrap .admin-tab {
  min-height: 48px;
  color: var(--text-light);
  font-family: var(--font-body);
}

.admin-wrap .admin-tab.active {
  color: var(--orange-dark);
  border-bottom-color: var(--orange-dark);
}

.admin-wrap .event-row,
.admin-wrap .collab-row {
  padding: 16px;
  box-shadow: none;
}

.admin-wrap .event-row-info p,
.admin-wrap .collab-row-info p {
  color: var(--text-light);
}

.admin-wrap .btn-icon,
.admin-wrap .modal-close,
.dashboard-wrap button {
  min-width: 42px;
  min-height: 42px;
}

.admin-wrap .modal-box,
.dashboard-wrap .qr-modal-box {
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  box-shadow: var(--shadow-lift);
}

.admin-wrap .hint,
.admin-wrap .empty-state,
.dashboard-wrap .empty-state,
.dashboard-wrap .tickets-loading {
  color: var(--text-light);
}

.dashboard-wrap {
  max-width: 920px;
  padding-top: calc(var(--nav-height) + 34px);
}

.dashboard-wrap .user-card,
.dashboard-wrap .section-card {
  padding: clamp(20px, 4vw, 32px);
}

.dashboard-wrap .ticket-banner {
  background: var(--ink);
}

.dashboard-wrap .ticket-qr-area {
  background: #f6f2e9;
}

.dashboard-wrap .ticket-id-chip {
  border-color: var(--border-soft);
  background: #f6f2e9;
}

.dashboard-wrap .logout-btn,
.dashboard-wrap .btn-qr,
.dashboard-wrap .btn-pdf,
.dashboard-wrap .btn-download-pdf {
  min-height: 44px;
  border-radius: 7px;
}

.dashboard-wrap .btn-pdf,
.dashboard-wrap .btn-download-pdf {
  background: var(--orange-dark);
}

.return-wrap {
  max-width: 600px;
  margin-top: calc(var(--nav-height) + 48px);
}

.return-card {
  padding: clamp(24px, 5vw, 48px);
}

.return-card h2 {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 2.15rem;
}

.return-card p,
.return-card .return-id {
  color: var(--text-light);
}

.return-card .return-id {
  border-color: var(--border-soft);
  background: #f6f2e9;
}

.card {
  width: min(100%, 440px);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.card h2 {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 2rem;
}

.card label {
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.card input {
  min-height: 46px;
  border: 1px solid #bdb5a7;
  border-radius: 7px;
  background: #fffefa;
  color: var(--text);
  font-family: var(--font-body);
}

.card input::placeholder {
  color: #62665e;
  opacity: 1;
}

.card input:focus {
  border-color: var(--focus);
  outline: 2px solid rgba(23, 103, 91, 0.2);
  outline-offset: 1px;
  box-shadow: none;
}

.card .btn {
  min-height: 48px;
  border-radius: 7px;
  background: var(--orange-dark);
  box-shadow: none;
  font-family: var(--font-body);
}

.card .btn:hover {
  background: #813317;
}

.card .msg,
.card .back {
  color: var(--text-light);
}

.card .msg a,
.card .back a {
  color: var(--orange-dark);
}

.event-detail-layout[aria-busy="true"] {
  opacity: 0.72;
}

@keyframes sign-arrive {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 1600px) {
  .hero {
    min-height: min(800px, calc(100svh - var(--nav-height)));
    padding-right: max(9vw, calc((100vw - 1440px) / 2));
    padding-left: max(9vw, calc((100vw - 1440px) / 2));
  }

  .events-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
  }
}

@media (max-width: 900px) {
  .top-nav {
    padding: 0 20px;
  }

  .hero {
    min-height: 690px;
    padding-right: 32px;
    padding-left: 32px;
  }

  .categories-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .event-detail-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
  }

  .booking-wrap {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 68px;
  }

  header {
    backdrop-filter: none;
  }

  .top-nav {
    padding: 0 16px;
  }

  .top-nav .logo {
    max-width: 150px;
    height: 34px;
  }

  .nav-links {
    border: 1px solid var(--border-soft);
    border-top: 0;
    background: var(--white);
    box-shadow: var(--shadow);
  }

  .nav-links a {
    padding: 13px 20px;
    border-color: var(--border-soft);
  }

  .nav-actions {
    gap: 6px;
  }

  .btn-1,
  .btn-2 {
    min-height: 40px;
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .hero {
    min-height: 680px;
    padding: calc(var(--nav-height) + 52px) 24px 48px;
    background-image:
      linear-gradient(90deg, rgba(20, 24, 26, 0.88), rgba(20, 24, 26, 0.52)),
      url("images/fest.jpg");
    background-position: center, 60% center;
  }

  .hero-content h1 {
    max-width: 11ch;
    font-size: clamp(3rem, 10vw, 5rem);
  }

  .section {
    padding: 54px 22px;
  }

  .events-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .event-card img {
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .card-body {
    padding: 14px;
  }

  .card-body h3 {
    font-size: 1.3rem;
  }

  .card-desc {
    font-size: 0.85rem;
  }

  .card-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .ticket-btn {
    width: 100%;
  }

  .event-detail-wrap {
    margin-top: 18px;
  }

  .event-detail-layout {
    grid-template-columns: 1fr;
  }

  .event-detail-booking {
    position: static;
    order: -1;
  }

  .event-detail-media,
  .event-detail-media img {
    min-height: 230px;
  }

  .booking-wrap {
    grid-template-columns: 1fr;
    padding-top: calc(var(--nav-height) + 40px);
  }

  .event-sidebar {
    position: static;
    order: -1;
  }

  .admin-wrap,
  .dashboard-wrap {
    padding-top: calc(var(--nav-height) + 28px);
  }
}

@media (max-width: 480px) {
  .top-nav .logo {
    max-width: 126px;
    height: 30px;
  }

  .nav-actions .btn-1 {
    display: none;
  }

  .nav-actions .btn-2 {
    padding-right: 10px;
    padding-left: 10px;
  }

  .nav-burger {
    width: 40px;
  }

  .hero {
    min-height: 650px;
    padding-right: 18px;
    padding-left: 18px;
  }

  .hero-search {
    grid-template-columns: 1fr;
  }

  .hero-search label {
    grid-column: 1;
  }

  .hero-search button {
    width: 100%;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-organizer-link {
    align-self: flex-start;
  }

  .section {
    padding: 46px 16px;
  }

  .events-grid {
    grid-template-columns: 1fr;
  }

  .event-card img {
    aspect-ratio: 16 / 10;
  }

  .card-body {
    padding: 17px;
  }

  .card-footer {
    align-items: center;
    flex-direction: row;
  }

  .ticket-btn {
    width: auto;
  }

  .category-card h3 {
    padding: 10px;
    font-size: 1.15rem;
  }

  .event-detail-wrap,
  .detail-state {
    width: calc(100% - 28px);
  }

  .event-detail-info li {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .booking-wrap {
    padding-right: 14px;
    padding-left: 14px;
  }

  .form-card {
    padding: 22px 16px;
  }

  .admin-wrap .event-row {
    flex-wrap: wrap;
    gap: 10px;
  }

  .admin-wrap .event-row-info {
    width: calc(100% - 78px);
  }

  .admin-wrap .event-row-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .dashboard-wrap .ticket-body {
    flex-direction: column;
  }

  .dashboard-wrap .ticket-qr-area {
    width: 100%;
    border-top: 2px dashed var(--border-soft);
    border-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* KafouEvent — discovery-first visual system */
[hidden] { display: none !important; }

html {
  background: #f5f7f8;
  scrollbar-color: #9eafb5 #edf1f2;
  scrollbar-width: thin;
}

body {
  color: #173541;
  background: #f5f7f8;
  caret-color: #b43e27;
}

::selection { color: #153442; background: #ffd9cc; }
a { color: #a53824; text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid #087a86; outline-offset: 3px; }

header {
  top: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, .97);
  border-bottom-color: #dbe3e6;
  box-shadow: 0 2px 10px rgba(15, 23, 42, .045);
}
.top-nav { max-width: 1480px; padding-right: clamp(16px, 4vw, 56px); padding-left: clamp(16px, 4vw, 56px); }
.nav-links { gap: 4px; align-items: center; }
.nav-links a { padding: 9px 11px; color: #294653; font-size: .9rem; }
.nav-links a:hover, .nav-links a:focus-visible { color: #b43e27; }
.nav-actions { gap: 9px; }
.btn-1, .btn-2, .hero-content .btn, .ticket-btn, .submit-btn, .btn-new,
.modal-submit, .btn-download-pdf {
  min-height: 46px;
  padding: 11px 18px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  box-shadow: none;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.btn-1 { border-color: #b6c5ca; color: #173541; background: #fff; }
.btn-1:hover { background: #153442; color: #fff; border-color: #153442; }
.btn-2, .hero-content .btn, .ticket-btn, .submit-btn, .btn-new, .modal-submit, .btn-download-pdf {
  background: #b43e27;
  color: #fff;
}
.btn-2:hover, .hero-content .btn:hover, .ticket-btn:hover, .submit-btn:hover:not(:disabled),
.btn-new:hover, .modal-submit:hover:not(:disabled), .btn-download-pdf:hover {
  background: #8f301f;
  color: #fff;
  transform: translateY(-1px);
}
.nav-burger { border-radius: 7px; }

.hero {
  min-height: 575px;
  padding: calc(var(--nav-height) + 58px) clamp(22px, 7vw, 112px) 58px;
  background: #f0f3f3;
  background-image: none;
  color: #173541;
  text-align: left;
}
.hero-content {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 22px clamp(38px, 7vw, 104px);
  width: min(100%, 1280px);
  max-width: 1280px;
  padding: 0;
}
.hero-content h1 {
  grid-column: 1;
  max-width: 10ch;
  margin: 0;
  color: #153442;
  font-size: clamp(3.2rem, 6.2vw, 5.65rem);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: .96;
}
.hero-content > p {
  grid-column: 1;
  max-width: 47ch;
  margin: 0;
  color: #425b66;
  font-size: clamp(1rem, 1.4vw, 1.13rem);
  line-height: 1.6;
}
.hero-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  grid-column: 1;
  width: 100%;
  margin: 4px 0 0;
  padding: 7px;
  border: 1px solid #d6e0e3;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .07);
}
.hero-search label {
  grid-column: 1 / -1;
  margin: 0;
  color: #526a73;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.hero-search input {
  min-width: 0;
  min-height: 45px;
  padding: 10px 12px;
  border: 0;
  border-radius: 6px;
  background: #fff;
  color: #173541;
}
.hero-search input:focus { outline: 2px solid #087a86; outline-offset: 1px; }
.hero-search input::placeholder { color: #60747d; opacity: 1; }
.hero-search button {
  min-width: 122px;
  min-height: 45px;
  border-radius: 7px;
  background: #b43e27;
}
.hero-search button:hover { background: #8f301f; }
.hero-actions { grid-column: 1; gap: 18px; margin: 0; }
.hero-actions .btn { min-height: 46px; padding: 12px 18px; border-radius: 8px; }
.hero-organizer-link { color: #fff; font-size: .9rem; font-weight: 700; }
.hero-organizer-link:hover { color: #ffd8bd; }
.hero-event {
  grid-column: 2;
  grid-row: 1 / span 5;
  align-self: stretch;
  width: 100%;
  min-height: 408px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: #153442;
  box-shadow: 0 18px 38px rgba(15, 23, 42, .14);
  animation: hero-arrive 650ms cubic-bezier(.2,.8,.2,1) both;
}
.hero-event-link { position: relative; display: block; width: 100%; height: 100%; min-height: 408px; color: #fff; }
.hero-event-link:hover { color: #fff; }
.hero-event-link::after {
  position: absolute;
  inset: 32% 0 0;
  background: linear-gradient(180deg, transparent, rgba(12, 35, 45, .92));
  content: "";
}
.hero-event-link img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-event-content {
  position: absolute;
  z-index: 1;
  right: 28px;
  bottom: 26px;
  left: 28px;
  display: grid;
  gap: 9px;
  color: #fff;
}
.hero-event-label { color: #ffe0d5; font-size: .72rem; font-weight: 800; letter-spacing: .08em; }
.hero-event-title { max-width: 18ch; font: 700 clamp(1.8rem, 3.2vw, 2.65rem)/1.05 var(--font-display); }
.hero-event-meta { color: #f1f5f6; font-size: .92rem; }
.hero-event-action { color: #fff; font-size: .9rem; font-weight: 700; }
.hero-event-action span { display: inline-block; padding-left: 3px; transition: transform 160ms ease; }
.hero-event-link:hover .hero-event-action span { transform: translateX(4px); }
body:not(.has-featured-event) .hero-content { grid-template-columns: minmax(0, 1fr); max-width: 900px; }
body:not(.has-featured-event) .hero-content h1 { max-width: 12ch; }
@keyframes hero-arrive {
  from { opacity: .65; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

#featured-section { background: #fff; }
.section {
  width: min(100%, 1440px);
  padding: clamp(48px, 6vw, 82px) clamp(20px, 5vw, 68px);
}
.section-title {
  margin-bottom: 12px;
  color: #153442;
  font-size: clamp(2.15rem, 3.9vw, 3.15rem);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.05;
}
.section-intro { max-width: 64ch; margin: 0 0 24px; color: #506671; }
#events { background: #f5f7f8; }
.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) repeat(3, minmax(135px, .8fr)) auto;
  align-items: end;
  gap: 10px;
  margin: 24px 0 16px;
  padding: 14px;
  border: 1px solid #dce5e7;
  border-radius: 10px;
  background: #fff;
}
.catalog-toolbar label {
  display: grid;
  gap: 6px;
  color: #405963;
  font-size: .76rem;
  font-weight: 800;
}
.catalog-toolbar input, .catalog-toolbar select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid #c7d4d8;
  border-radius: 6px;
  background: #fff;
  color: #173541;
}
.catalog-toolbar input::placeholder { color: #60747d; opacity: 1; }
.filter-reset {
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid #b8c7cc;
  border-radius: 6px;
  background: #fff;
  color: #294653;
  font-size: .83rem;
  font-weight: 700;
  cursor: pointer;
}
.filter-reset:hover { border-color: #153442; color: #153442; background: #f4f7f8; }
.filters { gap: 8px; margin: 0 0 22px; }
.filter-btn {
  min-height: 38px;
  padding: 7px 14px;
  border: 1px solid #c7d4d8;
  border-radius: 6px;
  background: #fff;
  color: #294653;
  font-size: .84rem;
  font-weight: 700;
}
.filter-btn:hover { border-color: #b43e27; color: #a53824; }
.filter-btn.active { border-color: #153442; background: #153442; color: #fff; }
.events-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 22px;
}
.event-card {
  overflow: hidden;
  border: 1px solid #d9e2e5;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(15, 23, 42, .035);
  transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease;
}
.event-card:hover, .event-card:focus-within {
  transform: translateY(-2px);
  border-color: #a9bdc3;
  box-shadow: 0 12px 24px rgba(15, 23, 42, .10);
}
.event-img-wrap { position: relative; overflow: hidden; background: #dce5e6; }
.event-card img { width: 100%; height: 218px; object-fit: cover; transition: transform 220ms ease; }
.event-image-placeholder {
  display: grid;
  min-height: 218px;
  place-content: center;
  padding: 14px;
  background: #e5ecee;
  color: #36535e;
  font-size: .84rem;
  font-weight: 700;
  text-align: center;
}
.event-detail-image-placeholder { width: 100%; min-height: 400px; height: 100%; background: #e5ecee; }
.event-card:hover img { transform: scale(1.025); }
.event-card .badge {
  top: 12px;
  left: 12px;
  padding: 6px 9px;
  border-radius: 4px;
  background: #fff;
  color: #153442;
  font-size: .72rem;
  font-weight: 800;
}
.event-card .demo-card-badge { background: #fff0eb; color: #9e321f; }
.event-status-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 9px;
  border: 1px solid rgba(255,255,255,.62);
  border-radius: 4px;
  background: #153442;
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
}
.event-date-stamp {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  min-width: 52px;
  padding: 6px 8px;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 6px;
  background: #fff;
  color: #153442;
  text-align: center;
  text-transform: uppercase;
}
.event-date-stamp strong { font: 700 1.2rem/1 var(--font-body); }
.event-date-stamp span { margin-top: 3px; color: #506671; font-size: .68rem; font-weight: 800; }
.card-body { display: flex; min-height: 202px; flex-direction: column; padding: 17px 18px 16px; }
.event-category { margin-bottom: 7px; color: #a53824; font-size: .74rem; font-weight: 800; letter-spacing: .035em; }
.card-body h3 { margin: 0 0 10px; font: 700 1.42rem/1.15 var(--font-display); }
.card-body h3 a { color: #153442; text-decoration: none; }
.card-body h3 a:hover { color: #a53824; text-decoration: underline; text-underline-offset: 3px; }
.event-meta { display: grid; gap: 5px; margin: 0 0 16px; color: #506671; font-size: .82rem; line-height: 1.4; }
.event-meta span { display: flex; align-items: center; gap: 7px; min-width: 0; }
.meta-icon { width: 15px; height: 15px; flex: 0 0 15px; color: #a53824; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid #e7edef; }
.event-price { color: #153442; font-size: .95rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.ticket-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 39px; padding: 8px 12px; border-radius: 6px; font-size: .79rem; text-decoration: none; }
.no-results { display: grid; gap: 7px; color: #506671; }
.no-results strong { color: #173541; font-size: 1.05rem; }

#categories { background: #fff; }
.categories-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.category-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dbe3e6;
  border-radius: 9px;
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.category-card:hover { border-color: #9fb4ba; box-shadow: 0 9px 18px rgba(15,23,42,.09); transform: none; }
.category-card img { width: 100%; height: 138px; object-fit: cover; }
.category-card h3 { padding: 11px 13px; color: #153442; font: 700 1.05rem/1.2 var(--font-body); }
#collaborateurs { background: #f0f3f3; }
#contact { background: #153442; color: #fff; }
#contact .section-title, #contact p { color: #fff; }
#contact a { display: inline-flex; min-height: 46px; align-items: center; padding: 10px 16px; border-radius: 7px; background: #e65c3c; color: #fff; font-weight: 800; text-decoration: none; }
#contact a:hover { background: #ff795a; }
footer { padding: 26px 20px; background: #0f2732; color: #dce7ea; }
footer a { margin: 0 8px; color: #fff; }
footer a:hover { color: #ffd5c8; }

.event-detail-wrap, .detail-state { width: min(100% - 40px, 1280px); margin: calc(var(--nav-height) + 32px) auto 64px; }
.event-detail-wrap .back-link { display: inline-block; margin: 0 0 18px; color: #405c66; font-weight: 700; }
.event-detail-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(24px, 4vw, 54px); align-items: start; }
.event-detail-media, .event-detail-media img { min-height: 400px; max-height: 560px; border-radius: 10px; }
.event-detail-media { position: relative; background: #dce5e6; }
.event-detail-image-placeholder { position: absolute; inset: 0; min-height: 0; border-radius: 10px; }
.event-detail-copy { padding: 25px 0 0; }
.event-detail-copy h1 { max-width: 18ch; color: #153442; font-size: clamp(2.3rem, 5vw, 4rem); line-height: .99; }
.event-detail-info { gap: 0; border-top: 1px solid #dbe3e6; border-bottom: 1px solid #dbe3e6; }
.event-detail-info li { padding: 13px 10px; border-bottom: 1px solid #e7edef; }
.event-detail-info strong { color: #516771; }
.event-detail-info span { color: #173541; font-weight: 700; }
.event-detail-description { max-width: 68ch; color: #405963; font-size: 1rem; line-height: 1.7; }
.event-detail-booking { position: sticky; top: calc(var(--nav-height) + 22px); padding: 22px; border: 1px solid #dbe3e6; border-radius: 10px; background: #fff; box-shadow: 0 8px 24px rgba(15,23,42,.07); }
.event-detail-booking .event-price { display: block; margin-bottom: 17px; font-size: 1.4rem; }
.event-detail-booking .ticket-btn { width: 100%; min-height: 48px; border: 0; cursor: pointer; }
.event-detail-booking .ticket-btn[aria-disabled="true"], .event-detail-booking .ticket-btn:disabled { cursor: not-allowed; background: #60747d; color: #fff; }
.detail-note { margin-top: 12px; color: #506671; font-size: .82rem; }
.demo-mode .is-demo-event .event-detail-copy::before {
  display: inline-block;
  margin-bottom: 12px;
  padding: 5px 8px;
  border-radius: 4px;
  background: #fff0eb;
  color: #9e321f;
  content: "ÉVÉNEMENT FICTIF · DÉMO";
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.booking-wrap { width: min(100% - 36px, 1080px); grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: 24px; margin: calc(var(--nav-height) + 34px) auto 60px; }
.form-card, .event-card-preview { border: 1px solid #dbe3e6; border-radius: 10px; background: #fff; box-shadow: 0 5px 18px rgba(15,23,42,.06); }
.form-card { padding: clamp(20px, 3.5vw, 34px); }
.form-card h2 { color: #153442; font-size: 2rem; }
.form-card .subtitle { margin-bottom: 22px; color: #506671; }
.form-group label { color: #405963; font-weight: 700; }
.form-group input, .form-group select, .form-group textarea { min-height: 46px; border: 1px solid #bdcbd0; border-radius: 6px; background: #fff; color: #173541; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: #087a86; box-shadow: 0 0 0 3px rgba(8,122,134,.14); }
.payment-info-box { border: 1px solid #d7e3e4; border-radius: 7px; background: #f2f7f7; }
.payment-info-box strong { color: #173541; }
.submit-btn { width: 100%; min-height: 48px; border: 0; border-radius: 7px; }
.event-card-preview { overflow: hidden; }
.event-card-preview img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.event-card-preview .event-image-placeholder { width: 100%; min-height: 180px; }
.event-card-preview .event-info { padding: 18px; }
.event-card-preview h3 { color: #153442; }
.demo-booking-result { margin-top: 18px; padding: 16px; border: 1px solid #b9d8c8; border-radius: 8px; background: #f1f8f3; color: #174b36; }
.demo-booking-result p { margin: 5px 0 10px; }
.demo-booking-result a { color: #174b36; font-weight: 800; }

.email-modal-overlay, .qr-modal-overlay { background: rgba(10, 29, 37, .66); }
.email-modal-box, .qr-modal-box { border: 1px solid #dbe3e6; border-radius: 12px; box-shadow: 0 24px 70px rgba(9,29,37,.26); }
.em-banner { background: #153442; }
.em-banner h2 { color: #fff; }
.em-body { background: #fff; }
.em-label { color: #153442; }
.em-trow { border-color: #e1e8ea; }
.em-tkey { color: #526873; }
.em-tval { color: #173541; }

.dashboard-wrap { width: min(100% - 36px, 1040px); max-width: 1040px; margin: calc(var(--nav-height) + 36px) auto 60px; }
.user-card, .section-card { border: 1px solid #dbe3e6; border-radius: 10px; background: #fff; box-shadow: 0 4px 15px rgba(15,23,42,.05); }
.user-card h2, .section-card h3, .section-title-row h3 { color: #153442; }
.logout-btn { border-radius: 6px; }
.ticket-card { border: 1px solid #d7e1e4; border-radius: 10px; box-shadow: 0 4px 14px rgba(15,23,42,.06); }
.ticket-card:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(15,23,42,.10); }
.ticket-banner { border-bottom: 0; background: #153442; }
.ticket-banner h4 { color: #fff; font-size: 1.55rem; }
.ticket-meta { color: #e1ebed; }
.ticket-body { align-items: stretch; }
.ticket-details { padding: 20px; }
.detail-row { padding: 7px 0; border-bottom: 1px solid #e6edef; }
.detail-row .dk { color: #506671; }
.detail-row .dv { color: #173541; font-variant-numeric: tabular-nums; }
.ticket-id-chip { border: 1px solid #d8e2e5; border-radius: 5px; background: #f5f7f8; color: #173541; font-family: var(--font-body); letter-spacing: .025em; }
.ticket-actions { gap: 8px; }
.btn-action { min-height: 42px; border-radius: 6px; }
.btn-qr { background: #153442; }
.btn-qr:hover { background: #0d2732; }
.btn-pdf { background: #b43e27; }
.btn-pdf:hover { background: #8f301f; }
.ticket-qr-area { width: 136px; border-color: #dbe3e6; background: #f5f7f8; }
.qr-canvas-wrap { border-radius: 5px; box-shadow: none; }
.qr-label { color: #405963; font-size: .72rem; letter-spacing: 0; }
.ticket-qr-unavailable { display: grid; place-content: center; min-height: 90px; color: #405963; font-size: .82rem; font-weight: 700; text-align: center; }
.status-badge { border-radius: 4px; }
.status-invalid { background: #a23223; }
.count-badge { border: 1px solid #f1c4b5; border-radius: 5px; background: #fff0eb; color: #9e321f; }
.qr-modal-box { max-width: 440px; max-height: calc(100dvh - 32px); overflow: auto; }
#qr-modal-canvas-wrap { height: auto; box-shadow: none; }
#qr-modal-canvas-wrap { width: min(100%, 360px); margin: 0 auto 14px; }
#qr-modal-canvas-wrap canvas { height: auto; }
.qr-modal-access {
  width: fit-content;
  max-width: 100%;
  margin: 12px auto 16px;
  padding: 12px;
  border: 1px solid #dbe3e6;
  border-radius: 8px;
  background: #f5f7f8;
}
.qr-modal-access #qr-modal-live-code { display: grid; min-width: 200px; min-height: 200px; place-items: center; }
.qr-modal-access canvas { display: block; }
.qr-modal-access p { margin-top: 8px; color: #405963; font-size: .78rem; font-weight: 700; text-align: center; }
.qr-modal-id { border-radius: 5px; color: #153442; }

.admin-wrap { max-width: 1120px; margin: calc(var(--nav-height) + 30px) auto 60px; }
.admin-header h2, .modal-box h3, .collab-row-info h4, .event-row-info h4 { color: #153442; }
.admin-tabs { gap: 4px; border-color: #dbe3e6; }
.admin-tab { color: #506671; }
.admin-tab.active { color: #a53824; border-bottom-color: #b43e27; }
.event-row, .collab-row { border: 1px solid #dbe3e6; border-radius: 8px; background: #fff; box-shadow: none; }
.event-row.archived { background: #f1f3f4; }
.modal-overlay { background: rgba(10,29,37,.64); }
.modal-box { border: 1px solid #dbe3e6; border-radius: 10px; }
.form-group input, .form-group select, .form-group textarea { border-radius: 6px; }
.modal-submit { border-radius: 7px; }

.login-page, .signup-page { background: #f1f4f4; }
.login-page .card, .signup-page .card {
  width: min(100%, 420px);
  border: 1px solid #dbe3e6;
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(15,23,42,.09);
}
.login-page .card h2, .signup-page .card h2 { color: #153442; }
.login-page input, .signup-page input { border-radius: 6px; background: #fff; }
.login-page .btn, .signup-page .btn { min-height: 46px; border-radius: 7px; background: #b43e27; }
.login-page .btn:hover, .signup-page .btn:hover { background: #8f301f; }

.demo-banner {
  position: sticky;
  z-index: 1200;
  top: 0;
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 7px 16px;
  background: #78351f;
  color: #fff;
  font-size: .8rem;
  text-align: center;
}
.demo-banner strong { letter-spacing: .07em; }
.demo-banner a { color: #fff; font-weight: 800; text-underline-offset: 3px; }
.demo-mode body > header { top: 38px; }
.demo-mode .hero { padding-top: calc(var(--nav-height) + 84px); }

.ticket-demo-page { min-height: 100vh; background: #f0f3f3; }
.ticket-demo-shell { width: min(100% - 32px, 740px); margin: 44px auto; }
.ticket-demo-back { display: inline-block; margin-bottom: 18px; color: #36535e; font-weight: 700; }
.ticket-demo-card { overflow: hidden; border: 1px solid #cfdbdf; border-radius: 12px; background: #fff; box-shadow: 0 12px 28px rgba(15,23,42,.10); }
.ticket-demo-brand { display: flex; min-height: 76px; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding: 12px 24px; border-bottom: 1px solid #dbe3e6; }
.ticket-demo-brand img { width: 150px; height: auto; object-fit: contain; }
.ticket-demo-brand span { max-width: 100%; padding: 6px 8px; border-radius: 4px; background: #fff0eb; color: #9e321f; font-size: 14px; font-weight: 800; text-align: center; overflow-wrap: anywhere; }
.ticket-demo-image { display: block; width: 100%; max-height: 300px; aspect-ratio: 1100 / 520; object-fit: cover; }
.ticket-demo-image-placeholder { display: grid; min-height: 160px; margin: 0; padding: 20px; place-items: center; background: #e9eff1; color: #506671; font-weight: 600; text-align: center; }
.ticket-demo-body { padding: clamp(20px, 4vw, 34px); }
.ticket-demo-body h1 { margin-bottom: 22px; color: #153442; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1; }
.ticket-demo-body dl { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; margin: 0; border-top: 1px solid #dbe3e6; }
.ticket-demo-body dl div { padding: 13px 0; border-bottom: 1px solid #e5ebed; }
.ticket-demo-body dt { margin-bottom: 3px; color: #506671; font-size: 14px; font-weight: 700; }
.ticket-demo-body dd { margin: 0; color: #173541; font-weight: 700; overflow-wrap: anywhere; }
.ticket-demo-no-qr { margin-top: 20px; padding: 16px; border: 1px solid #e3b8a8; border-radius: 7px; background: #fff6f2; color: #78351f; }
.ticket-demo-no-qr p { margin: 5px 0 0; }
.ticket-demo-entry { margin: 15px 0 0; color: #506671; font-size: 14px; }
.ticket-demo-actions { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 17px; }
.ticket-demo-actions button, .ticket-demo-actions a { min-height: 44px; padding: 10px 14px; border: 0; border-radius: 6px; background: #153442; color: #fff; font-weight: 700; text-decoration: none; cursor: pointer; }
.ticket-demo-actions a { display: inline-flex; align-items: center; background: #b43e27; }
.ticket-demo-unavailable { padding: 24px; border: 1px solid #dbe3e6; border-radius: 10px; background: #fff; }

@media (min-width: 1600px) {
  .section { width: min(100%, 1520px); }
  .events-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
  .hero-content { max-width: 1380px; }
}
@media (max-width: 1000px) {
  .catalog-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-search-label { grid-column: 1 / -1; }
  .events-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .event-detail-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; }
}
@media (max-width: 768px) {
  .hero { min-height: 0; padding: calc(var(--nav-height) + 38px) 22px 38px; }
  .hero-content { grid-template-columns: 1fr; gap: 16px; }
  .hero-content h1, .hero-content > p, .hero-search, .hero-actions { grid-column: 1; }
  .hero-content h1 { max-width: 11ch; font-size: clamp(3rem, 10vw, 4.5rem); }
  .hero-event { grid-column: 1; grid-row: auto; min-height: 310px; margin-top: 10px; }
  .hero-event-link { min-height: 310px; }
  .hero-event-content { right: 20px; bottom: 20px; left: 20px; }
  .hero-event-title { font-size: 2rem; }
  .section { padding: 48px 22px; }
  .categories-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .event-detail-layout { grid-template-columns: 1fr; }
  .event-detail-booking { position: static; order: 0; }
  .event-detail-media, .event-detail-media img { min-height: 290px; }
  .event-detail-image-placeholder { min-height: 0; }
  .booking-wrap { grid-template-columns: 1fr; padding-top: 0; }
  .event-sidebar { position: static; order: -1; }
  .admin-wrap { width: min(100% - 28px, 1120px); }
}
@media (max-width: 600px) {
  .nav-links { background: #fff; border-color: #dbe3e6; }
  .nav-links a { padding: 14px 20px; border-color: #e2e9eb; }
  .nav-actions .btn-1 { display: none; }
  .nav-actions .btn-2 { min-height: 38px; padding: 7px 10px; font-size: .76rem; }
  .catalog-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 11px; }
  .catalog-search-label { grid-column: 1 / -1; }
  .filter-reset { grid-column: 1 / -1; }
  .events-grid { grid-template-columns: 1fr; gap: 14px; }
  .event-card { display: grid; grid-template-columns: minmax(112px, .78fr) minmax(0, 1.22fr); }
  .event-img-wrap { min-height: 100%; }
  .event-card img { height: 100%; min-height: 190px; aspect-ratio: auto; }
  .event-card .badge { top: 8px; left: 8px; padding: 5px 7px; font-size: .63rem; }
  .event-status-badge { top: auto; right: auto; bottom: 8px; left: 8px; padding: 5px 6px; font-size: .61rem; }
  .event-date-stamp { top: 8px; right: 8px; bottom: auto; min-width: 42px; padding: 5px 6px; }
  .event-date-stamp strong { font-size: 1rem; }
  .card-body { min-height: 0; padding: 12px; }
  .card-body h3 { margin-bottom: 8px; font-size: 1.18rem; }
  .event-category { margin-bottom: 5px; font-size: .68rem; }
  .event-meta { gap: 4px; margin-bottom: 10px; font-size: .75rem; }
  .event-meta span { align-items: flex-start; }
  .event-meta span:last-child { display: none; }
  .card-footer { align-items: flex-start; flex-direction: column; gap: 8px; padding-top: 9px; }
  .ticket-btn { width: 100%; min-height: 36px; }
  .section { padding: 42px 16px; }
  .section-title { font-size: 2rem; }
  .section-intro { margin-bottom: 18px; font-size: .9rem; }
  .category-card img { height: 112px; }
  .category-card h3 { padding: 9px; font-size: .9rem; }
  .event-detail-wrap, .detail-state { width: calc(100% - 28px); margin-top: calc(var(--nav-height) + 18px); }
  .event-detail-media, .event-detail-media img { min-height: 220px; }
  .event-detail-image-placeholder { min-height: 0; }
  .event-detail-booking { padding: 17px; }
  .event-detail-info li { grid-template-columns: 90px minmax(0,1fr); }
  .booking-wrap { width: calc(100% - 24px); margin-top: calc(var(--nav-height) + 24px); padding: 0; }
  .form-card { padding: 20px 16px; }
  .form-card h2 { font-size: 1.7rem; }
  .dashboard-wrap { width: calc(100% - 24px); padding: 0; margin-top: calc(var(--nav-height) + 24px); }
  .user-card, .section-card { padding: 17px; }
  .ticket-body { flex-direction: column; }
  .ticket-qr-area { width: 100%; flex-direction: row; gap: 12px; border-top: 1px dashed #ccd9dc; border-left: 0; }
  .ticket-actions { flex-direction: row; flex-wrap: wrap; }
  .btn-action { flex: 1 1 130px; }
  .qr-modal-box { padding: 24px 16px; }
  #qr-modal-canvas-wrap { width: min(100%, 310px); margin: 0 auto 12px; }
  .qr-modal-access #qr-modal-live-code { min-width: 180px; min-height: 180px; }
  .admin-wrap .event-row { flex-wrap: wrap; gap: 10px; }
  .admin-wrap .event-row-info { width: calc(100% - 78px); }
  .admin-wrap .event-row-actions { width: 100%; justify-content: flex-end; }
  .demo-banner { justify-content: space-between; gap: 7px; font-size: .68rem; }
  .demo-banner span { flex: 1; }
  .demo-mode body > header { top: 42px; }
  .ticket-demo-shell { width: calc(100% - 24px); margin: 24px auto; }
  .ticket-demo-brand { min-height: 64px; padding: 10px 14px; }
  .ticket-demo-brand img { width: 120px; }
  .ticket-demo-brand span { font-size: .62rem; }
  .ticket-demo-body dl { grid-template-columns: 1fr; }
  .ticket-demo-actions { flex-direction: column; align-items: stretch; }
  .ticket-demo-actions button, .ticket-demo-actions a { justify-content: center; }
}
@media (max-width: 390px) {
  .hero-search { grid-template-columns: 1fr; }
  .hero-search label { grid-column: 1; }
  .hero-search button { width: 100%; }
  .hero-actions { align-items: flex-start; flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .catalog-toolbar { grid-template-columns: 1fr; }
  .catalog-search-label, .filter-reset { grid-column: 1; }
  .event-card { grid-template-columns: minmax(98px, .7fr) minmax(0, 1.3fr); }
  .event-card img { min-height: 182px; }
  .card-body { padding: 10px; }
  .card-body h3 { font-size: 1.06rem; }
  .event-meta { font-size: .71rem; }
  .event-price { font-size: .85rem; }
}
@media print {
  .demo-banner, .ticket-demo-back, .ticket-demo-actions, header, footer { display: none !important; }
  .ticket-demo-page { background: #fff; }
  .ticket-demo-shell { width: 100%; margin: 0; }
  .ticket-demo-card { border: 1px solid #9ba9ad; border-radius: 0; box-shadow: none; break-inside: avoid; }
  .ticket-demo-no-qr { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-event { animation: none; }
}


/* ══════════════════════════════════════════════════════════════
   COMPTE DANS LE BURGER · PETITS ÉCRANS · ADMIN (images, catégories)
   Ajouts en fin de fichier pour passer après les règles existantes.
   ══════════════════════════════════════════════════════════════ */

/* ── Cartes catégorie : boutons cliquables, nom éditable par l'admin ── */
button.category-card {
  display: block;
  width: 100%;
  padding: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
button.category-card img { display: block; }
.category-card .category-name {
  display: block;
  padding: 11px 13px;
  color: #153442;
  font: 700 1.05rem/1.2 var(--font-body);
}

/* ── Bloc compte dans le menu burger (caché sur grand écran) ── */
.nav-account-mobile { display: none; }

@media (max-width: 768px) {
  /* Connexion / Créer un compte / Déconnexion passent dans le burger */
  header .nav-actions { display: none; }

  .nav-links.open {
    max-height: calc(100dvh - var(--nav-height));
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .nav-account-mobile {
    display: grid;
    gap: 10px;
    margin-top: 6px;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #dbe3e6;
    background: #f5f7f8;
  }
  .nav-links .nav-account-mobile .nav-acc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    margin: 0;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    font: 700 .95rem var(--font-body);
    text-decoration: none;
    cursor: pointer;
  }
  .nav-links .nav-account-mobile .nav-acc-primary {
    border-color: #b43e27;
    background: #b43e27;
    color: #fff;
  }
  .nav-links .nav-account-mobile .nav-acc-primary:hover { border-color: #8f301f; background: #8f301f; color: #fff; }
  .nav-links .nav-account-mobile .nav-acc-secondary {
    border-color: #b6c5ca;
    background: #fff;
    color: #173541;
  }
  .nav-links .nav-account-mobile .nav-acc-secondary:hover { border-color: #153442; background: #153442; color: #fff; }
}

/* ── Petits écrans : rien ne déborde, interface plus légère ── */
@media (max-width: 600px) {
  html, body { max-width: 100%; overflow-x: clip; }
  img, video, canvas, iframe { max-width: 100%; }
  .events-grid > *, .categories-grid > *, .collabs-grid > *, .hero-content > * { min-width: 0; }
  h1, h2, h3, h4, p, .event-meta span { overflow-wrap: anywhere; }

  /* Hero : plus court, titre moins massif */
  .hero { padding: calc(var(--nav-height) + 22px) 16px 26px; }
  .hero-content { gap: 12px; }
  .hero-content h1 { max-width: none; font-size: clamp(2.1rem, 9.5vw, 2.8rem); line-height: 1; }
  .hero-content > p { font-size: .95rem; line-height: 1.5; }
  .hero-search { padding: 6px; }
  .hero-search label {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  .hero-search input, .hero-search button { min-height: 44px; }
  .hero-actions { gap: 10px; }
  .hero-organizer-link { font-size: .85rem; }
  .hero-event, .hero-event-link { min-height: 220px; }
  .hero-event { margin-top: 4px; }
  .hero-event-content { right: 16px; bottom: 16px; left: 16px; gap: 6px; }
  .hero-event-title { font-size: 1.5rem; }
  .hero-event-meta { font-size: .82rem; }

  /* Sections */
  .section { padding: 34px 16px; }
  .section-title { font-size: 1.7rem; }
  .section-intro { margin-bottom: 14px; font-size: .88rem; }

  /* Filtres : la recherche du hero suffit, les 3 listes tiennent sur 2 lignes */
  .catalog-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 16px 0 12px; padding: 10px; }
  .catalog-search-label { display: none; }
  .filter-reset { grid-column: auto; align-self: end; }
  .catalog-toolbar input, .catalog-toolbar select, .filter-reset { min-height: 42px; }

  /* Pastilles de catégories : une seule ligne qui défile */
  .filters {
    display: flex; flex-wrap: nowrap; gap: 8px;
    margin: 0 -16px 16px; padding: 2px 16px 6px;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .filters::-webkit-scrollbar { display: none; }
  .filter-btn { flex: 0 0 auto; white-space: nowrap; }

  /* Catégories et collaborateurs : 2 colonnes compactes */
  .categories-grid { gap: 10px; }
  .category-card img { height: 84px; }
  .category-card .category-name, .category-card h3 { padding: 9px 10px; font-size: .88rem; }
  .collabs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .collab-card { padding: 16px 10px; }
  .collab-avatar, .collab-avatar-image { width: 52px; height: 52px; margin-bottom: 10px; font-size: 1.2rem; }
  .collab-name { font-size: .92rem; }
  .collab-role { margin-bottom: 8px; font-size: .74rem; }
  .collab-badge { padding: 4px 10px; font-size: .66rem; }

  #contact p { font-size: .95rem; }
  footer { padding: 22px 16px; font-size: .85rem; }
  footer a { display: inline-block; margin: 0 6px; }

  /* Espace client : billets plus compacts */
  .user-card h2 { font-size: 1.35rem; }
  .ticket-banner { padding: 16px 16px 14px; }
  .ticket-banner h4 { font-size: 1.2rem; }
  .status-badge { position: static; display: inline-block; margin-bottom: 8px; }
  .ticket-meta { gap: 6px 12px; }
  .ticket-details { padding: 14px 16px; }
  .detail-row { padding: 5px 0; }

  /* Admin : onglets qui défilent, listes compactes */
  .admin-tabs { overflow-x: auto; scrollbar-width: none; margin-bottom: 18px; }
  .admin-tabs::-webkit-scrollbar { display: none; }
  .admin-tab { flex: 0 0 auto; padding: 11px 14px; white-space: nowrap; }
  .admin-header h2 { font-size: 1.5rem; }
  .collab-row, .cat-row { gap: 10px; padding: 12px; }
  .collab-row-avatar { width: 40px; height: 40px; font-size: .8rem; }
  .cat-row-image { width: 64px; height: 46px; }
  .modal-overlay { padding: 10px; }
  .image-field { flex-direction: column; align-items: flex-start; }
}

/* ── Admin : images collaborateurs / catégories ── */
.admin-intro { margin: -10px 0 18px; }

.collab-row-photo { object-fit: cover; background: #eef2f3; }

.cat-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  padding: 14px 18px;
  border: 1px solid #dbe3e6;
  border-radius: 8px;
  background: #fff;
}
.cat-row-image {
  flex-shrink: 0;
  width: 84px;
  height: 56px;
  border-radius: 6px;
  background: #dce5e6;
  object-fit: cover;
}
.cat-row .collab-row-info h4 { color: #153442; }
.cat-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: .72rem;
  font-weight: 700;
}
.cat-pill.on  { background: #e3f4ec; color: #176a4b; }
.cat-pill.off { background: #eceff1; color: #526873; }

.image-field {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px dashed #b6c5ca;
  border-radius: 8px;
  background: #f5f7f8;
}
.image-field-preview {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 96px;
  height: 72px;
  overflow: hidden;
  border-radius: 6px;
  background: #dce5e6;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
}
.image-field-round { width: 72px; border-radius: 50%; }
.image-field-preview img { width: 100%; height: 100%; object-fit: cover; }
.image-field-actions { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; gap: 8px; }
.image-field-actions .hint { margin: 0; }
.btn-file {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid #153442;
  border-radius: 7px;
  background: #fff;
  color: #153442;
  font: 700 .86rem var(--font-body);
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}
.btn-file:hover { background: #153442; color: #fff; }
.btn-file-remove {
  min-height: 28px;
  padding: 0;
  border: 0;
  background: none;
  color: #b42318;
  font: 700 .82rem var(--font-body);
  text-decoration: underline;
  cursor: pointer;
}
.cat-preview-wrap { display: flex; justify-content: center; padding: 14px; border-radius: 8px; background: #f5f7f8; }
.cat-preview-card { width: min(100%, 220px); cursor: default; }
.cat-home-toggle { align-self: end; padding-bottom: 12px; }
