/* =====================================================================
   WESTSIDE LEGACY : site public
   ===================================================================== */
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
.wrap { width: min(1200px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(820px, 100% - 40px); padding-block: 3rem 5rem; }

/* Motif signature : la ligne discontinue de la route, en or. */
.stats, .site-footer, .page-head { position: relative; }
.stats::before, .site-footer::before, .page-head::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 3px;
  background: repeating-linear-gradient(90deg, var(--gold) 0 34px, transparent 34px 56px);
  opacity: .75;
}
.stats::before, .site-footer::before { top: 0; }
.page-head::after { bottom: 0; }

/* ---------- En-tête ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(12, 10, 7, .94); border-bottom: 1px solid var(--curb); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 80px; transition: min-height .2s var(--ease); }
.brand { display: block; flex: none; }
.brand img { width: 88px; transition: width .2s var(--ease); }
.is-scrolled .header-inner { min-height: 66px; }
.is-scrolled .brand img { width: 72px; }
.site-nav { display: flex; align-items: center; gap: 1.5rem; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: .15rem; margin: 0; padding: 0; list-style: none; }
.site-nav li a { position: relative; display: block; padding: .5rem .65rem; color: var(--smoke); font-weight: 600; font-size: .975rem; text-decoration: none; transition: color .15s; }
.site-nav li a::after { content: ''; position: absolute; left: .65rem; right: .65rem; bottom: .15rem; height: 2px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .2s var(--ease); }
.site-nav li a:hover { color: var(--bone); }
.site-nav li a:hover::after, .site-nav li a[aria-current=page]::after { transform: scaleX(1); }
.site-nav li a[aria-current=page] { color: var(--bone); }

@media (max-width: 1140px) {
  .js .nav-toggle { display: flex; }
  .js .site-nav { position: fixed; inset: 80px 0 0 0; height: calc(100vh - 80px); height: calc(100dvh - 80px); flex-direction: column; align-items: stretch; gap: 1.25rem; padding: 1.25rem 20px 3rem; overflow-y: auto; background: var(--night); border-top: 1px solid var(--curb); visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .2s var(--ease), transform .2s var(--ease), visibility 0s .2s; }
  .js .is-scrolled .site-nav { inset: 66px 0 0 0; height: calc(100vh - 66px); height: calc(100dvh - 66px); }
  .js .site-nav.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity .2s var(--ease), transform .2s var(--ease); }
  .js .site-nav ul { flex-direction: column; gap: 0; }
  .js .site-nav li a { padding: .85rem 0; font: 700 1.6rem/1.2 var(--font-display); border-bottom: 1px solid var(--curb); }
  .js .site-nav li a::after { left: 0; right: auto; width: 48px; bottom: -1px; }
  /* Sans cela, le flou créerait un repère de positionnement et casserait le menu plein écran. */
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--night); }
  html:not(.js) .header-inner { flex-wrap: wrap; justify-content: center; padding-block: .5rem; }
  html:not(.js) .site-nav { flex-wrap: wrap; justify-content: center; }
  html:not(.js) .site-header { position: static; }
}
body.nav-open { overflow: hidden; }

