/* ==========================================================================
 * OSM-CSS — feuille de style web unique de l'application (statique, sans build).
 * Servie par nginx depuis /public/css/osm-css.css, chargee via
 *   <link rel="stylesheet" href="{{ asset('css/osm-css.css') }}">
 * dans templates/base.html.twig et les gabarits autonomes (login / reset-password).
 *
 * Contenu repris A L'IDENTIQUE des blocs <style> d'origine (aucun restyle,
 * aucune valeur changee). Seuls ajouts : ces bandeaux de section et, dans la
 * section 12 (pages autonomes), 3 scopings minimaux de SELECTEURS SANS toucher
 * aux valeurs, pour ne pas casser le rendu une fois fusionne :
 *   (1) ":root" -> ".os-login" : les pages auth redefinissent --os-border-color,
 *       --os-shadow-md/lg avec d'autres valeurs que le shell ; portees par
 *       .os-login, elles s'appliquent par heritage aux seuls gabarits auth.
 *       Le "body" auth consomme --os-main-bg/--os-font, identiques dans base.
 *   (2) ".os-eyebrow" -> ".os-login .os-eyebrow" : le shell (WAVE B) et les
 *       pages auth definissent .os-eyebrow differemment ; sans scoping, l'un
 *       ecraserait l'autre sur 15+ pages ou 4 pages.
 *   (3) "body" (bloc police/fond auth) -> ".os-login" : sans cela, le fond
 *       "background: var(--os-main-bg)" (uni) des pages auth, place en dernier,
 *       ecraserait le fond en degrade du "body" du shell sur toutes les pages
 *       soclees. .os-login couvre toute la hauteur (min-height:100vh) : rendu
 *       auth inchange. La regle "html, body{height:100%;margin:0}" est gardee
 *       telle quelle (margin:0 = deja Bootstrap ; height:100% sans effet
 *       visible sur le layout sidebar fixe / topbar sticky).
 * DEDUP : request.html.twig et reset.html.twig ont un <style> STRICTEMENT
 * identique -> une seule copie (§12b, mention "request + reset").
 * EXCLUS (restent inline, hors de ce fichier) : templates/patient/pdf/*,
 * templates/patient/profile_pdf.html.twig, templates/emails/* (Dompdf : pas de
 * <link> externe fiable), templates/dashboard/mada.html.twig (SVG inline dont
 * le <style> interne .st0..st4 est relu par DashboardController pour l'export
 * PDF ; un <link> externe ne suivrait pas).
 * ========================================================================== */


/* ====================================================================
 * §1 — Shell : widget telephone intl-tel-input
 * Origine : templates/base.html.twig (bloc <style> n°1)
 * ==================================================================== */

                /* intl-tel-input: full-width widget, modal-safe dropdown, inline error */
                .iti { width: 100%; }
                .iti__dropdown-content { z-index: 3000; }
                .os-tel-error { font-size: 0.875em; }
            
