:root {
  color-scheme: dark;
  --member-sidebar-width: 220px;
  --charcoal: #171717;
  --charcoal-light: #222222;
  --velvet: #9a1c2c;
  --velvet-bright: #c6283d;
  --gold: #d4b36a;
  --gold-soft: #f0dfb2;
  --ivory: #f8f4ec;
  --muted: #b6b2aa;
  --shadow: rgba(8, 8, 8, 0.45);
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scrollbar-gutter: stable;
}

body {
  min-height: 100vh;
  background: radial-gradient(circle at top left, #292929 0%, var(--charcoal) 45%, #0f0f0f 100%);
  color: var(--ivory);
  font-family: "Montserrat", "Arial", sans-serif;
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

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

.container {
  width: min(100% - 2.5rem, var(--max-width));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(19, 19, 19, 0.92);
  border-bottom: 1px solid rgba(212, 179, 106, 0.2);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.2rem 0;
  position: relative;
}

.logo {
  font-family: "Playfair Display", "Georgia", serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.logo--image img {
  height: 36px;
  width: auto;
  display: block;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.95rem;
}

.main-nav a {
  padding: 0.4rem 0.6rem;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
  background: rgba(212, 179, 106, 0.18);
  color: var(--gold-soft);
}

.nav-member {
  border: 2px solid var(--gold);
  color: var(--gold);
  padding: 0.4rem 1rem;
  min-width: 6.5rem;
  text-align: center;
  border-radius: 999px;
  font-weight: 600;
}

.nav-member:hover,
.nav-member:focus {
  background: rgba(212, 179, 106, 0.18);
  color: var(--gold-soft);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 2px solid rgba(212, 179, 106, 0.4);
  background: rgba(20, 20, 20, 0.6);
  padding: 0.4rem;
  cursor: pointer;
  gap: 6px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--gold-soft);
}

.site-banner {
  display: flex;
  align-items: center;
  min-height: 52px;
  background: linear-gradient(120deg, #7e1524 0%, var(--velvet) 45%, var(--velvet-bright) 100%);
  border-bottom: 1px solid rgba(212, 179, 106, 0.35);
  box-shadow: 0 12px 24px rgba(12, 12, 12, 0.25);
  transition: opacity 0.2s ease;
}

.site-banner.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.site-banner__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
  padding: 0.75rem 0;
  width: 100%;
}

.site-banner__label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--gold-soft);
}

.site-banner__text {
  font-weight: 600;
  font-size: 0.95rem;
  opacity: 1;
  transition: opacity 0.4s ease;
}

.site-banner__text.is-fading {
  opacity: 0;
}

@media (max-width: 700px) {
  .site-banner__inner {
    flex-direction: column;
    gap: 0.35rem;
  }
}


.hero {
  padding: 1.5rem 0 3.5rem;
}

.hero--compact {
  padding: 4rem 0 3rem;
}

.hero-inner {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.75rem;
  color: var(--gold);
  margin-bottom: 0rem;
}

.hero h1 {
  font-family: "Playfair Display", "Georgia", serif;
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  line-height: 1.1;
  margin-bottom: 1.2rem;
}

.hero-title {
  font-family: "Playfair Display", "Georgia", serif;
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  line-height: 1.1;
  margin-bottom: 0rem;
}

.lead {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 40rem;
}

.hero-lead-row {
  display: grid;
  gap: 1.2rem;
  margin-top: 0.6rem;
}

.search-field {
  width: 100%;
  max-width: 260px;
  justify-self: end;
}

.search-input {
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 2px solid rgba(212, 179, 106, 0.35);
  background: rgba(12, 12, 12, 0.6);
  color: var(--ivory);
  font-size: 0.95rem;
}

.search-input::placeholder {
  color: rgba(248, 244, 236, 0.6);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  background: var(--velvet);
  color: var(--ivory);
  box-shadow: 0 12px 24px rgba(154, 28, 44, 0.35);
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn:hover {
  background: var(--velvet-bright);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 2px solid rgba(212, 179, 106, 0.5);
  color: var(--gold-soft);
  box-shadow: none;
}

.hero-card {
  background: linear-gradient(150deg, rgba(212, 179, 106, 0.15), rgba(154, 28, 44, 0.12));
  border: 2px solid rgba(212, 179, 106, 0.25);
  padding: 1.6rem 2rem 1.4rem;
  border-radius: 20px;
  box-shadow: 0 24px 40px var(--shadow);
  width: fit-content;
  max-width: 100%;
  justify-self: start;
}

.hero-card__content {
  display: flex;
  flex-direction: column;
}

.hero-card__title {
  font-family: "Playfair Display", "Georgia", serif;
  font-size: 1.4rem;
  margin-bottom: 1rem;
  display: inline-block;
}

.hero-card__text {
  color: var(--muted);
  margin-bottom: 0.9rem;
}

.hero-card__prices {
  color: var(--gold);
  display: flex;
  gap: 2rem;
  margin-top: 0.2rem;
}

.hero-card__price-block {
  display: grid;
  gap: 0.2rem;
}

.hero-card__prices p {
  margin-top: 0;
}

.hero-card__price {
  font-size: 1.9rem;
  font-weight: 700;
}

.hero-card__price-label {
  font-size: 0.95rem;
  color: var(--gold-soft);
}

.hero-card__link {
  color: var(--gold);
  font-weight: 600;
}

.hero-card__link:hover,
.hero-card__link:focus {
  color: var(--gold-soft);
}

.hero-card__hint {
  font-size: 0.85rem;
  color: var(--gold);
}

.section {
  padding: 2.5rem 0;
}

.section--flush-bottom {
  padding-bottom: 0;
}

.video-embed {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

.section--carousel {
  min-height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 1rem;
}

.section--carousel::before {
  content: "";
  position: absolute;
  inset: 0 auto;
  width: min(100%, 1920px);
  max-height: 900px;
  left: 50%;
  transform: translateX(-50%);
  background-image: linear-gradient(
      rgba(15, 15, 15, 0.2),
      rgba(15, 15, 15, 0.2)
    ),
    image-set(
      url("../assets/images/cinedori-background-1280px.webp") 1x,
      url("../assets/images/cinedori-background-1920px.webp") 1.5x
    );
  background-image: linear-gradient(
      rgba(15, 15, 15, 0.2),
      rgba(15, 15, 15, 0.2)
    ),
    -webkit-image-set(
      url("../assets/images/cinedori-background-1280px.webp") 1x,
      url("../assets/images/cinedori-background-1920px.webp") 1.5x
    );
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 65%, rgba(0, 0, 0, 0) 100%);
  mask-size: 100% 100%;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 65%, rgba(0, 0, 0, 0) 100%);
  -webkit-mask-size: 100% 100%;
  z-index: 0;
}

@media (min-width: 1024px) {
  .section--carousel::before {
    background-image: linear-gradient(
        rgba(15, 15, 15, 0.2),
        rgba(15, 15, 15, 0.2)
      ),
      image-set(
        url("../assets/images/cinedori-background-1280px.webp") 0.666x,
        url("../assets/images/cinedori-background-1920px.webp") 1x
      );
    background-image: linear-gradient(
        rgba(15, 15, 15, 0.2),
        rgba(15, 15, 15, 0.2)
      ),
      -webkit-image-set(
        url("../assets/images/cinedori-background-1280px.webp") 0.666x,
        url("../assets/images/cinedori-background-1920px.webp") 1x
      );
  }
}

.section--carousel > .container {
  position: relative;
  z-index: 1;
}

.section-header {
  display: grid;
  gap: 0.1rem;
  margin-bottom: 1.9rem;
}

.section h2 {
  font-family: "Playfair Display", "Georgia", serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.section:not(.section--carousel) h2 {
  padding-bottom: 1.2rem;
}

.hero h2 {
  font-family: "Playfair Display", "Georgia", serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  padding-bottom: 1.2rem;
}

.section-actions {
  display: flex;
  gap: 0.8rem;
}

.carousel {
  position: relative;
  overflow: visible;
  height: clamp(320px, 60vh, 480px);
  max-height: clamp(320px, 60vh, 480px);
  width: min(100%, 350px);
  margin: 0 auto;
}

.carousel-track {
  display: grid;
  gap: 1.5rem;
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.4, 1, 0.2, 1);
  will-change: transform;
}

.carousel-slide {
  display: none;
  background: var(--charcoal-light);
  border-radius: 18px;
  overflow: hidden;
  border: 2px solid rgba(212, 179, 106, 0.12);
  box-shadow: 0 18px 30px var(--shadow);
  height: 100%;
  padding: 1rem;
  position: relative;
  cursor: pointer;
}

.carousel-slide.is-active {
  display: grid;
}

.carousel-slide__media {
  aspect-ratio: 3 / 4;
  position: relative;
  background: transparent;
  width: min(100%, clamp(120px, 24vw, 200px));
  margin: 0 auto 0.8rem;
  border-radius: 6px;
  overflow: hidden;
}

.carousel-slide__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: transparent;
  border-radius: 6px;
}

.carousel-slide__content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  justify-content: flex-start;
  height: 100%;
}

.carousel-slide.has-many-sessions .carousel-slide__content {
  padding-top: 0.7rem;
  gap: 0.4rem;
}

.carousel-slide__header {
  display: grid;
  gap: 0.3rem;
}

.carousel-slide__content .movie-card__dates {
  margin-top: 0.4rem;
}

.carousel-slide__description {
  flex: 1;
  max-height: 280px;
  position: relative;
  overflow: hidden;
}

.carousel-slide__description::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 32px;
  background: linear-gradient(to bottom, rgba(23, 23, 23, 0), var(--charcoal-light));
  pointer-events: none;
}

.carousel-slide__description-text {
  margin: 0;
  max-height: 280px;
  overflow: auto;
  padding-right: 0.4rem;
  padding-bottom: 1.2rem;
}

.carousel-slide__title {
  font-family: "Playfair Display", "Georgia", serif;
  font-size: 1.5rem;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gold);
}

.carousel-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: var(--charcoal-light);
  color: var(--gold);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  box-shadow: 0 12px 24px rgba(154, 28, 44, 0.35);
}

.carousel-btn:hover {
  background: var(--velvet-bright);
}

.carousel-btn--left {
  left: 24px;
}

.carousel-btn--right {
  right: 24px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
  position: relative;
  z-index: 1;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(212, 179, 106, 0.3);
}

.carousel-dot.is-active {
  background: var(--gold);
}

.section-note {
  margin-top: 1.5rem;
  color: var(--muted);
}

.highlight {
  background: linear-gradient(120deg, rgba(154, 28, 44, 0.16), rgba(212, 179, 106, 0.12));
  border-top: 1px solid rgba(212, 179, 106, 0.14);
  border-bottom: 1px solid rgba(212, 179, 106, 0.14);
}

.highlight-inner {
  display: grid;
  gap: 2rem;
}

.highlight-grid {
  display: grid;
  gap: 1rem;
}

.highlight-card {
  background: rgba(20, 20, 20, 0.75);
  padding: 1.2rem 1.4rem;
  border-radius: 16px;
  border: 2px solid rgba(212, 179, 106, 0.2);
}

.highlight-title {
  font-weight: 600;
  color: var(--gold-soft);
  margin-bottom: 0.4rem;
}

.movies-grid {
  display: grid;
  gap: 1.5rem;
}

.movie-card {
  background: var(--charcoal-light);
  border-radius: 18px;
  overflow: hidden;
  border: 2px solid rgba(212, 179, 106, 0.12);
  box-shadow: 0 16px 28px var(--shadow);
  display: flex;
  flex-direction: row;
  align-items: stretch;
  height: 330px;
}

