/**
 * Styles pour la page d'annuaire et recherche des vétérinaires
 */

/* Section héro */
.veterinaires-hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/src/assets/images/anuaire_veto.png');
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 30px 0; /* Réduit davantage pour un header plus compact */
    text-align: center;
}

.veterinaires-hero h1 {
    font-size: 1.8rem; /* Réduit davantage */
    margin-bottom: 0.4rem; /* Réduit davantage */
}

.veterinaires-hero p {
    font-size: 0.95rem; /* Réduit davantage */
    margin-bottom: 1.2rem; /* Réduit davantage */
}

/* Formulaire de recherche */
.search-container {
    max-width: 700px;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 12px; /* Réduit pour un header plus compact */
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.search-inputs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.search-group {
    flex: 1;
    position: relative;
    min-width: 180px;
}

/* Options de localisation avec onglets */
.search-location-options {
    margin-bottom: 12px;
}

.location-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 10px;
}

.location-tab {
    padding: 6px 15px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    color: #666;
    font-size: 0.9rem;
}

.location-tab.active {
    border-bottom: 2px solid #4a89dc;
    color: #4a89dc;
}

.location-tab:hover {
    background-color: #f5f5f5;
}

.location-content {
    padding: 6px 0;
}

.location-panel {
    display: none;
}

.location-panel.active {
    display: block;
}

/* Bouton de géolocalisation */
.geo-button {
    background-color: #4a89dc;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.3s;
    font-size: 0.9rem;
}

.geo-button:hover {
    background-color: #3a70b5;
}

.geo-button:disabled {
    background-color: #a0a0a0;
    cursor: not-allowed;
}

.geo-status {
    margin-top: 6px;
    font-size: 0.8rem;
    color: #666;
}

/* Style pour les coordonnées de position trouvée */
.position-found {
    font-weight: 600;
    color: #28a745;
    background-color: #e8f5e9;
    padding: 6px 10px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

/* Slider pour le rayon de recherche */
.search-radius {
    margin-bottom: 12px;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.search-radius label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 1rem;
    color: #333;
    text-align: center;
}

#radius-value {
    font-weight: 700;
    color: #0056b3;
    background-color: #e9f5ff;
    padding: 2px 6px;
    border-radius: 4px;
    margin: 0 3px;
}

.slider-container {
    position: relative;
    padding-top: 20px; /* Espace pour la bulle de valeur */
}

.radius-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.radius-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #4a89dc;
    cursor: pointer;
    z-index: 2;
}

.radius-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #4a89dc;
    cursor: pointer;
    border: none;
    z-index: 2;
}

.slider-value {
    position: absolute;
    top: 0;
    left: 0;
    transform: translateX(-50%);
    background-color: #4a89dc;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 10px;
    white-space: nowrap;
    pointer-events: none;
    transition: left 0.1s ease-in-out;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider-value::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #4a89dc;
}

.search-group i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 0.9rem;
}

.search-group input {
    width: 100%;
    padding: 8px 10px 8px 30px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.search-container button {
    width: 100%;
    padding: 8px 12px;
    font-size: 0.95rem;
    border-radius: 4px;
}

.geo-button {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.geo-button:hover {
    background-color: #e9ecef;
}

.geo-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Catégories de vétérinaires */
.vet-categories {
    padding: 60px 0;
    background-color: #f8f9fa;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.category-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.category-card h3 {
    padding: 15px 15px 5px;
    font-size: 1.2rem;
}

.category-card p {
    padding: 0 15px 15px;
    color: #666;
}

/* Vétérinaires recommandés */
.featured-vets {
    padding: 60px 0;
}

.vets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.vet-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #e0e0e0;
}

.vet-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.vet-image {
    position: relative;
    height: 180px;
    overflow: hidden;
    background-color: #f5f5f5;
}

.vet-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.emergency-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #dc3545;
    color: #fff;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.vet-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.vet-info h3 {
    margin-bottom: 8px;
    font-size: 1.3rem;
    color: #3a3a3a;
    font-weight: 600;
}

.vet-specialty {
    color: #666;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    background-color: #f5f5f5;
    padding: 8px;
    border-radius: 5px;
}

.specialty-icons {
    display: flex;
    gap: 8px;
    margin-bottom: 5px;
}

.specialty-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.specialty-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: #444;
}

.vet-location {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #555;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.vet-location i {
    color: #4CAF50;
}

.vet-distance {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #555;
    margin-bottom: 10px;
    font-size: 0.9rem;
    background-color: #e8f5e9;
    padding: 5px 8px;
    border-radius: 4px;
    display: inline-flex;
    margin-right: 10px;
}

.vet-distance i {
    color: #4CAF50;
}

.vet-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.vet-rating i {
    color: #FFC107;
    font-size: 1rem;
}

.vet-rating span {
    color: #666;
    font-size: 0.85rem;
    margin-left: 5px;
    background-color: #f8f9fa;
    padding: 2px 5px;
    border-radius: 3px;
}

.vet-services {
    margin: 10px 0;
    background-color: #f0f7f0;
    padding: 8px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    color: #444;
    border-left: 3px solid #4CAF50;
}

