* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: clip;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

:root {
    --primary-color: #0b3a5b;
    --primary-hover: #082c45;
    --accent-color: #0081c6;
    --accent-hover: #006ba3;
    --secondary-color: #374151;
    --success-color: #1f7a4d;
    --error-color: #b42318;
    --bg-color: #f4f4f4;
    --card-bg: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --border-color: #d0d5dd;
    --light-gray: #8b939c;
    --dark-gray: #2c2c2c;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.08);
    --float-cta-bg: #c1272d;
    --float-cta-bg-hover: #a62126;
    --float-cta-accent: #0081c6;
    --space-page: clamp(12px, 2.5vw, 24px);
    --font-title-step: clamp(1.15rem, 2.8vw, 1.5rem);
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f4f4;
    color: var(--text-primary);
    line-height: 1.55;
    padding: var(--space-page);
    padding-bottom: max(var(--space-page), env(safe-area-inset-bottom, 0px));
    padding-left: max(var(--space-page), env(safe-area-inset-left, 0px));
    padding-right: max(var(--space-page), env(safe-area-inset-right, 0px));
    padding-top: max(var(--space-page), env(safe-area-inset-top, 0px));
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
}

/* Masquer le formulaire par défaut - il sera affiché uniquement dans le modal */
body > .container {
    display: none;
}

/* Bouton flottant pour accès rapide */
.quick-form-btn {
    position: fixed;
    bottom: max(24px, env(safe-area-inset-bottom, 0px));
    right: max(24px, env(safe-area-inset-right, 0px));
    z-index: 99999;
    background: var(--float-cta-bg);
    color: white;
    border: none;
    border-radius: 2px;
    padding: 14px 22px;
    min-height: 48px;
    min-width: 48px;
    font-size: clamp(0.9rem, 2.8vw, 1rem);
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.15s ease;
}

.quick-form-btn:hover {
    background: var(--float-cta-bg-hover);
}

.quick-form-btn:focus-visible {
    outline: 3px solid var(--float-cta-accent);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .quick-form-btn {
        animation: none;
    }
}

.quick-form-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.quick-form-text {
    white-space: nowrap;
}

@keyframes pulse-float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Modal pour le formulaire */
.form-modal {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    z-index: 100000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
    overflow-x: clip;
    -webkit-overflow-scrolling: touch;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.form-modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    opacity: 1;
    padding-top: max(12px, env(safe-area-inset-top, 0px));
}

@media (min-height: 520px) {
    .form-modal.active {
        align-items: center;
        padding-top: 0;
    }
}

.form-modal.active ~ body {
    overflow: hidden;
}

.form-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
}

.form-modal-content {
    position: relative;
    z-index: 100001;
    width: 100%;
    max-width: min(700px, 100vw - 2 * var(--space-page));
    max-height: calc(100vh - max(48px, env(safe-area-inset-top, 0px) + env(safe-area-inset-bottom, 0px)));
    max-height: calc(100dvh - max(48px, env(safe-area-inset-top, 0px) + env(safe-area-inset-bottom, 0px)));
    overflow-y: auto;
    padding: clamp(12px, 3vw, 20px);
    margin: auto;
    animation: none;
    overscroll-behavior: contain;
}

/* Améliorer le scroll dans le modal */
.form-modal-content::-webkit-scrollbar {
    width: 8px;
}

.form-modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.form-modal-content::-webkit-scrollbar-thumb {
    background: var(--light-gray);
    border-radius: 4px;
}

.form-modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.form-modal-close {
    position: absolute;
    top: max(12px, env(safe-area-inset-top, 12px));
    right: max(12px, env(safe-area-inset-right, 12px));
    z-index: 10002;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 28px;
    line-height: 1;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.form-modal-close:hover {
    background: white;
}

.form-modal-content .container {
    margin: 0;
    max-width: 100%;
    display: block !important;
}

/* Masquer le formulaire par défaut si on est dans le modal */
.form-modal.active ~ .container:not(.form-modal-content .container) {
    display: none;
}

/* Sur mobile, ajuster le bouton */
@media (max-width: 768px) {
    .quick-form-btn {
        bottom: max(16px, env(safe-area-inset-bottom, 0px));
        right: max(16px, env(safe-area-inset-right, 0px));
        padding: 14px;
        font-size: 0.95rem;
        min-height: 48px;
        min-width: 48px;
    }
    
    .quick-form-text {
        display: none;
    }
    
    .quick-form-icon {
        font-size: 1.8rem;
    }
    
    .form-modal-content {
        max-width: 100%;
        padding: clamp(8px, 2.5vw, 14px);
        max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    }
    
    .form-modal-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 24px;
    }
}

