/* AutoScout24 WordPress Integration Styles v1.2.0 */

.as24-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Filtres */
.as24-filters {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.as24-filters h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.filter-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-bottom: 15px;
}

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

.filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
    font-size: 13px;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    transition: border-color 0.3s;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #ff6600;
}

.filter-group select {
    cursor: pointer;
}

.filter-group select:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
    color: #999;
}

/* Actions des filtres */
.filter-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.as24-btn-primary {
    background: #ff6600;
    flex: 0 0 auto;
    min-width: 150px;
}

.as24-btn-primary:hover {
    background: #e55a00;
}

.as24-btn-secondary {
    background: #6c757d;
    flex: 0 0 auto;
    min-width: 120px;
}

.as24-btn-secondary:hover {
    background: #5a6268;
}

.filter-count {
    color: #666;
    font-size: 14px;
    margin-left: auto;
}

.filter-count strong {
    color: #ff6600;
    font-size: 16px;
}

/* Message aucun résultat */
.as24-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

/* Grille de véhicules */
.as24-vehicles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

/* Carte véhicule */
.as24-vehicle-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

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

.vehicle-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #f0f0f0;
    position: relative;
}

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

.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    font-size: 14px;
}

.vehicle-info {
    padding: 15px;
}

.vehicle-title {
    font-size: 18px;
    margin: 0 0 10px 0;
    color: #333;
    font-weight: 600;
    line-height: 1.3;
    min-height: 48px;
}

.vehicle-details {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #666;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.vehicle-specs {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #666;
    flex-wrap: wrap;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #f0f0f0;
    border-radius: 4px;
}

.vehicle-price {
    font-size: 24px;
    font-weight: bold;
    color: #ff6600;
    margin-bottom: 15px;
}

.vehicle-actions {
    display: flex;
    gap: 10px;
}

/* Boutons */
.as24-btn {
    padding: 10px 20px;
    background: #ff6600;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s;
    flex: 1;
}

.as24-btn:hover {
    background: #e55a00;
}

.as24-detail-btn {
    background: #333;
}

.as24-detail-btn:hover {
    background: #555;
}

/* Pagination */
.as24-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.page-info {
    font-size: 14px;
    color: #666;
}

#current-page {
    font-weight: bold;
    color: #ff6600;
}

/* Modal */
.as24-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.as24-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s;
}

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

.as24-close {
    position: sticky;
    top: 10px;
    float: right;
    font-size: 32px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    z-index: 1;
    background: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.as24-close:hover {
    color: #ff6600;
}

/* Détails du véhicule dans la modal */
.vehicle-detail-header {
    padding: 30px;
    border-bottom: 1px solid #e0e0e0;
}

.vehicle-detail-title {
    font-size: 28px;
    margin: 0 0 10px 0;
    color: #333;
}

.vehicle-detail-price {
    font-size: 32px;
    font-weight: bold;
    color: #ff6600;
}

.vehicle-detail-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
    padding: 20px;
    background: #f8f9fa;
}

.vehicle-detail-gallery img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s;
}

.vehicle-detail-gallery img:hover {
    transform: scale(1.05);
}

.vehicle-detail-specs {
    padding: 30px;
}

.vehicle-detail-specs h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.spec-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.spec-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.spec-value {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.vehicle-description {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    line-height: 1.6;
    color: #555;
}

/* Formulaire de contact */
.contact-form {
    padding: 30px;
    background: #f8f9fa;
}

.contact-form h3 {
    margin-top: 0;
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

.form-message {
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Messages d'erreur */
.as24-error {
    padding: 15px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 20px 0;
}

/* Loading */
.as24-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.as24-loading:after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Responsive */
@media (max-width: 768px) {
    .as24-vehicles-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-row {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-count {
        margin-left: 0;
        text-align: center;
        margin-top: 10px;
    }
    
    .vehicle-actions {
        flex-direction: column;
    }
    
    .as24-modal-content {
        width: 95%;
        margin: 10px auto;
    }
    
    .specs-grid {
        grid-template-columns: 1fr;
    }
    
    .vehicle-detail-gallery {
        grid-template-columns: 1fr;
    }
}