﻿/* =====================================================================
   BOTIX.fr — Couche « UI 2 »
   Chargée APRÈS botix.css : elle affine les encadrements, ajoute les
   composants récents (score, comparateur, palette de commandes…) et
   n'annule jamais le socle — elle le prolonge.
   ===================================================================== */

/* ---------- 22. Accent réglable ----------
   L'utilisateur choisit sa teinte : on ne redéfinit que les jetons de marque,
   tout le reste du design system suit automatiquement. */
:root {
    --accent:   #8b5cf6;
    --accent-2: #a78bfa;
    --accent-3: #22d3ee;

    --frame:        linear-gradient(150deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .03) 42%, rgba(139, 92, 246, .22));
    --frame-hover:  linear-gradient(150deg, rgba(167, 139, 250, .75), rgba(34, 211, 238, .35) 55%, rgba(232, 121, 249, .5));

    /* Deux matières distinctes : les surfaces de cartes restent translucides
       (le flou d'arrière-plan du site continue de vivre au travers), tandis
       que --pane-solid sert aux pièces qui doivent masquer ce qu'il y a
       derrière — disque du score, panneaux flottants, bordures d'avatar. */
    --pane:       rgba(19, 25, 38, .84);
    --pane-2:     rgba(24, 31, 46, .74);
    --pane-solid: #161d2a;

    --r-2xl: 24px;
}

html[data-accent="cyan"] {
    --violet: #06b6d4; --violet-2: #22d3ee; --blue: #3b82f6; --cyan: #67e8f9;
    --accent: #06b6d4; --accent-2: #22d3ee;
    --brand-grad:   linear-gradient(135deg, #06b6d4 0%, #3b82f6 55%, #a78bfa 100%);
    --brand-grad-2: linear-gradient(135deg, #22d3ee 0%, #06b6d4 50%, #3b82f6 100%);
    --lift: 0 18px 44px -18px rgba(6, 182, 212, .55);
    --ring: 0 0 0 3px rgba(6, 182, 212, .32);
    --spot: rgba(6, 182, 212, .15);
    --frame:       linear-gradient(150deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .03) 42%, rgba(6, 182, 212, .26));
    --frame-hover: linear-gradient(150deg, rgba(34, 211, 238, .75), rgba(59, 130, 246, .4) 55%, rgba(167, 139, 250, .45));
}

html[data-accent="emerald"] {
    --violet: #10b981; --violet-2: #34d399; --blue: #059669; --cyan: #6ee7b7;
    --accent: #10b981; --accent-2: #34d399;
    --brand-grad:   linear-gradient(135deg, #10b981 0%, #06b6d4 55%, #60a5fa 100%);
    --brand-grad-2: linear-gradient(135deg, #34d399 0%, #10b981 50%, #06b6d4 100%);
    --lift: 0 18px 44px -18px rgba(16, 185, 129, .5);
    --ring: 0 0 0 3px rgba(16, 185, 129, .3);
    --spot: rgba(16, 185, 129, .14);
    --frame:       linear-gradient(150deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .03) 42%, rgba(16, 185, 129, .26));
    --frame-hover: linear-gradient(150deg, rgba(52, 211, 153, .7), rgba(6, 182, 212, .4) 55%, rgba(96, 165, 250, .4));
}

html[data-accent="rose"] {
    --violet: #f43f5e; --violet-2: #fb7185; --blue: #e879f9; --cyan: #fda4af;
    --accent: #f43f5e; --accent-2: #fb7185;
    --brand-grad:   linear-gradient(135deg, #f43f5e 0%, #e879f9 55%, #8b5cf6 100%);
    --brand-grad-2: linear-gradient(135deg, #fb7185 0%, #f43f5e 50%, #e879f9 100%);
    --lift: 0 18px 44px -18px rgba(244, 63, 94, .5);
    --ring: 0 0 0 3px rgba(244, 63, 94, .3);
    --spot: rgba(244, 63, 94, .14);
    --frame:       linear-gradient(150deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .03) 42%, rgba(244, 63, 94, .26));
    --frame-hover: linear-gradient(150deg, rgba(251, 113, 133, .72), rgba(232, 121, 249, .42) 55%, rgba(139, 92, 246, .45));
}

html[data-accent="amber"] {
    --violet: #f59e0b; --violet-2: #fbbf24; --blue: #fb923c; --cyan: #fcd34d;
    --accent: #f59e0b; --accent-2: #fbbf24;
    --brand-grad:   linear-gradient(135deg, #f59e0b 0%, #fb923c 55%, #f43f5e 100%);
    --brand-grad-2: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #fb923c 100%);
    --lift: 0 18px 44px -18px rgba(245, 158, 11, .5);
    --ring: 0 0 0 3px rgba(245, 158, 11, .3);
    --spot: rgba(245, 158, 11, .14);
    --frame:       linear-gradient(150deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .03) 42%, rgba(245, 158, 11, .26));
    --frame-hover: linear-gradient(150deg, rgba(251, 191, 36, .72), rgba(251, 146, 60, .42) 55%, rgba(244, 63, 94, .4));
}

/* Mode sobre : le confort avant le spectacle. */
html[data-motion="calm"] * {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .06s !important;
}

html[data-motion="calm"] .bg-fx::before,
html[data-motion="calm"] .bg-fx::after { animation: none; }

html[data-motion="calm"] .bot-card:hover,
html[data-motion="calm"] .card-hover:hover { transform: none; }

/* ---------- 23. Encadrements ----------
   Toutes les surfaces partagent désormais la même construction : la matière en
   padding-box, une bordure dégradée en border-box. La bordure est visible en
   permanence (et non plus seulement au survol), ce qui donne aux cartes une
   arête nette au lieu d'un trait gris uniforme.

   Le !important n'est pas décoratif : plusieurs règles du socle repeignent
   border-color au survol, ce qui recouvrirait le dégradé d'un aplat. */
.card,
.bot-card,
.sidebar-card,
.chart-box,
.metric,
.stat,
.feature-card,
.cat-card,
.empty,
.cta-card,
.quick-panel,
.compare-dock,
.recent-card {
    border: 1px solid transparent !important;
    /* Sans cette remise à zéro, la couleur de fond héritée du socle serait
       peinte jusque sous la bordure et ternirait le dégradé. */
    background-color: transparent;
    background-image:
        linear-gradient(var(--pane), var(--pane-2)),
        var(--frame);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow: var(--edge), var(--shadow-sm);
}

.card:hover,
.bot-card:hover,
.sidebar-card:hover,
.chart-box:hover,
.feature-card:hover,
.cat-card:hover {
    background-image:
        linear-gradient(var(--pane), var(--pane-2)),
        var(--frame-hover);
}

.bot-card:hover,
.card-hover:hover {
    box-shadow: var(--edge-strong), var(--lift), var(--shadow-lg);
}

/* Le halo violet du survol reste, mais l'ancien liseré ::before ferait
   doublon avec la nouvelle bordure. */
.bot-card::before { display: none; }

.bot-card {
    border-radius: var(--r-2xl);
    padding: 20px 20px 18px;
    overflow: hidden;
}

/* Trois couches ici : la liste de background-clip doit être énumérée en
   entier, sinon elle se répète en boucle et la bordure retombe en padding-box. */
.bot-card.is-premium {
    background-image:
        radial-gradient(130% 100% at 100% 0%, rgba(232, 121, 249, .16), transparent 62%),
        linear-gradient(var(--pane), var(--pane-2)),
        linear-gradient(150deg, rgba(232, 121, 249, .6), rgba(139, 92, 246, .3) 55%, rgba(79, 125, 255, .45));
    background-clip: padding-box, padding-box, border-box;
}

/* Voile coloré propre à chaque bot : la teinte est dérivée de son identifiant
   côté PHP (--hue), donc stable d'une visite à l'autre. */
.bot-card-aura {
    position: absolute;
    inset: -1px -1px auto -1px;
    height: 132px;
    border-radius: var(--r-2xl) var(--r-2xl) 0 0;
    background: radial-gradient(120% 100% at 22% 0%,
                hsl(var(--hue, 265) 85% 62% / .17), transparent 68%);
    opacity: .8;
    pointer-events: none;
    transition: opacity .35s var(--ease-out);
}

.bot-card:hover .bot-card-aura { opacity: 1; }

/* Filet lumineux qui balaie la carte au survol. */
.bot-card-sheen {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    overflow: hidden;
}

.bot-card-sheen::before {
    content: '';
    position: absolute;
    top: 0;
    left: -60%;
    width: 45%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .07), transparent);
    transform: skewX(-16deg);
    transition: left .75s var(--ease-out);
}

.bot-card:hover .bot-card-sheen::before { left: 130%; }

/* ---------- 24. Score Botix ---------- */
.score-ring {
    --score: 0;
    --score-color: var(--accent-2);
    position: relative;
    flex-shrink: 0;
    width: var(--ring-size, 46px);
    height: var(--ring-size, 46px);
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: conic-gradient(from -90deg,
                var(--score-color) calc(var(--score) * 3.6deg),
                rgba(255, 255, 255, .08) calc(var(--score) * 3.6deg));
    filter: drop-shadow(0 3px 10px hsl(0 0% 0% / .45));
}

.score-ring::before {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--pane-solid);
}