/* ---------- Accueil : héros ---------- */
.hero { position: relative; isolation: isolate; display: flex; align-items: center; min-height: min(calc(100vh - 80px), 780px); min-height: min(calc(100svh - 80px), 780px); padding-block: 3.5rem; overflow: hidden; }
.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-media img, .hero-media video, .hero-media picture { width: 100%; height: 100%; object-fit: cover; object-position: 60% 60%; }
.hero-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(12, 10, 7, .86) 0%, rgba(12, 10, 7, .5) 48%, rgba(12, 10, 7, .12) 100%), linear-gradient(0deg, var(--night) 0%, transparent 26%); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 2.5rem; align-items: center; }
.hero-copy h1 { margin-bottom: 1.1rem; font-size: clamp(2.7rem, 5.8vw, 4.9rem); text-transform: uppercase; }
.hero-copy p { max-width: 46ch; margin-bottom: 2rem; font-size: 1.2rem; color: #d9d4c7; }
.hero .btn-line { --surface: var(--night); }
.hero-logo { width: 100%; max-width: 600px; justify-self: end; filter: drop-shadow(0 24px 30px rgba(0, 0, 0, .65)); }
.hero-copy { animation: arrive .8s var(--ease) .12s both; }
.hero-logo { animation: arrive .9s var(--ease) both; }
@keyframes arrive { from { opacity: 0; transform: translateY(18px); } }

/* ---------- Statistiques ---------- */
.stats { background: var(--asphalt); border-bottom: 1px solid var(--curb); }
.stats-list { display: flex; flex-wrap: wrap; justify-content: space-around; gap: 1.5rem 3rem; margin-block: 0; padding-block: 2rem 1.75rem; }
.stat { display: flex; flex-direction: column-reverse; align-items: center; text-align: center; }
.stat dt { color: var(--smoke); font-weight: 500; }
.stat dd { margin: 0; font: 800 clamp(2.2rem, 4vw, 3.1rem)/1.05 var(--font-display); color: var(--gold); font-variant-numeric: tabular-nums; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section-alt { --surface: var(--asphalt); background: var(--asphalt); border-block: 1px solid var(--curb); }
.section-tight { padding-block: 2.5rem 5rem; }
.section-tight > h2 { margin-top: 2.5rem; font-size: 1.9rem; }
.section-tight > .chips + h2 { margin-top: 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 2rem; margin-bottom: 2rem; }
.section-head h2 { margin: 0; }

.split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 2rem 4rem; align-items: start; }
.display { font-size: clamp(2.4rem, 5vw, 4.1rem); line-height: 1; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 2rem 1.75rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.features li { padding-top: 1.25rem; border-top: 2px solid var(--curb-hi); transition: border-color .2s; }
.features li:hover { border-top-color: var(--gold); }
.features p { margin: 0; color: var(--smoke); }

.universe-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 2rem; }
.universe-item { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; min-height: 340px; padding: 1.75rem 1.5rem 1.5rem; border: 1px solid var(--curb); border-radius: var(--radius); overflow: hidden; transition: border-color .2s; }
.universe-item::before { content: ''; position: absolute; inset: 0; z-index: -2; background: center / cover no-repeat; transition: transform .6s var(--ease); }
.universe-1::before { background-image: url('../images/fallback-1.webp'); }
.universe-2::before { background-image: url('../images/fallback-2.webp'); }
.universe-3::before { background-image: url('../images/fallback-3.webp'); }
.universe-item::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(12, 10, 7, .96) 20%, rgba(12, 10, 7, .15) 80%); }
.universe-item::before { filter: brightness(1.45); }
.universe-item:hover { border-color: var(--gold-deep); }
.universe-item:hover::before { transform: scale(1.05); }
.universe-item h3 { font-size: 2rem; }
.universe-item p { margin: 0; color: var(--smoke); }

.section-join { border-top: 1px solid var(--curb); }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem 1.5rem; margin: 2.5rem 0 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: block; margin-bottom: .9rem; padding-bottom: .5rem; border-bottom: 2px solid var(--curb-hi); font: 800 3rem/1 var(--font-display); color: var(--gold); }
.steps p { color: var(--smoke); }