.container {
    max-width: min(650px, 100vw - 2 * var(--space-page));
    width: 100%;
    background: var(--card-bg);
    border-radius: 2px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    overflow: hidden;
}

header {
    background: var(--primary-color);
    color: white;
    padding: 22px 24px 20px;
    text-align: left;
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-logo {
    height: 52px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    flex-shrink: 0;
}

.brand-copy {
    min-width: 0;
}

@media (max-width: 480px) {
    header {
        gap: 12px;
        padding: 18px 16px 16px;
    }
    .brand-logo {
        height: 44px;
        max-width: 110px;
    }
}

.brand-kicker {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 8px;
    opacity: 0.85;
    font-weight: 700;
}

header h1 {
    font-size: clamp(1.25rem, 3.5vw, 1.65rem);
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: 0;
    position: relative;
    z-index: 1;
}

.subtitle {
    font-size: clamp(0.92rem, 2.5vw, 1rem);
    opacity: 0.95;
    letter-spacing: 0.01em;
    position: relative;
    z-index: 1;
}

/* Barre de progression */
.progress-bar {
    position: relative;
    display: flex;
    justify-content: space-between;
    gap: clamp(2px, 1vw, 8px);
    padding: clamp(18px, 4vw, 32px) clamp(12px, 3vw, 40px);
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: none;
}

.progress-step {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.step-number {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #eef2ff;
    color: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.step-label {
    font-size: clamp(0.62rem, 2.1vw, 0.78rem);
    color: var(--light-gray);
    text-align: center;
    transition: all 0.3s;
    line-height: 1.25;
    max-width: 100%;
    padding: 0 2px;
    hyphens: auto;
    -webkit-hyphens: auto;
    overflow-wrap: break-word;
}

.progress-step.active .step-number {
    background: var(--primary-color);
    color: white;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(0, 119, 200, 0.3); }
    50% { box-shadow: 0 6px 24px rgba(0, 119, 200, 0.5); }
}

.progress-step.active .step-label,
.progress-step.completed .step-label {
    color: var(--primary-color);
    font-weight: 500;
}

.progress-step.completed .step-number {
    background: var(--accent-color);
    color: white;
}

.progress-line {
    position: absolute;
    top: 54px; /* 32px padding + 22px (moitié de 44px bulle) = centre de la bulle */
    left: 15%;
    right: 15%;
    height: 3px;
    background: var(--border-color);
    z-index: 1;
    overflow: hidden;
    border-radius: 2px;
    transform: translateY(-50%); /* Centre verticalement la ligne */
}

.progress-line::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: var(--primary-color);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

/* Formulaire multi-étapes */
form {
    padding: 0;
}

.form-step {
    display: none !important;
    padding: 36px 34px;
    min-height: 450px;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-step.active {
    display: block !important;
    opacity: 1;
    animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-step h2 {
    font-size: var(--font-title-step);
    margin-bottom: 12px;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.step-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 24px;
    line-height: 1.6;
}

.form-group {
    margin-bottom: 24px;
}

/* Scrollbar personnalisée moderne */
.checkbox-list::-webkit-scrollbar,
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.checkbox-list::-webkit-scrollbar-track,
.modal-content::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-radius: 4px;
}

.checkbox-list::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb {
    background: var(--light-gray);
    border-radius: 4px;
    transition: background 0.3s;
}

.checkbox-list::-webkit-scrollbar-thumb:hover,
.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Amélioration du focus pour accessibilité */
*:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Amélioration de la lisibilité */
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-size: 0.98rem;
    letter-spacing: 0.01em;
    line-height: 1.4;
}

.form-group small {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 5px;
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    background: #ffffff;
    -webkit-appearance: none;
    appearance: none;
    /* Empêcher le zoom automatique sur iOS */
    font-size: 16px;
}

/* Sur desktop, utiliser la taille de police normale */
@media (min-width: 769px) {
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 1rem;
    }
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: #c4d2ea;
    box-shadow: 0 1px 8px rgba(15, 23, 42, 0.06);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14), 0 4px 12px rgba(37, 99, 235, 0.08);
    transform: translateY(-1px);
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Services */
.service-item {
    margin-bottom: 24px;
    padding: 20px;
    border: 2px solid var(--border-color);
    border-radius: 14px;
    background: var(--card-bg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(0, 169, 224, 0.15);
    touch-action: manipulation;
}

.service-item:hover {
    border-color: #bfdbfe;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.1);
}

.service-item:active {
    background: rgba(0, 169, 224, 0.05);
    transform: scale(0.98);
}

.service-question {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

/* Style personnalisé pour les checkboxes de services - visibles avec style cohérent */
.service-question input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    background: white;
    margin-bottom: 8px;
    margin-top: 2px;
    cursor: pointer;
    pointer-events: auto;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s;
    vertical-align: middle;
    align-self: flex-start;
}

.service-question input[type="checkbox"]:checked {
    border-color: var(--primary-color);
    background: var(--primary-color);
}

.service-question input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
}

/* Style pour checkbox cochée dans service-item - SURLIGNEMENT BLEU */
.service-item:has(input[type="checkbox"]:checked) {
    border-color: var(--primary-color);
    background: rgba(0, 119, 200, 0.05);
}

/* Le surlignage bleu est géré par .service-item:has(input[type="checkbox"]:checked) */

.service-question span {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    line-height: 1.4;
}

.service-question small {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 4px;
}


.conditional-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    animation: slideDown 0.3s ease-out;
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row .form-group {
    flex: 1;
}

.section-description {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 12px;
    line-height: 1.5;
}

.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--card-bg);
    min-height: 52px;
    position: relative;
    z-index: 1;
    justify-content: flex-start;
}

