* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    background: #dde3f0;
    color: #1f2733;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.titlebar {
    background: linear-gradient(135deg, #1f3d73, #4a7bd6);
    color: #fff;
    display: flex;
    align-items: center;
    padding: 8px 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,.3);
    gap: 10px;
}

.titlebar .logo {
    width: 30px;
    height: 30px;
    border-radius: 4px;
}

.titlebar h1 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    flex: 1;
    letter-spacing: .3px;
}

.logout-btn {
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.4);
    color: #fff;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background .15s ease;
}

.logout-btn:hover {
    background: rgba(255,255,255,.3);
}

.menubar {
    background: #eef1f8;
    border-bottom: 1px solid #b7c1da;
    display: flex;
    padding: 0 6px;
    user-select: none;
    flex-wrap: wrap;
}

.menu {
    position: relative;
}

.menu-title {
    background: none;
    border: none;
    padding: 9px 16px;
    font-size: 13px;
    cursor: pointer;
    color: #1f2733;
    transition: background .12s ease, color .12s ease;
}

.menu-title:hover,
.menu.open > .menu-title {
    background: #4a7bd6;
    color: #fff;
    border-radius: 3px 3px 0 0;
}

.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 250px;
    background: #fff;
    border: 1px solid #b7c1da;
    border-radius: 0 0 4px 4px;
    box-shadow: 2px 6px 12px rgba(0,0,0,.2);
    list-style: none;
    margin: 0;
    padding: 4px 0;
    z-index: 50;
}

.menu.open > .dropdown {
    display: block;
}

.dropdown li {
    padding: 7px 18px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    transition: background .1s ease, color .1s ease;
}

.dropdown li:hover {
    background: #4a7bd6;
    color: #fff;
}

.dropdown li:hover > .submenu,
.has-submenu.submenu-open > .submenu {
    display: block;
}

.submenu {
    top: -5px;
    left: 100%;
}

.has-submenu::after {
    content: " \25B8";
    float: right;
    margin-left: 12px;
}

.workspace {
    flex: 1;
    background: #c3cce3;
    background-image:
        linear-gradient(rgba(255,255,255,.35) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.35) 1px, transparent 1px);
    background-size: 24px 24px;
    position: relative;
    overflow: auto;
    padding: 16px;
}

.workspace-hint {
    color: #46587d;
    font-style: italic;
}