/* ---------- Cartes ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 1.25rem; }
.card { --surface: var(--asphalt-2); display: flex; flex-direction: column; background: var(--asphalt-2); border: 1px solid var(--curb); border-radius: var(--radius); overflow: hidden; transition: transform .22s var(--ease), border-color .22s, box-shadow .22s; }
.card:hover { transform: translateY(-3px); border-color: var(--gold-deep); box-shadow: 0 18px 34px rgba(0, 0, 0, .45); }
.card-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card-media img { transform: scale(1.04); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 1.15rem 1.25rem 1.25rem; }
.card h3 { margin-bottom: .45rem; font-size: 1.5rem; }
.card h3 a { color: var(--bone); text-decoration: none; }
.card h3 a:hover { color: var(--gold); }
.card-body > p:last-child { margin: 0; }
.card-body p { color: var(--smoke); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin: 0 0 .75rem; font-size: .9rem; color: var(--smoke-dim); }

.tag { display: inline-block; padding: .05rem .55rem; border: 1px solid currentColor; border-radius: 2px; font-size: .82rem; font-weight: 600; line-height: 1.55; color: var(--bone); }
.tag-nouveaute { color: var(--gold); }
.tag-mise_a_jour { color: var(--blue); }
.tag-evenement { color: var(--green); }
.tag-annonce { color: var(--bone); }
.tag-maintenance { color: var(--red); }
.tag-provisional { color: var(--gold); }

.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.news-grid .is-lead { grid-column: 1 / -1; flex-direction: row; }
.news-grid .is-lead .card-media { flex: 1.35; aspect-ratio: auto; min-height: 320px; }
.news-grid .is-lead .card-body { flex: 1; justify-content: center; padding: 2rem; }
.news-grid .is-lead h3 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
.news-grid-home { grid-template-columns: 1.6fr 1fr; grid-auto-rows: 1fr; }
.news-grid-home .is-lead { grid-column: 1; grid-row: span 2; flex-direction: column; }
.news-grid-home .is-lead .card-media { flex: 1; }
.news-grid-home .is-lead .card-body { flex: none; padding: 1.5rem 1.75rem 1.75rem; }
.news-grid-home .card:not(.is-lead) { flex-direction: row; }
.news-grid-home .card:not(.is-lead) .card-media { flex: 0 0 38%; aspect-ratio: auto; }
.news-grid-home .card:not(.is-lead) h3 { font-size: 1.3rem; }
.news-grid-home .card:not(.is-lead) .card-body > p:last-child { display: none; }
.news-grid-home .card:only-child { grid-column: 1 / -1; }

.card-grid-featured .card { border-color: var(--gold-deep); }
.product-card.is-featured { border-top: 3px solid var(--gold); }
.featured-flag { margin: 0 0 .35rem; font-size: .9rem; font-weight: 700; }
.card-body .featured-flag { color: var(--gold); }
.product-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--curb); }
.price { font: 800 1.9rem/1 var(--font-display); color: var(--gold); font-variant-numeric: tabular-nums; }
.price-lg { font-size: 3rem; margin-bottom: 1.25rem; }

/* ---------- En-tête de page ---------- */
.page-head { isolation: isolate; padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2.25rem, 4vw, 3.25rem); background: var(--night) url('../images/hero-la.webp') center 46% / cover no-repeat; }
.page-head::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(12, 10, 7, .93) 20%, rgba(12, 10, 7, .55)); }
.page-head h1 { margin-bottom: .6rem; text-transform: uppercase; }
.page-head p { max-width: 62ch; margin: 0; color: #d3cec0; font-size: 1.15rem; }

/* ---------- Pages à sommaire : règlement, serveur ---------- */
.doc-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 3.5rem; align-items: start; padding-block: 3rem 5rem; }
.side-nav { position: sticky; top: 88px; max-height: calc(100vh - 104px); overflow-y: auto; padding-right: 4px; }
.side-nav ul { margin: 0; padding: 0; list-style: none; }
.side-nav li a { display: block; padding: .45rem .8rem; border-left: 2px solid var(--curb); color: var(--smoke); text-decoration: none; line-height: 1.4; transition: color .15s, border-color .15s; }
.side-nav li a:hover { color: var(--bone); border-left-color: var(--gold-deep); }
.side-nav li a.is-current { color: var(--bone); border-left-color: var(--gold); font-weight: 600; }
.search { margin-bottom: 1.5rem; }
.search label { display: block; margin-bottom: .4rem; font-weight: 600; }
.search-row { display: flex; gap: .5rem; }
.search-row input { min-width: 0; }
.js .search-row .btn { display: none; }
.doc-section { margin-bottom: 3.5rem; }
.doc-section:last-of-type { margin-bottom: 0; }
.doc-section h2 { padding-bottom: .5rem; border-bottom: 1px solid var(--curb); }
.rules-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem; margin-bottom: 1.5rem; }
.rules-toolbar p { margin: 0 auto 0 0; color: var(--smoke); }
html:not(.js) [data-expand] { display: none; }
.rules-num { color: var(--gold); font-family: var(--font-display); font-weight: 700; font-variant-numeric: tabular-nums; }
.rules-desc { color: var(--smoke); }