.movie-card__content {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
  min-width: 0;
}

.movie-card.has-many-sessions .movie-card__content {
  padding-top: 1rem;
  gap: 0.5rem;
}

.movie-card__title {
  font-family: "Playfair Display", "Georgia", serif;
  font-size: 1.4rem;
  color: var(--gold);
}

.movie-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  color: var(--gold-soft);
  font-size: 0.9rem;
}

.movie-card__meta-info {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
}

.movie-card__separator {
  margin: 6px;
}

.movie-card__description {
  max-height: 180px;
  position: relative;
  overflow: hidden;
}

.movie-card__description::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 32px;
  background: linear-gradient(to bottom, rgba(23, 23, 23, 0), var(--charcoal-light));
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.2s;
}

.movie-card__description.is-at-bottom::after {
  opacity: 0;
}

.movie-card__description-text {
  margin: 0;
  max-height: 180px;
  overflow: auto;
  padding-right: 0.4rem;
  padding-bottom: 2rem;
}

.movie-card.has-many-sessions .movie-card__description,
.movie-card.has-many-sessions .movie-card__description-text {
  max-height: 120px;
}

.movie-card.has-many-sessions .movie-card__description-text {
  padding-bottom: 1.5rem;
}

.movie-card.has-many-sessions .movie-card__description::after {
  height: 24px;
}

.movie-card__duration {
  text-align: left;
}

.movie-card__trailer {
  text-align: right;
  color: var(--gold);
  font-weight: 600;
}

.movie-card__trailer:hover {
  color: var(--gold-soft);
}

.is-hidden {
  display: none;
}

.movie-card__dates {
  color: var(--gold);
  font-size: 0.9rem;
  display: grid;
  gap: 0.3rem;
  margin-top: auto;
}

.movie-card__dates p {
  margin: 0;
}

.movie-card__media {
  flex-shrink: 0;
  width: 240px;
  align-self: stretch;
  background: transparent;
  padding: 10px 0 10px 10px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
}

.movie-card__media img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  object-position: center;
  display: block;
}

.movie-card.has-many-sessions .movie-card__media img {
  height: 100%;
  width: 100%;
}

.infos-hero .hero-inner {
  grid-template-columns: 1fr;
}

.info-layout {
  display: grid;
  gap: 2rem;
}

.info-column {
  display: grid;
  gap: 2rem;
}

.info-card {
  background: var(--charcoal-light);
  border: 2px solid rgba(212, 179, 106, 0.18);
  border-radius: 18px;
  padding: 1.8rem;
  box-shadow: 0 16px 28px var(--shadow);
}

.info-card__header {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1.2rem;
}

.info-card__media {
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1rem;
  aspect-ratio: 4 / 3;
}

.info-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.info-card__media--top img {
  object-position: center top;
}

/* A propos */
.info-layout--single {
  grid-template-columns: 1fr;
}

.info-list {
  margin: 1rem 0 1.6rem;
  padding-left: 1.2rem;
  color: var(--muted);
}

.info-list li {
  margin-bottom: 0.6rem;
}

.info-definition {
  display: grid;
  gap: 0.8rem;
  color: var(--muted);
}

.info-definition dt {
  font-weight: 600;
  color: var(--gold-soft);
}

.info-definition dd {
  margin: 0.2rem 0 0;
}

.auth-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(8, 8, 8, 0.75);
  backdrop-filter: blur(6px);
  z-index: 200;
}

.auth-modal[hidden] {
  display: none;
}

.auth-modal__dialog {
  position: relative;
  width: min(92vw, 420px);
  margin-inline: auto;
  background: #1a1a1a;
  border-radius: 18px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.45);
  padding: 2rem;
  color: var(--ivory);
}

.auth-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ivory);
  cursor: pointer;
}

.member-locked .auth-modal__close {
  display: none;
}

.unauthenticated .auth-modal__close {
  display: inline-flex;
}

.member-locked .member-layout {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
}

.auth-modal__brand {
  text-align: center;
  margin-bottom: 0.8rem;
}

.auth-modal__brand img {
  height: 32px;
  width: auto;
  display: inline-block;
}

.auth-modal__title {
  text-align: center;
  margin-bottom: 0.6rem;
  font-size: 1.3rem;
}

.auth-modal__subtitle {
  text-align: center;
  color: var(--muted);
  margin-bottom: 1.6rem;
}

.auth-form {
  display: grid;
  gap: 1rem;
}

.auth-field label {
  display: block;
  font-size: 0.85rem;
  color: var(--ivory);
  margin-bottom: 0.4rem;
}

.auth-field input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  background: #141414;
  color: var(--ivory);
  font-size: 1rem;
}

.auth-input-wrap {
  position: relative;
}

.auth-input-wrap input {
  padding-right: 3rem;
}

.auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 0.6rem;
  transform: translateY(-50%);
  width: 2.4rem;
  height: 2.4rem;
  border: 0;
  background: transparent;
  color: var(--gold-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  cursor: pointer;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus-visible {
  color: var(--gold);
}

.auth-password-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.auth-password-icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  transition: opacity 0.2s ease;
}

.auth-password-icon--hide {
  opacity: 0;
  position: absolute;
}

.auth-password-toggle[aria-pressed="true"] .auth-password-icon--show {
  opacity: 0;
}

.auth-password-toggle[aria-pressed="true"] .auth-password-icon--hide {
  opacity: 1;
}

.auth-field__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.auth-error {
  color: #ff4d4d;
  font-size: 0.8rem;
  font-weight: 600;
}

.auth-link {
  color: var(--gold);
  font-size: 0.8rem;
}

.auth-link:hover,
.auth-link:focus {
  color: var(--gold-soft);
}

.auth-help {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.4rem;
  text-align: center;
}

.auth-notice {
  color: #f1c232;
  font-size: 0.85rem;
  margin: 0 0 0.6rem;
  text-align: center;
}

/* Member area */
.member-area {
  background: radial-gradient(circle at top left, #2b1418 0%, #1a0f12 45%, #0c0b0b 100%);
}

.member-light {
  background: #ffffff;
}

.member-layout {
  display: block;
  padding: 2rem min(6vw, 3rem);
  padding-left: 0;
}

.unauth-layout {
  display: grid;
  place-items: center;
  min-height: 60vh;
  color: var(--ivory);
  font-family: "Playfair Display", "Georgia", serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  text-align: center;
}

.member-sidebar {
  background: var(--charcoal-light);
  border: 2px solid rgba(212, 179, 106, 0.2);
  border-radius: 0;
  padding: 1.5rem;
  display: grid;
  align-content: start;
  position: fixed;
  top: 72px;
  left: 0;
  width: var(--member-sidebar-width);
  height: calc(100vh - 72px);
  overflow-x: hidden;
  overflow-y: auto;
}

.member-nav {
  display: grid;
  gap: 0.6rem;
}

body.permissions-pending {
  visibility: hidden;
}

.permissions-pending .member-nav {
  visibility: hidden;
}

.member-nav-section {
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
}

.member-nav-title {
  margin: 0.4rem 0 0;
  color: var(--gold-soft);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.member-nav a {
  color: var(--ivory);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
}

.member-nav a:hover,
.member-nav a:focus,
.member-nav a.is-active {
  color: var(--gold);
}

/* Member menu mobile collapse */
.member-menu-toggle {
  display: none;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  background: rgba(20, 20, 20, 0.6);
  border: 2px solid rgba(212, 179, 106, 0.3);
  border-radius: 14px;
  color: var(--gold-soft);
  padding: 0.7rem 1rem;
  font-weight: 600;
  cursor: pointer;
}

.member-menu-toggle__icon {
  display: grid;
  gap: 4px;
}

.member-menu-toggle__icon span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
}

.member-menu-toggle__label {
  flex: 1;
  text-align: left;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.member-menu-toggle__chevron {
  font-size: 0.9rem;
  transition: transform 0.2s ease;
}

.member-sidebar.is-open .member-menu-toggle__chevron {
  transform: rotate(180deg);
}

.member-menu-panel {
  display: block;
}

.member-sidebar h1 {
  font-family: "Playfair Display", "Georgia", serif;
  font-size: 1.4rem;
}

.member-logout {
  border: 2px solid var(--gold);
  background: transparent;
  color: var(--gold);
  padding: 0.6rem 1rem;
  margin-top: 15px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.member-logout:hover,
.member-logout:focus {
  background: rgba(212, 179, 106, 0.18);
  color: var(--gold-soft);
}

/* Desktop sidebar collapse toggle */
.member-sidebar-collapse {
  display: none;
}

@media (min-width: 769px) {
  .member-sidebar-collapse {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.55rem;
    margin-top: auto;
    background: transparent;
    border: 1px solid rgba(212, 179, 106, 0.18);
    border-radius: 8px;
    color: var(--gold-soft);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease;
  }

  .member-sidebar-collapse:hover {
    background: rgba(212, 179, 106, 0.1);
    color: var(--gold);
  }

  .member-sidebar-collapse svg {
    transition: transform 0.25s ease;
    flex-shrink: 0;
  }

  .member-sidebar {
    transition: width 0.25s ease, padding 0.25s ease;
  }

  .member-content {
    transition: margin-left 0.25s ease;
  }

  .member-area .member-footer {
    transition: padding-left 0.25s ease;
  }

  /* Collapsed state */
  body.sidebar-collapsed {
    --member-sidebar-width: 40px;
  }

  body.sidebar-collapsed .member-sidebar {
    padding: 0.6rem 0;
    align-items: center;
    gap: 0;
  }

  body.sidebar-collapsed .member-sidebar .member-menu-panel {
    display: none;
  }

  body.sidebar-collapsed .member-sidebar-collapse {
    border: none;
    border-radius: 0;
    width: 40px;
    padding: 0.7rem;
    margin-top: 0;
  }

  body.sidebar-collapsed .member-sidebar-collapse svg {
    transform: rotate(180deg);
  }
}

.member-content {
  display: grid;
  margin-left: calc(var(--member-sidebar-width) + 2rem);
}

.member-card {
  background: var(--charcoal-light);
  border: 2px solid rgba(212, 179, 106, 0.2);
  border-radius: 16px;
  padding: 2rem;
}

.maintenance-metrics {
  display: grid;
  gap: 1.5rem;
  min-width: 0;
}

.maintenance-card {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.maintenance-card__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.maintenance-card h2 {
  color: var(--ivory);
}

.maintenance-card__value {
  font-weight: 700;
  color: var(--gold);
}

.maintenance-chart {
  width: 100%;
  height: 180px;
  max-width: 100%;
  display: block;
  border-radius: 12px;
  background: rgba(12, 12, 12, 0.2);
  border: 1px solid rgba(212, 179, 106, 0.2);
}

.maintenance-status {
  margin-top: 1rem;
  color: var(--muted);
}

.maintenance-actions {
  margin-top: 1.2rem;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.maintenance-actions h2 {
  color: black;
  margin: 0;
}

.maintenance-links {
  display: grid;
  gap: 0.6rem;
}

.maintenance-actions .btn-primary {
  font-size: 0.85rem;
  width: fit-content;
}

.maintenance-warning {
  color: grey;
  font-size: 0.9rem;
}

.maintenance-stats {
  display: grid;
  gap: 0.5rem;
}

.maintenance-stat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(212, 179, 106, 0.18);
  color: var(--gold);
}

.maintenance-stat strong {
  color: var(--ivory);
  font-weight: 700;
}

.maintenance-stat:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.member-footer {
  padding: 1.2rem min(6vw, 3rem) 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.member-area .member-footer {
  padding-left: calc(var(--member-sidebar-width) + 2rem);
}

.member-status {
  margin: 0;
}

.member-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.member-toolbar__title {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  flex: 1 1 320px;
}

.member-toolbar__heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.member-page-description {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 56ch;
}

.member-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 1 1 320px;
  margin-top: 0.2rem;
}

/* Parametres compta page - stack action rows vertically */
.member-toolbar--planning .member-toolbar__actions {
  flex-direction: column;
  gap: 1rem;
}

.member-toolbar__actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  width: 100%;
}

.member-toolbar__actions-row--secondary {
  margin-top: 0;
}

.member-toolbar__actions-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  width: 100%;
}

.member-account-actions {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.member-toolbar--planning .member-toolbar__actions {
  display: grid;
  gap: 0.6rem;
  justify-items: end;
}

.member-toolbar--planning .member-toolbar__actions-row--primary {
  flex-wrap: nowrap;
}

@media (max-width: 900px) {
  .member-toolbar__actions-row {
    justify-content: flex-start;
  }
}

@media (max-width: 700px) {
  .member-toolbar__actions {
    justify-content: flex-start;
  }
  .member-toolbar--planning .member-toolbar__actions {
    justify-items: start;
  }
  .member-toolbar--planning .member-toolbar__actions-row--primary {
    flex-wrap: wrap;
  }
}

.page-planning .member-toolbar__actions {
  gap: 1rem;
}

.member-date-range {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: nowrap;
}

.member-date-field {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.member-date {
  background: rgba(12, 12, 12, 0.6);
  border: 2px solid rgba(212, 179, 106, 0.35);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  color: var(--ivory);
  min-width: 150px;
}

.member-search {
  background: rgba(12, 12, 12, 0.6);
  border: 2px solid rgba(212, 179, 106, 0.35);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  color: var(--ivory);
  width: 250px;
  min-width: 250px;
  flex: 0 0 250px;
}

.member-search::placeholder {
  color: #666769;
}

.btn-primary,
.btn-secondary {
  border-radius: 999px;
  padding: 0.6rem 1.2rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--gold);
  color: #1a1a1a;
}

.btn-secondary {
  background: transparent;
  color: var(--gold);
  border-color: rgba(212, 179, 106, 0.6);
}

.member-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 60;
}

.member-modal[hidden] {
  display: none;
}

.member-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(6px);
}

.member-modal__dialog {
  position: relative;
  background: var(--charcoal-light);
  border: 2px solid rgba(212, 179, 106, 0.2);
  border-radius: 18px;
  padding: 2rem;
  width: min(720px, 92vw);
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.35);
  z-index: 1;
}

