/* Car Rental Manager - Frontend Styles */

/* Grid des voitures */
.glv-cars-grid {
    display: grid;
    gap: 30px;
    margin: 30px 0;
}

.glv-columns-1 {
    grid-template-columns: 1fr;
}

.glv-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.glv-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.glv-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 992px) {
    .glv-columns-3,
    .glv-columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .glv-cars-grid {
        grid-template-columns: 1fr;
    }
}

/* Carte voiture */
.glv-car-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.glv-car-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.glv-car-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.glv-car-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.glv-car-card:hover .glv-car-image img {
    transform: scale(1.05);
}

.glv-car-content {
    padding: 20px;
}

.glv-car-title {
    margin: 0 0 10px 0;
    font-size: 1.2em;
    font-weight: 600;
}

.glv-car-title a {
    color: #333;
    text-decoration: none;
}

.glv-car-title a:hover {
    color: #0073aa;
}

.glv-car-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    color: #666;
    font-size: 0.9em;
}

.glv-meta-item {
    display: flex;
    align-items: center;
}

.glv-car-price {
    margin-bottom: 15px;
    padding: 15px 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.glv-price-amount {
    font-size: 1.5em;
    font-weight: 700;
    color: #0073aa;
}

.glv-price-period {
    color: #666;
    margin-left: 5px;
}

/* Détails de la voiture */
.glv-car-details {
    max-width: 1200px;
    margin: 0 auto;
}

.glv-car-gallery {
    margin-bottom: 30px;
}

.glv-gallery-main {
    margin-bottom: 15px;
}

.glv-gallery-main img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.glv-gallery-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
}

