/* ============================================
   MES RESERVATIONS - FICHES DE SUIVI
   ============================================ */

/* ===== PAGE LAYOUT ===== */
.mes-reservations-page {
    padding: 40px 20px;
    min-height: calc(100vh - 180px);
    background: #f0f2f5;
}

.mes-reservations-page .container {
    max-width: 1100px;
    margin: 0 auto;
}

/* ===== SECTION TITLE ===== */
.mes-reservations-page .section-title {
    font-size: 2rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 8px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.mes-reservations-page .section-title i {
    color: #e74c3c;
    font-size: 1.4rem;
}

.mes-reservations-page .section-subtitle {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 35px;
    font-size: 1.05rem;
}

/* ============================================
   RESERVATION CHECK FORM
   ============================================ */
.reservation-check-form {
    background: white;
    padding: 35px;
    border-radius: 16px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
    max-width: 520px;
    margin: 0 auto 35px;
    border: 1px solid #e8e8e8;
}

.reservation-check-form form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.check-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.check-form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.check-form-group label i {
    color: #e74c3c;
    font-size: 1rem;
}

.check-form-group input {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #333;
    background: #fafafa;
    outline: none;
    transition: all 0.3s ease;
}

.check-form-group input:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
    background: #fff;
}

.btn-check {
    padding: 12px 24px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 5px;
}

.btn-check:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.35);
}

.error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    animation: shake 0.4s ease;
}

.error-message i { color: #c62828; font-size: 1.1rem; }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.check-form-note {
    color: #95a5a6;
    font-size: 0.85rem;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 8px;
}

.check-form-note i { color: #e74c3c; font-size: 1rem; }

/* ============================================
   NO RESERVATIONS
   ============================================ */
.no-reservations {
    text-align: center;
    padding: 50px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
    max-width: 500px;
    margin: 0 auto;
}

.no-reservations i {
    font-size: 3.5rem;
    color: #e74c3c;
    margin-bottom: 18px;
    opacity: 0.6;
}

.no-reservations h3 { font-size: 1.3rem; color: #1a1a1a; margin-bottom: 12px; }
.no-reservations p { color: #7f8c8d; font-size: 0.95rem; line-height: 1.5; }
.no-reservations a { color: #e74c3c; font-weight: 600; text-decoration: underline; }

/* ============================================
   RESERVATIONS LIST
   ============================================ */
.reservations-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ============================================
   FICHE DE SUIVI - RESERVATION CARD
   ============================================ */
.reservation-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #e8e8e8;
    overflow: hidden;
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease forwards;
}

.reservation-card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

.reservation-card:nth-child(1) { animation-delay: 0.05s; }
.reservation-card:nth-child(2) { animation-delay: 0.1s; }
.reservation-card:nth-child(3) { animation-delay: 0.15s; }
.reservation-card:nth-child(4) { animation-delay: 0.2s; }
.reservation-card:nth-child(5) { animation-delay: 0.25s; }

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

/* ===== EN-TETE DE LA FICHE ===== */
.reservation-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
    gap: 12px;
}

/* Status-based header accent */
.reservation-card[data-status="pending"] .reservation-card-header {
    border-left: 5px solid #ffc107;
    background: #fffef5;
}
.reservation-card[data-status="confirmed"] .reservation-card-header {
    border-left: 5px solid #28a745;
    background: #f6fef9;
}
.reservation-card[data-status="cancelled"] .reservation-card-header {
    border-left: 5px solid #dc3545;
    background: #fff8f8;
}
.reservation-card[data-status="completed"] .reservation-card-header,
.reservation-card[data-status="checkout"] .reservation-card-header {
    border-left: 5px solid #6c757d;
    background: #f8f9fa;
}

/* Tracking number */
.reservation-tracking {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reservation-tracking .tracking-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #95a5a6;
    font-weight: 600;
}

.reservation-tracking .tracking-number {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1a1a1a;
    font-family: 'Courier New', monospace;
    background: #f0f0f0;
    padding: 4px 12px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

/* Status badge */
.reservation-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
}

.reservation-status-badge i { font-size: 0.85rem; }

/* ===== CORPS : Photo gauche + Infos droite ===== */
.reservation-card-body {
    display: flex;
    gap: 0;
    min-height: 0;
}

/* Photo à gauche */
.reservation-photo {
    width: 280px;
    min-width: 280px;
    flex-shrink: 0;
}

.reservation-photo img {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    display: block;
}

/* Panneau d'infos à droite */
.reservation-info-panel {
    flex: 1;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* En-tête propriété */
.reservation-property-header h3 {
    font-size: 1.3rem;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 4px;
}

.reservation-location {
    font-size: 0.95rem;
    color: #7f8c8d;
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.reservation-location i {
    color: #e74c3c;
    font-size: 0.9rem;
}

.reservation-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #e74c3c;
    margin: 0;
}

.reservation-price .price-unit {
    font-size: 0.85rem;
    font-weight: 400;
    color: #95a5a6;
}

/* Ligne des dates (4 blocs en ligne) */
.reservation-dates-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.reservation-date-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #eee;
}

.reservation-date-block .date-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #95a5a6;
    font-weight: 600;
}

.reservation-date-block .date-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1a1a;
}