.member-modal__dialog--compact {
  width: min(520px, 92vw);
}

.member-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(212, 179, 106, 0.5);
  background: transparent;
  color: var(--gold);
  font-size: 1.1rem;
  cursor: pointer;
}

.member-form {
  display: grid;
  gap: 1.2rem;
  margin-top: 1.2rem;
}

.page-planning .member-form {
  gap: 0.2rem;
}

.form-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.form-grid > * {
  min-width: 0;
}

.field-show-title-group {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.5rem;
}

.field-show-title-row {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.field-show-description {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.6rem;
}

.field-show-description__header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
}

.field-label-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0;
}

.field-label-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.member-form .field-show-poster-url,
.member-form .field-show-poster-file {
  display: grid;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--gold-soft);
}

.field-show-poster-url input,
.field-show-poster-file input[type="file"] {
  width: 100%;
  display: block;
}

.member-form input:not([type="checkbox"]):not([type="radio"]),
.member-form select {
  min-height: 42px;
}

.member-form input[type="file"] {
  height: 42px;
  padding: 0.45rem 0.8rem;
  line-height: 1.2;
}

.rich-editor {
  min-height: 120px;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  background: #141414;
  color: var(--ivory);
  font-size: 1rem;
  line-height: 1.5;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rich-editor:focus {
  border-color: rgba(212, 179, 106, 0.6);
  box-shadow: 0 0 0 3px rgba(212, 179, 106, 0.15);
}

.rich-editor:empty::before {
  content: attr(data-placeholder);
  color: rgba(248, 244, 236, 0.6);
  pointer-events: none;
}

.rich-editor a {
  color: var(--gold);
  text-decoration: underline;
}

.rich-editor-code {
  min-height: 160px;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  background: #141414;
  color: var(--ivory);
  font-size: 0.95rem;
  line-height: 1.5;
  font-family: "SFMono-Regular", "Menlo", "Consolas", "Liberation Mono", monospace;
  outline: none;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rich-editor-code:focus {
  border-color: rgba(212, 179, 106, 0.6);
  box-shadow: 0 0 0 3px rgba(212, 179, 106, 0.15);
}

.movie-card__description-text a,
.carousel-slide__description-text a {
  color: var(--gold);
  text-decoration: underline;
}

.btn-code-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.6rem 1.2rem;
  background: transparent;
  color: var(--gold);
  border-color: rgba(212, 179, 106, 0.6);
  line-height: 1.2;
  height: auto;
}

.btn-code-toggle.is-code-active {
  background: var(--gold);
  color: #1a1a1a;
  border-color: var(--gold);
}

.table-description a {
  color: var(--gold);
  text-decoration: underline;
}

.show-session-remove.image-preview-toggle {
  color: #4caf50;
  border-color: rgba(76, 175, 80, 0.7);
}

.show-session-remove.image-preview-toggle:hover,
.show-session-remove.image-preview-toggle:focus-visible {
  color: #6fdd74;
  border-color: rgba(111, 221, 116, 0.9);
}

.image-preview-toggle svg,
.image-file-clear svg {
  width: 18px;
  height: 18px;
}


.field-show-sessions {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.8rem;
}

.show-sessions__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.show-sessions__title {
  margin: 0;
  font-size: 1rem;
  color: var(--ivory);
}

.show-sessions__rows {
  display: grid;
  gap: 0.6rem;
}

.show-sessions__row {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: minmax(220px, 2fr) minmax(140px, 1fr) minmax(160px, 1fr) auto;
  align-items: end;
}

.show-session-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 2px solid rgba(242, 107, 107, 0.4);
  background: rgba(12, 12, 12, 0.5);
  color: #f26b6b;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.show-session-remove:hover,
.show-session-remove:focus {
  border-color: rgba(242, 107, 107, 0.8);
  color: #ff8b8b;
  transform: translateY(-1px);
}

.show-session-remove svg {
  width: 18px;
  height: 18px;
}

.btn-prefill {
  align-self: end;
  white-space: nowrap;
}

.member-form label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--gold-soft);
}

.member-form fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.6rem;
  color: var(--gold-soft);
}

.member-form legend {
  font-size: 0.9rem;
  color: var(--gold-soft);
  margin-bottom: 0.2rem;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--ivory);
}

.check-row input[type="checkbox"] {
  accent-color: var(--gold);
}

.planning-toggle {
  background: var(--gold);
  color: #1a1a1a;
  border: 2px solid var(--gold);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-weight: 600;
  font-size: 11px;
}

.planning-toggle input[type="checkbox"] {
  accent-color: #1a1a1a;
  margin: 0;
}

.field-sort-order {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.field-sort-order span {
  font-size: 0.85rem;
  color: var(--muted);
}

.field-sort-order select {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 2px solid rgba(212, 179, 106, 0.35);
  background: rgba(12, 12, 12, 0.6);
  color: var(--ivory);
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.field-sort-order select:hover {
  background: rgba(212, 179, 106, 0.08);
}

.field-sort-order select:focus {
  outline: none;
  border-color: rgba(212, 179, 106, 0.6);
  box-shadow: 0 0 0 2px rgba(212, 179, 106, 0.1);
}

.member-light .field-sort-order {
  color: #6b4b1f;
}

.member-light .field-sort-order select {
  background: #ffffff;
  color: #14110e;
  border-color: rgba(107, 75, 31, 0.45);
}

.member-light .field-sort-order select:hover {
  background: rgba(107, 75, 31, 0.06);
}

.field-roles {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.6rem;
  width: 100%;
  align-items: stretch;
}

.field-roles legend {
  margin-bottom: 0;
}

.field-roles__options,
.field-permissions__options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem 1.4rem;
  width: 100%;
}

.field-roles .check-row,
.field-permissions .check-row {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}

.team-roles-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.team-role {
  display: grid;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--gold-soft);
}

.session-assignments {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.session-assignment {
  display: grid;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--gold-soft);
}

.session-assignment[hidden] {
  display: none;
}

.session-assignments__title,
.session-assignments__team,
.session-assignments__roles {
  grid-column: 1 / -1;
}

.field-session-team.session-assignments__team.session-field {
  padding-top: 6px;
  padding-bottom: 24px;
}

.session-assignments__roles {
  margin-top: 0.6rem;
}

.session-assignments-block {
  grid-column: 1 / -1;
}

.session-assignments__title {
  margin-top: 0.5rem;
  font-size: 1rem;
  color: var(--ivory);
}

.session-assignments__title {
  margin-bottom: 0.2rem;
}

.session-assignments .session-assignment {
  background: rgba(12, 12, 12, 0.35);
  border-radius: 12px;
  padding: 0.6rem 0.8rem;
}

.session-datetime {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 120px);
  gap: 0.6rem;
  align-items: center;
}

.session-datetime input,
.session-datetime select {
  width: 100%;
}

.member-form select,
.session-assignments select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: rgba(12, 12, 12, 0.5);
  border: 2px solid rgba(212, 179, 106, 0.25);
  border-radius: 12px;
  padding: 0.6rem 0.8rem;
  padding-right: 2rem;
  color: var(--ivory);
  line-height: 1.4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23d4b36a' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 12px 8px;
}

.member-form select::-ms-expand,
.session-assignments select::-ms-expand {
  display: none;
}

 .member-form select:focus,
 .session-assignments select:focus {
   outline: none;
   border-color: rgba(212, 179, 106, 0.6);
 }

.session-assignments .session-assignment.is-confirmed select {
  background-color: #3ea24a;
  color: #ffffff;
  border-color: rgba(84, 180, 84, 0.7);
}

@media (max-width: 720px) {
  .session-assignments {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .field-show-title-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .btn-prefill {
    justify-self: start;
  }
}

@media (max-width: 720px) {
  .show-sessions__row {
    grid-template-columns: minmax(0, 1fr);
  }

  .show-session-remove {
    justify-self: start;
  }
}

.session-field input,
.session-field select {
  background-color: rgba(12, 12, 12, 0.5);
  border: 2px solid rgba(212, 179, 106, 0.25);
  border-radius: 12px;
  padding: 0.6rem 0.8rem;
  color: var(--ivory);
}

.session-confirm {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--gold-soft);
  font-size: 0.85rem;
  justify-self: start;
  width: fit-content;
  white-space: nowrap;
}

.member-form .session-confirm {
  display: inline-flex;
}

.is-hidden {
  display: none;
}

