/* =========================================
   Service Panel — Slide-in Sobre & Premium
   ========================================= */

/* Overlay */
.service-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(15, 23, 42, 0);
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
    visibility: hidden;
    transition: background 0.4s ease, backdrop-filter 0.4s ease, visibility 0s 0.4s;
}

.service-overlay.active {
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    visibility: visible;
    transition: background 0.4s ease, backdrop-filter 0.4s ease, visibility 0s 0s;
}

/* Panel — slide from right */
.service-panel {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 2001;
    width: 100%;
    max-width: 520px;
    height: 100vh;
    height: 100dvh;
    background: var(--color-white);
    transform: translateX(100%);
    transition: transform 0.45s cubic-bezier(0.32, 0.72, 0, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -20px 0 60px -15px rgba(0, 0, 0, 0.15);
}

.service-panel.active {
    transform: translateX(0);
}

/* Close button */
.service-panel-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: var(--color-white);
    color: var(--color-text-light);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.service-panel-close:hover {
    border-color: var(--color-secondary);
    color: var(--color-secondary);
}

.service-panel-close svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Scrollable content area */
.service-panel-scroll {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 3rem 2.5rem 2rem;
}

/* Detail block */
.service-detail {
    display: none;
}

.service-detail.active {
    display: block;
    animation: svcFadeIn 0.4s 0.15s ease both;
}

@keyframes svcFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- Header ---- */
.service-detail-header {
    margin-bottom: 2rem;
}

.service-detail-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--color-bg-light);
    border: 1px solid #e2e8f0;
    color: var(--color-primary);
    margin-bottom: 1.25rem;
}

.service-detail-icon svg {
    width: 24px;
    height: 24px;
}

.service-detail-icon.icon-urgent {
    color: #DC2626;
    background: #FEF2F2;
    border-color: #FECACA;
}

.service-detail-header h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-secondary);
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 0.4rem;
}

.service-detail-header p {
    font-size: 0.95rem;
    color: var(--color-text-light);
    margin-bottom: 0;
    line-height: 1.5;
}

/* ---- Divider ---- */
.service-detail-divider {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 0 0 1.75rem;
}

/* ---- Body ---- */
.service-detail-body p {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--color-text);
    margin-bottom: 1.25rem;
}

/* Prestations list */
.service-detail-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.75rem;
    display: grid;
    gap: 0;
}

.service-detail-list li {
    position: relative;
    padding: 0.7rem 0 0.7rem 2rem;
    font-size: 0.925rem;
    font-weight: 500;
    color: var(--color-text);
    line-height: 1.5;
    border-bottom: 1px solid #f1f5f9;
}

.service-detail-list li:last-child {
    border-bottom: none;
}

.service-detail-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 1.05rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-primary);
    opacity: 0.7;
}

/* ---- Footer / CTA ---- */
.service-detail-footer {
    padding: 1.5rem 2.5rem;
    border-top: 1px solid #e2e8f0;
    background: var(--color-bg-light);
}

.service-detail-footer .btn {
    width: 100%;
    justify-content: center;
    font-size: 0.9rem;
    padding: 0.85rem 1.5rem;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .service-panel {
        max-width: 100%;
        border-radius: 0;
    }

    .service-panel-scroll {
        padding: 2.5rem 1.5rem 1.5rem;
        -webkit-overflow-scrolling: touch;
    }

    .service-detail-header h2 {
        font-size: 1.45rem;
    }

    .service-detail-footer {
        padding: 1.25rem 1.5rem;
        padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
    }
}

/* S'assurer que la modal est au-dessus du sticky CTA mobile */
.service-overlay.active ~ .sticky-mobile-cta,
body .sticky-mobile-cta {
    z-index: 998;
}