.reservation-date-block .date-created {
    font-size: 0.82rem;
    font-weight: 500;
    color: #7f8c8d;
}

/* Ligne total */
.reservation-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 2px solid #f0f0f0;
    margin-top: auto;
}

.reservation-total-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.reservation-total-block .total-label {
    font-size: 0.8rem;
    color: #7f8c8d;
    font-weight: 500;
}

.reservation-total-block .total-amount {
    font-size: 1.4rem;
    font-weight: 800;
    color: #e74c3c;
}

/* ===== SECTION SUIVI - CHECKLIST ===== */
.reservation-tracking-section {
    padding: 0 24px 20px;
}

.tracking-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #e8eaf6 0%, #f3e5f5 100%);
    border-radius: 10px;
    border: 1px solid #d1c4e9;
}

.tracking-section-header i {
    color: #5c6bc0;
    font-size: 1.1rem;
}

.tracking-section-header span {
    font-size: 0.85rem;
    font-weight: 700;
    color: #283593;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tracking-progress {
    display: flex;
    align-items: center;
    gap: 0;
    background: #f5f5f5;
    border-radius: 10px;
    padding: 4px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.tracking-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 6px;
    position: relative;
    transition: all 0.3s ease;
    min-width: 0;
}

.tracking-step:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -1px;
    top: 25%;
    height: 50%;
    width: 2px;
    background: #e0e0e0;
}

.tracking-step .step-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.tracking-step.completed .step-icon {
    background: #4caf50;
    color: white;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.tracking-step.pending .step-icon {
    background: #e0e0e0;
    color: #999;
}

.tracking-step .step-label {
    font-size: 0.65rem;
    color: #999;
    text-align: center;
    line-height: 1.2;
    font-weight: 500;
    white-space: nowrap;
}

.tracking-step.completed .step-label {
    color: #2e7d32;
    font-weight: 600;
}

/* ===== STATUT DETAILS ===== */
.reservation-status-section {
    padding: 0 24px 20px;
}

.status-detail-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid;
    transition: all 0.3s ease;
}

.reservation-card[data-status="pending"] .status-detail-card {
    background: #fffef5;
    border-color: #ffe08a;
}
.reservation-card[data-status="confirmed"] .status-detail-card {
    background: #f6fef9;
    border-color: #a5d6a7;
}
.reservation-card[data-status="cancelled"] .status-detail-card {
    background: #fff8f8;
    border-color: #ef9a9a;
}
.reservation-card[data-status="completed"] .status-detail-card,
.reservation-card[data-status="checkout"] .status-detail-card {
    background: #f8f9fa;
    border-color: #bdbdbd;
}