.member-form label.session-confirm {
  display: inline-flex;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.field-team-id input {
  width: 80px;
  max-width: 80px;
}

.member-form input,
.member-form select {
  background-color: rgba(12, 12, 12, 0.5);
  border: 2px solid rgba(212, 179, 106, 0.25);
  border-radius: 12px;
  padding: 0.6rem 0.8rem;
  color: var(--ivory);
}

.member-input-wrap {
  position: relative;
  display: block;
}

.member-input-wrap input {
  width: 100%;
  padding-right: 3rem;
}

.member-password-toggle {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  background: transparent;
  color: var(--gold-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  cursor: pointer;
}

.member-password-toggle:hover,
.member-password-toggle:focus-visible {
  color: var(--gold);
}

.member-password-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.member-password-icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  transition: opacity 0.2s ease;
}

.member-password-icon--hide {
  opacity: 0;
  position: absolute;
}

.member-password-toggle[aria-pressed="true"] .member-password-icon--show {
  opacity: 0;
}

.member-password-toggle[aria-pressed="true"] .member-password-icon--hide {
  opacity: 1;
}

.member-form textarea {
  background: rgba(12, 12, 12, 0.5);
  border: 2px solid rgba(212, 179, 106, 0.25);
  border-radius: 12px;
  padding: 0.6rem 0.8rem;
  color: var(--ivory);
  resize: vertical;
}

.member-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.member-form__status {
  min-height: 1.2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.member-form__status.is-error {
  color: #f26b6b;
}

.member-form__status.is-success {
  color: #8dd08a;
}

.member-modal__text {
  color: var(--muted);
  margin-top: 0.6rem;
}

.member-import-file-label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.9rem;
  margin-top: 1rem;
}

.member-import-file-label input[type="file"] {
  font-size: 0.85rem;
}

.member-import-preview {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: var(--gold);
  font-weight: 600;
}

.member-import-log {
  margin-top: 0.8rem;
  max-height: 200px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  font-size: 0.82rem;
  line-height: 1.6;
}

.member-import-log p {
  margin: 0;
}

.member-table-wrap {
  overflow-x: auto;
  /* Prevent the horizontal scroll container from trapping vertical wheel events
     on browsers that support overscroll-behavior (Chrome 63+, FF 59+, Safari 16+) */
  overscroll-behavior-x: contain;
}

.member-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  border: 1px solid rgba(212, 179, 106, 0.18);
}

.member-table th,
.member-table td {
  padding: 0.7rem 0.5rem;
  vertical-align: top;
  border-right: 1px solid rgba(212, 179, 106, 0.12);
  min-width: 10px;
}

.member-table th:nth-child(-n + 2),
.member-table td:nth-child(-n + 2) {
  min-width: 150px;
}

.member-table td.cell--no-sessions {
  background-color: rgba(198, 40, 61, 0.618);
  color: #b41e1e;
  font-weight: 600;
}

.page-planning .member-table th:nth-child(n + 6),
.page-planning .member-table td:nth-child(n + 6) {
  min-width: 100px;
}

.page-planning .member-table th:nth-child(3),
.page-planning .member-table th:nth-child(4),
.page-planning .member-table th:nth-child(5),
.page-planning .member-table td:nth-child(3),
.page-planning .member-table td:nth-child(4),
.page-planning .member-table td:nth-child(5) {
  min-width: 75px;
}

.page-utilisateurs .member-table {
  table-layout: fixed;
}

.page-utilisateurs .member-table th:nth-child(1),
.page-utilisateurs .member-table td:nth-child(1) {
  width: 16%;
}

.page-utilisateurs .member-table th:nth-child(2),
.page-utilisateurs .member-table td:nth-child(2) {
  width: 22%;
}

.page-utilisateurs .member-table th:nth-child(3),
.page-utilisateurs .member-table td:nth-child(3),
.page-utilisateurs .member-table th:nth-child(4),
.page-utilisateurs .member-table td:nth-child(4) {
  width: 110px;
  white-space: nowrap;
}

.page-utilisateurs .member-table th:nth-child(5),
.page-utilisateurs .member-table td:nth-child(5) {
  width: 22%;
}

.page-utilisateurs .member-table th:nth-child(6),
.page-utilisateurs .member-table td:nth-child(6) {
  width: 12%;
}

.page-utilisateurs .member-table th:nth-child(7),
.page-utilisateurs .member-table td:nth-child(7) {
  width: 8%;
}

.member-table th {
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.6rem;
  color: var(--ivory);
  background: var(--gold);
  border-bottom: 2px solid rgba(212, 179, 106, 0.6);
  min-width: 10px;
}

.member-table td {
  border-bottom: 2px solid rgba(212, 179, 106, 0.1);
  color: var(--ivory);
  font-size: 0.8rem;
  font-weight: 600;
}

.member-table th:last-child,
.member-table td:last-child {
  border-right: 0;
}

.member-table__actions-col,
.member-table__actions {
  text-align: right;
}

.member-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.member-action {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 2px solid rgba(212, 179, 106, 0.35);
  background: var(--gold);
  color: #14110e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.member-action svg {
  width: 16px;
  height: 16px;
}

.member-action:hover,
.member-action:focus {
  border-color: rgba(212, 179, 106, 0.7);
  color: #14110e;
  transform: translateY(-1px);
}

.member-action[data-user-action="edit"] {
  background: var(--gold);
  border-color: rgba(212, 179, 106, 0.9);
  color: #14110e;
}

.member-action[data-team-action="edit"] {
  background: var(--gold);
  border-color: rgba(212, 179, 106, 0.9);
  color: #14110e;
}

.member-action[data-show-action="edit"] {
  background: var(--gold);
  border-color: rgba(212, 179, 106, 0.9);
  color: #14110e;
}

.member-action[data-session-action="edit"] {
  background: var(--gold);
  border-color: rgba(212, 179, 106, 0.9);
  color: #14110e;
}

.member-action[data-user-action="edit"]:hover,
.member-action[data-user-action="edit"]:focus {
  color: #14110e;
}

.member-action[data-session-action="edit"]:hover,
.member-action[data-session-action="edit"]:focus {
  color: #14110e;
}

.member-action[data-show-action="edit"]:hover,
.member-action[data-show-action="edit"]:focus {
  color: #14110e;
}

.member-action[data-team-action="edit"]:hover,
.member-action[data-team-action="edit"]:focus {
  color: #14110e;
}

.member-action--danger {
  border-color: rgba(198, 40, 61, 0.7);
  background: #c6283d;
  color: #ffffff;
}

.member-action--danger:hover,
.member-action--danger:focus {
  border-color: rgba(198, 40, 61, 1);
  color: #ffffff;
}

.member-area .member-table__actions-col,
.member-area .member-table__actions,
.member-area .kb-card__action.member-action {
  display: none;
}

.member-area.is-membre .member-table__actions-col,
.member-area.is-membre .member-table__actions,
.member-area.is-programmateur .member-table__actions-col,
.member-area.is-programmateur .member-table__actions,
.member-area.is-admin .member-table__actions-col,
.member-area.is-admin .member-table__actions,
.member-area.is-comptabilite .member-table__actions-col,
.member-area.is-comptabilite .member-table__actions,
.member-area.is-membre .kb-card__action.member-action,
.member-area.is-programmateur .kb-card__action.member-action,
.member-area.is-admin .kb-card__action.member-action,
.member-area.is-comptabilite .kb-card__action.member-action {
  display: table-cell;
}

.member-area.is-programmateur .kb-card__action.member-action,
.member-area.is-admin .kb-card__action.member-action,
.member-area.is-comptabilite .kb-card__action.member-action {
  display: inline-block;
}

.member-table__empty {
  color: var(--muted);
  margin-top: 0.5rem;
}

/* Member light */
.member-light .member-layout,
.member-light .member-footer {
  background: #ffffff;
  color: #14110e;
}

.member-light .member-layout {
  min-height: calc(100vh - 72px);
}

.member-light .member-content {
  min-width: 0;
  color: #14110e;
}

.member-light .member-toolbar h1,
.member-light .member-table td {
  color: #14110e;
}

.member-light .member-page-description {
  color: #6b4b1f;
}

.member-light .member-table th {
  color: #6b4b1f;
  border-bottom-color: rgba(107, 75, 31, 0.45);
}

.member-light .member-table td {
  border-bottom-color: rgba(107, 75, 31, 0.25);
}

.member-light .member-table {
  border-color: rgba(107, 75, 31, 0.35);
}

.member-light .member-table th,
.member-light .member-table td {
  border-right-color: rgba(107, 75, 31, 0.25);
}

.member-light .member-table td::before {
  color: #6b4b1f;
}

.member-light .member-table__empty {
  color: #6b4b1f;
}

.member-light .member-search {
  background: #ffffff;
  color: #14110e;
  border-color: rgba(107, 75, 31, 0.45);
}

.member-light .member-date {
  background: #ffffff;
  color: #14110e;
  border-color: rgba(107, 75, 31, 0.45);
}

.member-light .member-date-field {
  color: #6b4b1f;
}

.page-planning .member-search {
  flex: 0 0 250px;
  width: 250px;
}

.page-planning .member-date-range {
  margin-right: 0.8rem;
}

.member-light .planning-month {
  color: #14110e;
}

.member-light .planning-na {
  color: #6f6f6f;
}

.member-light .planning-assignment.is-confirmed {
  background: rgba(77, 135, 70, 0.18);
  color: #2f6b2d;
}

.member-light .planning-assignment.is-pending {
  background: rgba(191, 146, 64, 0.22);
  color: #6b4b1f;
}

.member-table td.prep-status.is-rejected {
  background: rgba(198, 40, 61, 0.618);
  color: #53131c;
}

.member-light .planning-table-shell::before {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0));
}

.member-light .planning-table-shell::after {
  background: linear-gradient(270deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0));
}

.member-light .events-table-shell::before {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0));
}

.member-light .events-table-shell::after {
  background: linear-gradient(270deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0));
}

/* Planning */
.page-planning .member-table {
  min-width: 1200px;
}

.page-suivi-preparations .member-table {
  min-width: 1200px;
  table-layout: fixed;
}

.page-suivi-preparations .member-table th,
.page-suivi-preparations .member-table td {
  width: 10%;
  white-space: normal;
  word-break: break-word;
}

.planning-tables {
  display: grid;
  gap: 2rem;
  min-width: 0;
}

.planning-table-shell {
  position: relative;
  width: 100%;
  min-width: 0;
}

.planning-table-wrap {
  width: 100%;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
}

.planning-table-shell::before,
.planning-table-shell::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 32px;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.planning-table-shell::before {
  left: 0;
  background: linear-gradient(90deg, rgba(12, 12, 12, 0.9), rgba(12, 12, 12, 0));
}

.planning-table-shell::after {
  right: 0;
  background: linear-gradient(270deg, rgba(12, 12, 12, 0.9), rgba(12, 12, 12, 0));
}

.planning-table-shell.show-left::before {
  opacity: 1;
}

.planning-table-shell.show-right::after {
  opacity: 1;
}

.events-table-shell {
  position: relative;
  width: 100%;
  min-width: 0;
}

.events-table-wrap {
  width: 100%;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
}

.events-table-shell::before,
.events-table-shell::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 32px;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.events-table-shell::before {
  left: 0;
  background: linear-gradient(90deg, rgba(12, 12, 12, 0.9), rgba(12, 12, 12, 0));
}

.events-table-shell::after {
  right: 0;
  background: linear-gradient(270deg, rgba(12, 12, 12, 0.9), rgba(12, 12, 12, 0));
}

.events-table-shell.show-left::before {
  opacity: 1;
}

.events-table-shell.show-right::after {
  opacity: 1;
}

.events-thumb {
  width: 64px;
  height: auto;
  border-radius: 6px;
  border: 1px solid rgba(107, 75, 31, 0.35);
}

.events-preview {
  background: #fffaf0;
  border: 1px solid rgba(107, 75, 31, 0.3);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 12px 24px rgba(12, 12, 12, 0.08);
}

