@keyframes pulse-orange {
    0% { box-shadow: 0 0 0 0 rgba(234, 88, 12, 0.7); border-color: #ea580c; }
    70% { box-shadow: 0 0 0 10px rgba(234, 88, 12, 0); border-color: #fb923c; }
    100% { box-shadow: 0 0 0 0 rgba(234, 88, 12, 0); border-color: #ea580c; }
}
.sync-active {
    animation: pulse-orange 2s infinite;
    border-width: 3px;
}

/* Masquer les flèches pour Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Masquer les flèches pour Firefox */
input[type=number] {
    -moz-appearance: textfield;
}

/* --- Tutoriel onboarding --- */
.onboarding-overlay {
    position: fixed;
    inset: 0;
    z-index: 55;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.onboarding-overlay.onboarding-active {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
}

.onboarding-spotlight {
    position: fixed;
    border-radius: 12px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.78);
    pointer-events: none;
    transition: top 0.2s ease, left 0.2s ease, width 0.2s ease, height 0.2s ease;
}

.onboarding-target-active {
    border-radius: 8px;
}

.onboarding-tooltip {
    position: fixed;
    z-index: 56;
    background-color: #1c1c1e;
    border-radius: 14px;
    padding: 1rem 1.125rem 0.875rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
    transition: top 0.2s ease, left 0.2s ease;
    --caret-left: 50%;
}

.onboarding-tooltip::before {
    content: '';
    position: absolute;
    top: -7px;
    left: var(--caret-left);
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #1c1c1e;
}

.onboarding-tooltip-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.375rem;
}

.onboarding-tooltip-text {
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #d1d5db;
}

.onboarding-tooltip-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 0.75rem;
}

.onboarding-progress {
    display: flex;
    align-items: center;
    gap: 6px;
}

.onboarding-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 9999px;
    background-color: #4b5563;
    transition: all 0.2s ease;
}

.onboarding-dot-active {
    width: 18px;
    background-color: #ffffff;
}

.onboarding-dot-done {
    background-color: #9ca3af;
}

.onboarding-next-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 9999px;
    background-color: #ffffff;
    color: #111827;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.onboarding-next-btn:hover {
    background-color: #f3f4f6;
    transform: scale(1.05);
}

.onboarding-next-btn svg {
    width: 18px;
    height: 18px;
}

/* --- Questionnaire facteurs (onboarding première connexion) --- */
.factors-onboarding-panel {
    max-height: min(92vh, 720px);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.factors-onboarding-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .factors-onboarding-options {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1rem;
    }
}

.factors-onboarding-option {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 3.5rem;
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    border: 2px solid #374151;
    background-color: #111827;
    color: #e5e7eb;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

@media (min-width: 768px) {
    .factors-onboarding-option {
        min-height: 5.5rem;
        font-size: 1rem;
        padding: 1.25rem 1rem;
    }
}

.factors-onboarding-option:hover {
    border-color: #f97316;
    background-color: rgba(249, 115, 22, 0.08);
    color: #fff;
}

.factors-onboarding-option:active {
    transform: scale(0.98);
}

.factors-onboarding-option-selected {
    border-color: #f97316;
    background: linear-gradient(180deg, rgba(249, 115, 22, 0.18) 0%, rgba(249, 115, 22, 0.08) 100%);
    color: #fff;
    box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.35), 0 8px 24px rgba(249, 115, 22, 0.12);
}

/* --- Barre de calibration du profil (page séances) --- */
.calibration-bar-track {
    height: 0.625rem;
    background-color: #374151;
    border-radius: 9999px;
    overflow: hidden;
}

.calibration-bar-fill {
    height: 100%;
    border-radius: 9999px;
    background-color: #ef4444;
    transition: width 0.45s ease, background-color 0.45s ease;
}