:root {
    --bg: #f5eedf;          /* Blanc cassé, teinte principale du site */
    --surface: #fbf8f1;
    --text: #2b2620;
    --muted: #756a5b;
    --border: #e2d8c3;
    --accent: #a8401f;
    --accent-dark: #8a3117;
    --success-bg: #e6f6ec;
    --success-text: #1d6b3a;
    --error-bg: #fdecea;
    --error-text: #a12a1c;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

a { color: var(--accent); }

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    /* Encoche et barre d'état en mode application installée (PWA) */
    padding: calc(.9rem + env(safe-area-inset-top, 0px)) calc(1rem + env(safe-area-inset-right, 0px)) .9rem calc(1rem + env(safe-area-inset-left, 0px));
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.site-header nav { display: flex; align-items: center; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.25rem; color: var(--text); text-decoration: none; }
.brand-logo { flex: none; width: 2.25rem; height: 2.25rem; border-radius: 9px; }

.container { max-width: 960px; margin: 0 auto; padding: 2rem 1rem calc(2rem + env(safe-area-inset-bottom, 0px)); }

@media (max-width: 480px) {
    .container { padding-top: 1rem; }
    .card { padding: 1.25rem; border-radius: 8px; }
}

.card {
    max-width: 420px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
}
.card h1 { margin-top: 0; font-size: 1.5rem; }

label { display: block; margin: 1rem 0 .3rem; font-weight: 600; }
input[type=email], input[type=password], input[type=text], input[type=search] {
    width: 100%;
    padding: .65rem .75rem;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
}
/* Sans le style "en creux" du navigateur pour les champs de recherche */
input[type=search] { -webkit-appearance: none; appearance: none; box-sizing: border-box; background: var(--surface); color: var(--text); }
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Bouton "œil" pour afficher / masquer le mot de passe (ajouté par app.js) */
.password-field { position: relative; display: block; }
.password-field input { padding-right: 3rem; }
.password-field .password-toggle {
    position: absolute; top: 50%; right: .3rem; transform: translateY(-50%);
    display: grid; place-items: center; width: 2.4rem; height: 2.4rem;
    margin: 0; padding: 0; color: var(--muted); background: transparent; border-radius: 6px;
}
.password-field .password-toggle:hover, .password-field .password-toggle[aria-pressed="true"] { color: var(--accent); background: transparent; }
.password-field .password-toggle:focus-visible { outline: 2px solid var(--accent); }
.password-toggle svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

button, .button {
    display: inline-block;
    margin-top: 1.25rem;
    padding: .65rem 1.2rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: var(--accent);
    border: 0;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
}
.card button { width: 100%; }
button:hover, .button:hover { background: var(--accent-dark); }
.button-secondary { color: var(--accent); background: transparent; border: 2px solid var(--accent); }
.button-secondary:hover { color: #fff; }
.site-header .button { margin-top: 0; padding: .45rem .9rem; }

/* Connexion avec Google */
.separator { display: flex; align-items: center; gap: .75rem; margin: 1.25rem 0 0; color: var(--muted); font-size: .9rem; }
.separator::before, .separator::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.button-google {
    display: flex; align-items: center; justify-content: center; gap: .6rem;
    width: 100%; box-sizing: border-box;
    color: var(--text); background: #fff; border: 1px solid var(--border);
}
.button-google:hover { background: var(--bg); }
.button-google svg { width: 18px; height: 18px; flex: none; }

button.link {
    margin: 0; padding: 0; width: auto;
    background: none; color: var(--accent);
    font-weight: normal; text-decoration: underline;
}
form.inline { display: inline; }

.alert { max-width: 420px; margin: 0 auto 1rem; padding: .75rem 1rem; border-radius: 6px; }
.alert ul { margin: 0; padding-left: 1.2rem; }
.alert-success { background: var(--success-bg); color: var(--success-text); }
.alert-error { background: var(--error-bg); color: var(--error-text); }

.muted { color: var(--muted); font-weight: normal; }
.right { text-align: right; margin: .5rem 0 0; }
.step { margin: 0 0 .25rem; color: var(--accent); font-weight: 700; font-size: .85rem; text-transform: uppercase; }

dl { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1rem; }
dt { color: var(--muted); }
dd { margin: 0; }

.hero { text-align: center; padding: 3rem 0; }
.hero h1 { font-size: 2.5rem; margin: 0 0 .5rem; }

/* ---------- Trick-list ---------- */
.page-title { margin: 0 0 .25rem; }
h2 .count, .count {
    display: inline-block; min-width: 1.6em; padding: 0 .45em;
    font-size: .8rem; line-height: 1.6; text-align: center;
    color: var(--muted); background: var(--border); border-radius: 999px; vertical-align: middle;
}
.trick-level { margin-top: 1.75rem; }
.trick-level h2 { font-size: 1.15rem; margin: 0 0 .6rem; }

.trick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.trick {
    display: flex; align-items: center; gap: .75rem;
    padding: .65rem .75rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
    scroll-margin-top: 5rem;
}
.trick.landed { border-color: var(--accent); }
.trick-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.trick-name { font-weight: 600; }
.trick-alias { font-size: .85rem; }
.xp { font-weight: 700; font-size: .9rem; color: var(--accent); white-space: nowrap; }

button.toggle {
    margin: 0; width: 2.5rem; height: 2.5rem; padding: 0;
    font-size: 1.2rem; line-height: 1; border-radius: 50%;
    color: var(--accent); background: transparent; border: 2px solid var(--accent);
}
button.toggle:hover { background: var(--bg); }
button.toggle[aria-pressed="true"] { color: #fff; background: var(--accent); }

/* ---------- Profil / Mon compte ---------- */
.profile-card {
    display: flex; flex-direction: column; gap: .75rem;
    padding: 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
}

/* En-tête de profil : grande photo + badge du rang qui mord dessus, pseudo en gros, rang en petit */
.profile-head { display: flex; align-items: center; gap: 1.1rem; }
.profile-photo { position: relative; flex: none; }
.avatar.avatar-xl { width: 6.5rem; height: 6.5rem; font-size: 2.8rem; }
img.avatar.avatar-xl { object-fit: cover; }
.profile-rank { position: absolute; right: -6px; bottom: -6px; display: block; line-height: 0; border-radius: 50%; box-shadow: 0 2px 6px rgb(0 0 0 / .3); }
.profile-rank img { width: 2.75rem; height: 2.75rem; border: 3px solid #fff; border-radius: 50%; object-fit: cover; background: #2b2620; }
.profile-ident { min-width: 0; }
.profile-ident h1 { margin: 0; font-size: 1.9rem; line-height: 1.1; overflow-wrap: anywhere; }
.profile-status { margin: .3rem 0 0; font-size: .92rem; color: var(--muted); }
.profile-status strong { color: var(--accent); }
.profile-ident .location { margin: .15rem 0 0; }
.profile-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.profile-actions .progression-link { margin-top: 0; }
.profile-actions .button { margin: 0; }
.profile-foot { display: flex; align-items: center; gap: .75rem; }
.profile-foot > :first-child { margin-top: 0; margin-bottom: 0; }
.profile-share {
    display: grid; place-items: center; flex: none; width: 2.5rem; height: 2.5rem; margin: 0 0 0 auto; padding: 0;
    color: var(--accent); background: transparent; border: 2px solid var(--accent); border-radius: 50%; cursor: pointer;
}
.profile-share:hover { color: #fff; background: var(--accent); }
.profile-share .share-icon { width: 1.15rem; height: 1.15rem; margin: 0; vertical-align: 0; }
@media (max-width: 420px) {
    .avatar.avatar-xl { width: 5.25rem; height: 5.25rem; font-size: 2.3rem; }
    .profile-ident h1 { font-size: 1.5rem; }
}
.avatar {
    width: 3.5rem; height: 3.5rem; border-radius: 50%;
    display: grid; place-items: center;
    font-size: 1.5rem; font-weight: 800; color: var(--bg); background: var(--accent);
}
.rank-badge {
    display: inline-block; margin: .2rem 0 0; padding: .1rem .6rem;
    font-size: .85rem; font-weight: 700; color: var(--accent);
    border: 1px solid var(--accent); border-radius: 999px;
}
.progress-block { grid-column: 1 / -1; }
.progress { height: .6rem; background: var(--border); border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--accent); border-radius: 999px; }
.small { font-size: .85rem; margin: .4rem 0 0; }

.my-tricks { margin-top: 1.75rem; }
.my-tricks h2 { font-size: 1.15rem; }
.account-details { margin-top: 2rem; color: var(--muted); }
.account-details summary { cursor: pointer; }

/* ---------- Amis ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.search { display: flex; gap: .5rem; margin: 1rem 0; }
.search input { flex: 1; min-width: 0; padding: .65rem .75rem; font-size: 1rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.search button { margin: 0; }
.friends-section { margin-top: 1.5rem; }
.friends-links { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.friends-links .button { margin: 0; }
.friends-section h2 { font-size: 1.1rem; margin: 0 0 .6rem; }
.rider-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.rider-row {
    position: relative;
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
    padding: .6rem .75rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
    transition: border-color .15s, background .15s;
}
.rider-row:hover { border-color: var(--accent); background: var(--bg); }
.rider-link { display: flex; align-items: center; gap: .6rem; color: var(--text); text-decoration: none; font-weight: 600; min-width: 0; }
/* Toute la ligne est cliquable (le lien du rider la recouvre) ; les boutons restent au-dessus */
.rider-row .rider-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.rider-row form, .rider-row button, .rider-row .friend-actions { position: relative; z-index: 1; }
.rider-link > span:last-child { display: flex; flex-direction: column; }
.avatar-small { width: 2.25rem; height: 2.25rem; font-size: 1rem; flex-shrink: 0; }
.friend-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.small-button { margin: 0; padding: .4rem .8rem; font-size: .9rem; }
.small-button.secondary { color: var(--accent); background: transparent; border: 1px solid var(--accent); }
.small-button.secondary:hover { color: #fff; background: var(--accent); }
.small-inline { font-size: .85rem; font-weight: normal; }
.friend-badge { font-weight: 700; color: var(--success-text); }
a.friend-badge-link { display: inline-block; padding: .3rem .8rem; text-decoration: none; border: 1px solid currentColor; border-radius: 999px; }
a.friend-badge-link:hover { background: var(--bg); }
a.friend-pending { color: var(--muted); font-weight: 600; font-size: .9rem; }
a.friend-pending:hover { color: var(--accent); }
.friend-remove { margin: 0; }
.rider-row:has(.friend-remove) .xp { margin-left: auto; margin-right: .25rem; }
.friend-remove-button {
    display: grid; place-items: center; width: 2rem; height: 2rem; margin: 0; padding: 0;
    color: var(--muted); background: transparent; border: 1px solid var(--border); border-radius: 50%; cursor: pointer;
}
.friend-remove-button:hover, .friend-remove-button:focus-visible { color: #fff; background: var(--accent); border-color: var(--accent); }
.friend-remove-button svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.badge {
    display: inline-block; min-width: 1.3em; padding: 0 .35em; font-size: .75rem; line-height: 1.3;
    text-align: center; color: #fff; background: var(--accent); border-radius: 999px;
}

/* ---------- Formulaires (champs supplémentaires) ---------- */
input[type=number], input[type=url], select, textarea {
    width: 100%;
    padding: .6rem .7rem;
    font: inherit; font-size: 1rem;
    color: var(--text); background: #fff;
    border: 1px solid var(--border); border-radius: 6px;
}
textarea { resize: vertical; }
fieldset { margin: 1rem 0 0; padding: 0; border: 0; }
legend { font-weight: 600; margin-bottom: .3rem; }
.combo-select { margin-bottom: .5rem; }

/* ---------- Administration ---------- */
.admin-nav {
    display: flex; flex-wrap: wrap; gap: .25rem;
    margin: 0 0 1.5rem; padding: .3rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
}
.admin-nav a { padding: .4rem .75rem; border-radius: 6px; color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem; }
.admin-nav a:hover { background: var(--bg); }
.admin-nav a.active { color: #fff; background: var(--accent); }

.page-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; }
.page-head .button { margin: 0; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; margin: 1rem 0 2rem; }
.stat { padding: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.stat-value { display: block; font-size: 1.75rem; font-weight: 800; }
.stat-label { color: var(--muted); font-size: .9rem; }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.admin-table th, .admin-table td { padding: .55rem .75rem; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.admin-table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: var(--bg); }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover { background: var(--bg); }
.admin-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.tag {
    display: inline-block; margin-left: .3rem; padding: 0 .4rem;
    font-size: .75rem; font-weight: 700; color: var(--accent);
    border: 1px solid var(--accent); border-radius: 4px;
}

.admin-form { max-width: 640px; padding: 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.admin-form h2 { margin-top: 0; font-size: 1.1rem; }
.admin-form label:first-of-type { margin-top: .5rem; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 1rem; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin-bottom: 1rem; }

.danger-zone { max-width: 640px; margin-top: 2rem; padding: 1.25rem; border: 1px solid var(--error-text); border-radius: 10px; }
.danger-zone h2 { margin-top: 0; font-size: 1.05rem; color: var(--error-text); }
button.danger { background: var(--error-text); }
button.danger:hover { background: #7d1f14; }

/* Pagination CodeIgniter */
.pagination { display: flex; flex-wrap: wrap; gap: .3rem; list-style: none; padding: 0; margin: 1rem 0; }
.pagination li a, .pagination li span { display: block; padding: .3rem .65rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); text-decoration: none; }
.pagination li.active a { color: #fff; background: var(--accent); border-color: var(--accent); }

/* ---------- Trick-list en AJAX ---------- */
.xp-summary {
    position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
    display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1rem;
    margin: .75rem 0 0; padding: .6rem .9rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
}
.xp-summary strong { font-size: 1.25rem; }
.xp-summary .rank-badge { margin: 0; }

/* Rang sur le profil : icône (dragon, fond sombre) + nom */
.rank-display { display: flex; align-items: center; gap: .6rem; margin: .35rem 0 0; }
.rank-display .rank-badge { margin: 0; }
.rank-icon { width: 3.25rem; height: 3.25rem; flex-shrink: 0; border-radius: 10px; box-shadow: 0 2px 8px rgb(43 38 32 / .25); }
.xp-summary a { margin: 0 0 0 auto; }
.rank-up { animation: rank-up .8s ease; }
@keyframes rank-up { 0% { transform: scale(1); } 40% { transform: scale(1.25); background: var(--accent); color: #fff; } 100% { transform: scale(1); } }
button.toggle:disabled { opacity: .6; cursor: progress; }

/* Layer de message : même style que la fenêtre de confirmation, au centre, sans bloquer la page */
.toast {
    position: fixed; left: 50%; top: 50%; z-index: 60;
    display: flex; align-items: center; gap: .75rem;
    width: max-content; max-width: min(calc(100% - 2rem), 380px); padding: 1rem 1.25rem;
    color: var(--text); background: var(--surface); border-radius: 16px; box-shadow: 0 20px 50px rgb(0 0 0 / .3);
    font-weight: 600; line-height: 1.35; pointer-events: none;
    transform: translate(-50%, -50%); opacity: 0; visibility: hidden;
    /* Disparition : simple fondu */
    transition: opacity .5s ease, visibility 0s linear .5s;
}
.toast.visible { opacity: 1; visibility: visible; transition: none; animation: toast-in .25s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -50%) translateY(12px) scale(.95); } }
.toast-icon {
    flex: none; display: grid; place-items: center; width: 2rem; height: 2rem;
    color: #fff; background: #2f855a; border-radius: 50%; font-weight: 800;
}
.toast.is-error .toast-icon { background: #c0392b; }
@media (prefers-reduced-motion: reduce) {
    .toast, .rank-up { transition: none; animation: none; }
}
.role-button { margin-left: .4rem; padding: .15rem .5rem; font-size: .8rem; }

/* ---------- Combos ---------- */
.combo-builder { max-width: none; margin-top: 1rem; }
.combo-builder .combo-select { max-width: 420px; }
.combo-preview { margin: .75rem 0 0; padding: .6rem .75rem; background: var(--bg); border-radius: 6px; overflow-wrap: anywhere; }

/* ---------- En-tête : bouton compte ---------- */
.account-chip {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .2rem .65rem .2rem .2rem;
    color: var(--text); text-decoration: none; font-weight: 600;
    background: var(--bg); border: 1px solid var(--border); border-radius: 999px;
}
.account-chip:hover { border-color: var(--accent); }
.avatar-tiny { width: 1.9rem; height: 1.9rem; font-size: .9rem; }

/* ---------- Espace "Mon compte" : menu ---------- */
.account-shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.account-menu {
    position: sticky; top: calc(1rem + env(safe-area-inset-top, 0px));
    padding: .75rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
}
.account-menu-head { display: flex; align-items: center; gap: .6rem; padding: .35rem .5rem .8rem; border-bottom: 1px solid var(--border); margin-bottom: .5rem; }
.account-menu-name { font-weight: 700; overflow-wrap: anywhere; }
.menu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; }
.menu-footer { margin-top: .5rem; padding-top: .5rem; border-top: 1px solid var(--border); }
.menu-list form { margin: 0; }
/* Sous-entrées ("Demandes reçues / envoyées" sous "Mes amis") : en retrait, reliées par un trait */
.menu-sub { margin-left: 1.15rem; padding-left: .6rem; border-left: 2px solid var(--border); }
.menu-sub .menu-item { padding-top: .45rem; padding-bottom: .45rem; font-size: .88rem; font-weight: 500; }
.menu-sub .menu-item svg:first-child { width: 1rem; height: 1rem; }
.menu-item {
    display: flex; align-items: center; gap: .7rem; width: 100%;
    margin: 0; padding: .65rem .6rem;
    font: inherit; font-weight: 600; font-size: .95rem; text-align: left;
    color: var(--text); background: transparent; border: 0; border-radius: 8px;
    text-decoration: none; cursor: pointer;
}
.menu-item:hover { background: var(--bg); color: var(--text); }
.menu-item.active { color: var(--accent); background: var(--bg); }
.menu-item > span:not(.badge) { flex: 1; }
.menu-item svg { width: 1.25rem; height: 1.25rem; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.menu-item .chevron { width: 1rem; height: 1rem; color: var(--muted); display: none; }
.menu-item-static { cursor: default; color: var(--success-text); }
.menu-item-static:hover { background: transparent; color: var(--success-text); }
.menu-logout { color: var(--error-text); }
.menu-logout:hover { color: var(--error-text); background: var(--error-bg); }
.back-link { display: none; margin-bottom: .75rem; font-weight: 600; text-decoration: none; }
.account-content > .profile-card:first-child, .account-content .page-title:first-child { margin-top: 0; }

.profile-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin: 1rem 0; }
.profile-stats .stat { color: var(--text); text-decoration: none; }
.profile-stats .stat-value { font-size: 1.3rem; overflow-wrap: anywhere; }
a.stat:hover { border-color: var(--accent); }

/* ---------- Installation de l'app ---------- */
.install-button { margin-top: .5rem; }
.install-dialog {
    width: min(92vw, 380px); padding: 1.5rem;
    color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
}
.install-dialog::backdrop { background: rgb(43 38 32 / .45); }
.install-dialog h2 { margin-top: 0; font-size: 1.2rem; }
.install-dialog ol { padding-left: 1.2rem; }
.install-dialog li { margin-bottom: .5rem; }
.install-dialog button { width: 100%; }

/* ---------- Navigation basse (mobile) ---------- */
.tab-bar { display: none; }

@media (max-width: 767px) {
    /* L'en-tête ne garde que le logo, le bouton du compte (photo + rang) ou Connexion / Inscription pour les visiteurs */
    .site-header nav > a:not(.button):not([href$="/login"]):not(.account-chip) { display: none; }
    .account-chip { gap: .3rem; padding: .2rem .25rem .2rem .2rem; }
    .account-chip-name { display: none; }

    .has-tab-bar { padding-bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px)); }
    .tab-bar {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
        display: grid; grid-template-columns: repeat(5, 1fr);
        padding: .35rem env(safe-area-inset-right, 0px) calc(.35rem + env(safe-area-inset-bottom, 0px)) env(safe-area-inset-left, 0px);
        background: var(--surface); border-top: 1px solid var(--border);
        box-shadow: 0 -2px 12px rgb(43 38 32 / .06);
    }
    .tab {
        display: flex; flex-direction: column; align-items: center; gap: .15rem;
        padding: .3rem 0; color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 600;
    }
    .tab.active { color: var(--accent); }
    .tab-icon { position: relative; display: block; }
    .tab-icon svg { width: 1.5rem; height: 1.5rem; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .tab.active .tab-icon svg { stroke-width: 2.3; }
    .tab-badge { position: absolute; top: -.35rem; right: -.7rem; }

    /* Compte : le menu devient la page d'accueil du compte, les sous-pages ont un retour */
    .account-shell { display: block; }
    .account-menu { position: static; width: 100%; margin-top: 1rem; padding: .4rem; }
    .account-menu-head { display: none; }
    .account-shell:not(.is-hub) .account-menu { display: none; }
    .account-shell.is-hub .account-content { margin-bottom: 0; }
    .account-shell.is-hub { display: flex; flex-direction: column-reverse; align-items: stretch; }
    .account-shell:not(.is-hub) .back-link { display: inline-block; }
    .menu-item { padding: .85rem .6rem; font-size: 1rem; }
    .menu-item .chevron { display: block; }
    .menu-list li + li .menu-item { border-top: 1px solid var(--bg); }
}

/* ---------- Trick-list en blocs ---------- */
.block-nav {
    display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none;
    margin: 1rem -1rem 0; padding: 0 1rem .25rem;
}
.block-nav::-webkit-scrollbar { display: none; }
.chip {
    flex-shrink: 0; padding: .35rem .8rem;
    font-size: .85rem; font-weight: 600; color: var(--text); text-decoration: none; white-space: nowrap;
    background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip-combo { color: var(--accent); border-color: var(--accent); }

.trick-block {
    margin-top: 1rem; padding: 0 .75rem .75rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
    scroll-margin-top: calc(4.5rem + env(safe-area-inset-top, 0px));
}
.trick-block > summary {
    display: flex; align-items: center; justify-content: space-between; gap: .75rem;
    padding: .85rem .1rem; cursor: pointer; list-style: none;
}
.trick-block > summary::-webkit-details-marker { display: none; }
.trick-block > summary::after {
    content: ""; width: .55rem; height: .55rem; margin-left: .25rem;
    border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
    transform: rotate(45deg); transition: transform .2s ease;
}
.trick-block:not([open]) > summary::after { transform: rotate(-45deg); }
.trick-block:not([open]) { padding-bottom: 0; }
.block-title { flex: 1; font-size: 1.1rem; font-weight: 800; }
.block-progress { font-size: .85rem; font-weight: 700; color: var(--accent); }
.trick-block .trick { background: var(--bg); }
.combo-block { border-color: var(--accent); }
.combo-block .block-title::before { content: "⚡ "; }
.create-combo { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1rem; margin-top: 1.5rem; color: var(--muted); }
.create-combo .button { margin: 0; }

/* Barre de progression sous le nom de chaque bloc */
.block-head {
    flex: 1; min-width: 0;
    display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .4rem .75rem;
}
.block-bar { grid-column: 1 / -1; display: block; height: .45rem; }
.block-bar .progress-bar { display: block; transition: width .3s ease; }
.combo-block .block-bar .progress-bar { background: var(--accent-dark); }
@media (prefers-reduced-motion: reduce) { .block-bar .progress-bar { transition: none; } }

/* ---------- Over-head ---------- */
.tag-overhead { margin-left: 0; color: #1d5f8a; border-color: #1d5f8a; white-space: nowrap; }
.tag-double-overhead { color: #fff; background: #1d5f8a; }
.tag-triple-overhead { color: #fff; background: linear-gradient(135deg, #1d5f8a, #6b3fa0); border-color: #6b3fa0; }
.tag-calage { margin-left: 0; color: #2f6b4f; border-color: #2f6b4f; white-space: nowrap; }
.tag-rotation { margin-left: 0; color: #6b3fa0; border-color: #6b3fa0; white-space: nowrap; }
.trick-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin: .15rem 0 .1rem; }
.combo-preview .tag-overhead { margin-left: .3rem; }
.combo-preview .tag[hidden] { display: none; }
label.checkbox { display: flex; align-items: flex-start; gap: .6rem; margin-top: 1rem; font-weight: normal; cursor: pointer; }
label.checkbox input { width: 1.15rem; height: 1.15rem; margin-top: .15rem; accent-color: var(--accent); flex-shrink: 0; }
label.checkbox > span { display: flex; flex-direction: column; }
/* Case qui dépend de la précédente (relances sous les e-mails) : en retrait, grisée quand elle est désactivée */
label.checkbox-sub { margin-left: 1.75rem; }
label.checkbox input:disabled, label.checkbox input:disabled + span { opacity: .5; cursor: not-allowed; }

/* ---------- Photo de profil ---------- */
img.avatar { display: block; object-fit: cover; background: var(--border); padding: 0; }
.avatar-large { width: 6rem; height: 6rem; font-size: 2.5rem; }
.avatar-link { display: block; border-radius: 50%; }
.avatar-link:hover .avatar { outline: 3px solid var(--accent); outline-offset: 2px; }
.avatar-edit { display: flex; align-items: center; flex-wrap: wrap; gap: 1.25rem; }
/* "Prendre une photo" et "Choisir une photo" toujours sur la même ligne */
.avatar-edit > div { flex: 1 1 280px; min-width: 0; }
.avatar-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.avatar-form { margin: 0; min-width: 0; }
.avatar-actions .file-button { display: block; width: 100%; box-sizing: border-box; padding: .6rem .5rem; text-align: center; white-space: nowrap; font-size: .95rem; }
.avatar-form input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.file-button { margin: 0; cursor: pointer; }
.avatar-form input[type=file]:focus-visible + noscript, .avatar-form:focus-within .file-button { outline: 2px solid var(--accent); outline-offset: 2px; }
.file-button.is-loading { opacity: .6; pointer-events: none; }
.file-button.is-loading::after { content: " …"; }
.settings-section { max-width: 640px; margin-top: 1rem; scroll-margin-top: 1rem; }
.location { margin: .25rem 0 0; }
.profile-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; }

/* ---------- Erreur sous un champ ---------- */
.field-error { margin: .35rem 0 0; font-size: .9rem; font-weight: 600; color: var(--error-text); }
.field-error::before { content: "⚠ "; }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--error-text); background: var(--error-bg); }
input[aria-invalid="true"]:focus { outline-color: var(--error-text); }

/* Admin régions */
.region-country { margin-top: 1.75rem; font-size: 1.15rem; }
.inline-edit { display: flex; gap: .4rem; margin: 0; }
.inline-edit input { padding: .35rem .5rem; font-size: .95rem; border: 1px solid var(--border); border-radius: 6px; min-width: 0; }
.small-button.danger { color: #fff; background: var(--error-text); border: 0; }
[data-region-field][hidden] { display: none; }

/* ---------- Profil public : voir tout ---------- */
.see-all { display: block; margin-top: 1rem; text-align: center; }
.back-link-visible { display: inline-block; margin-bottom: .75rem; font-weight: 600; text-decoration: none; }
.rider-head { display: flex; align-items: center; gap: .75rem; margin-bottom: .5rem; }
.rider-head .page-title { margin: 0; }
.rider-head .small { margin: .1rem 0 0; }
.block-heading { margin: 0; padding: .85rem .1rem; font-size: 1.1rem; font-weight: 800; }

/* Nombre de riders ayant validé un trick */
.trick-riders { display: inline-flex; align-items: center; gap: .25rem; margin-top: .1rem; font-size: .8rem; color: var(--muted); }
.trick-counts { display: flex; flex-wrap: wrap; column-gap: .75rem; }
.trick-riders svg { width: .95rem; height: .95rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Page d'accueil ---------- */
.hero { padding: 2.5rem 0 1.5rem; text-align: center; }
.hero-kicker { margin: 0 0 .5rem; font-size: .85rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.hero h1 { margin: 0 0 1rem; font-size: clamp(2rem, 7vw, 3.25rem); line-height: 1.1; letter-spacing: -.02em; }
.hero-lead { max-width: 38rem; margin: 0 auto; font-size: 1.1rem; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: 1.5rem; }
.hero-actions .button { margin: 0; }
.install-link { margin-top: 1rem; }
.hero-stats { display: flex; justify-content: center; flex-wrap: wrap; gap: .5rem 2rem; margin: 2rem 0 0; padding: 0; list-style: none; color: var(--muted); }
.hero-stats strong { display: block; font-size: 1.75rem; color: var(--text); }

.home-section { margin-top: 3rem; }
.home-section > h2 { font-size: 1.5rem; margin: 0 0 1rem; text-align: center; }
.home-section h3 { margin: 0 0 .35rem; font-size: 1.05rem; }
.home-section p { margin: 0; color: var(--muted); }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.steps li, .features li { padding: 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.step-number {
    display: inline-grid; place-items: center; width: 2rem; height: 2rem; margin-bottom: .6rem;
    font-weight: 800; color: #fff; background: var(--accent); border-radius: 50%;
}
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.features li { border-left: 4px solid var(--accent); }

.about-card {
    display: flex; gap: 1.25rem; align-items: flex-start;
    max-width: 44rem; margin: 0 auto; padding: 1.5rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
}
.about-card p { color: var(--text); margin: 0 0 .75rem; }
.about-avatar {
    flex-shrink: 0; display: grid; place-items: center; width: 4rem; height: 4rem;
    font-size: 1.75rem; font-weight: 800; color: var(--bg); background: var(--accent); border-radius: 50%;
}
.about-follow { margin-bottom: 0 !important; }
.youtube-link { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; }
.youtube-link svg { width: 1.3rem; height: 1.3rem; fill: #c4302b; }
#a-propos { scroll-margin-top: 1rem; }
@media (max-width: 480px) { .about-card { flex-direction: column; } }

.home-cta { margin: 3rem 0 1rem; padding: 2rem 1.25rem; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.home-cta h2 { margin: 0 0 .5rem; }
.home-cta p { margin: 0; color: var(--muted); }

/* ---------- Pied de page ---------- */
.site-footer {
    display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.5rem;
    max-width: 960px; margin: 0 auto; padding: 1.5rem 1rem 2rem;
    font-size: .9rem; color: var(--muted); border-top: 1px solid var(--border);
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }
/* Réseaux de TricksRank : une ligne de pastilles en tête du pied de page */
.footer-socials { flex-basis: 100%; display: flex; justify-content: center; gap: .6rem; margin-bottom: .25rem; }
.site-footer a.footer-social { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .8rem; color: #fff; font-weight: 600; text-decoration: none; border-radius: 999px; }
.footer-social svg { width: 1.1rem; height: 1.1rem; }
.site-footer a.footer-social.social-tiktok { background: #111; }
.site-footer a.footer-social.social-instagram { background: linear-gradient(45deg, #f9a825, #e1306c 55%, #833ab4); }
.site-footer a.footer-social:hover { color: #fff; opacity: .88; }
/* Sélecteur de langue : petit menu déroulant en bas, ouvert vers le haut */
.lang-switch { position: relative; }
.lang-switch summary { cursor: pointer; list-style: none; padding: .1rem .55rem; border: 1px solid var(--border); border-radius: 999px; white-space: nowrap; }
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary::after { content: " ▾"; font-size: .75em; }
.lang-switch[open] summary::after { content: " ▴"; }
.lang-switch ul {
    position: absolute; z-index: 20; bottom: calc(100% + .35rem); left: 50%; transform: translateX(-50%);
    min-width: 9.5rem; margin: 0; padding: .3rem 0; list-style: none;
    background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 4px 14px rgb(0 0 0 / .12);
}
.lang-switch li a { display: block; padding: .35rem .9rem; }
.lang-switch li a[aria-current] { font-weight: 700; color: var(--accent); }

/* ---------- Confirmation de l'adresse e-mail ---------- */
.verify-banner {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 1rem;
    max-width: 960px; margin: 0 auto 1rem; padding: .6rem .9rem; font-size: .9rem;
    background: #fff4e5; border: 1px solid #f3c58a; border-radius: 8px;
}
.verify-banner form { margin: 0; }
.verify-banner button.link { font-weight: 700; }
body:has(.feed-shell) .verify-banner, body:has(.parks-shell) .verify-banner { display: none; }

/* ---------- Partage et parrainage ---------- */
.share-icon { width: 1rem; height: 1rem; margin-right: .3rem; vertical-align: -.15em; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.invite-card { max-width: 640px; margin-top: 1rem; padding: 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.invite-card label { margin-top: 0; }
.invite-link { display: flex; gap: .5rem; }
.invite-link input { flex: 1; min-width: 0; font-family: ui-monospace, Consolas, monospace; font-size: .9rem; background: var(--bg); }
.invite-link .button { margin: 0; }
.invite-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.invite-actions .button, .invite-actions button { margin: 0; }

/* Ma carte : aperçu de l'image à publier, formats, partage et téléchargement */
.card-formats { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 420px; }
.share-card { margin: 0 0 1rem; text-align: center; }
.share-card img { width: auto; height: auto; max-width: 100%; max-height: 72vh; border-radius: 14px; box-shadow: 0 10px 30px rgba(43, 38, 32, .25); }
.share-card-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.share-card-actions .button { margin: 0; }
.share-card-link { margin-left: auto; margin-right: auto; }
.referral-note { margin: 0 0 .75rem; padding: .55rem .8rem; font-size: .92rem; background: #fff4e5; border: 1px solid #f3c58a; border-radius: 8px; }

/* ---------- Aide ---------- */
.help-lead { font-size: 1.05rem; }
.help-toc { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1.25rem 0 .5rem; }
.help-toc a { padding: .3rem .75rem; font-size: .88rem; font-weight: 600; color: var(--text); text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; }
.help-toc a:hover { color: var(--text); border-color: var(--accent); }
.help section { scroll-margin-top: 5rem; }
.help-table { display: grid; gap: .3rem; max-width: 420px; margin: .5rem 0 1rem; padding: 0; list-style: none; }
.help-table li { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem .75rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.help-table strong { color: var(--accent); white-space: nowrap; }
/* Rangs : icône (dragon) devant le nom */
.help-ranks li { align-items: center; padding: .45rem .75rem .45rem .45rem; }
.help-rank-name { display: inline-flex; align-items: center; gap: .65rem; font-weight: 600; }
.help-rank-icon { width: 2.6rem; height: 2.6rem; flex-shrink: 0; border-radius: 50%; object-fit: cover; box-shadow: 0 2px 6px rgb(43 38 32 / .2); }
.help details { margin: .5rem 0; padding: .55rem .9rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.help details[open] { border-color: var(--accent); }
.help summary { cursor: pointer; font-weight: 600; }
.help details p { margin: .5rem 0 .2rem; }
.help-contact { margin-top: 2.5rem; padding: 1.25rem; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.help-contact .button { margin: .5rem 0 0 .5rem; }

/* ---------- Contact ---------- */
.contact-card { max-width: 560px; }
.contact-card textarea { width: 100%; box-sizing: border-box; font: inherit; }
.contact-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Pages légales ---------- */
.legal { max-width: 720px; margin: 0 auto; line-height: 1.6; }
.legal h1 { margin-bottom: .25rem; }
.legal h2 { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.legal h3 { margin: 1.5rem 0 .25rem; font-size: 1.05rem; }
.legal ul { padding-left: 1.2rem; }

/* ---------- Classements ---------- */
.my-rankings { margin-top: 1rem; }
/* Petits pavés sous le profil (Ma progression, Mon matos) : titre et bouton en face */
.mini-card { margin-top: .75rem; padding: .9rem 1.25rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.mini-card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .6rem; }
.mini-card-head h2 { margin: 0; font-size: 1.05rem; }
.mini-card-head .button { margin: 0; }
.mini-card p { margin: .45rem 0 0; }
.mini-card .gear-summary, .mini-card .rider-parks { margin: 0; }
/* Jauge temporaire : XP en attente de validation, à la suite de la barre */
.mini-card .progress { display: flex; }
.progress-pending {
    height: 100%; border-radius: 0 999px 999px 0;
    background: repeating-linear-gradient(45deg, rgb(168 64 31 / .35) 0 5px, rgb(168 64 31 / .15) 5px 10px);
}
.pending-note { display: flex; align-items: flex-start; gap: .45rem; color: var(--muted); }
.pending-swatch { flex: none; width: .9rem; height: .9rem; margin-top: .15rem; border-radius: 3px; background: repeating-linear-gradient(45deg, rgb(168 64 31 / .45) 0 3px, rgb(168 64 31 / .15) 3px 6px); }
.trick-validation { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .2rem; }
.trick-validated { font-size: .78rem; font-weight: 700; color: #2f855a; }
.trick-pending { font-size: .78rem; color: var(--muted); }
/* Ma trick-list : trick en attente de validation (vidéo ou 3 potes) */
.trick.landed.is-pending { border: 2px dashed #d69e2e; background: #fffaf0; }
.trick.landed.is-pending .trick-pending { color: #b7791f; font-weight: 600; }
.trick-head.is-pending { border: 2px dashed #d69e2e; background: #fffaf0; }
.pending-reminder { margin: -1rem 0 1.5rem; padding: .7rem 1rem; font-size: .9rem; color: #7b5412; background: #fffaf0; border: 1px solid #f0d9a8; border-radius: 10px; }
.pending-reminder a { color: inherit; font-weight: 700; }
.confirm-chip {
    position: relative; z-index: 1; margin: 0; padding: .2rem .6rem; font-size: .78rem; font-weight: 700;
    color: var(--accent); background: transparent; border: 1px solid var(--accent); border-radius: 999px; cursor: pointer;
}
.confirm-chip:hover { color: #fff; background: var(--accent); }
.confirm-chip.is-mine { color: #2f855a; border-color: #2f855a; }
.confirm-chip.is-mine:hover { color: #fff; background: #2f855a; }
.account-info dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .35rem 1rem; margin: 0; font-size: .92rem; }
.account-info dt { color: var(--muted); }
.account-info dd { margin: 0; overflow-wrap: anywhere; }

/* "Voir mon profil public" en carte-lien */
.public-profile-link {
    display: flex; align-items: center; gap: .85rem; margin-top: 1.25rem; padding: .85rem 1.1rem;
    color: var(--text); text-decoration: none; background: var(--surface);
    border: 2px solid var(--accent); border-radius: 12px; transition: background .15s;
}
.public-profile-link:hover { background: #fff6ee; }
.public-profile-link > svg { flex: none; width: 1.6rem; height: 1.6rem; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linejoin: round; }
.public-profile-link > span:not(.public-profile-arrow) { display: flex; flex-direction: column; min-width: 0; }
.public-profile-link strong { color: var(--accent); }
.public-profile-arrow { margin-left: auto; font-size: 1.3rem; font-weight: 800; color: var(--accent); transition: transform .15s; }
.public-profile-link:hover .public-profile-arrow { transform: translateX(3px); }
.my-rankings h2 { font-size: 1.1rem; margin: 0 0 .6rem; }
.rank-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
.rank-cell {
    display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .75rem .4rem;
    color: var(--text); text-decoration: none; text-align: center;
    background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
}
.rank-cell:hover { border-color: var(--accent); color: var(--text); }
.rank-cell-position { font-size: 1.5rem; font-weight: 800; color: var(--accent); }
.rank-cell-scope { font-size: .85rem; font-weight: 700; overflow-wrap: anywhere; }
.rank-cell-total { font-size: .75rem; color: var(--muted); }
@media (max-width: 420px) { .rank-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Fiche d'un rider : région, pays, monde (cases non cliquables) */
.rank-grid.rank-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
div.rank-cell:hover { border-color: var(--border); }

.scope-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .3rem; margin: .5rem 0 1rem; padding: .3rem; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.scope-tab { display: flex; flex-direction: column; align-items: center; padding: .45rem .25rem; color: var(--text); text-decoration: none; border-radius: 7px; text-align: center; }
.scope-tab:hover { background: var(--bg); color: var(--text); }
.scope-tab.active { color: #fff; background: var(--accent); }
.scope-label { font-size: .8rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.scope-position { font-size: 1.05rem; font-weight: 800; }
.my-position { margin: 0 0 1rem; padding: .7rem .9rem; background: var(--surface); border: 1px solid var(--accent); border-radius: 8px; }

.ranking { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.ranking-row { display: flex; align-items: center; gap: .75rem; padding: .55rem .75rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.ranking-row.is-me { border-color: var(--accent); background: #fff6ee; }
.ranking-row .rider-link { flex: 1; }
.ranking-row .rider-link > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.ranking-position { flex-shrink: 0; width: 2rem; height: 2rem; display: grid; place-items: center; font-weight: 800; color: var(--muted); border-radius: 50%; }
.medal-gold { color: #6b4e00; background: #f3cf55; }
.medal-silver { color: #3c4148; background: #d5d9de; }
.medal-bronze { color: #fff; background: #b5743d; }
.ranking-gap { text-align: center; color: var(--muted); }

/* ---------- Mon compte sur mobile : uniquement le menu ---------- */
a.account-menu-head { color: var(--text); text-decoration: none; }
a.account-menu-head > span:last-child { display: flex; flex-direction: column; min-width: 0; }
@media (max-width: 767px) {
    .account-shell.is-hub .account-content { display: none; }
    .account-shell.is-hub .account-menu { margin-top: 0; }
    .account-shell.is-hub .account-menu-head { display: flex; padding: .6rem .6rem .9rem; }
    .account-shell.is-hub .account-menu-head .avatar { width: 3.25rem; height: 3.25rem; font-size: 1.4rem; }
    .account-shell.is-hub .account-menu-name { font-size: 1.15rem; }
}

/* ---------- En-tête : liens de navigation ---------- */
.site-header nav.header-nav { gap: .35rem; }
.nav-link {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .45rem .8rem;
    font-weight: 600; font-size: .95rem; color: var(--text); text-decoration: none;
    border-radius: 999px; transition: background-color .15s ease, color .15s ease;
}
.nav-link svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-link:hover { color: var(--accent); background: var(--bg); }
.nav-link.active { color: var(--accent); background: var(--bg); box-shadow: inset 0 0 0 1px var(--border); }
.header-nav .account-chip { margin-left: .35rem; }

@media (max-width: 767px) {
    /* Sur mobile, la navigation passe dans la barre du bas : l'en-tête ne garde que Connexion / Inscription */
    .site-header nav.header-nav > .nav-link:not(.nav-login) { display: none; }
}

/* ---------- Trick-list en cartes carrées (2 par ligne sur mobile) ---------- */
.trick-block .trick-list {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: .6rem;
}
.trick-block .trick {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 1fr auto;
    grid-template-areas: "info info" "xp toggle";
    align-items: end;
    gap: .5rem;
    aspect-ratio: 1 / 1;
    padding: .8rem;
    border-radius: 12px;
    overflow: hidden;
}
.trick-block .trick .trick-info { grid-area: info; align-self: start; gap: .2rem; }
.trick-block .trick .trick-name { font-size: 1.05rem; line-height: 1.2; overflow-wrap: anywhere; }
.trick-block .trick .trick-alias {
    font-size: .78rem; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.trick-block .trick .xp { grid-area: xp; align-self: center; font-size: 1rem; }
.trick-block .trick form { grid-area: toggle; }
.trick-block .trick.landed { background: #fff6ee; border-color: var(--accent); border-width: 2px; }
.trick-block .trick button.toggle { width: 2.6rem; height: 2.6rem; }

@media (max-width: 767px) {
    .trick-block .trick-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .trick-block { padding: 0 .6rem .6rem; }
    .trick-block .trick { padding: .7rem; }
    .trick-block .trick .trick-name { font-size: 1rem; }
}

/* ---------- Trick-list : catégories en pavés ---------- */
.category-grid {
    list-style: none; margin: 1rem 0 0; padding: 0;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .75rem;
}
.category-tile {
    display: flex; flex-direction: column; justify-content: space-between; gap: .5rem;
    aspect-ratio: 1 / 1; padding: 1rem;
    color: var(--text); text-decoration: none;
    background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.category-tile:hover { color: var(--text); border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 6px 18px rgb(43 38 32 / .08); }
.category-name { font-size: 1.2rem; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.category-count { margin-top: -.25rem; font-size: .85rem; color: var(--muted); }
.category-tile .category-name { margin-bottom: auto; }
.category-progress { display: flex; flex-direction: column; gap: .35rem; }
.category-done { font-size: 1.35rem; font-weight: 800; color: var(--accent); }
.category-tile .progress { height: .45rem; }


.category-tile.is-complete { border-width: 2px; border-color: var(--success-text); }
.category-tile.is-complete .category-done::after { content: " ✓"; color: var(--success-text); }
@media (prefers-reduced-motion: reduce) { .category-tile { transition: none; } .category-tile:hover { transform: none; } }

@media (max-width: 767px) {
    .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
    .category-tile { padding: .85rem; }
    .category-name { font-size: 1.05rem; }
}

/* ---------- Page d'une catégorie ---------- */
.category-header { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .5rem .75rem; }
.category-header .page-title { margin: 0; }
.category-header .block-bar { grid-column: 1 / -1; display: block; height: .5rem; }
.category-header .block-bar .progress-bar { display: block; transition: width .3s ease; }
.category-page .xp-summary { margin: 1rem 0; }
/* Catégorie : barre "Tout cocher" */
.land-all {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem 1rem;
    margin: 1rem 0 0; padding: .85rem 1rem; background: var(--surface);
    border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 4px 14px rgb(43 38 32 / .06);
}
.land-all-text { margin: 0; display: flex; flex-direction: column; gap: .1rem; font-size: .95rem; }
.land-all-text strong { color: var(--accent); }
.land-all-text .muted { font-size: .85rem; }
.land-all-button {
    display: inline-flex; align-items: center; gap: .5rem; margin: 0; padding: .7rem 1.3rem;
    font-weight: 700; border-radius: 999px; box-shadow: 0 6px 16px rgb(168 64 31 / .3);
    transition: transform .15s ease, box-shadow .15s ease;
}
.land-all-button:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgb(168 64 31 / .38); }
.land-all-button:active { transform: none; }
.land-all-button svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 600px) { .land-all-button { width: 100%; justify-content: center; } }
@media (prefers-reduced-motion: reduce) { .land-all-button { transition: none; } }

/* Ma progression (par catégorie, comparée aux amis) */
.progression-link { display: inline-flex; align-items: center; gap: .35rem; margin-top: .5rem; white-space: nowrap; }
.progression-link svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.progress-overview { margin: 0 0 1.5rem; }
.progress-overview p { margin: 0 0 .5rem; }
.category-progress-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.category-progress-item { padding: .8rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.category-progress-item.is-combo { border-color: var(--accent); }
.category-progress-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .4rem; }
.category-progress-head a { font-weight: 700; color: var(--text); text-decoration: none; }
.category-progress-head a:hover { color: var(--accent); }
.progress-friends { height: .35rem; margin-top: .3rem; }
.progress-friends .progress-bar { background: var(--muted); opacity: .55; }
.category-progress-item .small { margin-top: .4rem; }
.ahead { color: var(--success-text); }
.legend { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; }
.legend-swatch { display: inline-block; width: 1rem; height: .5rem; margin-left: .5rem; border-radius: 999px; background: var(--accent); }
.legend-swatch:first-child { margin-left: 0; }
.legend-swatch.is-friends { background: var(--muted); opacity: .55; }
.compare-table tbody th { font-size: .95rem; text-transform: none; letter-spacing: 0; color: var(--text); background: transparent; }
.compare-table tr.is-me { background: var(--bg); }
.compare-table tr.is-me th { color: var(--accent); }
.compare-table td.is-best { font-weight: 800; color: var(--accent); }

/* Recherche dans la trick-list */
.trick-search { margin: 1rem 0 1.25rem; }
/* Les listes ont un display (grid, flex) qui l'emporte sur l'attribut hidden */
.trick-search[hidden], .search-results[hidden], .search-results > li[hidden], .search-empty[hidden],
[data-search-combo][hidden], [data-search-hide][hidden] { display: none; }
.search-results { margin-top: .75rem; }
.search-empty { margin-top: .75rem; padding: 1rem; background: var(--surface); border: 1px dashed var(--border); border-radius: 12px; }
.search-empty p { margin: 0 0 .4rem; }
.search-empty .button { margin-top: .5rem; }
.category-list { margin-top: 1rem; }
.category-switch { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 2rem; }
.chip.active { color: #fff; background: var(--accent); border-color: var(--accent); }

/* Correctif : barres de progression construites en <span> (en ligne par défaut, hauteur et largeur ignorées) */
span.progress, span.progress-bar { display: block; }
.category-tile .progress { width: 100%; }

/* ---------- Vidéos de tricks ---------- */
.trick.with-video { flex-wrap: wrap; }
.video-actions { flex-basis: 100%; display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; padding-top: .5rem; border-top: 1px dashed var(--border); }
.video-upload { display: flex; align-items: center; gap: .5rem; margin: 0; }
.video-pick { cursor: pointer; }
/* Sans vidéo : bouton discret sur la ligne du trick, simple icône pour les tricks de base */
.video-actions.is-compact { flex-basis: auto; padding-top: 0; border-top: 0; gap: .35rem; }
.video-actions.is-compact .video-pick { padding: .25rem .55rem; font-size: .8rem; }
.video-actions.is-compact .video-pick-icon { display: grid; place-items: center; width: 2rem; height: 2rem; padding: 0; font-size: .95rem; border-radius: 50%; opacity: .75; }
.video-actions.is-compact .video-pick-icon:hover { opacity: 1; }
.video-actions.is-compact .video-progress { width: 5rem; }
.video-pick[hidden], .video-progress[hidden], .video-progress-label[hidden] { display: none; }
.video-progress { display: block; width: 9rem; height: .5rem; background: var(--border); border-radius: 999px; overflow: hidden; }
.video-progress-bar { display: block; width: 0; height: 100%; background: var(--accent); transition: width .2s ease; }
.video-hidden-note { font-size: .8rem; font-weight: 600; color: var(--error-text); }
.play-button { white-space: nowrap; }
.validated-badge { display: inline-block; margin-left: .2rem; padding: 0 .3rem; font-size: .75rem; font-weight: 800; color: #fff; background: var(--success-text); border-radius: 999px; }
.trick-block .trick .play-button { grid-area: toggle; align-self: center; }


/* Admin : signalements */
.report-list { display: grid; gap: 1rem; margin-top: 1rem; }
.report-card { display: grid; grid-template-columns: minmax(0, 220px) 1fr; gap: 1rem; padding: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.report-card video { width: 100%; max-height: 360px; background: #000; border-radius: 8px; }
.report-media { min-width: 0; } /* vidéo + lien « ouvrir », dans la 1re colonne : infos et boutons à droite */
.report-media p { margin: .35rem 0 0; }
.report-body h2 { margin: 0; font-size: 1.1rem; }
.report-reasons { margin: .5rem 0; padding-left: 1.1rem; }
.report-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
@media (max-width: 600px) { .report-card { grid-template-columns: 1fr; } }
/* Admin > Vidéos : recherche, et formulaires « changer le trick » / « supprimer avec un motif » */
.admin-search { display: flex; gap: .5rem; margin: 1rem 0; max-width: 420px; }
.admin-search input { flex: 1; min-width: 0; }
/* Bloc d'actions d'une vidéo : une ligne par décision, libellé à gauche, champ + bouton alignés à droite */
.video-admin-panel { display: grid; gap: .55rem; margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--border); }
.vap-row { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); align-items: center; gap: .6rem; margin: 0; }
.vap-label { margin: 0; font-size: .9rem; font-weight: 600; color: var(--muted, inherit); }
.vap-control { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.vap-control select { flex: 1; min-width: 0; width: auto; padding: .4rem .55rem; font-size: .92rem; }
.vap-control .small-button { flex: none; margin: 0; white-space: nowrap; min-width: 6.5rem; }
.vap-note { margin: .1rem 0 0; }
@media (max-width: 600px) {
    .vap-row { grid-template-columns: 1fr; gap: .3rem; }
    .vap-control .small-button { min-width: 0; }
}

/* ---------- Réseaux sociaux ---------- */
.social-links { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.social-link {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .25rem .65rem .25rem .25rem;
    font-size: .85rem; font-weight: 600; color: var(--text); text-decoration: none;
    background: var(--bg); border: 1px solid var(--border); border-radius: 999px;
}
.social-link:hover { color: var(--text); border-color: var(--accent); }
.social-icon {
    display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem;
    font-size: .65rem; font-weight: 800; color: #fff; border-radius: 50%; background: var(--muted);
}
.social-instagram .social-icon { background: linear-gradient(45deg, #f09433, #dc2743 50%, #bc1888); }
.social-tiktok .social-icon { background: #111; }
.social-youtube .social-icon { background: #c4302b; --social-bg: #c4302b; }
.social-icon svg { display: block; width: 1rem; height: 1rem; }
.social-snapchat .social-icon svg { width: 1.15rem; height: 1.15rem; }
.social-x .social-icon { background: #000; }
.social-snapchat .social-icon { background: #f7d800; color: #111; }
.social-facebook .social-icon { background: #1877f2; }
.handle-input { display: flex; align-items: stretch; }
.handle-input > span {
    display: grid; place-items: center; padding: 0 .65rem;
    color: var(--muted); background: var(--bg); border: 1px solid var(--border); border-right: 0; border-radius: 6px 0 0 6px;
}
.handle-input input { border-radius: 0 6px 6px 0; }

/* ---------- Carte des skateparks ---------- */
body:has(.parks-shell) { overflow: hidden; }
body:has(.parks-shell) .site-footer { display: none; }
.parks-shell { position: fixed; z-index: 5; left: 0; right: 0; top: var(--parks-top, 56px); bottom: var(--parks-bottom, 0px); }
.parks-map { position: absolute; inset: 0; background: #f5eedf; }
/* MapLibre met "position: relative" sur sa carte : on garde la carte en plein cadre */
.parks-map.maplibregl-map { position: absolute; }
.parks-top {
    position: absolute; z-index: 1000; top: .6rem; left: .6rem; right: .6rem;
    display: grid; grid-template-columns: 1fr auto; gap: .5rem; max-width: 840px; margin: 0 auto; pointer-events: none;
}
.parks-top > * { pointer-events: auto; }
.parks-search { position: relative; }
.parks-search input { padding: .7rem 1rem; border: 0; border-radius: 999px; box-shadow: 0 1px 4px rgb(0 0 0 / .2); }
.parks-search input:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.parks-results {
    position: absolute; top: calc(100% + .35rem); left: 0; right: 0; margin: 0; padding: .3rem; list-style: none;
    background: var(--surface); border-radius: 12px; box-shadow: 0 6px 20px rgb(0 0 0 / .2); max-height: 50vh; overflow-y: auto;
}
.parks-results[hidden] { display: none; }
.parks-results button {
    display: flex; flex-direction: column; align-items: flex-start; width: 100%; margin: 0; padding: .5rem .7rem;
    font-weight: normal; text-align: left; color: var(--text); background: transparent; border-radius: 8px;
}
.parks-results button:hover, .parks-results button:focus-visible { background: var(--bg); }
.parks-results .muted { font-size: .85rem; }
.parks-noresult { padding: .6rem .7rem; }
.parks-locate { display: grid; place-items: center; width: 2.9rem; height: 2.9rem; margin: 0; padding: 0; color: var(--accent); background: var(--surface); border-radius: 50%; box-shadow: 0 1px 4px rgb(0 0 0 / .2); }
.parks-locate:hover { background: var(--bg); }
.parks-locate svg { width: 1.4rem; height: 1.4rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.parks-filters { grid-column: 1 / -1; display: flex; gap: .35rem; overflow-x: auto; scrollbar-width: none; padding: .15rem .1rem .35rem; }
.parks-filters button {
    margin: 0; padding: .35rem .8rem; font-size: .85rem; white-space: nowrap; color: var(--text);
    background: var(--surface); border-radius: 999px; box-shadow: 0 1px 4px rgb(0 0 0 / .2);
}
.parks-filters button[aria-pressed="true"] { color: #fff; background: var(--accent); }
.parks-filters button[aria-pressed="true"] .muted { color: rgb(255 255 255 / .8); }

.park-pin { width: 26px; height: 26px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 1px 4px rgb(0 0 0 / .35); }
.park-pin-mine { display: grid; place-items: center; font-size: .9rem; color: #fff; background: #d97706; }
.park-me { width: 16px; height: 16px; background: #16a34a; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 6px rgb(22 163 74 / .2), 0 1px 4px rgb(0 0 0 / .3); }
.park-popup strong { display: block; font-size: 1rem; }
.park-popup p { margin: .2rem 0; }
.park-popup .button { margin-top: .4rem; color: #fff; }
.park-mine { color: #d97706; font-weight: 700; }
/* Carte MapLibre : bulles et contrôles aux couleurs du site */
.maplibregl-map { font: inherit; }
.maplibregl-popup-content { padding: .75rem .9rem; color: var(--text); background: var(--surface); border-radius: 12px; box-shadow: 0 6px 20px rgb(0 0 0 / .2); }
.maplibregl-popup-close-button { font-size: 1.2rem; color: var(--muted); padding: 0 .4rem; }
.maplibregl-popup-anchor-bottom .maplibregl-popup-tip { border-top-color: var(--surface); }
.maplibregl-popup-anchor-top .maplibregl-popup-tip { border-bottom-color: var(--surface); }
.maplibregl-ctrl-group { border-radius: 10px; box-shadow: 0 1px 4px rgb(0 0 0 / .2); }

/* Fiche d'un park */
.park-page { max-width: 860px; margin: 0 auto; }
.park-head .page-title { margin: .2rem 0; }
.park-head p { margin: 0; }
.park-type { display: inline-block; padding: .1rem .55rem; font-size: .8rem; font-weight: 700; color: #fff; background: var(--accent); border-radius: 999px; }
.park-type-covered { background: #2563eb; }
.park-type-indoor { background: #6d28d9; }
.park-type-training { background: #2f855a; }
.park-minimap { height: 240px; margin: 1rem 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.park-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.park-actions form, .park-actions .button { margin: 0; }
.park-actions button { margin: 0; }
.park-actions p { margin: 0; flex-basis: 100%; }
.park-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.park-section { padding: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.park-section h2 { margin: 0 0 .6rem; font-size: 1.05rem; }
.park-details { display: grid; grid-template-columns: auto 1fr; gap: .35rem .9rem; margin: 0; }
.park-details dd { margin: 0; overflow-wrap: anywhere; }
.park-riders { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.park-riders a { display: flex; flex-direction: column; align-items: center; gap: .2rem; width: 4.5rem; font-size: .8rem; color: var(--text); text-decoration: none; text-align: center; overflow-wrap: anywhere; }
.park-nearest { margin: 0; padding: 0; list-style: none; }
.park-nearest li { display: flex; flex-direction: column; padding: .35rem 0; border-bottom: 1px solid var(--border); }
.park-nearest li:last-child { border-bottom: 0; }
.park-source { margin-top: 1.5rem; }

/* ---------- Mon matos (schéma de trottinette) ---------- */
.gear-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
@media (max-width: 760px) { .gear-layout { grid-template-columns: 1fr; } }
.gear-scheme { display: block; width: 100%; max-width: 640px; height: auto; }
.gear-title { margin: .25rem 0 .25rem; font-size: 1rem; }
/* Schéma : silhouette pleine (style pictogramme) ; la pièce survolée / active passe en couleur d'accent */
.sc-bg { fill: #fbf9f4; stroke: var(--border); }
.sc-ground { stroke: #d8cfbd; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1 7; }
.sc-solid, .sc-tyre, .sc-cut, .sc-hub { fill: #1f1b17; }
.sc-core { fill: #ece7dd; }
.sc-grip { fill: #000; }
.sc-bolt-light { fill: #ece7dd; }
.gear-part path, .gear-part circle { transition: fill .15s; }
.gear-scheme.is-editable .gear-part { cursor: pointer; }
.gear-scheme.is-editable .gear-part:hover :is(.sc-solid, .sc-tyre, .sc-cut, .sc-hub, .sc-grip),
.gear-scheme .gear-part.is-active :is(.sc-solid, .sc-tyre, .sc-cut, .sc-hub, .sc-grip) { fill: var(--accent); }
.gear-leader { fill: none; stroke: var(--accent); stroke-width: 1.2; }
.gear-dot { fill: #fff; stroke: var(--accent); stroke-width: 2; }
.gear-hit { fill: transparent; }
.gear-name { font-size: 11px; font-weight: 800; letter-spacing: .12em; fill: var(--accent); }
.gear-brand { font-size: 16px; font-weight: 800; fill: var(--text); }
.gear-model { font-size: 12px; fill: var(--muted); }
.gear-label.is-empty .gear-brand { font-weight: 400; fill: var(--muted); }
.gear-label.is-empty .gear-leader { stroke: #cfc5b2; stroke-dasharray: 3 3; }
.gear-label.is-empty .gear-dot { stroke: #cfc5b2; }
a .gear-label:hover .gear-brand, .gear-label.is-active .gear-brand { fill: var(--accent); }
a .gear-label:hover .gear-dot, .gear-label.is-active .gear-dot { fill: var(--accent); }
.gear-fields { display: grid; gap: .75rem; }
.gear-field { margin: 0; padding: .75rem 1rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; scroll-margin-top: 5rem; transition: border-color .15s, box-shadow .15s; }
.gear-field.is-active { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(168 64 31 / .15); }
.gear-field legend { padding: 0 .3rem; font-weight: 800; }
.gear-field label:first-of-type { margin-top: .25rem; }
.gear-field [hidden] { display: none; }
.gear-fields > button { margin-top: .25rem; }

/* ---------- Marques ---------- */
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.brand-card { display: flex; align-items: center; gap: .75rem; height: 100%; box-sizing: border-box; padding: .8rem 1rem; color: var(--text); text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.brand-card:hover { color: var(--text); border-color: var(--accent); }
.brand-card-body { display: flex; flex-direction: column; min-width: 0; }
.brand-initial { display: grid; place-items: center; flex: none; width: 2.6rem; height: 2.6rem; font-weight: 800; font-size: 1.2rem; color: #fff; background: var(--accent); border-radius: 10px; }
.brand-initial-big { width: 4rem; height: 4rem; font-size: 1.8rem; border-radius: 14px; }
.brand-page { max-width: 760px; margin: 0 auto; }
.brand-head { display: flex; align-items: center; gap: 1rem; }
.brand-head .page-title { margin: 0; }
.brand-head p { margin: .2rem 0 0; }
.brand-description { line-height: 1.6; }
.brand-riders { margin-top: 2rem; }
.brand-riders h3 { margin: 1.25rem 0 .5rem; font-size: 1rem; }

/* Matos d'un rider en petit (profil) */
.gear-summary { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0 0 .4rem; padding: 0; list-style: none; }
.gear-chip {
    display: inline-flex; align-items: baseline; gap: .35rem; padding: .2rem .6rem;
    font-size: .8rem; color: var(--text); text-decoration: none;
    background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
}
a.gear-chip:hover { color: var(--text); border-color: var(--accent); }
.gear-chip-part { font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.gear-chip-value { font-weight: 600; }

/* Rangée de pastilles + bouton d'ajout (Mon profil : parks, matos) */
.chip-row { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.chip-row .rider-parks, .chip-row .gear-summary { margin: 0; }
.chip-add {
    display: inline-flex; align-items: center; justify-content: center; padding: .25rem .75rem;
    font-size: .85rem; font-weight: 600; color: var(--accent); text-decoration: none;
    background: transparent; border: 1.5px dashed var(--accent); border-radius: 999px;
}
.chip-add:hover { color: #fff; background: var(--accent); border-style: solid; }
.chip-add-round { width: 1.9rem; height: 1.9rem; padding: 0; font-size: 1.05rem; line-height: 1; border-style: solid; }

/* Parks d'un rider (profil) */
.rider-parks { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .4rem; padding: 0; list-style: none; }
.rider-park { display: inline-block; padding: .25rem .65rem; font-size: .85rem; font-weight: 600; color: var(--text); text-decoration: none; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; }
.rider-park:hover { color: var(--text); border-color: var(--accent); }

/* ---------- Fil vidéo (façon TikTok) ---------- */
body:has(.feed-shell) { overflow: hidden; }
body:has(.feed-shell) .site-footer { display: none; }

.feed-shell {
    position: fixed; z-index: 5; left: 0; right: 0;
    top: var(--feed-top, 56px); bottom: var(--feed-bottom, 0px);
    background: #000; color: #fff;
}
.feed {
    height: 100%; overflow-y: auto; overscroll-behavior: contain;
    scroll-snap-type: y mandatory; scrollbar-width: none;
}
.feed::-webkit-scrollbar { display: none; }
.feed-item {
    position: relative; height: 100%; max-width: 560px; margin: 0 auto;
    scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; background: #000;
}
.feed-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }

.feed-top {
    position: absolute; z-index: 3; top: 0; left: 0; right: 0;
    display: flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .6rem 3.25rem .9rem; pointer-events: none;
    background: linear-gradient(rgb(0 0 0 / .55), transparent);
}
.feed-sources { display: flex; gap: .35rem; overflow-x: auto; scrollbar-width: none; pointer-events: auto; }
.feed-sources button {
    margin: 0; padding: .35rem .8rem; font-size: .95rem; font-weight: 700; white-space: nowrap;
    color: rgb(255 255 255 / .7); background: transparent; border-radius: 999px;
}
.feed-sources button[aria-pressed="true"] { color: #fff; background: rgb(255 255 255 / .18); }
.feed-sources button:hover { background: rgb(255 255 255 / .12); }
.feed-search-button {
    position: absolute; right: .6rem; top: .45rem; margin: 0; padding: .45rem; pointer-events: auto;
    color: #fff; background: transparent; border-radius: 999px;
}
.feed-search-button:hover { background: rgb(255 255 255 / .12); }
.feed-search-button svg { display: block; width: 1.4rem; height: 1.4rem; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.feed-filter-dot { position: absolute; top: .3rem; right: .3rem; width: .55rem; height: .55rem; background: var(--accent); border-radius: 50%; }
.feed-filter-dot[hidden] { display: none; }

.feed-info {
    position: absolute; z-index: 2; left: 0; right: 4.5rem; bottom: 0;
    padding: 2.5rem 1rem 1rem; pointer-events: none;
    background: linear-gradient(transparent, rgb(0 0 0 / .65));
    text-shadow: 0 1px 3px rgb(0 0 0 / .6);
}
.feed-info a { pointer-events: auto; }
.feed-rider { display: inline-flex; align-items: center; gap: .5rem; color: #fff; text-decoration: none; }
.feed-rider .avatar { width: 2.2rem; height: 2.2rem; border: 2px solid #fff; }
.feed-ago { margin-left: .4rem; font-size: .8rem; color: rgb(255 255 255 / .75); }
.feed-title { margin: .45rem 0 .2rem; font-size: 1.1rem; font-weight: 800; }
.feed-meta { display: flex; flex-wrap: wrap; gap: .3rem .75rem; margin: 0; font-size: .85rem; color: rgb(255 255 255 / .85); }
.feed-level { padding: 0 .45rem; font-weight: 700; color: #fff; background: var(--accent); border-radius: 4px; }
.feed-hidden { color: #ffb4a8; font-weight: 700; }
.feed-add {
    display: inline-flex; align-items: center; gap: .4rem; margin-top: .65rem; padding: .4rem .85rem .4rem .6rem;
    font-size: .85rem; font-weight: 700; color: #fff; text-decoration: none; text-shadow: none;
    background: rgb(255 255 255 / .16); border: 1px solid rgb(255 255 255 / .35); border-radius: 999px;
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.feed-add:hover { color: #fff; background: rgb(255 255 255 / .26); }
.feed-add svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.feed-actions {
    position: absolute; z-index: 2; right: .4rem; bottom: 1rem;
    display: flex; flex-direction: column; align-items: center; gap: .9rem;
}
.feed-action {
    display: flex; flex-direction: column; align-items: center; gap: .15rem;
    margin: 0; padding: .2rem; min-width: 3.25rem; font-size: .78rem; font-weight: 700;
    color: #fff; background: transparent; text-shadow: 0 1px 3px rgb(0 0 0 / .6);
}
.feed-action:hover { background: transparent; }
a.feed-action { text-decoration: none; } /* raccourci "Admin" (admins seulement) */
.feed-action svg {
    width: 2.1rem; height: 2.1rem; padding: .35rem; box-sizing: content-box;
    fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
    background: rgb(255 255 255 / .14); border-radius: 50%;
}
.feed-action[data-action="like"][aria-pressed="true"] svg { fill: #ff3b5c; stroke: #ff3b5c; }
.feed-validation.is-validated svg { color: #4ade80; background: rgb(74 222 128 / .25); }
.feed-validation.is-rejected svg { color: #ff8a80; }
.feed-item .feed-action [data-sound-off] { display: none; }
.feed-item.is-muted .feed-action [data-sound-off] { display: inline; }
.feed-item.is-muted .feed-action [data-sound-waves] { display: none; }

.feed-heart { position: absolute; z-index: 2; top: 50%; left: 50%; width: 7rem; height: 7rem; margin: -3.5rem 0 0 -3.5rem; opacity: 0; pointer-events: none; }
.feed-heart svg { width: 100%; height: 100%; fill: #ff3b5c; filter: drop-shadow(0 4px 12px rgb(0 0 0 / .4)); }
.feed-heart.pop { animation: heart-pop .7s ease-out; }
@keyframes heart-pop {
    0% { opacity: 0; transform: scale(.4); }
    25% { opacity: 1; transform: scale(1.1); }
    60% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.3) translateY(-1.5rem); }
}
.feed-paused { position: absolute; z-index: 1; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 4rem; color: rgb(255 255 255 / .8); opacity: 0; pointer-events: none; transition: opacity .15s; }
.feed-item.is-paused .feed-paused { opacity: 1; }

.feed-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; padding: 2rem; text-align: center; color: rgb(255 255 255 / .85); }
.feed-empty[hidden] { display: none; }
.feed-empty-title { margin: 0; font-size: 1.2rem; font-weight: 800; color: #fff; }

/* Fenêtres "bottom sheet" (commentaires, vote, filtres, signalement) */
.sheet {
    width: 100%; max-width: 560px; max-height: 80vh; margin: auto auto 0; padding: 0;
    color: var(--text); background: var(--surface); border: 0; border-radius: 16px 16px 0 0;
}
.sheet::backdrop { background: rgb(0 0 0 / .5); }
.sheet[open] { animation: sheet-up .2s ease-out; }
@keyframes sheet-up { from { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) { .sheet[open], .feed-heart.pop { animation: none; } }
.sheet-body { display: flex; flex-direction: column; max-height: 80vh; padding: .75rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px)); box-sizing: border-box; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.sheet-head h2 { margin: 0; font-size: 1.05rem; }
.sheet-head form { margin: 0; }
.sheet-close { margin: 0; font-size: 1.2rem; text-decoration: none; color: var(--muted); }
.sheet-actions { display: flex; gap: .5rem; }
.sheet-actions button { flex: 1; }
.sheet .chip-group { margin: 1rem 0 0; padding: 0; border: 0; }
.sheet .chip-group legend { margin-bottom: .4rem; font-weight: 700; }
.chip { display: inline-block; margin: 0 .3rem .4rem 0; font-weight: normal; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: .4rem .85rem; border: 1px solid var(--border); border-radius: 999px; background: var(--bg); }
.chip input:checked + span { color: #fff; background: var(--accent); border-color: var(--accent); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.sheet input[type="search"] { margin-top: .75rem; }

.comment-list { flex: 1; min-height: 6rem; margin: .75rem 0; padding: 0; overflow-y: auto; list-style: none; }
.comment { display: flex; align-items: flex-start; gap: .6rem; padding: .5rem 0; }
.comment-avatar { flex: none; }
.comment-content { flex: 1; min-width: 0; }
.comment-head { margin: 0; font-size: .85rem; }
.comment-head a { font-weight: 700; color: var(--text); text-decoration: none; }
.comment-body { margin: .1rem 0 0; overflow-wrap: anywhere; }
.comment-delete { margin: 0; padding: .2rem .4rem; color: var(--muted); text-decoration: none; }
.comment-form { display: flex; gap: .5rem; }
.comment-form input { flex: 1; min-width: 0; }
.comment-form button { margin: 0; }

.vote-buttons { display: flex; gap: .6rem; }
.vote-buttons[hidden] { display: none; }
.vote-buttons button { flex: 1; margin-top: .5rem; }
.vote-yes { background: var(--success-text); }
.vote-yes:hover { background: #154f2b; }
.vote-no { background: var(--error-text); }
.vote-no:hover { background: #7d1f14; }

/* ---------- Envoi de vidéo : choix du passage de 30 s et encodage ---------- */
.trim-dialog { width: min(94vw, 480px); padding: 0; color: var(--text); background: var(--surface); border: 0; border-radius: 14px; }
.trim-dialog::backdrop { background: rgb(20 17 14 / .75); }
.trim-body { padding: 1rem; }
.trim-body h2 { margin: 0 0 .25rem; font-size: 1.1rem; }
.trim-body video { display: block; width: 100%; max-height: 50vh; margin-top: .75rem; background: #000; border-radius: 8px; }
.trim-range { margin-top: .75rem; }
.trim-range input[type="range"] { width: 100%; padding: 0; accent-color: var(--accent); }
.trim-times { display: flex; justify-content: space-between; font-size: .9rem; font-weight: 600; }
.trim-actions { display: flex; gap: .5rem; }
.trim-actions button { flex: 1; }
.video-progress-label { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.video-progress-label[hidden] { display: none; }

/* ---------- Fiche d'un trick (toute la ligne de la trick-list y mène) ---------- */
.trick.has-link { position: relative; }
.trick.has-link:hover { border-color: var(--accent); }
.trick-link { color: inherit; text-decoration: none; }
.trick-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.trick.has-link form, .trick.has-link .play-button, .trick.has-link button, .trick.has-link a:not(.trick-link), .trick.has-link .video-actions { position: relative; z-index: 1; }
.trick-link:focus-visible { outline: none; }
.trick-link:focus-visible::after { outline: 2px solid var(--accent); outline-offset: 2px; }

.trick-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.trick-page > .trick-head { margin-bottom: 1.75rem; }
.trick-head.landed { border: 2px solid var(--accent); background: #fff6ee; }
.trick-head-main { min-width: 0; }
.trick-head .page-title { margin: .35rem 0 0; line-height: 1.1; overflow-wrap: anywhere; }
.trick-head-alias { margin: .2rem 0 0; }
.trick-head .trick-tags { margin-top: .5rem; }
.trick-level-chip { display: inline-block; margin: 0; padding: .1rem .6rem; font-size: .8rem; font-weight: 700; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; }
.trick-head-side { display: flex; flex-direction: column; align-items: flex-end; gap: .6rem; }
.trick-head-xp { font-size: 1.5rem; }
.trick-head-side .small-button { margin: 0; }
/* Mobile : l'XP en bas à gauche du pavé, le bouton "Je sais le faire / Je le passe" en face */
@media (max-width: 600px) {
    .trick-head-side { flex: 1 1 100%; flex-direction: row; align-items: center; justify-content: space-between; }
}
.trick-stats { margin: 1rem 0 1.5rem; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
a.stat { color: var(--text); text-decoration: none; }
a.stat:hover { border-color: var(--accent); }
.trick-section { margin: 0 0 1.75rem; }
.my-video { scroll-margin-top: 5rem; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.my-video h2 { margin-top: 0; }
.my-video p { margin: 0 0 .75rem; }
.my-video .video-actions { padding-top: 0; border-top: 0; }
.my-video:target { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.trick-section h2 { font-size: 1.15rem; margin: 0 0 .6rem; }
.trick-description { line-height: 1.6; }
.trick-tuto { position: relative; margin-top: .75rem; aspect-ratio: 16 / 9; background: #000; border-radius: 10px; overflow: hidden; }
.trick-tuto iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.trick-riders-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.trick-rider { display: inline-flex; align-items: center; gap: .45rem; padding: .25rem .7rem .25rem .25rem; color: var(--text); text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; font-size: .9rem; font-weight: 600; }
.trick-rider:hover { border-color: var(--accent); }
.trick-rider.is-friend { border-color: var(--accent); }
.trick-rider .avatar-small { width: 1.9rem; height: 1.9rem; font-size: .9rem; }

/* Vignettes de vidéos (fiche trick, profil) */
.video-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
@media (min-width: 768px) { .video-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }
.video-tile { position: relative; display: block; aspect-ratio: 9 / 16; overflow: hidden; color: #fff; text-decoration: none; background: linear-gradient(160deg, #3a332b, #1d1915); border-radius: 8px; }
.video-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.video-tile:hover img { transform: scale(1.04); }
.video-tile-info { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; padding: 1.5rem .45rem .4rem; background: linear-gradient(transparent, rgb(0 0 0 / .75)); }
.video-tile-title { font-size: .8rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.video-tile-meta { font-size: .7rem; opacity: .85; }
.video-tile-badge { position: absolute; top: .35rem; right: .35rem; display: grid; place-items: center; width: 1.3rem; height: 1.3rem; font-size: .75rem; font-weight: 800; background: #2f855a; border-radius: 50%; }
.my-videos { margin: 2rem 0; }

/* Fiche d'un combo : la suite de tricks (liens vers leurs fiches) et le calcul des points, replié */
.combo-sequence { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; counter-reset: step; }
.combo-sequence li { display: flex; align-items: center; gap: .4rem; counter-increment: step; }
.combo-sequence li + li::before { content: "→"; color: var(--accent); font-weight: 800; }
.combo-step { display: flex; flex-direction: column; padding: .5rem .8rem; color: var(--text); text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.combo-step:hover { border-color: var(--accent); }
.combo-step strong::before { content: counter(step) ". "; color: var(--accent); }
.combo-step .muted { font-size: .8rem; }
.combo-formula { margin-top: .75rem; }
.combo-formula summary { cursor: pointer; font-size: .9rem; color: var(--muted); }
.combo-formula p { margin: .4rem 0 0; }

/* Fenêtre de confirmation (remplace le confirm() du navigateur) */
.confirm-dialog {
    width: min(92vw, 380px); margin: auto; padding: 0;
    color: var(--text); background: var(--surface); border: 0; border-radius: 16px;
    box-shadow: 0 20px 50px rgb(0 0 0 / .3);
}
.confirm-dialog[open] { animation: confirm-in .18s ease-out; }
.confirm-dialog::backdrop { background: rgb(43 38 32 / .5); backdrop-filter: blur(2px); }
@keyframes confirm-in { from { opacity: 0; transform: translateY(12px) scale(.97); } }
.confirm-body { margin: 0; padding: 1.4rem 1.25rem 1.1rem; }
.confirm-message { margin: 0 0 1.25rem; font-size: 1.05rem; font-weight: 600; line-height: 1.4; text-align: center; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.confirm-actions .button { width: 100%; margin: 0; }
.confirm-actions .button:focus { outline: none; }
.confirm-actions .button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.confirm-ok.is-danger { background: #c0392b; border-color: #c0392b; }
.confirm-ok.is-danger:hover { background: #a93226; border-color: #a93226; }
@media (max-width: 600px) {
    .confirm-dialog { width: 100%; max-width: none; margin: auto 0 0; border-radius: 18px 18px 0 0; }
    .confirm-body { padding-bottom: calc(1.1rem + env(safe-area-inset-bottom)); }
}
.see-all-row { margin: 0 0 1rem; }
.sort-switch { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0 0 .75rem; }
.sort-switch .chip { margin: 0; }

/* Progression : une catégorie se déplie au clic pour montrer ses tricks */
.category-details > summary { list-style: none; cursor: pointer; }
.category-details > summary::-webkit-details-marker { display: none; }
.category-progress-title { font-weight: 700; }
.category-progress-title::after { content: "▾"; display: inline-block; margin-left: .4rem; color: var(--muted); transition: transform .15s; }
.category-details[open] .category-progress-title::after { transform: rotate(180deg); }
.category-details > summary:hover .category-progress-title { color: var(--accent); }
.category-tricks { margin-top: .75rem; padding-top: .65rem; border-top: 1px solid var(--border); }
.category-trick-list { list-style: none; margin: 0 0 .6rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .3rem .75rem; }
.category-trick-list li { display: flex; align-items: center; gap: .35rem; font-size: .9rem; }
.category-trick-list a { color: var(--muted); text-decoration: none; }
.category-trick-list .is-landed a { color: var(--text); font-weight: 600; }
.category-trick-list a:hover { color: var(--accent); }
.category-trick-mark { flex: none; display: grid; place-items: center; width: 1.05rem; height: 1.05rem; font-size: .7rem; font-weight: 800; color: #fff; border: 1px solid var(--border); border-radius: 50%; }
.category-trick-list .is-landed .category-trick-mark { background: var(--accent); border-color: var(--accent); }

/* Classements publics : choix du pays et de la région */
.ranking-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0 1rem; }
.ranking-filters label { flex: 1 1 200px; margin: 0; }
.ranking-filters select { width: 100%; margin: 0; }
.park-directions { display: inline-flex; align-items: center; gap: .4rem; margin-top: .9rem; }
.park-directions svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }

/* Skateparks par département / ville */
.breadcrumb { margin: 0 0 .5rem; font-size: .9rem; color: var(--muted); }
.breadcrumb a { color: var(--accent); text-decoration: none; font-weight: 600; }
.area-map { height: 320px; margin: 1rem 0 1.5rem; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: #f5eedf; }
.area-pin { display: block; width: 16px; height: 16px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 1px 4px rgb(0 0 0 / .35); cursor: pointer; }
.area-region { margin: 1.25rem 0; }
.area-region h2 { font-size: 1.05rem; margin: 0 0 .5rem; }
.area-list, .area-parks { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.area-list { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.area-list a, .area-parks a {
    display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .55rem .8rem;
    color: var(--text); text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
}
.area-list a:hover, .area-parks a:hover { border-color: var(--accent); }
.area-parks a > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.area-park-meta { display: flex; align-items: center; gap: .5rem; flex: none; }
.area-cities { margin: 0 0 1.5rem; }
.area-cities .chip-row { list-style: none; margin: 0; padding: 0; }
.area-cities h2, .area-parks + h2 { font-size: 1.05rem; }
.hero-stats a { color: inherit; text-decoration: none; }
.hero-stats a:hover strong { color: var(--accent); }
.park-place a { color: inherit; text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }
.park-place a:hover { color: var(--accent); }

/* Contributions skateparks : park manquant, photos, signalement */
.parks-suggest {
    flex: none; padding: .35rem .8rem; font-size: .85rem; font-weight: 700; white-space: nowrap; text-decoration: none;
    color: var(--accent); background: var(--surface); border: 1.5px dashed var(--accent); border-radius: 999px; box-shadow: 0 1px 4px rgb(0 0 0 / .2);
}
.suggest-card { max-width: 640px; }
/* Adresse + bouton Chercher sur une ligne : le champ prend la place, le bouton garde sa taille */
.suggest-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; align-items: stretch; }
.suggest-search input { width: 100%; min-width: 0; margin: 0; box-sizing: border-box; }
.suggest-search .small-button { width: auto; margin: 0; padding-inline: 1rem; }
.suggest-map { height: 320px; margin: .5rem 0 .3rem; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: #f5eedf; }
.park-photos { list-style: none; margin: 0 0 .75rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .4rem; }
.park-photos img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.park-photo-form { margin: 0; }
.park-photo-form .park-photo-button { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; margin: 0; }
.park-report { margin-top: 1rem; font-size: .9rem; }
.park-report summary { cursor: pointer; color: var(--muted); }
.park-report form { margin-top: .6rem; }
.park-report textarea { width: 100%; box-sizing: border-box; }
.admin-section { margin: 1.5rem 0; }
/* Admin → Statistiques */
/* Page plus large sur grand écran (graphiques), le reste du site garde 960 px */
.container:has(.stats-toolbar) { max-width: 1320px; }
/* Barre de filtres : tous les contrôles à la même hauteur, mêmes bordures et police */
.stats-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem 1.5rem; margin: 1rem 0 1.25rem; padding: .85rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.stats-field { display: flex; flex-direction: column; gap: .35rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.stats-field-label { padding: 0; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.stats-control { box-sizing: border-box; height: 2.25rem; margin: 0; padding: 0 .6rem; font: inherit; font-size: .9rem; color: var(--text); background: #fff; border: 1px solid var(--border); border-radius: 6px; }
.stats-control:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.stats-dates { display: flex; align-items: center; gap: .5rem; }
.stats-seg { display: inline-flex; box-sizing: border-box; height: 2.25rem; background: #fff; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.stats-seg > a, .stats-seg > label { display: flex; margin: 0; font-size: .9rem; font-weight: 600; color: var(--text); text-decoration: none; cursor: pointer; }
.stats-seg > * + * { border-left: 1px solid var(--border); }
.stats-seg > a, .stats-seg span { display: flex; align-items: center; padding: 0 .85rem; }
.stats-seg > a:hover, .stats-seg label:hover span { background: var(--bg); }
.stats-seg input { position: absolute; opacity: 0; pointer-events: none; }
.stats-seg > a.is-active, .stats-seg input:checked + span { color: #fff; background: var(--accent); }
.stats-seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -3px; }
.stats-submit { height: 2.25rem; margin: 0; padding: 0 1.1rem; font-size: .9rem; }
.stat-label small { font-size: .8rem; }
.stats-chart { margin: 1.5rem 0; padding: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.stats-chart h2 { margin: 0; font-size: 1.1rem; }
.stats-chart > p { margin: .2rem 0 .75rem; }
.stats-canvas { position: relative; height: 280px; }
.stats-table { margin-top: .75rem; font-size: .9rem; }
.stats-table summary { cursor: pointer; color: var(--muted); }
.stats-table .table-wrap { max-height: 320px; margin-top: .5rem; overflow-y: auto; }
@media (max-width: 600px) {
    .stats-canvas { height: 220px; }
}
.contrib-card { padding: .8rem 1rem; margin: 0 0 .6rem; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.contrib-card h3 { margin: 0 0 .3rem; font-size: 1rem; }
.contrib-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.contrib-actions .small-button { margin: 0; }
.contrib-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .6rem; }
.contrib-photos img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.park-pin-search { display: grid; place-items: center; font-size: .95rem; background: #fff; }
.suggest-duplicate { color: #b7791f; font-weight: 600; }
/* Légende OpenFreeMap : repliée dès l'affichage de la carte (sans flash), le bouton ⓘ l'ouvre à la demande */
.maplibregl-map.attrib-hold .maplibregl-ctrl-attrib.maplibregl-compact-show { padding: 2px 24px 2px 0; }
.maplibregl-map.attrib-hold .maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner { display: none; }
/* Photo de profil à la webcam (ordinateur) */
.webcam-dialog { width: min(92vw, 420px); }
.webcam-preview { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; margin: 0 0 1rem; background: #000; border-radius: 12px; transform: scaleX(-1); }

/* Notifications : cloche de l'en-tête et page */
.notif-bell { position: relative; display: grid; place-items: center; width: 2.3rem; height: 2.3rem; color: var(--text); border-radius: 50%; text-decoration: none; }
.notif-bell:hover, .notif-bell.active { color: var(--accent); background: var(--bg); }
.notif-bell svg { width: 1.35rem; height: 1.35rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.notif-bell .badge { position: absolute; top: -.1rem; right: -.2rem; background: #c0392b; box-shadow: 0 0 0 2px var(--surface); }
.notification-list { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: .4rem; }
.notification a {
    display: flex; align-items: center; gap: .75rem; padding: .65rem .8rem; color: var(--text); text-decoration: none;
    background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
}
.notification a:hover { border-color: var(--accent); }
.notification.is-new a { background: #fff6ee; border-color: var(--accent); }
.notification a > span:last-child { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.notification-icon { flex: none; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; font-size: 1.1rem; background: var(--bg); border-radius: 50%; }
.notification .avatar-small { flex: none; }

/* Mes combos : "Vous passez ce combo ?" après l'avoir composé */
.ask-combo { margin: 1rem 0; padding: 1rem 1.1rem; background: var(--surface); border: 2px solid var(--accent); border-radius: 12px; }
.ask-combo h2 { margin: 0 0 .25rem; font-size: 1.1rem; }
.ask-combo p { margin: 0; }
.ask-combo-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0 .5rem; }
.ask-combo-actions form { margin: 0; }
.ask-combo-actions button, .ask-combo-actions .button { margin: 0; }
/* Trick-list : "À votre portée" (suggestions de tricks et de combos) */
.suggestions { margin: 1rem 0 1.5rem; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 12px; }
.suggestions h2 { margin: 0; font-size: 1.15rem; }
.suggestions > p { margin: .2rem 0 0; }
.suggestions h3 { margin: 1rem 0 .5rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.suggestions[hidden] { display: none; }
/* Part des riders qui passent un trick (trick-list) */
.trick-percent { font-weight: 700; color: var(--accent); }

/* ---------- Trick-list : pop-up d'un trick ou d'un combo ---------- */
.trick-modal {
    width: min(92vw, 34rem); max-height: min(88vh, 46rem); padding: 0; margin: auto;
    color: var(--text); background: var(--surface); border: 0; border-radius: 22px; overflow: hidden;
    box-shadow: 0 30px 70px rgb(43 38 32 / .35), 0 8px 22px rgb(43 38 32 / .18), 0 0 0 1px rgb(43 38 32 / .06);
}
.trick-modal::backdrop { background: rgb(43 38 32 / .5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.trick-modal[open] { animation: trick-modal-in .22s cubic-bezier(.2, .9, .3, 1.1); }
.trick-modal[open]::backdrop { animation: trick-modal-fade .22s ease; }
@keyframes trick-modal-in { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes trick-modal-fade { from { opacity: 0; } to { opacity: 1; } }
.trick-modal-body { max-height: inherit; overflow-y: auto; overscroll-behavior: contain; padding: 1.5rem 1.5rem 1.25rem; }
.trick-modal-close {
    position: absolute; top: .8rem; right: .8rem; z-index: 2;
    display: grid; place-items: center; width: 2.3rem; height: 2.3rem; margin: 0; padding: 0;
    color: var(--text); background: var(--bg); border-radius: 50%; box-shadow: 0 2px 8px rgb(43 38 32 / .15);
}
.trick-modal-close:hover { color: #fff; background: var(--accent); }
.trick-modal-close svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.trick-modal-loading { margin: 2.5rem 0; text-align: center; color: var(--muted); }
.trick-modal-head { padding-right: 2.75rem; }
.trick-modal-head .trick-level-chip { margin: 0 0 .4rem; }
.trick-modal-head h2 { margin: 0; font-size: 1.6rem; line-height: 1.15; overflow-wrap: anywhere; }
.trick-modal-head .trick-head-alias { margin: .2rem 0 0; }
.trick-modal-head .trick-tags { margin: .55rem 0 0; }
.trick-modal-bar {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem;
    margin: 1.1rem 0 0; padding: .8rem .9rem; background: var(--bg); border-radius: 14px;
}
.trick-modal-xp { font-size: 1.6rem; font-weight: 800; color: var(--accent); line-height: 1; }
.trick-modal-xp small { font-size: .85rem; font-weight: 700; }
.trick-modal-bar form { margin: 0; }
.trick-modal-toggle { margin: 0; padding: .6rem 1.1rem; border-radius: 999px; box-shadow: 0 4px 12px rgb(168 64 31 / .3); }
.trick-modal-toggle.is-landed { color: var(--success-text); background: var(--success-bg); box-shadow: none; }
.trick-modal-bar .button { margin: 0; border-radius: 999px; }
.trick-modal-stats { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.trick-modal-stats li { padding: .4rem .75rem; font-size: .9rem; color: var(--muted); background: var(--bg); border-radius: 999px; }
.trick-modal-stats strong { color: var(--text); }
.trick-modal-stats a { color: inherit; text-decoration: none; }
.trick-modal-stats a:hover strong { color: var(--accent); }
.trick-modal .pending-reminder { margin: 1rem 0 0; }
.trick-modal-section { margin-top: 1.25rem; }
.trick-modal-section h3 { margin: 0 0 .5rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.trick-modal-section .trick-tuto { border-radius: 14px; overflow: hidden; }
.trick-modal-more {
    display: block; margin-top: 1.25rem; padding: .8rem 1rem; text-align: center; font-weight: 700; text-decoration: none;
    color: var(--accent); background: var(--bg); border-radius: 14px;
}
.trick-modal-more:hover { color: #fff; background: var(--accent); }

/* Mobile : le pop-up monte du bas de l'écran */
@media (max-width: 600px) {
    .trick-modal { width: 100%; max-width: 100%; max-height: 90vh; margin: auto 0 0; border-radius: 22px 22px 0 0; }
    .trick-modal[open] { animation-name: trick-sheet-in; }
    @keyframes trick-sheet-in { from { transform: translateY(100%); } to { transform: none; } }
    .trick-modal-body { padding: 1.4rem 1.1rem calc(1.25rem + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
    .trick-modal[open], .trick-modal[open]::backdrop { animation: none; }
}
/* Rang : icône en haut de "Mon compte" et liens vers le tableau des rangs (page d'aide) */
.account-menu-head .account-menu-rank { font-size: .8rem; font-weight: 700; color: var(--accent); }
a.profile-rank { transition: transform .15s ease; }
a.profile-rank:hover { transform: scale(1.08); }
.profile-rank-link { color: inherit; text-decoration: none; }
.profile-rank-link:hover strong { text-decoration: underline; }
#rangs { scroll-margin-top: 5rem; }
@media (prefers-reduced-motion: reduce) { a.profile-rank { transition: none; } }
/* Photo + badge rond du rang en bas à droite (en-tête du site, haut de "Mon compte"), comme sur le profil */
.avatar-ranked { position: relative; display: inline-block; flex-shrink: 0; line-height: 0; }
.avatar-rank-badge {
    position: absolute; right: -5px; bottom: -4px; width: 52%; height: 52%; min-width: 1rem; min-height: 1rem;
    object-fit: cover; border: 2px solid #fff; border-radius: 50%; background: #2b2620; box-shadow: 0 1px 4px rgb(0 0 0 / .3);
}
.account-shell.is-hub .account-menu-head .avatar-rank-badge { border-width: 3px; }
/* Type de ride (Park, Street, Free Ride) : cases en pastilles, et pastilles sur le profil */
.ride-types { margin: 1rem 0 0; padding: 0; border: 0; }
.ride-types legend { margin-bottom: .4rem; font-weight: 600; }
.ride-type-options { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.ride-types .ride-type-options .ride-type-option { position: relative; display: block; margin: 0; padding: 0; cursor: pointer; }
.ride-type-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ride-type-option span {
    display: inline-block; padding: .55rem 1.1rem; font-weight: 700;
    color: var(--text); background: var(--surface); border: 2px solid var(--border); border-radius: 999px;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.ride-type-option input:checked + span { color: #fff; background: var(--accent); border-color: var(--accent); }
.ride-type-option input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.ride-type-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: .4rem 0 0; }
.ride-type-chip { padding: .15rem .65rem; font-size: .8rem; font-weight: 700; color: var(--accent); background: var(--bg); border: 1px solid var(--accent); border-radius: 999px; }

/* Mon compte (mobile) : pavé de progression entre la photo et le menu */
.account-menu-progress { display: none; }
@media (max-width: 767px) {
    .account-shell.is-hub .account-menu-progress {
        display: flex; flex-direction: column; gap: .45rem; margin: 0 0 .6rem; padding: .85rem 1rem;
        color: var(--text); text-decoration: none; background: var(--bg); border-radius: 14px;
    }
    .account-menu-progress-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
    .account-menu-progress-head strong { font-size: 1.35rem; color: var(--accent); }
    .account-menu-progress-more { font-size: .85rem; font-weight: 700; color: var(--accent); }
    .account-menu-progress .progress { display: block; position: relative; }
    .account-menu-progress .progress-bar { display: block; }
    .account-menu-progress .muted.small, .account-menu-progress .pending-note { margin: 0; }
}
/* Réglages : la section a déjà le titre « Type de ride » (légende gardée pour les lecteurs d'écran) */
.settings-section .ride-types legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.settings-section .ride-types { margin-top: .25rem; }

/* Trick-list : coché mais en attente de validation (même style que Ma trick-list) */
.trick-info .trick-pending { display: inline-block; margin-top: .2rem; font-size: .8rem; font-weight: 700; color: #b7791f; }
/* Après la règle ci-dessus, et plus précis : le badge caché le reste vraiment */
.trick-info .trick-pending[hidden] { display: none; }

/* Trick-list : choix de la vue (Ma trick-list / Toute la trick-list) */
.view-switch {
    display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; margin: 0 0 1.1rem; padding: .35rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 4px 14px rgb(43 38 32 / .06);
}
.view-switch-option {
    display: flex; align-items: center; gap: .65rem; min-height: 3.6rem; padding: .55rem .8rem;
    color: var(--text); text-decoration: none; border-radius: 14px;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.view-switch-option:hover { background: var(--bg); color: var(--text); }
.view-switch-option.active { color: #fff; background: var(--accent); box-shadow: 0 6px 16px rgb(168 64 31 / .3); }
.view-switch-option svg { width: 1.5rem; height: 1.5rem; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.view-switch-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.view-switch-text strong { font-size: 1rem; }
.view-switch-text span { font-size: .8rem; opacity: .8; }
.view-switch-option:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 480px) {
    .view-switch-option { flex-direction: column; justify-content: center; gap: .25rem; padding: .6rem .4rem; text-align: center; }
    .view-switch-text strong { font-size: .92rem; }
    .view-switch-text span { font-size: .72rem; }
}
@media (prefers-reduced-motion: reduce) { .view-switch-option { transition: none; } }

/* Vue "Ma trick-list" : derniers tricks et actions */
.my-recent { margin: 1.5rem 0 0; }
.my-recent-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .5rem; }
.my-recent-head h2 { margin: 0; font-size: 1.15rem; }
.view-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.5rem 0 0; }
.view-actions .button { margin: 0; }
@media (max-width: 480px) { .view-actions .button { flex: 1 1 100%; text-align: center; } }
/* "Ma trick-list" : onglets À ma portée / Mes tricks */
.sub-tabs { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 1rem; border-bottom: 2px solid var(--border); }
.sub-tab {
    display: flex; align-items: center; justify-content: center; gap: .4rem; min-height: 3rem; padding: .5rem;
    margin-bottom: -2px; font-weight: 700; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent;
}
.sub-tab:hover { color: var(--text); }
.sub-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.sub-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sub-tab-count { min-width: 1.6rem; padding: .05rem .45rem; font-size: .78rem; text-align: center; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 999px; }
.sub-tab.active .sub-tab-count { color: #fff; background: var(--accent); border-color: var(--accent); }
/* ---------- Toute la trick-list : une couleur par catégorie, celle de son badge ---------- */
.theme-tricks                  { --theme: var(--accent); }
.theme-combos-over-head        { --theme: #1d5f8a; }
.theme-combos-double-over-head { --theme: #174d70; }
.theme-combos-triple-over-head { --theme: #4b3fa0; }
.theme-combos-rotation         { --theme: #6b3fa0; }
.theme-combos-stall            { --theme: #2f6b4f; }
.theme-combos-grab             { --theme: #b45309; }
.theme-combos-rewind           { --theme: #0f766e; }
.theme-combos-kickless         { --theme: #9d174d; }
.theme-combos-classiques       { --theme: #756a5b; }

.category-tile[class*="theme-"] {
    border: 1px solid color-mix(in srgb, var(--theme) 35%, var(--border));
    border-top: 4px solid var(--theme);
    background: linear-gradient(170deg, color-mix(in srgb, var(--theme) 9%, var(--surface)), var(--surface) 70%);
}
.category-tile[class*="theme-"]:hover { border-color: var(--theme); box-shadow: 0 8px 20px color-mix(in srgb, var(--theme) 22%, transparent); }
.category-tile[class*="theme-"] .category-done { color: var(--theme); }
.category-tile[class*="theme-"] .progress-bar { background: var(--theme); }
.category-tile .category-tag { display: flex; margin-bottom: .1rem; }
.category-tile .category-tag .tag { margin-left: 0; }
.category-tile.is-complete { border-color: var(--success-text); }
.category-grid-wide { grid-column: 1 / -1; }
.category-grid-wide .category-tile { aspect-ratio: auto; min-height: 9rem; }

/* Badges des catégories sans marqueur de trick */
.tag-grab     { margin-left: 0; color: #b45309; border-color: #b45309; white-space: nowrap; }
.tag-rewind   { margin-left: 0; color: #0f766e; border-color: #0f766e; white-space: nowrap; }
.tag-kickless { margin-left: 0; color: #9d174d; border-color: #9d174d; white-space: nowrap; }
.tag-classic  { margin-left: 0; color: #756a5b; border-color: #756a5b; white-space: nowrap; }
.tag-tricks   { margin-left: 0; color: var(--accent); border-color: var(--accent); white-space: nowrap; }

/* Page d'une catégorie : titre, barre et puces aux couleurs de la catégorie */
.category-page[class*="theme-"] .block-bar .progress-bar, .category-page[class*="theme-"] .block-progress { color: var(--theme); }
.category-page[class*="theme-"] .block-bar .progress-bar { background: var(--theme); }
.category-title-tag { display: inline-flex; vertical-align: middle; margin-left: .4rem; }
.category-title-tag .tag { font-size: .8rem; }
.chip-theme.active { color: #fff; background: var(--theme); border-color: var(--theme); }
.chip-theme:not(.active) { border-color: color-mix(in srgb, var(--theme) 45%, var(--border)); }

/* Catégorie "Tricks" : une section par niveau, du plus facile au plus difficile */
.level-jump { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0 0; }
.level-section { margin-top: 1.75rem; scroll-margin-top: 5rem; }
.level-section-head { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: .4rem .75rem; margin-bottom: .6rem; }
.level-section-head h2 { margin: 0; font-size: 1.2rem; }
.level-section-head .block-bar { grid-column: 1 / -1; display: block; height: .45rem; }
.level-section-head .block-bar .progress-bar { display: block; background: var(--accent); transition: width .3s ease; }
.level-land-all { margin: 0; }
.level-land-all .small-button { margin: 0; }
@media (max-width: 480px) {
    .level-section-head { grid-template-columns: 1fr auto; }
    .level-land-all { grid-column: 1 / -1; order: 3; }
    .level-land-all .small-button { width: 100%; }
}
/* Page vidéo sur mobile : plein écran sans en-tête, boutons de droite sans fond, sans date de publication */
@media (max-width: 767px) {
    body:has(.feed-shell) .site-header { display: none; }
    .feed-shell { top: 0; }
    .feed-top { padding-top: calc(.6rem + env(safe-area-inset-top, 0px)); }
    .feed-search-button { top: calc(.45rem + env(safe-area-inset-top, 0px)); }
    .feed-action svg { background: transparent; filter: drop-shadow(0 1px 3px rgb(0 0 0 / .7)); }
    .feed-validation.is-validated svg { background: transparent; }
    .feed-ago { display: none; }
    .feed-info { background: none; text-shadow: 0 1px 4px rgb(0 0 0 / .85); }
}
/* En-tête plus compact sur mobile */
@media (max-width: 767px) {
    .site-header { padding-top: calc(.55rem + env(safe-area-inset-top, 0px)); padding-bottom: .55rem; }
    .brand { font-size: 1.1rem; gap: .4rem; }
    .brand-logo { width: 1.9rem; height: 1.9rem; border-radius: 7px; }
    .notif-bell { width: 2.1rem; height: 2.1rem; }
    .site-header .button { padding: .35rem .75rem; font-size: .9rem; }
}