/* ====================================================================
 * §2 — Shell : variables --os-*, Select2, sidebar/topbar, boutons, formulaires, tableaux, dashboard, vagues A/B/R, responsive
 * Origine : templates/base.html.twig (bloc <style> n°2)
 * ==================================================================== */

                /* Select2 Bootstrap-friendly look */
                .select2-container--default .select2-selection--single,
                .select2-container--default .select2-selection--multiple {
                    border: 1px solid #E0E0E0;
                    border-radius: 12px;
                    min-height: 44px;
                }
                .select2-container--default .select2-selection--single .select2-selection__rendered {
                    line-height: 42px;
                    padding-left: 15px;
                }
                .select2-container--default .select2-selection--single .select2-selection__arrow {
                    height: 42px;
                }
                .select2-container--default .select2-selection--multiple .select2-selection__choice {
                    background: var(--os-primary);
                    border: none;
                    color: #fff;
                    border-radius: 8px;
                }
                .select2-container { width: 100% !important; }
                :root {
                    --os-primary: #0077B6;
                    --os-primary-light: #00B4D8;
                    --os-primary-dark: #023E8A;
                    --os-secondary: #90E0EF;
                    --os-accent: #CAF0F8;
                    --os-danger: #E63946;
                    --os-warning: #F4A261;
                    --os-success: #2A9D8F;
                    --os-sidebar-bg: #FFFFFF;
                    --os-sidebar-text: #495057;
                    --os-sidebar-active-bg: linear-gradient(135deg, var(--os-primary) 0%, var(--os-primary-dark) 100%);
                    --os-sidebar-active-text: #FFFFFF;
                    --os-sidebar-hover-bg: var(--os-accent);
                    --os-topbar-bg: #FFFFFF;
                    --os-main-bg: #F0F4F8;
                    --os-card-bg: #FFFFFF;
                    --os-text-primary: #212529;
                    --os-text-secondary: #6C757D;
                    --os-border-color: #E9ECEF;
                    --os-shadow-sm: 0 2px 8px rgba(0, 119, 182, 0.08);
                    --os-shadow-md: 0 4px 16px rgba(0, 119, 182, 0.12);
                    --os-shadow-lg: 0 8px 32px rgba(0, 119, 182, 0.16);
                }

                * {
                    box-sizing: border-box;
                }

                body {
                    background-color: var(--os-main-bg);
                    font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
                    color: var(--os-text-primary);
                    line-height: 1.6;
                }

                #wrapper {
                    display: flex;
                    width: 100%;
                    align-items: stretch;
                    min-height: 100vh;
                }

                #sidebar {
                    min-width: 280px;
                    max-width: 280px;
                    background: var(--os-sidebar-bg);
                    color: var(--os-sidebar-text);
                    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
                    min-height: 100vh;
                    box-shadow: var(--os-shadow-md);
                    z-index: 1000;
                    position: fixed;
                    left: 0;
                    top: 0;
                }

                #sidebar.collapsed {
                    margin-left: -280px;
                }

                #sidebar .sidebar-header {
                    padding: 30px 20px;
                    text-align: center;
                    background: linear-gradient(135deg, var(--os-accent) 0%, #FFFFFF 100%);
                    border-bottom: 1px solid var(--os-border-color);
                }

                #sidebar .sidebar-header img {
                    max-width: 180px;
                    height: auto;
                    filter: drop-shadow(0 4px 8px rgba(0, 119, 182, 0.15));
                }

                #sidebar ul.components {
                    padding: 20px 0;
                }

                #sidebar ul li {
                    margin-bottom: 4px;
                }

                #sidebar ul li a {
                    padding: 14px 28px;
                    font-size: 0.95em;
                    display: flex;
                    align-items: center;
                    color: var(--os-sidebar-text);
                    text-decoration: none;
                    transition: all 0.3s ease;
                    border-radius: 0 30px 30px 0;
                    margin-right: 12px;
                    font-weight: 500;
                }

                #sidebar ul li a:hover {
                    color: var(--os-primary);
                    background: var(--os-sidebar-hover-bg);
                    transform: translateX(5px);
                }

                #sidebar ul li.active > a {
                    background: var(--os-sidebar-active-bg);
                    color: var(--os-sidebar-active-text);
                    font-weight: 600;
                    box-shadow: var(--os-shadow-sm);
                }

                #sidebar ul li a i {
                    margin-right: 16px;
                    width: 22px;
                    text-align: center;
                    font-size: 1.2em;
                }

                #sidebar ul li .collapse a {
                    padding: 10px 28px 10px 66px;
                    font-size: 0.9em;
                }

                #sidebar ul li .collapse a:hover {
                    color: var(--os-primary-dark);
                }

                .dropdown-toggle::after {
                    float: right;
                    margin-top: 0px;
                    transition: transform 0.3s ease;
                }

                .dropdown-toggle[aria-expanded="true"]::after {
                    transform: rotate(180deg);
                }

                #content {
                    width: 100%;
                    margin-left: 280px;
                    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
                }

                #content.expanded {
                    margin-left: 0;
                }

                .topbar {
                    background: var(--os-topbar-bg);
                    height: 80px;
                    display: flex;
                    align-items: center;
                    justify-content: space-between;
                    padding: 0 40px;
                    box-shadow: var(--os-shadow-sm);
                    position: sticky;
                    top: 0;
                    z-index: 999;
                }

                .topbar .btn-prev {
                    background: linear-gradient(135deg, var(--os-primary) 0%, var(--os-primary-dark) 100%);
                    color: white;
                    border: none;
                    border-radius: 12px;
                    padding: 10px 20px;
                    font-weight: 500;
                    box-shadow: var(--os-shadow-sm);
                    transition: all 0.3s ease;
                }

                .topbar .btn-prev:hover {
                    transform: translateY(-2px);
                    box-shadow: var(--os-shadow-md);
                }

                .topbar .topbar-title {
                    font-size: 1.6em;
                    font-weight: 700;
                    margin: 0;
                    background: linear-gradient(135deg, var(--os-primary) 0%, var(--os-primary-dark) 100%);
                    -webkit-background-clip: text;
                    -webkit-text-fill-color: transparent;
                    background-clip: text;
                }

                .main-content {
                    padding: 40px;
                }

                .breadcrumb-card {
                    background: var(--os-card-bg);
                    border-radius: 16px;
                    padding: 20px 30px;
                    margin-bottom: 30px;
                    box-shadow: var(--os-shadow-sm);
                    border: 1px solid var(--os-border-color);
                }

                .breadcrumb {
                    margin-bottom: 0;
                }

                .breadcrumb-item a {
                    color: var(--os-text-secondary);
                    text-decoration: none;
                    font-weight: 500;
                    transition: color 0.3s ease;
                }

                .breadcrumb-item a:hover {
                    color: var(--os-primary);
                }

                .breadcrumb-item.active {
                    color: var(--os-primary);
                    font-weight: 600;
                }

                /* Custom rounding for form controls */
                .form-control, .form-select {
                    border-radius: 12px;
                    padding: 12px 18px;
                    border: 2px solid var(--os-border-color);
                    font-size: 0.95em;
                    transition: all 0.3s ease;
                    background-color: #FAFBFC;
                }

                .form-control:focus, .form-select:focus {
                    border-color: var(--os-primary);
                    box-shadow: 0 0 0 4px rgba(0, 119, 182, 0.1);
                    background-color: #FFFFFF;
                }

                .form-label {
                    font-weight: 600;
                    color: var(--os-text-primary);
                    margin-bottom: 8px;
                }

                .btn-validate {
                    background: linear-gradient(135deg, var(--os-primary) 0%, var(--os-primary-dark) 100%);
                    color: white;
                    border-radius: 12px;
                    padding: 12px 32px;
                    border: 1px solid transparent;
                    font-weight: 600;
                    box-shadow: var(--os-shadow-sm);
                    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
                }

                .btn-validate:hover {
                    background: white;
                    color: var(--os-primary);
                    border-color: var(--os-primary);
                    box-shadow: var(--os-shadow-md);
                }

                .btn-clear {
                    background: linear-gradient(135deg, var(--os-danger) 0%, #C1121F 100%);
                    color: white;
                    border-radius: 12px;
                    padding: 12px 32px;
                    border: 1px solid transparent;
                    font-weight: 600;
                    box-shadow: var(--os-shadow-sm);
                    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
                }

                .btn-clear:hover {
                    background: white;
                    color: var(--os-danger);
                    border-color: var(--os-danger);
                    box-shadow: var(--os-shadow-md);
                }

                .btn-os-primary {
                    background: linear-gradient(135deg, var(--os-primary) 0%, var(--os-primary-dark) 100%);
                    color: white;
                    border-radius: 12px;
                    font-weight: 600;
                    box-shadow: var(--os-shadow-sm);
                    transition: all 0.3s ease;
                }

                .btn-os-primary:hover {
                    background: white;
                    color: var(--os-primary);
                    border: 1px solid var(--os-primary);
                    transform: translateY(-2px);
                    box-shadow: var(--os-shadow-md);
                }

                .btn-primary {
                    background: linear-gradient(135deg, var(--os-primary) 0%, var(--os-primary-dark) 100%);
                    border: none;
                    font-weight: 600;
                    box-shadow: var(--os-shadow-sm);
                    transition: all 0.3s ease;
                }

                .btn-primary:hover {
                    transform: translateY(-2px);
                    box-shadow: var(--os-shadow-md);
                    background: linear-gradient(135deg, var(--os-primary-dark) 0%, var(--os-primary) 100%);
                }

                .btn-secondary {
                    background: #6C757D;
                    border: none;
                    font-weight: 600;
                    transition: all 0.3s ease;
                }

                .btn-secondary:hover {
                    background: #5a6268;
                    transform: translateY(-2px);
                    box-shadow: var(--os-shadow-sm);
                }

                .btn-outline-secondary {
                    border: 2px solid var(--os-border-color);
                    color: var(--os-text-secondary);
                    background: #FAFBFC;
                    transition: all 0.3s ease;
                }

                .btn-outline-secondary:hover {
                    border-color: var(--os-primary);
                    color: var(--os-primary);
                    background: var(--os-accent);
                    transform: translateY(-2px);
                }

                .btn-success {
                    background: linear-gradient(135deg, var(--os-success) 0%, #21867a 100%);
                    border: none;
                    font-weight: 600;
                    box-shadow: var(--os-shadow-sm);
                    transition: all 0.3s ease;
                }

                .btn-success:hover {
                    transform: translateY(-2px);
                    box-shadow: var(--os-shadow-md);
                }

                .btn-danger {
                    background: linear-gradient(135deg, var(--os-danger) 0%, #C1121F 100%);
                    border: none;
                    font-weight: 600;
                    box-shadow: var(--os-shadow-sm);
                    transition: all 0.3s ease;
                }

                .btn-danger:hover {
                    transform: translateY(-2px);
                    box-shadow: var(--os-shadow-md);
                }

                .btn-warning {
                    background: linear-gradient(135deg, var(--os-warning) 0%, #e76f51 100%);
                    border: none;
                    font-weight: 600;
                    box-shadow: var(--os-shadow-sm);
                    transition: all 0.3s ease;
                }

                .btn-warning:hover {
                    transform: translateY(-2px);
                    box-shadow: var(--os-shadow-md);
                }

                .btn-info {
                    background: linear-gradient(135deg, var(--os-primary-light) 0%, var(--os-primary) 100%);
                    border: none;
                    font-weight: 600;
                    box-shadow: var(--os-shadow-sm);
                    transition: all 0.3s ease;
                }

                .btn-info:hover {
                    transform: translateY(-2px);
                    box-shadow: var(--os-shadow-md);
                }

                .btn-light {
                    background: #F8F9FA;
                    border: 2px solid var(--os-border-color);
                    color: var(--os-text-primary);
                    font-weight: 600;
                    transition: all 0.3s ease;
                }

                .btn-light:hover {
                    background: var(--os-accent);
                    border-color: var(--os-primary);
                    transform: translateY(-2px);
                }

                .rounded-pill {
                    border-radius: 50px !important;
                }

                .card {
                    border-radius: 20px;
                    border: 1px solid var(--os-border-color);
                    box-shadow: var(--os-shadow-sm);
                    background: var(--os-card-bg);
                    transition: all 0.3s ease;
                }

                .card:hover {
                    box-shadow: var(--os-shadow-md);
                }

                .card-header {
                    background: transparent;
                    border-bottom: 1px solid var(--os-border-color);
                    font-weight: 600;
                    color: var(--os-text-primary);
                }

                /* Patient List Custom UI */
                .patient-item {
                    background: var(--os-card-bg);
                    border-radius: 20px;
                    padding: 24px;
                    margin-bottom: 20px;
                    display: flex;
                    align-items: center;
                    justify-content: space-between;
                    box-shadow: var(--os-shadow-sm);
                    border: 1px solid var(--os-border-color);
                    transition: all 0.3s ease;
                }

                .patient-item:hover {
                    box-shadow: var(--os-shadow-md);
                    transform: translateY(-2px);
                }

                .patient-info {
                    display: flex;
                    align-items: center;
                    gap: 20px;
                }

                .patient-avatar {
                    width: 56px;
                    height: 56px;
                    background: linear-gradient(135deg, var(--os-accent) 0%, var(--os-secondary) 100%);
                    border-radius: 50%;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    color: var(--os-primary);
                    font-size: 1.5em;
                    box-shadow: var(--os-shadow-sm);
                }

                .patient-name {
                    font-weight: 700;
                    margin-bottom: 4px;
                    color: var(--os-text-primary);
                    font-size: 1.1em;
                }

                .patient-meta {
                    font-size: 0.9em;
                    color: var(--os-text-secondary);
                }

                .patient-location {
                    color: var(--os-text-secondary);
                    font-weight: 500;
                }

                .patient-uid {
                    font-weight: 700;
                    color: var(--os-primary);
                    background: var(--os-accent);
                    padding: 4px 12px;
                    border-radius: 20px;
                    font-size: 0.85em;
                }

                .action-btns {
                    display: flex;
                    gap: 12px;
                }

                .btn-circle {
                    width: 44px;
                    height: 44px;
                    border-radius: 50%;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    color: white;
                    border: none;
                    transition: all 0.3s ease;
                    box-shadow: var(--os-shadow-sm);
                }

                .btn-view {
                    background: linear-gradient(135deg, var(--os-primary) 0%, var(--os-primary-dark) 100%);
                }
                .btn-edit {
                    background: linear-gradient(135deg, var(--os-primary-light) 0%, var(--os-primary) 100%);
                }
                .btn-delete {
                    background: linear-gradient(135deg, var(--os-danger) 0%, #C1121F 100%);
                }

                .btn-circle:hover {
                    transform: translateY(-3px) scale(1.05);
                    box-shadow: var(--os-shadow-md);
                    color: white;
                }

                /* Settings Tabs UI */
                .nav-tabs-custom {
                    border-bottom: 2px solid var(--os-border-color);
                    margin-bottom: 35px;
                    background: var(--os-card-bg);
                    padding: 8px 16px 0;
                    border-radius: 16px 16px 0 0;
                }
                .nav-tabs-custom .nav-item {
                    margin-right: 8px;
                }
                .nav-tabs-custom .nav-link {
                    border: none;
                    color: var(--os-text-secondary);
                    padding: 16px 28px;
                    font-weight: 600;
                    border-radius: 12px 12px 0 0;
                    transition: all 0.3s ease;
                    position: relative;
                    background: transparent;
                }
                .nav-tabs-custom .nav-link::after {
                    content: '';
                    position: absolute;
                    bottom: 0;
                    left: 50%;
                    transform: translateX(-50%);
                    width: 0;
                    height: 3px;
                    background: linear-gradient(90deg, var(--os-primary) 0%, var(--os-primary-light) 100%);
                    transition: width 0.3s ease;
                    border-radius: 3px 3px 0 0;
                }
                .nav-tabs-custom .nav-link:hover {
                    color: var(--os-primary);
                    background: var(--os-accent);
                }
                .nav-tabs-custom .nav-link:hover::after {
                    width: 60%;
                }
                .nav-tabs-custom .nav-link.active {
                    color: var(--os-primary);
                    background: linear-gradient(180deg, var(--os-accent) 0%, rgba(202, 240, 248, 0.5) 100%);
                }
                .nav-tabs-custom .nav-link.active::after {
                    width: 100%;
                }

                /* DataTable Custom Styling */
                .dataTables_wrapper .dataTables_length select {
                    border-radius: 10px;
                    padding: 6px 14px;
                    margin: 0 8px;
                    border: 2px solid var(--os-border-color);
                    background: #FAFBFC;
                    font-weight: 500;
                }
                .dataTables_wrapper .dataTables_filter input {
                    border-radius: 25px;
                    padding: 8px 20px;
                    border: 2px solid var(--os-border-color);
                    background-color: #FAFBFC;
                    transition: all 0.3s ease;
                }
                .dataTables_wrapper .dataTables_filter input:focus {
                    border-color: var(--os-primary);
                    box-shadow: 0 0 0 4px rgba(0, 119, 182, 0.1);
                    background-color: #FFFFFF;
                }
                table.dataTable thead th {
                    border-bottom: 2px solid var(--os-border-color);
                    color: var(--os-text-primary);
                    font-weight: 700;
                    text-transform: uppercase;
                    font-size: 0.85em;
                    letter-spacing: 0.5px;
                    background: #FAFBFC;
                }
                table.dataTable tbody td {
                    vertical-align: middle;
                    padding: 18px;
                    color: var(--os-text-secondary);
                    border-bottom: 1px solid var(--os-border-color);
                }
                table.dataTable tbody tr:hover {
                    background: var(--os-accent);
                }
                .table-actions {
                    display: flex;
                    gap: 16px;
                    justify-content: flex-end;
                }
                .table-actions a, .table-actions button {
                    color: var(--os-text-secondary);
                    background: none;
                    border: none;
                    padding: 0;
                    font-size: 1.3em;
                    transition: all 0.3s ease;
                }
                .table-actions a:hover {
                    color: var(--os-primary);
                    transform: scale(1.15);
                }
                .table-actions button:hover {
                    color: var(--os-danger);
                    transform: scale(1.15);
                }

                /* Shots Grid Layout */
                .shots-grid {
                    list-style: none;
                    padding: 0;
                    margin: 0;
                    display: grid;
                    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
                    gap: 24px;
                }

                .shot-thumbnail-container {
                    position: relative;
                    overflow: hidden;
                    border-radius: 20px;
                    background: var(--os-card-bg);
                    box-shadow: var(--os-shadow-sm);
                    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
                    border: 1px solid var(--os-border-color);
                }

                .shot-thumbnail-container:hover {
                    transform: translateY(-8px);
                    box-shadow: var(--os-shadow-lg);
                }

                .shot-thumbnail-base {
                    position: relative;
                    height: 220px;
                    overflow: hidden;
                }

                .shot-thumbnail-placeholder {
                    margin: 0;
                    padding: 0;
                    height: 100%;
                }

                .shot-thumbnail-link {
                    position: absolute;
                    top: 0;
                    left: 0;
                    width: 100%;
                    height: 100%;
                    z-index: 1;
                }

                .shot-thumbnail-overlay {
                    position: absolute;
                    top: 0;
                    left: 0;
                    width: 100%;
                    height: 100%;
                    background: linear-gradient(135deg, rgba(0, 119, 182, 0.85) 0%, rgba(2, 62, 138, 0.9) 100%);
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    opacity: 0;
                    transition: opacity 0.4s ease;
                    z-index: 2;
                }

                .shot-thumbnail-container:hover .shot-thumbnail-overlay {
                    opacity: 1;
                }

                .shot-actions-container {
                    list-style: none;
                    padding: 0;
                    margin: 0;
                    display: flex;
                    gap: 12px;
                }

                .shot-action {
                    margin: 0;
                }

                .btn2 {
                    display: inline-flex;
                    align-items: center;
                    justify-content: center;
                    width: 48px;
                    height: 48px;
                    border-radius: 50%;
                    background: white;
                    color: var(--os-primary);
                    border: none;
                    transition: all 0.3s ease;
                    text-decoration: none;
                    box-shadow: var(--os-shadow-sm);
                }

                .btn2:hover {
                    background: var(--os-primary);
                    color: white;
                    transform: scale(1.15) translateY(-3px);
                    box-shadow: var(--os-shadow-md);
                }

                .shot-details-container {
                    padding: 20px;
                }

                .photo-user-avatar {
                    width: 44px;
                    height: 44px;
                    border-radius: 50%;
                    object-fit: cover;
                    margin-right: 12px;
                    border: 2px solid var(--os-accent);
                }

                .name-user-text {
                    font-weight: 700;
                    color: var(--os-text-primary);
                    font-size: 15px;
                }

                .gender-patient {
                    font-size: 13px;
                    color: var(--os-text-secondary);
                    background: var(--os-accent);
                    padding: 6px 12px;
                    border-radius: 20px;
                    font-weight: 600;
                }

                .ml-2 {
                    margin-left: 10px;
                }

                .media-count-overlay {
                    position: absolute;
                    top: 12px;
                    right: 12px;
                    z-index: 3;
                }

                .media-count-overlay .badge {
                    font-size: 0.85em;
                    padding: 8px 14px;
                    border-radius: 20px;
                    background: linear-gradient(135deg, var(--os-primary) 0%, var(--os-primary-dark) 100%);
                    font-weight: 600;
                }

                /* Dashboard Styles */
                .welcome-section {
                    background: linear-gradient(135deg, var(--os-primary) 0%, var(--os-primary-dark) 100%);
                    color: white;
                    padding: 50px 40px;
                    border-radius: 24px;
                    margin-bottom: 35px;
                    box-shadow: var(--os-shadow-lg);
                    position: relative;
                    overflow: hidden;
                }

                .welcome-section::before {
                    content: '';
                    position: absolute;
                    top: -50%;
                    right: -20%;
                    width: 400px;
                    height: 400px;
                    background: rgba(255, 255, 255, 0.1);
                    border-radius: 50%;
                }

                .welcome-section::after {
                    content: '';
                    position: absolute;
                    bottom: -30%;
                    left: -10%;
                    width: 300px;
                    height: 300px;
                    background: rgba(255, 255, 255, 0.08);
                    border-radius: 50%;
                }

                .welcome-content h2 {
                    font-size: 2.8rem;
                    font-weight: 800;
                    margin-bottom: 24px;
                    position: relative;
                    z-index: 1;
                }

                .welcome-description {
                    font-size: 1.15rem;
                    line-height: 1.7;
                    margin-bottom: 10px;
                    opacity: 0.95;
                    position: relative;
                    z-index: 1;
                }

                .welcome-description .highlight {
                    background: rgba(255, 255, 255, 0.25);
                    padding: 4px 12px;
                    border-radius: 8px;
                    font-weight: 700;
                }

                .welcome-actions .btn {
                    border-radius: 30px;
                    padding: 12px 32px;
                    font-weight: 600;
                    box-shadow: var(--os-shadow-sm);
                    transition: all 0.3s ease;
                }

                .welcome-actions .btn:hover {
                    transform: translateY(-3px);
                    box-shadow: var(--os-shadow-md);
                }

                .dashboard-card {
                    background: var(--os-card-bg);
                    border-radius: 20px;
                    box-shadow: var(--os-shadow-sm);
                    border: 1px solid var(--os-border-color);
                    overflow: hidden;
                    height: 100%;
                    transition: all 0.3s ease;
                }

                .dashboard-card:hover {
                    box-shadow: var(--os-shadow-md);
                }

                .dashboard-card .card-header {
                    background: transparent;
                    border-bottom: 1px solid var(--os-border-color);
                    padding: 24px 28px;
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                }

                .dashboard-card .card-title {
                    margin: 0;
                    font-size: 1.2rem;
                    font-weight: 700;
                    color: var(--os-text-primary);
                }

                .dashboard-card .card-body {
                    padding: 28px;
                }

                .chart-container {
                    position: relative;
                    height: 100%;
                }

                .map-container {
                    position: relative;
                    height: 320px;
                }

                .map-container img {
                    width: 100%;
                    height: 100%;
                    object-fit: cover;
                    border-radius: 12px;
                }

                .map-legend {
                    position: absolute;
                    bottom: 15px;
                    left: 15px;
                    background: rgba(255, 255, 255, 0.95);
                    padding: 15px;
                    border-radius: 12px;
                    font-size: 0.85rem;
                    box-shadow: var(--os-shadow-sm);
                }

                .legend-item {
                    display: flex;
                    align-items: center;
                    margin-bottom: 8px;
                }

                .legend-item:last-child {
                    margin-bottom: 0;
                }

                .legend-color {
                    width: 14px;
                    height: 14px;
                    border-radius: 4px;
                    margin-right: 10px;
                }

                .legend-text {
                    font-size: 0.8rem;
                    color: var(--os-text-secondary);
                    font-weight: 500;
                }

                @media (max-width: 768px) {
                    .welcome-section {
                        padding: 35px 25px;
                    }

                    .welcome-content h2 {
                        font-size: 2.2rem;
                    }

                    .welcome-actions .btn {
                        margin-bottom: 12px;
                    }

                    #sidebar {
                        position: fixed;
                        margin-left: -280px;
                    }

                    #sidebar.active {
                        margin-left: 0;
                    }

                    #content {
                        margin-left: 0;
                    }

                    .topbar {
                        padding: 0 20px;
                    }

                    .main-content {
                        padding: 25px 20px;
                    }
                }

                /* =====================================================
                   WAVE A — global shell polish (CSS-only overlay layer).
                   One coherent design language inherited by every page.
                   No selectors removed above; this layer only refines.
                   ===================================================== */
                :root {
                    --os-radius-sm: 10px;
                    --os-radius-md: 14px;
                    --os-radius-lg: 20px;
                    --os-ring: 0 0 0 4px rgba(0, 119, 182, 0.12);
                    --os-topbar-h: 72px;
                    --os-sidebar-w: 280px;
                    --os-font: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
                    --os-font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
                }

                ::selection {
                    background: var(--os-primary);
                    color: #fff;
                }

                html {
                    scroll-behavior: smooth;
                }

                body {
                    font-family: var(--os-font);
                    background:
                        radial-gradient(1200px 500px at 85% -10%, rgba(0, 180, 216, 0.08), transparent 60%),
                        radial-gradient(900px 420px at -10% 0%, rgba(202, 240, 248, 0.55), transparent 55%),
                        var(--os-main-bg);
                    -webkit-font-smoothing: antialiased;
                    -moz-osx-font-smoothing: grayscale;
                    text-rendering: optimizeLegibility;
                }

                /* ---- Typographie globale : Geist (texte) + Geist Mono (UID/codes) ---- */
                h1, h2, h3, h4, h5, h6,
                .topbar .topbar-title,
                .os-page-head h1, .os-page-head h2,
                .welcome-content h2,
                .modal-header .modal-title {
                    font-family: var(--os-font);
                }

                /* Chiffres tabulaires : tableaux, KPI, compteurs (même œil, pas de saut). */
                .table, table.dataTable,
                .os-kpi .os-kpi-value,
                .os-count-pill strong {
                    font-variant-numeric: tabular-nums;
                }

                /* UID / codes : chasse fixe pour lever les ambiguïtés (O/0, I/1). */
                code, kbd, pre, samp,
                .os-uid, .patient-uid {
                    font-family: var(--os-font-mono);
                    font-variant-numeric: tabular-nums;
                    letter-spacing: 0;
                }

                /* ---- Sidebar refinement ---- */
                #sidebar {
                    width: var(--os-sidebar-w);
                    border-right: 1px solid var(--os-border-color);
                    display: flex;
                    flex-direction: column;
                    height: 100vh;
                    max-height: 100vh;
                    box-shadow: 8px 0 30px rgba(2, 62, 138, 0.06);
                }

                #sidebar .sidebar-header {
                    padding: 26px 20px 22px;
                    background:
                        radial-gradient(220px 120px at 50% 0%, rgba(0, 180, 216, 0.16), transparent 70%),
                        linear-gradient(180deg, #FFFFFF 0%, #F2FAFD 100%);
                }

                #sidebar .sidebar-header img {
                    max-width: 158px;
                }

                #sidebar ul.components {
                    padding: 14px 0 20px;
                    overflow-y: auto;
                    overscroll-behavior: contain;
                    scrollbar-width: thin;
                    flex: 1;
                    min-height: 0;
                }

                #sidebar ul.components::-webkit-scrollbar {
                    width: 8px;
                }
                #sidebar ul.components::-webkit-scrollbar-thumb {
                    background: var(--os-border-color);
                    border-radius: 8px;
                }

                #sidebar ul li a {
                    padding: 12px 22px;
                    font-size: 0.93em;
                    letter-spacing: 0.01em;
                    border-radius: 0 30px 30px 0;
                }

                #sidebar ul li a:focus-visible,
                .topbar button:focus-visible,
                .btn:focus-visible,
                a:focus-visible {
                    outline: none;
                    box-shadow: var(--os-ring);
                }

                #sidebar ul li.active > a {
                    box-shadow: 0 8px 20px rgba(0, 119, 182, 0.28);
                }

                #sidebar ul li .collapse a {
                    padding: 9px 20px 9px 64px;
                    border-radius: 0 24px 24px 0;
                }

                #sidebar ul li .collapse a.text-primary {
                    background: var(--os-accent);
                    color: var(--os-primary-dark) !important;
                    font-weight: 700;
                }

                /* ---- Topbar: calm glass bar ---- */
                .topbar {
                    height: var(--os-topbar-h);
                    padding: 0 28px;
                    background: rgba(255, 255, 255, 0.88);
                    backdrop-filter: blur(14px);
                    -webkit-backdrop-filter: blur(14px);
                    border-bottom: 1px solid var(--os-border-color);
                    box-shadow: 0 1px 0 rgba(2, 62, 138, 0.04), 0 8px 24px rgba(2, 62, 138, 0.05);
                }

                .topbar .topbar-title {
                    font-size: 1.35em;
                    font-weight: 800;
                    letter-spacing: -0.01em;
                }

                #sidebarToggle {
                    width: 42px;
                    height: 42px;
                    display: inline-flex;
                    align-items: center;
                    justify-content: center;
                    border-radius: 12px;
                    background: #F1F7FB;
                    border: 1px solid var(--os-border-color);
                    transition: all 0.25s ease;
                }

                #sidebarToggle:hover {
                    background: var(--os-accent);
                    border-color: var(--os-secondary);
                    transform: translateY(-1px);
                }

                .topbar .btn-prev {
                    border-radius: 12px;
                    padding: 9px 18px;
                    font-size: 0.9em;
                }

                /* User chip */
                #userDropdown {
                    border-radius: 999px;
                    padding: 6px 12px 6px 6px;
                    background: #F4F9FC;
                    border: 1px solid var(--os-border-color);
                    font-weight: 600;
                    font-size: 0.9em;
                    color: var(--os-text-primary);
                    transition: all 0.25s ease;
                }

                #userDropdown:hover {
                    border-color: var(--os-secondary);
                    background: #fff;
                }

                .dropdown-menu {
                    border: 1px solid var(--os-border-color);
                    border-radius: 16px;
                    box-shadow: var(--os-shadow-md);
                    padding: 8px;
                    font-size: 0.93em;
                }

                .dropdown-menu .dropdown-item {
                    border-radius: 10px;
                    padding: 10px 14px;
                    font-weight: 500;
                }

                .dropdown-menu .dropdown-item:hover {
                    background: var(--os-accent);
                    color: var(--os-primary-dark);
                }

                /* ---- Page rhythm ---- */
                .main-content {
                    padding: 32px;
                    width: 100%;
                }

                .breadcrumb-card {
                    border-radius: var(--os-radius-md);
                    padding: 14px 22px;
                    margin-bottom: 24px;
                    display: flex;
                    align-items: center;
                }

                /* ---- Cards ---- */
                .card,
                .dashboard-card {
                    border-radius: var(--os-radius-lg);
                }

                .card-header {
                    padding: 18px 24px;
                    font-size: 0.98em;
                }

                /* ---- Buttons: one language ---- */
                .btn {
                    border-radius: 12px;
                }

                .btn-lg {
                    border-radius: 14px;
                }

                .btn-os-primary,
                .btn-validate,
                .btn-clear,
                .btn-primary,
                .btn-success,
                .btn-danger,
                .btn-warning,
                .btn-info {
                    padding: 11px 24px;
                    letter-spacing: 0.01em;
                }

                .btn-os-primary:active,
                .btn-primary:active,
                .btn-validate:active {
                    transform: translateY(0);
                }

                /* ---- Forms ---- */
                .form-control, .form-select {
                    border-width: 1.5px;
                    background-color: #FFFFFF;
                }

                .form-control::placeholder {
                    color: #9AA6B2;
                }

                .form-check-input {
                    width: 1.15em;
                    height: 1.15em;
                    border: 1.5px solid #CBD5DB;
                }

                .form-check-input:checked {
                    background-color: var(--os-primary);
                    border-color: var(--os-primary);
                }

                /* ---- Flashes / alerts ---- */
                .main-content > .alert {
                    border: none;
                    border-left: 5px solid var(--os-primary);
                    border-radius: 14px;
                    padding: 14px 18px;
                    box-shadow: var(--os-shadow-sm);
                    background: #fff;
                    color: var(--os-text-primary);
                    font-weight: 500;
                    display: flex;
                    align-items: center;
                    gap: 8px;
                }

                /* Success = green, error/danger = red (tinted background + text) */
                .main-content > .alert-success {
                    border-left-color: var(--os-success);
                    background: #E9F6F4;
                    color: #1D6F65;
                }
                .main-content > .alert-danger {
                    border-left-color: var(--os-danger);
                    background: #FDECEE;
                    color: #A4161A;
                }
                .main-content > .alert-warning {
                    border-left-color: var(--os-warning);
                    background: #FEF4EA;
                    color: #8A5A2B;
                }
                .main-content > .alert-info {
                    border-left-color: var(--os-primary-light);
                    background: #EAF7FB;
                    color: #0B5E7A;
                }

                /* ---- Badges ---- */
                .badge {
                    font-weight: 700;
                    letter-spacing: 0.02em;
                    padding: 6px 12px;
                    border-radius: 999px;
                }

                .bg-primary, .badge.bg-primary { background: linear-gradient(135deg, var(--os-primary), var(--os-primary-dark)) !important; }
                .bg-info { background: linear-gradient(135deg, var(--os-primary-light), var(--os-primary)) !important; }
                .bg-success { background: linear-gradient(135deg, var(--os-success), #21867a) !important; }
                .bg-danger { background: linear-gradient(135deg, var(--os-danger), #C1121F) !important; }
                .bg-warning { background: linear-gradient(135deg, var(--os-warning), #e76f51) !important; }

                /* ---- Tables / DataTables ---- */
                .table {
                    --bs-table-bg: transparent;
                }

                .table thead th {
                    text-transform: uppercase;
                    font-size: 0.76em;
                    letter-spacing: 0.08em;
                    color: var(--os-text-secondary);
                    font-weight: 800;
                    background: #F6FAFD;
                    border-bottom: 1px solid var(--os-border-color);
                    padding: 14px 16px;
                    white-space: nowrap;
                }

                .table tbody td {
                    padding: 14px 16px;
                    vertical-align: middle;
                }

                .table tbody tr {
                    transition: background 0.2s ease;
                }

                .table tbody tr:hover {
                    background: rgba(202, 240, 248, 0.35);
                }

                table.dataTable thead th {
                    padding: 14px 16px;
                }

                table.dataTable tbody td {
                    padding: 14px 16px;
                }

                .dataTables_wrapper .dataTables_filter input {
                    min-width: 230px;
                }

                div.dataTables_wrapper div.dataTables_paginate .pagination {
                    gap: 6px;
                }

                div.dataTables_wrapper div.dataTables_paginate .page-link {
                    border: 1px solid var(--os-border-color);
                    border-radius: 10px !important;
                    color: var(--os-primary-dark);
                    font-weight: 600;
                    padding: 7px 13px;
                }

                div.dataTables_wrapper div.dataTables_paginate .page-item.active .page-link {
                    background: linear-gradient(135deg, var(--os-primary), var(--os-primary-dark));
                    border-color: transparent;
                    color: #fff;
                }

                /* ---- Modals (align with shared confirm chrome) ---- */
                .modal-content {
                    border-radius: 20px !important;
                }

                .modal-header .modal-title {
                    font-weight: 800;
                    letter-spacing: -0.01em;
                    color: var(--os-text-primary);
                }

                .modal-footer .btn {
                    border-radius: 999px;
                }

                /* ---- Pagination (non-DataTables lists) ---- */
                .pagination .page-link {
                    border-radius: 10px;
                    border: 1px solid var(--os-border-color);
                    color: var(--os-primary-dark);
                    font-weight: 600;
                    margin: 0 3px;
                }

                .pagination .page-item.active .page-link {
                    background: linear-gradient(135deg, var(--os-primary), var(--os-primary-dark));
                    border-color: transparent;
                    color: #fff;
                }

                /* ---- Patient rows: calmer ---- */
                .patient-item {
                    border-radius: var(--os-radius-lg);
                    padding: 20px 22px;
                }

                /* ---- Unified patient-list rendering (cards + tables) ----
                   Reference: patients list — spaced muted uppercase headers,
                   two-line hierarchy (bold line 1 / small muted line 2),
                   round avatar, monospace light-blue UID pill, round buttons. */
                .list-header { letter-spacing: 0.08em; }
                .os-table-card .patient-name { margin-bottom: 2px; line-height: 1.3; }
                .os-table-card .patient-meta { margin-bottom: 0; font-size: 0.82em; }
                .os-table-card .patient-uid { display: inline-block; white-space: nowrap; }
                .os-table-card .patient-avatar { flex-shrink: 0; }

                /* ---- Welcome band texture ---- */
                .welcome-section {
                    border: 1px solid rgba(255, 255, 255, 0.22);
                }

                /* ---- Quiet scrollbar for page ---- */
                ::-webkit-scrollbar { width: 10px; height: 10px; }
                ::-webkit-scrollbar-track { background: transparent; }
                ::-webkit-scrollbar-thumb {
                    background: #C3D6E2;
                    border-radius: 8px;
                    border: 2px solid var(--os-main-bg);
                }
                ::-webkit-scrollbar-thumb:hover { background: var(--os-primary); }

                @media (max-width: 992px) {
                    .main-content { padding: 24px 18px; }
                    .topbar { padding: 0 16px; }
                    .topbar .topbar-title { font-size: 1.1em; }
                    #topbarAdvancedFilterBtn { display: none; }
                }

                @media (prefers-reduced-motion: reduce) {
                    *, *::before, *::after {
                        animation-duration: 0.01ms !important;
                        transition-duration: 0.01ms !important;
                    }
                }

                /* =====================================================
                   WAVE B — business-page language (CSS-only layer).
                   Page heads, stat tiles, filter bars, table cards,
                   empty states, dossier headers. No structure changed.
                   ===================================================== */
                .os-page-head {
                    display: flex; justify-content: space-between; align-items: flex-end;
                    flex-wrap: wrap; gap: 14px; margin-bottom: 22px;
                }
                .os-eyebrow {
                    display: inline-flex; align-items: center; gap: 7px;
                    font-size: 0.74em; font-weight: 800; letter-spacing: 0.1em;
                    text-transform: uppercase; color: var(--os-primary);
                    background: rgba(0, 119, 182, 0.09);
                    border: 1px solid rgba(0, 119, 182, 0.18);
                    border-radius: 999px; padding: 5px 13px; margin-bottom: 8px;
                }
                .os-page-head h1, .os-page-head h2 {
                    font-weight: 800; letter-spacing: -0.02em; margin: 0;
                    font-size: 1.55rem; color: var(--os-text-primary);
                }
                .os-page-head .os-sub { color: var(--os-text-secondary); margin: 4px 0 0; font-size: 0.94em; }
                .os-page-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

                .os-kpi {
                    border-radius: var(--os-radius-lg); background: var(--os-card-bg);
                    border: 1px solid var(--os-border-color); box-shadow: var(--os-shadow-sm);
                    padding: 20px 22px; height: 100%; position: relative; overflow: hidden;
                    transition: transform 0.25s ease, box-shadow 0.25s ease;
                }
                .os-kpi:hover { transform: translateY(-3px); box-shadow: var(--os-shadow-md); }
                .os-kpi::before {
                    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
                    background: linear-gradient(180deg, var(--os-primary), var(--os-primary-light));
                }
                .os-kpi .os-kpi-icon {
                    width: 44px; height: 44px; border-radius: 14px; flex: 0 0 auto;
                    display: inline-flex; align-items: center; justify-content: center;
                    font-size: 1.25rem; color: var(--os-primary-dark);
                    background: linear-gradient(135deg, var(--os-accent), #fff);
                    border: 1px solid var(--os-border-color); margin-bottom: 12px;
                }
                .os-kpi .os-kpi-value { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
                .os-kpi .os-kpi-label { font-weight: 700; font-size: 0.92em; margin-top: 4px; }
                .os-kpi .os-kpi-hint { color: var(--os-text-secondary); font-size: 0.82em; margin-top: 2px; }

                .os-filter-card {
                    border-radius: var(--os-radius-lg);
                }
                .os-filter-card .card-title {
                    font-weight: 800; letter-spacing: -0.01em;
                    display: flex; align-items: center; gap: 8px;
                }
                .os-filter-card .card-title i { color: var(--os-primary); }

                .os-table-card { border-radius: var(--os-radius-lg); overflow: hidden; }
                .os-count-pill {
                    display: inline-flex; align-items: center; gap: 8px;
                    background: #fff; border: 1px solid var(--os-border-color);
                    border-radius: 999px; padding: 7px 16px;
                    box-shadow: var(--os-shadow-sm); font-size: 0.9em;
                }
                .os-count-pill strong { font-size: 1.1em; color: var(--os-primary-dark); }

                .os-empty {
                    border-radius: var(--os-radius-lg); background: #fff;
                    border: 1.5px dashed var(--os-border-color);
                    padding: 52px 24px; text-align: center; color: var(--os-text-secondary);
                }
                .os-empty > i { font-size: 2.6rem; color: #B9CBD8; }
                .os-empty > p { margin: 12px 0 0; font-weight: 500; }

                .os-section-title {
                    font-weight: 800; letter-spacing: -0.01em; font-size: 1.02em;
                    color: var(--os-primary-dark); margin: 0;
                    display: flex; align-items: center; gap: 9px;
                }
                .os-section-title i { color: var(--os-primary); }

                .os-dark-head {
                    background: linear-gradient(135deg, #1E3A66 0%, var(--os-primary-dark) 100%) !important;
                    border-radius: 20px 20px 0 0 !important; color: #fff;
                }
                .os-dark-head .card-title { color: #fff !important; }
                .os-export-btn {
                    background: #FFF9EC !important; color: #C0392B !important; font-weight: 700 !important;
                    border: none; transition: all 0.25s ease;
                }
                .os-export-btn:hover { transform: translateY(-2px); box-shadow: var(--os-shadow-md); color: #96281B !important; }

                .os-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; }
                .os-legend span {
                    display: inline-flex; align-items: center; gap: 7px;
                    background: #F6FAFD; border: 1px solid var(--os-border-color);
                    border-radius: 999px; padding: 4px 12px 4px 6px; font-size: 0.8em; font-weight: 600;
                }
                .os-legend i { width: 16px; height: 16px; border-radius: 6px; display: inline-block; }

                .os-uid {
                    font-weight: 800; color: var(--os-primary-dark);
                    background: linear-gradient(135deg, var(--os-accent), #fff);
                    border: 1px solid var(--os-secondary);
                    padding: 5px 14px; border-radius: 999px; font-size: 0.85em;
                    letter-spacing: 0.03em; white-space: nowrap;
                }
                .os-avatar-ring {
                    border: 4px solid #fff !important;
                    box-shadow: 0 10px 30px rgba(2, 62, 138, 0.28) !important;
                }
                .os-dossier-banner { border-radius: 20px 20px 0 0; }
                .os-kv { display: grid; grid-template-columns: 150px 1fr; gap: 4px 12px; font-size: 0.9em; }
                .os-kv dt { color: var(--os-text-secondary); font-weight: 600; }
                .os-kv dd { margin: 0; font-weight: 600; color: var(--os-text-primary); }

                .os-choice {
                    border-radius: var(--os-radius-lg); transition: all 0.25s ease;
                    border: 1.5px solid var(--os-border-color) !important;
                }
                .os-choice:hover { transform: translateY(-3px); box-shadow: var(--os-shadow-md); border-color: var(--os-secondary) !important; }
                .os-choice .os-choice-icon {
                    width: 54px; height: 54px; border-radius: 18px; margin: 0 auto 14px;
                    display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: #fff;
                    background: linear-gradient(135deg, var(--os-primary), var(--os-primary-dark));
                    box-shadow: 0 12px 26px rgba(0, 119, 182, 0.32);
                }

                @media (max-width: 768px) {
                    .os-page-head h1, .os-page-head h2 { font-size: 1.3rem; }
                    .os-kv { grid-template-columns: 1fr; }
                }

                /* =====================================================
                   WAVE R — responsive pass (drawer, topbar, tables,
                   lists, tabs, dashboard, modals, phones).
                   ===================================================== */
                #sidebarOverlay {
                    position: fixed; inset: 0; z-index: 999;
                    background: rgba(2, 32, 71, 0.45);
                    border: none; padding: 0;
                    opacity: 0; visibility: hidden;
                    transition: opacity 0.3s ease, visibility 0.3s ease;
                }
                body.os-drawer-open { overflow: hidden; }
                body.os-drawer-open #sidebarOverlay { opacity: 1; visibility: visible; }
                @media (min-width: 993px) {
                    #sidebarOverlay { display: none; }
                }

                /* Drawer mode: sidebar off-canvas below 992px */
                @media (max-width: 992px) {
                    #sidebar { margin-left: -280px; box-shadow: none; }
                    #sidebar.active { margin-left: 0; box-shadow: var(--os-shadow-lg); }
                    #content, #content.expanded { margin-left: 0; }
                    #sidebarToggle { flex: 0 0 auto; }
                }

                /* Tables: safe horizontal scroll without touching DataTables */
                @media (max-width: 768px) {
                    .dataTables_wrapper .col-sm-12 { overflow-x: auto; }
                    .dataTables_wrapper .dataTables_filter { text-align: left; margin-top: 8px; }
                    .dataTables_wrapper .dataTables_filter input { min-width: 0; width: 100%; }
                    .dataTables_wrapper .dataTables_paginate .pagination { flex-wrap: wrap; justify-content: center; }
                    table.dataTable thead th { font-size: 0.76em; }
                    table.dataTable tbody td { padding: 12px; }
                }
                @media (max-width: 576px) {
                    table.dataTable { min-width: 520px; }
                }

                /* Tab bars scroll horizontally instead of wrapping */
                @media (max-width: 768px) {
                    .nav-tabs-custom {
                        display: flex; flex-wrap: nowrap; overflow-x: auto;
                        -webkit-overflow-scrolling: touch;
                    }
                    .nav-tabs-custom .nav-item { flex: 0 0 auto; margin-right: 0; }
                    .nav-tabs-custom .nav-link { white-space: nowrap; padding: 12px 18px; }
                }

                /* Patient list: stacked cards, hidden column header */
                @media (max-width: 768px) {
                    .list-header { display: none !important; }
                    .patient-item { flex-direction: column; align-items: stretch; gap: 14px; }
                    .patient-item > [style] { width: 100% !important; }
                    .patient-item .patient-uid { align-self: flex-start; }
                    .patient-item .action-btns { text-align: left !important; justify-content: flex-start; }
                }

                /* Dashboard: shorter charts/maps, calmer headers */
                @media (max-width: 768px) {
                    .dashboard-card .chart-container { height: 320px !important; }
                    #madaMapContainer, #surgicalMapContainer, #nsMapContainer { height: 360px !important; }
                    .dashboard-card .card-body { padding: 18px; }
                    .welcome-section { padding: 30px 22px; }
                    .welcome-content h2 { font-size: 2rem; }
                }
                @media (max-width: 576px) {
                    .dashboard-card .chart-container { height: 280px !important; }
                    #madaMapContainer, #surgicalMapContainer, #nsMapContainer { height: 300px !important; }
                    .welcome-section { padding: 26px 18px; }
                    .welcome-content h2 { font-size: 1.65rem; }
                    .os-dark-head { align-items: flex-start !important; }
                    .os-dark-head .os-export-btn { width: 100%; }
                }

                /* Page heads, breadcrumbs, counts on phones */
                @media (max-width: 576px) {
                    .os-page-head { flex-direction: column; align-items: stretch; }
                    .os-page-actions { width: 100%; }
                    .os-page-actions .btn { flex: 1 1 auto; justify-content: center; }
                    .breadcrumb-card { padding: 12px 16px; margin-bottom: 20px; }
                    .breadcrumb { font-size: 0.85em; margin-bottom: 0; }
                    .os-count-pill { width: 100%; justify-content: center; }
                    .main-content > .d-flex.justify-content-between { flex-wrap: wrap; gap: 10px; }
                    .os-kpi { padding: 16px 18px; }
                    .os-kpi .os-kpi-value { font-size: 1.6rem; }
                }

                /* Topbar on phones: compact, ellipsis title, icon-only Prev */
                @media (max-width: 576px) {
                    .topbar { height: 64px; padding: 0 12px; gap: 8px; }
                    .topbar .topbar-title {
                        font-size: 1em; min-width: 0; flex: 1; text-align: center;
                        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
                    }
                    .topbar .btn-prev { font-size: 0; padding: 9px 12px; }
                    .topbar .btn-prev i { font-size: 1rem; }
                    #sidebarToggle { width: 38px; height: 38px; }
                    #userDropdown { padding: 5px; }
                }

                /* Modals: near-full-screen, scrollable body */
                @media (max-width: 576px) {
                    .modal-dialog { margin: 0.5rem auto; max-width: calc(100% - 1rem); }
                    .modal-body { max-height: calc(100vh - 180px); max-height: calc(100dvh - 180px); overflow-y: auto; }
                }

                /* Wizard stepper + misc */
                .iti { width: 100%; }
                /* Media dossier carousel: shorter on phones */
                @media (max-width: 576px) {
                    #mediaCarousel .carousel-item img,
                    #mediaCarousel .carousel-item > div { height: 280px !important; }
                }
                @media (max-width: 576px) {
                    .patient-stepper { flex-wrap: wrap; row-gap: 10px; }
                    .patient-stepper .step-line { width: 20px; }
                    .patient-stepper .step-circle { width: 36px; height: 36px; font-size: 1rem; }
                    .shots-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
                    .detail-row { flex-wrap: wrap; gap: 0.25rem; }
                    .detail-row .detail-value { text-align: left; }
                }

                            
/* ====================================================================
 * §3 — Sous-pilules suivi des soins
 * Origine : templates/care_tracking/_tabs.html.twig
 * ==================================================================== */

    .os-subpills { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: 1rem; }
    .os-subpill { padding: .3rem .8rem; border-radius: 999px; font-size: .85rem; font-weight: 500; color: var(--os-text-secondary, #6C757D); background: #fff; border: 1px solid var(--os-border-color, #E3ECF2); text-decoration: none; }
    .os-subpill.active { color: #fff; background: var(--os-primary, #0077B6); border-color: var(--os-primary, #0077B6); }
    .os-subpill:hover { text-decoration: none; }
    .os-care-tabs-sep { color: var(--os-border-color, #E3ECF2); }

/* ====================================================================
 * §4 — Dashboard : print, transition grille annee, infobulle carte
 * Origine : templates/dashboard/index.html.twig (blocs n°1 + n°2)
 * ==================================================================== */

        @media print {
            #sidebar, .topbar, .btn, #mapTooltip { display: none !important; }
            #content { width: 100% !important; margin: 0 !important; }
            .main-content { padding: 0 !important; }
            .dashboard-card { box-shadow: none !important; break-inside: avoid; }
        }
        /* Year slider: cheap slide transition on full-reload navigation. */
        .dashboard-grid { transition: transform .25s ease, opacity .25s ease; }
        .dashboard-grid.is-sliding-prev { transform: translateX(-24px); opacity: .35; }
        .dashboard-grid.is-sliding-next { transform: translateX(24px); opacity: .35; }
        @media (prefers-reduced-motion: reduce) {
            .dashboard-grid { transition: none; }
        }
    

            .map-tooltip {
                position: fixed;
                z-index: 9999;
                display: none;
                background: #fff;
                border-radius: 12px;
                box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
                padding: 10px 14px;
                pointer-events: none;
                max-width: 240px;
            }
            .map-tooltip::after {
                content: '';
                position: absolute;
                left: 22px;
                bottom: -6px;
                width: 12px;
                height: 12px;
                background: #fff;
                transform: rotate(45deg);
                box-shadow: 2px 2px 4px rgba(0, 0, 0, .12);
            }
            .map-tooltip .tt-name { font-weight: 700; color: #1F3864; display: block; margin-bottom: 2px; }
            .map-tooltip .tt-count { color: var(--os-primary); font-weight: 600; }
            .map-tooltip .tt-hint { color: #6c757d; font-size: .75rem; display: block; margin-top: 2px; }
        
/* ====================================================================
 * §5 — Dossier patient : banniere pd-*, avatar, blocs
 * Origine : templates/patient/show.html.twig
 * ==================================================================== */

        .pd-banner {
            height: 175px;
            background: linear-gradient(115deg, var(--os-primary-dark) 0%, var(--os-primary) 55%, var(--os-primary-light) 100%);
            position: relative;
            overflow: hidden;
        }
        .pd-banner::after {
            content: '';
            position: absolute; right: -90px; top: -90px;
            width: 300px; height: 300px; border-radius: 50%;
            background: rgba(255, 255, 255, 0.10);
        }
        .pd-banner::before {
            content: '';
            position: absolute; left: 8%; bottom: -120px;
            width: 220px; height: 220px; border-radius: 50%;
            background: rgba(255, 255, 255, 0.08);
        }
        .pd-avatar {
            width: 110px; height: 110px;
            margin-top: -55px;
            border-radius: 50%;
            background: #e9ecef;
            border: 4px solid #fff;
            box-shadow: var(--os-shadow-md);
            overflow: hidden;
            display: flex; align-items: center; justify-content: center;
            position: relative;
            z-index: 2;
        }
        .pd-avatar-male { background: var(--os-accent); }
        .pd-avatar-female { background: #FCE4EC; }
        .pd-name {
            font-weight: 800; font-size: 1.9rem;
            letter-spacing: -0.01em; margin: 12px 0 6px;
        }
        .pd-meta {
            color: var(--os-text-secondary);
            font-size: 0.9em;
            display: flex; flex-wrap: wrap; justify-content: center;
            gap: 6px 18px;
        }
        .pd-meta i { margin-right: 5px; }
        .pd-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 16px 0 6px; }
        .pd-btn-edit {
            background: var(--os-primary-dark); color: #fff;
            border-radius: 999px; padding: 9px 26px; font-weight: 700;
            border: none; transition: all 0.25s ease;
        }
        .pd-btn-edit:hover { background: var(--os-primary); color: #fff; transform: translateY(-2px); }
        .pd-btn-pdf {
            background: #fff; color: #C0392B;
            border: 1px solid var(--os-border-color);
            border-radius: 999px; padding: 9px 26px; font-weight: 700;
            transition: all 0.25s ease;
        }
        .pd-btn-pdf:hover { border-color: #C0392B; transform: translateY(-2px); color: #96281B; }
        .pd-block {
            background: #F6FAFD;
            border: 1px solid var(--os-border-color);
            border-radius: 18px;
            padding: 22px 24px;
            margin-bottom: 18px;
        }
        .pd-block-title {
            font-weight: 800; letter-spacing: 0.04em;
            font-size: 0.95rem; margin-bottom: 16px;
            color: var(--os-text-primary);
        }
        .pd-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px 32px;
            font-size: 0.92em;
        }
        .pd-grid div { padding: 3px 0; }
        .pd-grid strong { font-weight: 700; margin-right: 4px; }
        @media (max-width: 576px) {
            .pd-grid { grid-template-columns: 1fr; }
            .pd-name { font-size: 1.5rem; }
        }
    
/* ====================================================================
 * §6 — Inscription manuelle : stepper, cartes d'entree, revision
 * Origine : templates/patient/registration_manual.html.twig
 * ==================================================================== */

                        .patient-stepper { gap: 0; }
                        .patient-stepper .step-item { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 86px; }
                        .patient-stepper .step-circle {
                            width: 46px; height: 46px; border-radius: 50%;
                            display: flex; align-items: center; justify-content: center;
                            font-size: 1.15rem; flex-shrink: 0;
                            background: #e9ecef; color: #6c757d; border: 2px solid #dee2e6;
                            transition: background .35s ease, color .35s ease, border-color .35s ease, transform .35s ease, box-shadow .35s ease;
                        }
                        .patient-stepper .step-circle.current {
                            background: var(--os-primary); border-color: var(--os-primary);
                            color: #fff; transform: scale(1.12);
                            box-shadow: 0 0 0 4px rgba(0, 163, 196, .2);
                            animation: os-step-pulse 1.8s ease-in-out infinite;
                        }
                        @keyframes os-step-pulse {
                            0%, 100% { box-shadow: 0 0 0 4px rgba(0, 163, 196, .20); }
                            50% { box-shadow: 0 0 0 9px rgba(0, 163, 196, .08); }
                        }
                        .patient-stepper .step-circle.done {
                            background: #198754; border-color: #198754; color: #fff;
                        }
                        .patient-stepper .step-label { font-size: .72rem; font-weight: 600; color: #6c757d; text-align: center; }
                        .patient-stepper .step-item.current .step-label { color: var(--os-primary); }
                        .patient-stepper .step-item.done .step-label { color: #198754; }
                        .patient-stepper .step-line { height: 3px; width: 34px; background: #dee2e6; flex-shrink: 0; margin: 23px 4px 0; border-radius: 2px; transition: background .35s ease; }
                        .patient-stepper .step-line.done { background: linear-gradient(90deg, #198754, var(--os-primary)); }
                        .entry-card { cursor: pointer; border: 2px solid var(--os-border-color, #dee2e6); border-radius: 14px; transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease; }
                        .entry-card:hover { transform: translateY(-2px); box-shadow: var(--os-shadow-md, 0 .5rem 1rem rgba(0,0,0,.1)); }
                        .entry-card.selected { border-color: var(--os-primary); box-shadow: 0 0 0 3px rgba(0, 163, 196, .18); }
                        .review-block { background: #F6FAFD; border: 1px solid var(--os-border-color, #dee2e6); border-radius: 14px; padding: 16px 18px; margin-bottom: 14px; }
                    
/* ====================================================================
 * §7 — Dossier : mise en page print navigateur (tous onglets visibles)
 * Origine : templates/patient/edit.html.twig
 * ==================================================================== */

        /* Browser-print coverage for the dossier: hide navigation/chrome, show every tab. */
        @media print {
            #sidebar, .topbar, .breadcrumb-card, .os-page-actions,
            .nav-tabs, .btn, button, .modal, .os-confirm-singleton,
            #osConfirmModal, form[data-confirm] { display: none !important; }
            .os-page-head { margin-bottom: 0; }
            .tab-content > .tab-pane { display: block !important; opacity: 1 !important; visibility: visible !important; page-break-inside: avoid; }
            .card { box-shadow: none !important; border: 1px solid #ccc !important; page-break-inside: avoid; }
            .table-actions { display: none !important; }
            a { text-decoration: none !important; color: inherit !important; }
        }
    
/* ====================================================================
 * §8 — Stickers QR + print navigateur
 * Origine : templates/patient/qr_stickers.html.twig
 * ==================================================================== */

        .qr-sheet { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
        .qr-sticker {
            border: 2px dashed var(--os-border-color, #dee2e6);
            border-radius: 12px;
            padding: 12px 8px;
            text-align: center;
            background: #fff;
            page-break-inside: avoid;
        }
        .qr-sticker img { max-width: 130px; width: 100%; height: auto; }
        .qr-sticker .qr-uid { font-weight: 800; font-size: .95rem; margin-top: 6px; letter-spacing: .02em; }
        .qr-sticker .qr-name { font-size: .8rem; color: var(--os-text-secondary, #6c757d); }
        @media print {
            .no-print { display: none !important; }
            .qr-sheet { gap: 10px; }
            .qr-sticker { border-style: solid; border-width: 1px; border-radius: 0; box-shadow: none; }
            .card, .breadcrumb-card { border: none !important; box-shadow: none !important; }
        }
    
/* ====================================================================
 * §9 — Page profil : couverture, avatar, lignes detail
 * Origine : templates/profile/index.html.twig
 * ==================================================================== */

        .profile-cover {
            height: 96px;
            background: linear-gradient(135deg, var(--os-primary) 0%, var(--os-primary-dark) 100%);
            position: relative;
            overflow: hidden;
        }
        .profile-cover::before {
            content: '';
            position: absolute;
            top: -60px;
            right: -40px;
            width: 180px;
            height: 180px;
            background: rgba(255, 255, 255, 0.15);
            border-radius: 50%;
        }
        .profile-cover::after {
            content: '';
            position: absolute;
            bottom: -70px;
            left: 24px;
            width: 140px;
            height: 140px;
            background: rgba(255, 255, 255, 0.10);
            border-radius: 50%;
        }
        .profile-avatar-wrap {
            width: 128px;
            height: 128px;
            border-radius: 50%;
            overflow: hidden;
            margin: -64px auto 0;
            background: linear-gradient(135deg, var(--os-accent) 0%, var(--os-secondary) 100%);
            border: 4px solid #fff;
            box-shadow: var(--os-shadow-md);
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            z-index: 1;
        }
        .profile-avatar-wrap img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .profile-avatar-wrap .bi-person-fill {
            font-size: 3.5rem;
            color: var(--os-primary);
        }
        .detail-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 1rem;
            padding: 0.9rem 0;
            border-bottom: 1px solid var(--os-border-color);
        }
        .detail-row:last-child {
            border-bottom: none;
        }
        .detail-label {
            color: var(--os-text-secondary);
            font-weight: 600;
            font-size: 0.9rem;
            margin: 0;
            flex-shrink: 0;
        }
        .detail-value {
            text-align: right;
            font-weight: 500;
            overflow-wrap: anywhere;
        }
        .photo-picker-hint {
            font-size: 0.82rem;
            color: var(--os-text-secondary);
        }
        .selected-file-name {
            font-size: 0.82rem;
            color: var(--os-primary);
            font-weight: 600;
        }
        .section-icon {
            width: 40px;
            height: 40px;
            border-radius: 12px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: var(--os-accent);
            color: var(--os-primary);
            font-size: 1.2rem;
            flex-shrink: 0;
        }
    
/* ====================================================================
 * §10 — Changement mot de passe : carte etroite, icone
 * Origine : templates/profile/change_password.html.twig
 * ==================================================================== */

        .pwd-wrap {
            max-width: 580px;
            margin: 0 auto;
        }
        .pwd-icon {
            width: 56px;
            height: 56px;
            border-radius: 18px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, var(--os-primary) 0%, var(--os-primary-dark) 100%);
            color: #fff;
            font-size: 1.6rem;
            box-shadow: var(--os-shadow-sm);
        }
    
/* ====================================================================
 * §11 — Page debug Security (Hello SecurityController)
 * Origine : templates/security/index.html.twig
 * ==================================================================== */

    .example-wrapper { margin: 1em auto; max-width: 800px; width: 95%; font: 18px/1.5 sans-serif; }
    .example-wrapper code { background: #F5F5F5; padding: 2px 6px; }

/* ====================================================================
 * §12a — Auth autonome : login (noyau commun + media 576px login seul)
 * Origine : templates/security/login.html.twig — scopings (1)(2)(3) appliques
 * ==================================================================== */

            .os-login {
                --os-font: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
                --os-font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
                --os-primary: #0077B6;
                --os-primary-light: #00B4D8;
                --os-primary-dark: #023E8A;
                --os-secondary: #90E0EF;
                --os-accent: #CAF0F8;
                --os-main-bg: #F0F4F8;
                --os-text-primary: #212529;
                --os-text-secondary: #6C757D;
                --os-border-color: #E3ECF2;
                --os-shadow-lg: 0 24px 70px rgba(2, 62, 138, 0.22);
                --os-shadow-md: 0 10px 34px rgba(2, 62, 138, 0.14);
            }
            * { box-sizing: border-box; }
            html, body { height: 100%; margin: 0; }
            .os-login {
                font-family: var(--os-font);
                color: var(--os-text-primary);
                background: var(--os-main-bg);
                -webkit-font-smoothing: antialiased;
                -moz-osx-font-smoothing: grayscale;
                text-rendering: optimizeLegibility;
            }
            .os-login { display: flex; min-height: 100vh; }

            /* ---------- Visual side ---------- */
            .os-visual {
                position: relative;
                flex: 1.5;
                min-height: 100vh;
                overflow: hidden;
                background: linear-gradient(150deg, #023E8A 0%, #0077B6 52%, #00B4D8 100%);
                color: #fff;
                display: flex;
                flex-direction: column;
            }
            .os-visual .carousel,
            .os-visual .carousel-inner,
            .os-visual .carousel-item { height: 100%; }
            .os-slides { position: absolute; inset: 0; }
            .os-slides .carousel-item img {
                width: 100%; height: 100%;
                object-fit: cover;
                filter: saturate(1.05);
            }
            .os-shade {
                position: absolute; inset: 0;
                background:
                    linear-gradient(180deg, rgba(2, 20, 45, 0.55) 0%, rgba(2, 62, 138, 0.18) 34%, rgba(2, 32, 71, 0.72) 100%),
                    linear-gradient(120deg, rgba(0, 180, 216, 0.28), transparent 55%);
                pointer-events: none;
            }
            .os-visual-top {
                position: relative; z-index: 3;
                display: flex; align-items: center; gap: 12px;
                padding: 26px 32px;
            }
            .os-brand-badge {
                width: 46px; height: 46px; border-radius: 14px;
                background: rgba(255,255,255,0.96);
                display: flex; align-items: center; justify-content: center;
                box-shadow: 0 8px 24px rgba(0,0,0,0.22);
                overflow: hidden; flex: 0 0 auto;
            }
            .os-brand-badge img { width: 34px; height: 34px; object-fit: contain; }
            .os-brand-name { font-weight: 800; letter-spacing: -0.01em; line-height: 1.15; }
            .os-brand-name small { display: block; font-weight: 500; opacity: 0.82; font-size: 0.8em; }
            .os-visual-body {
                position: relative; z-index: 3;
                margin-top: auto;
                padding: 0 40px 26px;
            }
            .os-login .os-eyebrow {
                display: inline-flex; align-items: center; gap: 8px;
                background: rgba(255,255,255,0.16);
                border: 1px solid rgba(255,255,255,0.32);
                backdrop-filter: blur(8px);
                border-radius: 999px;
                padding: 7px 14px;
                font-size: 0.82em; font-weight: 600;
            }
            .os-visual-body h1 {
                font-size: clamp(1.9rem, 3.2vw, 2.9rem);
                font-weight: 800; letter-spacing: -0.02em;
                line-height: 1.08; margin: 16px 0 12px;
                text-shadow: 0 4px 24px rgba(0,0,0,0.3);
            }
            .os-visual-body p { opacity: 0.92; font-size: 1.02rem; max-width: 34rem; }
            .os-caption-pill {
                display: inline-flex; align-items: center; gap: 8px;
                background: rgba(255,255,255,0.95); color: var(--os-primary-dark);
                border-radius: 999px; padding: 8px 16px;
                font-weight: 700; font-size: 0.88em;
                box-shadow: 0 10px 26px rgba(0,0,0,0.25);
            }
            .os-dots { display: flex; gap: 8px; margin-top: 18px; }
            .os-dots span { width: 26px; height: 5px; border-radius: 999px; background: rgba(255,255,255,0.35); }
            .os-dots span.on { background: #fff; width: 40px; }
            .os-marquee {
                position: relative; z-index: 3;
                border-top: 1px solid rgba(255,255,255,0.25);
                background: rgba(2, 32, 71, 0.55);
                backdrop-filter: blur(10px);
                overflow: hidden; white-space: nowrap;
                padding: 12px 0; font-style: italic; font-size: 0.95rem;
            }
            .os-marquee span { display: inline-block; padding-left: 100%; animation: os-scroll 26s linear infinite; }
            @keyframes os-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }

            /* ---------- Form side ---------- */
            .os-form-side {
                flex: 1;
                display: flex; align-items: center; justify-content: center;
                padding: 44px 30px;
                background:
                    radial-gradient(700px 320px at 50% 0%, rgba(0,180,216,0.12), transparent 65%),
                    #FFFFFF;
            }
            .os-card {
                width: 100%; max-width: 430px;
                animation: os-rise 0.55s ease both;
            }
            @keyframes os-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
            .os-logo-row { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
            .os-logo-row img { height: 44px; object-fit: contain; }
            .os-logo-fallback {
                width: 46px; height: 46px; border-radius: 14px; flex: 0 0 auto;
                background: linear-gradient(135deg, var(--os-primary), var(--os-primary-dark));
                color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
            }
            .os-card h2 { font-weight: 800; letter-spacing: -0.02em; font-size: 1.65rem; margin: 0 0 6px; }
            .os-sub { color: var(--os-text-secondary); margin-bottom: 22px; }
            .os-field { margin-bottom: 14px; }
            .os-field label { font-weight: 700; font-size: 0.9em; margin-bottom: 7px; display: block; }
            .os-input { position: relative; }
            .os-input > i {
                position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
                color: #8AA0B1; font-size: 1.05rem; pointer-events: none;
            }
            .os-input .form-control {
                border-radius: 14px;
                border: 1.5px solid var(--os-border-color);
                padding: 13px 44px 13px 44px;
                font-size: 0.96rem;
                background: #F7FAFC;
                transition: all 0.25s ease;
            }
            .os-input .form-control:focus {
                border-color: var(--os-primary);
                background: #fff;
                box-shadow: 0 0 0 4px rgba(0, 119, 182, 0.12);
            }
            .os-eye {
                position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
                border: none; background: transparent; color: #7B8B99;
                width: 34px; height: 34px; border-radius: 10px;
            }
            .os-eye:hover { background: var(--os-accent); color: var(--os-primary-dark); }
            .os-btn {
                width: 100%; border: none; border-radius: 14px;
                padding: 13px; font-weight: 800; font-size: 1rem; color: #fff;
                background: linear-gradient(135deg, var(--os-primary) 0%, var(--os-primary-dark) 100%);
                box-shadow: 0 12px 28px rgba(0, 119, 182, 0.35);
                transition: all 0.25s ease;
            }
            .os-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(2, 62, 138, 0.35); color: #fff; }
            .os-btn:active { transform: none; }
            .os-link {
                display: inline-block; margin-top: 14px; width: 100%; text-align: center;
                color: var(--os-primary); font-weight: 600; text-decoration: none; font-size: 0.94em;
            }
            .os-link:hover { color: var(--os-primary-dark); text-decoration: underline; }
            .os-alert {
                border: none; border-left: 5px solid #E63946;
                background: #FFF1F2; border-radius: 12px;
                padding: 12px 14px; font-weight: 500;
            }
            .os-meta { margin-top: 26px; text-align: center; color: #93A3B1; font-size: 0.82em; }
            .os-trust { display: flex; gap: 8px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
            .os-trust span {
                background: #F1F7FB; border: 1px solid var(--os-border-color);
                border-radius: 999px; padding: 6px 12px; font-size: 0.8em; font-weight: 600; color: #47617A;
            }
            @media (max-width: 991px) {
                .os-login { flex-direction: column; }
                .os-visual { min-height: 46vh; }
                .os-visual-body { padding: 0 24px 20px; }
                .os-form-side { padding: 30px 18px 44px; }
            }
            @media (max-width: 576px) {
                .os-visual { min-height: 38vh; }
                .os-visual-top { padding: 18px 20px; }
                .os-visual-body { padding: 0 20px 18px; }
                .os-visual-body h1 { font-size: 1.6rem; }
                .os-visual-body p { font-size: 0.94rem; }
                .os-marquee { font-size: 0.85rem; }
                .os-card h2 { font-size: 1.4rem; }
                .os-trust span { font-size: 0.75em; }
            }
            @media (prefers-reduced-motion: reduce) {
                .os-marquee span { animation: none; }
                .os-card { animation: none; }
            }
        
/* ====================================================================
 * §12b — Auth autonome : noyau commun (request + reset, <style> strictement identiques : une seule copie)
 * Origine : templates/reset_password/request.html.twig + templates/reset_password/reset.html.twig — scopings (1)(2)(3) appliques
 * ==================================================================== */

            .os-login {
                --os-font: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
                --os-font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
                --os-primary: #0077B6;
                --os-primary-light: #00B4D8;
                --os-primary-dark: #023E8A;
                --os-secondary: #90E0EF;
                --os-accent: #CAF0F8;
                --os-main-bg: #F0F4F8;
                --os-text-primary: #212529;
                --os-text-secondary: #6C757D;
                --os-border-color: #E3ECF2;
                --os-shadow-lg: 0 24px 70px rgba(2, 62, 138, 0.22);
                --os-shadow-md: 0 10px 34px rgba(2, 62, 138, 0.14);
            }
            * { box-sizing: border-box; }
            html, body { height: 100%; margin: 0; }
            .os-login {
                font-family: var(--os-font);
                color: var(--os-text-primary);
                background: var(--os-main-bg);
                -webkit-font-smoothing: antialiased;
                -moz-osx-font-smoothing: grayscale;
                text-rendering: optimizeLegibility;
            }
            .os-login { display: flex; min-height: 100vh; }

            /* ---------- Visual side ---------- */
            .os-visual {
                position: relative;
                flex: 1.5;
                min-height: 100vh;
                overflow: hidden;
                background: linear-gradient(150deg, #023E8A 0%, #0077B6 52%, #00B4D8 100%);
                color: #fff;
                display: flex;
                flex-direction: column;
            }
            .os-visual .carousel,
            .os-visual .carousel-inner,
            .os-visual .carousel-item { height: 100%; }
            .os-slides { position: absolute; inset: 0; }
            .os-slides .carousel-item img {
                width: 100%; height: 100%;
                object-fit: cover;
                filter: saturate(1.05);
            }
            .os-shade {
                position: absolute; inset: 0;
                background:
                    linear-gradient(180deg, rgba(2, 20, 45, 0.55) 0%, rgba(2, 62, 138, 0.18) 34%, rgba(2, 32, 71, 0.72) 100%),
                    linear-gradient(120deg, rgba(0, 180, 216, 0.28), transparent 55%);
                pointer-events: none;
            }
            .os-visual-top {
                position: relative; z-index: 3;
                display: flex; align-items: center; gap: 12px;
                padding: 26px 32px;
            }
            .os-brand-badge {
                width: 46px; height: 46px; border-radius: 14px;
                background: rgba(255,255,255,0.96);
                display: flex; align-items: center; justify-content: center;
                box-shadow: 0 8px 24px rgba(0,0,0,0.22);
                overflow: hidden; flex: 0 0 auto;
            }
            .os-brand-badge img { width: 34px; height: 34px; object-fit: contain; }
            .os-brand-name { font-weight: 800; letter-spacing: -0.01em; line-height: 1.15; }
            .os-brand-name small { display: block; font-weight: 500; opacity: 0.82; font-size: 0.8em; }
            .os-visual-body {
                position: relative; z-index: 3;
                margin-top: auto;
                padding: 0 40px 26px;
            }
            .os-login .os-eyebrow {
                display: inline-flex; align-items: center; gap: 8px;
                background: rgba(255,255,255,0.16);
                border: 1px solid rgba(255,255,255,0.32);
                backdrop-filter: blur(8px);
                border-radius: 999px;
                padding: 7px 14px;
                font-size: 0.82em; font-weight: 600;
            }
            .os-visual-body h1 {
                font-size: clamp(1.9rem, 3.2vw, 2.9rem);
                font-weight: 800; letter-spacing: -0.02em;
                line-height: 1.08; margin: 16px 0 12px;
                text-shadow: 0 4px 24px rgba(0,0,0,0.3);
            }
            .os-visual-body p { opacity: 0.92; font-size: 1.02rem; max-width: 34rem; }
            .os-caption-pill {
                display: inline-flex; align-items: center; gap: 8px;
                background: rgba(255,255,255,0.95); color: var(--os-primary-dark);
                border-radius: 999px; padding: 8px 16px;
                font-weight: 700; font-size: 0.88em;
                box-shadow: 0 10px 26px rgba(0,0,0,0.25);
            }
            .os-dots { display: flex; gap: 8px; margin-top: 18px; }
            .os-dots span { width: 26px; height: 5px; border-radius: 999px; background: rgba(255,255,255,0.35); }
            .os-dots span.on { background: #fff; width: 40px; }
            .os-marquee {
                position: relative; z-index: 3;
                border-top: 1px solid rgba(255,255,255,0.25);
                background: rgba(2, 32, 71, 0.55);
                backdrop-filter: blur(10px);
                overflow: hidden; white-space: nowrap;
                padding: 12px 0; font-style: italic; font-size: 0.95rem;
            }
            .os-marquee span { display: inline-block; padding-left: 100%; animation: os-scroll 26s linear infinite; }
            @keyframes os-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }

            /* ---------- Form side ---------- */
            .os-form-side {
                flex: 1;
                display: flex; align-items: center; justify-content: center;
                padding: 44px 30px;
                background:
                    radial-gradient(700px 320px at 50% 0%, rgba(0,180,216,0.12), transparent 65%),
                    #FFFFFF;
            }
            .os-card {
                width: 100%; max-width: 430px;
                animation: os-rise 0.55s ease both;
            }
            @keyframes os-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
            .os-logo-row { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
            .os-logo-row img { height: 44px; object-fit: contain; }
            .os-logo-fallback {
                width: 46px; height: 46px; border-radius: 14px; flex: 0 0 auto;
                background: linear-gradient(135deg, var(--os-primary), var(--os-primary-dark));
                color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
            }
            .os-card h2 { font-weight: 800; letter-spacing: -0.02em; font-size: 1.65rem; margin: 0 0 6px; }
            .os-sub { color: var(--os-text-secondary); margin-bottom: 22px; }
            .os-field { margin-bottom: 14px; }
            .os-field label { font-weight: 700; font-size: 0.9em; margin-bottom: 7px; display: block; }
            .os-input { position: relative; }
            .os-input > i {
                position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
                color: #8AA0B1; font-size: 1.05rem; pointer-events: none;
            }
            .os-input .form-control {
                border-radius: 14px;
                border: 1.5px solid var(--os-border-color);
                padding: 13px 44px 13px 44px;
                font-size: 0.96rem;
                background: #F7FAFC;
                transition: all 0.25s ease;
            }
            .os-input .form-control:focus {
                border-color: var(--os-primary);
                background: #fff;
                box-shadow: 0 0 0 4px rgba(0, 119, 182, 0.12);
            }
            .os-eye {
                position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
                border: none; background: transparent; color: #7B8B99;
                width: 34px; height: 34px; border-radius: 10px;
            }
            .os-eye:hover { background: var(--os-accent); color: var(--os-primary-dark); }
            .os-btn {
                width: 100%; border: none; border-radius: 14px;
                padding: 13px; font-weight: 800; font-size: 1rem; color: #fff;
                background: linear-gradient(135deg, var(--os-primary) 0%, var(--os-primary-dark) 100%);
                box-shadow: 0 12px 28px rgba(0, 119, 182, 0.35);
                transition: all 0.25s ease;
            }
            .os-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(2, 62, 138, 0.35); color: #fff; }
            .os-btn:active { transform: none; }
            .os-link {
                display: inline-block; margin-top: 14px; width: 100%; text-align: center;
                color: var(--os-primary); font-weight: 600; text-decoration: none; font-size: 0.94em;
            }
            .os-link:hover { color: var(--os-primary-dark); text-decoration: underline; }
            .os-alert {
                border: none; border-left: 5px solid #E63946;
                background: #FFF1F2; border-radius: 12px;
                padding: 12px 14px; font-weight: 500;
            }
            .os-meta { margin-top: 26px; text-align: center; color: #93A3B1; font-size: 0.82em; }
            .os-trust { display: flex; gap: 8px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
            .os-trust span {
                background: #F1F7FB; border: 1px solid var(--os-border-color);
                border-radius: 999px; padding: 6px 12px; font-size: 0.8em; font-weight: 600; color: #47617A;
            }
            @media (max-width: 991px) {
                .os-login { flex-direction: column; }
                .os-visual { min-height: 46vh; }
                .os-visual-body { padding: 0 24px 20px; }
                .os-form-side { padding: 30px 18px 44px; }
            }
            @media (prefers-reduced-motion: reduce) {
                .os-marquee span { animation: none; }
                .os-card { animation: none; }
            }
        
/* ====================================================================
 * §12c — Auth autonome : variante check-email (.os-note, .os-btn lien, sans champs)
 * Origine : templates/reset_password/check_email.html.twig — scopings (1)(2)(3) appliques
 * ==================================================================== */

            .os-login {
                --os-font: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
                --os-font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
                --os-primary: #0077B6;
                --os-primary-light: #00B4D8;
                --os-primary-dark: #023E8A;
                --os-secondary: #90E0EF;
                --os-accent: #CAF0F8;
                --os-main-bg: #F0F4F8;
                --os-text-primary: #212529;
                --os-text-secondary: #6C757D;
                --os-border-color: #E3ECF2;
                --os-shadow-lg: 0 24px 70px rgba(2, 62, 138, 0.22);
                --os-shadow-md: 0 10px 34px rgba(2, 62, 138, 0.14);
            }
            * { box-sizing: border-box; }
            html, body { height: 100%; margin: 0; }
            .os-login {
                font-family: var(--os-font);
                color: var(--os-text-primary);
                background: var(--os-main-bg);
                -webkit-font-smoothing: antialiased;
                -moz-osx-font-smoothing: grayscale;
                text-rendering: optimizeLegibility;
            }
            .os-login { display: flex; min-height: 100vh; }

            /* ---------- Visual side ---------- */
            .os-visual {
                position: relative;
                flex: 1.5;
                min-height: 100vh;
                overflow: hidden;
                background: linear-gradient(150deg, #023E8A 0%, #0077B6 52%, #00B4D8 100%);
                color: #fff;
                display: flex;
                flex-direction: column;
            }
            .os-visual .carousel,
            .os-visual .carousel-inner,
            .os-visual .carousel-item { height: 100%; }
            .os-slides { position: absolute; inset: 0; }
            .os-slides .carousel-item img {
                width: 100%; height: 100%;
                object-fit: cover;
                filter: saturate(1.05);
            }
            .os-shade {
                position: absolute; inset: 0;
                background:
                    linear-gradient(180deg, rgba(2, 20, 45, 0.55) 0%, rgba(2, 62, 138, 0.18) 34%, rgba(2, 32, 71, 0.72) 100%),
                    linear-gradient(120deg, rgba(0, 180, 216, 0.28), transparent 55%);
                pointer-events: none;
            }
            .os-visual-top {
                position: relative; z-index: 3;
                display: flex; align-items: center; gap: 12px;
                padding: 26px 32px;
            }
            .os-brand-badge {
                width: 46px; height: 46px; border-radius: 14px;
                background: rgba(255,255,255,0.96);
                display: flex; align-items: center; justify-content: center;
                box-shadow: 0 8px 24px rgba(0,0,0,0.22);
                overflow: hidden; flex: 0 0 auto;
            }
            .os-brand-badge img { width: 34px; height: 34px; object-fit: contain; }
            .os-brand-name { font-weight: 800; letter-spacing: -0.01em; line-height: 1.15; }
            .os-brand-name small { display: block; font-weight: 500; opacity: 0.82; font-size: 0.8em; }
            .os-visual-body {
                position: relative; z-index: 3;
                margin-top: auto;
                padding: 0 40px 26px;
            }
            .os-login .os-eyebrow {
                display: inline-flex; align-items: center; gap: 8px;
                background: rgba(255,255,255,0.16);
                border: 1px solid rgba(255,255,255,0.32);
                backdrop-filter: blur(8px);
                border-radius: 999px;
                padding: 7px 14px;
                font-size: 0.82em; font-weight: 600;
            }
            .os-visual-body h1 {
                font-size: clamp(1.9rem, 3.2vw, 2.9rem);
                font-weight: 800; letter-spacing: -0.02em;
                line-height: 1.08; margin: 16px 0 12px;
                text-shadow: 0 4px 24px rgba(0,0,0,0.3);
            }
            .os-visual-body p { opacity: 0.92; font-size: 1.02rem; max-width: 34rem; }
            .os-caption-pill {
                display: inline-flex; align-items: center; gap: 8px;
                background: rgba(255,255,255,0.95); color: var(--os-primary-dark);
                border-radius: 999px; padding: 8px 16px;
                font-weight: 700; font-size: 0.88em;
                box-shadow: 0 10px 26px rgba(0,0,0,0.25);
            }
            .os-dots { display: flex; gap: 8px; margin-top: 18px; }
            .os-dots span { width: 26px; height: 5px; border-radius: 999px; background: rgba(255,255,255,0.35); }
            .os-dots span.on { background: #fff; width: 40px; }
            .os-marquee {
                position: relative; z-index: 3;
                border-top: 1px solid rgba(255,255,255,0.25);
                background: rgba(2, 32, 71, 0.55);
                backdrop-filter: blur(10px);
                overflow: hidden; white-space: nowrap;
                padding: 12px 0; font-style: italic; font-size: 0.95rem;
            }
            .os-marquee span { display: inline-block; padding-left: 100%; animation: os-scroll 26s linear infinite; }
            @keyframes os-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }

            /* ---------- Form side ---------- */
            .os-form-side {
                flex: 1;
                display: flex; align-items: center; justify-content: center;
                padding: 44px 30px;
                background:
                    radial-gradient(700px 320px at 50% 0%, rgba(0,180,216,0.12), transparent 65%),
                    #FFFFFF;
            }
            .os-card {
                width: 100%; max-width: 430px;
                animation: os-rise 0.55s ease both;
            }
            @keyframes os-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
            .os-logo-row { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
            .os-logo-row img { height: 44px; object-fit: contain; }
            .os-logo-fallback {
                width: 46px; height: 46px; border-radius: 14px; flex: 0 0 auto;
                background: linear-gradient(135deg, var(--os-primary), var(--os-primary-dark));
                color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
            }
            .os-card h2 { font-weight: 800; letter-spacing: -0.02em; font-size: 1.65rem; margin: 0 0 6px; }
            .os-sub { color: var(--os-text-secondary); margin-bottom: 22px; }
            .os-note {
                background: #F1F7FB;
                border: 1px solid var(--os-border-color);
                border-radius: 14px;
                padding: 14px 16px;
                color: #47617A;
                font-size: 0.94rem;
                margin-bottom: 22px;
            }
            .os-note i { color: var(--os-primary); }
            .os-btn {
                width: 100%; border: none; border-radius: 14px;
                padding: 13px; font-weight: 800; font-size: 1rem; color: #fff;
                text-decoration: none; display: inline-block; text-align: center;
                background: linear-gradient(135deg, var(--os-primary) 0%, var(--os-primary-dark) 100%);
                box-shadow: 0 12px 28px rgba(0, 119, 182, 0.35);
                transition: all 0.25s ease;
            }
            .os-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(2, 62, 138, 0.35); color: #fff; }
            .os-btn:active { transform: none; }
            .os-link {
                display: inline-block; margin-top: 14px; width: 100%; text-align: center;
                color: var(--os-primary); font-weight: 600; text-decoration: none; font-size: 0.94em;
            }
            .os-link:hover { color: var(--os-primary-dark); text-decoration: underline; }
            .os-alert {
                border: none; border-left: 5px solid #E63946;
                background: #FFF1F2; border-radius: 12px;
                padding: 12px 14px; font-weight: 500;
            }
            .os-meta { margin-top: 26px; text-align: center; color: #93A3B1; font-size: 0.82em; }
            .os-trust { display: flex; gap: 8px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
            .os-trust span {
                background: #F1F7FB; border: 1px solid var(--os-border-color);
                border-radius: 999px; padding: 6px 12px; font-size: 0.8em; font-weight: 600; color: #47617A;
            }
            @media (max-width: 991px) {
                .os-login { flex-direction: column; }
                .os-visual { min-height: 46vh; }
                .os-visual-body { padding: 0 24px 20px; }
                .os-form-side { padding: 30px 18px 44px; }
            }
            @media (prefers-reduced-motion: reduce) {
                .os-marquee span { animation: none; }
                .os-card { animation: none; }
            }
        