/**
 * OFFRES CAMIONS - STYLES
 * Plateforme de partage de capacité transport type Amazon Relay
 */

/* ============================================
   HERO TRUCKS
   ============================================ */
.hero-trucks {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero-trucks .hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(26, 58, 82, 0.7) 0%,
        rgba(45, 85, 117, 0.65) 50%,
        rgba(15, 38, 53, 0.7) 100%
    ),
    url('../images/flotte-ecomove.jpg') center/cover;
    z-index: -1;
}

.hero-trucks .hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
}

.hero-trucks .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(68, 240, 224, 0.2);
    color: var(--accent-turquoise);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 2px solid rgba(68, 240, 224, 0.3);
}

.hero-trucks h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    color: #52F7E7;
}

.hero-trucks .hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto 3rem;
    opacity: 0.95;
}

.hero-trucks .hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.stat-card-turquoise {
    background: rgba(68, 240, 224, 0.15);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    min-width: 180px;
    border: 2px solid rgba(68, 240, 224, 0.3);
    transition: all 0.3s ease;
}

.stat-card-turquoise:hover {
    transform: translateY(-5px);
    background: rgba(68, 240, 224, 0.25);
    border-color: rgba(68, 240, 224, 0.5);
}

.stat-card-turquoise .stat-icon {
    font-size: 2.5rem;
    color: var(--accent-turquoise);
    margin-bottom: 1rem;
}

.stat-card-turquoise .stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.5rem;
}

.stat-card-turquoise .stat-label {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   TABS NAVIGATION
   ============================================ */
.tabs-section {
    background: white;
    border-bottom: 2px solid var(--light-gray);
    position: sticky;
    top: 80px;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.tabs-nav {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: thin;
}

.tab-btn {
    flex: 1;
    min-width: 200px;
    padding: 1.25rem 2rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    font-weight: 600;
    color: var(--medium-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tab-btn:hover {
    background: var(--lightest-gray);
    color: var(--primary);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--accent-turquoise);
    background: var(--lightest-gray);
}

.tab-btn i {
    font-size: 1.1rem;
}

/* ============================================
   TAB CONTENT
   ============================================ */
.tab-content {
    display: none;
    padding: 4rem 0;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

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

/* ============================================
   SEARCH FORM
   ============================================ */
.search-form-card {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 3rem;
}

.search-form .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.search-form .form-row:last-child {
    margin-bottom: 0;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 1.1rem;
}

.input-with-icon input,
.input-with-icon select {
    padding-left: 3rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checkbox-group label {
    margin: 0;
    cursor: pointer;
    font-weight: 500;
}

/* ============================================
   SEARCH RESULTS
   ============================================ */
.search-results-container {
    margin-top: 3rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.results-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

.results-header h3 span {
    color: var(--primary);
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sort-controls label {
    font-weight: 600;
    color: var(--medium-dark);
}

.sort-controls select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-size: 0.95rem;
    min-width: 200px;
}

/* ============================================
   OFFERS LIST
   ============================================ */
.offers-list {
    display: grid;
    gap: 1.5rem;
}

.offer-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--lighter-gray);
    transition: all 0.3s ease;
    cursor: pointer;
}

.offer-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-turquoise);
    transform: translateY(-3px);
}

.offer-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.offer-title {
    flex: 1;
}

.offer-title h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.offer-title h3 i {
    color: var(--primary);
}

.offer-company {
    font-size: 1rem;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.offer-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.offer-rating .stars {
    color: #ffa500;
    font-size: 1.1rem;
}

.offer-rating .rating-value {
    font-weight: 600;
    color: var(--dark);
}

.offer-rating .rating-count {
    color: var(--gray);
    font-size: 0.9rem;
}

.offer-price-badge {
    background: linear-gradient(135deg, var(--primary), var(--dark-blue));
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    text-align: center;
    min-width: 140px;
}

.offer-price-badge .price {
    font-size: 2rem;
    font-weight: 800;
    display: block;
    line-height: 1;
}

.offer-price-badge .per-km {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-top: 0.25rem;
}

.offer-route {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: var(--lightest-gray);
    border-radius: 12px;
}

.offer-location {
    flex: 1;
    text-align: center;
}

.offer-location .city {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
}

.offer-location .postal {
    font-size: 0.9rem;
    color: var(--gray);
}

.offer-arrow {
    font-size: 1.5rem;
    color: var(--primary);
}

.offer-distance {
    background: white;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    text-align: center;
    border: 2px solid var(--light-gray);
}

.offer-distance .value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    display: block;
}

.offer-distance .label {
    font-size: 0.85rem;
    color: var(--gray);
}

.offer-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--lightest-gray);
    border-radius: 8px;
}

.detail-item i {
    font-size: 1.3rem;
    color: var(--primary);
    width: 30px;
    text-align: center;
}

.detail-item .detail-content {
    flex: 1;
}

.detail-item .detail-label {
    font-size: 0.85rem;
    color: var(--gray);
    display: block;
}

.detail-item .detail-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
}

.offer-equipment {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.equipment-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(68, 240, 224, 0.1);
    border: 1px solid rgba(68, 240, 224, 0.3);
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--dark);
    font-weight: 500;
}

.equipment-badge i {
    color: var(--accent-turquoise);
}

.offer-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 2px solid var(--lighter-gray);
    flex-wrap: wrap;
    gap: 1rem;
}

.offer-status {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
}

