/* Couleurs principales */
:root {
    --vcrm-primary: #025833;
    --vcrm-secondary: #E6B125;
    --vcrm-dark: #333;
    --vcrm-light: #f5f5f5;
}

/* Formulaires */
.vcrm-form {
    display: grid;
    gap: 12px;
    margin: 16px 0;
}

.vcrm-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.vcrm-btn {
    display: inline-block;
    background: var(--vcrm-primary);
    color: #fff;
    padding: 8px 14px;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

.vcrm-btn:hover {
    background: #034025;
}

/* View toggle */
.vcrm-view-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    justify-content: flex-end;
}

.vcrm-toggle-btn {
    background: #f0f0f1;
    border: 1px solid #c3c4c7;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    transition: all 0.3s;
}

.vcrm-toggle-btn.active {
    background: var(--vcrm-primary);
    color: #fff;
    border-color: var(--vcrm-primary);
}

.vcrm-toggle-btn:hover {
    background: #dcdcde;
}

.vcrm-toggle-btn.active:hover {
    background: #034025;
}

/* Cards grid/list view */
.vcrm-reserve-page {
    background: var(--vcrm-light);
    padding: 24px;
    min-height: 100vh;
}

.vcrm-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.vcrm-cards.vcrm-view-list {
    grid-template-columns: 1fr;
}

.vcrm-cards.vcrm-view-list .vcrm-card {
    display: flex;
    flex-direction: row;
    max-width: 100%;
}

.vcrm-cards.vcrm-view-list .vcrm-card-image {
    flex: 0 0 300px;
    max-width: 300px;
}

.vcrm-cards.vcrm-view-list .vcrm-card-body {
    flex: 1;
}

/* Card styling selon l'image */
.vcrm-card {
    border: none;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.vcrm-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Card header avec titre et badge prix */
.vcrm-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 16px 0;
    position: relative;
}

.vcrm-card-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
    color: var(--vcrm-dark);
}

.vcrm-price-badge {
    background: var(--vcrm-dark);
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 16px;
    white-space: nowrap;
}

/* Card image */
.vcrm-card-image {
    position: relative;
    width: 100%;
    padding: 16px;
    background: #f9f9f9;
}

.vcrm-car-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 4px;
}

.vcrm-car-img-placeholder {
    width: 100%;
    height: 200px;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    border-radius: 4px;
}

/* Card specs avec icônes */
.vcrm-card-specs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 16px;
    background: #fff;
}

.vcrm-spec-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}

.vcrm-spec-icon {
    font-size: 20px;
    line-height: 1;
}

.vcrm-spec-value {
    font-size: 14px;
    color: var(--vcrm-dark);
    font-weight: 500;
}

/* Card actions - deux boutons */
.vcrm-card-actions {
    display: flex;
    gap: 8px;
    padding: 0 16px 16px;
}

.vcrm-btn-details {
    flex: 1;
    background: var(--vcrm-dark);
    color: #fff;
    padding: 12px 16px;
    text-decoration: none;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
    transition: background 0.3s;
}

.vcrm-btn-details:hover {
    background: #555;
    color: #fff;
}

.vcrm-btn-book {
    flex: 1;
    background: var(--vcrm-secondary);
    color: var(--vcrm-dark);
    padding: 12px 16px;
    text-decoration: none;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
    transition: background 0.3s;
}

.vcrm-btn-book:hover {
    background: #d4a01f;
    color: var(--vcrm-dark);
}

/* Confirmation page */
.vcrm-confirm .vcrm-summary {
    border: 1px solid #eee;
    padding: 16px;
    border-radius: 6px;
    margin: 12px 0;
    background: #fff;
}

.vcrm-dates-editable input[type="date"] {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-left: 8px;
    font-size: 14px;
}

.vcrm-total {
    font-size: 20px;
    color: var(--vcrm-primary);
    margin-top: 12px;
    font-weight: bold;
}

.vcrm-thanks {
    text-align: center;
    margin: 32px 0;
}