.fold { border-bottom: 1px solid var(--curb); }
.fold summary { display: flex; align-items: center; gap: .9rem; padding: .95rem .25rem; cursor: pointer; list-style: none; font-weight: 600; font-size: 1.1rem; line-height: 1.4; transition: color .15s; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary:hover { color: var(--gold); }
.fold summary::after { content: '+'; margin-left: auto; padding-left: .5rem; color: var(--gold); font-size: 1.6rem; font-weight: 400; line-height: 1; transition: transform .2s var(--ease); }
.fold[open] summary::after { transform: rotate(45deg); }
.fold summary .tag { margin-left: auto; }
.fold summary .tag ~ .tag { margin-left: 0; }
.fold summary:has(.tag)::after { margin-left: 0; }
.fold summary .rules-num { min-width: 2.4rem; }
.fold-title { min-width: 0; overflow-wrap: anywhere; }
.fold-body { padding: 0 .25rem 1.25rem; color: #d3cec0; }
.fold[open] .fold-body { animation: unfold .22s var(--ease); }
@keyframes unfold { from { opacity: 0; transform: translateY(-4px); } }

.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.team li { padding: 1rem; background: var(--asphalt); border: 1px solid var(--curb); border-radius: var(--radius); }
.team img, .team-initial { width: 100%; aspect-ratio: 1; object-fit: cover; margin-bottom: .9rem; border-radius: 2px; }
.team-initial { display: grid; place-items: center; background: var(--asphalt-2); color: var(--gold); font: 800 4rem var(--font-display); }
.team h3 { margin-bottom: .2rem; }
.team-role { margin-bottom: .5rem; color: var(--gold); font-weight: 600; }
.team p:last-child { margin: 0; }

/* ---------- Formulaires publics ---------- */
.form-page { width: min(820px, 100% - 40px); padding-block: 3rem 5rem; }
.form-section { margin: 0 0 2.25rem; min-width: 0; }
.form-section > legend { width: 100%; margin-bottom: 1.25rem; padding: 0 0 .5rem; border-bottom: 1px solid var(--curb); font: 800 1.75rem/1.2 var(--font-display); }
.confirmation { padding: clamp(1.5rem, 5vw, 3rem); background: var(--asphalt); --surface: var(--asphalt); border: 1px solid var(--gold-deep); border-radius: var(--radius); text-align: center; }
.reference { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1rem; }
.reference code { font-size: 1.6rem; font-weight: 700; color: var(--gold); letter-spacing: .05em; }

.contact-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 3.5rem; align-items: start; padding-block: 3rem 5rem; }
.contact-aside { --surface: var(--asphalt); padding: 1.5rem; background: var(--asphalt); border: 1px solid var(--curb); border-radius: var(--radius); }
.contact-aside h2 { font-size: 1.4rem; margin-bottom: .4rem; }
.contact-aside h2:not(:first-child) { margin-top: 1.75rem; }
.contact-aside p { color: var(--smoke); }
.contact-aside p:last-child { margin: 0; }
.help-cta { margin-top: 3.5rem; text-align: center; }

/* ---------- Détails : produit et article ---------- */
.detail { padding-block: 2rem 5rem; }
.back { margin-bottom: 1.5rem; }
.product-detail { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 3rem; align-items: start; }
.detail-image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--curb); border-radius: var(--radius); }
.product-detail h1 { font-size: clamp(2.2rem, 4vw, 3.2rem); }
.product-detail .prose { margin-bottom: 1.75rem; }
.article { max-width: 860px; padding-block: 2rem 5rem; }
.article h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); }
.article .detail-image { margin: 1.5rem 0 2rem; }
.article .prose { margin-inline: auto; font-size: 1.125rem; }

