.mm-appointment {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.06);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    overflow-x: hidden;
    position: relative;
    z-index: 100;
}

@media (max-width: 900px) {
    .mm-appointment {
        margin: 1rem;
        padding: 1.5rem;
    }
}

.mm-appointment-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #6b7280;
}

.mm-appointment-empty p {
    margin: 0.5rem 0;
}

.mm-appointment-form .mm-field {
    margin-bottom: 1rem;
}

.mm-appointment-form label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
}

.mm-appointment-form input,
.mm-appointment-form select,
.mm-appointment-form textarea,
.mm-appointment-form button {
    width: 100%;
    padding: 1.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.mm-appointment-form input:focus,
.mm-appointment-form select:focus,
.mm-appointment-form textarea:focus {
    outline: none;
    border-color: #4b5563;
    box-shadow: 0 0 0 3px rgba(75, 85, 99, 0.1);
}

.mm-appointment-form input[type="radio"] {
    width: auto;
    margin-right: 0.35rem;
}

.mm-appointment-form button {
    padding: 0.65rem 1.5rem;
}

/* Padding réduit pour les champs de l'étape "Vos infos" */
.mm-step[data-step="1"] input,
.mm-step[data-step="1"] select,
.mm-step[data-step="1"] textarea {
    padding: 0.65rem 1rem;
}

/* Padding réduit pour les champs de l'étape "Questionnaire" */
.mm-step[data-step="4"] input,
.mm-step[data-step="4"] select,
.mm-step[data-step="4"] textarea {
    padding: 0.65rem 1rem;
}

.mm-timezone-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #0ea5e9;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    color: #0c4a6e;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.15);
}

.mm-timezone-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.mm-timezone-label {
    font-weight: 600;
    letter-spacing: 0.01em;
}

.mm-slot-picker {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    background: linear-gradient(to bottom, #ffffff 0%, #fafafa 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

@media (min-width: 640px) {
    .mm-slot-picker {
        flex-direction: row;
        gap: 2rem;
        align-items: flex-start;
    }
}

.mm-slot-picker > * {
    flex-shrink: 1;
    min-width: 0;
}

.mm-calendar-wrapper {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 640px) {
    .mm-calendar-wrapper {
        flex: 0 1 auto;
        max-width: 400px;
    }
}

.mm-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.mm-calendar-month {
    font-weight: 700;
    font-size: 1.25rem;
    text-align: center;
    flex: 1;
    color: #1e293b;
    letter-spacing: 0.02em;
}

.mm-calendar-nav {
    width: 40px;
    height: 40px;
    padding: 0;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #4b5563;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.mm-calendar-nav:hover:not(.is-disabled) {
    background: #014D56;
    color: #ffffff;
    border-color: #014D56;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(1, 77, 86, 0.3);
}

.mm-calendar-nav.is-disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: #f9fafb;
}

.mm-calendar-weekdays,
.mm-calendar-grid {
    display: grid;
    grid-template-columns: repeat(var(--mm-calendar-columns, 5), minmax(36px, 1fr));
    gap: 0.6rem;
    margin-bottom: 0.75rem;
    width: 100%;
}

.mm-calendar-weekday {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    padding: 0.75rem 0;
    letter-spacing: 0.05em;
}

.mm-calendar-day {
    padding: 0;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 50px;
    height: 50px;
    width: 100%;
    max-width: 50px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.mm-calendar-day.has-slots:hover {
    background: #f0f9ff;
    border-color: #0ea5e9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(14, 165, 233, 0.2);
}

.mm-calendar-day.is-selected {
    background: linear-gradient(135deg, #014D56 0%, #016872 100%);
    border-color: #014D56;
    color: #fff;
    font-weight: 700;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(1, 77, 86, 0.4);
}

.mm-calendar-day.has-slots {
    position: relative;
    padding-bottom: 10px;
    padding-top: 4px;
}

.mm-calendar-day.has-slots::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #0ea5e9;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(14, 165, 233, 0.6);
}

.mm-calendar-day.is-selected.has-slots::after {
    background: #fff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

.mm-calendar-day.is-disabled,
.mm-calendar-day.is-empty {
    background: #f9fafb;
    border-color: #f3f4f6;
    cursor: not-allowed;
    color: #cbd5e1;
    box-shadow: none;
}

.mm-calendar-day.is-empty {
    visibility: hidden;
}

.mm-slot-times {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

@media (min-width: 640px) {
    .mm-slot-times {
        flex: 0 1 auto;
        min-width: 280px;
        max-width: 380px;
    }
}

.mm-slot-selected-date {
    font-weight: 700;
    font-size: 1.05rem;
    color: #1e293b;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
    border-radius: 8px;
    border-left: 4px solid #0ea5e9;
}

.mm-slot-times-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 450px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.75rem;
}

.mm-slot-time-button {
    background: #ffffff;
    border: 2px solid #cbd5e1;
    border-radius: 10px;
    padding: 1.75rem 1.5rem;
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 1rem;
    text-align: center;
    width: 100%;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    position: relative;
    letter-spacing: 0.01em;
    white-space: nowrap;
    line-height: 1.4;
}

.mm-slot-time-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.1), transparent);
    transition: left 0.5s ease;
    z-index: 0;
}