.vcrm-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.vcrm-kpi {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 16px;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .vcrm-cards {
        grid-template-columns: 1fr;
    }
    
    .vcrm-card-specs {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .vcrm-card-actions {
        flex-direction: column;
    }
    
    .vcrm-row {
        grid-template-columns: 1fr;
    }
    
    .vcrm-cards.vcrm-view-list .vcrm-card {
        flex-direction: column;
    }
    
    .vcrm-cards.vcrm-view-list .vcrm-card-image {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .vcrm-reserve-page {
        padding: 12px;
    }
    
    .vcrm-card-specs {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        padding: 12px;
    }
    
    .vcrm-spec-icon {
        font-size: 18px;
    }
    
    .vcrm-spec-value {
        font-size: 12px;
    }
}

/* Modal */
.vcrm-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.vcrm-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 24px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    position: relative;
}

.vcrm-modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.vcrm-modal-close:hover {
    color: #000;
}

.vcrm-modal-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.vcrm-modal-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.vcrm-modal-row input,
.vcrm-modal-row select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Page détails véhicule */
.vcrm-car-details-page {
    padding: 24px;
    background: #fff;
}

.vcrm-car-details-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.vcrm-car-details-left {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.vcrm-detail-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.vcrm-detail-img-placeholder {
    width: 100%;
    height: 400px;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.vcrm-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--vcrm-light);
}

.vcrm-detail-title {
    font-size: 28px;
    margin: 0;
    color: var(--vcrm-dark);
}

.vcrm-detail-base-price {
    font-size: 24px;
    font-weight: bold;
    color: var(--vcrm-primary);
}

.vcrm-detail-specs {
    margin-bottom: 24px;
}

.vcrm-detail-spec-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.vcrm-detail-spec-label {
    font-weight: 500;
    color: #666;
}

.vcrm-detail-spec-value {
    font-weight: 500;
    color: var(--vcrm-dark);
}

.vcrm-detail-spec-value.highlight {
    color: var(--vcrm-secondary);
    font-weight: bold;
}

.vcrm-detail-services {
    background: var(--vcrm-light);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.vcrm-detail-services h3 {
    margin-top: 0;
    color: var(--vcrm-primary);
}

.vcrm-services-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.vcrm-services-list li {
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vcrm-check-icon {
    color: var(--vcrm-secondary);
    font-weight: bold;
    font-size: 18px;
}

.vcrm-detail-pricing {
    margin-bottom: 24px;
}

.vcrm-detail-pricing h3 {
    color: var(--vcrm-primary);
    margin-bottom: 16px;
}

.vcrm-pricing-tiers {
    background: #f9f9f9;
    padding: 16px;
    border-radius: 8px;
}

.vcrm-pricing-section {
    margin-bottom: 16px;
}

.vcrm-pricing-section h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: var(--vcrm-dark);
}

.vcrm-pricing-section p {
    margin: 4px 0;
    color: #666;
}

.vcrm-btn-reserve {
    background: var(--vcrm-secondary);
    color: var(--vcrm-dark);
    padding: 14px 28px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: background 0.3s;
}

.vcrm-btn-reserve:hover {
    background: #d4a01f;
}

/* Page de confirmation stylée */
.vcrm-confirm-page {
    position: relative;
    padding: 40px 20px;
    background: #f8f9fa;
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
}

.vcrm-price-badge-top {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--vcrm-primary);
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 24px;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.vcrm-contact-bar {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
}

.vcrm-contact-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s;
}

.vcrm-contact-icon:hover {
    transform: scale(1.1);
}

.vcrm-phone { background: #25D366; }
.vcrm-whatsapp { background: #25D366; }
.vcrm-email { background: #007bff; }

.vcrm-confirm-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 32px;
    margin-top: 80px;
}

/* Colonne gauche */
.vcrm-confirm-left {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.vcrm-reservation-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.vcrm-reservation-header h2 {
    margin: 0;
    font-size: 24px;
    color: var(--vcrm-dark);
}

.vcrm-icon-car {
    font-size: 28px;
}

.vcrm-reservation-info-box {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.vcrm-reservation-info-box h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: var(--vcrm-dark);
    border-bottom: 2px solid var(--vcrm-light);
    padding-bottom: 12px;
}

.vcrm-car-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.vcrm-icon-car-small {
    font-size: 24px;
}

.vcrm-car-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--vcrm-dark);
}

.vcrm-location-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.vcrm-location-item {
    padding: 16px;
    background: var(--vcrm-light);
    border-radius: 8px;
}

.vcrm-location-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.vcrm-location-header strong {
    color: var(--vcrm-dark);
    font-size: 16px;
}

.vcrm-convoyage-note {
    font-size: 14px;
    color: #666;
}

.vcrm-date-time {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.vcrm-icon-calendar,
.vcrm-icon-clock {
    font-size: 16px;
}

/* Colonne droite */
.vcrm-confirm-right {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Section Franchise */
.vcrm-franchise-section {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    background: #e8f5e9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 32px;
}

.vcrm-franchise-left strong {
    font-size: 16px;
    color: var(--vcrm-dark);
}

.vcrm-franchise-center {
    text-align: center;
    font-weight: 500;
    color: var(--vcrm-dark);
}

.vcrm-franchise-right {
    display: flex;
    justify-content: flex-end;
}

.vcrm-toggle-switch {
    position: relative;
    display: inline-block;
    width: 120px;
    height: 40px;
}

.vcrm-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.vcrm-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 500;
}

.vcrm-toggle-slider:before {
    position: absolute;
    content: "";
    height: 32px;
    width: 32px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.vcrm-toggle-switch input:checked + .vcrm-toggle-slider {
    background-color: var(--vcrm-primary);
}

.vcrm-toggle-switch input:checked + .vcrm-toggle-slider:before {
    transform: translateX(80px);
}

.vcrm-toggle-no,
.vcrm-toggle-yes {
    z-index: 1;
    transition: opacity 0.3s;
}

.vcrm-toggle-switch input:checked + .vcrm-toggle-slider .vcrm-toggle-no {
    opacity: 0.3;
}

.vcrm-toggle-switch input:not(:checked) + .vcrm-toggle-slider .vcrm-toggle-yes {
    opacity: 0.3;
}

/* Section Réserver */
.vcrm-reserve-section {
    margin-bottom: 32px;
}

.vcrm-reserve-section h3 {
    margin: 0 0 8px 0;
    font-size: 22px;
    color: var(--vcrm-dark);
}

.vcrm-form-instruction {
    color: #666;
    font-size: 14px;
    margin-bottom: 24px;
}

.vcrm-form-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.vcrm-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.vcrm-input-icon {
    position: absolute;
    left: 16px;
    font-size: 20px;
    z-index: 1;
}

.vcrm-input-group input {
    width: 100%;
    padding: 14px 14px 14px 50px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.vcrm-input-group input:focus {
    outline: none;
    border-color: var(--vcrm-primary);
}

.vcrm-dates-editable-inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.vcrm-date-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vcrm-date-input-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--vcrm-dark);
}

.vcrm-date-input-group input[type="date"] {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

/* Détail des coûts */
.vcrm-cost-breakdown {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.vcrm-cost-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.vcrm-cost-item:last-of-type {
    border-bottom: none;
}

.vcrm-cost-label {
    color: #666;
    font-size: 14px;
}

.vcrm-cost-value {
    font-weight: 500;
    color: var(--vcrm-dark);
    font-size: 14px;
}

.vcrm-cost-total {
    display: flex;
    justify-content: space-between;
    padding: 16px 0 0 0;
    margin-top: 16px;
    border-top: 2px solid var(--vcrm-primary);
}

.vcrm-cost-total .vcrm-cost-label {
    font-size: 18px;
    font-weight: bold;
    color: var(--vcrm-dark);
}

.vcrm-cost-total .vcrm-cost-value {
    font-size: 20px;
    font-weight: bold;
    color: var(--vcrm-primary);
}

/* Checkbox conditions */
.vcrm-terms-checkbox {
    margin-bottom: 24px;
}

.vcrm-terms-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.vcrm-terms-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Bouton Réserver */
.vcrm-btn-reserve-large {
    width: 100%;
    background: var(--vcrm-secondary);
    color: var(--vcrm-dark);
    padding: 16px 32px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.vcrm-btn-reserve-large:hover {
    background: #d4a01f;
}

@media (max-width: 768px) {
    .vcrm-confirm-container {
        grid-template-columns: 1fr;
    }
    
    .vcrm-confirm-left {
        position: static;
    }
    
    .vcrm-price-badge-top {
        position: relative;
        top: 0;
        left: 0;
        margin-bottom: 20px;
        display: inline-block;
    }
    
    .vcrm-contact-bar {
        position: fixed;
        bottom: 20px;
        right: 20px;
        top: auto;
        transform: none;
        flex-direction: row;
    }
    
    .vcrm-franchise-section {
        grid-template-columns: 1fr;
        gap: 16px;
        text-align: center;
    }
    
    .vcrm-franchise-right {
        justify-content: center;
    }
    
    .vcrm-dates-editable-inline {
        grid-template-columns: 1fr;
    }
}
