/* =========================================================
   MEDICLIC ULTRA PREMIUM 2026 - MOBILE FIRST RADICAL
   ========================================================= */

:root {
    --mc-primary: #2563eb;
    --mc-primary-hover: #1d4ed8;
    --mc-success: #16a34a;
    --mc-danger: #dc2626;
    --mc-bg-page: #f8fafc;
    --mc-bg-card: #ffffff;
    --mc-text-main: #0f172a;
    --mc-text-muted: #64748b;
    --mc-border: #e2e8f0;
    --mc-radius: 18px;
    --mc-shadow-sm: 0 4px 10px rgba(0,0,0,0.04);
    --mc-shadow-lg: 0 20px 40px rgba(0,0,0,0.08);
}

/* =========================================================
   BASE & SCROLLBAR (Ajout Gold Standard)
   ========================================================= */

body {
    background: var(--mc-bg-page);
    color: var(--mc-text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--mc-bg-page);
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* =========================================================
   STICKY SEARCHBAR
   ========================================================= */

.mc-sticky-searchbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--mc-border);
    transition: all 0.3s ease;
}

/* =========================================================
   INPUT GROUP
   ========================================================= */

.mc-input-group {
    position: relative;
}

.mc-input-group i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--mc-text-muted);
}
.mc-input-group #clearAiSearch i {
    position: static !important;
    transform: none !important;
}

.mc-input-group .form-control,
.mc-input-group .form-select {
    padding-left: 38px;
    height: 48px;
    border-radius: 14px;
    border: 1px solid var(--mc-border);
    background: #f1f5f9;
    transition: all 0.2s ease;
}

.mc-input-group .form-control:focus,
.mc-input-group .form-select:focus {
    background: #fff;
    border-color: var(--mc-primary);
    box-shadow: 0 0 0 4px rgba(37,99,235,0.12);
}

/* =========================================================
   DOCTOR CARD ULTRA PREMIUM
   ========================================================= */

.mc-doctor-card {
    background: var(--mc-bg-card);
    border-radius: var(--mc-radius);
    border: 1px solid var(--mc-border);
    box-shadow: var(--mc-shadow-sm);
    transition: all 0.35s cubic-bezier(.4,0,.2,1);
    overflow: hidden;
    opacity: 0;
    transform: translateY(12px);
    animation: mcCardFade 0.45s ease forwards;
}

/* Effet cascade pour les résultats (animation en séquence) */
.mc-doctor-card:nth-child(1) { animation-delay: 0.05s; }
.mc-doctor-card:nth-child(2) { animation-delay: 0.1s; }
.mc-doctor-card:nth-child(3) { animation-delay: 0.15s; }
.mc-doctor-card:nth-child(4) { animation-delay: 0.2s; }

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

.mc-doctor-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--mc-shadow-lg);
    border-color: #cbd5e1;
}

/* Ajout Gold : Style d'avatar premium */
.mc-doctor-avatar {
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 4px 6px rgba(0,0,0,0.06);
}

/* =========================================================
   SLOT BUTTONS
   ========================================================= */

