/* ============================================================
   GUIDEON — documentation.css
   Style calqué sur equipe.css — table 3 colonnes
   (Commande · Description · Permission)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* ── Variables ── */
:root {
    --primary:        #5865f2;
    --primary-light:  #838dfa;
    --primary-dim:    rgba(88, 101, 242, 0.12);
    --primary-border: rgba(88, 101, 242, 0.25);

    --accent:         #2ed573;

    --bg-dark:        #0a0b10;
    --bg-card:        rgba(255, 255, 255, 0.03);
    --glass-border:   rgba(255, 255, 255, 0.08);
    --glass-border-h: rgba(88, 101, 242, 0.35);

    --text-main:      #ffffff;
    --text-soft:      #cbd5e1;
    --text-muted:     #94a3b8;

    --font-body:      'Plus Jakarta Sans', sans-serif;
    --font-mono:      'JetBrains Mono', monospace;

    --radius-sm:      10px;
    --radius-md:      16px;
    --radius-lg:      26px;
    --radius-xl:      34px;

    --ease-bounce:    cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth:    cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ============================================================
   BACKGROUND
   ============================================================ */
.bg-scene {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, black 20%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, black 20%, transparent 80%);
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(130px);
    opacity: 0.14;
    animation: orb-drift 18s ease-in-out infinite;
}
.orb-1 { top: -12%; right: -8%;  width: 650px; height: 650px; background: var(--primary); animation-delay: 0s; }
.orb-2 { bottom: 8%; left: -6%; width: 450px; height: 450px; background: var(--accent);  animation-delay: -6s; }
.orb-3 { top: 45%; left: 45%;   width: 350px; height: 350px; background: #ec4899;        animation-delay: -12s; opacity: 0.07; }

@keyframes orb-drift {
    0%,  100% { transform: translate(0, 0) scale(1); }
    33%        { transform: translate(-30px, 25px) scale(1.04); }
    66%        { transform: translate(20px, -20px) scale(0.97); }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 7rem 2rem 4rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-dim);
    border: 1px solid var(--primary-border);
    border-radius: 100px;
    padding: 7px 20px;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 1.75rem;
    animation: fade-up 0.6s var(--ease-smooth) 0.15s both;
}

.hero-badge .dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    animation: pulse-dot 2s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.35; transform: scale(0.6); }
}

.hero h1 {
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 900;
    line-height: 1.04;
    letter-spacing: -0.04em;
    margin-bottom: 1.25rem;
    animation: fade-up 0.65s var(--ease-smooth) 0.3s both;
}

.grad-text {
    background: linear-gradient(135deg, #fff 30%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.75;
    animation: fade-up 0.65s var(--ease-smooth) 0.45s both;
}

/* ============================================================
   CONTROLS
   ============================================================ */
.controls-wrap {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem 2rem 2rem;
    animation: fade-up 0.6s var(--ease-smooth) 0.6s both;
}

.controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 1.1rem 1.5rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.search-wrap {
    flex: 1;
    min-width: 220px;
    position: relative;
}
.search-wrap svg {
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    width: 16px; height: 16px;
    stroke: var(--text-muted);
    fill: none; stroke-width: 2;
    pointer-events: none;
}

.search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 0.7rem 1rem 0.7rem 2.75rem;
    color: var(--text-main);
    font-family: var(--font-mono);
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus {
    border-color: rgba(88, 101, 242, 0.5);
    background: rgba(88, 101, 242, 0.05);
    box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.1);
}

.filter-group { display: flex; gap: 6px; flex-wrap: wrap; }

.filter-btn {
    padding: 0.45rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.22s var(--ease-smooth);
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.filter-btn:hover {
    border-color: rgba(88, 101, 242, 0.4);
    color: var(--primary-light);
    background: var(--primary-dim);
}
.filter-btn.active {
    border-color: rgba(88, 101, 242, 0.5);
    color: var(--primary-light);
    background: var(--primary-dim);
    box-shadow: 0 0 14px rgba(88, 101, 242, 0.18);
}

/* ============================================================
   MAIN
   ============================================================ */
.main {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem 8rem;
}

.doc-section { margin-bottom: 3rem; }

.section-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 1rem;
}

.section-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-dim);
    border: 1px solid rgba(88, 101, 242, 0.22);
    border-radius: 100px;
    padding: 6px 16px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--primary-light);
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.chip-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--primary-light);
    box-shadow: 0 0 6px var(--primary-light);
    flex-shrink: 0;
}

.section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(88, 101, 242, 0.25), transparent);
}

