/* GestLoc G102 - couche UI/UX commune (chargee en dernier, apres la couche de recette). Regles generales uniquement : aucune logique metier. */

/* ---- 1. Boutons d'action des en-tetes (G102-07 et pages equivalentes) ---- */
/* Un lien stylise en bouton (btn-corporate-*) ne doit jamais prendre la couleur des liens de texte (texte et icone = fond) */
html body .main-container [class*="btn-corporate"] > i[class*="fa"],
html body .main-container .hero-section [class*="btn-corporate"] > i[class*="fa"],
html body .main-container [class*="btn-corporate"] > svg { color: inherit !important; }
html body .main-container .btn-corporate-warning, html body .main-container .btn-corporate-warning > i, html body .main-container .hero-section .btn-corporate-warning > i[class*="fa"] { color: #1f2937 !important; }
/* barre d'actions de l'en-tete : une seule ligne alignee a droite, retour a la ligne propre si l'espace manque */
html body .hero-section .row.align-items-center > .col-md-4.text-end { flex: 0 0 auto; width: auto; max-width: 100%; margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; }
html body .hero-section .row.align-items-center > .col-md-4.text-end > [class*="btn-corporate"] { margin: 0 !important; white-space: nowrap; }
html body .hero-section .row.align-items-center > .col-md-8:has(+ .col-md-4.text-end) { flex: 1 1 0; width: auto; min-width: 0; }
html body .hero-section .hero-content > .row.align-items-center { flex: 1 1 100%; width: 100%; }

/* ---- 2. Composants communs G102 : en-tete de page compact, boutons, barre d'outils, champs ---- */
:root { --g102-nuit: var(--gl-nuit, #1A3B5D); --g102-bord: #D8E0EA; --g102-fond: #fff; --g102-doux: #F5F7FA; --g102-texte: #1E293B; --g102-muted: #475569; --g102-r: 10px; }
html body .g102-page { max-width: 1280px; margin: 0 auto; padding: 18px 16px 8px; }
html body .g102-page > .main-content, html body .g102-page .main-content { padding-left: 0; padding-right: 0; margin-top: 0; }
html body .g102-page .container-fluid { padding-left: 0 !important; padding-right: 0 !important; }
html body .g102-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin: 0 0 14px; padding: 0 0 12px; border-bottom: 1px solid #E2E8F0; }
html body .g102-head-text { min-width: 0; flex: 1 1 280px; }
html body .g102-title { margin: 0; font-size: 22px; line-height: 1.25; font-weight: 700; color: var(--g102-nuit); letter-spacing: -.01em; }
html body .g102-sub { margin: 2px 0 0; font-size: 13.5px; color: var(--g102-muted); }
html body .g102-head-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
html body .g102-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 0 14px; border-radius: 8px; font-size: 14px; font-weight: 600; line-height: 1; text-decoration: none; cursor: pointer; white-space: nowrap; border: 1px solid transparent; transition: background .15s, border-color .15s, box-shadow .15s; }
html body .g102-btn:focus-visible { outline: 3px solid #93C5FD; outline-offset: 2px; }
html body .g102-btn-primary { background: var(--g102-nuit); border-color: var(--g102-nuit); color: #fff; }
html body .g102-btn-primary:hover { background: #0F2239; border-color: #0F2239; color: #fff; }
html body .g102-btn-secondary { background: #fff; border-color: #B8C4D2; color: var(--g102-nuit); }
html body .g102-btn-secondary:hover { background: #EEF3F8; border-color: var(--g102-nuit); color: var(--g102-nuit); }
html body .g102-btn-danger { background: #fff; border-color: #E4A5A5; color: #B02A37; }
html body .g102-btn-danger:hover { background: #FDF0F0; color: #8F1F2B; }
html body .g102-btn[disabled], html body .g102-btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
html body .g102-btn i { color: inherit !important; font-size: 13px; }

html body .g102-toolbar { background: var(--g102-fond); border: 1px solid #E2E8F0; border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
html body .g102-tb-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; }
html body .g102-field { display: flex; flex-direction: column; gap: 4px; margin: 0; min-width: 0; }
html body .g102-field.g102-grow { flex: 1 1 240px; }
html body .g102-field.g102-actions-inline { flex-direction: row; gap: 8px; align-items: center; }
html body .g102-label { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--g102-muted); }
html body .g102-label i { color: var(--g102-muted) !important; margin-right: 3px; }
html body .g102-page .date-picker, html body .g102-page select.date-picker, html body .g102-page input.date-picker { height: 38px; min-height: 38px; padding: 0 10px; border: 1px solid #B8C4D2; border-radius: 8px; background: #fff; color: var(--g102-texte); font-size: 14px; width: 100%; min-width: 150px; }
html body .g102-page .date-picker:focus { outline: 3px solid #BFDBFE; border-color: #3B82F6; }
html body .g102-seg { align-self: flex-end; }
html body .g102-seg .btn { min-height: 38px; display: inline-flex; align-items: center; font-weight: 600; }
html body .g102-datenav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 0; background: transparent; border: 0; }
html body .g102-datenav .date-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 8px; border: 1px solid #B8C4D2; background: #fff; color: var(--g102-nuit); font-size: 14px; font-weight: 600; text-decoration: none; flex: 0 0 auto; }
html body .g102-datenav .date-btn:hover { background: #EEF3F8; }
html body .g102-datenav .date-btn.active { background: var(--g102-nuit); border-color: var(--g102-nuit); color: #fff; }
html body .g102-datenav .date-btn.active i { color: #fff !important; }
html body .g102-datenav .date-picker { width: 160px; min-width: 150px; }
html body .g102-range { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; }
html body .g102-page .date-range-nav { background: transparent; border: 0; padding: 0; margin: 0; }
html body .g102-exports { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 14px; }
html body .g102-exports .export-buttons-wrapper { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
html body .g102-exports .export-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 8px; background: #fff !important; border: 1px solid #B8C4D2 !important; color: #14532D !important; font-size: 13px; font-weight: 600; box-shadow: none !important; text-decoration: none; }
html body .g102-exports .export-btn i { color: #15803D !important; }
html body .g102-exports .export-btn:hover { background: #F0FDF4 !important; border-color: #15803D !important; }
html body .g102-page .modern-header { background: transparent !important; box-shadow: none !important; border: 0 !important; padding: 0 !important; margin: 0 !important; }
html body .g102-page .modern-header > .d-flex.mb-4 { display: none !important; }
@media (max-width: 767.98px) { html body .g102-page { padding: 12px 12px 4px; } html body .g102-title { font-size: 20px; } html body .g102-head-actions, html body .g102-head-actions .g102-btn { width: 100%; } html body .g102-datenav .date-picker, html body .g102-field { width: 100%; } html body .g102-datenav .date-btn { flex: 1 1 auto; justify-content: center; } }

/* ---- 3. Listes journalieres : statistiques sobres et colonnes depart / retour ---- */
html body .g102-dl .stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 14px; }
html body .g102-dl .stat-card { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 12px 16px; background: #fff; border: 1px solid #E2E8F0; border-top: 3px solid #CFDBE8; border-radius: 12px; box-shadow: none; text-align: left; }
html body .g102-dl .stat-card .stat-number { font-size: 26px; font-weight: 700; line-height: 1.1; color: var(--g102-nuit); order: 2; }
html body .g102-dl .stat-card .stat-label { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--g102-muted); order: 1; }
html body .g102-dl .section-card { border: 1px solid #E2E8F0; border-radius: 12px; box-shadow: none; overflow: hidden; background: #fff; }
html body .g102-dl .section-header { background: #F5F7FA !important; color: var(--g102-nuit) !important; border-bottom: 1px solid #E2E8F0; border-left: 4px solid #94A3B8; padding: 10px 14px; display: flex; align-items: center; gap: 10px; }
html body .g102-dl .section-header.departures { border-left-color: #15803D; }
html body .g102-dl .section-header.returns { border-left-color: #B45309; }
html body .g102-dl .section-header i, html body .g102-dl .section-header .section-title { color: var(--g102-nuit) !important; }
html body .g102-dl .section-header .section-title { margin: 0; font-size: 15px; font-weight: 700; }
html body .g102-dl .empty-state { padding: 28px 16px; color: var(--g102-muted); text-align: center; }
html body .g102-dl .empty-state .empty-icon i { color: #94A3B8 !important; font-size: 28px; }
@media (max-width: 767.98px) { html body .g102-dl .stats-grid { grid-template-columns: 1fr; } }
html body .g102-datenav input.date-picker { width: 160px; min-width: 150px; }
html body .g102-exports:not(:has(.export-btn)) { display: none; }
html body .g102-seg .btn-outline-primary { color: var(--g102-nuit); border-color: #B8C4D2; background: #fff; }
html body .g102-seg .btn-outline-primary:hover { background: #EEF3F8; color: var(--g102-nuit); }
html body .g102-seg .btn-check:checked + .btn-outline-primary { background: var(--g102-nuit); border-color: var(--g102-nuit); color: #fff; }
html body .g102-seg .btn-check:checked + .btn-outline-primary i { color: #fff !important; }
html body .g102-seg .btn-check:focus-visible + .btn { outline: 3px solid #93C5FD; outline-offset: 2px; }
html body .g102-dl .operation-list { max-height: min(70vh, 640px); scrollbar-gutter: stable; }

/* ---- 4. Indicateurs (KPI) sobres, puces de filtres actifs, listes classiques G102 ---- */
html body .g102-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 14px; }
html body .g102-kpi { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; background: #fff; border: 1px solid #E2E8F0; border-top: 3px solid #CFDBE8; border-radius: 12px; min-width: 0; }
html body .g102-kpi-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
html body .g102-kpi-label { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--g102-muted); }
html body .g102-kpi-value { font-size: 24px; font-weight: 700; line-height: 1.15; color: var(--g102-nuit); overflow-wrap: anywhere; }
html body .g102-kpi-ico { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; background: #EEF3F8; color: var(--g102-nuit); flex: 0 0 auto; }
html body .g102-kpi-ico i { color: inherit !important; font-size: 15px; }
html body .g102-kpi.is-total { border-top-color: #1A3B5D; }
html body .g102-kpi.is-court { border-top-color: #0C7C95; }
html body .g102-kpi.is-long { border-top-color: #4F46E5; }
html body .g102-kpi.is-montant { border-top-color: #15803D; }
@media (max-width: 1199.98px) { html body .g102-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { html body .g102-kpis { grid-template-columns: 1fr; } }

html body .g102-activefilters { background: #F5F8FC; border: 1px solid #D5E0EE; border-radius: 12px; padding: 10px 14px; margin: 0 0 12px !important; }
html body .g102-af-title { color: var(--g102-nuit); font-size: 13px; }
html body .g102-chip { background: #fff; border: 1px solid #B8C4D2; color: var(--g102-nuit); border-radius: 999px; padding: 4px 6px 4px 12px; font-size: 13px; font-weight: 600; }
html body .g102-chip-x { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; color: #475569; font-size: 16px; line-height: 1; }
html body .g102-chip-x:hover { background: #E2E8F0; color: #0F172A; }
html body .g102-op .container-fluid { padding-left: 0 !important; padding-right: 0 !important; }
html body .g102-op .card { border: 1px solid #E2E8F0; border-radius: 12px; box-shadow: none; }
html body .g102-op .card-header { background: #fff; border-bottom: 1px solid #E2E8F0; }
html body .g102-op #voirImpayesBtn, html body .g102-op #exportExcelBtn { min-height: 34px; display: inline-flex; align-items: center; gap: 6px; border-radius: 8px; font-weight: 600; }
html body .g102-op .filters-active-container.mx-3 { margin-left: 0 !important; margin-right: 0 !important; }

/* ---- 5. Tableaux des listes classiques (operations terminees et pages equivalentes) ---- */
html body .g102-op .table-responsive { border: 1px solid #E2E8F0 !important; border-radius: 10px; margin: 0 14px 14px; width: auto; }
html body .g102-op #operationsTable { table-layout: auto !important; margin: 0; border: 0 !important; }
html body .g102-op #operationsTable thead th { background: #F5F7FA !important; color: #475569 !important; font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; border-bottom: 1px solid #E2E8F0 !important; white-space: nowrap; padding: 10px 10px; }
html body .g102-op #operationsTable thead th a { color: inherit !important; text-decoration: none; }
html body .g102-op #operationsTable tbody td { padding: 10px; border-color: #EDF1F6; vertical-align: middle; }
html body .g102-op #operationsTable tbody td .badge.bg-dark, html body .g102-op #operationsTable tbody td .badge.bg-secondary { background: #EEF3F8 !important; color: #1A3B5D !important; border: 1px solid #D5E0EE; max-width: none !important; overflow: visible !important; text-overflow: clip !important; white-space: nowrap; font-weight: 600; }
html body .g102-op .card-body.p-0 > .table-responsive { margin-top: 12px; }

/* ---- 6. REGLES GENERALES DES MODALES (G102) : titre lisible, bouton X visible, corps defilant, pied d'actions fixe ---- */
html body .modal:not(.g102-keep) .modal-content { border: 0; border-radius: 14px; box-shadow: 0 24px 64px rgba(15, 23, 42, .28); overflow: hidden; }
html body .modal:not(.g102-keep) .modal-dialog:not(.modal-fullscreen) .modal-content { max-height: calc(100vh - 2rem); display: flex; flex-direction: column; }
html body .modal:not(.g102-keep) .modal-header { background: #fff !important; background-image: none !important; color: var(--g102-nuit) !important; border-bottom: 1px solid #E2E8F0; padding: 14px 20px; align-items: center; gap: 12px; flex: 0 0 auto; }
html body .modal:not(.g102-keep) .modal-title { color: var(--g102-nuit) !important; font-size: 18px; font-weight: 700; line-height: 1.3; margin: 0; }
html body .modal:not(.g102-keep) .modal-title i, html body .modal:not(.g102-keep) .modal-title svg { color: var(--g102-nuit) !important; opacity: 1; }
html body .modal:not(.g102-keep) .modal-header .btn-close, html body .modal:not(.g102-keep) .modal-header .close { filter: none !important; opacity: 1 !important; width: 34px; height: 34px; padding: 0; margin: 0 0 0 auto; flex: 0 0 auto; border-radius: 8px; background-color: #F1F5F9; background-size: 12px; border: 1px solid transparent; color: #0F172A; }
html body .modal:not(.g102-keep) .modal-header .btn-close:hover, html body .modal:not(.g102-keep) .modal-header .close:hover { background-color: #E2E8F0; }
html body .modal:not(.g102-keep) .modal-header .btn-close:focus-visible { outline: 3px solid #93C5FD; outline-offset: 2px; box-shadow: none; }
html body .modal:not(.g102-keep) .modal-dialog:not(.modal-fullscreen) .modal-body { overflow-y: auto; flex: 1 1 auto; min-height: 0; }
html body .modal:not(.g102-keep) .modal-footer { flex: 0 0 auto; background: #fff; border-top: 1px solid #E2E8F0; padding: 12px 20px; gap: 8px; justify-content: flex-end; align-items: center; }
html body .modal:not(.g102-keep) .modal-footer > * { margin: 0; }
html body .modal:not(.g102-keep) .modal-footer .g102-mf-hint { margin-right: auto; }
@media (max-width: 575.98px) { html body .modal:not(.g102-keep) .modal-dialog:not(.modal-fullscreen) { margin: 8px; } html body .modal:not(.g102-keep) .modal-header, html body .modal:not(.g102-keep) .modal-footer { padding: 12px 14px; } html body .modal:not(.g102-keep) .modal-footer .g102-btn { flex: 1 1 auto; } }

/* ---- 7. Modal « Nouveau dégât de véhicule » ---- */
html body #createDegatModal .modal-header { padding: 14px 22px; }
html body #createDegatModal .modal-body { padding: 18px 22px 8px; background: #FAFBFD; }
html body #createDegatModal .degat-section-header { background: transparent; border: 0; border-bottom: 1px solid #E2E8F0; border-radius: 0; padding: 0 0 8px; margin: 22px 0 14px; font-size: 14px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--g102-nuit); }
html body #createDegatModal .degat-section-header:first-child, html body #createDegatModal form > .degat-section-header:first-of-type { margin-top: 0; }
html body #createDegatModal .form-group { margin-bottom: 14px; }
html body #createDegatModal label, html body #createDegatModal .form-label { font-size: 13px; font-weight: 600; color: #334155; margin-bottom: 4px; }
html body #createDegatModal .form-control, html body #createDegatModal .form-select { min-height: 40px; border-color: #B8C4D2; border-radius: 8px; background-color: #fff; }
html body #createDegatModal .form-control[readonly] { background: #F1F5F9; color: #475569; }
html body #createDegatModal .custom-control-inline, html body #createDegatModal .form-check { margin-right: 18px; }
html body #createDegatModal #dg_damage_schema_container { background: #fff; border: 1px solid #D8E0EA; border-radius: 12px; padding: 12px; }
html body #createDegatModal #dg_zones_resume { font-weight: 600; color: #334155; }
html body #createDegatModal #saveDegatBtn { transform: none; box-shadow: none; background: var(--g102-nuit); border: 1px solid var(--g102-nuit); color: #fff; }
html body #createDegatModal #saveDegatBtn:hover { background: #0F2239; }
html body #createDegatModal #cancelDegatBtn { color: var(--g102-nuit); background: #fff; border: 1px solid #B8C4D2; }
html body #createDegatModal #pieces-a-acheter { font-size: 13px; }
html body #createDegatModal #pieces-a-acheter thead th { background: #F5F7FA; color: #475569; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }

/* ---- 8. Modal « Ajouter / modifier un vehicule » : grand espace de travail structure en sections numerotees ---- */
html body .modal-dialog.g102-ws { max-width: min(1240px, calc(100vw - 32px)); }
html body #vehiculeModal .modal-header { padding: 16px 24px; }
html body #vehiculeModal .modal-body { background: #F5F7FA; padding: 20px 24px; }
html body #vehiculeModal #vehiculeForm { counter-reset: g102sec; }
html body #vehiculeModal #vehiculeForm .row { --bs-gutter-x: 16px; --bs-gutter-y: 16px; margin-left: 0; margin-right: 0; margin-top: 0 !important; margin-bottom: 16px; }
html body #vehiculeModal #vehiculeForm .row:last-child { margin-bottom: 0; }
html body #vehiculeModal #vehiculeForm .row > [class*="col-"]:has(> h6) { background: #fff; border: 1px solid #E2E8F0; border-radius: 12px; padding: 16px 18px 6px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; align-content: start; }
html body #vehiculeModal #vehiculeForm .row > .col-12:has(> h6):not(:has(.form-control)):not(:has(.form-select)) { background: transparent; border: 0; padding: 4px 2px 0; display: block; }
html body #vehiculeModal #vehiculeForm .row > [class*="col-"]:has(> h6) > h6 { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; margin: 0 0 14px !important; padding-bottom: 10px; border-bottom: 1px solid #E2E8F0; font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--g102-nuit) !important; }
html body #vehiculeModal #vehiculeForm .row > [class*="col-"]:has(> h6):not(.col-12) > h6::before { counter-increment: g102sec; content: counter(g102sec); display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--g102-nuit); color: #fff; font-size: 12px; letter-spacing: 0; }
html body #vehiculeModal #vehiculeForm .row > .col-12 > h6 { font-size: 14px; border: 0; padding: 0; margin: 4px 0 2px !important; color: var(--g102-nuit) !important; }
html body #vehiculeModal #vehiculeForm .row > [class*="col-"] > .mb-3 { margin-bottom: 12px !important; min-width: 0; }
html body #vehiculeModal #vehiculeForm .row > [class*="col-"] > .mb-3:has(textarea), html body #vehiculeModal #vehiculeForm .row > [class*="col-"] > .mb-3:has(input[type="file"]), html body #vehiculeModal #vehiculeForm .row > [class*="col-"] > .mb-3:has(.alert), html body #vehiculeModal #vehiculeForm .row > [class*="col-"] > :not(.mb-3):not(h6) { grid-column: 1 / -1; }
html body #vehiculeModal .form-label { font-size: 13px; font-weight: 600; color: #334155; margin-bottom: 4px; }
html body #vehiculeModal .form-control, html body #vehiculeModal .form-select { min-height: 38px; border-color: #B8C4D2; border-radius: 8px; font-size: 14px; }
html body #vehiculeModal .input-group-text { border-color: #B8C4D2; background: #EEF3F8; color: #334155; }
html body #vehiculeModal .modal-footer .btn { min-height: 38px; font-weight: 600; border-radius: 8px; }
html body #vehiculeModal .modal-footer .btn-primary { background: var(--g102-nuit); border-color: var(--g102-nuit); color: #fff; }
html body #vehiculeModal .modal-footer .btn-secondary { background: #fff; border: 1px solid #B8C4D2; color: var(--g102-nuit); }
@media (max-width: 767.98px) { html body #vehiculeModal #vehiculeForm .row > [class*="col-"]:has(> h6) { grid-template-columns: 1fr; } html body #vehiculeModal .modal-body { padding: 12px; } }
html body .form-select { padding-right: 2.25rem; text-overflow: ellipsis; }

/* ---- 9. Page dediee « Nouveau contrat » : le formulaire a huit etapes s'affiche en pleine page (meme partial que la fenetre de la liste) ---- */
html body .g102-ct { padding-bottom: 0; }
html body .g102-ct .g102-head { margin-bottom: 8px; border-bottom: 0; padding-bottom: 0; }
html body.g102-ct-pagemode #contractModal { position: static !important; display: block !important; opacity: 1 !important; overflow: visible !important; background: transparent; z-index: auto; width: auto; height: auto; transform: none; padding: 0 !important; }
html body.g102-ct-pagemode #contractModal.fade, html body.g102-ct-pagemode #contractModal .modal-dialog { transition: none; transform: none !important; }
html body.g102-ct-pagemode #contractModal .modal-dialog { width: auto; max-width: 1280px; height: auto; margin: 0 auto 24px; padding: 0 16px; }
html body.g102-ct-pagemode #contractModal .modal-content { height: auto; max-height: none !important; display: block; border: 1px solid #E2E8F0; border-radius: 14px; box-shadow: none; overflow: visible; }
html body.g102-ct-pagemode #contractModal .modal-header { padding: 12px 20px; border-radius: 14px 14px 0 0; }
html body.g102-ct-pagemode #contractModal .modal-body { overflow: visible !important; max-height: none; padding: 16px 20px 24px; }
html body.g102-ct-pagemode #contractModal .modal-footer { position: sticky; bottom: 0; z-index: 30; border-radius: 0 0 14px 14px; box-shadow: 0 -6px 14px rgba(15, 23, 42, .06); justify-content: space-between; }
html body.g102-ct-pagemode #contractModal .modal-footer .btn { min-height: 38px; font-weight: 600; border-radius: 8px; }
html body.g102-ct-pagemode .modal-backdrop { display: none !important; }
html body.g102-ct-pagemode.modal-open { overflow: auto !important; padding-right: 0 !important; }
html body.g102-ct-pagemode #contractModal .nav-tabs { position: sticky; top: 0; z-index: 25; background: #fff; }
@media (max-width: 767.98px) { html body.g102-ct-pagemode #contractModal .modal-dialog { padding: 0 8px; } html body.g102-ct-pagemode #contractModal .modal-footer { flex-wrap: wrap; gap: 8px; } }
html body.g102-ct-pagemode #contractModal .modal-dialog { max-width: 1248px; padding: 0; }
html body.g102-ct-pagemode #contractModal .modal-title { font-size: 0 !important; display: flex; align-items: center; gap: 8px; }
html body.g102-ct-pagemode #contractModal .modal-title::before { content: "Référence du contrat"; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #475569; }
html body.g102-ct-pagemode #contractModal .modal-title .contract-ref-badge { font-size: 14px; }
html body.g102-ct-pagemode #contractModal .modal-title i { display: none; }
html body footer.gl-ds.gl-foot a, html body footer.gl-foot a { color: rgba(255,255,255,.92) !important; } html body footer.gl-foot a:hover { color: #fff !important; }

/* ---- 10. Boutons « contour / clair » sur surfaces claires : plus jamais de texte blanc sur fond blanc (defaut recense par l'audit G102) ---- */
html body .btn-corporate-outline, html body .btn-corporate-light, html body a.btn-corporate-outline, html body a.btn-corporate-light { background: #fff; color: var(--g102-nuit) !important; border: 1px solid #B8C4D2; }
html body .btn-corporate-outline > i, html body .btn-corporate-light > i { color: inherit !important; }
html body .btn-corporate-outline:hover, html body .btn-corporate-light:hover { background: #EEF3F8; color: var(--g102-nuit) !important; border-color: var(--g102-nuit); }
html body .hero-section .btn-outline-light, html body .card-header .btn-outline-light, html body .card-header-corporate .btn-outline-light, html body .main-container .btn-outline-light { color: var(--g102-nuit); border-color: #B8C4D2; background: #fff; }
html body .main-container .btn-outline-light:hover, html body .main-container .btn-outline-light.active { background: var(--g102-nuit); color: #fff; border-color: var(--g102-nuit); }
html body .hero-section .breadcrumb a, html body .hero-section .breadcrumb a.text-white, html body .hero-section .breadcrumb-item { color: var(--g102-muted) !important; }
html body .hero-section .breadcrumb-item.active { color: var(--g102-nuit) !important; font-weight: 600; }
html body .hero-section .breadcrumb-item + .breadcrumb-item::before { color: #94A3B8; }
html body .modal .btn-corporate-outline, html body .modal .btn-corporate-light { background: #fff; color: var(--g102-nuit) !important; }

/* ---- 11. Pages publiques (CGU, confidentialite, contact) : en-tete compact, plus de grand bandeau degrade ---- */
html body .legal-header, html body .contact-header { background: #fff !important; background-image: none !important; color: var(--g102-nuit) !important; padding: 18px 24px !important; min-height: 0 !important; height: auto !important; border: 1px solid #E2E8F0; border-radius: 12px; box-shadow: none !important; text-align: left; }
html body .legal-header h1, html body .contact-header h1, html body .legal-header h2, html body .contact-header h2 { color: var(--g102-nuit) !important; font-size: 24px !important; font-weight: 700; margin: 0 0 4px; }
html body .legal-header p, html body .contact-header p, html body .legal-header i, html body .contact-header i, html body .legal-header .lead, html body .contact-header .lead { color: var(--g102-muted) !important; font-size: 14px; margin: 0; }
html body .legal-header i, html body .contact-header i { color: var(--g102-nuit) !important; }

/* ---- 12. Ajustements issus de la 2e passe d'audit ---- */
html body .modal:not(.g102-keep) .modal-header .close, html body .modal:not(.g102-keep) .modal-header .close.text-white, html body .modal:not(.g102-keep) .modal-header .close span, html body .modal:not(.g102-keep) .modal-header button.text-white[data-bs-dismiss] { color: #0F172A !important; text-shadow: none; opacity: 1; }
html body .contact-card-header, html body .info-banner { background: #F1F5F9 !important; background-image: none !important; color: var(--g102-nuit) !important; border: 1px solid #D5E0EE; }
html body .contact-card-header *, html body .info-banner * { color: inherit !important; }
/* boutons d'action verts : texte blanc >= 4,5:1 (le vert de marque #7BC043 ne donne que 2,2:1 avec du blanc) */
html body .modal .btn-success, html body .modal .btn-corporate-success, html body .modal .btn-corporate-primary, html body .modal #ct_submit_btn, html body .modal button[type="submit"].btn-success { background: #2F7D32 !important; background-image: none !important; border-color: #2F7D32 !important; color: #fff !important; }
html body .modal .btn-success:hover, html body .modal .btn-corporate-success:hover, html body .modal .btn-corporate-primary:hover { background: #256528 !important; border-color: #256528 !important; }
html body .modal .btn-success i, html body .modal .btn-corporate-success i, html body .modal .btn-corporate-primary i { color: inherit !important; }

/* boutons de fermeture « corporate » (12 vues) : carre gris clair, croix sombre, visible sur en-tete clair */
html body .modal .modal-header .btn-close-corporate, html body .modal .modal-header .btn-close-corporate-white { color: #0F172A !important; background: #F1F5F9 !important; border: 1px solid transparent !important; border-radius: 8px !important; width: 34px; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center; opacity: 1 !important; margin-left: auto; flex: 0 0 auto; }
html body .modal .modal-header .btn-close-corporate:hover, html body .modal .modal-header .btn-close-corporate-white:hover { background: #E2E8F0 !important; }
html body .modal .modal-header .btn-close-corporate i, html body .modal .modal-header .btn-close-corporate-white i { color: inherit !important; }
html body .modal .modal-title-corporate, html body .modal .modal-title-corporate i { color: var(--g102-nuit) !important; }

/* fenetres plein ecran : collees aux bords (plus de marge de 8 px qui depasse de l'ecran) ; bouton principal du pied = bleu nuit de la marque */
html body .modal .modal-dialog.modal-fullscreen { margin: 0 !important; max-width: none; }
html body .modal:not(.g102-keep) .modal-footer .btn-primary { background: var(--g102-nuit) !important; background-image: none !important; border-color: var(--g102-nuit) !important; color: #fff !important; }
html body .modal:not(.g102-keep) .modal-footer .btn-primary:hover { background: #0F2239 !important; border-color: #0F2239 !important; }
/* croix de fermeture : glyphe sombre garanti (certaines modales la dessinaient blanche ou sans image) */
html body .modal:not(.g102-keep) .modal-header .btn-close, html body .modal:not(.g102-keep) .modal-header .btn-close.btn-close-white { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230F172A'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") !important; background-repeat: no-repeat !important; background-position: center !important; background-size: 12px !important; background-color: #F1F5F9; filter: none !important; }

/* ---- 13. Textes blancs restes sur fond clair (relecture visuelle de la page de connexion et de l'en-tete SaaS) ---- */
html body .login-container .subtitle, html body .login-card .subtitle, html body p.subtitle { color: var(--g102-muted) !important; }
/* texte « text-white » pose sur un fond clair : corrige a l'execution par gl-g102.js (classe g102-textfix) — une regle CSS aveugle casserait les en-tetes sombres (fiche client) */
html body .g102-textfix, html body .g102-textfix * { color: var(--g102-nuit) !important; }
