/* Espace patient — Vroom Vroom Santé */

.patient-section {
    padding: 3rem 0 5rem;
    min-height: 60vh;
}

.patient-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    max-width: 560px;
    margin: 0 auto;
}

.patient-card-wide {
    max-width: 760px;
}

.patient-card h1 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.patient-card .subtitle {
    color: #666;
    margin-bottom: 1.5rem;
}

.patient-form .form-group {
    margin-bottom: 1.25rem;
}

.patient-form .form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.patient-form .form-input,
.patient-form .form-select,
.patient-form .form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
}

.patient-form .form-input:focus,
.patient-form .form-select:focus {
    outline: none;
    border-color: #008000;
}

.patient-form .btn-block {
    width: 100%;
    justify-content: center;
    display: inline-flex;
}

.patient-form-footer {
    text-align: center;
    margin-top: 1.25rem;
    color: #666;
}

.patient-form-footer a {
    color: #008000;
    font-weight: 600;
    text-decoration: none;
}

/* Autocomplete adresses */
.address-field {
    position: relative;
}

.address-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    z-index: 50;
    max-height: 220px;
    overflow-y: auto;
    display: none;
}

.address-suggestions.open {
    display: block;
}

.address-suggestion {
    padding: 0.65rem 1rem;
    cursor: pointer;
    font-size: 0.95rem;
}

.address-suggestion:hover {
    background: #f0f7f0;
}

.address-locked {
    border-color: #008000 !important;
    background: #f0f7f0;
}

/* Choix immédiat / programmé */
.timing-toggle {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.timing-option {
    flex: 1;
    border: 2px solid #ddd;
    border-radius: 12px;
    padding: 0.9rem;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    color: #555;
    background: #fff;
    transition: all 0.15s ease;
}

.timing-option.active {
    border-color: #008000;
    color: #008000;
    background: #f0f7f0;
}

.schedule-fields {
    display: none;
    gap: 0.75rem;
}

.schedule-fields.open {
    display: flex;
}

.schedule-fields .form-group {
    flex: 1;
}

/* Liste des courses */
.ride-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 760px;
    margin: 0 auto;
}

.ride-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    padding: 1.25rem 1.5rem;
}

.ride-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ride-date {
    font-weight: 600;
    color: #333;
}

.ride-scheduled {
    color: #008000;
    font-weight: 600;
    font-size: 0.95rem;
}

.ride-addresses {
    color: #444;
    line-height: 1.7;
    font-size: 0.98rem;
}

.ride-driver {
    margin-top: 0.5rem;
    color: #666;
    font-size: 0.92rem;
}

.ride-actions {
    margin-top: 0.9rem;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.status-pending { background: #fff4e0; color: #b26a00; }
.status-accepted { background: #e3f0ff; color: #1155aa; }
.status-in_progress { background: #e8f9ee; color: #0f7a3d; }
.status-completed { background: #eef1f4; color: #445; }
.status-cancelled { background: #fdecea; color: #b3261e; }

/* Dashboard */
.patient-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    max-width: 980px;
    margin: 2rem auto 0;
}

.patient-dashboard-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .patient-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .timing-toggle,
    .schedule-fields.open {
        flex-direction: column;
    }
}
