/* Masquer les formulaires de contact pour les propriétés en location */
/* Le masquage se fait via JavaScript après vérification du type de propriété */

.ommi-visiting-hours {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
}

.ommi-visiting-hours h4 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #d8560a;
    padding-bottom: 10px;
}

/* Validation des champs */
.ommi-visiting-hours input[type="text"],
.ommi-visiting-hours input[type="tel"],
.ommi-visiting-hours input[type="email"] {
    transition: border-color 0.3s ease;
}

.ommi-visiting-hours .field-error {
    animation: slideInError 0.3s ease;
}

@keyframes slideInError {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Checkbox RGPD */
.ommi-visiting-hours input[type="checkbox"] {
    accent-color: #d8560a;
}

.ommi-visiting-hours input[type="checkbox"]:hover {
    cursor: pointer;
    transform: scale(1.1);
}

/* Lien RGPD (+ d'infos) */
.ommi-visiting-hours a[href*="mentions-legales"] {
    color: #d8560a !important;
    text-decoration: underline !important;
    font-weight: 600 !important;
    transition: all 0.2s ease;
}

.ommi-visiting-hours a[href*="mentions-legales"]:hover {
    color: #b8450a !important;
    text-decoration: none !important;
    transform: scale(1.05);
}

/* Message de restriction (blacklist et rendez-vous futur) */
.restriction-message {
    animation: slideInRestriction 0.4s ease;
}

@keyframes slideInRestriction {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Message de vérification téléphone */
.phone-checking-message {
    animation: pulseCheck 1.5s ease-in-out infinite;
}

@keyframes pulseCheck {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

.restriction-message strong {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
}

.loading-bar { width: 100%; height: 4px; background: #e0e0e0; border-radius: 2px; margin-top: 10px; overflow: hidden; }
.loading-progress { height: 100%; background: linear-gradient(90deg, #d8560a, #00a0d2); border-radius: 2px; transition: width 0.3s ease; width: 0%; }

.visiting-hours-calendar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.visiting-hours-daybar { display:flex; gap:12px; overflow-x:auto; padding:8px 0 10px; scrollbar-width:none; -ms-overflow-style:none; }
.visiting-hours-daybar::-webkit-scrollbar { display:none; }
.day-pill { display:flex; flex-direction:column; align-items:center; gap:4px; padding:10px 12px; border:1px solid #ddd; border-radius:10px; background:#fff; cursor:pointer; min-width:96px; }
.day-pill .dow { font-weight:600; color:#333; font-size:13px; }
.day-pill .date { color:#555; font-size:12px; }
.day-pill.active { background:#d8560a; border-color:#d8560a; }
.day-pill.active .dow, .day-pill.active .date { color:#fff; }

.visiting-day { background: white; border: 1px solid #eee; border-radius: 6px; padding: 15px; }
.visiting-day h5 { margin: 0 0 10px 0; color: #333; font-size: 16px; }

.visiting-slots {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.visiting-slot { padding: 10px 12px; border: 1px solid #d8560a; border-radius: 6px; background: #d8560a; color: white; cursor: pointer; transition: all 0.2s ease; font-size: 14px; text-align: center; }
.visiting-slot-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 10px; padding: 8px; background: #f8f9fa; border-radius: 6px; }
.visiting-slot-item { padding: 8px 6px; border: 1px solid #ddd; border-radius: 4px; background: #fff; color: #333; cursor: pointer; text-align: center; font-size: 11px; font-weight: 500; transition: all 0.2s ease; min-height: 32px; display: flex; align-items: center; justify-content: center; }
.visiting-slot-item:hover { background: #e3f2fd; border-color: #d8560a; }
.visiting-slot-item.selected { background: #d8560a; color: white; border-color: #d8560a; transform: scale(1.05); }
.visiting-slot-item.unavailable { background: #f5f5f5; color: #999; cursor: not-allowed; opacity: 0.5; }
.slot-header { font-weight: 600; color: #333; margin-bottom: 8px; padding: 8px; background: #fff; border-radius: 4px; border: 1px solid #e0e0e0; }
.slot-toggle-btn { padding: 6px 12px; background: #f8f9fa; border: 1px solid #ddd; border-radius: 4px; cursor: pointer; font-size: 12px; color: #d8560a; margin-bottom: 8px; transition: all 0.2s ease; }
.slot-toggle-btn:hover { background: #e9ecef; border-color: #d8560a; }

.visiting-slot:hover {
    background: #d8560a;
    transform: translateY(-1px);
}

.visiting-slot.unavailable {
    background: #ccc;
    border-color: #999;
    cursor: not-allowed;
    opacity: 0.6;
}

.visiting-slot.selected {
    background: #28a745;
    border-color: #1e7e34;
}

.visiting-hours-form {
    background: white;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #ddd;
    margin-top: 20px;
}

.visiting-hours-form h5 {
    margin-top: 0;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #d8560a;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #d8560a;
    color: white;
}

.btn-primary:hover {
    background: #d8560a;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.visiting-hours-error {
    text-align: center;
    padding: 20px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
}

.booking-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 4px;
    margin-top: 15px;
    text-align: center;
}

.no-slots {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

@media (max-width: 768px) {
    .visiting-hours-calendar {
        grid-template-columns: 1fr;
    }
    
    .ommi-visiting-hours {
        padding: 15px;
    }
}