.events-preview--floating {
  position: fixed;
  width: min(280px, 80vw);
  z-index: 80;
  pointer-events: none;
  transform: translate(12px, 12px);
}

.events-preview__media {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(107, 75, 31, 0.2);
  background: #fff;
}

.events-preview__media img {
  width: 100%;
  height: auto;
  display: block;
}

.events-preview__title {
  margin: 0.8rem 0 0;
  font-size: 0.9rem;
  color: #6b4b1f;
  font-weight: 600;
}

.kb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 310px));
  gap: 1.5rem;
  justify-items: start;
  justify-content: start;
}

.kb-card {
  max-width: 310px;
  background: #ffffff;
  border: 2px solid rgba(107, 75, 31, 0.25);
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  box-shadow: 0 12px 24px rgba(12, 12, 12, 0.08);
}

.kb-card__action.btn-primary {
  padding: 0.6rem 1.2rem;
  font-size: 0.85rem;
}

.kb-card__action.member-action {
  width: 44px;
  height: 44px;
}


.kb-card__media {
  background: rgba(212, 179, 106, 0.15);
  min-height: 180px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.kb-card__media img,
.kb-card__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kb-card__badge {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: #6b4b1f;
  background: rgba(212, 179, 106, 0.2);
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
}

.kb-card__content {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  justify-content: flex-end;
  min-height: 180px;
}

.kb-card__title {
  font-size: 1.1rem;
  margin: 0;
}

.kb-card__description {
  margin: 0;
  color: #6b4b1f;
  font-size: 0.9rem;
}

.kb-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.member-table td.planning-na {
  color: #707275;
}

.member-table td.planning-assignment {
  font-size: 0.75rem;
  line-height: 1.2;
  border-radius: 0;
}

.member-table td.planning-assignment.is-confirmed {
  background: rgba(107, 234, 107, 0.755);
  color: #1f5c1f;
}

.member-table td.planning-assignment.is-pending {
  background: rgba(255, 234, 2, 0.709);
  color: #5a3a12;
}

.member-table td.unassigned-role {
  background: rgba(255, 0, 0, 0.5);
  color: #5a3a12;
  font-weight: bold;
}

.member-table td.invoice-paid {
  background: rgba(107, 234, 107, 0.35);
  color: #1f5c1f;
  font-weight: 600;
}

.member-table td.invoice-unpaid {
  background: rgba(255, 0, 0, 0.18);
  color: #7a1a1a;
  font-weight: 600;
}

.planning-section {
  margin-bottom: 2rem;
  min-width: 0;
}

.planning-month {
  margin: 0 0 0.8rem;
  font-size: 1.3rem;
  color: var(--ivory);
}

.member-dashboard .planning-table-shell {
  max-width: 100%;
}

.member-dashboard .member-table {
  min-width: 0;
}

@media (min-width: 900px) {
  .member-dashboard .planning-table-shell {
    max-width: 50%;
  }

  .page-show-types .member-dashboard .planning-table-shell,
  .page-stats-cinedori .member-dashboard .planning-table-shell,
  .page-infos-site .member-dashboard .planning-table-shell,
  .page-gestion-banniere .member-dashboard .planning-table-shell,
  .page-exercices-facturation .member-dashboard .planning-table-shell {
    max-width: 100%;
  }

  .maintenance-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .maintenance-card--wide {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .member-layout {
    grid-template-columns: 1fr;
    padding-left: 2rem;
  }

  .member-content {
    order: 1;
    margin-left: 0;
  }

  .member-sidebar {
    order: 2;
    position: static;
    width: 100%;
    height: auto;
    border-radius: 16px;
  }

  .member-sidebar:not(.is-open) {
    padding-bottom: 0.8rem;
  }

  .member-menu-toggle {
    display: flex;
  }

  .member-sidebar-collapse {
    display: none;
  }

  .member-menu-panel {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.2s ease;
  }

  .member-sidebar.is-open .member-menu-panel {
    max-height: calc(100dvh - 100px);
    opacity: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .member-area .member-footer {
    padding-left: 2rem;
  }

  .member-nav {
    grid-auto-flow: row;
    justify-content: start;
  }

  .member-table {
    min-width: 0;
    border: 0;
  }

  .page-planning .member-table,
  .page-suivi-preparations .member-table,
  .page-utilisateurs .member-table {
    min-width: 0;
    width: 100%;
    table-layout: auto;
  }

  .page-suivi-preparations .member-table th,
  .page-suivi-preparations .member-table td {
    width: auto;
    white-space: normal;
    word-break: normal;
  }

  /* Use :nth-child(n) to match the specificity (0,3,1) of the desktop column rules */
  .page-utilisateurs .member-table th:nth-child(n),
  .page-utilisateurs .member-table td:nth-child(n) {
    width: 100%;
    white-space: normal;
    word-break: normal;
  }

  .member-table {
    --member-table-row-gap: 0.9rem;
    --member-table-label-width: 120px;
    --member-table-label-gap: 1rem;
    --member-table-border: 2px solid rgba(212, 179, 106, 0.12);
  }

  .member-table thead {
    display: none;
  }

  .member-table,
  .member-table tbody,
  .member-table tr,
  .member-table td {
    display: block;
    width: 100%;
  }

  .member-table tr {
    border: 0;
    border-radius: 0;
    padding: 0;
    margin-bottom: var(--member-table-row-gap);
    background: transparent;
  }

  .member-table tr:last-child {
    margin-bottom: 0;
  }

  .member-table td {
    position: relative;
    display: block;
    overflow: visible;
    border-bottom: var(--member-table-border);
    border-left: var(--member-table-border);
    border-right: var(--member-table-border);
    padding: 0.7rem 0.8rem 0.7rem
      calc(var(--member-table-label-width) + var(--member-table-label-gap));
  }

  .member-table tr > td:first-child {
    border-top: var(--member-table-border);
  }

  .member-table td.planning-assignment,
  .member-table td.prep-status {
    border-left: var(--member-table-border);
    border-right: var(--member-table-border);
    border-bottom: var(--member-table-border);
  }

  .member-table td::before {
    content: attr(data-label);
    color: #14110e;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--member-table-label-width);
    background: var(--gold);
    border-right: 2px solid rgba(212, 179, 106, 0.6);
    padding-left: 0.6rem;
    display: flex;
    align-items: center;
  }

  .member-light .member-table td {
    --member-table-border: 2px solid rgba(107, 75, 31, 0.25);
  }

  .member-table td:last-child {
    border-right: var(--member-table-border);
  }

  .member-table td.member-table__actions {
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
  }

  .member-table td.member-table__actions::before {
    top: 0;
    bottom: 0;
  }

  .member-table__actions {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 0.75rem;
    text-align: left;
  }

  .member-area .member-table__actions-col,
  .member-area .member-table__actions,
  .member-area .kb-card__action.member-action,
  .member-area.is-membre .member-table__actions-col,
  .member-area.is-membre .member-table__actions,
  .member-area.is-programmateur .member-table__actions-col,
  .member-area.is-programmateur .member-table__actions,
  .member-area.is-admin .member-table__actions-col,
  .member-area.is-admin .member-table__actions,
  .member-area.is-comptabilite .member-table__actions-col,
  .member-area.is-comptabilite .member-table__actions,
  .member-area.is-membre .kb-card__action.member-action,
  .member-area.is-programmateur .kb-card__action.member-action,
  .member-area.is-admin .kb-card__action.member-action,
  .member-area.is-comptabilite .kb-card__action.member-action {
    display: block;
  }

  .member-table__actions::before {
    align-self: center;
  }

  .member-actions {
    margin-left: 0;
  }
}

@media (min-width: 769px) {
  .member-toolbar__actions {
    flex-wrap: nowrap;
  }

  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "first last"
      "email email"
      "permissions permissions"
      "password confirm"
      "phone1 phone2"
      "roles roles";
  }

  .field-first-name {
    grid-area: first;
  }

  .field-last-name {
    grid-area: last;
  }

  .field-email {
    grid-area: email;
  }

  .field-permissions {
    grid-area: permissions;
    display: grid;
    gap: 0.6rem;
    width: 100%;
  }

  .field-password {
    grid-area: password;
  }

  .field-password-confirm {
    grid-area: confirm;
  }

  .field-phone-1 {
    grid-area: phone1;
  }

  .field-phone-2 {
    grid-area: phone2;
  }

  .field-roles {
    grid-area: roles;
  }
}

.auth-submit {
  background: #f1c232;
  border: 0;
  color: #1a1a1a;
  font-weight: 700;
  border-radius: 10px;
  padding: 0.8rem;
  cursor: pointer;
  font-size: 1rem;
}

.auth-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}
/* Notre histoire timeline */
.timeline {
  display: grid;
  gap: 2.5rem;
  position: relative;
  --timeline-x: 28px;
  --marker-size: 20px;
  --marker-offset: 0.55rem;
}

.timeline::before {
  content: "";
  position: absolute;
  top: calc(var(--marker-offset) + (var(--marker-size) / 2));
  bottom: 0;
  left: var(--timeline-x);
  width: 2px;
  background: rgba(212, 179, 106, 0.35);
}

.timeline-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  column-gap: 24px;
  align-items: start;
}

.timeline-rail {
  position: relative;
  min-height: 100%;
}

.timeline-marker {
  position: absolute;
  top: var(--marker-offset);
  left: var(--timeline-x);
  width: var(--marker-size);
  height: var(--marker-size);
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(212, 179, 106, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-date {
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.timeline-content h2 {
  font-family: "Playfair Display", "Georgia", serif;
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  margin-bottom: 0.6rem;
}

.timeline-content p {
  color: var(--muted);
  margin-bottom: 0.8rem;
}

.timeline-content p:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .timeline {
    gap: 2rem;
    --timeline-x: 20px;
    --marker-size: 20px;
    --marker-offset: 0.55rem;
  }

  .timeline::before {
    left: var(--timeline-x);
    top: calc(var(--marker-offset) + (var(--marker-size) / 2));
  }

  .timeline-item {
    grid-template-columns: 40px 1fr;
    column-gap: 16px;
  }

  .timeline-marker {
    left: var(--timeline-x);
  }
}
.info-card__header h2 {
  font-family: "Playfair Display", "Georgia", serif;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
}

.info-card__hint {
  color: var(--muted);
}

.info-block {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.info-block__title {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--gold);
}

.info-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  align-items: start;
}

.info-row__content {
  display: grid;
  gap: 0.3rem;
}

.info-label {
  color: var(--ivory);
}

.info-value {
  color: var(--gold-soft);
  font-weight: 600;
}

.info-link {
  color: var(--gold);
  font-weight: 600;
}

.info-link:hover,
.info-link:focus {
  color: var(--gold-soft);
}

.info-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(212, 179, 106, 0.12);
  border: 2px solid rgba(212, 179, 106, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-soft);
  font-size: 0.85rem;
}

.info-icon svg {
  width: 18px;
  height: 18px;
}

.info-map {
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid rgba(212, 179, 106, 0.18);
  aspect-ratio: 4 / 3;
}

.info-map--spaced {
  margin-top: 1rem;
}

.info-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.info-caption {
  color: var(--muted);
  margin-top: 1rem;
}

