/* WildMaster v2 - theme sombre premium */
:root {
  --wm-bg: #0d0d10;
  --wm-surface: #16161b;
  --wm-surface-2: #1e1e25;
  --wm-border: #2a2a33;
  --wm-text: #ededf2;
  --wm-muted: #9b9ba8;
  --wm-accent: #e3324c;
  --wm-accent-hover: #f0465f;
  --wm-accent-soft: rgba(227, 50, 76, .14);
  --wm-gold: #d9b45a;
  --wm-radius: 12px;
  --wm-radius-sm: 8px;
  --wm-max: 1440px;
  --wm-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --wm-display: "Montserrat", "Inter", system-ui, sans-serif;
}

html { background: var(--wm-bg); }
html.wm-noscroll, html.wm-noscroll body { overflow: hidden; }

body.wm {
  background: var(--wm-bg);
  color: var(--wm-text);
  font-family: var(--wm-font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.wm a { color: var(--wm-text); }
.wm a:hover { color: var(--wm-accent-hover); text-decoration: none; }
.wm h1, .wm h2, .wm h3, .wm h4 { color: var(--wm-text); }
.wm ::selection { background: var(--wm-accent); color: #fff; }

.wm-container { width: 100%; max-width: var(--wm-max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 575px) { .wm-container { padding: 0 14px; } }
.wm-main { flex: 1 0 auto; }
.wm-ico { width: 1em; height: 1em; fill: currentColor; vertical-align: -.125em; margin-right: .35em; }

/* ---------- En-tete ---------- */
.wm-header {
  position: sticky; top: 0; z-index: 1030;
  background: rgba(13, 13, 16, .88);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--wm-border);
}
.wm-header__row { display: flex; align-items: center; gap: 20px; height: 68px; }

.wm-logo { font-family: var(--wm-display); font-weight: 900; font-size: 24px; letter-spacing: .02em; line-height: 1; white-space: nowrap; }
.wm-logo:hover { color: inherit; }
.wm-logo__a { color: var(--wm-text); }
.wm-logo__b { color: var(--wm-accent); }
.wm-logo--small { font-size: 18px; }

.wm-search { position: relative; flex: 1 1 auto; max-width: 520px; margin: 0 auto; }
.wm-search input {
  width: 100%; height: 42px; padding: 0 16px 0 42px;
  background: var(--wm-surface); color: var(--wm-text);
  border: 1px solid var(--wm-border); border-radius: 999px;
  font-size: 14px; outline: none; transition: border-color .15s, background .15s;
}
.wm-search input::placeholder { color: var(--wm-muted); }
.wm-search input:focus { border-color: var(--wm-accent); background: var(--wm-surface-2); }
.wm-search__icon { position: absolute; left: 15px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); fill: var(--wm-muted); pointer-events: none; }

.wm-nav { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.wm-iconbtn { display: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--wm-border); background: var(--wm-surface); align-items: center; justify-content: center; cursor: pointer; }
.wm-iconbtn svg { width: 18px; height: 18px; fill: var(--wm-text); }

.wm-lang { display: inline-flex; background: var(--wm-surface); border: 1px solid var(--wm-border); border-radius: 999px; padding: 3px; }
.wm-lang a { font-size: 12px; font-weight: 600; letter-spacing: .04em; padding: 5px 10px; border-radius: 999px; color: var(--wm-muted); }
.wm-lang a.is-active { background: var(--wm-surface-2); color: var(--wm-text); }

@media (max-width: 767px) {
  .wm-header__row { gap: 10px; height: 60px; }
  .wm-logo { font-size: 20px; }
  .wm-iconbtn { display: inline-flex; }
  .wm-search { position: absolute; left: 0; right: 0; top: 60px; max-width: none; padding: 10px 14px; background: var(--wm-bg); border-bottom: 1px solid var(--wm-border); display: none; }
  .wm-search.is-open { display: block; }
  .wm-search__icon { left: 29px; }
  .wm-user__name { display: none; }
}
@media (max-width: 400px) { .wm-lang a { padding: 5px 7px; } }

/* ---------- Boutons ---------- */
.wm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 18px; border-radius: 999px;
  font-size: 14px; font-weight: 600; line-height: 1; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s, transform .1s;
}
.wm-btn:active { transform: translateY(1px); }
.wm-btn--primary, .wm a.wm-btn--primary { background: var(--wm-accent); color: #fff; }
.wm-btn--primary:hover, .wm a.wm-btn--primary:hover { background: var(--wm-accent-hover); color: #fff; }
.wm-btn--ghost, .wm a.wm-btn--ghost { background: var(--wm-surface); color: var(--wm-text); border-color: var(--wm-border); }
.wm-btn--ghost:hover, .wm a.wm-btn--ghost:hover { border-color: #44444f; color: var(--wm-text); }
.wm-btn--block { display: flex; width: 100%; }
.wm-btn--lg { height: 52px; font-size: 16px; }
.wm-btn:focus-visible, .wm a:focus-visible, .wm input:focus-visible { outline: 2px solid var(--wm-accent); outline-offset: 2px; }
.wm .dropdown-toggle::after { margin-left: 6px; }

/* ---------- Menus deroulants ---------- */
.wm-menu.dropdown-menu {
  background: var(--wm-surface); border: 1px solid var(--wm-border); border-radius: var(--wm-radius);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .5); padding: 6px; margin-top: 8px; min-width: 200px;
}
.wm-menu .dropdown-item { color: var(--wm-text); border-radius: var(--wm-radius-sm); padding: 9px 12px; font-size: 14px; }
.wm-menu .dropdown-item:hover, .wm-menu .dropdown-item:focus { background: var(--wm-surface-2); color: var(--wm-text); }
.wm-menu--text p { padding: 8px 12px; margin: 0; color: var(--wm-muted); font-size: 13px; }
.wm-login.dropdown-menu { width: 300px; padding: 18px; }
.wm-login__title { font-weight: 700; font-size: 16px; margin: 0 0 12px; }
.wm-login__links { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; font-size: 13px; }
.wm-login__links a { color: var(--wm-muted); }

/* ---------- Champs ---------- */
.wm-field { display: block; margin: 0 0 12px; }
.wm-field > span { display: block; font-size: 12px; font-weight: 600; color: var(--wm-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.wm-field input {
  width: 100%; height: 44px; padding: 0 14px;
  background: var(--wm-bg); color: var(--wm-text);
  border: 1px solid var(--wm-border); border-radius: var(--wm-radius-sm);
  font-size: 15px; outline: none; transition: border-color .15s;
}
.wm-field input::placeholder { color: #6c6c78; }
.wm-field input:focus { border-color: var(--wm-accent); }
.wm-field input[readonly] { color: var(--wm-muted); background: var(--wm-surface-2); }
.wm-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .wm-field-row { grid-template-columns: 1fr; gap: 0; } }
.wm-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--wm-muted); margin: 4px 0 14px; cursor: pointer; }
.wm-check input { accent-color: var(--wm-accent); width: 16px; height: 16px; }

/* ---------- Sections ---------- */
.wm-section { padding-top: 28px; padding-bottom: 28px; }
.wm-section__head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.wm-h1 { font-family: var(--wm-display); font-weight: 800; font-size: 26px; letter-spacing: -.01em; margin: 0; }
.wm-h2 { font-size: 18px; font-weight: 700; margin: 0 0 16px; }
.wm-pill { font-size: 12px; font-weight: 600; color: var(--wm-muted); background: var(--wm-surface); border: 1px solid var(--wm-border); border-radius: 999px; padding: 4px 10px; }
@media (max-width: 575px) { .wm-h1 { font-size: 21px; } .wm-section { padding-top: 18px; } }

/* ---------- Grille de videos ---------- */
.wm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 26px 18px; }
@media (max-width: 575px) { .wm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 10px; } }
.wm-grid--compact { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px 12px; }
.wm-watch__side .wm-grid--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.wm-card { min-width: 0; }
.wm-card__media { position: relative; display: block; aspect-ratio: 11 / 8; border-radius: var(--wm-radius); overflow: hidden; background: var(--wm-surface); }
.wm-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease, filter .35s ease; }
.wm-card__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .55), transparent 45%); pointer-events: none; }
.wm-card__play { position: absolute; top: 50%; left: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; background: rgba(227, 50, 76, .92); display: flex; align-items: center; justify-content: center; opacity: 0; transform: scale(.85); transition: opacity .2s, transform .2s; z-index: 2; }
.wm-card__play svg { width: 24px; height: 24px; fill: #fff; margin-left: 3px; }
.wm-card__media:hover img { transform: scale(1.05); filter: brightness(.85); }
.wm-card__media:hover .wm-card__play { opacity: 1; transform: scale(1); }
.wm-card__title { font-family: var(--wm-font); font-size: 14px; font-weight: 600; line-height: 1.35; margin: 10px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wm-card__title a { color: var(--wm-text); }
.wm-card__meta { font-size: 12px; color: var(--wm-muted); margin: 4px 0 0; }
.wm-card--compact .wm-card__title { font-size: 13px; margin-top: 8px; }

.wm-badge { position: absolute; z-index: 1; font-size: 11px; font-weight: 700; line-height: 1; padding: 5px 7px; border-radius: 6px; letter-spacing: .03em; }
.wm-badge--time { right: 8px; bottom: 8px; background: rgba(0, 0, 0, .75); color: #fff; font-variant-numeric: tabular-nums; }
.wm-badge--vip { left: 8px; top: 8px; background: linear-gradient(135deg, #f1d27a, var(--wm-gold)); color: #1b1405; }
.wm-badge--inline { position: static; display: inline-block; }

/* ---------- Pagination ---------- */
.wm-pager { margin-top: 36px; }
.wm-pager .pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; }
.wm-pager .page-item .page-link { padding: 0; background: none; border: 0; margin: 0; }
.wm-pager .page-link, .wm-pager .page-link a { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; border-radius: 999px; font-weight: 600; font-size: 14px; }
.wm-pager .page-link a { padding: 0 14px; background: var(--wm-surface); border: 1px solid var(--wm-border); color: var(--wm-text); }
.wm-pager .page-link a:hover { border-color: var(--wm-accent); color: var(--wm-text); }
.wm-pager .page-item.active .page-link { background: var(--wm-accent); color: #fff; padding: 0 14px; }
.wm-pager .sr-only { position: absolute; }

/* ---------- Etat vide ---------- */
.wm-empty { text-align: center; padding: 70px 20px; background: var(--wm-surface); border: 1px solid var(--wm-border); border-radius: var(--wm-radius); }
.wm-empty p { color: var(--wm-muted); font-size: 16px; margin-bottom: 18px; }

/* ---------- Page video ---------- */
.wm-watch { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; }
@media (max-width: 1100px) { .wm-watch { grid-template-columns: minmax(0, 1fr); } }
.wm-back { display: inline-block; font-size: 13px; font-weight: 600; color: var(--wm-muted); margin-bottom: 12px; }
.wm-player { border-radius: var(--wm-radius); overflow: hidden; background: #000; }
.wm-player .video-js { border-radius: var(--wm-radius); }
.wm-player .video-js .vjs-big-play-button { background: rgba(227, 50, 76, .92); border: 0; width: 76px; height: 76px; line-height: 76px; border-radius: 50%; margin-left: -38px; margin-top: -38px; }
.wm-player .video-js:hover .vjs-big-play-button { background: var(--wm-accent-hover); }
.wm-player .video-js .vjs-play-progress, .wm-player .video-js .vjs-volume-level { background: var(--wm-accent); }
.wm-embed iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; display: block; }
.wm-watch__title { font-family: var(--wm-display); font-size: 24px; font-weight: 800; line-height: 1.25; margin: 20px 0 10px; }
.wm-watch__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; color: var(--wm-muted); font-size: 13px; margin-bottom: 16px; }
.wm-watch__desc { color: #c9c9d3; background: var(--wm-surface); border: 1px solid var(--wm-border); border-radius: var(--wm-radius); padding: 16px 18px; margin-bottom: 16px; }
.wm-watch__desc p:last-child { margin-bottom: 0; }
.wm-watch__side { position: sticky; top: 92px; }
@media (max-width: 1100px) { .wm-watch__side { position: static; } .wm-watch__side .wm-grid--compact { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); } }
@media (max-width: 575px) { .wm-watch__title { font-size: 19px; } .wm-watch__side .wm-grid--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.wm-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.wm .wm-tag { font-size: 13px; font-weight: 500; padding: 6px 12px; border-radius: 999px; background: var(--wm-surface); border: 1px solid var(--wm-border); color: #c9c9d3; }
.wm .wm-tag:hover { border-color: var(--wm-accent); color: var(--wm-text); }

/* ---------- Page d'abonnement ---------- */
.wm-pay { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 40px; align-items: start; }
@media (max-width: 991px) { .wm-pay { grid-template-columns: minmax(0, 1fr); gap: 26px; } }
.wm-locked { position: relative; border-radius: var(--wm-radius); overflow: hidden; aspect-ratio: 16 / 10; background: var(--wm-surface); }
.wm-locked img { width: 100%; height: 100%; object-fit: cover; filter: blur(3px) brightness(.55); transform: scale(1.04); }
.wm-locked__veil { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.wm-locked__icon { width: 72px; height: 72px; border-radius: 50%; background: rgba(13, 13, 16, .7); border: 1px solid rgba(255, 255, 255, .15); display: flex; align-items: center; justify-content: center; }
.wm-locked__icon svg { width: 30px; height: 30px; fill: #fff; }
.wm-locked__label { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: rgba(0, 0, 0, .55); padding: 6px 12px; border-radius: 999px; }
.wm-pay__title { font-family: var(--wm-display); font-size: 24px; font-weight: 800; line-height: 1.25; margin: 20px 0 8px; }
.wm-pay__lead { color: var(--wm-muted); font-size: 15px; margin: 0; }
.wm-pay__lead strong { color: var(--wm-text); }

.wm-pay__card { background: var(--wm-surface); border: 1px solid var(--wm-border); border-radius: 16px; padding: 28px; position: relative; overflow: hidden; }
.wm-pay__card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--wm-accent), var(--wm-gold)); }
@media (max-width: 575px) { .wm-pay__card { padding: 22px 18px; } }
.wm-pay__plan { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--wm-border); margin-bottom: 18px; }
.wm-pay__plan-name { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--wm-gold); }
.wm-pay__amount { font-family: var(--wm-display); font-size: 36px; font-weight: 900; line-height: 1; }
.wm-pay__per { color: var(--wm-muted); font-size: 14px; margin-left: 6px; }
.wm-benefits { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 10px; }
.wm-benefits li { position: relative; padding-left: 30px; font-size: 14px; color: #d6d6de; }
.wm-benefits li::before { content: ""; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; background: var(--wm-accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23e3324c' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / 14px no-repeat; }
.wm-alert { list-style: none; margin: 0 0 16px; padding: 12px 14px; border-radius: var(--wm-radius-sm); background: rgba(227, 50, 76, .12); border: 1px solid rgba(227, 50, 76, .4); color: #ffb4bf; font-size: 14px; }
.wm-alert li + li { margin-top: 4px; }
.wm-alert p { margin: 0; }
.wm-form__error { color: #ffb4bf; font-size: 13px; margin: -4px 0 12px; }
.wm-form__note { color: var(--wm-muted); font-size: 12px; text-align: center; margin: 12px 0 0; }
.wm-pay__fine { list-style: none; padding: 16px 0 0; margin: 18px 0 0; border-top: 1px solid var(--wm-border); color: var(--wm-muted); font-size: 12px; display: grid; gap: 6px; }

/* ---------- Pied de page ---------- */
.wm-footer { margin-top: 48px; border-top: 1px solid var(--wm-border); background: #0a0a0c; color: var(--wm-muted); font-size: 13px; }
.wm-footer__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 28px 0 18px; }
.wm-footer__links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.wm-footer__links a, .wm-footer a { color: var(--wm-muted); }
.wm-footer__links a:hover, .wm-footer a:hover { color: var(--wm-text); }
.wm-footer__bottom { border-top: 1px solid var(--wm-border); padding: 16px 0 28px; }
.wm-footer__bottom p { margin: 0 0 6px; }
.wm-18 { display: inline-block; font-weight: 800; font-size: 11px; border: 1px solid var(--wm-muted); border-radius: 4px; padding: 2px 5px; margin-right: 6px; }

/* ---------- Avertissement d'age ---------- */
.wm-age { position: fixed; inset: 0; z-index: 2000; background: rgba(5, 5, 7, .92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: center; padding: 16px; }
.wm-age[hidden] { display: none; }
.wm-age__box { width: 100%; max-width: 480px; background: var(--wm-surface); border: 1px solid var(--wm-border); border-radius: 18px; padding: 34px 28px; text-align: center; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.wm-age__18 { display: inline-flex; align-items: center; justify-content: center; width: 58px; height: 58px; border-radius: 50%; border: 2px solid var(--wm-accent); color: var(--wm-accent); font-family: var(--wm-display); font-weight: 900; font-size: 18px; margin-bottom: 16px; }
.wm-age h2 { font-family: var(--wm-display); font-weight: 800; font-size: 22px; margin: 0 0 10px; }
.wm-age p { color: #c9c9d3; margin: 0 0 10px; }
.wm-age__small { font-size: 12px; color: var(--wm-muted) !important; }
.wm-age__small a { color: var(--wm-muted); text-decoration: underline; }
.wm-age__actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.wm-age__actions .wm-btn { height: 48px; }

/* ---------- Pages generiques (connexion, inscription, compte, contact) ---------- */
.wm-main > .container, .wm-main > .container-fluid, .wm-main > div:not(.wm-container):not(section) { max-width: var(--wm-max); margin-left: auto; margin-right: auto; padding-top: 24px; padding-bottom: 24px; }
.wm .form-control { background: var(--wm-bg); color: var(--wm-text); border-color: var(--wm-border); }
.wm .form-control:focus { background: var(--wm-bg); color: var(--wm-text); border-color: var(--wm-accent); box-shadow: 0 0 0 .2rem var(--wm-accent-soft); }
.wm .btn-primary, .wm .btn-success { background: var(--wm-accent); border-color: var(--wm-accent); color: #fff; }
.wm .btn-primary:hover, .wm .btn-success:hover { background: var(--wm-accent-hover); border-color: var(--wm-accent-hover); }
.wm .card { background: var(--wm-surface); border-color: var(--wm-border); }
.wm .table { color: var(--wm-text); }
.wm .text-muted { color: var(--wm-muted) !important; }

/* ---------- Ajustements (en fin de fichier pour primer sur les regles de base) ---------- */
.wm-pay__price { white-space: nowrap; }
.wm-more .wm-grid--compact { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 16px; }
.wm-more .wm-card:nth-child(n+9), .wm-watch__side .wm-card:nth-child(n+9) { display: none; }
.wm-btn__icon { display: none; margin: 0; }
@media (max-width: 767px) {
  .wm-more .wm-grid--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 10px; }
}
@media (max-width: 575px) {
  .wm-nav { gap: 8px; }
  .wm-btn--login { width: 40px; padding: 0; }
  .wm-btn--login .wm-btn__label { display: none; }
  .wm-btn--login .wm-btn__icon { display: inline-block; width: 18px; height: 18px; }
  .wm-btn--login.dropdown-toggle::after, .wm-user .dropdown-toggle::after { display: none; }
  .wm-user .wm-btn--ghost { padding: 0 12px; }
  .wm-pay__plan { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .wm *, .wm *::before, .wm *::after { transition: none !important; }
}