.score-ring > * { position: relative; }

.score-ring b {
    font-size: calc(var(--ring-size, 46px) * .3);
    font-weight: 850;
    letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
    color: var(--score-color);
}

.score-tier-elite { --score-color: #fbbf24; }
.score-tier-high  { --score-color: #34d399; }
.score-tier-good  { --score-color: #22d3ee; }
.score-tier-fair  { --score-color: #a78bfa; }
.score-tier-new   { --score-color: #7c8798; }

/* Pastille de score posée sur le coin du logo. */
.bot-score-badge {
    position: absolute;
    right: -7px;
    bottom: -7px;
    --ring-size: 30px;
    border: 2px solid var(--pane-solid);
    box-sizing: content-box;
    margin: -2px;
}

.bot-score-badge::before { inset: 2.5px; }
.bot-score-badge b { font-size: 11px; }

/* Détail du score, sur la fiche. */
.score-panel { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.score-panel .score-ring { --ring-size: 92px; }
.score-panel .score-ring::before { inset: 6px; }

.score-legend { flex: 1; min-width: 180px; }

.score-line {
    display: grid;
    grid-template-columns: 88px 1fr 34px;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
    color: var(--text-soft);
    padding: 3px 0;
}

.score-line .track {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
    overflow: hidden;
}

.score-line .fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--brand-grad);
    transition: width .9s var(--ease-out);
}

.score-line em {
    font-style: normal;
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: var(--text);
    font-weight: 650;
}

/* ---------- 25. Courbes miniatures ---------- */
.spark {
    display: block;
    width: 100%;
    height: 34px;
    margin-top: 8px;
    color: var(--accent-2);
    overflow: visible;
}

.spark-up   { color: #34d399; }
.spark-down { color: #f87171; }

.metric { position: relative; overflow: hidden; }
.metric .spark { margin-top: 6px; opacity: .85; }

/* ---------- 26. Carte bot : actions ---------- */
.bot-card-tools {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 6px;
    z-index: 3;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .25s var(--ease-out), transform .25s var(--ease-out);
}

.bot-card:hover .bot-card-tools,
.bot-card:focus-within .bot-card-tools { opacity: 1; transform: none; }

/* Au doigt, il n'y a pas de survol : les outils restent visibles. */
@media (hover: none) {
    .bot-card-tools { opacity: 1; transform: none; }
}

.icon-btn {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(13, 17, 23, .72);
    border: 1px solid var(--border);
    color: var(--text-soft);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease-out);
}

.icon-btn svg { width: 15px; height: 15px; }
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); transform: translateY(-2px); }

.icon-btn.is-on {
    background: var(--accent);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 14px -3px var(--accent);
}

/* Le rang laisse la place aux outils au survol. */
.bot-card:hover .bot-rank { opacity: 0; transition: opacity .2s; }

/* ---------- 27. Mode liste ---------- */
.view-switch {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border-radius: 11px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--border);
}

.view-switch button {
    display: grid;
    place-items: center;
    width: 34px;
    height: 28px;
    border-radius: 8px;
    color: var(--text-dim);
    transition: background .2s, color .2s;
}

.view-switch button svg { width: 15px; height: 15px; }
.view-switch button:hover { color: var(--text-soft); }

.view-switch button.is-active {
    background: rgba(255, 255, 255, .08);
    color: var(--text);
    box-shadow: var(--edge);
}

/* La grille et la liste sont deux mises en page du même DOM : rien n'est
   recomposé en JavaScript, seule la direction du flux change. */
.grid.is-list { grid-template-columns: 1fr; gap: 12px; }

@media (min-width: 760px) {
    .grid.is-list .bot-card {
        flex-direction: row;
        align-items: center;
        gap: 18px;
        padding: 14px 18px;
    }

    .grid.is-list .bot-card-top     { flex: 1 1 250px; min-width: 0; margin: 0; }
    .grid.is-list .bot-desc         { flex: 1 1 200px; margin: 0; min-height: 0; -webkit-line-clamp: 2; line-clamp: 2; }
    .grid.is-list .bot-card-badges  { display: none; }
    .grid.is-list .bot-card-meta    { flex: 0 0 auto; border: 0; padding: 0; margin: 0; gap: 14px; }
    .grid.is-list .bot-card-actions { flex: 0 0 200px; margin: 0; }
    .grid.is-list .bot-card-aura    { inset: -1px; height: auto; border-radius: var(--r-2xl); }
    .grid.is-list .bot-rank         { position: static; order: -1; }
}

/* ---------- 28. Comparateur ---------- */
.compare-dock {
    position: fixed;
    left: 50%;
    bottom: 22px;
    transform: translate(-50%, 140%);
    z-index: 220;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 18px;
    max-width: min(680px, calc(100vw - 28px));
    box-shadow: var(--edge-strong), var(--shadow-lg);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    transition: transform .42s var(--ease-out);
}

.compare-dock.is-open { transform: translate(-50%, 0); }

.compare-slots { display: flex; gap: 8px; }

.compare-slot {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .04);
    border: 1px dashed var(--border-strong);
}

.compare-slot img { width: 100%; height: 100%; border-radius: 12px; object-fit: cover; }
.compare-slot.is-filled { border-style: solid; border-color: transparent; }

.compare-slot .remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    line-height: 1;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .5);
}