.checkbox-option:hover {
    border-color: var(--accent-color);
    background: rgba(0, 169, 224, 0.06);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 169, 224, 0.15);
}

/* Style personnalisé pour les checkboxes dans les listes - visibles avec style cohérent */
.checkbox-option input[type="checkbox"],
.checkbox-option input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    background: white;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    transition: all 0.2s;
    margin: 0;
    padding: 0;
    pointer-events: auto;
    vertical-align: middle;
}

.checkbox-option input[type="radio"] {
    border-radius: 50%;
}

.checkbox-option input[type="checkbox"]:checked,
.checkbox-option input[type="radio"]:checked {
    border-color: var(--primary-color);
    background: var(--primary-color);
}

.checkbox-option input[type="checkbox"]:checked::after,
.checkbox-option input[type="radio"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
}

.checkbox-option input[type="radio"]:checked::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
}

.checkbox-option span {
    flex: 1;
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    line-height: 20px;
    display: inline-block;
    vertical-align: middle;
}

.checkbox-option input[type="number"] {
    width: 70px;
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
    text-align: center;
    margin-left: auto;
    flex-shrink: 0;
}

.checkbox-option input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 119, 200, 0.1);
}

.checkbox-option:has(input[type="checkbox"]:checked) {
    border-color: var(--primary-color);
    background: rgba(0, 119, 200, 0.1);
    font-weight: 600;
    box-shadow: 0 0 0 3px rgba(0, 119, 200, 0.1), 0 4px 12px rgba(0, 119, 200, 0.15);
    transform: translateX(4px);
}

/* Warning boxes */
.warning-box {
    margin-top: 15px;
    padding: 15px;
    background: #fef3c7;
    border: 2px solid #fbbf24;
    border-radius: 8px;
    color: #92400e;
}

.warning-box p {
    margin: 8px 0;
    line-height: 1.6;
}

.warning-box strong {
    color: #78350f;
}

.zone-unavailable {
    border: 1px solid #d4c4a8;
    background: #faf6ef;
    padding: 20px;
    margin: 16px 0;
}

.zone-unavailable h3 {
    margin: 0 0 10px;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.zone-unavailable p {
    margin: 0 0 8px;
    color: var(--text-secondary);
}

.zone-unavailable a {
    color: var(--primary-color);
}

.photo-upload {
    margin-top: 12px;
}

.photo-upload-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    padding: 10px 16px;
    border: 1px solid var(--border-color, #d1d5db);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-weight: 600;
    overflow: hidden;
}

.photo-upload-btn input[type="file"] {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    font-size: 16px;
}

.photo-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.photo-thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border-color, #d1d5db);
}

