/* SexyNichons : design global et composants réutilisables. */

@font-face {
    font-family: "Inter";
    src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
}

@font-face {
    font-family: "Sora";
    src: url("../fonts/sora-latin-wght-normal.woff2") format("woff2");
    font-weight: 100 800;
    font-display: swap;
}

:root {
    --bg: #0D0D0D;
    --surface: #181818;
    --surface-raised: #222222;
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.24);
    --text: #F4F2EF;
    --text-muted: #ABA6A0;
    --accent: #D9381E;
    --accent-hover: #EE4A2E;
    --accent-text: #FF7A52;
    --success: #58C98B;
    --danger: #FF7B6B;
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --header-height: 72px;
    --gutter: clamp(16px, 4vw, 48px);
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-display: "Sora", "Inter", system-ui, sans-serif;
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    color-scheme: dark;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 16px);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }

h1, h2, h3 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
}

p { margin: 0; }

a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
    outline: 2px solid var(--accent-text);
    outline-offset: 2px;
    border-radius: 2px;
}

.container {
    width: 100%;
    max-width: 1480px;
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 200;
    padding: 10px 16px;
    background: var(--text);
    color: var(--bg);
    border-radius: var(--radius-sm);
    transition: top 0.15s;
}
.skip-link:focus { top: 12px; }

/* Boutons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 20px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: none;
    color: var(--text);
    font: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }

.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); }
.btn--ghost { border-color: var(--line-strong); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.08); }
.btn--outline { border-color: var(--line-strong); background: var(--surface-raised); }
.btn--outline:hover { background: #2E2E2E; }
.btn--glass { background: rgba(255, 255, 255, 0.14); backdrop-filter: blur(8px); }
.btn--glass:hover { background: rgba(255, 255, 255, 0.24); }
.btn--sm { min-height: 40px; padding: 8px 16px; font-size: 0.875rem; }
.btn--lg { min-height: 52px; padding: 14px 28px; font-size: 1rem; }
.btn--block { width: 100%; }

.link-button {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

/* Logo */
.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
}
.logo__mark { width: 30px; height: 30px; flex: none; }
.logo__text {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

/* En-tête */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    background: rgba(13, 13, 13, 0.82);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    height: 100%;
}

.site-nav {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-nav__links { display: flex; gap: 4px; }
.site-nav__links a {
    display: block;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s, background-color 0.2s;
}
.site-nav__links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.site-nav__links a[aria-current="page"] { color: var(--text); }

.site-nav__account { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 12px 10px;
    flex-direction: column;
    justify-content: space-between;
    border: 0;
    background: none;
    cursor: pointer;
}
.nav-toggle span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: var(--text);
    transition: transform 0.25s var(--ease), opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.profile-menu { position: relative; }
.profile-menu__button {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 4px 12px 4px 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
}
.profile-menu__avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
}
.profile-menu__panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 180px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-raised);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}
.profile-menu__item {
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: var(--radius-sm);
    background: none;
    color: var(--text);
    font: inherit;
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
}
.profile-menu__item:hover { background: rgba(255, 255, 255, 0.08); }

/* Hero */
.hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: min(82vh, 780px);
    margin-top: calc(var(--header-height) * -1);
    overflow: hidden;
    background: var(--surface);
    isolation: isolate;
}
.hero__poster,
.hero__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -3;
}
.hero__video {
    z-index: -2;
    opacity: 0;
    transition: opacity 0.9s ease;
}
.hero__video.is-playing { opacity: 1; }
.hero__overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(to top, var(--bg) 0%, rgba(13, 13, 13, 0.55) 38%, rgba(13, 13, 13, 0.15) 75%, rgba(13, 13, 13, 0.55) 100%),
        linear-gradient(to right, rgba(13, 13, 13, 0.82) 0%, rgba(13, 13, 13, 0.25) 60%, transparent 100%);
}
.hero__content { padding-block: calc(var(--header-height) + 48px) clamp(40px, 7vh, 80px); }
.hero__content > * { max-width: 680px; }
.hero__eyebrow {
    margin-bottom: 14px;
    color: var(--accent-text);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.hero h1 {
    font-size: clamp(2.25rem, 5.5vw, 4.25rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.05;
}
.hero__description {
    margin-top: 18px;
    color: #DAD6D1;
    font-size: clamp(1rem, 1.4vw, 1.15rem);
}
.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

/* Sections et grille */
.video-sections { padding-bottom: 32px; }
.video-section { padding-block: clamp(24px, 3vw, 40px); }
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}
.section-head h2 { font-size: clamp(1.25rem, 2vw, 1.6rem); }
.section-head__link {
    flex: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-decoration: none;
}
.section-head__link:hover { color: var(--text); }

.video-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px 20px;
}

