/* =====================================================
   ABM-Temp-Analyser — Site du projet (style du portfolio GalTech)
   ===================================================== */

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.fill-icon {
    font-variation-settings: 'FILL' 1;
}

/* Data grid background */
.data-grid-pattern {
    background-image: radial-gradient(#c2c6d8 0.5px, transparent 0.5px);
    background-size: 24px 24px;
}

/* Custom scrollbar for technical feel */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f7f9fb;
    border-left: 1px solid #c2c6d8;
}

::-webkit-scrollbar-thumb {
    background: #c2c6d8;
}

::-webkit-scrollbar-thumb:hover {
    background: #727787;
}

/* Page entrance */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slow ping (statut "live") */
@keyframes ping-slow {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    75%,
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.animate-ping-slow {
    animation: ping-slow 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* Syntax highlighting (palette claire du portfolio) */
.code-block {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.7;
    color: #424655;
    white-space: pre;
    overflow-x: auto;
}

.code-block .kw { color: #0056c6; font-weight: 600; }
.code-block .fn { color: #00429c; }
.code-block .str { color: #006e0b; }
.code-block .num { color: #b3261e; }
.code-block .cm { color: #727787; font-style: italic; }
.code-block .ln { color: #c2c6d8; user-select: none; }

/* Sidebar sub-links (scrollspy) */
.toc-link.active {
    color: #0056c6;
    border-left-color: #0056c6;
    background: #f2f4f6;
}

/* Scroll offset under the sticky top bar */
section[id] {
    scroll-margin-top: 80px;
}

/* Sensor chain animation (hero diagram) */
.bus-line {
    stroke-dasharray: 4 4;
    animation: dash 20s linear infinite;
}

@keyframes dash {
    to {
        stroke-dashoffset: -400;
    }
}

/* Protocol timeline */
.timeline-item {
    position: relative;
    padding-left: 28px;
    padding-bottom: 24px;
    border-left: 2px solid #c2c6d8;
}

.timeline-item:last-child {
    border-left-color: transparent;
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 2px;
    width: 12px;
    height: 12px;
    background: #ffffff;
    border: 2px solid #0056c6;
}

/* Simulator slider */
.range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: #c2c6d8;
    outline: none;
}

.range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #0056c6;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px #0056c6;
    cursor: pointer;
}

.range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #0056c6;
    border: 2px solid #ffffff;
    border-radius: 0;
    box-shadow: 0 0 0 1px #0056c6;
    cursor: pointer;
}

.range:focus-visible::-webkit-slider-thumb {
    box-shadow: 0 0 0 3px #d9e2ff, 0 0 0 4px #0056c6;
}