.photo-thumb-pending {
    opacity: 0.7;
}

.photo-upload-status {
    margin-top: 8px;
    font-size: 0.9em;
    color: #374151;
}

.photo-upload-status.is-error {
    color: var(--error-color, #b91c1c);
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

/* Radio buttons */
.radio-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.2s;
    background: var(--card-bg);
}

.radio-option:hover {
    border-color: var(--accent-color);
    background: rgba(0, 169, 224, 0.05);
}

.radio-option input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    background: white;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    margin: 0;
}

.radio-option input[type="radio"]:checked {
    border-color: var(--primary-color);
    background: var(--primary-color);
}

.radio-option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
}

.radio-option span {
    flex: 1;
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    line-height: 1.4;
}

/* Radio option large pour sélection de département */
.radio-option.large,
.service-item,
.calendar-day.available,
.btn-next,
.btn-back,
.checkbox-option {
    touch-action: manipulation;
}

.radio-option.large {
    display: flex;
    align-items: flex-start;
    padding: 20px 24px;
    margin-bottom: 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--card-bg);
    cursor: pointer;
    min-height: 80px;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.radio-option.large:hover {
    border-color: var(--accent-color);
    background: rgba(0, 169, 224, 0.06);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 169, 224, 0.15);
}

.radio-option.large:active {
    transform: translateY(0);
    transition: transform 0.05s;
    background: rgba(0, 169, 224, 0.1);
}

.radio-option.large input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    background: white;
    margin-right: 12px;
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
    z-index: 1;
    position: relative;
}

.radio-option.large .radio-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    cursor: pointer;
}

.radio-option.large label {
    cursor: pointer;
    width: 100%;
    margin: 0;
}

.radio-option.large .radio-content strong {
    font-size: 1.1em;
    color: var(--text-primary);
}

.radio-option.large .radio-content small {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.radio-option.large input[type="radio"]:checked ~ .radio-content {
    color: var(--primary-color);
}

.radio-option.large:has(input[type="radio"]:checked) {
    border-color: var(--primary-color);
    background: rgba(0, 119, 200, 0.1);
    box-shadow: 0 0 0 4px rgba(0, 119, 200, 0.12), 0 8px 24px rgba(0, 119, 200, 0.2);
    transform: translateY(-2px);
}

/* Style pour radio button coché - même style que mobile */
.radio-option.large input[type="radio"]:checked {
    border-color: var(--primary-color);
    background: var(--primary-color);
}

.radio-option.large input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

/* Estimation */
.estimate-box {
    background: #f7f9fb;
    border: 2px solid var(--accent-color);
    border-radius: 12px;
    padding: 28px;
    margin: 30px 0;
    box-shadow: 0 4px 20px rgba(0, 169, 224, 0.1);
}

.estimate-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 1.05rem;
}

.estimate-amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.02em;
}

.estimate-note {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.85rem;
}

/* Actions */
.step-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.btn-back,
.btn-next,
.btn-submit {
    padding: 13px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    letter-spacing: 0.01em;
    min-height: 50px;
    -webkit-tap-highlight-color: rgba(0, 119, 200, 0.2);
    touch-action: manipulation; /* Améliore la réactivité sur mobile */
}