.window {
    position: absolute;
    min-width: 320px;
    min-height: 180px;
    background: #fff;
    border: 1px solid #7a8bb0;
    border-radius: 6px;
    box-shadow: 4px 6px 16px rgba(0,0,0,.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.window-titlebar {
    background: linear-gradient(135deg, #1f3d73, #4a7bd6);
    color: #fff;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
}

.window-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 3px;
    transition: background .12s ease;
}

.window-close:hover {
    background: #d9534f;
}

.window-body {
    padding: 14px;
    overflow: auto;
    flex: 1;
}

.window-body h3 {
    margin-top: 0;
    color: #1f3d73;
}

/* --- Recherche Technique --- */
.search-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.tech-search {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #b7c1da;
    border-radius: 4px;
    font-size: 13px;
}

.tech-search-btn {
    padding: 6px 16px;
    background: #4a7bd6;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: background .12s ease;
}

.tech-search-btn:hover {
    background: #1f3d73;
}

.tech-results {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

.tech-results th {
    background: #eef1f8;
    border-bottom: 2px solid #b7c1da;
    text-align: left;
    padding: 6px 8px;
    color: #1f3d73;
}

.tech-results td {
    padding: 6px 8px;
    border-bottom: 1px solid #e3e7f0;
}

.tech-results tbody tr:hover td {
    background: #f3f6fd;
}

.tech-empty {
    text-align: center;
    color: #777;
    font-style: italic;
    padding: 14px !important;
}

/* --- Recherche Commercial --- */
.com-layout {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.com-col {
    flex: 1;
    min-width: 0;
}

.com-col h4 {
    margin: 0 0 8px;
    font-size: 13px;
    color: #1f3d73;
    border-bottom: 1px solid #e3e7f0;
    padding-bottom: 4px;
}

.com-results,
.com-offer,
.com-history {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-bottom: 8px;
}

.com-results th,
.com-offer th,
.com-history th {
    background: #eef1f8;
    border-bottom: 2px solid #b7c1da;
    text-align: left;
    padding: 5px 6px;
    color: #1f3d73;
}

.com-results td,
.com-offer td,
.com-history td {
    padding: 5px 6px;
    border-bottom: 1px solid #e3e7f0;
}

.com-results tbody tr {
    cursor: pointer;
}

.com-results tbody tr:hover td {
    background: #f3f6fd;
}

.com-add-all-btn,
.com-add-one-btn {
    padding: 6px 14px;
    background: #4a7bd6;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 12.5px;
    cursor: pointer;
    transition: background .12s ease;
}

.com-add-all-btn:hover,
.com-add-one-btn:hover {
    background: #1f3d73;
}

.com-add-all-btn:disabled {
    background: #b7c1da;
    cursor: not-allowed;
}

.com-detail-title {
    font-weight: 600;
    color: #1f3d73;
    margin: 0 0 6px;
}

.com-detail-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px 10px;
    font-size: 12.5px;
    margin: 8px 0;
}

.com-detail-grid dt {
    color: #6b7a99;
    font-weight: 600;
}

.com-detail-grid dd {
    margin: 0;
}

.com-detail-tech {
    font-size: 12px;
    background: #f5f7fc;
    border: 1px solid #e3e7f0;
    border-radius: 4px;
    padding: 8px;
}

.com-detail h5 {
    font-size: 12.5px;
    color: #1f3d73;
    margin: 10px 0 6px;
}

.com-offer-remove {
    background: none;
    border: none;
    color: #c0392b;
    font-size: 14px;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}

.com-offer-total {
    font-weight: 600;
    text-align: right;
    color: #1f3d73;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-right: 6px;
}

.badge-ok {
    background: #e3f5e9;
    color: #1e7e44;
}

.badge-off {
    background: #f0f1f4;
    color: #6b7a99;
}

.badge-alert {
    background: #fdecea;
    color: #c0392b;
}

/* --- Lancement des OF --- */
.of-layout {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.of-col-ca {
    flex: 2;
}

.of-col-nonimp {
    flex: 1;
}

.of-title {
    font-size: 12.5px;
    font-weight: 700;
    font-style: italic;
    color: #1f3d73;
    margin: 0 0 8px;
}

.of-ca {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-bottom: 6px;
}

.of-ca th {
    background: #eef1f8;
    border-bottom: 2px solid #b7c1da;
    text-align: left;
    padding: 5px 6px;
    color: #1f3d73;
}

.of-ca td {
    padding: 5px 6px;
    border-bottom: 1px solid #e3e7f0;
}

.of-select-all {
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    font-style: italic;
    color: #4a7bd6;
    cursor: pointer;
    margin: 4px 0 10px;
}

.of-select-all:hover {
    text-decoration: underline;
}

.of-print-btn,
.of-print-nonimp-btn {
    width: 100%;
    padding: 8px;
    background: #4a7bd6;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 12.5px;
    cursor: pointer;
    transition: background .12s ease;
}

.of-print-btn:hover,
.of-print-nonimp-btn:hover {
    background: #1f3d73;
}

.of-print-nonimp-btn:disabled {
    background: #b7c1da;
    cursor: not-allowed;
}

.of-nonimp-list {
    list-style: none;
    margin: 0 0 10px;
    padding: 0;
    font-size: 12px;
    min-height: 60px;
    border: 1px solid #e3e7f0;
    border-radius: 4px;
    background: #f5f7fc;
}

.of-nonimp-list li {
    padding: 4px 8px;
    border-bottom: 1px solid #e3e7f0;
}

.of-nonimp-list li:last-child {
    border-bottom: none;
}

.of-rapport {
    margin-top: 14px;
    border-top: 1px solid #e3e7f0;
    padding-top: 10px;
}

.of-rapport h4 {
    margin: 0 0 6px;
    font-size: 13px;
    color: #1f3d73;
}

.of-rapport-item {
    margin-bottom: 12px;
}

.of-rapport-ref {
    font-weight: 700;
    font-size: 12.5px;
    margin: 0 0 4px;
}

.of-defauts {
    width: 100%;
    border-collapse: collapse;
    font-size: 11.5px;
}

.of-defauts th {
    background: #eef1f8;
    border-bottom: 2px solid #b7c1da;
    text-align: left;
    padding: 4px 6px;
    color: #1f3d73;
}

.of-defauts td {
    padding: 4px 6px;
    border-bottom: 1px solid #e3e7f0;
}

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,25,50,.5);
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: #fff;
    padding: 24px 32px;
    border-radius: 6px;
    text-align: center;
    min-width: 260px;
    box-shadow: 0 8px 24px rgba(0,0,0,.4);
}

.modal h2 {
    margin-top: 0;
    font-size: 16px;
    color: #1f3d73;
}

.modal-title {
    font-weight: 600;
}

.modal button {
    margin-top: 12px;
    padding: 7px 26px;
    background: #4a7bd6;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background .12s ease;
}

.modal button:hover {
    background: #1f3d73;
}

/* --- Gestion des plans --- */
.gp-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: #1f3d73;
    margin-bottom: 6px;
}

.gp-ref {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #b7c1da;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 12px;
}

.gp-pieces {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
    margin-bottom: 12px;
}

.gp-pieces th {
    background: #eef1f8;
    border-bottom: 2px solid #b7c1da;
    text-align: left;
    padding: 6px 8px;
    color: #1f3d73;
}

.gp-pieces td {
    padding: 6px 8px;
    border-bottom: 1px solid #e3e7f0;
}

.gp-row {
    cursor: pointer;
}

.gp-row:hover td {
    background: #f3f6fd;
}

.gp-row-selected td {
    background: #dde7fb;
}

.gp-supprimer {
    padding: 7px 18px;
    background: #c0392b;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 12.5px;
    cursor: pointer;
    transition: background .12s ease;
}

.gp-supprimer:hover:not(:disabled) {
    background: #962d22;
}

.gp-supprimer:disabled {
    background: #b7c1da;
    cursor: not-allowed;
}

/* --- Suppression piece / machine --- */
.spm-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: #1f3d73;
    margin-bottom: 6px;
}

