/* ===================================
   Shampooclean - Design System CSS
   Compatible with Tailwind CSS CDN
   UI/UX Pro Max optimized
   =================================== */

/* ── Base ── */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.7;
}

/* ── Typography ── */
.text-h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    font-weight: 700;
    color: #0F172A;
}

.text-h2 {
    font-size: 2rem;
    line-height: 1.25;
    font-weight: 700;
    color: #0F172A;
}

.text-h3 {
    font-size: 1.25rem;
    line-height: 1.4;
    font-weight: 600;
    color: #0F172A;
}

@media (max-width: 640px) {
    .text-h1 { font-size: 2rem; }
    .text-h2 { font-size: 1.5rem; }
}

/* ── Navigation Links ── */
.nav-link {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #1F2937;
    border-radius: 8px;
    cursor: pointer;
    transition: color 200ms ease, background-color 200ms ease;
}

.nav-link:hover {
    color: #0A65DE;
    background-color: rgba(10, 101, 222, 0.05);
}

.nav-link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px #0A65DE;
    border-radius: 8px;
}

.nav-link-active {
    color: #0A65DE;
    background-color: rgba(10, 101, 222, 0.05);
}

.mobile-nav-link {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: #1F2937;
    border-radius: 8px;
    cursor: pointer;
    transition: color 200ms ease, background-color 200ms ease;
}

.mobile-nav-link:hover {
    color: #0A65DE;
    background-color: rgba(10, 101, 222, 0.05);
}

.mobile-nav-link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px #0A65DE;
    border-radius: 8px;
}

.mobile-nav-link-active {
    color: #0A65DE;
    background-color: rgba(10, 101, 222, 0.1);
}

/* ── Floating Navbar ── */
#navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: box-shadow 200ms ease;
}

.navbar-scrolled {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* ── Buttons — Primary CTA (Orange for conversion) ── */
.sc-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background-color: #F97316;
    color: #FFFFFF;
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: background-color 200ms ease, box-shadow 200ms ease;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.sc-btn-primary:hover {
    background-color: #EA580C;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.sc-btn-primary:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px #F97316;
}

.sc-btn-primary:active {
    background-color: #C2410C;
}

/* ── Buttons — Primary Blue ── */
.sc-btn-primary-blue {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background-color: #0A65DE;
    color: #FFFFFF;
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: background-color 200ms ease, box-shadow 200ms ease;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.sc-btn-primary-blue:hover {
    background-color: #0852B5;
    box-shadow: 0 4px 12px rgba(10, 101, 222, 0.3);
}

.sc-btn-primary-blue:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px #0A65DE;
}

.sc-btn-primary-blue:active {
    background-color: #064199;
}

/* ── Buttons — Outline ── */
.sc-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: 2px solid #0A65DE;
    color: #0A65DE;
    font-weight: 600;
    border-radius: 8px;
    transition: background-color 200ms ease, color 200ms ease, box-shadow 200ms ease;
    text-decoration: none;
    background: transparent;
    cursor: pointer;
}

.sc-btn-outline:hover {
    background-color: #0A65DE;
    color: #FFFFFF;
}

.sc-btn-outline:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px #0A65DE;
}

.sc-btn-outline:active {
    background-color: #0852B5;
    color: #FFFFFF;
}

/* ── Buttons — Outline White ── */
.sc-btn-outline-white {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: 2px solid #FFFFFF;
    color: #FFFFFF;
    font-weight: 600;
    border-radius: 8px;
    transition: background-color 200ms ease, color 200ms ease, box-shadow 200ms ease;
    text-decoration: none;
    background: transparent;
    cursor: pointer;
}

.sc-btn-outline-white:hover {
    background-color: #FFFFFF;
    color: #0A65DE;
}

.sc-btn-outline-white:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3), 0 0 0 4px #FFFFFF;
}

.sc-btn-outline-white:active {
    background-color: rgba(255, 255, 255, 0.9);
    color: #0A65DE;
}

/* ── Cards ── */
.sc-card {
    background-color: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid #F3F4F6;
    padding: 1.5rem;
    cursor: pointer;
    transition: box-shadow 200ms ease;
}

.sc-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.sc-card:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px #0A65DE;
}

/* ── Service Cards ── */
.service-card {
    background-color: #FFFFFF;
    border-radius: 16px;
    border-width: 2px;
    border-style: solid;
    padding: 2rem;
    cursor: pointer;
    transition: box-shadow 200ms ease;
}

.service-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.service-card:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px #0A65DE;
}

/* ── Testimonial Cards ── */
.testimonial-card {
    background-color: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid #F3F4F6;
    padding: 1.5rem;
    transition: box-shadow 200ms ease;
}