.btn-back {
    background: var(--bg-color);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-back:hover {
    background: #eef2f7;
    border-color: var(--light-gray);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
}

.btn-next,
.btn-submit {
    background: var(--float-cta-bg);
    color: white;
    flex: 1;
}

.btn-next:hover,
.btn-submit:hover {
    background: var(--float-cta-bg-hover);
    box-shadow: none;
}

.btn-next:active,
.btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

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

/* Messages d'erreur */
.error-message {
    color: var(--error-color);
    margin-top: 15px;
    font-size: 0.9rem;
    padding: 12px;
    background: #fef2f2;
    border-radius: 6px;
    border: 1px solid #fecaca;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 16px;
    max-width: 540px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 72px rgba(0, 0, 0, 0.25), 0 12px 32px rgba(0, 0, 0, 0.15);
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.modal-body {
    padding: 25px 30px;
}

.modal-body p {
    margin-bottom: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.modal-body .estimate-details {
    background: var(--bg-color);
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.modal-body .detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.modal-body .detail-row:last-child {
    border-bottom: none;
}

.modal-body .detail-row strong {
    color: var(--text-primary);
}

.modal-actions {
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
    text-align: right;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.01em;
    min-height: 50px;
}

.btn-primary:hover {
    background: var(--primary-hover);
}
    box-shadow: 0 8px 24px rgba(0, 169, 224, 0.35);
}

/* Google Maps Autocomplete - Style des suggestions */
/* Masquer le pac-container par défaut - évite les caractères bizarres au premier chargement */
.pac-container {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Afficher seulement quand il n'est pas masqué ET contient des items (pas seulement le logo) */
/* Le JavaScript gérera l'affichage - cette règle permet l'affichage si nécessaire */

/* Style pour quand le container est visible */
.pac-container:not(.pac-hidden)[style*="display: block"],
.pac-container:not(.pac-hidden)[style*="display:block"],
.pac-container[style*="display: block"],
.pac-container[style*="display:block"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow-y: auto !important;
    border-radius: 8px !important;
    border: 2px solid var(--border-color) !important;
    box-shadow: var(--shadow-lg) !important;
    margin-top: 0 !important;
    font-family: inherit !important;
    z-index: 10010 !important;
    background: white !important;
    max-height: 300px !important;
    position: fixed !important;
    pointer-events: auto !important;
}

/* Empêcher l'autofill du navigateur d'apparaître */
input[autocomplete="off"]::-webkit-contacts-auto-fill-button,
input[autocomplete="off"]::-webkit-credentials-auto-fill-button {
    visibility: hidden;
    display: none !important;
    pointer-events: none;
    height: 0;
    width: 0;
    margin: 0;
}

/* Règle déjà définie ci-dessus - éviter la duplication */

.pac-item {
    padding: 12px 15px !important;
    cursor: pointer !important;
    border-top: 1px solid var(--border-color) !important;
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
    pointer-events: auto !important; /* IMPORTANT: S'assurer que c'est cliquable */
}

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

.pac-item:hover,
.pac-item-selected {
    background: rgba(0, 169, 224, 0.1) !important;
}

.pac-icon {
    margin-right: 10px !important;
    margin-top: 2px !important;
}

.pac-matched {
    font-weight: 600 !important;
    color: var(--primary-color) !important;
}

/* Le pac-container est masqué par défaut - il s'affichera seulement quand il contient des suggestions */
.pac-container.pac-hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Cacher complètement l'autofill du navigateur (Chrome, Edge, etc.) */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    box-shadow: 0 0 0 30px white inset !important;
}

/* Cacher les suggestions d'adresses du navigateur - très agressif */
div[role="listbox"]:not(.pac-container),
ul[role="listbox"]:not(.pac-container),
div[class*="autofill"]:not(.pac-container),
div[id*="autofill"]:not(.pac-container),
div[id*="Autofill"]:not(.pac-container),
div[class*="Autofill"]:not(.pac-container),
*[class*="address-autofill"]:not(.pac-container),
*[id*="address-autofill"]:not(.pac-container) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: -1 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
}

/* Cacher spécifiquement l'autofill Chrome/Edge */
chrome-autofill-preview,
#autofill-address-preview,
.autofill-preview {
    display: none !important;
    visibility: hidden !important;
}

/* S'assurer que Google Maps suggestions sont au-dessus de tout */
.pac-container {
    margin-top: 0 !important;
}

/* Tablette : équilibre entre densité desktop et lisibilité tactile */
@media (min-width: 769px) and (max-width: 1024px) {
    body {
        padding: clamp(14px, 2.2vw, 22px);
    }

    .container {
        max-width: min(640px, 94vw);
    }

    .progress-bar {
        padding: 22px 20px;
    }

    .step-label {
        font-size: clamp(0.68rem, 1.8vw, 0.76rem);
    }

    .form-step {
        padding: 28px 26px;
    }

    header {
        padding: 32px 24px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
        -webkit-text-size-adjust: 100%;
        -webkit-tap-highlight-color: rgba(0, 119, 200, 0.2);
    }

    .container {
        max-width: 100%;
        border-radius: 12px;
    }

    header {
        padding: 20px 15px;
    }

    header h1 {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .progress-bar {
        padding: 18px 12px;
    }

    .step-label {
        font-size: clamp(0.62rem, 2.4vw, 0.72rem);
        line-height: 1.25;
    }

    .step-number {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
        margin-bottom: 8px;
    }

    .progress-line {
        top: 38px; /* Ajusté pour mobile : 20px padding + 18px (moitié de 36px) */
        margin-top: 0;
        transform: translateY(-50%);
        left: 10%;
        right: 10%;
    }

    .form-step {
        padding: 22px 16px;
        min-height: auto;
    }

    .form-step h2 {
        font-size: 1.4rem;
        margin-bottom: 10px;
    }

    .step-description {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .form-group label {
        font-size: 0.95rem;
        margin-bottom: 8px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 16px; /* Augmenté pour meilleure zone de touch */
        font-size: 16px; /* Évite le zoom automatique sur iOS */
        border-radius: 8px;
        -webkit-appearance: none;
        appearance: none;
    }

    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        transform: none; /* Évite les problèmes de layout sur mobile */
    }

    .form-grid-2 {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .step-actions {
        flex-direction: column;
        gap: 12px;
        margin-top: 25px;
        padding-top: 20px;
    }

    .btn-back,
    .btn-next,
    .btn-submit {
        width: 100%;
        padding: 14px 20px;
        font-size: 1rem;
        min-height: 52px; /* Zone de touch minimale recommandée */
        -webkit-tap-highlight-color: rgba(0, 119, 200, 0.2);
    }

    .service-item {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    /* Ajuster le layout sans la checkbox (déjà cachée globalement) */
    .service-question {
        flex-direction: column;
        gap: 0;
    }
    
    .service-question span {
        margin-bottom: 0;
    }

    .checkbox-option {
        padding: 16px;
        min-height: 56px; /* Zone de touch optimale */
        -webkit-tap-highlight-color: rgba(0, 169, 224, 0.15);
    }

    .radio-option.large {
        padding: 18px 20px;
        min-height: 80px;
        -webkit-tap-highlight-color: rgba(0, 169, 224, 0.15);
    }
    
    /* Forcer l'affichage visuel des radio buttons cochés sur mobile */
    .radio-option.large input[type="radio"] {
        -webkit-appearance: none;
        appearance: none;
        width: 20px;
        height: 20px;
        border: 2px solid var(--border-color);
        border-radius: 50%;
        background: white;
        position: relative;
        cursor: pointer;
        flex-shrink: 0;
        margin-right: 12px;
        margin-top: 2px;
    }
    
    .radio-option.large input[type="radio"]:checked {
        border-color: var(--primary-color);
        background: var(--primary-color);
    }
    
    .radio-option.large input[type="radio"]:checked::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: white;
    }

    .estimate-box {
        padding: 20px;
        margin: 20px 0;
    }

    .estimate-amount {
        font-size: 1.6rem;
    }

    .estimate-item {
        font-size: 0.95rem;
    }

    /* Améliorer la lisibilité des modals sur mobile */
    .modal {
        padding: 10px;
    }

    .modal-content {
        max-width: 100%;
        max-height: 95vh;
    }

    .modal-header,
    .modal-body,
    .modal-actions {
        padding: 20px;
    }

    /* Améliorer les scrollbars sur mobile */
    .checkbox-list {
        max-height: 300px;
    }
}

/* Optimisations pour très petits écrans */
@media (max-width: 480px) {
    body {
        padding: max(6px, env(safe-area-inset-top, 0px)) max(6px, env(safe-area-inset-right, 0px)) max(6px, env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px));
    }

    .container {
        border-radius: 8px;
        max-width: 100%;
    }

    header {
        padding: max(14px, env(safe-area-inset-top)) 14px 16px;
    }

    header h1 {
        font-size: clamp(1.22rem, 5.2vw, 1.35rem);
        line-height: 1.25;
    }

    .progress-bar {
        padding: 14px max(8px, env(safe-area-inset-left)) 14px max(8px, env(safe-area-inset-right));
    }

    .step-label {
        font-size: clamp(0.65rem, 2.8vw, 0.72rem);
    }

    .step-number {
        width: clamp(30px, 8vw, 34px);
        height: clamp(30px, 8vw, 34px);
        font-size: 0.88rem;
    }

    .progress-line {
        top: 31px; /* Ajusté pour très petit écran */
    }

    .form-step {
        padding: 14px max(11px, env(safe-area-inset-left)) 18px max(11px, env(safe-area-inset-right));
    }

    .form-step h2 {
        font-size: clamp(1.12rem, 4.8vw, 1.28rem);
    }
}

/* Styles pour les créneaux de rendez-vous */
.appointment-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.appointment-slot {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.appointment-slot:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.appointment-slot.selected {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.appointment-slot .slot-date {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 5px;
}

.appointment-slot .slot-time {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 600;
}

.appointment-slot .slot-count-badge {
    font-size: 0.75rem;
    margin-top: 5px;
    color: var(--success-color);
    font-weight: 600;
    background: rgba(76, 175, 80, 0.1);
    padding: 3px 8px;
    border-radius: 12px;
    display: inline-block;
}

.appointment-slot.selected .slot-count-badge {
    color: white;
    background: rgba(255, 255, 255, 0.2);
}

.appointment-slot.selected .slot-date,
.appointment-slot.selected .slot-time {
    color: white;
}

/* Styles pour le calendrier visuel */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--bg-color);
    border-radius: 8px;
}

.calendar-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--text-primary);
}

.calendar-nav-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-nav-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
}