.spm-constructeur,
.spm-machine {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #b7c1da;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 12px;
}

.spm-machine:disabled,
.spm-constructeur:disabled {
    background: #f0f1f4;
    cursor: not-allowed;
}

.spm-pieces {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
    margin-bottom: 12px;
}

.spm-pieces th {
    background: #eef1f8;
    border-bottom: 2px solid #b7c1da;
    text-align: left;
    padding: 6px 8px;
    color: #1f3d73;
}

.spm-pieces td {
    padding: 6px 8px;
    border-bottom: 1px solid #e3e7f0;
}

.spm-row {
    cursor: pointer;
}

.spm-row:hover td {
    background: #f3f6fd;
}

.spm-row-selected td {
    background: #dde7fb;
}

.spm-supprimer {
    padding: 7px 18px;
    background: #c0392b;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 12.5px;
    cursor: pointer;
    transition: background .12s ease;
}

.spm-supprimer:hover:not(:disabled) {
    background: #962d22;
}

.spm-supprimer:disabled {
    background: #b7c1da;
    cursor: not-allowed;
}

/* --- Recherche Site & Parc Machines --- */
.site-layout {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.site-col {
    flex: 1;
    min-width: 0;
}

.site-fieldset {
    border: 1px solid #b7c1da;
    border-radius: 4px;
    padding: 10px;
    margin: 0 0 10px;
}

.site-fieldset legend {
    font-size: 12px;
    font-weight: 700;
    font-style: italic;
    color: #1f3d73;
    padding: 0 4px;
}

.site-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: #1f3d73;
    margin: 8px 0 4px;
}

.site-radio-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12.5px;
    margin: 6px 0;
}

.site-ref,
.site-pays,
.site-site,
.site-nommach {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #b7c1da;
    border-radius: 4px;
    font-size: 13px;
}

.site-pays {
    width: auto;
    flex: 1;
}

.site-pays:disabled {
    background: #f0f1f4;
    cursor: not-allowed;
}

.site-rechercher-btn,
.site-info-btn {
    padding: 6px 16px;
    background: #4a7bd6;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 12.5px;
    cursor: pointer;
    margin-top: 8px;
    transition: background .12s ease;
}

.site-rechercher-btn:hover,
.site-info-btn:hover {
    background: #1f3d73;
}

.site-resultat {
    font-size: 12.5px;
    font-weight: 700;
    font-style: italic;
    color: #1f3d73;
    margin: 8px 0;
}

