/**
 * Styles pour le formulaire de réservation multi-étapes
 * Transport Colis Camionnette
 */

/* Variables CSS */
:root {
    --tcc-primary: #2271b1;
    --tcc-primary-hover: #135e96;
    --tcc-secondary: #646970;
    --tcc-success: #00a32a;
    --tcc-warning: #dba617;
    --tcc-error: #d63638;
    --tcc-light: #f6f7f7;
    --tcc-white: #ffffff;
    --tcc-border: #c3c4c7;
    --tcc-shadow: 0 2px 10px rgba(0,0,0,0.1);
    --tcc-radius: 8px;
    --tcc-transition: all 0.3s ease;
}

/* Conteneur principal */
.tcc-booking-form {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--tcc-white);
    border-radius: var(--tcc-radius);
    box-shadow: var(--tcc-shadow);
}

/* Barre de progression */
.tcc-progress-bar {
    margin-bottom: 40px;
    position: relative;
}

.tcc-progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.tcc-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    position: relative;
}

.tcc-step .step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--tcc-light);
    border: 2px solid var(--tcc-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--tcc-secondary);
    margin-bottom: 8px;
    transition: var(--tcc-transition);
}

.tcc-step .step-title {
    font-size: 12px;
    color: var(--tcc-secondary);
    font-weight: 500;
}

.tcc-step.active .step-number {
    background: var(--tcc-primary);
    border-color: var(--tcc-primary);
    color: var(--tcc-white);
}

.tcc-step.completed .step-number {
    background: var(--tcc-success);
    border-color: var(--tcc-success);
    color: var(--tcc-white);
}

.tcc-step.completed .step-number::after {
    content: "✓";
    font-size: 16px;
}

.tcc-progress-line {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--tcc-border);
    z-index: 1;
}

.tcc-progress-fill {
    height: 100%;
    background: var(--tcc-primary);
    transition: width 0.5s ease;
    border-radius: 1px;
}

/* Étapes du formulaire */
.tcc-form-step {
    min-height: 400px;
    animation: fadeIn 0.3s ease;
}

.tcc-step-header {
    text-align: center;
    margin-bottom: 30px;
}

.tcc-step-header h2 {
    color: var(--tcc-primary);
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 600;
}

.tcc-step-header p {
    color: var(--tcc-secondary);
    margin: 0;
    font-size: 16px;
}

/* Étape 1: Adresses et carte */
.tcc-addresses-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.tcc-address-input {
    position: relative;
}

.tcc-address-input label {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--tcc-secondary);
    margin-bottom: 8px;
}

.tcc-icon {
    font-size: 18px;
    margin-right: 8px;
}

.tcc-icon.pickup {
    color: var(--tcc-primary);
}

.tcc-icon.delivery {
    color: var(--tcc-success);
}

.tcc-address-input input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--tcc-border);
    border-radius: var(--tcc-radius);
    font-size: 16px;
    transition: var(--tcc-transition);
}

.tcc-address-input input[type="text"]:focus {
    outline: none;
    border-color: var(--tcc-primary);
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

.tcc-map-container {
    margin: 30px 0;
    border-radius: var(--tcc-radius);
    overflow: hidden;
    box-shadow: var(--tcc-shadow);
}

.tcc-distance-info {
    margin-top: 20px;
}

.tcc-distance-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--tcc-white);
    padding: 20px;
    border-radius: var(--tcc-radius);
    text-align: center;
}

.tcc-distance-card h3 {
    margin: 0 0 15px 0;
    font-size: 20px;
}

.tcc-distance-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.tcc-distance-details:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.distance-label {
    font-weight: 500;
}

.distance-value {
    font-weight: bold;
    font-size: 18px;
}

/* Étape 2: Véhicules */
.tcc-vehicles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.tcc-vehicle-card {
    border: 2px solid var(--tcc-border);
    border-radius: var(--tcc-radius);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--tcc-transition);
    position: relative;
    overflow: hidden;
}

.tcc-vehicle-card:hover {
    border-color: var(--tcc-primary);
    transform: translateY(-2px);
    box-shadow: var(--tcc-shadow);
}

.tcc-vehicle-card.selected {
    border-color: var(--tcc-primary);
    background: rgba(34, 113, 177, 0.05);
}

.vehicle-image {
    margin-bottom: 15px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--tcc-radius);
    overflow: hidden;
}

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