.calendar-grid {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.calendar-weekday {
    text-align: center;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 10px 5px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day {
    aspect-ratio: 1;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--card-bg);
}

.calendar-day.empty {
    border: none;
    cursor: default;
    background: transparent;
}

.calendar-day.past {
    background: #f5f5f5;
    color: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.calendar-day.no-slots {
    background: var(--card-bg);
    color: var(--text-secondary);
    cursor: default;
    opacity: 0.7;
    border-color: var(--border-color);
}

.calendar-day.available {
    background: #e8f5e9;
    border-color: var(--success-color);
    cursor: pointer;
}

.calendar-day.available:hover {
    background: #c8e6c9;
    transform: scale(1.05);
    box-shadow: var(--shadow);
}

.calendar-day.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.calendar-day.today {
    border: 3px solid #ff9800;
    box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.2);
    font-weight: 700;
}

.calendar-day.today.available {
    border-color: #ff9800;
    background: #fff3e0;
}

.calendar-day.today.selected {
    border-color: #ff9800;
    box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.3), var(--shadow-lg);
}

.calendar-day.today .day-number {
    color: #ff9800;
    font-weight: 700;
}

.calendar-day.today.selected .day-number {
    color: white;
}

.calendar-day .day-number {
    font-weight: 600;
    font-size: 1rem;
}