/* ---------- Pied de page ---------- */
.site-footer { --surface: #080705; margin-top: auto; padding-top: 3.5rem; background: #080705; border-top: 1px solid var(--curb); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 2.5rem; }
.footer-brand img { width: 210px; margin-bottom: 1rem; }
.footer-brand p { max-width: 32ch; color: var(--smoke); }
.site-footer h2 { margin-bottom: .75rem; font-size: 1.3rem; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li a { display: inline-block; padding: .25rem 0; color: var(--smoke); text-decoration: none; transition: color .15s; }
.site-footer li a:hover { color: var(--gold); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; margin-top: 2.5rem; padding-block: 1.25rem 1.5rem; border-top: 1px solid var(--curb); color: var(--smoke-dim); font-size: .875rem; }
.footer-bottom p { margin: 0; }

body { display: flex; flex-direction: column; min-height: 100vh; }

/* ---------- Adaptation ---------- */
@media (min-width: 1600px) {
  .wrap { width: min(1360px, 100% - 80px); }
  .hero { min-height: min(calc(100svh - 80px), 880px); }
  .hero-logo { max-width: 700px; }
}

@media (max-width: 960px) {
  .hero { padding-block: 2rem 3rem; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; text-align: center; }
  .hero-logo { order: -1; justify-self: center; max-width: min(480px, 92%); }
  .hero-copy p { margin-inline: auto; }
  .hero .actions { justify-content: center; }
  .hero-media::after { background: linear-gradient(0deg, var(--night) 2%, rgba(12, 10, 7, .62) 55%, rgba(12, 10, 7, .35)); }
  .split, .product-detail, .contact-layout { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .universe-grid { grid-template-columns: minmax(0, 1fr); }
  .universe-item { min-height: 230px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-grid .is-lead { flex-direction: column; }
  .news-grid .is-lead .card-media { flex: none; min-height: 0; aspect-ratio: 16 / 9; }
  .news-grid-home { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
  .news-grid-home .is-lead { grid-row: auto; }
  .news-grid-home .is-lead .card-media { flex: none; }
  .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .side-nav { position: static; max-height: none; overflow: visible; }
  .side-nav ul { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .5rem; scrollbar-width: thin; }
  .side-nav li a { white-space: nowrap; border: 1px solid var(--curb); border-radius: var(--radius); }
  .side-nav li a:hover, .side-nav li a.is-current { border-color: var(--gold-deep); }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .wrap, .narrow, .form-page { width: calc(100% - 32px); }
  .hero .actions .btn { width: 100%; }
  .stats-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem 1rem; }
  .steps, .news-grid { grid-template-columns: minmax(0, 1fr); }
  .news-grid-home .card:not(.is-lead) { flex-direction: column; }
  .news-grid-home .card:not(.is-lead) .card-media { flex: none; aspect-ratio: 16 / 9; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem 1rem; }
  .form-page .btn-lg, .contact-layout .btn-lg { width: 100%; }
  .rules-cat .fold summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: .25rem .75rem; }
  .rules-cat .fold summary::after { grid-column: 3; grid-row: 1; }
  .rules-cat .fold summary .tag { grid-column: 2; justify-self: start; margin: 0; }
}
