/**
 * Desktop Premium UX/UI
 * Fullstack Design Excellence
 */

@media (min-width: 769px) {
    /* ========================================
       DESKTOP FULLSTACK LAYOUT (Horizontal)
       Calendar left (plus petit), Slots right (plus grand) - FULL WIDTH
       ======================================== */
    .calendar-desktop {
        display: grid !important;
        grid-template-columns: 420px 1fr;
        gap: 32px;
        align-items: start;
        width: 100%;
        max-width: 1400px !important;
        margin: 0 auto;
    }
    
    .calendar-view {
        display: block !important;
        width: 100%;
        height: auto;
        padding: 0;
        animation: none !important;
    }
    
    .calendar-view .calendar {
        background: white;
        border: 2px solid #e5e7eb;
        border-radius: 14px;
        padding: 28px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }
    
    .calendar-view .calendar-header {
        margin-bottom: 20px !important;
    }
    
    .calendar-view .calendar-header h2 {
        font-size: 22px !important;
        font-weight: 700 !important;
    }
    
    .calendar-view .calendar-grid {
        gap: 10px !important;
    }
    
    .calendar-view .day {
        font-size: 16px !important;
        min-height: 44px !important;
        border-radius: 8px !important;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
        cursor: pointer;
    }
    
    .calendar-view .day:not(.empty):not(.disabled):hover {
        background: #eff6ff !important;
        transform: scale(1.05) !important;
        box-shadow: 0 2px 8px rgba(40, 89, 204, 0.15) !important;
    }
    
    .calendar-view .day.selected {
        background: linear-gradient(135deg, #2859CC 0%, #1e40af 100%) !important;
        color: white !important;
        font-weight: 700 !important;
        box-shadow: 0 4px 12px rgba(40, 89, 204, 0.35) !important;
        transform: scale(1.08) !important;
    }
    
    .calendar-view .day.today:not(.selected) {
        background: #fef3c7 !important;
        color: #92400e !important;
        font-weight: 600 !important;
        border: 2px solid #fbbf24 !important;
    }
    
    .calendar-view .day-header {
        font-size: 13px !important;
        font-weight: 700 !important;
        padding: 10px 0 !important;
        color: #6b7280 !important;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .slots-view {
        display: block !important;
        width: 100%;
        height: auto;
        padding: 0;
        animation: none !important;
    }
    
    /* Désactiver les animations de slide */
    .calendar-view.slide-out {
        display: block !important;
    }
    
    .slots-view.slide-in {
        display: block !important;
        animation: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
    
    /* Masquer le bouton "retour au calendrier" sur desktop */
    .slots-view .back-to-calendar {
        display: none !important;
    }
    
    /* Style du conteneur créneaux */
    .slots-view .time-section {
        background: white;
        border: 2px solid #e5e7eb;
        border-radius: 14px;
        padding: 24px;
        width: 100%;
        max-height: 600px;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    
    .slots-view h3 {
        font-size: 20px;
        font-weight: 700;
        color: #111827;
        margin: 0 0 8px 0;
    }
    
    .slots-view .date-text {
        font-size: 14px;
        color: #6b7280;
        margin: 0 0 20px 0;
        font-weight: 500;
    }
    
    /* État vide - Message élégant */
    .slots-view .no-slots {
        grid-column: 1 / -1;
        text-align: center;
        padding: 60px 40px;
        background: linear-gradient(135deg, #f8fbff 0%, #f0f7ff 100%);
        border-radius: 12px;
        border: 2px dashed #bfdbfe;
    }
    
    .slots-view .no-slots-icon {
        width: 80px;
        height: 80px;
        margin: 0 auto 20px;
        background: linear-gradient(135deg, #2859CC 0%, #1e40af 100%);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 8px 24px rgba(40, 89, 204, 0.25);
        animation: pulse 2s ease-in-out infinite;
    }
    
    @keyframes pulse {
        0%, 100% {
            transform: scale(1);
            box-shadow: 0 8px 24px rgba(40, 89, 204, 0.25);
        }
        50% {
            transform: scale(1.05);
            box-shadow: 0 12px 32px rgba(40, 89, 204, 0.35);
        }
    }
    
    .slots-view .no-slots-icon i {
        font-size: 36px;
        color: white;
    }
    
    .slots-view .no-slots h4 {
        font-size: 20px;
        font-weight: 700;
        color: #111827;
        margin: 0 0 8px 0;
    }
    
    .slots-view .no-slots p {
        font-size: 14px;
        color: #6b7280;
        margin: 0;
        line-height: 1.6;
    }
    
    /* Grille des créneaux sur desktop - 3 colonnes avec plus d'espace */
    .slots-view .time-slots {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        max-height: none;
        overflow: hidden;
    }
    
    
    /* Créneaux lisibles sur une seule ligne */
    .slots-view .time-slot {
        padding: 12px 10px;
        font-size: 14px;
        font-weight: 600;
        min-height: 46px;
        height: 46px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: white;
        border: 2px solid #e5e7eb;
        border-radius: 8px;
        color: #374151;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        animation: slotFadeIn 0.4s ease-out backwards;
        white-space: nowrap;
        overflow: hidden;
        line-height: 1;
    }
    
    .slots-view .time-slot .slot-time {
        display: inline-block;
        white-space: nowrap;
    }
    
    @keyframes slotFadeIn {
        from {
            opacity: 0;
            transform: translateY(8px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .slots-view .time-slot:nth-child(1) { animation-delay: 0.03s; }
    .slots-view .time-slot:nth-child(2) { animation-delay: 0.06s; }
    .slots-view .time-slot:nth-child(3) { animation-delay: 0.09s; }
    .slots-view .time-slot:nth-child(4) { animation-delay: 0.12s; }
    .slots-view .time-slot:nth-child(5) { animation-delay: 0.15s; }
    .slots-view .time-slot:nth-child(6) { animation-delay: 0.18s; }
    .slots-view .time-slot:nth-child(7) { animation-delay: 0.21s; }
    .slots-view .time-slot:nth-child(8) { animation-delay: 0.24s; }
    .slots-view .time-slot:nth-child(9) { animation-delay: 0.27s; }
    .slots-view .time-slot:nth-child(10) { animation-delay: 0.30s; }
    
    .slots-view .time-slot:hover:not(.disabled):not(.unavailable) {
        background: #eff6ff;
        border-color: #2859CC;
        color: #2859CC;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(40, 89, 204, 0.2);
    }
    
    .slots-view .time-slot.selected {
        background: linear-gradient(135deg, #2859CC 0%, #1e40af 100%);
        border-color: #2859CC;
        color: white;
        box-shadow: 0 6px 16px rgba(40, 89, 204, 0.35);
        transform: scale(1.05);
    }
    
    .slots-view .time-slot.disabled,
    .slots-view .time-slot.unavailable {
        opacity: 0.4;
        cursor: not-allowed;
        background: #f9fafb;
        color: #9ca3af;
    }
    
    /* Badges de période */
    .slots-view .period-badge {
        grid-column: 1 / -1;
        padding: 8px 14px;
        font-size: 12px;
        margin-top: 12px;
        margin-bottom: 4px;
        font-weight: 700;
        background: linear-gradient(135deg, #f8fbff 0%, #eff6ff 100%);
        border: 1px solid #bfdbfe;
        border-radius: 6px;
        color: #2859CC;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    /* ========================================
       STEP PANEL LAYOUT
       ======================================== */
    .step-panel {
        max-width: 1200px;
        margin: 0 auto;
    }
    
    /* ========================================
       PAGE HEADER PREMIUM
       ======================================== */
    .page-header {
        position: relative;
        overflow: hidden;
        margin-bottom: 32px !important;
        padding-bottom: 16px !important;
    }
    
    .page-header::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(circle at 100% 0%, rgba(40, 89, 204, 0.08) 0%, transparent 70%);
        pointer-events: none;
    }
    
    .page-header-content {
        position: relative;
        z-index: 1;
        display: flex;
        align-items: center;
        gap: 20px;
    }
    
    .page-icon {
        width: 56px !important;
        height: 56px !important;
        font-size: 28px !important;
        background: linear-gradient(135deg, #2859CC 0%, #1e40af 100%) !important;
        color: white !important;
        border-radius: 12px !important;
        box-shadow: 0 8px 16px rgba(40, 89, 204, 0.2) !important;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        animation: iconBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    
    @keyframes iconBounce {
        0% {
            transform: scale(0.3) rotateZ(-10deg);
            opacity: 0;
        }
        50% {
            transform: scale(1.05);
        }
        100% {
            transform: scale(1) rotateZ(0deg);
            opacity: 1;
        }
    }
    
    .page-header h1 {
        font-size: 32px !important;
        font-weight: 800 !important;
        color: #111827 !important;
        margin: 0 0 6px 0 !important;
        letter-spacing: -0.8px;
        background: linear-gradient(135deg, #111827 0%, #374151 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        animation: titleSlide 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
    }
    
    @keyframes titleSlide {
        from {
            opacity: 0;
            transform: translateX(-20px);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
    
    .page-header p {
        font-size: 15px !important;
        color: #6b7280 !important;
        margin: 0 !important;
        animation: subtitleFade 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
    }
    
    @keyframes subtitleFade {
        from {
            opacity: 0;
        }
        to {
            opacity: 1;
        }
    }
    
    /* ========================================
       FORM SECTIONS - Premium Cards
       ======================================== */
    .form-section {
        background: white;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        padding: 24px;
        margin-bottom: 24px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .form-section:hover {
        border-color: #2859CC;
        box-shadow: 0 8px 24px rgba(40, 89, 204, 0.08);
        transform: translateY(-2px);
    }
    
    .form-section-header {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 20px;
        padding-bottom: 16px;
        border-bottom: 2px solid #f3f4f6;
    }
    
    .form-section-icon {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
        color: #2859CC;
        border-radius: 10px;
        font-size: 18px;
        flex-shrink: 0;
    }
    
    .form-section-title {
        font-size: 16px;
        font-weight: 700;
        color: #111827;
    }
    
    .form-section-subtitle {
        font-size: 13px;
        color: #9ca3af;
    }
    
    /* ========================================
       INPUTS - Premium Design
       ======================================== */
    .form-group {
        margin-bottom: 16px;
    }
    
    .form-group label {
        display: block;
        font-size: 13px;
        font-weight: 600;
        color: #374151;
        margin-bottom: 6px;
        text-transform: uppercase;
        letter-spacing: 0.3px;
    }
    
    .input-wrapper {
        background: #f9fafb;
        border: 2px solid #e5e7eb;
        border-radius: 8px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .input-wrapper:focus-within {
        background: white;
        border-color: #2859CC;
        box-shadow: 0 0 0 3px rgba(40, 89, 204, 0.1);
    }
    
    .input-wrapper input,
    .input-wrapper textarea,
    .input-wrapper select {
        background: transparent !important;
        border: none !important;
        padding: 10px 14px 10px 0 !important;
        font-size: 14px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .input-wrapper input:focus,
    .input-wrapper textarea:focus,
    .input-wrapper select:focus {
        box-shadow: none;
        outline: none;
    }
    
    /* ========================================
       BUTTONS - Premium Styling
       ======================================== */
    .btn {
        border-radius: 10px;
        transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        font-weight: 600;
        font-size: 15px;
    }
    
    .btn-primary {
        background: linear-gradient(135deg, #2859CC 0%, #1e40af 100%) !important;
        box-shadow: 0 4px 12px rgba(40, 89, 204, 0.25) !important;
        color: white !important;
        position: relative;
        overflow: hidden;
    }
    
    .btn-primary::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
        transform: translateX(-100%);
        transition: transform 0.6s;
    }
    
    .btn-primary:hover::before {
        transform: translateX(100%);
    }
    
    .btn-primary:hover {
        box-shadow: 0 8px 24px rgba(40, 89, 204, 0.35) !important;
        transform: translateY(-2px);
    }
    
    .btn-primary:active {
        transform: translateY(0);
    }
    
    .btn-ghost {
        background: white !important;
        color: #6b7280 !important;
        border: 2px solid #e5e7eb;
    }
    
    .btn-ghost:hover {
        background: #f9fafb !important;
        border-color: #2859CC;
        color: #2859CC !important;
    }
    
    /* ========================================
       SUMMARY CARD - Premium
       ======================================== */
    .summary-card {
        background: linear-gradient(135deg, #f8fbff 0%, #f0f7ff 100%);
        border: 2px solid #dbeafe;
        border-radius: 12px;
        padding: 16px;
        animation: slideUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
    }
    
    @keyframes slideUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .summary-card h3 {
        color: #2859CC;
        font-size: 14px;
        font-weight: 700;
        margin: 0 0 12px 0;
    }
    
    .summary-row {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        border-bottom: 1px solid rgba(40, 89, 204, 0.1);
        font-size: 13px;
    }
    
    .summary-row:last-child {
        border-bottom: none;
    }
    
    .summary-row span:first-child {
        color: #6b7280;
    }
    
    .summary-row span:last-child {
        color: #2859CC;
        font-weight: 600;
    }
    
    /* ========================================
       FOOTER - Sticky & Premium
       ======================================== */
    .nav-footer {
        position: sticky;
        bottom: 0;
        background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.95) 20%, white 100%);
        padding: 20px 32px;
        border-top: 1px solid #e5e7eb;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        z-index: 50;
        display: flex;
        gap: 12px;
        justify-content: flex-end;
    }
    
    .nav-footer .btn {
        min-width: 140px;
        padding: 12px 24px;
    }
    
    /* ========================================
       RIPPLE & LOADER EFFECTS
       ======================================== */
    /* Ripple effect au clic */
    .ripple-effect {
        position: absolute;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.6);
        pointer-events: none;
        animation: ripple 0.6s ease-out;
    }
    
    @keyframes ripple {
        from {
            width: 0;
            height: 0;
            top: 50%;
            left: 50%;
            opacity: 1;
            transform: translate(-50%, -50%);
        }
        to {
            width: 400px;
            height: 400px;
            top: 50%;
            left: 50%;
            opacity: 0;
            transform: translate(-50%, -50%);
        }
    }
    
    /* Loader au clic */
    .slot-loader {
        display: none;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 18px;
        height: 18px;
        border: 2px solid rgba(255, 255, 255, 0.3);
        border-top-color: rgba(255, 255, 255, 0.9);
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
    }
    
    .slots-view .time-slot.selected .slot-loader {
        display: block;
    }
}