.vet-availability {
    margin-top: 15px;
    margin-bottom: 10px;
    background-color: #f8f9fa;
    padding: 8px;
    border-radius: 5px;
}

.availability-days {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.day-badge {
    display: inline-block;
    width: 35px;
    text-align: center;
    padding: 3px 0;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: bold;
}

.day-badge.available {
    background-color: #4CAF50;
    color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.day-badge.unavailable {
    background-color: #f8f9fa;
    color: #aaa;
    border: 1px solid #e0e0e0;
}

.vet-actions {
    display: flex;
    gap: 10px;
    padding: 15px 0 0;
    margin-top: auto;
}

.vet-actions a {
    flex: 1;
    text-align: center;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 5px;
    transition: all 0.3s;
}

.vet-actions .btn-primary {
    background-color: #4CAF50;
    color: white;
    border: none;
}

.vet-actions .btn-primary:hover {
    background-color: #3e8e41;
}

.vet-actions .btn-outline {
    background-color: transparent;
    color: #4CAF50;
    border: 1px solid #4CAF50;
}

.vet-actions .btn-outline:hover {
    background-color: #4CAF50;
    color: white;
}

/* Services d'urgence */
.emergency-services {
    padding: 40px 0;
}

.emergency-banner {
    background-color: #f8d7da;
    border-radius: 10px;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 30px;
}

.emergency-icon {
    font-size: 3rem;
    color: #dc3545;
}

.emergency-content {
    flex: 1;
}

.emergency-content h2 {
    color: #dc3545;
    margin-bottom: 10px;
}

.emergency-content p {
    margin-bottom: 15px;
}

/* Carte des vétérinaires */
.vets-map-section {
    padding: 60px 0;
    background-color: #f8f9fa;
}

.map-container {
    position: relative; /* Changé de sticky à relative */
    height: 600px;
    margin-bottom: 30px; /* Ajout d'une marge en bas pour séparer la carte du contenu suivant */
}

#map {
    height: 100%;
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
}

#vets-map {
    height: 500px;
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
}

/* Message d'erreur pour la carte */
.map-error-message {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #f8f9fa;
    padding: 2rem;
    text-align: center;
    color: #6c757d;
    border-radius: 10px;
}

.map-error-message i {
    font-size: 2rem;
    color: #dc3545;
    margin-bottom: 1rem;
}

.map-error-message p {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

/* Résultats de recherche */
.search-results {
    padding: 60px 0;
}

.search-results-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
}

.search-results-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding-right: 15px;
    margin-top: 30px;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.filter-label {
    font-weight: bold;
    color: #555;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.search-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.filter-btn {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 8px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover, .filter-btn.active {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

/* Messages d'erreur et de chargement */
.loading, .error-message, .no-results {
    text-align: center;
    padding: 40px;
    width: 100%;
}

.loading {
    color: #666;
}

.error-message {
    color: #dc3545;
}

.error-message i, .no-results i {
    font-size: 2rem;
    margin-bottom: 15px;
}

.no-results {
    color: #666;
}

/* Fenêtre d'info sur la carte */
.map-info-window {
    padding: 5px;
}

.map-info-window h3 {
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.map-info-window p {
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.emergency-text {
    color: #dc3545;
    font-weight: bold;
}

.map-link {
    display: inline-block;
    margin-top: 5px;
    color: #007bff;
    text-decoration: none;
}

.map-link:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .search-inputs {
        flex-direction: column;
    }
    
    .emergency-banner {
        flex-direction: column;
        text-align: center;
    }
    
    #vets-map {
        height: 350px;
    }
    
    .search-results-layout {
        grid-template-columns: 1fr;
    }
    
    .map-container {
        height: 400px;
        position: static;
        margin-bottom: 20px;
    }
    
    .filter-bar {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 576px) {
    .veterinaires-hero h1 {
        font-size: 2rem;
    }
    
    .categories-grid, .vets-grid {
        grid-template-columns: 1fr;
    }
}

/* Styles pour les filtres avancés */
.advanced-filters {
    margin-top: 10px;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

/* Suppression du toggle des filtres avancés */

.filter-options {
    display: block; /* Toujours affiché */
    background-color: #f9f9f9;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 10px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.filter-group {
    flex: 1;
    min-width: 160px;
}

.filter-group label {
    display: block;
    margin-bottom: 3px;
    font-weight: 500;
    color: #333;
    font-size: 0.85rem;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.85rem;
}

.filter-group select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23333" height="16" viewBox="0 0 24 24" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
}

/* Style pour la case à cocher d'urgence */
.emergency-toggle {
    display: flex;
    align-items: center;
    margin-top: 15px;
}

.checkbox-container {
    display: block;
    position: relative;
    padding-left: 28px;
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 16px;
    width: 16px;
    background-color: #eee;
    border-radius: 3px;
}

.checkbox-container:hover input ~ .checkmark {
    background-color: #ccc;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: #4a89dc;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Responsive pour les filtres */
@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .emergency-toggle {
        margin-top: 10px;
    }
}

/* Style pour le switch */
.switch-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    width: 100%;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-left: 10px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}