.mm-slot-time-button:hover::before {
    left: 100%;
}

.mm-slot-time-button:hover {
    background: #f0f9ff;
    border-color: #0ea5e9;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
}

.mm-slot-time-button.is-selected {
    background: linear-gradient(135deg, #014D56 0%, #016872 100%);
    border-color: #014D56;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(1, 77, 86, 0.4);
    transform: scale(1.03);
}

.mm-slot-message {
    min-height: 1.25rem;
    font-size: 0.9rem;
    color: #4a5568;
}

.mm-slot-message.is-error {
    color: #c53030;
}

.mm-appointment-notice {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: 0.5rem;
}

.mm-appointment-form.is-hidden {
    display: none;
}

.mm-success-text {
    margin-bottom: 0.8rem;
    font-size: 1.05rem;
}

.mm-btn-restart {
    margin: 1rem auto 0;
    display: block;
    width: fit-content;
}

.mm-appointment-success {
    background: #e6fffa;
    border: 1px solid #2c7a7b;
    color: #285e61;
}

.mm-appointment-error {
    background: #fff5f5;
    border: 1px solid #c53030;
    color: #822727;
}

.mm-submit {
    display: inline-block;
    background: #014D56;
    color: #fff;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 6px rgba(1, 77, 86, 0.25);
    width: 100%;
}

.mm-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(1, 77, 86, 0.35);
}

.mm-submit:active {
    transform: translateY(0);
}

.mm-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

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

.mm-appointment {
    animation: fadeIn 0.4s ease-out;
}

.mm-field {
    animation: slideIn 0.3s ease-out;
    animation-fill-mode: both;
}

.mm-field:nth-child(1) { animation-delay: 0.05s; }
.mm-field:nth-child(2) { animation-delay: 0.1s; }
.mm-field:nth-child(3) { animation-delay: 0.15s; }
.mm-field:nth-child(4) { animation-delay: 0.2s; }
.mm-field:nth-child(5) { animation-delay: 0.25s; }
.mm-field:nth-child(6) { animation-delay: 0.3s; }
.mm-field:nth-child(7) { animation-delay: 0.35s; }

/* Amélioration du scroll pour la liste des créneaux */
.mm-slot-times-list::-webkit-scrollbar {
    width: 8px;
}

.mm-slot-times-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.mm-slot-times-list::-webkit-scrollbar-thumb {
    background: #014D56;
    border-radius: 4px;
}

.mm-slot-times-list::-webkit-scrollbar-thumb:hover {
    background: #013f47;
}

/* Style pour les labels radio */
.mm-appointment-form label[for] {
    cursor: pointer;
}

.mm-appointment-form input[type="radio"] {
    cursor: pointer;
    accent-color: #014D56;
}

/* Formulaire multi-étapes */
.mm-step {
    display: none !important;
}

.mm-step.is-active {
    display: block !important;
    animation: fadeIn 0.4s ease-out;
}

.mm-progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.mm-progress-bar::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: #e5e7eb;
    z-index: 0;
}

.mm-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
    flex: 1;
}

.mm-progress-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: #9ca3af;
    transition: all 0.3s ease;
}

.mm-progress-step.is-completed .mm-progress-circle {
    background: #014D56;
    border-color: transparent;
    color: #fff;
}

.mm-progress-step.is-active .mm-progress-circle {
    border-color: #014D56;
    color: #014D56;
    box-shadow: 0 0 0 4px rgba(1, 77, 86, 0.1);
}

.mm-progress-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
    text-align: center;
}

.mm-progress-step.is-active .mm-progress-label {
    color: #014D56;
    font-weight: 600;
}

/* Boutons de navigation */
.mm-nav-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    position: relative;
    z-index: 50;
    padding-bottom: 1rem;
}

.mm-btn-prev,
.mm-btn-next {
    flex: 1;
    padding: 0.85rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    position: relative;
    z-index: 10;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    touch-action: manipulation;
}

.mm-btn-prev {
    background: #f3f4f6;
    color: #4b5563;
}

.mm-btn-prev:hover {
    background: #e5e7eb;
}

.mm-btn-next {
    background: #014D56;
    color: #fff;
    box-shadow: 0 4px 6px rgba(1, 77, 86, 0.25);
}

.mm-btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(1, 77, 86, 0.35);
}

.mm-btn-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Options de type de rendez-vous avec icônes */
.mm-meeting-type-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

.mm-meeting-type-card {
    position: relative;
    border: 3px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
    text-align: center;
    display: block;
}

