/* ========================================
   GUICHET AUTO - CALENDRIER PROFESSIONNEL
   ======================================== */

/* Modal Container */
.ga-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.ga-modal.ga-active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: gaFadeIn 0.3s ease;
}

@keyframes gaFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ga-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.ga-modal-container {
    position: relative;
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 520px;
    max-height: 100vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: gaSlideUp 0.4s ease;
}

@keyframes gaSlideUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.ga-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ga-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(1.1);
}

/* Header */
.ga-modal-header {
    padding: 24px 24px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.ga-modal-header h2 {
    margin: 0 0 12px;
    font-size: 22px;
    font-weight: 700;
    color: #1e3a5f;
}

.ga-progress {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.ga-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    transition: width 0.4s ease;
}

/* Body */
.ga-modal-body {
    padding: 24px;
    max-height: calc(90vh - 140px);
    overflow-y: auto;
}

.ga-modal-body::-webkit-scrollbar {
    width: 8px;
}

.ga-modal-body::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.ga-modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

/* Steps */
.ga-step {
    display: none;
}

.ga-step.ga-step-active {
    display: block;
    animation: gaStepIn 0.3s ease;
}

@keyframes gaStepIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.ga-step h3 {
    margin: 0 0 20px;
    font-size: 18px;
    font-weight: 600;
    color: #1e3a5f;
}

/* Buttons */
.ga-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ga-btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.ga-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.ga-btn-primary:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
}

.ga-btn-full {
    width: 100%;
    padding: 14px;
}

.ga-btn-link {
    background: none;
    color: #6b7280;
    padding: 8px 0;
    font-weight: 500;
    margin-bottom: 16px;
}

.ga-btn-link:hover {
    color: #3b82f6;
}

/* Service List */
.ga-service-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.ga-service-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.ga-service-item:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.ga-service-item.ga-selected {
    border-color: #3b82f6;
    background: #eff6ff;
}

.ga-service-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.ga-service-info {
    flex: 1;
}

.ga-service-name {
    font-weight: 600;
    color: #1e3a5f;
    margin-bottom: 2px;
    font-size: 15px;
}

.ga-service-desc {
    font-size: 13px;
    color: #6b7280;
}

.ga-service-check {
    font-size: 20px;
    color: #3b82f6;
    opacity: 0;
    transition: opacity 0.2s;
}

.ga-service-item.ga-selected .ga-service-check {
    opacity: 1;
}

/* Calendar */
.ga-calendar-container {
    background: #f9fafb;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 16px;
}

.ga-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.ga-cal-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e3a5f;
}

.ga-cal-nav {
    width: 32px;
    height: 32px;
    border: none;
    background: white;
    border-radius: 6px;
    font-size: 18px;
    color: #1e3a5f;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.ga-cal-nav:hover {
    background: #3b82f6;
    color: white;
    transform: scale(1.1);
}

.ga-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 4px;
}

.ga-cal-weekdays div {
    text-align: center;
    font-size: 10px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ga-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.ga-cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    color: #1e3a5f;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.ga-cal-day:hover:not(.ga-disabled):not(.ga-empty) {
    background: #eff6ff;
    transform: scale(1.05);
}

.ga-cal-day.ga-disabled {
    background: transparent;
    color: #cbd5e1;
    cursor: not-allowed;
}

.ga-cal-day.ga-empty {
    background: transparent;
    cursor: default;
}

.ga-cal-day.ga-today {
    border: 2px solid #10b981;
}

.ga-cal-day.ga-selected {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

/* Time Slots */
.ga-date-selected {
    text-align: center;
    padding: 16px;
    background: #eff6ff;
    border-radius: 12px;
    margin-bottom: 16px;
    font-weight: 600;
    color: #1e3a5f;
    font-size: 16px;
}

.ga-urgent-notice {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    text-align: center;
    animation: gaPulse 2s infinite;
}

@keyframes gaPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.9; }
}

.ga-urgent-icon {
    font-size: 24px;
    margin-right: 8px;
}

.ga-time-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.ga-time-slot {
    padding: 16px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.ga-time-slot:hover {
    border-color: #3b82f6;
    background: #eff6ff;
    transform: translateY(-2px);
}

.ga-time-slot.ga-selected {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.ga-time-slot-time {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.ga-time-slot-price {
    font-size: 13px;
    color: #6b7280;
}

.ga-time-slot.ga-selected .ga-time-slot-price {
    color: rgba(255, 255, 255, 0.9);
}

.ga-time-slot-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #10b981;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    animation: gaPulse 2s infinite;
}

.ga-no-slots {
    text-align: center;
    padding: 40px;
    color: #9ca3af;
    font-size: 16px;
}

/* Form */
.ga-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.ga-form-group {
    margin-bottom: 20px;
}

.ga-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.ga-form-group input,
.ga-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
    font-family: inherit;
}

.ga-form-group input:focus,
.ga-form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
}

.ga-form-group textarea {
    resize: vertical;
}

/* Summary */
.ga-summary {
    background: #eff6ff;
    border: 2px solid #3b82f6;
    border-radius: 12px;
    padding: 20px;
    margin: 24px 0;
}

.ga-summary h4 {
    margin: 0 0 16px;
    font-size: 16px;
    color: #1e3a5f;
}

.ga-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.ga-summary-item:last-child {
    border-bottom: none;
}

.ga-summary-item span {
    color: #6b7280;
    font-size: 14px;
}

.ga-summary-item strong {
    color: #1e3a5f;
    font-weight: 600;
}

/* Checkbox */
.ga-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    cursor: pointer;
}

.ga-checkbox input {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.ga-checkbox span {
    font-size: 14px;
    color: #374151;
}

/* Confirmation */
.ga-success {
    text-align: center;
    padding: 20px 0;
}

.ga-success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin: 0 auto 24px;
    animation: gaSuccessIn 0.6s ease;
}

@keyframes gaSuccessIn {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(0deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.ga-success h3 {
    margin: 0 0 16px;
    font-size: 24px;
    color: #1e3a5f;
}

.ga-success p {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 24px;
}

.ga-confirm-details {
    background: #f9fafb;
    border-radius: 12px;
    padding: 20px;
    margin: 24px 0;
    text-align: left;
}

.ga-confirm-details p {
    margin: 8px 0;
    color: #374151;
}

.ga-confirm-note {
    font-size: 14px;
    color: #6b7280;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .ga-modal-container {
        width: 95%;
        max-height: 95vh;
        border-radius: 12px;
    }

    .ga-modal-header {
        padding: 24px 20px 20px;
    }

    .ga-modal-header h2 {
        font-size: 20px;
    }

    .ga-modal-body {
        padding: 24px 20px;
    }

    .ga-form-row {
        grid-template-columns: 1fr;
    }

    .ga-time-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 8px;
    }

    .ga-time-slot {
        padding: 12px 8px;
    }

    .ga-time-slot-time {
        font-size: 16px;
    }

    .ga-cal-days {
        gap: 4px;
    }

    .ga-cal-day {
        font-size: 14px;
    }
}