.calendar-day.selected .day-number {
    color: white;
}

.calendar-day .day-slots-count {
    font-size: 0.7rem;
    margin-top: 4px;
    color: var(--success-color);
    font-weight: 600;
}

.calendar-day.selected .day-slots-count {
    color: white;
}

.calendar-day.past .day-number,
.calendar-day.no-slots .day-number {
    color: #999;
}

#selectedDateSlots {
    background: var(--bg-color);
    border-radius: 8px;
    padding: 20px;
}

#selectedDateTitle {
    margin-bottom: 15px;
    color: var(--text-primary);
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .appointment-slots {
        grid-template-columns: 1fr;
    }
    
    .calendar-day {
        padding: 5px;
        font-size: 0.85rem;
    }
    
    .calendar-weekday {
        font-size: 0.8rem;
        padding: 8px 3px;
    }
}

/* Styles pour les boutons d'action de choix */
.action-choice {
    padding: 20px;
    background: var(--bg-color);
    border-radius: 8px;
    margin: 20px 0;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-action-choice {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-action-choice:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-action-choice:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-appointment {
    background: var(--accent-color);
    color: white;
}

.btn-appointment:hover {
    background: var(--accent-hover);
}

/* Page autonome (reserver.nettoyage-exlor.ca) : formulaire plein écran, sans iframe ni modal */
html.standalone .quick-form-btn,
html.standalone .form-modal-backdrop,
html.standalone .form-modal-close {
    display: none !important;
}

html.standalone .form-modal,
html.standalone .form-modal.active {
    display: flex !important;
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    z-index: 1;
    opacity: 1;
    padding: max(16px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
    align-items: flex-start;
    justify-content: center;
    overflow: visible;
}

html.standalone .form-modal-content {
    max-height: none;
    width: 100%;
    max-width: min(700px, 100%);
    margin: 0 auto;
    padding: 0;
    overflow: visible;
}

html.standalone body {
    overflow: auto;
}