/* ─── Widget Chrono / Minuteur de repos OlivIA ─────────────────── */
.ol-timer-card {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(10, 15, 29, 0.98));
    border: 1.5px solid rgba(255, 138, 0, 0.45);
    border-radius: 16px;
    padding: 1rem 1.15rem;
    margin: 0.75rem 0;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 138, 0, 0.15);
    color: #f1f5f9;
    font-family: inherit;
    max-width: 360px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.ol-timer-card.running {
    border-color: rgba(255, 138, 0, 0.85);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.6), 0 0 22px rgba(255, 138, 0, 0.35);
}

.ol-timer-card.finished {
    border-color: #22c55e;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.6), 0 0 25px rgba(34, 197, 94, 0.45);
    animation: ol-pulse-green 1.5s infinite;
}

@keyframes ol-pulse-green {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.ol-timer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 0.85rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ol-timer-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 138, 0, 0.18);
    color: #ff8a00;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 9999px;
    border: 1px solid rgba(255, 138, 0, 0.35);
}

.ol-timer-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #f8fafc;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ol-timer-sound-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
}

.ol-timer-sound-btn:hover {
    color: #ff8a00;
    background: rgba(255, 255, 255, 0.06);
}

.ol-timer-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 0.5rem 0 1rem;
}

.ol-timer-ring-wrap {
    position: relative;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ol-timer-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ol-timer-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 7;
}

.ol-timer-progress {
    fill: none;
    stroke: #ff8a00;
    stroke-width: 7;
    stroke-linecap: round;
    stroke-dasharray: 326.7;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.25s linear, stroke 0.3s ease;
}

.ol-timer-card.finished .ol-timer-progress {
    stroke: #22c55e;
}

.ol-timer-time-wrap {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.ol-timer-time {
    font-size: 2.1rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
    color: #ffffff;
    text-shadow: 0 0 15px rgba(255, 138, 0, 0.35);
}

.ol-timer-sub {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #94a3b8;
    margin-top: -2px;
}

.ol-timer-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    width: 100%;
}

.ol-preset-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ol-preset-btn:hover {
    background: rgba(255, 138, 0, 0.15);
    border-color: rgba(255, 138, 0, 0.4);
    color: #ff8a00;
}

.ol-preset-btn.active {
    background: #ff8a00;
    border-color: #ff8a00;
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 0 10px rgba(255, 138, 0, 0.4);
}

.ol-timer-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.ol-ctrl-btn {
    border: none;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.ol-ctrl-primary {
    background: linear-gradient(135deg, #ff8a00, #ff5e00);
    color: #ffffff;
    padding: 8px 18px;
    font-size: 0.92rem;
    box-shadow: 0 4px 12px rgba(255, 138, 0, 0.35);
    flex: 1;
}

.ol-ctrl-primary:hover {
    background: linear-gradient(135deg, #ffa02e, #ff711f);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 138, 0, 0.5);
}

.ol-ctrl-primary:active {
    transform: translateY(0);
}

.ol-ctrl-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #e2e8f0;
    padding: 8px 12px;
}

.ol-ctrl-secondary:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.ol-timer-status {
    text-align: center;
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 0.6rem;
    font-weight: 500;
}

/* Mini barre flottante PIP */
#olivia-timer-pip {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 10050;
    background: rgba(15, 23, 42, 0.95);
    border: 1.5px solid rgba(255, 138, 0, 0.75);
    border-radius: 9999px;
    padding: 6px 14px;
    display: none;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 16px rgba(255, 138, 0, 0.3);
    backdrop-filter: blur(10px);
    color: #ffffff;
    cursor: pointer;
    animation: ol-slide-up 0.3s ease;
}

@keyframes ol-slide-up {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

#olivia-timer-pip .pip-time {
    font-size: 1.05rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #ff8a00;
}

#olivia-timer-pip .pip-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #cbd5e1;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#olivia-timer-pip button {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #ffffff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    transition: background 0.2s ease;
}

#olivia-timer-pip button:hover {
    background: #ff8a00;
}
