/* BaseOstéo - Styles CSS */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.nav-menu a:hover {
    opacity: 0.8;
}

.nav-user {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Alerts */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-warning {
    background-color: #f39c12;
    color: white;
}

.btn-warning:hover {
    background-color: #e67e22;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

.btn-link {
    background: none;
    color: #3498db;
    text-decoration: underline;
}

/* Forms */
.form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group select {
    background-color: white;
    cursor: pointer;
}

.form-group textarea {
    resize: vertical;
}

.form-group .error {
    display: block;
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Tables */
.table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.table thead {
    background-color: #34495e;
    color: white;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
}

.table th a {
    color: white;
    text-decoration: none;
}

.table tbody tr {
    border-bottom: 1px solid #eee;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

.table .actions {
    white-space: nowrap;
}

.table .actions .btn {
    margin-right: 0.5rem;
}

.table .actions form {
    display: inline;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-warning {
    background-color: #f39c12;
    color: white;
}

.badge-info {
    background-color: #3498db;
    color: white;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
}

.page-header > div {
    display: flex;
    gap: 1rem;
}

/* Search Form */
.search-form {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.form-control {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* Details */
.patient-details,
.visite-details {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.detail-section {
    margin-bottom: 2rem;
}

.detail-section h2 {
    margin-bottom: 1rem;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.detail-section dl {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1rem;
}

.detail-section dt {
    font-weight: 600;
    color: #555;
}

.detail-section dd {
    margin: 0;
}

/* Login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.login-box {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Home */
.home {
    text-align: center;
    padding: 2rem;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card h3 {
    margin-bottom: 1rem;
}

/* No Data */
.no-data {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 8px;
    color: #7f8c8d;
}

/* Error Page */
.error-page {
    text-align: center;
    padding: 4rem 2rem;
}

.error-page h1 {
    font-size: 6rem;
    color: #e74c3c;
    margin-bottom: 1rem;
}

/* Section Visites */
.visites-section {
    margin-top: 3rem;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #3498db;
}

.section-header h2 {
    margin: 0;
    color: #2c3e50;
}

.visite-form {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid #dee2e6;
}

.visite-form h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.visites-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.visite-item {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    transition: box-shadow 0.3s;
}

.visite-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.visite-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #dee2e6;
}

.visite-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.visite-info strong {
    font-size: 1.1rem;
    color: #2c3e50;
}

.visite-osteo {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.visite-actions {
    display: flex;
    gap: 0.5rem;
}

.visite-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

.visite-bilan,
.visite-traitement {
    background: white;
    padding: 1rem;
    border-radius: 4px;
    border-left: 3px solid #3498db;
}

.visite-bilan strong,
.visite-traitement strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.visite-bilan p,
.visite-traitement p {
    margin: 0;
    color: #555;
    line-height: 1.6;
}

.visite-edit-form {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid #dee2e6;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
}

.visite-edit-form h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #2c3e50;
}

/* Responsive pour les visites */
@media (max-width: 768px) {
    .visite-content {
        grid-template-columns: 1fr;
    }
    
    .visite-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Footer */
.footer {
    margin-top: 4rem;
    padding: 2rem 0;
    background-color: #2c3e50;
    color: white;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 1rem;
    }
    
    .detail-section dl {
        grid-template-columns: 1fr;
    }
}