.status-badge.disponible {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.partiel {
    background: rgba(251, 191, 36, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.status-badge.reservee {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.capacity-bar {
    flex: 1;
    max-width: 300px;
}

.capacity-bar .label {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
    display: block;
}

.capacity-bar-bg {
    height: 12px;
    background: var(--lighter-gray);
    border-radius: 50px;
    overflow: hidden;
}

.capacity-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, var(--accent-turquoise));
    border-radius: 50px;
    transition: width 0.5s ease;
}

.offer-actions {
    display: flex;
    gap: 1rem;
}

.btn-details {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.btn-book {
    padding: 0.75rem 1.5rem;
    background: var(--accent-turquoise);
    border: none;
    color: var(--dark);
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-book:hover {
    background: #3dd9c9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(68, 240, 224, 0.4);
}

/* ============================================
   PUBLISH FORM
   ============================================ */
.publish-form-card {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: var(--shadow-md);
}

.publish-form .form-section {
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 2px solid var(--lighter-gray);
}

.publish-form .form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 2rem;
    padding-bottom: 0;
}

.publish-form .form-section h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.publish-form .form-section h3 i {
    color: var(--primary);
}

.publish-form .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.publish-form .form-row:last-child {
    margin-bottom: 0;
}

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

.form-group label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.875rem 1rem;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-turquoise);
    box-shadow: 0 0 0 3px rgba(68, 240, 224, 0.1);
}

.form-group input[readonly] {
    background: var(--lightest-gray);
    cursor: not-allowed;
}

.form-group small {
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 0.5rem;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--lightest-gray);
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.checkbox-item:has(input:checked) {
    background: rgba(68, 240, 224, 0.1);
    border-color: var(--accent-turquoise);
}

.checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checkbox-item label {
    margin: 0;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.checkbox-item i {
    color: var(--primary);
}

.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid var(--light-gray);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    display: none;
}

.autocomplete-results.active {
    display: block;
}

.autocomplete-item {
    padding: 0.875rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.autocomplete-item:hover {
    background: var(--lightest-gray);
}

/* ============================================
   STATUS FILTERS
   ============================================ */
.status-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.875rem 1.5rem;
    background: white;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--medium-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--lightest-gray);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.filter-btn span {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.85rem;
}

.filter-btn.active span {
    background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   MODAL
   ============================================ */
.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;
    padding: 2rem;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

.modal-content.modal-lg {
    max-width: 900px;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 2px solid var(--lighter-gray);
}

.modal-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--lighter-gray);
    color: var(--dark);
}

.modal-body {
    padding: 2rem;
}

/* ============================================
   BOOKING SUMMARY
   ============================================ */
.booking-summary {
    background: var(--lightest-gray);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
}

.booking-summary h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1.5rem;
}

.summary-grid {
    display: grid;
    gap: 1rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
}

.summary-item .label {
    font-weight: 600;
    color: var(--medium-dark);
}

.summary-item .value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

/* ============================================
   NO RESULTS
   ============================================ */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray);
}

.no-results i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.3;
}

.no-results p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

/* ============================================
   LOADING OVERLAY
   ============================================ */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(68, 240, 224, 0.2);
    border-top-color: var(--accent-turquoise);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay p {
    color: white;
    font-size: 1.2rem;
    margin-top: 1.5rem;
    font-weight: 600;
}

/* ============================================
   FORM ACTIONS
   ============================================ */
.form-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: flex-end;
    padding-top: 2rem;
    border-top: 2px solid var(--lighter-gray);
}

.btn-block {
    width: 100%;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .hero-trucks {
        min-height: 500px;
        padding: 100px 0 60px;
    }

    .hero-trucks h1 {
        font-size: 2.5rem;
    }

    .hero-trucks .hero-subtitle {
        font-size: 1.1rem;
    }

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

    .stat-card-turquoise {
        min-width: 140px;
        padding: 1.5rem;
    }

    .tabs-nav {
        flex-wrap: nowrap;
        overflow-x: scroll;
    }

    .tab-btn {
        min-width: 150px;
        padding: 1rem 1.5rem;
        font-size: 0.9rem;
    }

    .search-form-card,
    .publish-form-card {
        padding: 2rem 1.5rem;
    }

    .search-form .form-row,
    .publish-form .form-row {
        grid-template-columns: 1fr;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .sort-controls {
        width: 100%;
    }

    .sort-controls select {
        flex: 1;
    }

    .offer-header {
        flex-direction: column;
    }

    .offer-price-badge {
        width: 100%;
    }

    .offer-route {
        flex-direction: column;
    }

    .offer-arrow {
        transform: rotate(90deg);
    }

    .offer-details {
        grid-template-columns: 1fr;
    }

    .offer-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .capacity-bar {
        max-width: 100%;
        width: 100%;
    }

    .offer-actions {
        width: 100%;
        flex-direction: column;
    }

    .offer-actions button {
        width: 100%;
    }

    .status-filters {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }

    .modal {
        padding: 1rem;
    }

    .modal-content {
        max-height: 95vh;
    }

    .modal-header,
    .modal-body {
        padding: 1.5rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions button {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .hero-trucks h1 {
        font-size: 2rem;
    }

    .hero-trucks .hero-stats {
        grid-template-columns: 1fr;
    }

    .hero-cta {
        flex-direction: column;
    }

    .hero-cta .btn {
        width: 100%;
    }

    .tab-btn {
        min-width: 120px;
        padding: 1rem;
        font-size: 0.85rem;
    }

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