.vehicle-image.placeholder {
    background: var(--tcc-light);
    font-size: 48px;
}

.tcc-vehicle-card .vehicle-info h3 {
    color: var(--tcc-primary) !important;
    margin: 0 0 5px 0 !important;
    font-size: 18px !important;
    font-weight: 500 !important;
}

.vehicle-description {
    color: var(--tcc-secondary);
    margin-bottom: 15px;
    line-height: 1.5;
}

.vehicle-specs {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.spec-item {
    font-size: 14px;
    color: var(--tcc-secondary);
}

.vehicle-select-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(34, 113, 177, 0.9);
    color: var(--tcc-white);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--tcc-transition);
}

.tcc-vehicle-card:hover .vehicle-select-overlay {
    opacity: 1;
}

.tcc-vehicle-card.selected .vehicle-select-overlay {
    opacity: 1;
    background: rgba(0, 163, 42, 0.9);
}

.select-text {
    font-size: 18px;
    font-weight: bold;
}

/* Étape 3: Tarification */
.tcc-pricing-container {
    max-width: 500px;
    margin: 0 auto;
}

.tcc-pricing-card {
    background: var(--tcc-white);
    border: 2px solid var(--tcc-border);
    border-radius: var(--tcc-radius);
    padding: 30px;
    box-shadow: var(--tcc-shadow);
}

.tcc-pricing-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--tcc-light);
}

.tcc-pricing-item:last-child {
    border-bottom: none;
}

.tcc-pricing-item.total {
    border-top: 2px solid var(--tcc-primary);
    margin-top: 10px;
    padding-top: 20px;
    font-size: 20px;
    font-weight: bold;
    color: var(--tcc-primary);
}

.pricing-label {
    font-weight: 500;
    color: var(--tcc-secondary);
}

.pricing-value {
    font-weight: bold;
    font-size: 18px;
    color: var(--tcc-primary);
}

.tcc-pricing-separator {
    height: 1px;
    background: var(--tcc-border);
    margin: 15px 0;
}

.tcc-pricing-note {
    margin-top: 20px;
    padding: 15px;
    background: var(--tcc-light);
    border-radius: var(--tcc-radius);
    text-align: center;
}

.tcc-pricing-note p {
    margin: 0;
    color: var(--tcc-secondary);
    font-size: 14px;
}

/* Étape 4: Coordonnées */
.tcc-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

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

.tcc-form-group.full-width {
    grid-column: 1 / -1;
}

.tcc-form-group label {
    font-weight: 600;
    color: var(--tcc-secondary);
    margin-bottom: 8px;
}

.tcc-form-group input,
.tcc-form-group textarea {
    padding: 12px 16px;
    border: 2px solid var(--tcc-border);
    border-radius: var(--tcc-radius);
    font-size: 16px;
    transition: var(--tcc-transition);
}

.tcc-form-group input:focus,
.tcc-form-group textarea:focus {
    outline: none;
    border-color: var(--tcc-primary);
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

.tcc-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Étape 5: Récapitulatif */
.tcc-summary-container {
    display: grid;
    gap: 20px;
}

.tcc-summary-section {
    background: var(--tcc-white);
    border: 2px solid var(--tcc-border);
    border-radius: var(--tcc-radius);
    padding: 20px;
}

.tcc-summary-section h3 {
    color: var(--tcc-primary);
    margin: 0 0 15px 0;
    font-size: 18px;
    border-bottom: 2px solid var(--tcc-light);
    padding-bottom: 10px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--tcc-light);
}

.summary-item:last-child {
    border-bottom: none;
}

.tcc-summary-section.pricing {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--tcc-white);
    border-color: var(--tcc-primary);
}

.tcc-summary-section.pricing h3 {
    color: var(--tcc-white);
    border-bottom-color: rgba(255,255,255,0.2);
}

.tcc-summary-section.pricing .summary-item {
    border-bottom-color: rgba(255,255,255,0.2);
}

.price-highlight {
    font-size: 24px;
    font-weight: bold;
}

/* Étape 6: Confirmation */
.tcc-confirmation-success {
    text-align: center;
    padding: 40px 20px;
}

.confirmation-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.tcc-confirmation-success h3 {
    color: var(--tcc-success);
    margin-bottom: 20px;
    font-size: 28px;
}

.confirmation-details {
    background: var(--tcc-light);
    padding: 20px;
    border-radius: var(--tcc-radius);
    margin-bottom: 30px;
}

