* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.3);
}

header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 2rem;
    text-align: center;
    position: relative;
}

.logo {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1rem;
    font-style: italic;
    opacity: 0.9;
}

.session-info {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
}

main {
    padding: 2rem;
}

.home-content {
    text-align: center;
}

.intro-box {
    background: #f8f9fa;
    border-left: 4px solid #2a5298;
    padding: 2rem;
    margin: 2rem 0;
    text-align: left;
}

.intro-box h2 {
    color: #2a5298;
    margin-bottom: 1rem;
}

.intro-box ul {
    margin-left: 2rem;
    margin-top: 1rem;
}

.intro-box li {
    margin: 0.5rem 0;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 3rem 0;
}

.btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-primary {
    background: #2a5298;
    color: white;
}

.btn-primary:hover {
    background: #1e3c72;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.hidden {
    display: none !important;
}

.continue-form,
.patient-form {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    max-width: 500px;
    margin: 2rem auto;
    text-align: left;
}

.continue-form h3,
.patient-form h3 {
    color: #2a5298;
    margin-bottom: 1.5rem;
    text-align: center;
}

.continue-form label,
.patient-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.continue-form input[type="text"],
.patient-form input[type="text"],
.patient-form input[type="date"],
.patient-form input[type="email"] {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.email-option {
    margin: 1.5rem 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.help-text {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 0.5rem;
}

.warning-box {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
}

.warning-box p {
    margin: 0;
    color: #856404;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.radio-group {
    display: flex;
    gap: 2rem;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 0.75rem;
    border-radius: 4px;
    margin-top: 1rem;
    border: 1px solid #f5c6cb;
}

.session-created,
.email-sent {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
}

.session-info-box,
.email-info-box {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.session-id-label {
    font-size: 1rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.session-id-display {
    font-size: 2rem;
    font-weight: bold;
    color: #2a5298;
    padding: 1rem;
    background: #e3f2fd;
    border-radius: 5px;
    margin: 1rem 0;
    letter-spacing: 2px;
    word-break: break-all;
}

.important-note {
    background: #fff3cd;
    padding: 1rem;
    border-radius: 5px;
    margin-top: 1rem;
    color: #856404;
}

.session-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.patient-info {
    background: #e3f2fd;
    padding: 1rem;
    margin-bottom: 2rem;
    border-radius: 5px;
    border-left: 4px solid #2a5298;
}

.instructions {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.instructions h3 {
    color: #856404;
    margin-bottom: 0.5rem;
}

.criterion-block {
    background: #fff;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.criterion-header {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.criterion-number {
    background: #2a5298;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.criterion-header h3 {
    color: #2a5298;
    font-size: 1.1rem;
    margin: 0;
}

.age-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 900px) {
    .age-sections {
        grid-template-columns: 1fr;
    }
}

.age-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 5px;
}

.age-section h4 {
    color: #495057;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkbox-list label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.checkbox-list label:hover {
    background: #e9ecef;
}

.checkbox-list input[type="checkbox"] {
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.other-input {
    flex-grow: 1;
    padding: 0.25rem 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 3px;
    margin-left: 0.5rem;
}

.note {
    font-size: 0.9rem;
    color: #6c757d;
    font-style: italic;
    margin-top: 1rem;
}

.symptom-present {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 2px solid #dee2e6;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.symptom-present label:first-child {
    font-weight: 600;
    margin-right: 0.5rem;
}

.symptom-present label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.impairment-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

@media (max-width: 900px) {
    .impairment-sections {
        grid-template-columns: 1fr;
    }
}

.impairment-age-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 5px;
}

.impairment-domain {
    margin-bottom: 2rem;
}

.impairment-domain h4 {
    color: #495057;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #dee2e6;
}

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #dee2e6;
}

footer {
    background: #343a40;
    color: white;
    text-align: center;
    padding: 1.5rem;
    margin-top: 2rem;
}

footer p {
    margin: 0.25rem 0;
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

.summary-table th,
.summary-table td {
    border: 1px solid #dee2e6;
    padding: 0.75rem;
    text-align: left;
}

.summary-table th {
    background: #2a5298;
    color: white;
    font-weight: 600;
}

.summary-table tr:nth-child(even) {
    background: #f8f9fa;
}

.result-box {
    background: #d1ecf1;
    border: 2px solid #17a2b8;
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
}

.result-box h3 {
    color: #0c5460;
    margin-bottom: 1rem;
}

.result-positive {
    background: #d4edda;
    border: 2px solid #28a745;
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
}

.result-positive h3 {
    color: #155724;
}

.diagnostic-code {
    font-size: 1.1rem;
    margin: 1rem 0;
}

.criteria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.criteria-item {
    background: white;
    padding: 1rem;
    border-radius: 5px;
    border-left: 4px solid #6c757d;
}

.criteria-item.met {
    border-left-color: #28a745;
}

.criteria-item.not-met {
    border-left-color: #dc3545;
}

.diagnostic-grid-spacing {
    margin-top: 1.5rem;
}

.diagnostic-reasons {
    margin-top: 1.5rem;
    font-weight: 600;
}

.diagnostic-reasons-list {
    margin-left: 2rem;
    margin-top: 0.5rem;
}

.diagnostic-conclusion {
    margin-top: 1.5rem;
    font-weight: 600;
}

.diagnostic-note {
    margin-top: 1rem;
    font-style: italic;
    color: #6c757d;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease-in-out;
    z-index: 1000;
    max-width: 400px;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification.hide {
    opacity: 0;
    transform: translateX(100%);
}

.notification-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.notification-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

@media print {
    .navigation-buttons,
    .session-info,
    .btn {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .container {
        box-shadow: none;
    }

    .session-actions {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .btn {
        width: 100%;
    }

    .session-info {
        position: static;
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 1rem;
    }

    .navigation-buttons {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Styles pour la mise en page horizontale de la Partie 3 */

.impairment-domain {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    background-color: #f9f9f9;
}

.domain-title {
    color: #333;
    margin-top: 0;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #2a5298;
    padding-bottom: 0.5rem;
}

.domain-columns {
    display: flex;
    flex-wrap: wrap; /* Permet aux colonnes de passer à la ligne sur petits écrans */
    gap: 2rem; /* Espace entre les colonnes */
}

.domain-column {
    flex: 1; /* Chaque colonne prend une part égale de l'espace */
    min-width: 300px; /* Largeur minimale avant de passer à la ligne */
}

.domain-column h4 {
    color: #2a5298;
    margin-top: 0;
}