.compare-hint { font-size: 13px; color: var(--text-soft); line-height: 1.4; }
.compare-hint b { color: var(--text); display: block; font-size: 14px; }

.compare-table { width: 100%; border-collapse: collapse; font-size: 14px; }

.compare-table th,
.compare-table td {
    padding: 11px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.compare-table thead th {
    position: sticky;
    top: 0;
    background: var(--pane-solid);
    z-index: 1;
    font-weight: 700;
}

.compare-table tbody th {
    color: var(--text-dim);
    font-weight: 600;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: .05em;
    width: 148px;
}

.compare-table td { font-variant-numeric: tabular-nums; }
.compare-table td.is-best { color: #34d399; font-weight: 750; }
.compare-table td.is-best::after { content: ' ▲'; font-size: 10px; opacity: .8; }

.compare-head { display: flex; align-items: center; gap: 10px; }
.compare-head img { width: 34px; height: 34px; border-radius: 10px; }

/* ---------- 29. Palette de commandes ---------- */
.cmdk {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: none;
    padding: clamp(16px, 12vh, 130px) 16px 16px;
    background: rgba(6, 9, 14, .68);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}

.cmdk.is-open { display: block; animation: cmdk-in .18s var(--ease-out) both; }

@keyframes cmdk-in { from { opacity: 0; } }

.cmdk-panel {
    width: min(620px, 100%);
    margin-inline: auto;
    border-radius: 20px;
    overflow: hidden;
    background: var(--pane-solid);
    border: 1px solid var(--border-strong);
    box-shadow: var(--edge-strong), 0 40px 90px -20px rgba(0, 0, 0, .8);
    animation: cmdk-rise .26s var(--ease-out) both;
}

@keyframes cmdk-rise { from { opacity: 0; transform: translateY(-14px) scale(.985); } }

.cmdk-field {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 15px 18px;
    border-bottom: 1px solid var(--border);
}

.cmdk-field svg { width: 18px; height: 18px; color: var(--text-dim); flex-shrink: 0; }

.cmdk-field input {
    flex: 1;
    min-width: 0;
    background: none;
    border: 0;
    outline: none;
    font-size: 16px;
    font-weight: 500;
}

.cmdk-field input::placeholder { color: var(--text-dim); }

.cmdk-list { max-height: min(52vh, 420px); overflow-y: auto; padding: 8px; }

.cmdk-group {
    padding: 9px 12px 5px;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.cmdk-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    border-radius: 11px;
    cursor: pointer;
    color: var(--text-soft);
    scroll-margin: 12px;
}

.cmdk-item img,
.cmdk-item .glyph {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .05);
    font-size: 15px;
}

.cmdk-item .txt { min-width: 0; flex: 1; }
.cmdk-item .txt b { display: block; color: var(--text); font-weight: 650; font-size: 14.2px; }
.cmdk-item .txt small { display: block; color: var(--text-dim); font-size: 12.2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cmdk-item[aria-selected="true"] {
    background: linear-gradient(100deg, rgba(139, 92, 246, .22), rgba(139, 92, 246, .06));
    color: var(--text);
    box-shadow: inset 0 0 0 1px rgba(139, 92, 246, .3);
}

.cmdk-empty { padding: 26px 14px; text-align: center; color: var(--text-dim); font-size: 14px; }

.cmdk-foot {
    display: flex;
    gap: 16px;
    padding: 10px 16px;
    border-top: 1px solid var(--border);
    font-size: 11.5px;
    color: var(--text-dim);
    flex-wrap: wrap;
}

kbd {
    display: inline-block;
    min-width: 19px;
    padding: 1px 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid var(--border-strong);
    border-bottom-width: 2px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
    line-height: 1.5;
    color: var(--text-soft);
    text-align: center;
}

/* Déclencheur dans la barre de navigation. */
.cmdk-trigger {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 36px;
    padding: 0 10px 0 12px;
    border-radius: 11px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 13px;
    transition: border-color .2s, color .2s, background .2s;
}

.cmdk-trigger:hover { color: var(--text-soft); border-color: var(--border-strong); background: rgba(255, 255, 255, .07); }
.cmdk-trigger svg { width: 15px; height: 15px; }

/* La barre de navigation est déjà dense : le raccourci s'efface avant elle. */
@media (max-width: 1180px) { .cmdk-trigger kbd { display: none; } }
@media (max-width: 900px)  { .cmdk-trigger { display: none; } }

/* ---------- 30. Aperçu rapide ---------- */
.quick-panel {
    position: relative;
    width: min(560px, 100%);
    border-radius: var(--r-2xl);
    overflow: hidden;
}

.quick-cover {
    height: 104px;
    background:
        radial-gradient(90% 130% at 20% 0%, hsl(var(--hue, 265) 85% 60% / .5), transparent 70%),
        linear-gradient(120deg, rgba(139, 92, 246, .35), rgba(34, 211, 238, .18));
}

.quick-body { padding: 0 22px 22px; margin-top: -38px; }

.quick-top { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 14px; }

.quick-top img {
    width: 76px;
    height: 76px;
    border-radius: 22px;
    border: 3px solid var(--pane-solid);
    background: var(--bg-elevated);
}

.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
    gap: 9px;
    margin: 16px 0;
}

.quick-stat {
    padding: 10px 12px;
    border-radius: 13px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--border);
    text-align: center;
}