.mc-slot-btn {
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.mc-slot-btn:hover {
    transform: translateY(-2px);
    background: var(--mc-primary);
    color: #fff;
}

.mc-slot-btn.active {
    background: var(--mc-primary);
    color: #fff;
    border-color: var(--mc-primary);
}

/* =========================================================
   MAP PRICE MARKER & HOVER SYNC (Ajout Gold Standard)
   ========================================================= */

.mc-map-price {
    background: var(--mc-primary);
    color: #fff;
    padding: 5px 12px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
    box-shadow: 0 6px 14px rgba(0,0,0,0.15);
    transition: all 0.2s cubic-bezier(.4,0,.2,1);
}

.mc-map-price:hover, .mc-map-price.highlight {
    transform: scale(1.15);
    background: var(--mc-text-main); /* Noir élégant au survol */
    z-index: 1000 !important;
}

/* =========================================================
   CHIPS
   ========================================================= */

.mc-chip {
    display: inline-flex;
    align-items: center;
    background: #e2e8f0;
    color: #334155;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    margin: 4px 6px 4px 0;
}

/* =========================================================
   BADGES PREMIUM
   ========================================================= */

.badge.bg-success {
    background: var(--mc-success) !important;
}

.badge.bg-danger {
    background: var(--mc-danger) !important;
}

/* =========================================================
   SKELETON
   ========================================================= */

.mc-skeleton-card {
    pointer-events: none;
}

.skeleton-avatar,
.skeleton-line {
    background: linear-gradient(90deg,#e2e8f0 25%,#f1f5f9 50%,#e2e8f0 75%);
    background-size: 200% 100%;
    animation: skeleton 1.4s infinite linear;
}

@keyframes skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* =========================================================
   ACCESSIBILITY
   ========================================================= */

button:focus,
a:focus {
    outline: 3px solid rgba(37,99,235,0.4);
    outline-offset: 2px;
}

/* =========================================================
   MOBILE FIRST RADICAL
   ========================================================= */

@media (max-width: 991.98px) {

    body {
        font-size: 15px;
    }

    .mc-sticky-searchbar {
        backdrop-filter: none;
        background: #fff;
    }

    .mc-doctor-card {
        border-radius: 14px;
        box-shadow: none;
        border: 1px solid var(--mc-border);
    }

    .mc-doctor-card:hover {
        transform: none;
        box-shadow: var(--mc-shadow-sm);
        border-color: var(--mc-border);
    }

    .mc-sticky-map-container {
        display: none;
    }

    .btn-lg {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    /* Sticky bottom booking CTA mobile */
    .mc-mobile-sticky-cta {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: #fff;
        border-top: 1px solid var(--mc-border);
        padding: 15px 20px;
        box-shadow: 0 -10px 25px rgba(0,0,0,0.08);
        z-index: 1030;
    }
}

/* =========================================================
   MARQUEUR UTILISATEUR (EFFET RADAR)
   ========================================================= */
.mc-user-location-pin {
    position: relative;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mc-user-location-pin .dot {
    width: 18px;
    height: 18px;
    background-color: var(--mc-primary);
    border: 3px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    z-index: 2;
}
.mc-user-location-pin .pulse {
    position: absolute;
    width: 50px;
    height: 50px;
    background-color: rgba(37, 99, 235, 0.4);
    border-radius: 50%;
    z-index: 1;
    animation: mcPulseRadar 2s infinite cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes mcPulseRadar {
    0% { transform: scale(0.4); opacity: 1; }
    100% { transform: scale(1.4); opacity: 0; }
}

/* CSS pour le Pin Personnalisé */
.mc-map-price-tag {
    background-color: #2563eb;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 12px;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
    position: relative;
    text-align: center;
    white-space: nowrap;
    transition: transform 0.2s ease, background-color 0.2s ease;
}
.mc-map-price-tag::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px 5px 0;
    border-style: solid;
    border-color: #2563eb transparent transparent transparent;
    display: block;
    width: 0;
}
.mc-map-price-tag:hover {
    transform: scale(1.15) translateY(-2px);
    background-color: #1d4ed8;
    z-index: 1000 !important;
}
.mc-map-price-tag:hover::after {
    border-color: #1d4ed8 transparent transparent transparent;
}

/* Animation de la carte lors du focus */
.mc-doctor-card {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease, border-color 0.4s ease !important;
}
.mc-card-highlight {
    border-color: #2563eb !important;
    box-shadow: 0 20px 40px -10px rgba(37, 99, 235, 0.2) !important;
    transform: scale(1.02);
    z-index: 10;
    position: relative;
}

/* 1. Autocomplete IA */
.mc-ai-dropdown {
    max-height: 380px;
    overflow-y: auto;
    border: 1px solid var(--mc-border);
}
.mc-ai-item:hover, .mc-ai-item:focus {
    background-color: rgba(37, 99, 235, 0.04) !important;
    outline: none;
}
.group-hover-border:focus-within {
    border-color: var(--mc-primary) !important;
    background-color: #fff !important;
    box-shadow: 0 0 0 4px rgba(37,99,235,0.1);
}

/* 2. Carrousel de Créneaux (3 jours) */
.mc-carousel-viewport {
    /* Léger fondu sur les bords pour l'effet carrousel */
    mask-image: linear-gradient(to right, transparent, black 3%, black 97%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 3%, black 97%, transparent);
}
.mc-carousel-track {
    will-change: transform;
}
.mc-day-column {
    min-width: 0; /* Sécurité flexbox */
}

/* 3. Marqueur Map Google (Flèche pointant vers le bas) */
.mc-map-price::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: var(--mc-primary) transparent transparent transparent;
    transition: all 0.2s cubic-bezier(.4,0,.2,1);
}
/* Quand le JS remplace la classe bg-primary par bg-dark au survol */
.mc-map-price.bg-dark::after {
    border-color: #212529 transparent transparent transparent; 
}

/* 4. Utilitaires  Micro-interactions */
.h-48px { height: 48px !important; }
.w-15px { width: 15px !important; }
.transition-transform { transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important; }
.transition-all { transition: all 0.2s ease !important; }
.hover-scale:hover { transform: scale(1.05); }
.hover-border-primary:hover { border-color: var(--mc-primary) !important; }
.empty-hide:empty { display: none !important; }
.letter-spacing-1 { letter-spacing: 0.5px; }
.cursor-pointer { cursor: pointer; }
.z-index-1020 { z-index: 1020; }
.object-fit-cover { object-fit: cover; }
.hover-bg-danger-20:hover { background-color: rgba(220, 38, 38, 0.15) !important; }

/* Override Odoo pour éviter que le tooltip masque la dropdown IA */
.tooltip { z-index: 2050 !important; }