.testimonial-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

/* ── Section Headings ── */
.sc-section-title {
    font-family: "Poppins", sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #0A65DE;
    margin-bottom: 1rem;
}

.sc-section-subtitle {
    font-size: 1.125rem;
    color: #475569;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

/* ── Form Elements ── */
.sc-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    color: #1F2937;
    font-family: "Poppins", sans-serif;
    font-size: 0.875rem;
    transition: border-color 200ms ease, box-shadow 200ms ease;
    background-color: #FFFFFF;
}

.sc-input::placeholder {
    color: #9CA3AF;
}

.sc-input:focus {
    outline: none;
    border-color: #0A65DE;
    box-shadow: 0 0 0 2px rgba(10, 101, 222, 0.2), 0 0 0 4px rgba(10, 101, 222, 0.1);
}

.sc-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #0F172A;
    margin-bottom: 0.25rem;
}

.sc-error {
    color: #DC2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

select.sc-input {
    cursor: pointer;
}

textarea.sc-input {
    line-height: 1.6;
}

/* ── Badge ── */
.sc-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* ── Stars ── */
.sc-stars {
    color: #F59E0B;
    letter-spacing: 2px;
}

/* ── Before/After Slider ── */
.ba-slider {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    cursor: col-resize;
}

.ba-slider .ba-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
}

.ba-slider .ba-after img {
    width: auto;
    min-width: 100%;
    height: 100%;
    object-fit: cover;
}

.ba-slider .ba-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: white;
    transform: translateX(-50%);
    z-index: 10;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

.ba-slider .ba-handle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%230A65DE' viewBox='0 0 24 24'%3E%3Cpath d='M8 5l-5 7 5 7M16 5l5 7-5 7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px;
}

/* ── Progress Steps ── */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 700;
    transition: background-color 200ms ease, color 200ms ease;
}

.step-indicator.active {
    background-color: #0A65DE;
    color: #FFFFFF;
}

.step-indicator.completed {
    background-color: #2EAAB3;
    color: #FFFFFF;
}

.step-indicator.inactive {
    background-color: #E5E7EB;
    color: #6B7280;
}

.step-line {
    flex: 1;
    height: 0.25rem;
    margin: 0 0.5rem;
    border-radius: 9999px;
    transition: background-color 200ms ease;
}

.step-line.active {
    background-color: #0A65DE;
}

.step-line.inactive {
    background-color: #E5E7EB;
}

/* ── Rounded Utilities ── */
.rounded-card {
    border-radius: 16px;
}

.rounded-btn {
    border-radius: 8px;
}

/* ── Animate on Scroll ── */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Loading Spinner ── */
.sc-spinner {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #FFFFFF;
    border-radius: 9999px;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Counter ── */
.counter {
    font-size: 2.25rem;
    font-weight: 700;
    color: #0A65DE;
}

/* ── Admin Cards ── */
.admin-card {
    background-color: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #E5E7EB;
    padding: 1.5rem;
}

/* ── Status Badges ── */
.badge-attente {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    background-color: #FEF3C7;
    color: #92400E;
}

.badge-accepte {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    background-color: #D1FAE5;
    color: #065F46;
}

.badge-refuse {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    background-color: #FEE2E2;
    color: #991B1B;
}

/* ── Hero Comparison Slider ── */
.sc-hero-cmp {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: 8px;
    overflow: hidden;
    cursor: ew-resize;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}
.sc-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    will-change: clip-path;
}
.sc-hero-img-avant { clip-path: inset(0 50% 0 0); }
.sc-hero-img-apres { clip-path: inset(0 0 0 50%); }
.sc-hero-ovl {
    position: absolute;
    top: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    border-radius: 100px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: none;
    z-index: 5;
    color: #fff;
}
.sc-hero-ovl-avant { left: 10px; background: rgba(0,0,0,0.55); }
.sc-hero-ovl-apres { right: 10px; background: rgba(10,101,222,0.80); }
.sc-hero-handle {
    position: absolute;
    top: 0; bottom: 0;
    width: 2px;
    background: rgba(255,255,255,0.95);
    z-index: 10;
    pointer-events: none;
    left: 50%;
    transform: translateX(-50%);
    will-change: left;
}
.sc-hero-handle-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px; height: 44px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 16px rgba(0,0,0,0.3);
    color: #0A65DE;
}
.sc-hero-hint {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 100px;
    backdrop-filter: blur(4px);
    pointer-events: none;
    z-index: 5;
    transition: opacity 400ms ease;
    white-space: nowrap;
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .fade-in {
        opacity: 1;
        transform: none;
    }
}