.quick-stat b { display: block; font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.quick-stat small { color: var(--text-dim); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }

/* ---------- 31. Fiche : fil d'ariane ---------- */
.crumbs {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 18px;
}

.crumbs a { color: var(--text-soft); transition: color .2s; }
.crumbs a:hover { color: var(--violet-2); }
.crumbs .sep { opacity: .45; }
.crumbs [aria-current] { color: var(--text); font-weight: 600; }

/* ---------- 32. Fiche : en-tête ---------- */
.bot-hero {
    position: relative;
    display: block;          /* l'ancien en-tête était un flex : le nouveau
                                empile bandeau, identité puis chiffres clés. */
    border-radius: var(--r-2xl);
    padding: 0 0 26px;
    overflow: hidden;
    border: 1px solid transparent;
    background-image:
        linear-gradient(var(--pane), var(--pane-2)),
        var(--frame);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow: var(--edge), var(--shadow);
}

.bot-hero-cover {
    height: 132px;
    background:
        radial-gradient(80% 150% at 15% 0%, hsl(var(--hue, 265) 88% 62% / .45), transparent 68%),
        radial-gradient(70% 140% at 85% 10%, hsl(calc(var(--hue, 265) + 55) 85% 58% / .3), transparent 70%),
        linear-gradient(110deg, rgba(139, 92, 246, .22), rgba(34, 211, 238, .12));
    position: relative;
}

.bot-hero-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(#000, transparent);
    -webkit-mask-image: linear-gradient(#000, transparent);
}

.bot-hero-inner {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    padding: 0 28px;
    margin-top: -52px;
    position: relative;
    z-index: 1;
}

.bot-hero-avatar {
    width: 118px;
    height: 118px;
    border-radius: 30px;
    border: 4px solid var(--pane-solid);
    background: var(--bg-elevated);
    box-shadow: var(--shadow);
    flex-shrink: 0;
}

.bot-hero-main { padding-top: 56px; }

.bot-hero h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.bot-hero-kpis {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 28px 22px;
}

.kpi-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 13px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-soft);
    box-shadow: var(--edge);
}

