/* =====================================================================
   Viral Kings — feuille de style unique, pensée d'abord pour le mobile.
   Style : blocs Roblox, couleurs bonbon, contours épais, ombres décalées.
   ===================================================================== */

:root {
    --ink: #1d1135;
    --ink-soft: #4a3d6b;
    --paper: #fff7e3;
    --card: #ffffff;
    --yellow: #ffd23f;
    --yellow-dark: #f2b705;
    --pink: #ff5fa2;
    --blue: #3ec6ff;
    --green: #3ddc84;
    --purple: #7b3fe4;
    --purple-dark: #5a26b8;
    --orange: #ff8a3d;
    --red: #ff4d5e;
    --muted: #6d628a;

    --radius: 18px;
    --radius-sm: 12px;
    --line: 3px solid var(--ink);
    --shadow: 4px 4px 0 var(--ink);
    --shadow-lg: 6px 6px 0 var(--ink);
    --font: "Fredoka", "Baloo 2", "Nunito", ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
    --nav-height: 64px;
}

/* ---------- Base ---------- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    color: var(--ink);
    background-color: var(--paper);
    background-image: radial-gradient(rgba(123, 63, 228, .09) 2px, transparent 2px);
    background-size: 22px 22px;
    /* place pour la barre de navigation fixée en bas sur mobile */
    padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px) + 12px);
}

img { max-width: 100%; display: block; }

a { color: var(--purple); font-weight: 600; text-underline-offset: 3px; }
a:hover { color: var(--purple-dark); }

h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: 1.8rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 .8em; }
p:last-child { margin-bottom: 0; }

code {
    font-family: var(--mono);
    font-size: .92em;
    background: #f1eaff;
    border: 2px solid #d9c9ff;
    border-radius: 8px;
    padding: .05em .35em;
    white-space: nowrap;
}

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.main { padding-top: 18px; padding-bottom: 24px; }

.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }
.text-error { color: #c0182a; }

.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 100;
    background: var(--yellow); color: var(--ink); padding: 8px 14px;
    border: var(--line); border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; }

/* ---------- En-tête et navigation ---------- */

.topbar {
    background: var(--purple);
    border-bottom: var(--line);
    position: sticky; top: 0; z-index: 50;
}
.topbar__inner { display: flex; align-items: center; gap: 12px; min-height: 60px; }