@media (min-width: 1024px) {
  .info-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .info-layout--double {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    align-items: start;
  }

  .info-layout--double .info-column {
    display: grid;
    gap: 2rem;
  }

  .info-card--right {
    grid-column: 2;
  }

  .info-card--wide {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1023px) {
  .info-card--right,
  .info-card--wide {
    grid-column: auto;
  }
}

.placeholder {
  background: rgba(24, 24, 24, 0.6);
  border: 2px dashed rgba(212, 179, 106, 0.35);
  padding: 2rem;
  border-radius: 16px;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid rgba(212, 179, 106, 0.15);
  padding: 2.5rem 0 3rem;
  margin-top: 3rem;
  content-visibility: auto;
  contain-intrinsic-size: 600px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
}

.footer-logo {
  font-family: "Playfair Display", "Georgia", serif;
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
}

.footer-text {
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0rem;
  flex-wrap: wrap;
}

.footer-contact {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.footer-contact .footer-logo {
  margin-bottom: 0;
}

.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(212, 179, 106, 0.35);
  color: var(--gold-soft);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.footer-social__link svg {
  width: 24px;
  height: 24px;
  display: block;
}

.footer-social__link:hover,
.footer-social__link:focus-visible {
  color: var(--gold);
  border-color: rgba(212, 179, 106, 0.6);
  transform: translateY(-1px);
}

.footer-partners {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-partners img {
  height: 28px;
  width: auto;
  object-fit: contain;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (min-width: 720px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  }

  .hero-lead-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .carousel-slide.is-active {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .highlight-inner {
    grid-template-columns: minmax(0, 0.45fr) minmax(0, 0.55fr);
  }

  .highlight-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(110%, 1240px);
    margin: 0 auto;
  }

}

/* Invoice table specific styles */
.page-gestion-factures .member-table-wrap {
  overflow-x: auto;
  max-width: 100%;
  margin-bottom: 1rem;
}

.page-gestion-factures .member-table {
  min-width: auto;
  width: auto;
}

.page-gestion-factures .member-table th,
.page-gestion-factures .member-table td {
  max-width: 200px;
  min-width: 10px;
  width: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-gestion-factures .member-table th:nth-child(1),
.page-gestion-factures .member-table td:nth-child(1) {
  min-width: 10px;
  width: auto;
}

.page-gestion-factures .member-table th:nth-child(2),
.page-gestion-factures .member-table td:nth-child(2) {
  min-width: 10px;
  width: auto;
}

.page-gestion-factures .member-table th:nth-child(3),
.page-gestion-factures .member-table td:nth-child(3) {
  min-width: 10px;
  width: auto;
}

.page-gestion-factures .member-table th:nth-child(4),
.page-gestion-factures .member-table td:nth-child(4) {
  min-width: 10px;
  width: auto;
}

/* Commentaire column - allow text wrapping and controlled expansion */
.page-gestion-factures .member-table td:nth-child(6) {
  white-space: normal;
  word-break: break-word;
  max-width: 200px;
  min-width: 50px;
  width: auto;
}

/* Multi-line headers for specific columns */
.page-gestion-factures .member-table th:nth-child(3),
.page-gestion-factures .member-table th:nth-child(19) {
  white-space: normal !important;
  height: auto;
  line-height: 1.1;
}

.page-gestion-factures .member-table th:nth-child(7),
.page-gestion-factures .member-table td:nth-child(7) {
  min-width: 10px;
  width: auto;
}

.page-gestion-factures .member-table th:nth-child(7) {
  white-space: normal !important;
  height: auto;
  line-height: 1.1;
}

.page-gestion-factures .member-table th:nth-child(19),
.page-gestion-factures .member-table td:nth-child(19) {
  min-width: 10px;
  width: 10px;
}

.page-gestion-factures .member-table th:nth-child(19) {
  white-space: normal;
  height: auto;
  line-height: 1.1;
}

.page-gestion-factures .member-table th:nth-child(n+5):nth-child(-n+8),
.page-gestion-factures .member-table td:nth-child(n+5):nth-child(-n+8) {
  min-width: 10px;
  width: auto;
}

.page-gestion-factures .member-table th:nth-child(n+9),
.page-gestion-factures .member-table td:nth-child(n+9) {
  min-width: 10px;
  width: auto;
  text-align: right;
}

.page-gestion-factures .member-table th:last-child,
.page-gestion-factures .member-table td:last-child {
  min-width: 10px;
  width: auto;
}

/* Ensure horizontal scrollbar is always visible in Safari/WebKit */
.member-table-wrap::-webkit-scrollbar,
.planning-table-wrap::-webkit-scrollbar,
.events-table-wrap::-webkit-scrollbar {
  height: 8px;
}

.member-table-wrap::-webkit-scrollbar-track,
.planning-table-wrap::-webkit-scrollbar-track,
.events-table-wrap::-webkit-scrollbar-track {
  background: rgba(212, 179, 106, 0.1);
}

.member-table-wrap::-webkit-scrollbar-thumb,
.planning-table-wrap::-webkit-scrollbar-thumb,
.events-table-wrap::-webkit-scrollbar-thumb {
  background: rgba(212, 179, 106, 0.3);
  border-radius: 4px;
}

.member-table-wrap::-webkit-scrollbar-thumb:hover,
.planning-table-wrap::-webkit-scrollbar-thumb:hover,
.events-table-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 179, 106, 0.5);
}

/* Date range filter styles */
.member-date-field span {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.member-date-field select {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 2px solid rgba(212, 179, 106, 0.35);
  background: rgba(12, 12, 12, 0.6);
  color: var(--ivory);
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  min-width: 120px;
}

.member-date-field select:hover {
  background: rgba(212, 179, 106, 0.08);
}

.member-date-field select:focus {
  outline: none;
  border-color: rgba(212, 179, 106, 0.6);
  box-shadow: 0 0 0 2px rgba(212, 179, 106, 0.1);
}

.member-light .member-date-field select {
  background: #ffffff;
  color: #14110e;
  border-color: rgba(107, 75, 31, 0.45);
}

.member-light .member-date-field select:hover {
  background: rgba(107, 75, 31, 0.06);
}

/* Stats recap block */
.stats-recap {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
  padding: 1.2rem 1.5rem;
  background: rgba(212, 179, 106, 0.06);
  border: 1px solid rgba(212, 179, 106, 0.15);
  border-radius: 6px;
  flex-wrap: wrap;
}

.stats-recap__panel {
  flex: 1;
  min-width: 200px;
}

.stats-recap__panel--total {
  flex: 0 0 auto;
  min-width: 160px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.stats-recap h3 {
  margin: 0 0 0.8rem 0;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gold);
}

.stats-recap__total-value {
  font-size: 2rem;
  font-weight: 700;
  font-family: monospace;
  color: var(--gold);
  margin: 0;
}

.stats-recap__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.3rem;
}

.stats-recap__list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(212, 179, 106, 0.1);
}

.stats-recap__list li:last-child {
  border-bottom: none;
}

.stats-recap__list .recap-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #1a1a1a;
}

.stats-recap__list .recap-count {
  font-family: monospace;
  font-weight: 600;
  color: var(--gold);
  white-space: nowrap;
}

.stats-recap__empty {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
}

@media (max-width: 768px) {
  .stats-recap {
    flex-direction: column;
    gap: 1.5rem;
  }
}

/* Invoice summary styles */
.invoice-summary {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
  padding: 0.3rem;
  background: rgba(212, 179, 106, 0.05);
  border-radius: 6px;
  border: 1px solid rgba(212, 179, 106, 0.18);
  flex-wrap: wrap;
}

.invoice-summary__purchases,
.invoice-summary__sales {
  flex: 1;
  min-width: 250px;
}

.invoice-summary h3 {
  margin: 0 0 0.8rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.invoice-summary__row {
  justify-content: space-between;
  font-size: 0.95rem;
}

.invoice-summary__row--total {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(212, 179, 106, 0.2);
  font-weight: 500;
}

.invoice-summary__row span:last-child {
  font-family: monospace;
  text-align: right;
}

@media (max-width: 768px) {
  .invoice-summary {
    flex-direction: column;
    gap: 1.5rem;
  }
}

/* Contact Form Modal */
.contact-form-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(8, 8, 8, 0.5);
  backdrop-filter: blur(8px);
  z-index: 200;
}

.contact-form-modal[hidden] {
  display: none;
}

.contact-form-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(8px);
}

.contact-form-modal__dialog {
  position: relative;
  background: var(--charcoal-light);
  border-radius: 18px;
  border: 2px solid rgba(212, 179, 106, 0.2);
  box-shadow: 0 24px 40px var(--shadow);
  width: min(92vw, 800px);
  height: 90vh;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  z-index: 1;
}

.contact-form-modal__close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(212, 179, 106, 0.5);
  background: rgba(20, 20, 20, 0.8);
  color: var(--gold);
  font-size: 1.1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.2s ease, color 0.2s ease;
}

.contact-form-modal__close svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
}

.contact-form-modal__close:hover {
  background: rgba(212, 179, 106, 0.2);
  color: var(--gold-soft);
}

.contact-form-modal__content {
  flex: 1;
  overflow: hidden;
  padding: 1rem;
}

.contact-form-modal__content iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #ffffff;
  display: block;
  border-radius: 12px;
}

@media (max-width: 768px) {
  .contact-form-modal__dialog {
    width: min(95vw, 720px);
    max-height: 95vh;
  }
}

/* Loading states for planning page */
.member-table__empty.is-loading {
  color: var(--gold);
  font-style: italic;
}

.member-light .member-table__empty.is-loading {
  color: #6b4b1f;
}

.member-table__empty.is-error {
  color: #e74c3c;
}

.member-light .member-table__empty.is-error {
  color: #c0392b;
}

.member-table__empty.is-success {
  color: #27ae60;
}

.member-light .member-table__empty.is-success {
  color: #229954;
}

/* Loading animation */
.loading-dots::after {
  content: "";
  animation: loading-dots 1.5s infinite;
}

@keyframes loading-dots {
  0%, 20% { content: ""; }
  40% { content: "."; }
  60% { content: ".."; }
  80%, 100% { content: "..."; }
}

@media (max-width: 768px) {
  .section--carousel::before {
    background: none;
    mask-image: none;
    -webkit-mask-image: none;
  }

  .nav-toggle {
    display: flex;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1rem;
    background: rgba(18, 18, 18, 0.96);
    border-bottom: 1px solid rgba(212, 179, 106, 0.2);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    width: 100%;
  }

  .nav-member {
    margin-left: 0;
    justify-self: flex-start;
  }

  .carousel {
    width: min(100%, 720px);
    height: auto;
    max-height: none;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas:
      "track track track"
      "prev dots next";
    row-gap: 1rem;
    column-gap: clamp(1rem, 5vw, 3rem);
  }

  .carousel-track {
    height: auto;
    grid-area: track;
    position: relative;
  }

  .carousel-slide {
    display: grid;
    height: auto;
    padding-top: 0.8rem;
    gap: 0.75rem;
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateX(12px);
    transition: opacity 0.45s cubic-bezier(0.4, 1, 0.2, 1),
      transform 0.45s cubic-bezier(0.4, 1, 0.2, 1);
    pointer-events: none;
  }

  .carousel-slide.is-active {
    grid-template-columns: 1fr;
    position: relative;
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
  }

  .carousel-slide__media {
    width: min(100%, 320px);
    max-height: 50vh;
    margin: 0.6rem auto 0.6rem;
    aspect-ratio: 2 / 3;
    justify-self: center;
    overflow: hidden;
    border-radius: 6px;
  }

  .carousel-slide__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 6px;
  }

  .carousel-slide__content {
    padding: 1rem 1.2rem 1.2rem;
  }

  .carousel-slide__description {
    max-height: 280px;
    overflow: hidden;
  }

  .carousel-slide__description::after {
    display: block;
  }

  .carousel-slide__description-text {
    max-height: 280px;
    overflow: auto;
    padding-bottom: 1.2rem;
  }

  .movie-card {
    flex-direction: column;
    height: auto;
  }

  .movie-card__content {
    padding: 1.4rem;
  }

  .movie-card__media {
    width: min(100%, 260px);
    height: auto;
    aspect-ratio: 4 / 5;
    margin: 20px auto 0;
    align-self: auto;
  }

  .movie-card__media img {
    height: auto;
    object-fit: contain;
  }

  .movie-card__description {
    max-height: 180px;
    overflow: hidden;
  }

  .movie-card__description::after {
    display: block;
  }

  .movie-card__description-text {
    max-height: 180px;
    overflow: auto;
    padding-bottom: 2rem;
  }

  .hero-actions .btn,
  .carousel-btn {
    box-shadow: 0 0 10px rgba(212, 179, 106, 0.2);
  }

  .carousel-btn {
    position: static;
    transform: none;
    grid-row: 2;
  }

  .carousel-btn--left,
  .carousel-btn--right {
    left: auto;
    right: auto;
  }

  .carousel-btn--left {
    grid-area: prev;
    justify-self: end;
  }

  .carousel-btn--right {
    grid-area: next;
    justify-self: start;
  }

  .carousel-dots {
    margin-top: 0;
    align-items: center;
    grid-area: dots;
  }
}