.site-results {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.site-results th {
    background: #eef1f8;
    border-bottom: 2px solid #b7c1da;
    text-align: left;
    padding: 5px 6px;
    color: #1f3d73;
}

.site-results td {
    padding: 5px 6px;
    border-bottom: 1px solid #e3e7f0;
}

.site-detail-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px 10px;
    font-size: 12.5px;
    margin: 8px 0 0;
}

.site-detail-grid dt {
    color: #6b7a99;
    font-weight: 600;
}

.site-detail-grid dd {
    margin: 0;
}

.site-tree-header {
    display: flex;
    gap: 14px;
    font-size: 12px;
    font-weight: 700;
    font-style: italic;
    color: #4a7bd6;
    cursor: pointer;
    margin-bottom: 6px;
}

.site-tree-header span:hover {
    text-decoration: underline;
}

.site-tree {
    border: 1px solid #e3e7f0;
    border-radius: 4px;
    background: #f5f7fc;
    padding: 6px 10px;
    font-size: 12px;
    max-height: 320px;
    overflow: auto;
}

.site-tree-node {
    margin: 2px 0 2px 14px;
}

.site-tree-node > summary {
    cursor: pointer;
    color: #1f3d73;
    font-weight: 600;
}

.site-tree-leaf {
    margin: 2px 0 2px 28px;
    color: #46587d;
}

/* --- Statistiques globales --- */
.stats-title {
    margin-top: 0;
}

