/* --- FIX: Custom logo size constraint (v2.0.2) --- */
.site-logo a.custom-logo-link img.custom-logo,
.site-header .site-logo img,
.site-header .custom-logo-link img,
.site-header .custom-logo {
  height: 38px !important;
  width: auto !important;
  max-width: 150px !important;
  max-height: 38px !important;
  object-fit: contain;
  display: block;
}

.site-header .custom-logo-link {
  display: flex !important;
  align-items: center !important;
  line-height: 0;
}

/* Ensure the site-logo anchor is properly sized */
.site-header .site-logo {
  flex-shrink: 0;
  max-width: 160px;
}

/* ============================================================
   CerfLand Media — Responsive & Polish Fixes v2.0.1
   Applied: 2026-02-27
   ============================================================ */

/* --- FIX: Hero title size on very small screens --- */
@media (max-width: 430px) {
  .hero__title {
    font-size: clamp(2.8rem, 12vw, 4rem);
    line-height: 1.05;
  }
  .hero__subtitle {
    font-size: 0.9rem;
  }
  .hero__cta {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .hero__cta .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

/* --- FIX: Section padding on mobile --- */
@media (max-width: 430px) {
  :root {
    --space-xl: 4rem;
    --space-lg: 2.5rem;
    --space-md: 1.5rem;
  }
  .section__title {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }
  .container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}

/* --- FIX: Pricing cards on mobile --- */
@media (max-width: 430px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .card__price {
    font-size: 2rem;
  }
}

/* --- FIX: Stats grid on mobile --- */
@media (max-width: 430px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .stat__number {
    font-size: 2rem;
  }
}

/* --- FIX: Footer on mobile --- */
@media (max-width: 430px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
}

/* --- FIX: Mobile nav font size --- */
@media (max-width: 430px) {
  .mobile-nav > ul > li > a {
    font-size: 1.5rem;
    padding: 1rem 0;
  }
}

/* --- FIX: Marquee overflow on mobile --- */
@media (max-width: 768px) {
  .marquee__item {
    font-size: 1rem;
  }
}

/* --- FIX: Split layout image on tablet --- */
@media (max-width: 768px) {
  .split__visual {
    aspect-ratio: 16/9;
    min-height: 200px;
  }
}

/* --- FIX: Card grid on tablet --- */
@media (max-width: 768px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* --- POLISH: Button tap targets on mobile --- */
@media (max-width: 1024px) {
  .btn {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* --- POLISH: Header height on mobile --- */
@media (max-width: 1024px) {
  .site-header {
    padding: 1rem 0;
  }
  .header-inner {
    padding: 0 1.25rem;
  }
}

/* --- POLISH: Ensure mobile nav is above everything --- */
.mobile-nav {
  z-index: 1001;
}

/* --- POLISH: Native lazy loading for images --- */
img {
  loading: lazy;
}

/* --- POLISH: Smooth image rendering --- */
img {
  image-rendering: auto;
  -webkit-font-smoothing: antialiased;
}

/* --- FIX: Table responsive (Club & Tarifs) --- */
@media (max-width: 768px) {
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }
  th, td {
    white-space: nowrap;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }
}

/* --- FIX: Process grid on mobile --- */
@media (max-width: 768px) {
  .process {
    grid-template-columns: 1fr;
  }
  .process__step {
    border-right: none;
    border-bottom: 1px solid var(--cl-border);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
  }
}

/* --- POLISH: Focus styles for accessibility --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--cl-gold);
  outline-offset: 3px;
}

/* --- FIX: Prevent horizontal overflow --- */
body {
  overflow-x: hidden;
}

.site {
  overflow-x: hidden;
}

/* --- FIX: Prefers-reduced-motion accessibility --- */
@media (prefers-reduced-motion: reduce) {
  .hero__tagline,
  .hero__title,
  .hero__subtitle,
  .hero__cta,
  .hero__scroll {
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .marquee__track {
    animation: none !important;
  }
}

/* --- FIX: Ensure hero content is visible even without animation support --- */
@supports not (animation-name: fadeInUp) {
  .hero__tagline,
  .hero__title,
  .hero__subtitle,
  .hero__cta {
    opacity: 1;
    transform: none;
  }
}

/* --- FIX: Page transition fallback (body opacity) --- */
body {
  /* Ensure body is visible if JS fails to run */
  animation: bodyFadeIn 0.1s ease 0.5s both;
}

@keyframes bodyFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}


/* ================================================================
   MOBILE-FIRST FIX v3.0 — 360-430px
   ================================================================ */

html, body {
  overflow-x: hidden !important;
  max-width: 100vw;
}

*, *::before, *::after {
  box-sizing: border-box;
}

@media (max-width: 430px) {
  .hero {
    min-height: 100svh;
    padding: 6rem 1.25rem 3rem;
  }
  .hero__eyebrow {
    font-size: 0.55rem;
    letter-spacing: 0.2em;
  }
  .hero__title {
    font-size: clamp(2.4rem, 11vw, 3.5rem);
    line-height: 1.05;
    word-break: break-word;
  }
  .hero__subtitle {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
  }
  .hero__cta {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    width: 100%;
  }
  .hero__cta .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
  .section {
    padding: 3.5rem 0;
  }
  .container,
  .container--wide {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  .section__title {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
    word-break: break-word;
  }
  .section__lead {
    font-size: 0.9rem;
  }
  .cards-grid,
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }
  .pricing-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem;
  }
  .process {
    grid-template-columns: 1fr !important;
  }
  .card,
  .pricing-card,
  .service-card {
    padding: 1.5rem 1.25rem;
  }
  .card__price {
    font-size: 1.8rem;
  }
  .marquee-track {
    font-size: 1.8rem;
    gap: 2rem;
  }
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }
  .footer-brand__logo {
    font-size: 1.8rem;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  .footer-bottom__legal {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
  }
  .home-tarifs-cta {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .home-tarifs-cta .btn {
    width: 100% !important;
    justify-content: center !important;
    min-width: unset !important;
  }
  .mobile-nav {
    padding: 5rem 1.5rem 3rem;
  }
  .mobile-nav ul li a {
    font-size: 1.2rem;
    padding: 0.875rem 0;
  }
}

@media (max-width: 768px) {
  .split {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }
  .split__visual {
    min-height: 250px;
    order: -1;
  }
  .split__visual img,
  .split__visual video {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
  }
}

/* Ultimate Member Forms — luxury styling */
.um-form,
.um-login,
.um-register,
.um-account {
  max-width: 480px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  background: var(--cl-graphite, #1a1a1a);
  border: 1px solid rgba(201,168,76,0.2);
}

.um .um-field-label label {
  font-family: var(--font-caps, 'Cormorant SC', serif);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cl-muted, #888);
}

.um .um-field input[type="text"],
.um .um-field input[type="email"],
.um .um-field input[type="password"] {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(201,168,76,0.2) !important;
  color: var(--cl-white, #fff) !important;
  font-family: var(--font-body, 'Cormorant Garamond', serif) !important;
  font-size: 1rem !important;
  padding: 0.875rem 1rem !important;
  border-radius: 0 !important;
  transition: border-color 0.2s !important;
}

.um .um-field input:focus {
  border-color: rgba(201,168,76,0.6) !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(201,168,76,0.1) !important;
}

.um .um-button,
.um input[type="submit"] {
  background: transparent !important;
  border: 1px solid var(--cl-gold, #c9a84c) !important;
  color: var(--cl-gold, #c9a84c) !important;
  font-family: var(--font-caps, 'Cormorant SC', serif) !important;
  font-size: 0.7rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.2em !important;
  text-transform: uppercase !important;
  padding: 0.875rem 2.5rem !important;
  border-radius: 0 !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  width: 100% !important;
}

.um .um-button:hover,
.um input[type="submit"]:hover {
  background: rgba(201,168,76,0.1) !important;
}

.um .um-notice {
  background: rgba(201,168,76,0.08) !important;
  border-left: 3px solid var(--cl-gold, #c9a84c) !important;
  color: var(--cl-silver, #ccc) !important;
  padding: 1rem 1.25rem !important;
}

.nsl-container .nsl-button {
  border-radius: 0 !important;
  font-family: var(--font-caps, 'Cormorant SC', serif) !important;
  font-size: 0.65rem !important;
  letter-spacing: 0.1em !important;
}

.mobile-nav {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