.kpi-chip b { color: var(--text); font-weight: 750; font-variant-numeric: tabular-nums; }

/* ---------- 33. Fiche : barre d'action flottante ---------- */
.bot-bar {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--nav-h);
    z-index: 90;
    transform: translateY(-120%);
    transition: transform .35s var(--ease-out);
    background: rgba(13, 17, 23, .9);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 34px -12px rgba(0, 0, 0, .7);
}

.bot-bar.is-on { transform: none; }

.bot-bar-inner {
    max-width: var(--maxw);
    margin-inline: auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.bot-bar img { width: 34px; height: 34px; border-radius: 11px; flex-shrink: 0; }
.bot-bar .name { font-weight: 750; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bot-bar .meta { color: var(--text-dim); font-size: 13px; white-space: nowrap; }
.bot-bar .actions { margin-left: auto; display: flex; gap: 9px; flex-shrink: 0; }

@media (max-width: 640px) {
    .bot-bar .meta { display: none; }
}

/* ---------- 34. Bouton de vote : anneau de compte à rebours ---------- */
.btn-vote { position: relative; overflow: hidden; }

.btn-vote .cooldown-fill {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: rgba(255, 255, 255, .8);
    border-radius: 2px;
    transform-origin: left;
    pointer-events: none;
    transition: transform 1s linear;
}

.vote-remind {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.8px;
    color: var(--text-dim);
    margin-top: 10px;
}

.vote-remind button {
    color: var(--violet-2);
    font-weight: 650;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- 35. Récemment consultés ---------- */
.recent-rail {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 2px 12px;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
}

.recent-card {
    flex: 0 0 auto;
    width: 210px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 15px;
    scroll-snap-align: start;
    transition: transform .25s var(--ease-out);
}

.recent-card:hover { transform: translateY(-3px); }
.recent-card img { width: 36px; height: 36px; border-radius: 11px; flex-shrink: 0; background: var(--bg-elevated); }
.recent-card b { display: block; font-size: 13.6px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-card small { color: var(--text-dim); font-size: 11.8px; }

/* ---------- 36. Réglages d'apparence ---------- */
.appearance {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 210;
}

.appearance-panel {
    position: absolute;
    right: 0;
    bottom: 54px;
    width: 232px;
    padding: 15px;
    border-radius: 17px;
    background: var(--pane-solid);
    border: 1px solid var(--border-strong);
    box-shadow: var(--edge), var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px) scale(.97);
    transform-origin: bottom right;
    transition: opacity .22s var(--ease-out), transform .22s var(--ease-out), visibility .22s;
}

.appearance.is-open .appearance-panel { opacity: 1; visibility: visible; transform: none; }

.appearance-title {
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 9px;
}

.swatches { display: flex; gap: 8px; margin-bottom: 15px; }

.swatch {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform .2s var(--ease-out), border-color .2s;
}

.swatch:hover { transform: translateY(-2px) scale(1.06); }
.swatch.is-active { border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .12); }

.swatch-violet  { background: linear-gradient(135deg, #8b5cf6, #4f7dff); }
.swatch-cyan    { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.swatch-emerald { background: linear-gradient(135deg, #10b981, #06b6d4); }
.swatch-rose    { background: linear-gradient(135deg, #f43f5e, #e879f9); }
.swatch-amber   { background: linear-gradient(135deg, #f59e0b, #fb923c); }

.switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13.2px;
    color: var(--text-soft);
    padding: 5px 0;
}

.switch {
    position: relative;
    width: 38px;
    height: 22px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid var(--border);
    flex-shrink: 0;
    transition: background .22s;
}

.switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: transform .22s var(--ease-out);
}

.switch.is-on { background: var(--accent); border-color: transparent; }
.switch.is-on::after { transform: translateX(16px); }

.fab {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--pane-solid);
    border: 1px solid var(--border-strong);
    color: var(--text-soft);
    box-shadow: var(--edge), var(--shadow);
    cursor: pointer;
    transition: transform .25s var(--ease-out), color .2s;
}

.fab:hover { transform: translateY(-3px) rotate(35deg); color: var(--text); }
.fab svg { width: 19px; height: 19px; }

/* ---------- 37. Modales : variantes ---------- */
.modal.modal-wide { width: min(920px, 100%); max-width: 100%; }
.modal-scroll { overflow: auto; max-height: min(66vh, 560px); }

/* L'aperçu rapide apporte son propre encadrement : la modale s'efface. */
.modal.modal-bare {
    max-width: 560px;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    overflow: visible;
}

/* ---------- 38. Divers ---------- */
.sidebar-card { border-radius: 18px; }

.sticky-aside {
    position: sticky;
    top: calc(var(--nav-h) + 18px);
}

.section-head .tools,
.page-head .tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.tabs { position: relative; }

/* ---------- 38 bis. Commandes d'un bot ---------- */
.cmd-row {
    display: flex;
    gap: 14px;
    align-items: baseline;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
}

.cmd-row:last-child { border-bottom: 0; }

.cmd-name {
    flex: 0 0 auto;
    min-width: 132px;
    padding: 3px 9px;
    border-radius: 8px;
    background: rgba(139, 92, 246, .14);
    border: 1px solid rgba(139, 92, 246, .26);
    color: var(--violet-2);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 13px;
    font-weight: 600;
    word-break: break-word;
}

.cmd-body  { min-width: 0; flex: 1; }
.cmd-desc  { color: var(--text-soft); font-size: 14px; line-height: 1.6; }
.cmd-sig   { color: var(--text-dim); font-size: 12.4px; margin-top: 3px; word-break: break-word; }

@media (max-width: 560px) {
    .cmd-row { flex-direction: column; gap: 6px; }
    .cmd-name { min-width: 0; align-self: flex-start; }
}

/* ---------- 39. Petits écrans ----------
   Cette feuille est chargée après botix.css : ses règles sans media query
   l'emportent déjà sur les ajustements mobiles du socle. Il faut donc les
   réécrire ici plutôt que compter sur eux. */
@media (max-width: 640px) {
    .bot-hero-cover  { height: 104px; }
    .bot-hero-inner  { padding: 0 18px; margin-top: -40px; gap: 16px; }
    .bot-hero-avatar { width: 88px; height: 88px; border-radius: 24px; border-width: 3px; }
    .bot-hero-main   { padding-top: 6px; }
    .bot-hero-kpis   { margin: 0 18px 18px; }

    .bot-card { padding: 16px; border-radius: 20px; }
    .bot-card-aura { border-radius: 20px 20px 0 0; }

    .compare-dock {
        left: 12px;
        right: 12px;
        bottom: 12px;
        max-width: none;
        flex-wrap: wrap;
        transform: translateY(160%);
    }

    .compare-dock.is-open { transform: none; }

    .appearance { right: 12px; bottom: 12px; }
    .score-panel .score-ring { --ring-size: 76px; }
}

/* Impression : on retire tout le décor. */
@media print {
    .nav, .bot-bar, .appearance, .compare-dock, .cmdk, .to-top, .scroll-progress, .bg-fx { display: none !important; }
    .bot-card, .card, .sidebar-card { box-shadow: none; background: #fff; color: #000; }
}


/* =====================================================================
   ASSISTANCE — liste des demandes et fil de discussion
   Utilisé par /support, /support/{code} et /admin/tickets.
   ===================================================================== */

/* ---- Liste ---- */
.tk-list { display: flex; flex-direction: column; gap: 10px; }

.tk-row {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md, 14px);
    text-decoration: none; color: inherit;
    transition: border-color .2s, transform .2s, background .2s;
}
.tk-row:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.tk-row.is-closed { opacity: .62; }

.tk-row-icon { font-size: 22px; flex-shrink: 0; }
.tk-row-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.tk-row-title {
    font-weight: 650; font-size: 15px;
    display: flex; align-items: center; gap: 8px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tk-row-meta {
    font-size: 12.5px; color: var(--text-dim);
    display: flex; flex-wrap: wrap; gap: 5px; align-items: center;
}
.tk-row-meta code { font-size: 11.5px; }

.tk-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--success); flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(63, 185, 80, .18);
}

/* ---- Pastille d'état ---- */
.tk-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 11px; border-radius: 999px;
    font-size: 12.5px; font-weight: 650; white-space: nowrap;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .05); color: var(--text-soft);
}
.tk-open     { background: rgba(63, 185, 80, .13);  color: #7ee787; border-color: rgba(63, 185, 80, .3); }
.tk-pending  { background: rgba(88, 166, 255, .13); color: #79c0ff; border-color: rgba(88, 166, 255, .3); }
.tk-answered { background: rgba(139, 92, 246, .14); color: #c4b5fd; border-color: rgba(139, 92, 246, .32); }
.tk-closed   { background: rgba(255, 255, 255, .05); color: var(--text-dim); }

/* ---- En-tête de conversation ---- */
.tk-page { max-width: 880px; }

.tk-back {
    display: inline-block; margin-bottom: 16px;
    font-size: 13.5px; color: var(--text-soft); text-decoration: none;
}
.tk-back:hover { color: var(--text); }

.tk-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 16px; flex-wrap: wrap; margin-bottom: 14px;
}
.tk-head-main { min-width: 0; flex: 1; }
.tk-head-title { display: flex; align-items: center; gap: 10px; }
.tk-head-title h1 { font-size: 21px; font-weight: 750; margin: 0; line-height: 1.3; }
.tk-head-title span { font-size: 22px; }
.tk-head-meta {
    display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
    font-size: 12.5px; color: var(--text-dim); margin-top: 8px;
}
.tk-head-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

.tk-sync {
    font-size: 12.5px; color: var(--text-dim);
    padding: 9px 14px; margin-bottom: 16px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid var(--border); border-radius: 10px;
}

/* ---- Fil ---- */
.tk-thread {
    display: flex; flex-direction: column; gap: 16px;
    padding: 4px 0 22px;
}

.tk-msg { display: flex; gap: 12px; align-items: flex-start; }
.tk-msg.is-mine { flex-direction: row-reverse; }
.tk-msg.is-mine .tk-msg-head { flex-direction: row-reverse; }
.tk-msg.is-mine .tk-msg-body { align-items: flex-end; }
.tk-msg.is-mine .tk-msg-text {
    background: linear-gradient(135deg, rgba(139, 92, 246, .2), rgba(79, 125, 255, .16));
    border-color: rgba(139, 92, 246, .3);
}

.tk-msg-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    flex-shrink: 0; object-fit: cover;
    border: 1px solid var(--border);
}

.tk-msg-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; max-width: min(660px, 82%); }

.tk-msg-head {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    font-size: 12.5px; color: var(--text-dim);
}
.tk-msg-head b { color: var(--text-soft); font-size: 13.5px; font-weight: 650; }

.tk-msg-text {
    padding: 11px 15px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    font-size: 14.5px; line-height: 1.65;
    overflow-wrap: anywhere;
}

.tk-msg-staff .tk-msg-text {
    background: rgba(63, 185, 80, .08);
    border-color: rgba(63, 185, 80, .22);
}
.tk-msg.is-internal .tk-msg-text {
    background: rgba(210, 153, 34, .09);
    border-color: rgba(210, 153, 34, .28);
    border-style: dashed;
}

.tk-msg.is-fresh { animation: tkIn .32s cubic-bezier(.2, .8, .3, 1); }
@keyframes tkIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.tk-tag {
    display: inline-flex; padding: 2px 7px; border-radius: 6px;
    font-size: 10.5px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase;
}
.tk-tag-staff    { background: rgba(63, 185, 80, .16);  color: #7ee787; }
.tk-tag-discord  { background: rgba(88, 101, 242, .2);  color: #a5b0ff; }
.tk-tag-internal { background: rgba(210, 153, 34, .18); color: #e3b341; }

.tk-msg-files { display: flex; flex-wrap: wrap; gap: 6px; }
.tk-file {
    font-size: 12.5px; padding: 4px 9px; border-radius: 8px;
    background: rgba(255, 255, 255, .05); border: 1px solid var(--border);
    color: var(--text-soft); text-decoration: none;
}
.tk-file:hover { color: var(--text); border-color: var(--border-strong); }

.tk-sys {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    font-size: 12.5px; color: var(--text-dim); text-align: center;
    padding: 4px 0;
}
.tk-sys span { max-width: 70%; }
.tk-sys time { opacity: .6; font-size: 11.5px; }

/* ---- Zone de saisie ---- */
.tk-compose { padding: 12px 14px; position: sticky; bottom: 14px; backdrop-filter: blur(14px); }

.tk-compose-input {
    width: 100%; border: 0; background: transparent; resize: none;
    color: var(--text); font: inherit; font-size: 14.5px; line-height: 1.65;
    min-height: 62px; max-height: 260px; outline: 0;
}
.tk-compose-input::placeholder { color: var(--text-dim); }

.tk-compose-bar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap;
    padding-top: 10px; margin-top: 6px;
    border-top: 1px solid var(--border);
}
.tk-internal { font-size: 12.5px; margin: 0; }

.tk-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.tk-closed { margin-top: 8px; }

@media (max-width: 640px) {
    .tk-msg-body { max-width: 100%; }
    .tk-head-side { align-items: flex-start; }
    .tk-compose { position: static; }
}

/* =====================================================================
   40. Fiche d'un bot — refonte de l'en-tête
   ---------------------------------------------------------------------
   L'en-tête tenait sur une seule colonne : la description s'arrêtait à
   640 px et laissait la moitié droite vide, pendant que sept boutons
   retombaient sur deux rangées irrégulières. On sépare désormais
   l'identité (gauche) de ce que le visiteur vient faire (droite).
   ===================================================================== */

.bot-hero-cover {
    height: 142px;
}

/* Le logo du bot, très flouté, teinte le bandeau : chaque fiche a sa
   couleur propre au lieu du même dégradé pour tout le monde. */
.bot-hero-cover::before {
    content: '';
    position: absolute;
    inset: -30%;
    background-image: var(--cover, none);
    background-size: cover;
    background-position: center;
    filter: blur(58px) saturate(1.6);
    opacity: .55;
    transform: scale(1.15);
}

.bot-hero-cover::after {
    mask-image: linear-gradient(#000 20%, transparent);
    -webkit-mask-image: linear-gradient(#000 20%, transparent);
}

.bot-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 304px;
    align-items: start;
    gap: 28px;
    padding: 0 30px;
    margin-top: -58px;
}

/* La colonne s'étire jusqu'au bas du panneau : les puces se calent sur son
   pied plutôt que de laisser une bande vide au milieu de l'en-tête. */
.bot-hero-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
    align-self: stretch;
}

.bot-hero-identity {
    display: flex;
    gap: 22px;
    min-width: 0;
}

.bot-hero-avatar {
    width: 124px;
    height: 124px;
    border-radius: 32px;
}

.bot-hero-main {
    padding-top: 66px;
    min-width: 0;
}

.bot-hero h1 { margin-bottom: 10px; }

/* Pastille de vérification : le ✅ système jurait avec la typographie. */
.bot-check {
    display: inline-grid;
    place-items: center;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    background: linear-gradient(140deg, #3fb950, #2ea043);
    color: #06120a;
    font-size: 15px;
    font-weight: 900;
    box-shadow: 0 0 0 3px rgba(63, 185, 80, .18);
}

.bot-hero .short {
    max-width: 62ch;
    font-size: 16.5px;
    line-height: 1.7;
}

.bot-hero-badges { margin-bottom: 16px; }

/* -- Note et auteur -------------------------------------------------- */
.bot-hero-meta {
    display: flex;
    align-items: center;
    gap: 10px 18px;
    flex-wrap: wrap;
}

.meta-rating,
.meta-owner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .035);
    font-size: 13.5px;
    color: var(--text-soft);
    transition: border-color .2s, background .2s, transform .2s var(--ease-out);
}

.meta-rating:hover,
.meta-owner:hover {
    border-color: var(--border-strong);
    background: rgba(255, 255, 255, .07);
    transform: translateY(-1px);
}

.meta-rating b { color: var(--text); font-size: 15px; font-weight: 750; }
.meta-owner img { width: 24px; height: 24px; border-radius: 50%; }
.meta-owner span { color: var(--text); font-weight: 600; }

/* -- Panneau d'action ------------------------------------------------ */
.bot-hero-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    border-radius: var(--r-lg);
    border: 1px solid var(--border-strong);
    background: linear-gradient(180deg, rgba(22, 28, 39, .92), rgba(17, 22, 31, .92));
    box-shadow: var(--edge-strong), var(--shadow);
    backdrop-filter: blur(18px);
}

.panel-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.panel-stat {
    padding: 11px 12px;
    border-radius: var(--r-sm);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .03);
    text-align: center;
    transition: border-color .2s, background .2s;
}

a.panel-stat:hover { border-color: var(--border-strong); background: rgba(255, 255, 255, .06); }

.panel-stat b {
    display: block;
    font-size: 21px;
    font-weight: 850;
    letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
    color: var(--score-color, var(--text));
}

.panel-stat b small { font-size: 12px; font-weight: 600; color: var(--text-dim); }

.panel-stat span {
    display: block;
    font-size: 11.4px;
    color: var(--text-dim);
    margin-top: 1px;
}

/* Les actions s'empilent : plus de rangée orpheline, et le bouton
   principal garde toute la largeur du panneau. */
.bot-hero-actions {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.bot-hero-actions form { margin: 0; }
.bot-hero-actions .btn-lg { font-size: 15px; }

.panel-icons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.panel-icons form { margin: 0; }

.panel-icons .btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    font-size: 17px;
    border-radius: 13px;
}

.panel-icons .btn-icon.is-on {
    border-color: rgba(248, 81, 73, .4);
    background: rgba(248, 81, 73, .12);
}

.panel-edit {
    display: block;
    text-align: center;
    font-size: 13px;
    color: var(--text-dim);
    padding-top: 4px;
    transition: color .2s;
}

.panel-edit:hover { color: var(--violet-2); }

/* Le rappel de vote, injecté par le script sous les actions. */
.bot-hero-panel .vote-remind { margin: 0; justify-content: center; }

/* Alignées sous le texte, pas sous le logo : la colonne reste lisible. */
.bot-hero-kpis { margin: auto 0 2px 146px; }

/* -- Chiffres clés --------------------------------------------------- */
.metric-trend { display: inline-flex; align-items: baseline; gap: 5px; }
.metric-trend.is-up   { color: #67e8f9; }
.metric-trend.is-down { color: #ff8880; }

/* =====================================================================
   41. Fiche d'un bot — corps de page
   ===================================================================== */

.section-heading {
    font-size: 17px;
    font-weight: 750;
    letter-spacing: -.02em;
    margin: 26px 0 14px;
}

/* Repères : remplace la carte « Informations » de la barre latérale et
   comble la colonne quand la description est courte. */
.bot-facts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
    gap: 12px;
}

.fact {
    position: relative;
    padding: 15px 16px 14px 46px;
    border-radius: var(--r);
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--edge);
    transition: border-color .2s, transform .2s var(--ease-out);
}

a.fact:hover { border-color: var(--border-strong); transform: translateY(-2px); }

.fact-icon {
    position: absolute;
    left: 14px;
    top: 15px;
    font-size: 17px;
    line-height: 1.2;
}

.fact b {
    display: block;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -.01em;
    word-break: break-word;
}

.fact span:not(.fact-icon) {
    display: block;
    font-size: 11.8px;
    color: var(--text-dim);
    margin-top: 2px;
}

/* Dans la colonne principale, l'anneau a la place de respirer. */
.score-card .score-panel { gap: 26px; }
.score-card .score-ring { --ring-size: 116px; }
.score-card .score-legend { min-width: 260px; }

/* -- Barre latérale : développeur, liens, bots voisins ---------------- */
.dev-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dev-row img { border-radius: 50%; border: 1px solid var(--border); }
.dev-row b { display: block; font-size: 15px; }
.dev-row small { color: var(--text-dim); font-size: 12.5px; }

.dev-stats {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 14px 0;
    padding: 11px 12px;
    border-radius: var(--r-sm);
    background: rgba(255, 255, 255, .03);
    border: 1px solid var(--border);
    font-size: 12.6px;
    color: var(--text-dim);
}

.dev-stats b { color: var(--text-soft); font-weight: 650; }

.link-stack { display: flex; flex-direction: column; gap: 8px; }

.similar-row {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    transition: padding-left .22s var(--ease-out);
}

.similar-row:last-of-type { border-bottom: 0; }
.similar-row:hover { padding-left: 5px; }
.similar-row img { border-radius: 12px; flex: none; }
.similar-row span { min-width: 0; }
.similar-row b { display: block; font-size: 14px; }
.similar-row small { color: var(--text-dim); font-size: 12.2px; }

.similar-go {
    margin-left: auto;
    color: var(--text-dim);
    font-size: 19px;
    transition: color .2s, transform .2s var(--ease-out);
}

.similar-row:hover .similar-go { color: var(--violet-2); transform: translateX(3px); }

/* -- Adaptation ------------------------------------------------------- */
@media (max-width: 1080px) {
    .bot-hero-inner { grid-template-columns: minmax(0, 1fr); }
    .bot-hero-panel { max-width: 460px; }
}

@media (max-width: 700px) {
    .bot-hero-cover { height: 118px; }
    .bot-hero-inner { padding: 0 18px; gap: 20px; margin-top: -46px; }
    .bot-hero-identity { flex-direction: column; gap: 14px; }
    .bot-hero-avatar { width: 92px; height: 92px; border-radius: 24px; }
    .bot-hero-main { padding-top: 0; }
    .bot-hero-panel { max-width: none; }
    .bot-hero-kpis { margin: 0; }
    .bot-facts { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