.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; margin-right: auto; min-width: 0; }
.brand:hover { color: #fff; }
.brand__logo {
    display: grid; place-items: center; width: 40px; height: 40px; flex: none;
    background: var(--yellow); border: var(--line); border-radius: 12px;
    box-shadow: 3px 3px 0 var(--ink); font-size: 1.3rem; transform: rotate(-6deg);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand__text strong { font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand__text small { font-size: .75rem; opacity: .85; font-weight: 600; }

/* Mobile : barre d'onglets fixée en bas de l'écran */
.mainnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    display: flex; justify-content: space-around;
    background: #fff; border-top: var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
}
.mainnav__link {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 4px 2px; border-radius: 12px;
    color: var(--ink); text-decoration: none; font-size: .72rem; font-weight: 700;
}
.mainnav__icon { font-size: 1.35rem; line-height: 1; }
.mainnav__link.is-active { background: var(--yellow); }

.userchip {
    display: flex; align-items: center; gap: 8px; flex: none;
    background: #fff; color: var(--ink); text-decoration: none;
    border: var(--line); border-radius: 999px; padding: 3px 12px 3px 3px;
    box-shadow: 3px 3px 0 var(--ink); font-weight: 700; font-size: .9rem;
}
.userchip img, .userchip__placeholder { width: 34px; height: 34px; border-radius: 50%; background: #e9e1ff; display: grid; place-items: center; }
.userchip__name { max-width: 9em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 420px) {
    .userchip__name { display: none; }
    .userchip { padding-right: 3px; }
}

/* ---------- Boutons ---------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 46px; padding: 10px 20px;
    font: inherit; font-weight: 800; font-size: 1rem; line-height: 1.1;
    color: var(--ink); text-decoration: none; text-align: center;
    background: #fff; border: var(--line); border-radius: 14px;
    box-shadow: var(--shadow); cursor: pointer;
    transition: transform .08s ease, box-shadow .08s ease, filter .15s;
    -webkit-tap-highlight-color: transparent;
}
.btn:hover { color: var(--ink); filter: brightness(1.05); transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn[disabled] { opacity: .65; cursor: progress; transform: none; }

.btn--small { min-height: 38px; padding: 6px 14px; font-size: .9rem; border-radius: 12px; box-shadow: 3px 3px 0 var(--ink); }
.btn--big { min-height: 58px; padding: 14px 26px; font-size: 1.15rem; }
.btn--block { width: 100%; }
.btn--yellow { background: var(--yellow); }
.btn--green { background: var(--green); }
.btn--blue { background: var(--blue); }
.btn--ghost { background: #fff; }
.btn--ghost-light { background: rgba(255, 255, 255, .15); color: #fff; border-color: #fff; box-shadow: 4px 4px 0 rgba(29, 17, 53, .5); }
.btn--ghost-light:hover { color: #fff; }
.btn--danger { background: var(--red); color: #fff; }
.btn--danger:hover { color: #fff; }
.btn--danger-outline { background: #fff; color: #c0182a; border-color: #c0182a; box-shadow: 3px 3px 0 #c0182a; }

.roblox-mark {
    width: 20px; height: 20px; background: var(--ink); border-radius: 3px;
    transform: rotate(15deg); position: relative; flex: none;
}
.roblox-mark::after { content: ""; position: absolute; inset: 7px; background: var(--yellow); }

/* ---------- Messages ---------- */

.flash {
    display: flex; gap: 10px; align-items: flex-start;
    border: var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow);
    padding: 12px 14px; margin-bottom: 16px; font-weight: 600; background: #fff;
}
.flash__icon { font-size: 1.2rem; line-height: 1.2; }
.flash--success { background: #d9ffe9; }
.flash--error { background: #ffe0e4; }
.flash--info { background: #e2f6ff; }

/* ---------- Cartes et sections ---------- */

.card {
    background: var(--card); border: var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 18px; margin-bottom: 18px;
}
.card--center { text-align: center; }
.card--center .btn { margin-top: 6px; }
.card--flush { padding: 0; overflow: hidden; }
.narrow { max-width: 560px; margin-left: auto; margin-right: auto; }

.section { margin: 28px 0; }
.section__title { font-size: 1.45rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.count-badge {
    display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 8px;
    background: var(--pink); color: #fff; border: var(--line); border-radius: 999px; font-size: 1rem;
}

.page-head { text-align: center; margin: 10px 0 24px; }
.page-head__kicker {
    display: inline-block; background: var(--yellow); border: var(--line); border-radius: 999px;
    padding: 4px 14px; font-weight: 800; font-size: .9rem; transform: rotate(-2deg); margin-bottom: 12px;
}
.page-head__lead { color: var(--ink-soft); font-size: 1.05rem; max-width: 36em; margin: 0 auto; }

.stack { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

label { font-weight: 700; }
input[type="text"], input[type="search"], textarea, select {
    width: 100%; min-height: 48px; padding: 10px 14px;
    font: inherit; font-size: 1rem; color: var(--ink);
    background: #fff; border: var(--line); border-radius: var(--radius-sm);
    box-shadow: inset 3px 3px 0 rgba(29, 17, 53, .08);
}
textarea { min-height: 90px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(123, 63, 228, .25); }

/* ---------- Accueil ---------- */

.hero {
    position: relative; overflow: hidden; text-align: center; color: #fff;
    background: linear-gradient(135deg, var(--purple) 0%, #b44be8 45%, var(--pink) 100%);
    border: var(--line); border-radius: 26px; box-shadow: var(--shadow-lg);
    padding: 34px 18px 28px; margin-top: 4px;
}
.hero__stickers { position: absolute; inset: 0; pointer-events: none; }
.sticker { position: absolute; font-size: 2.2rem; filter: drop-shadow(3px 3px 0 rgba(29, 17, 53, .45)); animation: bob 3.2s ease-in-out infinite; }
.sticker--1 { top: 10px; left: 10px; transform: rotate(-14deg); }
.sticker--2 { top: 14px; right: 12px; animation-delay: .6s; }
.sticker--3 { bottom: 70px; left: 6px; animation-delay: 1.2s; font-size: 1.8rem; }
.sticker--4 { bottom: 18px; right: 10px; animation-delay: 1.8s; }
.sticker--5 { top: 46%; right: 4px; animation-delay: .9s; font-size: 1.6rem; }
@keyframes bob { 0%, 100% { translate: 0 0; rotate: -6deg; } 50% { translate: 0 -8px; rotate: 6deg; } }

.hero__kicker {
    position: relative; display: inline-block; margin-bottom: 14px;
    background: var(--yellow); color: var(--ink); border: var(--line); border-radius: 999px;
    padding: 4px 14px; font-weight: 800; font-size: .9rem; transform: rotate(-3deg);
}
.hero__title {
    position: relative; font-size: 2.15rem; font-weight: 900; line-height: 1.05; margin-bottom: 14px;
    text-shadow: 3px 3px 0 var(--ink), -1px -1px 0 var(--ink), 1px -1px 0 var(--ink), -1px 1px 0 var(--ink);
}
.hl { color: var(--yellow); display: inline-block; transform: rotate(-2deg); }
.hero__lead { position: relative; font-size: 1.08rem; max-width: 30em; margin: 0 auto 20px; }
.hero__cta { position: relative; display: flex; flex-direction: column; gap: 12px; align-items: stretch; max-width: 360px; margin: 0 auto; }
.hero__safe { position: relative; font-size: .85rem; margin-top: 16px; opacity: .95; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.step {
    position: relative; border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 18px 18px 16px 18px; background: #fff;
}
.step:nth-child(odd) { transform: rotate(-.8deg); }
.step:nth-child(even) { transform: rotate(.8deg); }
.step--pink { background: #ffd6e8; }
.step--blue { background: #d4f3ff; }
.step--green { background: #d4fbe3; }
.step--yellow { background: #fff1b8; }
.step__num {
    position: absolute; top: -14px; left: -10px; width: 36px; height: 36px;
    display: grid; place-items: center; font-weight: 900;
    background: var(--ink); color: #fff; border-radius: 50%; border: 3px solid #fff;
}
.step__icon { font-size: 2rem; display: block; margin-bottom: 4px; }
.step h3 { margin-bottom: .25em; }
.step p { margin: 0; color: var(--ink-soft); }

.platforms { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.platform-pill { border: var(--line); border-radius: 999px; padding: 6px 14px; font-weight: 800; box-shadow: 3px 3px 0 var(--ink); background: #fff; }
.platform-pill--tiktok { background: #e9fffd; }
.platform-pill--youtube { background: #ffe6e6; }
.platform-pill--instagram { background: #ffe8f6; }

.reward-banner {
    display: flex; gap: 16px; align-items: center;
    background: var(--ink); color: #fff; border: var(--line); border-radius: var(--radius);
    box-shadow: 5px 5px 0 var(--yellow-dark); padding: 20px;
}
.reward-banner h2 { color: var(--yellow); }
.reward-banner__icon { font-size: 3rem; flex: none; animation: bob 2.6s ease-in-out infinite; }

.leaderboard { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.leaderboard__row {
    display: flex; align-items: center; gap: 12px;
    background: #fff; border: var(--line); border-radius: var(--radius-sm); padding: 8px 12px;
}
.leaderboard__row.is-podium { background: #fff6cf; box-shadow: 3px 3px 0 var(--ink); }
.leaderboard__rank { width: 32px; text-align: center; font-weight: 900; font-size: 1.2rem; flex: none; }
.leaderboard__name { flex: 1; min-width: 0; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leaderboard__name small { display: block; font-weight: 600; color: var(--muted); }
.leaderboard__views { font-weight: 900; white-space: nowrap; }

/* ---------- Règles, FAQ, pages texte ---------- */

.rules { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 14px; }
.rule { display: flex; gap: 14px; background: #fff; border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.rule__icon {
    flex: none; width: 50px; height: 50px; display: grid; place-items: center; font-size: 1.6rem;
    background: var(--yellow); border: var(--line); border-radius: 14px; transform: rotate(-5deg);
}
.rule h2 { font-size: 1.1rem; margin-bottom: .3em; }
.rule p { color: var(--ink-soft); }

.faq { display: grid; gap: 12px; margin-bottom: 20px; }
.faq__item { background: #fff; border: var(--line); border-radius: var(--radius-sm); box-shadow: 3px 3px 0 var(--ink); }
.faq__item summary {
    cursor: pointer; list-style: none; padding: 14px 44px 14px 16px; font-weight: 800; position: relative;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
    content: "+"; position: absolute; right: 14px; top: 50%; translate: 0 -50%;
    width: 26px; height: 26px; display: grid; place-items: center;
    background: var(--yellow); border: 2px solid var(--ink); border-radius: 8px; font-weight: 900;
}
.faq__item[open] summary::after { content: "–"; background: var(--pink); color: #fff; }
.faq__item p { padding: 0 16px 16px; color: var(--ink-soft); }

.prose h2 { font-size: 1.15rem; margin-top: 1.3em; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .45em; }

.error-page { max-width: 520px; margin: 30px auto; }
.error-page__emoji { font-size: 4rem; margin-bottom: 0; }

.checklist { padding-left: 1.2em; }

/* ---------- Espace joueur ---------- */

.profile { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.avatar { width: 48px; height: 48px; border-radius: 50%; border: var(--line); background: #e9e1ff; object-fit: cover; flex: none; }
.avatar--lg { width: 72px; height: 72px; }
.avatar--placeholder { display: grid; place-items: center; font-size: 2rem; }
.profile__who { flex: 1 1 160px; min-width: 0; }
.profile__name { font-size: 1.5rem; margin: 0; overflow-wrap: anywhere; }
.profile__username { margin: 0; color: var(--muted); font-weight: 600; }
.profile__logout { margin-left: auto; }

.card--code { background: linear-gradient(160deg, #fff 0%, #f4edff 100%); text-align: center; }
.code-tiles { display: flex; justify-content: center; gap: 6px; margin: 6px 0 14px; }
.code-tiles__tile {
    width: 44px; height: 54px; display: grid; place-items: center;
    font-family: var(--mono); font-size: 1.7rem; font-weight: 900;
    background: var(--yellow); border: var(--line); border-radius: 10px; box-shadow: 3px 3px 0 var(--ink);
}
.code-tiles__tile:nth-child(even) { background: var(--blue); transform: translateY(3px) rotate(2deg); }
.code-tiles__tile:nth-child(odd) { transform: rotate(-2deg); }
.code-help { font-weight: 700; }

.copybox {
    display: flex; flex-direction: column; gap: 10px; align-items: stretch;
    background: #fff; border: var(--line); border-radius: var(--radius-sm); padding: 10px; margin-bottom: 12px;
}
.copybox__text { font-size: 1.15rem; font-weight: 800; border: 0; background: none; padding: 6px 0; white-space: normal; overflow-wrap: anywhere; }
.copybox__btn.is-copied { background: var(--green); }

.mini-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.mini-steps li { display: flex; gap: 12px; align-items: flex-start; }
.mini-steps__icon {
    flex: none; width: 40px; height: 40px; display: grid; place-items: center; font-size: 1.3rem;
    background: #f1eaff; border: 2px solid var(--ink); border-radius: 12px;
}

.card--submit { background: #ecfff4; }
.submit-form label { display: block; margin-bottom: 6px; }
.submit-form__row { display: flex; flex-direction: column; gap: 10px; }
.hint { font-size: .88rem; color: var(--ink-soft); margin-top: 10px; }

.reward-card { background: #fffaf0; }
.reward-state {
    display: inline-block; font-weight: 900; font-size: 1.1rem;
    border: var(--line); border-radius: 999px; padding: 6px 16px; margin-bottom: 10px;
}
.reward-state--waiting { background: #f1eaff; }
.reward-state--won { background: var(--yellow); animation: pop 1.6s ease-in-out infinite; }
.reward-state--received { background: var(--green); }
@keyframes pop { 0%, 100% { transform: scale(1) rotate(-1deg); } 50% { transform: scale(1.04) rotate(1deg); } }

.empty-emoji { font-size: 3rem; margin-bottom: 4px; }

.videos { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.video-card {
    display: flex; gap: 12px; background: #fff;
    border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px;
}
.video-card__thumb {
    position: relative; flex: none; width: 92px; height: 124px;
    border: var(--line); border-radius: 12px; overflow: hidden; background: #efe8ff;
    display: grid; place-items: center; text-decoration: none;
}
.video-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-card__noimg { font-size: 2rem; }
.video-card__thumb .platform-badge { position: absolute; left: 4px; bottom: 4px; }
.video-card__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.video-card__link { font-size: .9rem; overflow-wrap: anywhere; }
.video-card__views { margin: 0; font-size: 1.05rem; }
.video-card__views strong { font-size: 1.25rem; }
.video-card__help, .video-card__meta { margin: 0; font-size: .82rem; color: var(--muted); }
.video-card__reason { margin: 0; font-size: .88rem; background: #ffe0e4; border: 2px solid #c0182a; border-radius: 10px; padding: 6px 10px; }
.video-card__warn { margin: 0; font-size: .85rem; background: #fff1b8; border: 2px solid var(--yellow-dark); border-radius: 10px; padding: 6px 10px; }

.progress {
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 16px; border: 2px solid var(--ink); border-radius: 999px;
    background: #efe8ff; overflow: hidden;
}
.progress::-webkit-progress-bar { background: #efe8ff; border-radius: 999px; }
.progress::-webkit-progress-value {
    border-radius: 999px;
    background: repeating-linear-gradient(-45deg, var(--pink) 0 10px, #ff7fb7 10px 20px);
}
.progress::-moz-progress-bar { border-radius: 999px; background: repeating-linear-gradient(-45deg, var(--pink) 0 10px, #ff7fb7 10px 20px); }
.progress--done::-webkit-progress-value { background: var(--green); }
.progress--done::-moz-progress-bar { background: var(--green); }

.platform-badge {
    display: inline-block; font-size: .7rem; font-weight: 800; line-height: 1;
    padding: 4px 7px; border: 2px solid var(--ink); border-radius: 8px; background: #fff; white-space: nowrap;
}
.platform-badge--tiktok { background: #111; color: #5ff6ee; }
.platform-badge--youtube { background: #ff2a2a; color: #fff; }
.platform-badge--instagram { background: linear-gradient(45deg, #f9a03f, #e1306c, #833ab4); color: #fff; }

.status {
    align-self: flex-start; display: inline-flex; align-items: center; gap: 4px;
    font-size: .82rem; font-weight: 800; padding: 3px 10px;
    border: 2px solid var(--ink); border-radius: 999px; background: #fff; white-space: nowrap;
}
.status--small { font-size: .75rem; padding: 2px 8px; }
.status--tracked { background: #d4f3ff; }
.status--pending_review { background: var(--yellow); }
.status--approved { background: var(--green); }
.status--rejected { background: #ffc2ca; }
.status--hashtag_removed { background: #e5e1ec; }

.danger-zone { border-style: dashed; box-shadow: none; }

/* ---------- Administration ---------- */

.admin-head { margin-bottom: 18px; }
.admin-head__role { font-weight: 800; color: var(--ink-soft); margin-bottom: 8px; }
.admin-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.admin-tabs__tab {
    flex: none; text-decoration: none; color: var(--ink); background: #fff;
    border: var(--line); border-radius: 12px; padding: 8px 14px; font-weight: 800; font-size: .9rem;
}
.admin-tabs__tab.is-active { background: var(--ink); color: #fff; }

.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 22px; }
.kpi {
    display: flex; flex-direction: column; padding: 12px 14px; text-decoration: none; color: var(--ink);
    border: var(--line); border-radius: var(--radius-sm); box-shadow: 3px 3px 0 var(--ink); background: #fff;
}
.kpi__value { font-size: 1.6rem; font-weight: 900; line-height: 1.1; }
.kpi__label { font-size: .8rem; font-weight: 700; color: var(--ink-soft); }
.kpi--purple { background: #e9e1ff; }
.kpi--blue { background: #d4f3ff; }
.kpi--yellow { background: #fff1b8; }
.kpi--green { background: #d4fbe3; }
.kpi--pink { background: #ffd6e8; }
.kpi--red { background: #ffc2ca; }

.review-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.review-item__link {
    display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink);
    background: #fff; border: var(--line); border-radius: var(--radius-sm); box-shadow: 3px 3px 0 var(--ink); padding: 10px;
}
.review-item__link:hover { color: var(--ink); background: #fffbea; }
.review-item__thumb {
    flex: none; width: 56px; height: 74px; border: 2px solid var(--ink); border-radius: 10px;
    overflow: hidden; display: grid; place-items: center; background: #efe8ff;
}
.review-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.review-item__body { flex: 1; min-width: 0; font-weight: 600; }
.review-item__meta { display: block; font-size: .85rem; margin-top: 4px; }
.review-item__cta { font-size: 1.5rem; font-weight: 900; }

.backlink { text-decoration: none; }
.review-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.review-head h1 { margin: 0; }

.review-grid { display: grid; gap: 18px; }
.review-grid__main, .review-grid__side { min-width: 0; }

.embed {
    position: relative; width: 100%; aspect-ratio: 16 / 9; margin-bottom: 12px;
    border: var(--line); border-radius: var(--radius); overflow: hidden; background: #111; box-shadow: var(--shadow);
}
.embed--vertical { aspect-ratio: 9 / 16; max-width: 340px; margin-left: auto; margin-right: auto; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.facts div { background: #f8f5ff; border: 2px solid #e2d8ff; border-radius: 10px; padding: 8px 10px; min-width: 0; }
.facts dt { font-size: .75rem; font-weight: 700; color: var(--muted); }
.facts dd { margin: 0; font-weight: 800; overflow-wrap: anywhere; }
.facts--compact { grid-template-columns: 1fr; margin: 12px 0; }

.player-mini { display: flex; align-items: center; gap: 12px; }

.flags { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.flag { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; border: 2px solid var(--ink); font-size: .9rem; }
.flag--warning { background: #fff1b8; }
.flag--info { background: #e2f6ff; }
.flag--ok { background: #d4fbe3; margin: 0; }

.decision-box form + form { margin-top: 14px; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: .9rem; }
.timeline li { border-left: 4px solid var(--purple); padding-left: 10px; }
.plain-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .9rem; }

.history summary { cursor: pointer; font-weight: 700; margin-top: 12px; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 2px solid #eee6ff; }
.table th { background: #f4efff; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.table tbody tr:hover { background: #fffbea; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kv { display: block; }

.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filters__field { display: flex; flex-direction: column; gap: 4px; min-width: 140px; flex: 1 1 140px; }
.filters__field--grow { flex: 3 1 220px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { text-decoration: none; color: var(--ink); background: #fff; border: 2px solid var(--ink); border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: .88rem; }
.chip.is-active { background: var(--ink); color: #fff; }

.tag { display: inline-block; font-size: .8rem; font-weight: 800; padding: 2px 8px; border: 2px solid var(--ink); border-radius: 8px; white-space: nowrap; }
.tag--muted { background: #eee; }
.tag--green { background: var(--green); }
.tag--blue { background: #d4f3ff; }
.tag--red { background: #ffc2ca; }
.tag--yellow { background: #fff1b8; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.pagination__info { font-weight: 700; font-size: .9rem; }

/* Graphique des vues (SVG généré côté serveur) */
.chart { width: 100%; height: auto; display: block; }
.chart-axis { stroke: var(--ink); stroke-width: 2; }
.chart-threshold { stroke: var(--red); stroke-width: 2; stroke-dasharray: 6 5; }
.chart-label { fill: var(--muted); font-size: 12px; font-weight: 700; font-family: var(--font); }
.chart-area { fill: rgba(123, 63, 228, .14); }
.chart-line { fill: none; stroke: var(--purple); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.chart-dot { fill: #fff; stroke: var(--purple); stroke-width: 2.5; }

/* Une grille ne doit jamais s'élargir à cause d'un texte long (pseudo, lien…) */
.steps, .leaderboard, .rules, .faq, .mini-steps, .videos, .review-list,
.review-grid, .flags, .timeline, .plain-list {
    grid-template-columns: minmax(0, 1fr);
}

/* ---------- Pied de page ---------- */

.footer { border-top: var(--line); background: #fff; padding: 22px 0; margin-top: 30px; text-align: center; }
.footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-bottom: 10px; }
.footer__note { font-size: .8rem; color: var(--muted); max-width: 40em; margin: 0 auto; }

/* =====================================================================
   Écrans plus larges
   ===================================================================== */

@media (min-width: 600px) {
    h1 { font-size: 2.1rem; }
    .hero { padding: 48px 32px 36px; }
    .hero__title { font-size: 3rem; }
    .hero__cta { flex-direction: row; justify-content: center; max-width: none; }
    .sticker { font-size: 3rem; }
    .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .submit-form__row { flex-direction: row; }
    .submit-form__row input { flex: 1; }
    .copybox { flex-direction: row; align-items: center; justify-content: space-between; padding: 8px 8px 8px 16px; }
    .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .facts--compact { grid-template-columns: minmax(0, 1fr); }
    .video-card__thumb { width: 108px; height: 144px; }
    .code-tiles__tile { width: 54px; height: 64px; font-size: 2rem; }
}

@media (min-width: 900px) {
    body { padding-bottom: 0; }
    .topbar__inner { min-height: 70px; }
    /* La barre d'onglets remonte dans l'en-tête */
    .mainnav {
        position: static; background: none; border: 0; padding: 0;
        gap: 4px; justify-content: flex-end;
    }
    .mainnav__link { flex: none; flex-direction: row; gap: 6px; padding: 8px 12px; color: #fff; font-size: .95rem; }
    .mainnav__icon { font-size: 1.05rem; }
    .mainnav__link:hover { color: #fff; background: rgba(255, 255, 255, .15); }
    .mainnav__link.is-active { background: var(--yellow); color: var(--ink); }
    .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .review-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
    .videos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
