/**
 * Styles pour l'interface front
 */

/* Portail patient */
.gs-portail-patient {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.gs-portail-tabs {
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.gs-portail-tabs .gs-tab-button {
    background: none;
    border: none;
    padding: 12px 24px;
    margin-right: 5px;
    font-size: 16px;
    cursor: pointer;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.gs-portail-tabs .gs-tab-button:hover {
    color: #2271b1;
}

.gs-portail-tabs .gs-tab-button.active {
    color: #2271b1;
    border-bottom-color: #2271b1;
    font-weight: 500;
}

.gs-portail-tabs .gs-tab-content {
    display: none;
    padding: 20px 0;
}

.gs-portail-tabs .gs-tab-content.active {
    display: block;
}

/* Tables */
.gs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.gs-table th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

.gs-table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
}

.gs-table tr:hover {
    background: #f8f9fa;
}

/* Informations patient */
.gs-info-table {
    width: 100%;
    max-width: 600px;
    margin: 20px 0;
}

.gs-info-table th {
    width: 200px;
    padding: 10px;
    text-align: left;
    color: #666;
    font-weight: normal;
}

.gs-info-table td {
    padding: 10px;
}

/* Badges */
.gs-badge-tele, .gs-badge-presentiel {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.gs-badge-tele {
    background: #e3f2fd;
    color: #0d47a1;
}

.gs-badge-presentiel {
    background: #e8f5e8;
    color: #1e4620;
}

/* Statuts */
.gs-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.gs-status.gs-info {
    background: #e3f2fd;
    color: #0d47a1;
}

.gs-status.gs-success {
    background: #e8f5e9;
    color: #1e4620;
}

.gs-status.gs-warning {
    background: #fff3e0;
    color: #b85c00;
}

.gs-status.gs-danger {
    background: #ffebee;
    color: #b71c1c;
}

/* Documents grid */
.gs-documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.gs-document-card {
    display: flex;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.gs-document-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.gs-document-icon {
    font-size: 40px;
    margin-right: 15px;
}

.gs-document-info {
    flex: 1;
}

.gs-document-info h4 {
    margin: 0 0 5px 0;
    color: #333;
}

.gs-document-date {
    margin: 0 0 10px 0;
    font-size: 12px;
    color: #666;
}

.gs-document-desc {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #555;
}

/* Formulaire de rendez-vous */
.gs-prise-rendezvous {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.gs-form {
    margin-top: 20px;
}

.gs-form-row {
    margin-bottom: 20px;
}

.gs-form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.gs-form-row input[type="text"],
.gs-form-row input[type="email"],
.gs-form-row input[type="tel"],
.gs-form-row input[type="date"],
.gs-form-row select,
.gs-form-row textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.gs-form-row input:focus,
.gs-form-row select:focus,
.gs-form-row textarea:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34,113,177,0.2);
}

.gs-form-row textarea {
    resize: vertical;
    min-height: 100px;
}

/* Boutons */
.gs-button {
    display: inline-block;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.gs-button-primary {
    background: #2271b1;
    color: white;
}

.gs-button-primary:hover {
    background: #135e96;
    color: white;
}

.gs-button-secondary {
    background: #f0f0f1;
    color: #333;
}

.gs-button-secondary:hover {
    background: #e0e0e0;
}

.gs-button-danger {
    background: #dc3232;
    color: white;
}

.gs-button-danger:hover {
    background: #b71c1c;
}

.gs-button-small {
    padding: 5px 10px;
    font-size: 14px;
}

/* Téléconsultation */
.gs-teleconsultation-room {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.gs-teleconsultation-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.gs-teleconsultation-container {
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.gs-weview-container iframe {
    display: block;
}

.gs-teleconsultation-controls {
    display: flex;
    gap: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.gs-teleconsultation-notes {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.gs-teleconsultation-notes textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 10px 0;
    font-family: inherit;
}

.gs-teleconsultation-footer {
    margin-top: 20px;
    text-align: right;
}

.gs-teleconsultation-waiting {
    text-align: center;
    padding: 50px;
}

/* Loading spinner */
.gs-loading-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2271b1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Messages */
.gs-success {
    padding: 15px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    color: #155724;
    margin: 20px 0;
}

.gs-error {
    padding: 15px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
    margin: 20px 0;
}

.gs-info {
    padding: 15px;
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 4px;
    color: #0c5460;
    margin: 20px 0;
}

/* Login form */
.gs-login-required {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.gs-login-required form {
    margin: 20px 0;
}

.gs-login-required p {
    margin: 10px 0;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .gs-portail-tabs .gs-tab-button {
        display: block;
        width: 100%;
        text-align: left;
        margin-bottom: 5px;
    }
    
    .gs-documents-grid {
        grid-template-columns: 1fr;
    }
    
    .gs-teleconsultation-controls {
        flex-direction: column;
    }
    
    .gs-button {
        width: 100%;
        text-align: center;
    }
}