*,*::before,*::after { box-sizing:border-box;margin:0;padding:0; }
html,body { height:100%; }
body { background:#ffffff; }

.adm-banner { background: #fd6e41; padding: 8px 18px; font-size: 12px; color: #fff; font-weight: 600; text-align: center; flex-shrink: 0; }
.nb-bar { display: flex; align-items: center; justify-content: space-around; padding: 12px 8px 8px; background: #ffffff; border-bottom: 1px solid #e0e0e0; flex-shrink: 0; }
.nb-tab { display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: none; cursor: pointer; padding: 4px 16px; font-family: inherit; color: #989184; text-decoration: none; transition: color 0.12s; }
.nb-tab:hover, .nb-tab-active { color: #437d76; }
.nb-label { font-size: 11px; font-weight: 600; }

.tf-body { flex: 1; overflow-y: auto; padding: 20px 18px 36px; }
.tf-title { font-size: 20px; font-weight: 700; color: #437d76; margin-bottom: 6px; }
.tf-subtitle { font-size: 13px; color: #989184; margin-bottom: 18px; line-height: 1.5; }
.tf-section-title { font-size: 14px; font-weight: 700; color: #437d76; margin-bottom: 12px; }
.tf-block { margin-bottom: 16px; }
.tf-sub-label { font-size: 12px; font-weight: 600; color: #437d76; margin-bottom: 8px; }
.tf-chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.tf-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 4px; font-size: 12px; font-weight: 500; }
.tf-chip-active { font-weight: 700; }
.tf-chip-sq { width: 9px; height: 9px; border-radius: 2px; flex-shrink: 0; }
.tf-divider { height: 1px; background: #e0e0e0; margin: 16px 0; border: none; }
.tf-self-row { display: flex; align-items: baseline; gap: 6px; margin-bottom: 5px; font-size: 11px; line-height: 1.4; }
.tf-self-sq { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; margin-top: 2px; }
.tf-motiv-group { margin-bottom: 12px; }
.tf-motiv-header { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.tf-motiv-header-sq { width: 8px; height: 8px; border-radius: 2px; }
.tf-motiv-header-label { font-size: 10px; font-weight: 700; }
.tf-motiv-row { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.tf-motiv-name { font-size: 10px; font-weight: 500; color: #222428; min-width: 90px; flex-shrink: 0; }
.tf-motiv-bar-wrap { flex: 1; display: flex; align-items: center; gap: 4px; }
.tf-motiv-track { flex: 1; height: 10px; background: #e0e0e066; border-radius: 3px; overflow: hidden; }
.tf-motiv-fill { height: 100%; border-radius: 3px; }
.tf-motiv-count { font-size: 10px; font-weight: 700; color: #222428; min-width: 14px; text-align: right; }
.tf-hbar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.tf-hbar-dot { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.tf-hbar-label { font-size: 12px; color: #222428; font-weight: 500; min-width: 50px; }
.tf-hbar-track { flex: 1; height: 18px; background: #e0e0e066; border-radius: 4px; overflow: hidden; }
.tf-hbar-fill { height: 100%; border-radius: 4px; opacity: .85; }
.tf-hbar-count { font-size: 12px; font-weight: 700; color: #222428; min-width: 18px; text-align: right; }

.adm-screen,.tf-screen,.xe-screen { font-family:'DM Sans','Segoe UI',system-ui,sans-serif; display:flex; flex-direction:column; min-height:100%; background:#fff; color:#222428 }

/* ── Desktop centering ── */
body { background:#e8eaed; display:flex; justify-content:center; align-items:flex-start; min-height:100%; padding:0 }
.qfb-frame { width:100%; max-width:1024px; min-height:100vh; background:#fff; box-shadow:0 0 40px rgba(0,0,0,.12); display:flex; flex-direction:column; position:relative }

input[type="submit"], button { max-width: 100%; }

.jconfirm-buttons .btn-primary, .jconfirm-buttons .btn-danger {
    color: #fff;
    background-color: #437d76;
    border-color: #357ebd;
}

.msg-header {
    background: #f65320;
    padding: 8px 18px;
    font-size: 13px;
    color: #fff;
    font-weight: 600;
    text-align: center;
    flex-shrink: 0;
}

/*  Disable link text decoration for hover */
a.dm-btn-accent:hover {
    color: #fff;
    text-decoration: none;
}

a.pc-card:hover, a.pc-mgr-btn {
    text-decoration: none;
}

/* ============================================================
   ── Messages d'erreur et de succès modernisés ──
   ============================================================ */
.cs-error-msg, .cs-success-msg {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    margin: 15px auto;
    max-width: 480px;
    width: calc(100% - 10px);
    box-sizing: border-box;
    line-height: 1.4;
}

/* Style spécifique pour Erreur */
.cs-error-msg {
    background-color: #fdf3f2;
    color: #d9383a;
    border: 1px solid rgba(217, 56, 58, 0.15);
}
.cs-error-msg .cs-msg-icon::before {
    content: "⚠️";
    font-size: 15px;
}

/* Style spécifique pour Succès */
.cs-success-msg {
    background-color: rgba(67, 125, 118, 0.06);
    color: #437d76;
    border: 1px solid rgba(67, 125, 118, 0.15);
}
.cs-success-msg .cs-msg-icon::before {
    content: "✓";
    font-size: 16px;
    font-weight: bold;
}

.jconfirm.jconfirm-white .jconfirm-box, .jconfirm.jconfirm-light .jconfirm-box {
    border-radius: 16px;
    max-width: 320px;
    width: 100%;
    min-width: 307px;
}

.jconfirm .jconfirm-box-container {
    position: absolute;
    inset: 0;
    /*background: rgba(0,0,0,0.45);*/
    display: grid;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 24px;
}

.jconfirm .btn-primary.vconfirm-ok {
    background: #eb445a !important;
    color: #ffffff !important;
    padding: 10px 0 !important;
    border: none !important;
    border-radius: 10px !important;
}

.jconfirm .btn-default.vconfirm-cancel {
    background: transparent !important;
    color: #437d76 !important;
    border: 2px solid #437d76 !important;
    border-radius: 10px !important;
    text-transform: none !important;
}

/* ── Common CSS ── */
.xe-screen { font-family: 'DM Sans','Segoe UI',system-ui,sans-serif; display: flex; flex-direction: column; min-height: 100%; background: #ffffff; color: #222428; }
.xe-body { flex: 1; overflow-y: auto; padding: 20px 18px 36px; }