.status-detail-card i {
    font-size: 1.3rem;
    margin-top: 1px;
    flex-shrink: 0;
}

.reservation-card[data-status="pending"] .status-detail-card i { color: #f57f17; }
.reservation-card[data-status="confirmed"] .status-detail-card i { color: #2e7d32; }
.reservation-card[data-status="cancelled"] .status-detail-card i { color: #c62828; }
.reservation-card[data-status="completed"] .status-detail-card i,
.reservation-card[data-status="checkout"] .status-detail-card i { color: #616161; }

.status-detail-card .status-text {
    flex: 1;
    min-width: 0;
}

.status-detail-card .status-text strong {
    display: block;
    font-size: 0.9rem;
    color: #1a1a1a;
    margin-bottom: 4px;
    font-weight: 700;
}

.status-detail-card .status-text p {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

/* ===== REMARQUES ===== */
.reservation-notes-section {
    padding: 0 24px 20px;
}

.notes-card {
    display: flex;
    gap: 12px;
    padding: 14px 18px;
    background: #fff8e1;
    border-radius: 12px;
    border: 1px solid #ffe0b2;
}

.notes-card i {
    color: #f57c00;
    font-size: 1.2rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.notes-card .notes-text {
    flex: 1;
    min-width: 0;
}

.notes-card .notes-text strong {
    display: block;
    font-size: 0.85rem;
    color: #2c3e50;
    margin-bottom: 6px;
    font-weight: 700;
}

.notes-card .notes-text p {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.5;
    margin: 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .mes-reservations-page { padding: 30px 15px; }
    .mes-reservations-page .section-title { font-size: 1.7rem; }
    
    .reservation-photo {
        width: 220px;
        min-width: 220px;
    }
    
    .reservation-dates-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mes-reservations-page { padding: 20px 10px; }
    .mes-reservations-page .section-title { font-size: 1.4rem; }
    .mes-reservations-page .section-subtitle { font-size: 0.95rem; margin-bottom: 25px; }
    
    .reservation-check-form { padding: 24px; }
    .reservation-card-header { padding: 14px 18px; flex-direction: column; align-items: flex-start; }
    
    .reservation-card-body {
        flex-direction: column;
    }
    
    .reservation-photo {
        width: 100%;
        min-width: 100%;
    }
    
    .reservation-photo img {
        height: 200px;
        min-height: auto;
    }
    
    .reservation-info-panel {
        padding: 16px 18px;
    }
    
    .reservation-dates-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .reservation-total-row {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .reservation-tracking-section { padding: 0 18px 16px; }
    .reservation-status-section { padding: 0 18px 16px; }
    .reservation-notes-section { padding: 0 18px 16px; }
    
    .tracking-progress { flex-wrap: wrap; justify-content: center; }
    .tracking-step { flex: 0 0 auto; padding: 8px 10px; }
    .tracking-step:not(:last-child)::after { display: none; }
    .tracking-step .step-label { white-space: normal; font-size: 0.6rem; }
}

@media (max-width: 480px) {
    .mes-reservations-page .section-title { font-size: 1.2rem; }
    .reservation-check-form { padding: 18px; }
    .reservation-tracking .tracking-number { font-size: 0.95rem; }
    .reservation-total-block .total-amount { font-size: 1.15rem; }
    .reservation-dates-row { grid-template-columns: 1fr 1fr; }
    .reservation-price { font-size: 1.05rem; }
}

/* ============================================
   PRINT
   ============================================ */
@media print {
    .mes-reservations-page { padding: 0; background: white; }
    .reservation-card { box-shadow: none; border: 1px solid #ccc; page-break-inside: avoid; margin-bottom: 16px; }
    .reservation-check-form, .btn-check, .error-message, .check-form-note { display: none; }
    .reservation-card-header { border-bottom: 1px solid #ccc; }
}