.video-card { display: flex; flex-direction: column; min-width: 0; }
.video-card__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--surface);
}
.video-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease), filter 0.3s;
}
.video-card__media:hover img,
.video-card:focus-within .video-card__media img {
    transform: scale(1.05);
    filter: brightness(0.7);
}
.video-card__play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.85);
    transition: opacity 0.2s, transform 0.3s var(--ease);
}
.video-card__play svg { width: 24px; height: 24px; fill: #fff; }
.video-card__media:hover .video-card__play,
.video-card:focus-within .video-card__play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.video-card__duration,
.video-card__lock {
    position: absolute;
    bottom: 8px;
    right: 8px;
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.video-card__lock {
    top: 8px;
    bottom: auto;
    right: auto;
    left: 8px;
    background: var(--accent);
}
.video-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 12px;
}
.video-card__category {
    color: var(--accent-text);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-decoration: none;
    text-transform: uppercase;
}
.video-card__category:hover { text-decoration: underline; }
.video-card__title {
    margin-top: 4px;
    font-size: 1.02rem;
    letter-spacing: -0.01em;
    line-height: 1.3;
}
.video-card__title a { text-decoration: none; }
.video-card__title a:hover { color: var(--accent-text); }
.video-card__description {
    display: -webkit-box;
    margin-top: 6px;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}
.video-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    margin-top: auto;
    padding-top: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
}
.video-card__cta svg { width: 16px; height: 16px; fill: var(--accent-text); }
.video-card__cta:hover { color: var(--accent-text); }

.load-more { display: flex; justify-content: center; margin-top: 28px; }
.empty-state {
    padding: 48px 24px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    color: var(--text-muted);
    text-align: center;
}

/* Pages intérieures */
.page-section { padding-block: clamp(28px, 4vw, 56px); }
.page-head { margin-bottom: 28px; }
.page-head h1 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
.page-head p { margin-top: 6px; color: var(--text-muted); }
.page-head .breadcrumb { margin: 0 0 6px; font-size: 0.875rem; }

.filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px;
    margin-bottom: 32px;
    padding: 16px;
    border-radius: var(--radius);
    background: var(--surface);
}
.filters .field { margin: 0; flex: 1 1 170px; }
.filters__search { flex-grow: 3 !important; }

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 40px;
}
.pagination__status { color: var(--text-muted); font-size: 0.9rem; }

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.category-card {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--surface);
    text-decoration: none;
}
.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
}
.category-card:hover img { transform: scale(1.05); }
.category-card__label {
    position: absolute;
    inset: auto 0 0;
    display: flex;
    flex-direction: column;
    padding: 40px 18px 14px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.88), transparent);
}
.category-card__label strong { font-family: var(--font-display); font-size: 1.2rem; }
.category-card__label span { color: #CFCBC6; font-size: 0.85rem; }

/* Page vidéo */
.video-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 36px;
    padding-block: 28px 56px;
}
.player {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #000;
}
.player video,
.player > img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.player > img { object-fit: cover; filter: brightness(0.35) blur(3px); }
.player__locked {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    text-align: center;
}
.player__locked h2 { font-size: clamp(1.1rem, 2.5vw, 1.6rem); }
.player__locked p { margin-top: 6px; color: #DAD6D1; font-size: 0.95rem; }
.player__locked-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; }

.video-info { padding-top: 20px; }
.video-info h1 { margin-top: 6px; font-size: clamp(1.4rem, 2.6vw, 2rem); }
.video-info__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.video-info__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.video-info__description {
    max-width: 75ch;
    margin-top: 20px;
    padding: 16px 18px;
    border-radius: var(--radius);
    background: var(--surface);
    color: #D6D2CD;
}
.video-page__related h2 { margin-bottom: 18px; font-size: 1.2rem; }
.video-grid--related { grid-template-columns: minmax(0, 1fr); gap: 24px; }

