/* ============================================================================
   Jeunesse & Santé — Feuille de styles principale
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
:root {
  --red: #d81920; --red-dark: #b5161b; --red-soft: #fff0f0; --ink: #0f172a;
  --navy: #18233c; --muted: #64748b; --line: #d8dee8; --surface: #ffffff;
  --canvas: #f4f6f9; --sidebar: #0b0b0d; --success: #13815b; --warning: #a95b09;
  --danger: #b91c1c; --info: #2563eb; --shadow: 0 12px 30px rgba(15,23,42,.08);
  --sidebar-width: 250px; --radius: 12px;
}
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--canvas); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
img { max-width: 100%; }

/* ------------------------------- Préchargeur ----------------------------- */
.app-preloader { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; background: radial-gradient(120% 120% at 50% 0%, #14161d 0%, #06070a 70%); color: #fff; transition: opacity .45s ease, visibility .45s ease; }
.app-preloader.is-hidden { opacity: 0; visibility: hidden; }
.preloader-inner { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.preloader-mark { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 16px; background: var(--red); font-size: 30px; box-shadow: 0 12px 34px rgba(216,25,32,.4); animation: floatMark 2.4s ease-in-out infinite; }
.preloader-brand { margin-top: 16px; font-size: 22px; font-weight: 900; letter-spacing: -.02em; }
.preloader-brand span { color: #ff5a60; }
.preloader-sub { color: rgba(255,255,255,.5); font-size: 10px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; }
.preloader-spin { margin-top: 22px; width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255,255,255,.14); border-top-color: var(--red); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes floatMark { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* -------------------------------- Spinners ------------------------------- */
.btn-spinner { width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; animation: spin .7s linear infinite; display: inline-block; }
.btn:not(.primary):not(.dark) .btn-spinner { border-color: rgba(216,25,32,.3); border-top-color: var(--red); }
.btn.is-loading { pointer-events: none; }
.inline-spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(216,25,32,.25); border-top-color: var(--red); animation: spin .7s linear infinite; display: inline-block; vertical-align: middle; }

/* ------------------------------ Application ------------------------------ */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0,1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--sidebar); color: #fff; display: flex; flex-direction: column; overflow: hidden; z-index: 40; }
.brand { min-height: 68px; display: flex; align-items: center; gap: 11px; padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.09); }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--red); box-shadow: 0 8px 20px rgba(216,25,32,.28); font-size: 18px; }
.brand strong { display: block; font-size: 16px; letter-spacing: -.02em; }
.brand > span > span { color: #ff7378; }
.brand small { display: block; margin-top: 1px; color: rgba(255,255,255,.46); font-size: 9px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.profile { margin: 12px 13px 4px; padding: 12px; display: flex; align-items: center; gap: 11px; border-radius: 12px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.055); }
.profile-avatar { width: 42px; height: 42px; flex: none; border-radius: 50%; object-fit: cover; background: #222; border: 2px solid rgba(255,255,255,.16); }
.profile-meta { min-width: 0; }
.profile strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-meta > span { display: block; margin-top: 2px; color: rgba(255,255,255,.55); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.role-badge { display: inline-flex !important; width: max-content; margin-top: 7px !important; padding: 3px 8px; border-radius: 99px; border: 1px solid rgba(216,25,32,.45); background: rgba(216,25,32,.18); color: #fff !important; font-size: 9px !important; font-weight: 800; letter-spacing: .06em; }
.side-nav { padding: 9px 8px; overflow-y: auto; flex: 1; }
.nav-label { padding: 13px 10px 6px; color: rgba(255,255,255,.35); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; }
.nav-link { border: 0; width: 100%; min-height: 40px; margin: 1px 0; padding: 8px 10px; display: flex; align-items: center; gap: 9px; border-radius: 9px; background: transparent; color: rgba(255,255,255,.67); text-align: left; font-weight: 650; font-size: 12.5px; transition: .14s ease; }
.nav-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-link.active { color: #fff; background: var(--red); box-shadow: 0 8px 18px rgba(216,25,32,.2); }
.nav-link i { width: 20px; text-align: center; font-size: 15px; }
.nav-count { margin-left: auto; min-width: 22px; padding: 2px 6px; border-radius: 99px; background: rgba(255,255,255,.14); text-align: center; font-size: 9px; font-weight: 800; }
.sidebar-foot { padding: 10px 12px 15px; border-top: 1px solid rgba(255,255,255,.08); }
.logout-btn { justify-content: center; border: 1px solid rgba(255,255,255,.12); color: #ffb2b5; }
.logout-btn:hover { background: rgba(216,25,32,.18); color: #fff; border-color: rgba(216,25,32,.5); }
.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 30; min-height: 68px; padding: 12px clamp(16px,3vw,34px); display: flex; align-items: center; gap: 14px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.btn.mobile-menu { display: none; }
.page-title { flex: 1; min-width: 0; }
.page-title h1 { margin: 0; font-size: 20px; line-height: 1.15; letter-spacing: -.03em; }
.page-title p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.search { position: relative; width: min(360px,38vw); min-height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #f7f8fa; color: var(--muted); }
.search:focus-within { border-color: var(--red); box-shadow: 0 0 0 3px rgba(216,25,32,.09); }
.search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); }
.search .inline-spinner { flex: none; }
.content { padding: 22px clamp(16px,3vw,34px) 48px; max-width: 1600px; margin: 0 auto; }
.view { display: none; }
.view.active { display: block; animation: appear .2s ease; }
@keyframes appear { from { opacity: 0; transform: translateY(4px); } }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin: 25px 0 12px; }
.section-head:first-child { margin-top: 0; }
.section-head h2 { margin: 0; font-size: 18px; letter-spacing: -.025em; }
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: 11.5px; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* --------------------------------- Boutons ------------------------------- */
.btn { min-height: 38px; padding: 8px 13px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font-weight: 750; font-size: 12px; transition: .15s ease; }
.btn:hover { border-color: #f2a7aa; background: #fff7f7; }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 7px 16px rgba(216,25,32,.18); }
.btn.primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn.dark { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.danger { color: var(--danger); border-color: #fecaca; background: #fff7f7; }
.btn.ghost { background: transparent; }
.btn.icon { width: 38px; padding: 0; }
.btn:disabled { opacity: .42; cursor: not-allowed; box-shadow: none; }
.link-button { border: 0; background: transparent; color: var(--red); font-weight: 800; font-size: 11px; display: inline-flex; align-items: center; gap: 5px; }

/* --------------------------------- Cartes -------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 1px rgba(15,23,42,.02); }
.card-head { min-height: 52px; padding: 12px 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.card-head h3 { margin: 0; font-size: 13px; }
.card-body { padding: 15px; }
.grid-2 { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; }
.stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; }
.stat { position: relative; overflow: hidden; padding: 16px; min-height: 116px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.stat i { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 9px; background: var(--red-soft); color: var(--red); }
.stat strong { display: block; margin-top: 11px; font-size: 25px; line-height: 1; letter-spacing: -.04em; }
.stat span { display: block; margin-top: 4px; color: var(--muted); font-size: 10.5px; }
.stat::after { content: ""; position: absolute; right: -20px; bottom: -28px; width: 80px; height: 80px; border-radius: 50%; background: var(--red-soft); }
.badge { display: inline-flex; align-items: center; gap: 5px; width: max-content; padding: 4px 8px; border-radius: 99px; background: #eef2f7; color: #475569; font-size: 9.5px; font-weight: 800; line-height: 1.2; }
.badge.success { color: var(--success); background: #e8f7ef; }
.badge.warning { color: var(--warning); background: #fff4e5; }
.badge.danger { color: var(--danger); background: #feecec; }
.badge.info { color: var(--info); background: #eaf1ff; }
.badge.red { color: var(--red); background: var(--red-soft); }

/* ---------------------------------- Hero --------------------------------- */
/* Hero recadré : hauteur maîtrisée, la vidéo ne « déborde » plus en hauteur. */
.hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0,1.2fr) minmax(300px,.8fr); border-radius: 16px; background: var(--navy); color: #fff; box-shadow: var(--shadow); }
.hero-copy { position: relative; z-index: 2; padding: clamp(22px,3vw,40px); display: flex; flex-direction: column; justify-content: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; color: #ff9ca0; font-size: 10px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.hero h2 { max-width: 560px; margin: 11px 0 9px; font-size: clamp(23px,2.7vw,36px); line-height: 1.06; letter-spacing: -.04em; }
.hero p { max-width: 540px; margin: 0 0 18px; color: rgba(255,255,255,.72); font-size: 12.5px; line-height: 1.55; }
.hero .btn { width: max-content; }
.hero-media { position: relative; overflow: hidden; background: #080e1b; aspect-ratio: 16/10; max-height: 300px; }
.hero-media video { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg,var(--navy) 0%,transparent 42%); pointer-events: none; }
.hero-media .play-badge { position: absolute; inset: 0; margin: auto; width: 58px; height: 58px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(216,25,32,.92); color: #fff; font-size: 24px; box-shadow: 0 12px 30px rgba(0,0,0,.4); }
.partner { position: absolute; right: 14px; bottom: 12px; z-index: 2; padding: 6px 10px; border-radius: 8px; background: rgba(0,0,0,.5); font-size: 9.5px; font-weight: 850; letter-spacing: .09em; }
.privacy-note { margin-top: 13px; padding: 11px 13px; display: flex; align-items: flex-start; gap: 9px; border: 1px solid #cbd7ea; border-radius: 10px; background: #f7faff; color: #42526b; font-size: 11px; }

/* ------------------------------- Thématiques ----------------------------- */
.theme-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.theme-card { min-height: 148px; padding: 15px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; background: #fff; transition: .16s ease; cursor: pointer; }
.theme-card:hover { transform: translateY(-2px); border-color: #f0a4a8; box-shadow: var(--shadow); }
.theme-icon { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 10px; background: var(--red-soft); color: var(--red); font-size: 17px; }
.theme-card h3 { margin: 13px 0 5px; font-size: 13px; }
.theme-card p { margin: 0; color: var(--muted); font-size: 10.5px; line-height: 1.45; }
.theme-count { margin-top: auto; padding-top: 10px; color: var(--red); font-size: 9.5px; font-weight: 850; display: inline-flex; align-items: center; gap: 5px; }

/* ------------------------- Vignettes vidéo (YouTube) --------------------- */
.video-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px 14px; }
.video-card { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 14px; transition: .16s ease; cursor: pointer; }
.video-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #ead0d1; }
.video-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; background: #111827; }
.video-thumb video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.video-thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg,rgba(5,8,15,.4),transparent 55%); pointer-events: none; }
.video-card:hover .play { transform: scale(1.08); }
.play { position: absolute; z-index: 2; left: 12px; bottom: 11px; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--red); color: #fff; box-shadow: 0 8px 20px rgba(0,0,0,.3); transition: transform .16s ease; }
.duration { position: absolute; z-index: 2; right: 9px; bottom: 8px; padding: 3px 6px; border-radius: 5px; background: rgba(0,0,0,.8); color: #fff; font-size: 9.5px; font-weight: 800; }
.video-card-body { padding: 12px 13px 14px; }
.video-meta { display: flex; gap: 7px; align-items: center; color: var(--muted); font-size: 9.5px; flex-wrap: wrap; }
.video-card h3 { margin: 7px 0 6px; font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video-card p { margin: 0; color: var(--muted); font-size: 10.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-actions { display: flex; align-items: center; gap: 6px; margin-top: 11px; }
.card-actions .btn { min-height: 32px; padding: 6px 9px; font-size: 10.5px; }
.progress-line { height: 4px; overflow: hidden; margin-top: 12px; border-radius: 99px; background: #e8edf3; }
.progress-line span { display: block; height: 100%; border-radius: inherit; background: var(--red); }

/* -------------------------------- Toolbar -------------------------------- */
.toolbar { margin-bottom: 14px; padding: 11px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 11px; }
.toolbar .search { width: min(420px,100%); }
.toolbar .yh-select { min-width: 190px; }

/* ------------------------------ Formulaires ------------------------------ */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { color: #475569; font-size: 10px; font-weight: 800; }
.field input, .field textarea { width: 100%; min-height: 39px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; outline: none; background: #fff; color: var(--ink); }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(216,25,32,.08); }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.field.full { grid-column: 1/-1; }
.check { display: flex; align-items: center; gap: 8px; color: #334155; font-size: 11px; }
.check input { accent-color: var(--red); width: 16px; height: 16px; }

/* ------------------- Liste déroulante avec recherche --------------------- */
.yh-native-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.yh-select { position: relative; }
.yh-select.is-disabled { opacity: .55; pointer-events: none; }
.yh-select-trigger { width: 100%; min-height: 39px; padding: 8px 11px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-weight: 600; font-size: 12.5px; transition: .14s ease; }
.yh-select-trigger:hover { border-color: #cbd5e1; }
.yh-select.is-open .yh-select-trigger { border-color: var(--red); box-shadow: 0 0 0 3px rgba(216,25,32,.08); }
.yh-select-trigger i { color: var(--muted); font-size: 12px; transition: transform .18s ease; }
.yh-select.is-open .yh-select-trigger i { transform: rotate(180deg); }
.yh-select-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yh-select-value.is-placeholder { color: var(--muted); font-weight: 500; }
.yh-select-panel { position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; right: 0; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 18px 44px rgba(15,23,42,.16); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: .16s ease; }
.yh-select-panel.drop-up { top: auto; bottom: calc(100% + 6px); transform: translateY(6px); }
.yh-select.is-open .yh-select-panel { opacity: 1; visibility: visible; transform: translateY(0); }
.yh-select-search { display: flex; align-items: center; gap: 7px; padding: 0 9px; margin-bottom: 6px; border: 1px solid var(--line); border-radius: 8px; background: #f7f8fa; color: var(--muted); }
.yh-select-search input { width: 100%; min-height: 34px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.yh-select-list { max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.yh-select-option { padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-radius: 7px; font-size: 12px; color: #334155; }
.yh-select-option:hover { background: #f4f6f9; }
.yh-select-option.is-active { background: var(--red-soft); color: var(--red); font-weight: 700; }
.yh-select-option i { color: var(--red); }
.yh-select-empty { padding: 14px; text-align: center; color: var(--muted); font-size: 11px; }

/* --------------------------------- Divers -------------------------------- */
.empty { padding: 38px 18px; border: 1px dashed #c9d1dd; border-radius: 11px; background: #fff; color: var(--muted); text-align: center; }
.empty i { display: block; margin-bottom: 8px; font-size: 28px; color: #94a3b8; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 10px 12px; border-bottom: 1px solid var(--line); background: #f7f8fa; color: #64748b; font-size: 9px; text-align: left; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.data-table td { padding: 11px 12px; border-bottom: 1px solid #e8ecf1; font-size: 10.5px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.title-cell { min-width: 200px; }
.title-cell strong { display: block; color: var(--ink); font-size: 11.5px; }
.title-cell span { color: var(--muted); font-size: 9.5px; }
.mini-actions { display: flex; gap: 5px; }
.mini-actions .btn { min-height: 30px; padding: 5px 8px; }
.pipeline { display: grid; grid-template-columns: repeat(8,minmax(90px,1fr)); gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.pipeline-step { position: relative; min-height: 70px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 9.5px; font-weight: 750; }
.pipeline-step span { display: block; margin-bottom: 6px; color: var(--red); font-size: 9px; }
.pipeline-step.done { border-color: #9fd7c1; background: #f1fbf6; }
.upload-zone { padding: 26px; border: 1.5px dashed #b9c2d0; border-radius: 12px; background: #fafbfc; text-align: center; transition: .15s; }
.upload-zone.drag { border-color: var(--red); background: var(--red-soft); }
.upload-zone i { display: block; margin-bottom: 9px; color: var(--red); font-size: 30px; }
.upload-zone h3 { margin: 0 0 5px; font-size: 14px; }
.upload-zone p { margin: 0 0 13px; color: var(--muted); font-size: 10.5px; }
.file-list { margin-top: 12px; display: grid; gap: 7px; }
.file-row { padding: 9px 10px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 10.5px; }
.file-row i { color: var(--red); }
.file-row strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row span { margin-left: auto; color: var(--muted); flex: none; }
.theme-admin-row { padding: 11px 13px; display: grid; grid-template-columns: 38px minmax(200px,1fr) 100px 92px 120px; align-items: center; gap: 11px; border-bottom: 1px solid #e8ecf1; }
.theme-admin-row:last-child { border-bottom: 0; }
.theme-admin-row .theme-icon { width: 34px; height: 34px; }
.theme-admin-row strong { display: block; font-size: 11.5px; }
.theme-admin-row small { color: var(--muted); font-size: 9.5px; }
.check-list { display: grid; gap: 8px; }
.check-item { padding: 9px 10px; display: flex; align-items: center; gap: 8px; border-radius: 8px; background: #f7f8fa; font-size: 10.5px; }
.check-item.ok i { color: var(--success); }
.check-item.missing i { color: var(--danger); }

/* ------------------------------- Graphiques ------------------------------ */
.chart-box { position: relative; height: 260px; }
.chart-box.tall { height: 300px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--muted); }
.chart-legend i { width: 11px; height: 11px; border-radius: 3px; }

/* -------------------------------- Modales -------------------------------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; padding: 20px; display: grid; place-items: center; background: rgba(6,10,20,.72); backdrop-filter: blur(5px); animation: appear .16s ease; }
.modal { width: min(920px,100%); max-height: calc(100vh - 40px); overflow: hidden; display: flex; flex-direction: column; border-radius: 15px; background: #fff; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.modal.wide { width: min(1180px,100%); }
.modal-head { padding: 14px 17px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.modal-head h2 { flex: 1; margin: 0; font-size: 16px; }
.modal-body { padding: 17px; overflow-y: auto; }
.modal-foot { padding: 12px 17px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); background: #fafbfc; }
.player-layout { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(280px,.7fr); gap: 16px; }
.player { width: 100%; max-height: 64vh; border-radius: 11px; background: #05070d; }
.player-copy h2 { margin: 0 0 7px; font-size: 20px; }
.player-copy p { color: var(--muted); font-size: 11.5px; line-height: 1.6; }
.sensitive { padding: 10px 11px; display: flex; gap: 8px; border-radius: 8px; background: #fff7ed; color: #8b4b0d; font-size: 10.5px; }
.detail-list { display: grid; gap: 7px; margin: 12px 0; }
.detail-list div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 6px; border-bottom: 1px solid #e8ecf1; color: var(--muted); font-size: 10.5px; }
.detail-list strong { color: var(--ink); text-align: right; }

/* --------------------------------- Toasts -------------------------------- */
.toast-stack { position: fixed; z-index: 800; right: 18px; bottom: 18px; display: grid; gap: 8px; }
.toast { min-width: 260px; max-width: 390px; padding: 11px 13px; display: flex; align-items: flex-start; gap: 9px; border-radius: 10px; background: #111827; color: #fff; box-shadow: 0 18px 40px rgba(0,0,0,.28); font-size: 11px; animation: toastIn .2s ease; }
.toast.out { animation: toastOut .25s ease forwards; }
.toast i { font-size: 15px; color: #6ee7b7; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px); } }

/* --------------------------------- Onglets ------------------------------- */
.tabs { display: flex; gap: 5px; flex-wrap: wrap; }
.tab { min-height: 34px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--muted); font-size: 10.5px; font-weight: 750; }
.tab.active { color: #fff; background: var(--navy); border-color: var(--navy); }

/* ---------------------------------- Aide --------------------------------- */
.help-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.help-card { padding: 18px; }
.help-card i.lead { color: var(--red); font-size: 22px; }
.help-card h3 { margin: 10px 0 6px; font-size: 14px; }
.help-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.help-list { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.help-list li { display: flex; align-items: flex-start; gap: 8px; font-size: 11px; color: #475569; }
.help-list li i { color: var(--red); margin-top: 2px; }
.help-contact { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.contact-card { padding: 15px; display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.contact-card .contact-ico { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--red-soft); color: var(--red); font-size: 17px; margin-bottom: 6px; }
.contact-card strong { font-size: 12.5px; }
.contact-card span { color: var(--muted); font-size: 10.5px; }
.faq { display: grid; gap: 9px; }
.faq-item { border: 1px solid var(--line); border-radius: 11px; background: #fff; overflow: hidden; }
.faq-q { width: 100%; padding: 14px 15px; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: transparent; border: 0; text-align: left; font-weight: 750; font-size: 12.5px; color: var(--ink); }
.faq-q i { color: var(--red); transition: transform .2s ease; }
.faq-item.open .faq-q i { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; padding: 0 15px; color: var(--muted); font-size: 11.5px; line-height: 1.6; transition: max-height .25s ease, padding .25s ease; }
.faq-item.open .faq-a { max-height: 240px; padding: 0 15px 14px; }
.notice { padding: 13px 14px; border-left: 3px solid var(--red); border-radius: 8px; background: #fff; color: #475569; font-size: 11px; }

/* -------------------------------- Profil --------------------------------- */
.profile-editor { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 20px; }
.avatar-panel { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; text-align: center; }
.avatar-big { position: relative; width: 130px; height: 130px; }
.avatar-big img { width: 130px; height: 130px; border-radius: 50%; object-fit: cover; border: 3px solid var(--red-soft); background: #f1f5f9; }
.avatar-edit { position: absolute; right: 4px; bottom: 4px; width: 38px; height: 38px; display: grid; place-items: center; border: 3px solid #fff; border-radius: 50%; background: var(--red); color: #fff; box-shadow: 0 6px 16px rgba(216,25,32,.35); }
.avatar-panel h3 { margin: 0; font-size: 15px; }
.avatar-panel span { color: var(--muted); font-size: 11px; }

/* =============================== PAGE LOGIN =============================== */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; background: var(--canvas); }
.auth-visual { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(28px,4vw,52px); background: #060709; color: #fff; }
.auth-visual .glow-1 { position: absolute; width: 520px; height: 520px; top: -12%; left: -12%; border-radius: 50%; background: rgba(183,22,27,.28); filter: blur(80px); }
.auth-visual .glow-2 { position: absolute; width: 440px; height: 440px; bottom: -14%; right: -12%; border-radius: 50%; background: rgba(216,25,32,.22); filter: blur(80px); }
.auth-visual .mesh { position: absolute; inset: 0; background: linear-gradient(135deg,#060709 0%,#2a0a0c 55%,#060709 100%); opacity: .92; }
.auth-visual > * { position: relative; z-index: 2; }
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-brand .brand-mark { width: 52px; height: 52px; font-size: 24px; border-radius: 14px; }
.auth-brand strong { font-size: 18px; font-weight: 900; }
.auth-brand span { color: #ff5a60; }
.auth-brand small { display: block; color: rgba(255,255,255,.5); font-size: 9px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.auth-hero h1 { font-size: clamp(30px,3.6vw,52px); font-weight: 900; line-height: 1.02; letter-spacing: -.04em; margin: 0 0 16px; }
.auth-hero p { max-width: 440px; color: rgba(255,255,255,.68); font-size: 14px; line-height: 1.6; }
.auth-points { margin-top: 26px; display: grid; gap: 12px; }
.auth-points div { display: flex; align-items: center; gap: 11px; font-size: 13px; color: rgba(255,255,255,.86); }
.auth-points i { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; background: rgba(216,25,32,.2); color: #ff8a8f; }
.auth-foot { color: rgba(255,255,255,.4); font-size: 11px; }
.auth-form-side { display: flex; align-items: center; justify-content: center; padding: clamp(24px,4vw,48px); }
.auth-card { width: min(410px,100%); }
.auth-card > .brand-mark { display: none; }
.auth-card h2 { margin: 0 0 6px; font-size: 24px; letter-spacing: -.03em; }
.auth-card .lead { margin: 0 0 22px; color: var(--muted); font-size: 13px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; margin-bottom: 20px; border-radius: 12px; background: #eef1f6; }
.auth-tab { min-height: 42px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 750; font-size: 12.5px; transition: .15s ease; }
.auth-tab.active { background: #fff; color: var(--red); box-shadow: 0 4px 12px rgba(15,23,42,.08); }
.auth-field { margin-bottom: 14px; }
.auth-field label { display: block; margin-bottom: 7px; font-size: 11.5px; font-weight: 750; color: #334155; }
.auth-input { display: flex; align-items: center; gap: 9px; padding: 0 13px; min-height: 48px; border: 1px solid var(--line); border-radius: 11px; background: #fff; transition: .15s ease; }
.auth-input:focus-within { border-color: var(--red); box-shadow: 0 0 0 3px rgba(216,25,32,.1); }
.auth-input i { color: var(--muted); font-size: 16px; }
.auth-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13.5px; }
.auth-input .toggle-pass { border: 0; background: transparent; color: var(--muted); padding: 4px; }
.auth-error { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 11px 13px; border-radius: 10px; background: #feecec; color: var(--danger); font-size: 12px; font-weight: 600; }
.auth-submit { width: 100%; min-height: 50px; font-size: 14px; margin-top: 4px; }
.auth-hint { margin-top: 18px; padding: 13px; border-radius: 11px; border: 1px dashed #d8dee8; background: #fafbfc; color: var(--muted); font-size: 11px; line-height: 1.65; }
.auth-hint strong { color: var(--ink); }
.auth-hint code { padding: 1px 5px; border-radius: 5px; background: #eef1f6; color: var(--red); font-size: 10.5px; }

/* ============================== RESPONSIVE ============================== */
@media (max-width: 1120px) {
  .theme-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .video-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .hero { grid-template-columns: 1fr .8fr; }
  .player-layout { grid-template-columns: 1fr; }
  .profile-editor { grid-template-columns: 1fr; }
  .avatar-panel { flex-direction: row; text-align: left; justify-content: flex-start; }
  .help-contact { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-form-side { min-height: 100vh; }
  .auth-card > .brand-mark { display: grid; width: 56px; height: 56px; margin: 0 auto 16px; font-size: 26px; border-radius: 16px; }
}
@media (max-width: 820px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; transform: translateX(-100%); width: min(290px,86vw); transition: transform .22s ease; box-shadow: 16px 0 40px rgba(0,0,0,.28); }
  body.menu-open .sidebar { transform: translateX(0); }
  body.menu-open::after { content: ""; position: fixed; inset: 0; z-index: 35; background: rgba(0,0,0,.45); }
  .btn.mobile-menu { display: inline-flex; }
  .topbar { min-height: 62px; }
  .topbar > .search { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-media { aspect-ratio: 16/9; max-height: 220px; order: -1; }
  .hero-media::after { background: linear-gradient(0deg,var(--navy),transparent 60%); }
  .theme-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .theme-admin-row { grid-template-columns: 36px 1fr auto; }
  .theme-admin-row > :nth-child(3), .theme-admin-row > :nth-child(4) { display: none; }
}
@media (max-width: 560px) {
  .content { padding: 15px 12px 36px; }
  .topbar { padding: 10px 12px; gap: 10px; }
  .page-title p { display: none; }
  .theme-grid, .video-grid, .stats, .help-grid, .form-grid { grid-template-columns: 1fr; }
  .hero-copy { padding: 22px 18px; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .field.full { grid-column: auto; }
  .modal-backdrop { padding: 0; align-items: end; }
  .modal { max-height: 94vh; border-radius: 15px 15px 0 0; }
  .toast-stack { right: 10px; left: 10px; bottom: 10px; }
  .toast { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