.stats-criteres {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.stats-criteres > div {
    flex: 1;
}

.stats-criteres select {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #b7c1da;
    border-radius: 4px;
    font-size: 13px;
}

.stats-periode {
    font-size: 12.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stats-periode input {
    width: 90px;
    padding: 5px 8px;
    border: 1px solid #b7c1da;
    border-radius: 4px;
    font-size: 12.5px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.stats-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
}

.stats-label {
    font-size: 12px;
    font-weight: 700;
    color: #1f3d73;
}

.stats-value {
    background: #fff;
    border: 1px solid #b7c1da;
    border-radius: 4px;
    padding: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #1f2733;
}

.stats-afficher-btn {
    padding: 7px 18px;
    background: #4a7bd6;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 12.5px;
    cursor: pointer;
    transition: background .12s ease;
}

.stats-afficher-btn:hover {
    background: #1f3d73;
}

.stats-extra {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.stats-meilleurs,
.stats-piece-plus {
    flex: 1;
}

.stats-mc-label {
    font-size: 12px;
    font-weight: 700;
    font-style: italic;
    color: #1f3d73;
    margin: 8px 0 4px;
}

.stats-mc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-bottom: 4px;
}

.stats-piece-table th {
    background: #eef1f8;
    border-bottom: 2px solid #b7c1da;
    text-align: left;
    padding: 5px 6px;
    color: #1f3d73;
}

.stats-mc-table td {
    padding: 5px 6px;
    border-bottom: 1px solid #e3e7f0;
}

/* --- Bordereau masse (frm_bordereau) --- */
.bor-layout {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.bor-criteres {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bor-piece {
    min-width: 160px;
}

.bor-ok-btn {
    background: #1f3d73;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px 14px;
    cursor: pointer;
}

.bor-ok-btn:hover {
    background: #4a7bd6;
}

.bor-apercu {
    border: 1px solid #b7c1da;
    border-radius: 4px;
    padding: 12px;
    background: #fff;
}

.bor-bordereau h3 {
    margin-top: 0;
    color: #1f3d73;
}

.bor-bordereau h4 {
    color: #1f3d73;
    margin-bottom: 6px;
}

/* --- Ajout d'une piece Manoir Industries (frm_insertpiecesmanid) --- */
.ins-layout {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ins-dims {
    display: flex;
    gap: 16px;
}

.ins-dims > div {
    flex: 1;
}

.ins-rens {
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
}

.ins-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ins-valider-btn {
    background: #1f3d73;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px 18px;
    cursor: pointer;
}

.ins-valider-btn:hover {
    background: #4a7bd6;
}

.ins-message {
    color: #c0392b;
    font-size: 0.9em;
}

.is-message {
    color: #c0392b;
    font-size: 0.9em;
}

.is-message-ok {
    color: #2e7d32;
}

/* --- Ajout piece concurrent et prix concurrent (frm_insertpiecesconcurrent) --- */
.concu-constructeur-label {
    display: block;
    margin-top: 10px;
}

.concu-date-row {
    display: flex;
    gap: 8px;
}

.concu-valider-btn {
    background: #1f3d73;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px 18px;
    cursor: pointer;
}

.concu-valider-btn:hover:not(:disabled) {
    background: #4a7bd6;
}

.concu-valider-btn:disabled {
    background: #b7c1da;
    cursor: not-allowed;
}

/* --- Ajout d'un plan (frm_insert_plant) --- */
.plan-info {
    color: #1f3d73;
    font-weight: bold;
    font-size: 0.9em;
    margin: 0;
}

/* --- Ajout piece MISB a partir d'un plan (frm_MAJ_plan) --- */
.maj-top {
    display: flex;
    gap: 16px;
}

.maj-top > div {
    flex: 1;
}

.maj-dims-poids {
    display: flex;
    gap: 16px;
}

.maj-dims-poids > fieldset {
    flex: 1;
}

.maj-poids-row {
    display: flex;
    gap: 16px;
}

.maj-poids-row > div {
    flex: 1;
}

.ajm-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ajm-actions {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ajm-message, .ajm-message2 {
    font-size: 13px;
    color: #1f3d73;
}

.ipm-layout {
    display: flex;
    gap: 16px;
    height: 100%;
}

.ipm-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ipm-list-col {
    flex: 1.3;
}

.ipm-actions {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ipm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.ipm-table th, .ipm-table td {
    border: 1px solid #b9c6dd;
    padding: 4px 6px;
    text-align: left;
}

.ipm-table th {
    background: #e3ebf8;
    color: #1f3d73;
}

.ipm-piece-panel[disabled] {
    opacity: 0.55;
}

.agt-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.agt-row {
    display: flex;
    gap: 16px;
}

.agt-row > div {
    flex: 1;
}

.agt-cols {
    display: flex;
    gap: 16px;
}

.agt-cols > fieldset {
    flex: 1;
}

.agt-actions {
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
}

.ams-layout {
    display: flex;
    gap: 16px;
    height: 100%;
}

.ams-col {
    flex: 1.3;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
}

.ams-tree-col {
    flex: 1;
}

.ams-grb[disabled] {
    opacity: 0.45;
}

.ams-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.ams-site-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ams-site-fields > div {
    flex: 1 1 45%;
}

.ams-actions {
    margin-top: 4px;
    display: flex;
    justify-content: flex-end;
}

.ams-tree {
    font-size: 13px;
}

.ams-tree ul {
    list-style: none;
    padding-left: 16px;
}

.ams-tree-root {
    padding-left: 0;
}

.ams-tree li {
    margin: 4px 0;
}

.pmc-row {
    display: flex;
    gap: 16px;
    margin-top: 12px;
}

.pmc-row > div {
    flex: 1;
}

.pmc-liste {
    width: 100%;
}

.pmc-actions {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
}

.mms-layout {
    display: flex;
    gap: 16px;
    height: 100%;
}

.mms-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
}

.mms-site-fieldset[disabled] {
    opacity: 0.55;
}

.mms-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.mms-table th, .mms-table td {
    border: 1px solid #c9d6ef;
    padding: 4px 6px;
    text-align: left;
}

.mms-table th {
    background: #e3ebf8;
    color: #1f3d73;
}

.mms-table tbody tr:not(.tech-empty-row):hover {
    background: #f0f5ff;
    cursor: pointer;
}

/* --- Connexion --- */
.login-modal {
    min-width: 320px;
    text-align: left;
}

.login-modal h2 {
    text-align: center;
}

#loginForm {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#loginForm label {
    font-size: 12.5px;
    font-weight: 600;
    color: #1f3d73;
    margin-top: 8px;
}

#loginForm input {
    padding: 7px 10px;
    border: 1px solid #b7c1da;
    border-radius: 4px;
    font-size: 13px;
}

#loginForm input:focus {
    outline: 2px solid #4a7bd6;
    border-color: #4a7bd6;
}

.login-error {
    color: #c0392b;
    background: #fdecea;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 12.5px;
    margin: 10px 0 0;
}

.login-buttons {
    display: flex;
    justify-content: center;
}

.login-buttons button {
    width: 100%;
}

.login-hint {
    margin: 14px 0 0;
    font-size: 11px;
    color: #6b7a99;
    text-align: center;
    line-height: 1.5;
}