.section-count {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ── Table Card ── */
.table-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: border-color 0.3s, box-shadow 0.3s;
}
.table-card:hover {
    border-color: var(--glass-border-h);
    box-shadow: 0 0 40px rgba(88, 101, 242, 0.08), 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* ── Table 3 colonnes ── */
.doc-table {
    width: 100%;
    border-collapse: collapse;
}

.doc-table thead { background: rgba(88, 101, 242, 0.05); }
.doc-table thead th {
    padding: 0.8rem 1.4rem;
    text-align: left;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--glass-border);
}

/* Commande 30% | Description flexible | Permission 20% */
.doc-table thead th:nth-child(1) { width: 30%; }
.doc-table thead th:nth-child(2) { width: auto; }
.doc-table thead th:nth-child(3) { width: 20%; }

.doc-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.035);
    transition: background 0.15s;
}
.doc-table tbody tr:last-child { border-bottom: none; }
.doc-table tbody tr:hover { background: rgba(88, 101, 242, 0.05); }

.doc-table td {
    padding: 0.95rem 1.4rem;
    vertical-align: middle;
}

/* ── Cells ── */
.cmd-cell {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-light);
    white-space: nowrap;
}
.cmd-cell .slash {
    color: var(--accent);
    opacity: 0.85;
}

.desc-cell {
    color: var(--text-soft);
    font-size: 13.5px;
    line-height: 1.55;
}

/* ── Permission badges ── */
.perm {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    padding: 4px 12px;
    white-space: nowrap;
    letter-spacing: 0.02em;
    transition: transform 0.2s var(--ease-bounce);
}
tr:hover .perm { transform: translateY(-1px); }

.perm-admin  { background: rgba(239, 68, 68, 0.1);   color: #f87171; border: 1px solid rgba(239, 68, 68, 0.2); }
.perm-dev    { background: rgba(245, 158, 11, 0.1);  color: #fb7e24; border: 1px solid rgba(245, 158, 11, 0.2); }
.perm-vip    { background: rgba(11, 85, 245, 0.1);  color: #004cbd; border: 1px solid rgba(11, 77, 245, 0.2); }
.perm-gold    { background: rgba(245, 158, 11, 0.1);  color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.2); }
.perm-public { background: rgba(46, 213, 115, 0.1);  color: #2ed573; border: 1px solid rgba(46, 213, 115, 0.2); }
.perm-config { background: var(--primary-dim);        color: var(--primary-light); border: 1px solid var(--primary-border); }
.perm-id     { background: rgba(167, 139, 250, 0.1); color: #c4b5fd; border: 1px solid rgba(167, 139, 250, 0.2); }

/* ── No results ── */
.no-results {
    text-align: center;
    padding: 5rem 2rem;
    color: var(--text-muted);
    font-size: 15px;
    display: none;
}
.no-results svg {
    width: 48px; height: 48px;
    stroke: var(--text-muted);
    fill: none; stroke-width: 1.5;
    margin: 0 auto 1rem;
    display: block;
}

.hidden { display: none !important; }

/* ── Back to top ── */
.back-top {
    position: fixed;
    bottom: 2rem; right: 2rem;
    width: 48px; height: 48px;
    border-radius: var(--radius-sm);
    background: var(--primary-dim);
    border: 1px solid rgba(88, 101, 242, 0.3);
    color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 300;
    text-decoration: none;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: background 0.25s, transform 0.25s var(--ease-bounce), box-shadow 0.25s;
}
.back-top:hover {
    background: rgba(88, 101, 242, 0.25);
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(88, 101, 242, 0.3);
}
.back-top svg {
    width: 20px; height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
}

.slash {
    color: #8b5cf6; /* Un violet vif pour rappeler l'accent du bot */
    font-weight: 800;
    margin-right: 1px;
    user-select: none; /* Empêche la sélection du slash lors du copier-coller de la commande */
    opacity: 0.9;
    font-family: 'Courier New', Courier, monospace; /* Style un peu plus "code" */
}

/* Optionnel : Un petit effet de lueur au survol de la ligne */
.doc-table tr:hover .slash {
    color: #a78bfa;
    text-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fade-up {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 700px) {
    .hero { padding: 5rem 1rem 3rem; }
    .hero h1 { font-size: 2.4rem; }
    .controls-wrap, .main { padding-left: 1rem; padding-right: 1rem; }
    .controls { flex-direction: column; align-items: stretch; }

    /* Masquer description sur très petit écran */
    .doc-table thead th:nth-child(2),
    .doc-table td:nth-child(2) { display: none; }
}