.glv-gallery-thumb {
    flex-shrink: 0;
    width: 100px;
    height: 75px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.glv-gallery-thumb:hover,
.glv-gallery-thumb.active {
    border-color: #0073aa;
}

.glv-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.glv-car-info {
    margin-bottom: 30px;
}

.glv-car-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.glv-spec {
    display: flex;
    flex-direction: column;
}

.glv-spec-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.glv-spec-value {
    font-weight: 600;
    font-size: 1.1em;
}

.glv-car-options ul {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    list-style: none;
    padding: 0;
}

.glv-car-options li::before {
    content: "✓ ";
    color: #0073aa;
    font-weight: bold;
    margin-right: 5px;
}

.glv-car-pricing {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.glv-pricing-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.glv-rate {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #fff;
    border-radius: 4px;
}

.glv-rate-value {
    font-weight: 700;
    font-size: 1.2em;
    color: #0073aa;
}

.glv-free {
    font-size: 0.8em;
    color: #27ae60;
    font-weight: normal;
}

/* Styles pour les nouveaux types de tarifs */
.glv-rate-highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff !important;
}

.glv-rate-highlight .glv-rate-label,
.glv-rate-highlight .glv-rate-value {
    color: #fff !important;
}

.glv-rate-weekend {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.glv-rate-week {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.glv-rate-info {
    background: #e8f4f8;
    border-left: 4px solid #0073aa;
}

.glv-rate-info .glv-rate-value {
    color: #0073aa;
    font-weight: 600;
}

.glv-rate-extra {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
}

.glv-rate-extra .glv-rate-value {
    color: #856404;
    font-weight: 600;
}

.glv-pricing-message {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.glv-info-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.glv-info-box::before {
    content: "ℹ️";
    font-size: 1.2em;
}

.glv-info-notice {
    background: #e7f3ff;
    border-left: 4px solid #0073aa;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.glv-info-notice strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1.05em;
}

/* Section des kilomètres supplémentaires */
.glv-extra-km-section {
    background: #fff9e6;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.glv-extra-km-section h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #856404;
    font-size: 1.1em;
}

.glv-extra-km-details .glv-price-line {
    border-bottom: none;
    padding: 5px 0;
}

.glv-extra-km-details .glv-price-value {
    color: #856404;
    font-weight: 700;
}

.glv-price-total-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #0073aa;
}

/* Sélecteur de type de tarif dans le formulaire */
.glv-form-group select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    background: #fff;
    cursor: pointer;
}

.glv-form-group .description {
    font-size: 0.85em;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

/* Légende du calendrier - jours fermés */
.glv-legend-closed {
    background: #f0f0f0;
    border: 1px solid #999;
}

/* Formulaire de réservation */
.glv-booking-section {
    background: #fff;
    border: 2px solid #0073aa;
    border-radius: 8px;
    padding: 30px;
    margin-top: 30px;
}

.glv-booking-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.glv-form-group {
    display: flex;
    flex-direction: column;
}

.glv-form-group label {
    font-weight: 600;
    margin-bottom: 8px;
}

.glv-form-group input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
}

.glv-booking-date {
    background: #fff;
    cursor: pointer;
}

.glv-price-result {
    background: #f0f8ff;
    border: 1px solid #0073aa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.glv-price-result h4 {
    margin-top: 0;
    color: #0073aa;
}

.glv-price-breakdown {
    margin: 15px 0;
}

.glv-price-line {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
}

.glv-price-line:last-child {
    border-bottom: none;
}

.glv-price-total {
    font-size: 1.2em;
    font-weight: 700;
    padding-top: 15px;
    border-top: 2px solid #0073aa;
}

.glv-price-total .glv-price-value {
    color: #0073aa;
}

/* Calendrier */
.glv-availability-calendar {
    margin-top: 30px;
}

#crm-frontend-calendar {
    max-width: 600px;
    margin: 20px auto;
}

.glv-calendar-legend {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 15px;
}

.glv-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.glv-legend-color {
    width: 20px;
    height: 20px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.glv-legend-available {
    background: #d4edda;
}

.glv-legend-unavailable {
    background: #f8d7da;
}

/* Styles du calendrier jQuery UI personnalisés */
.ui-datepicker .ui-state-disabled {
    opacity: 0.5;
}

.ui-datepicker .glv-unavailable {
    background: #f8d7da !important;
    color: #721c24 !important;
}

.ui-datepicker .glv-reserved {
    background: #fff3cd !important;
    color: #856404 !important;
}

/* Boutons */
.glv-button {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.glv-button-primary {
    background: #0073aa;
    color: #fff;
}

.glv-button-primary:hover {
    background: #005a87;
    color: #fff;
}

.glv-button-success {
    background: #27ae60;
    color: #fff;
}

.glv-button-success:hover {
    background: #229954;
    color: #fff;
}

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

/* Modal de réservation */
.glv-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    overflow-y: auto;
}

.glv-modal-content {
    background: #fff;
    max-width: 600px;
    margin: 50px auto;
    padding: 30px;
    border-radius: 8px;
    position: relative;
}

.glv-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.glv-modal-close:hover {
    color: #000;
}

/* Messages */
.glv-message {
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
}

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

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

.glv-message-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Responsive */
@media (max-width: 768px) {
    .glv-car-specs {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .glv-booking-form {
        grid-template-columns: 1fr;
    }
    
    .glv-booking-section {
        padding: 20px;
    }
}

/* Mentions légales */
.glv-legal-terms {
    margin-top: 40px;
    padding: 25px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.glv-legal-terms h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2em;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.glv-legal-content {
    font-size: 0.9em;
    line-height: 1.6;
    color: #555;
}

.glv-legal-content p {
    margin-bottom: 10px;
}

.glv-legal-content ul,
.glv-legal-content ol {
    margin-left: 20px;
    margin-bottom: 10px;
}

.glv-legal-content li {
    margin-bottom: 5px;
}

.glv-legal-content strong {
    color: #333;
}

@media (max-width: 768px) {
    .glv-legal-terms {
        padding: 15px;
        margin-top: 30px;
    }
    
    .glv-legal-content {
        font-size: 0.85em;
    }
}

/* Véhicules similaires */
.glv-similar-cars {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 2px solid #e0e0e0;
}

.glv-similar-cars h3 {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 1.5em;
    color: #333;
    text-align: center;
}

.glv-similar-cars .glv-cars-grid {
    margin-top: 30px;
}

/* Specs mini pour les cartes similaires */
.glv-car-specs-mini {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
    font-size: 0.85em;
    color: #666;
}

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

.glv-spec-item .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Responsive pour véhicules similaires */
@media (max-width: 992px) {
    .glv-similar-cars .glv-columns-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .glv-similar-cars .glv-columns-3 {
        grid-template-columns: 1fr;
    }
    
    .glv-similar-cars {
        margin-top: 30px;
        padding-top: 30px;
    }
    
    .glv-similar-cars h3 {
        font-size: 1.3em;
    }
}