@media (min-width: 769px) {
  .main-nav {
    display: flex;
    position: static;
  }

  .nav-toggle {
    display: none;
  }

  .nav-member {
    margin-left: auto;
  }
}

@media (min-width: 1024px) {
  .carousel {
    width: min(100%, 1200px);
    overflow: hidden;
    padding: 24px 0;
    height: auto;
    max-height: none;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas:
      "track track track"
      "prev dots next";
    row-gap: 2.5rem;
    column-gap: clamp(1.5rem, 6vw, 4rem);
    mask-image: linear-gradient(
      to right,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 1) 12%,
      rgba(0, 0, 0, 1) 88%,
      rgba(0, 0, 0, 0) 100%
    );
    mask-size: 100% 100%;
    mask-repeat: no-repeat;
    -webkit-mask-image: linear-gradient(
      to right,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 1) 12%,
      rgba(0, 0, 0, 1) 88%,
      rgba(0, 0, 0, 0) 100%
    );
    -webkit-mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
  }

  .carousel-track {
    display: flex;
    gap: 2rem;
    transition: transform 0.45s cubic-bezier(0.4, 1, 0.2, 1);
    will-change: transform;
    grid-area: track;
  }

  .carousel-slide {
    display: flex;
    flex-direction: column;
    flex: 0 0 300px;
    width: 300px;
    height: 470px;
    opacity: 0.65;
    transform: scale(0.93);
    transform-origin: center;
    transition: transform 0.42s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
  }

  .carousel-slide.is-active {
    opacity: 1;
    transform: scale(1.08);
    z-index: 2;
  }

  .carousel-slide__media {
    flex: 0 0 auto;
  }

  .carousel-slide.has-many-sessions .carousel-slide__media {
    width: min(100%, 150px);
  }

  .carousel-slide__content {
    min-height: 0;
    height: 100%;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }

  .carousel-slide.has-many-sessions .movie-card__dates {
    max-height: 6.5rem;
    overflow: auto;
  }

  .carousel-slide.is-prev,
  .carousel-slide.is-next {
    z-index: 1;
  }

  .carousel-slide.is-prev::before,
  .carousel-slide.is-next::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 22%;
    pointer-events: none;
    z-index: 1;
  }

  .carousel-slide.is-prev::before {
    left: 0;
    background: linear-gradient(to right, rgba(23, 23, 23, 0.7), rgba(23, 23, 23, 0));
  }

  .carousel-slide.is-next::after {
    right: 0;
    background: linear-gradient(to left, rgba(23, 23, 23, 0.7), rgba(23, 23, 23, 0));
  }

  .carousel-btn {
    position: static;
    transform: none;
  }

  .carousel-btn--left {
    grid-area: prev;
    justify-self: end;
  }

  .carousel-btn--right {
    grid-area: next;
    justify-self: start;
  }

  .carousel-dots {
    grid-area: dots;
    margin-top: 0;
  }

}

/* ============================================================
   Invoice modal — create / edit / view
   ============================================================ */

/* Wide dialog variant */
.member-modal__dialog--wide {
  width: min(96vw, 1020px);
  max-height: 92vh;
  overflow-y: auto;
}

/* Section dividers inside modal */
.invoice-section {
  border-top: 1px solid rgba(212, 179, 106, 0.15);
  padding-top: 1.5rem;
  margin-top: 1.5rem;
}

.invoice-section:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.invoice-section__title {
  margin: 0 0 0.9rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.invoice-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
}

.invoice-section__header .invoice-section__title {
  margin: 0;
}

/* 2-column form grid */
.invoice-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1.5rem;
  align-items: start;
}

.invoice-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.invoice-field input,
.invoice-field textarea {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(212, 179, 106, 0.25);
  border-radius: 6px;
  color: var(--ivory);
  padding: 0.4rem 0.6rem;
  font-size: 0.88rem;
  font-family: inherit;
  width: 100%;
}

/* Use background-color (not shorthand) so the inherited chevron background-image
   from .member-form select { background-image: !important } doesn't tile */
.invoice-field select {
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(212, 179, 106, 0.25);
  border-radius: 6px;
  color: var(--ivory);
  padding: 0.4rem 1.8rem 0.4rem 0.6rem;
  font-size: 0.88rem;
  font-family: inherit;
  width: 100%;
  min-height: unset;
}

.invoice-field input:focus,
.invoice-field select:focus,
.invoice-field textarea:focus {
  outline: 2px solid rgba(212, 179, 106, 0.5);
  outline-offset: 1px;
}

.invoice-field textarea {
  resize: vertical;
  min-height: 56px;
}

.invoice-field--full {
  grid-column: 1 / -1;
}

.invoice-field--checkbox {
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  color: var(--ivory);
  cursor: pointer;
}

.invoice-field--checkbox input[type="checkbox"] {
  width: auto;
  accent-color: var(--gold);
}

/* Line items table */
.invoice-lines-wrap {
  overflow-x: auto;
  border: 1px solid rgba(212, 179, 106, 0.15);
  border-radius: 8px;
}

.invoice-lines-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.invoice-lines-table th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold-soft);
  padding: 0.5rem 0.6rem;
  background: rgba(212, 179, 106, 0.06);
  white-space: nowrap;
}

.invoice-lines-table td {
  padding: 0.3rem 0.4rem;
  vertical-align: middle;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.invoice-lines-table tbody tr:first-child td {
  border-top: none;
}

.invoice-line-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 179, 106, 0.2);
  border-radius: 4px;
  color: var(--ivory);
  padding: 0.28rem 0.4rem;
  font-size: 0.84rem;
  font-family: inherit;
  min-width: 0;
}

.invoice-line-input:focus {
  outline: 1px solid rgba(212, 179, 106, 0.5);
}

.invoice-line-input--narrow {
  width: 60px;
}

.invoice-line-input--price {
  width: 110px;
}

/* Hide number spinners on line item quantity and price fields */
.invoice-line-input--narrow::-webkit-inner-spin-button,
.invoice-line-input--narrow::-webkit-outer-spin-button,
.invoice-line-input--price::-webkit-inner-spin-button,
.invoice-line-input--price::-webkit-outer-spin-button,
.field-stats-viewers input::-webkit-inner-spin-button,
.field-stats-viewers input::-webkit-outer-spin-button,
.field-stats-viewers-vo input::-webkit-inner-spin-button,
.field-stats-viewers-vo input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.field-stats-viewers input,
.field-stats-viewers-vo input {
  -moz-appearance: textfield;
  appearance: textfield;
}

.invoice-line-input--narrow,
.invoice-line-input--price {
  appearance: textfield;
  -moz-appearance: textfield;
}

.invoice-line-select {
  background-color: rgba(255, 255, 255, 0.05); /* background-color not shorthand — avoids tiling the inherited chevron */
  border: 1px solid rgba(212, 179, 106, 0.2);
  border-radius: 4px;
  color: var(--ivory);
  padding: 0.28rem 1.6rem 0.28rem 0.4rem;
  font-size: 0.84rem;
  font-family: inherit;
  width: 76px;
  min-height: unset;
}

.invoice-line-computed {
  text-align: right;
  color: var(--ivory);
  white-space: nowrap;
  padding-right: 0.5rem;
  font-variant-numeric: tabular-nums;
  font-size: 0.84rem;
}

/* Totals */
.invoice-totals-section {
  background: rgba(212, 179, 106, 0.04);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(212, 179, 106, 0.12);
  margin-top: 1.25rem;
}

.invoice-totals-grid {
  display: grid;
  gap: 0.3rem;
  max-width: 540px;
  margin-left: auto;
}

.invoice-totals__row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  gap: 0.4rem 1.2rem;
  align-items: center;
  font-size: 0.86rem;
}

.invoice-totals__row > span:nth-child(odd) {
  color: var(--muted);
}

.invoice-totals__row > span:nth-child(even) {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--ivory);
  min-width: 90px;
}

.invoice-totals__row--summary {
  border-top: 1px solid rgba(212, 179, 106, 0.2);
  padding-top: 0.4rem;
  margin-top: 0.2rem;
  font-weight: 600;
}

.invoice-totals__row--summary > span:nth-child(odd) {
  color: var(--ivory);
}

.invoice-totals__row--grand > span:nth-child(4) {
  font-weight: 700;
  font-size: 1rem;
  color: var(--gold);
}

/* View modal */
.invoice-view {
  display: grid;
  gap: 1.25rem;
}

.invoice-view-meta {
  display: grid;
  gap: 0;
}

.invoice-view-meta__row {
  display: grid;
  grid-template-columns: 130px 1fr 130px 1fr;
  gap: 0.4rem 1rem;
  padding: 0.35rem 0;
  font-size: 0.86rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.invoice-view-meta__row > span:nth-child(odd) {
  color: var(--muted);
  font-size: 0.8rem;
  align-self: center;
}

.invoice-view-meta__row > span:nth-child(even),
.invoice-view-meta__row > strong {
  color: var(--ivory);
  align-self: center;
}

.invoice-view-comment {
  font-size: 0.86rem;
  color: var(--muted);
  padding: 0.4rem 0;
}

.invoice-view-lines {
  overflow-x: auto;
}

.invoice-lines-table--view td {
  color: var(--ivory);
  padding: 0.45rem 0.6rem;
}

.invoice-view-totals {
  display: grid;
  gap: 0.3rem;
  max-width: 420px;
  margin-left: auto;
  background: rgba(212, 179, 106, 0.04);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  border: 1px solid rgba(212, 179, 106, 0.12);
}

.invoice-view__total-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  gap: 0.35rem 1rem;
  font-size: 0.86rem;
  color: var(--muted);
}

.invoice-view__total-row > span:nth-child(even) {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--ivory);
  min-width: 80px;
}

.invoice-view__total-row--ht,
.invoice-view__total-row--ttc {
  grid-template-columns: 1fr auto;
  border-top: 1px solid rgba(212, 179, 106, 0.2);
  padding-top: 0.35rem;
  margin-top: 0.1rem;
  color: var(--ivory);
}

.invoice-view__total-row--ttc > span:last-child {
  font-weight: 700;
  font-size: 1rem;
  color: var(--gold);
}