.confirmation-next-steps {
    text-align: left;
    max-width: 500px;
    margin: 0 auto 30px;
}

.confirmation-next-steps h4 {
    color: var(--tcc-primary);
    margin-bottom: 15px;
}

.confirmation-next-steps ol {
    padding-left: 20px;
}

.confirmation-next-steps li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Boutons */
.tcc-btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--tcc-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--tcc-transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.tcc-btn-primary {
    background: var(--tcc-primary);
    color: var(--tcc-white);
}

.tcc-btn-primary:hover {
    background: var(--tcc-primary-hover);
}

.tcc-btn-secondary {
    background: var(--tcc-secondary);
    color: var(--tcc-white);
}

.tcc-btn-secondary:hover {
    background: #50575e;
}

.tcc-btn-success {
    background: var(--tcc-success);
    color: var(--tcc-white);
}

.tcc-btn-success:hover {
    background: #008a00;
}

/* Navigation */
.tcc-form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid var(--tcc-light);
}

/* Loading overlay */
.tcc-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.tcc-loading-spinner {
    background: var(--tcc-white);
    padding: 30px;
    border-radius: var(--tcc-radius);
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--tcc-light);
    border-top: 4px solid var(--tcc-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notifications */
.tcc-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: var(--tcc-radius);
    color: var(--tcc-white);
    font-weight: 500;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 300px;
    box-shadow: var(--tcc-shadow);
}

.tcc-notification-success {
    background: var(--tcc-success);
}

.tcc-notification-error {
    background: var(--tcc-error);
}

.tcc-notification-warning {
    background: var(--tcc-warning);
}

.tcc-notification-info {
    background: var(--tcc-primary);
}

.notification-close {
    background: none;
    border: none;
    color: var(--tcc-white);
    font-size: 20px;
    cursor: pointer;
    margin-left: 15px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .tcc-booking-form {
        padding: 15px;
        margin: 10px;
    }
    
    .tcc-progress-steps {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .tcc-step .step-title {
        font-size: 10px;
    }
    
    .tcc-addresses-container {
        grid-template-columns: 1fr;
    }
    
    .tcc-vehicles-grid {
        grid-template-columns: 1fr;
    }
    
    .tcc-form-grid {
        grid-template-columns: 1fr;
    }
    
    .tcc-form-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .tcc-btn {
        width: 100%;
    }
    
    .tcc-notification {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .tcc-step-header h2 {
        font-size: 24px;
    }
    
    .tcc-step .step-number {
        width: 35px;
        height: 35px;
    }
    
    .tcc-distance-details {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
}

/* Styles pour les informations sur les colis */
.tcc-package-info-section {
    background: var(--tcc-light);
    border-radius: var(--tcc-radius);
    padding: 25px;
    margin-bottom: 30px;
}

.tcc-package-info-section h3 {
    margin: 0 0 20px 0;
    color: var(--tcc-primary);
    font-size: 1.2em;
    font-weight: 600;
}

.tcc-package-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.tcc-field-group {
    display: flex;
    flex-direction: column;
}

.tcc-field-group label {
    font-weight: 600;
    color: var(--tcc-secondary);
    margin-bottom: 8px;
    font-size: 0.95em;
}

.tcc-field-group input {
    padding: 12px 15px;
    border: 2px solid var(--tcc-border);
    border-radius: var(--tcc-radius);
    font-size: 1em;
    transition: var(--tcc-transition);
    background: var(--tcc-white);
}

.tcc-field-group input:focus {
    outline: none;
    border-color: var(--tcc-primary);
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

.tcc-field-group small {
    margin-top: 5px;
    color: var(--tcc-secondary);
    font-size: 0.85em;
    line-height: 1.4;
}

.tcc-total-weight-display {
    background: var(--tcc-white);
    border: 2px solid var(--tcc-primary);
    border-radius: var(--tcc-radius);
    padding: 15px;
    text-align: center;
}

.total-weight-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.total-weight-info .label {
    font-weight: 600;
    color: var(--tcc-secondary);
}

.total-weight-info .value {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--tcc-primary);
    background: rgba(34, 113, 177, 0.1);
    padding: 5px 12px;
    border-radius: 20px;
}

/* Responsive pour les champs de colis */
@media (max-width: 768px) {
    .tcc-package-fields-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .total-weight-info {
        flex-direction: column;
        gap: 8px;
    }
}