/* Formulaires */
.field { margin-bottom: 18px; }
.field label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.875rem;
    font-weight: 600;
}
.field input:not([type="checkbox"]),
.field select,
.field textarea {
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    font: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--accent-text);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(255, 122, 82, 0.22);
}
.field textarea { resize: vertical; }
.field__help { margin-top: 5px; color: var(--text-muted); font-size: 0.8rem; }
.field__error { margin-top: 5px; color: var(--danger); font-size: 0.85rem; }
.field--check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; }
.field--check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); }
.field--check label { margin: 0; font-weight: 400; }
.field--check .field__error { grid-column: 2; margin: 0; }
.field--trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

.alert {
    margin-bottom: 18px;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-raised);
    font-size: 0.925rem;
}
.alert--success { border-color: rgba(88, 201, 139, 0.5); color: #A6E8C4; }
.alert--error { border-color: rgba(255, 123, 107, 0.55); color: #FFC2BA; }
.alert--info { border-color: rgba(255, 255, 255, 0.24); color: #DAD6D1; }
.flash-stack { padding-top: 16px; }

/* Pages légales et erreurs */
.legal-page { max-width: 820px; padding-block: clamp(28px, 4vw, 56px); }
.legal-page section { margin-top: 32px; }
.legal-page h2 { margin-bottom: 10px; font-size: 1.25rem; }
.legal-page section p { margin-bottom: 10px; color: #D6D2CD; }
.legal-toc { padding: 16px 20px; border-radius: var(--radius); background: var(--surface); }
.legal-toc ol { list-style: decimal; padding-left: 20px; }
.legal-toc li { padding-block: 2px; }

.error-page { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.error-page__code {
    color: var(--accent-text);
    font-family: var(--font-display);
    font-size: clamp(4rem, 12vw, 7rem);
    font-weight: 700;
    line-height: 1;
}
.error-page .btn { margin-top: 12px; }

/* Pied de page */
.site-footer {
    margin-top: 32px;
    padding-top: 44px;
    border-top: 1px solid var(--line);
    background: #111111;
}
.site-footer__grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 36px;
}
.site-footer__note { max-width: 46ch; margin-top: 14px; color: var(--text-muted); font-size: 0.875rem; }
.site-footer__title {
    margin-bottom: 12px;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.site-footer li { padding-block: 4px; }
.site-footer li a,
.site-footer li .link-button { font-size: 0.925rem; text-decoration: none; text-align: left; }
.site-footer li a:hover,
.site-footer li .link-button:hover { color: var(--accent-text); }
.site-footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 36px;
    padding-block: 18px;
    border-top: 1px solid var(--line);
    color: var(--text-muted);
}
.badge-18 {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 2px solid var(--accent-text);
    border-radius: 50%;
    color: var(--accent-text);
    font-size: 0.75rem;
    font-weight: 700;
}
.badge-18--large { width: 64px; height: 64px; font-size: 1.2rem; }

/* Bandeau et préférences de cookies */
.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 150;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    max-width: 1180px;
    margin-inline: auto;
    padding: 18px 22px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    background: var(--surface-raised);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner__text p { margin-top: 2px; color: var(--text-muted); font-size: 0.875rem; }
.cookie-banner__actions { display: flex; flex-wrap: wrap; flex: none; gap: 8px; }

.cookie-dialog {
    width: min(560px, calc(100vw - 32px));
    padding: 24px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    background: var(--surface-raised);
    color: var(--text);
}
.cookie-dialog::backdrop { background: rgba(0, 0, 0, 0.72); }
.cookie-dialog h2 { font-size: 1.3rem; }
.cookie-dialog > form > p { margin-top: 6px; color: var(--text-muted); font-size: 0.9rem; }
.cookie-option {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}
.cookie-option p { color: var(--text-muted); font-size: 0.85rem; }
.cookie-option input { width: 22px; height: 22px; flex: none; margin: 2px 0 0; accent-color: var(--accent); }
.cookie-dialog__actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 22px; }

.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 160;
    max-width: calc(100vw - 32px);
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--text);
    color: var(--bg);
    font-size: 0.9rem;
    font-weight: 600;
    transform: translateX(-50%);
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
    .hero__video { display: none; }
}