.invoice-view-payment {
  border-top: 1px solid rgba(212, 179, 106, 0.15);
  padding-top: 0.75rem;
  display: grid;
  gap: 0;
}

.invoice-payment-status-paid {
  color: #6abf69;
  font-weight: 600;
}

.invoice-payment-status-unpaid {
  color: #e57373;
  font-weight: 600;
}

/* Invoice file attachment — form row */
.invoice-file-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.3rem;
}

.invoice-file-row input[type="file"] {
  flex: 1;
  font-size: 0.85rem;
  color: inherit;
}

.invoice-file-delete-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.6rem;
  border: 1px solid rgba(192, 57, 43, 0.5);
  border-radius: 6px;
  background: rgba(192, 57, 43, 0.12);
  color: #e57373;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.invoice-file-delete-btn:hover {
  background: rgba(192, 57, 43, 0.25);
  border-color: rgba(192, 57, 43, 0.75);
}

.member-light .invoice-file-delete-btn {
  color: #c0392b;
  border-color: rgba(192, 57, 43, 0.4);
  background: rgba(192, 57, 43, 0.07);
}

.member-light .invoice-file-delete-btn:hover {
  background: rgba(192, 57, 43, 0.15);
  border-color: rgba(192, 57, 43, 0.6);
}

.invoice-file-name {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.6);
  word-break: break-all;
}

.member-light .invoice-file-name {
  color: lightgrey;
}

.invoice-file-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid rgba(212, 179, 106, 0.4);
  border-radius: 6px;
  background: rgba(212, 179, 106, 0.08);
  color: var(--gold);
  font-size: 0.8rem;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.invoice-file-view-btn:hover {
  background: rgba(212, 179, 106, 0.18);
  border-color: rgba(212, 179, 106, 0.65);
}

.member-light .invoice-file-view-btn {
  color: #7a5500;
  border-color: rgba(160, 120, 20, 0.4);
  background: rgba(160, 120, 20, 0.07);
}

.member-light .invoice-file-view-btn:hover {
  background: rgba(160, 120, 20, 0.15);
  border-color: rgba(160, 120, 20, 0.6);
}

/* Invoice view modal — file link */
.invoice-view-file {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(212, 179, 106, 0.15);
}

/* Invoice view — contact card + footer */
.invoice-view-top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.75rem;
}

.invoice-view-contact-card {
  background: rgba(212, 179, 106, 0.05);
  border: 1px solid rgba(212, 179, 106, 0.18);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  min-width: 200px;
  max-width: 290px;
  font-size: 0.84rem;
  line-height: 1.55;
}

.invoice-view-contact-card__name {
  font-weight: 700;
  color: var(--ivory);
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
}

.invoice-view-contact-card__detail {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: pre-wrap;
}

.invoice-view-footer {
  border-top: 1px solid rgba(212, 179, 106, 0.15);
  padding-top: 0.75rem;
  font-size: 0.78rem;
  color: var(--muted);
  white-space: pre-wrap;
  line-height: 1.6;
}

/* Print area — hidden on screen, shown only when printing */
.invoice-print-area {
  display: none;
}

@media print {
  body > *:not(.invoice-print-area) {
    display: none !important;
  }

  .invoice-print-area {
    display: block !important;
    padding: 1.8cm 2cm;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 9pt;
    color: #000;
  }

  /* ── Title ──────────────────────────────────────────────── */
  .invoice-print-area h2 {
    font-size: 14pt;
    font-weight: 700;
    color: #000;
    margin-bottom: 1.4rem;
    border-bottom: 2px solid #c8a84b;
    padding-bottom: 0.4rem;
  }

  /* ── Contact card — flush right, below title ────────────── */
  .invoice-print-area .invoice-view-top {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.6rem;
  }

  .invoice-print-area .invoice-view-contact-card {
    border: 1px solid #ccc;
    padding: 0.6rem 0.9rem;
    font-size: 9pt;
    color: #000;
    line-height: 1.55;
    min-width: 180px;
    max-width: 240px;
  }

  .invoice-print-area .invoice-view-contact-card__name {
    font-weight: 700;
    font-size: 10pt;
    color: #000;
    margin-bottom: 0.2rem;
  }

  .invoice-print-area .invoice-view-contact-card__detail {
    color: #333;
    font-size: 8.5pt;
    white-space: pre-wrap;
  }

  /* ── Metadata rows ──────────────────────────────────────── */
  .invoice-print-area .invoice-view-meta {
    margin-bottom: 1.4rem;
  }

  .invoice-print-area .invoice-view-meta__row {
    display: grid;
    grid-template-columns: 120px 1fr 130px 1fr;
    gap: 0.35rem 0.8rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid #eee;
    font-size: 9pt;
    color: #000;
  }

  .invoice-print-area .invoice-view-meta__row > span:nth-child(odd),
  .invoice-print-area .invoice-view-meta__row > span:nth-child(even),
  .invoice-print-area .invoice-view-meta__row > strong {
    color: #000;
  }

  .invoice-print-area .invoice-view-meta__row > span:nth-child(odd) {
    color: #666;
    font-size: 8.5pt;
  }

  .invoice-print-area .invoice-view-comment {
    font-size: 8.5pt;
    color: #444;
    padding: 0.45rem 0 0;
  }

  /* ── Line items ─────────────────────────────────────────── */
  .invoice-print-area .invoice-view-lines {
    margin-bottom: 0;
  }

  .invoice-print-area .invoice-lines-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    table-layout: fixed;
  }

  .invoice-print-area .invoice-lines-table th {
    background: #f5eed8;
    font-size: 8pt;
    font-weight: 700;
    padding: 0.45rem 0.5rem;
    text-align: left;
    border: 1px solid #ccc;
    color: #000;
    overflow: hidden;
  }

  /* Column widths to fit A4 */
  .invoice-print-area .invoice-lines-table th:nth-child(1),
  .invoice-print-area .invoice-lines-table td:nth-child(1) { width: 34%; }
  .invoice-print-area .invoice-lines-table th:nth-child(2),
  .invoice-print-area .invoice-lines-table td:nth-child(2) { width: 7%;  text-align: right; }
  .invoice-print-area .invoice-lines-table th:nth-child(3),
  .invoice-print-area .invoice-lines-table td:nth-child(3) { width: 14%; text-align: right; }
  .invoice-print-area .invoice-lines-table th:nth-child(4),
  .invoice-print-area .invoice-lines-table td:nth-child(4) { width: 7%;  text-align: center; }
  .invoice-print-area .invoice-lines-table th:nth-child(5),
  .invoice-print-area .invoice-lines-table td:nth-child(5),
  .invoice-print-area .invoice-lines-table th:nth-child(6),
  .invoice-print-area .invoice-lines-table td:nth-child(6),
  .invoice-print-area .invoice-lines-table th:nth-child(7),
  .invoice-print-area .invoice-lines-table td:nth-child(7) { width: 12.67%; text-align: right; }

  .invoice-print-area .invoice-lines-table td {
    border: 1px solid #ddd;
    padding: 0.4rem 0.5rem;
    font-size: 9pt;
    color: #000;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* ── Totals ─────────────────────────────────────────────── */
  .invoice-print-area .invoice-view-totals {
    max-width: 300px;
    margin-left: auto;
    margin-top: 0.9rem;
    border: 1px solid #ccc;
    padding: 0.6rem 0.9rem;
    font-size: 9pt;
    color: #000;
  }

  .invoice-print-area .invoice-view__total-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto;
    gap: 0.2rem 0.8rem;
    padding: 0.2rem 0;
    color: #000;
    font-size: 9pt;
  }

  .invoice-print-area .invoice-view__total-row > span:nth-child(odd)  { color: #666; }
  .invoice-print-area .invoice-view__total-row > span:nth-child(even) { color: #000; text-align: right; }

  .invoice-print-area .invoice-view__total-row--ht,
  .invoice-print-area .invoice-view__total-row--ttc {
    grid-template-columns: 1fr auto;
    border-top: 1px solid #aaa;
    padding-top: 0.3rem;
    margin-top: 0.15rem;
    font-weight: 600;
    color: #000;
  }

  .invoice-print-area .invoice-view__total-row--ht > span,
  .invoice-print-area .invoice-view__total-row--ttc > span { color: #000; text-align: right; }
  .invoice-print-area .invoice-view__total-row--ht > span:first-child,
  .invoice-print-area .invoice-view__total-row--ttc > span:first-child { text-align: left; }

  .invoice-print-area .invoice-view__total-row--ttc > span:last-child {
    font-size: 11pt;
    font-weight: 700;
    color: #000;
  }

  /* ── Payment ────────────────────────────────────────────── */
  .invoice-print-area .invoice-view-payment {
    margin-top: 1.6rem;
    padding-top: 0.6rem;
    border-top: 1px solid #ccc;
    font-size: 9pt;
    color: #000;
  }

  .invoice-print-area .invoice-view-payment .invoice-view-meta__row {
    border-bottom: 1px solid #eee;
    padding: 0.45rem 0;
    margin-bottom: 0;
  }

  .invoice-print-area .invoice-payment-status-paid,
  .invoice-print-area .invoice-payment-status-unpaid { color: #000; font-weight: 700; }

  /* ── Footer ─────────────────────────────────────────────── */
  .invoice-print-area .invoice-view-footer {
    margin-top: 1.8rem;
    padding-top: 0.6rem;
    border-top: 1px solid #ccc;
    font-size: 8pt;
    color: #555;
    white-space: pre-wrap;
    line-height: 1.6;
  }
}

/* ============================================================
   Exercice facturation — résultats d'exercice
   ============================================================ */

/* Amounts: right-aligned, tabular digits */
.exercice-amount {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Primary cell — group/activity name, spans multiple rows */
.exercice-table .exercice-primary-cell {
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold);
  vertical-align: top;
  padding-top: 0.75rem;
  border-right: 2px solid rgba(212, 179, 106, 0.25);
}

.member-light .exercice-table .exercice-primary-cell {
  color: #7a5500;
  border-right-color: rgba(160, 120, 20, 0.25);
}

/* Group total rows */
.exercice-table .exercice-group-total td {
  font-weight: 600;
  background: rgba(212, 179, 106, 0.12);
  border-top: 1px solid rgba(212, 179, 106, 0.2);
  border-bottom: 3px solid rgba(212, 179, 106, 0.35);
}

.member-light .exercice-table .exercice-group-total td {
  background: rgba(160, 120, 20, 0.1);
  border-top-color: rgba(160, 120, 20, 0.2);
  border-bottom-color: rgba(160, 120, 20, 0.3);
}

/* Grand total row */
.exercice-table .exercice-grand-total td {
  font-weight: 700;
  font-size: 0.95rem;
  background: rgba(212, 179, 106, 0.22);
  border-top: 3px solid rgba(212, 179, 106, 0.5);
}

.member-light .exercice-table .exercice-grand-total td {
  background: rgba(160, 120, 20, 0.15);
  border-top-color: rgba(160, 120, 20, 0.4);
}

/* Spacer rows between groups */
.exercice-table .exercice-spacer td {
  padding: 0;
  height: 10px;
  background: transparent !important;
  border: none !important;
}

/* Positive / negative amounts — background color coding */
.member-light .exercice-table td.is-positive,
.exercice-table td.is-positive {
  background: rgba(107, 234, 107, 0.35) !important;
  color: #1f5c1f !important;
  font-weight: 600;
}

.member-light .exercice-table td.is-negative,
.exercice-table td.is-negative {
  background: rgba(255, 0, 0, 0.18) !important;
  color: #7a1a1a !important;
  font-weight: 600;
}