.mm-meeting-type-card:hover {
    border-color: #014D56;
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(1, 77, 86, 0.15);
}

.mm-meeting-type-card.is-selected {
    border-color: #014D56 !important;
    background: rgba(1, 77, 86, 0.08) !important;
    box-shadow: 0 4px 12px rgba(1, 77, 86, 0.25) !important;
}

.mm-meeting-type-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.mm-meeting-type-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    display: block;
    line-height: 1;
}

.mm-meeting-type-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.mm-meeting-type-description {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.5;
}

.mm-meeting-type-card.is-selected .mm-meeting-type-title {
    color: #014D56;
}

/* Style pour les anciens boutons radio (fallback) */
.mm-appointment-form label {
    display: block;
}

/* Titres des étapes */
.mm-step h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1.5rem;
    margin-top: 0;
}

/* Espacement des champs dans les étapes */
.mm-step .mm-field {
    margin-bottom: 1.25rem;
}

/* Champs showroom */
.mm-showroom-fields {
    animation: fadeIn 0.4s ease-out;
}

.mm-transport-notice {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 2px solid #10b981;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.mm-transport-icon {
    font-size: 2.5rem;
    line-height: 1;
    flex-shrink: 0;
}

.mm-transport-text {
    flex: 1;
}

.mm-transport-text strong {
    display: block;
    color: #065f46;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.mm-transport-text p {
    color: #047857;
    margin: 0;
    line-height: 1.5;
}

/* Autocomplete Google Places */
.pac-container {
    z-index: 10000 !important;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid #e5e7eb;
    margin-top: 4px;
}

.pac-item {
    padding: 10px 12px;
    cursor: pointer;
    border-top: 1px solid #e5e7eb;
}

.pac-item:first-child {
    border-top: none;
}

.pac-item:hover {
    background: #f3f4f6;
}

.pac-icon {
    margin-right: 8px;
}

.pac-item-query {
    font-weight: 600;
    color: #1f2937;
}

/* Responsive amélioré */
@media (max-width: 640px) {
    .mm-appointment {
        padding: 1rem;
        margin: 0.5rem;
    }
    
    .mm-slot-picker {
        padding: 0.75rem;
    }
    
    .mm-calendar-wrapper {
        min-width: 0;
        width: 100%;
        overflow: visible;
    }
    
    .mm-calendar-weekdays,
    .mm-calendar-grid {
        grid-template-columns: repeat(var(--mm-calendar-columns, 5), 1fr);
        gap: 0.2rem;
    }
    
    .mm-calendar-weekday {
        font-size: 0.6rem;
        padding: 0.4rem 0;
        letter-spacing: 0;
    }
    
    .mm-calendar-day {
        min-height: 40px;
        height: 40px;
        max-width: none;
        width: 100%;
        font-size: 0.75rem;
        border-radius: 6px;
        border-width: 1.5px;
    }
    
    .mm-calendar-day.has-slots {
        padding-bottom: 8px;
        padding-top: 3px;
    }
    
    .mm-calendar-day.has-slots::after {
        bottom: 5px;
        width: 5px;
        height: 5px;
    }
    
    .mm-calendar-header {
        padding: 0.6rem;
        margin-bottom: 0.75rem;
    }
    
    .mm-calendar-month {
        font-size: 0.95rem;
    }
    
    .mm-calendar-nav {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .mm-progress-label {
        font-size: 0.65rem;
    }
    
    .mm-progress-circle {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .mm-meeting-type-options {
        grid-template-columns: 1fr;
    }
    
    .mm-nav-buttons {
        flex-direction: column-reverse;
        padding-bottom: 2rem;
        margin-bottom: 1rem;
    }
    
    .mm-btn-prev,
    .mm-btn-next {
        padding: 1rem 1.5rem;
        min-height: 50px;
    }
    
    .mm-timezone-display {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }
    
    .mm-timezone-icon {
        font-size: 1.2rem;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    .mm-appointment {
        padding: 0.75rem;
        margin: 0.25rem;
    }
    
    .mm-slot-picker {
        padding: 0.5rem;
    }
    
    .mm-calendar-weekdays,
    .mm-calendar-grid {
        gap: 0.15rem;
    }
    
    .mm-calendar-day {
        min-height: 36px;
        height: 36px;
        font-size: 0.7rem;
        border-width: 1px;
        border-radius: 4px;
    }
    
    .mm-calendar-day.has-slots {
        padding-bottom: 7px;
        padding-top: 2px;
    }
    
    .mm-calendar-day.has-slots::after {
        bottom: 4px;
        width: 4px;
        height: 4px;
    }
    
    .mm-calendar-weekday {
        font-size: 0.55rem;
    }
    
    .mm-calendar-header {
        padding: 0.5rem;
    }
    
    .mm-calendar-month {
        font-size: 0.85rem;
    }
    
    .mm-calendar-nav {
        width: 26px;
        height: 26px;
        font-size: 0.8rem;
    }
}
