/* ============================================================
   MarketingThrive — Frontend CSS complet
   Layout : Sidebar gauche + Contenu principal
   Design inspiré de l'image de référence (Sphère Santé)
   ============================================================ */

/* ---------- Variables ---------- */
:root {
    --mt-bg:            #eef2f7;
    --mt-white:         #ffffff;
    --mt-sidebar-w:     240px;
    --mt-primary:       #2563EB;
    --mt-primary-light: #EFF6FF;
    --mt-primary-dark:  #1d4ed8;
    --mt-green:         #16A34A;
    --mt-green-light:   #F0FDF4;
    --mt-orange:        #D97706;
    --mt-orange-light:  #FFFBEB;
    --mt-red:           #DC2626;
    --mt-red-light:     #FEF2F2;
    --mt-text:          #1e293b;
    --mt-text-soft:     #64748b;
    --mt-border:        #e2e8f0;
    --mt-shadow:        0 2px 12px rgba(0,0,0,.07);
    --mt-shadow-md:     0 4px 20px rgba(0,0,0,.10);
    --mt-radius:        14px;
    --mt-radius-sm:     8px;
    --mt-font:          -apple-system,'Inter',BlinkMacSystemFont,'Segoe UI',sans-serif;
}

/* ---------- Reset scope ---------- */
.mt-app *,
.mt-app *::before,
.mt-app *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ============================================================
   LAYOUT PRINCIPAL
   ============================================================ */
.mt-app {
    font-family: var(--mt-font);
    color: var(--mt-text);
    display: flex;
    min-height: 700px;
    background: var(--mt-bg);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,.12);
    position: relative;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.mt-sidebar {
    width: var(--mt-sidebar-w);
    min-width: var(--mt-sidebar-w);
    background: var(--mt-white);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--mt-border);
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

/* Logo */
.mt-sidebar-logo {
    padding: 22px 20px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--mt-border);
    text-decoration: none;
}
.mt-sidebar-logo-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--mt-primary) 0%, #60a5fa 100%);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.mt-sidebar-logo-icon svg { width: 20px; height: 20px; color: #fff; }
.mt-sidebar-logo-text { line-height: 1.2; }
.mt-sidebar-logo-text strong {
    display: block; font-size: 15px; font-weight: 800;
    color: var(--mt-text); letter-spacing: -.02em;
}
.mt-sidebar-logo-text span {
    font-size: 11px; color: var(--mt-text-soft); font-weight: 500;
}

/* Navigation */
.mt-sidebar-nav {
    flex: 1;
    padding: 14px 12px;
    overflow-y: auto;
}
.mt-nav-section {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .08em; color: var(--mt-text-soft);
    padding: 10px 8px 6px; margin-top: 8px;
}
.mt-nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--mt-text-soft);
    font-size: 14px; font-weight: 500;
    transition: all .18s;
    margin-bottom: 2px;
    position: relative;
    cursor: pointer;
    border: none; background: none; width: 100%; text-align: left;
}
.mt-nav-item svg { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 2; }
.mt-nav-item:hover { background: var(--mt-bg); color: var(--mt-text); }
.mt-nav-item.active {
    background: var(--mt-primary-light);
    color: var(--mt-primary);
    font-weight: 600;
}
.mt-nav-item.active svg { stroke: var(--mt-primary); }
.mt-nav-badge {
    margin-left: auto;
    background: var(--mt-primary);
    color: #fff; font-size: 10px; font-weight: 700;
    min-width: 18px; height: 18px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 5px;
}

/* User block */
.mt-sidebar-user {
    padding: 14px 16px;
    border-top: 1px solid var(--mt-border);
    display: flex; align-items: center; gap: 10px;
}
.mt-sidebar-user-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--mt-primary);
    color: #fff; font-weight: 700; font-size: 14px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.mt-sidebar-user-info { flex: 1; overflow: hidden; }
.mt-sidebar-user-name { font-size: 13px; font-weight: 600; color: var(--mt-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-sidebar-user-role { font-size: 11px; color: var(--mt-text-soft); }

/* ============================================================
   CONTENU PRINCIPAL
   ============================================================ */
.mt-content {
    flex: 1;
    overflow-y: auto;
    background: var(--mt-bg);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Header de page */
.mt-content-header {
    background: var(--mt-white);
    border-bottom: 1px solid var(--mt-border);
    padding: 18px 28px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap;
    position: sticky; top: 0; z-index: 5;
}
.mt-content-header h1 {
    font-size: 22px !important; font-weight: 700 !important;
    color: var(--mt-text) !important; margin: 0 !important;
    padding: 0 !important; border: none !important; line-height: 1.2 !important;
}
.mt-content-header .mt-header-sub {
    font-size: 13px; color: var(--mt-text-soft); margin-top: 2px;
}
.mt-content-header .mt-header-actions { display: flex; align-items: center; gap: 10px; }

/* Zone scrollable */
.mt-content-body { padding: 24px 28px 40px; flex: 1; }

/* ============================================================
   MURAL D'ACCÈS
   ============================================================ */
.mt-login-wall {
    display: flex; align-items: center; justify-content: center;
    min-height: 400px; background: var(--mt-bg); border-radius: 18px;
}
.mt-login-box {
    background: var(--mt-white); border-radius: var(--mt-radius);
    box-shadow: var(--mt-shadow-md); padding: 48px 40px; text-align: center; max-width: 380px;
}
.mt-login-box svg { width: 52px; height: 52px; opacity: .22; margin-bottom: 14px; display: block; margin: 0 auto 14px; }
.mt-login-box h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; color: var(--mt-text); }
.mt-login-box p  { font-size: 14px; color: var(--mt-text-soft); margin-bottom: 20px; line-height: 1.5; }
.mt-login-box a  {
    display: inline-block; background: var(--mt-primary); color: #fff;
    padding: 10px 24px; border-radius: var(--mt-radius-sm); font-weight: 600;
    text-decoration: none; font-size: 14px; transition: background .2s;
}
.mt-login-box a:hover { background: var(--mt-primary-dark); }

/* ============================================================
   KPI CARDS
   ============================================================ */
.mt-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px; margin-bottom: 22px;
}
@media (max-width: 1100px) { .mt-kpi-row { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 520px)  { .mt-kpi-row { grid-template-columns: 1fr 1fr; } }

.mt-kpi {
    background: var(--mt-white); border-radius: var(--mt-radius);
    padding: 20px 20px 14px; box-shadow: var(--mt-shadow);
    position: relative; overflow: hidden; min-height: 118px;
    transition: transform .2s, box-shadow .2s;
}
.mt-kpi:hover { transform: translateY(-2px); box-shadow: var(--mt-shadow-md); }
.mt-kpi-title  { font-size: 12px; font-weight: 700; color: var(--mt-text-soft); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.mt-kpi-value  { font-size: 40px; font-weight: 800; line-height: 1; margin-bottom: 5px; }
.mt-kpi-label  { font-size: 12px; color: var(--mt-text-soft); }
.mt-kpi-blob   { position: absolute; bottom:0; right:0; width:110px; height:65px; opacity:.13; pointer-events:none; }
.mt-kpi.blue   .mt-kpi-value { color: var(--mt-primary); }
.mt-kpi.blue   .mt-kpi-blob  { background: radial-gradient(ellipse at bottom right, var(--mt-primary) 0%, transparent 70%); }
.mt-kpi.green  .mt-kpi-value { color: var(--mt-green); }
.mt-kpi.green  .mt-kpi-blob  { background: radial-gradient(ellipse at bottom right, var(--mt-green) 0%, transparent 70%); }
.mt-kpi.orange .mt-kpi-value { color: var(--mt-orange); }
.mt-kpi.orange .mt-kpi-blob  { background: radial-gradient(ellipse at bottom right, var(--mt-orange) 0%, transparent 70%); }
.mt-kpi.red    .mt-kpi-value { color: var(--mt-red); }
.mt-kpi.red    .mt-kpi-blob  { background: radial-gradient(ellipse at bottom right, var(--mt-red) 0%, transparent 70%); }

/* ============================================================
   GRID LAYOUTS
   ============================================================ */
.mt-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.mt-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; margin-bottom: 18px; }
@media (max-width: 900px) { .mt-grid-2,.mt-grid-3 { grid-template-columns: 1fr; } }

/* ============================================================
   CARDS
   ============================================================ */
.mt-card {
    background: var(--mt-white); border-radius: var(--mt-radius);
    box-shadow: var(--mt-shadow); overflow: hidden;
}
.mt-card-head {
    padding: 16px 20px 12px; border-bottom: 1px solid var(--mt-border);
    display: flex; align-items: center; justify-content: space-between;
}
.mt-card-title {
    font-size: 14px !important; font-weight: 700 !important;
    color: var(--mt-text) !important; margin: 0 !important;
}
.mt-card-body  { padding: 16px 20px; }
.mt-card-foot  { padding: 11px 20px; border-top: 1px solid var(--mt-border); text-align: center; }
.mt-card-foot a { font-size: 13px; color: var(--mt-primary); text-decoration: none; font-weight: 500; }

/* ============================================================
   CHECKLIST TÂCHES
   ============================================================ */
.mt-checklist { list-style: none; }
.mt-check-item {
    display: flex; align-items: center; gap: 11px;
    padding: 12px 20px; border-bottom: 1px solid var(--mt-border);
    transition: background .15s;
}
.mt-check-item:last-child { border-bottom: none; }
.mt-check-item:hover { background: var(--mt-bg); }
.mt-check-item.done label { text-decoration: line-through; color: var(--mt-text-soft); }
.mt-check-item input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--mt-primary); cursor: pointer; flex-shrink: 0; }
.mt-check-item label { flex: 1; font-size: 13.5px; cursor: pointer; line-height: 1.4; }
.mt-check-item label small { color: var(--mt-text-soft); }
.mt-vol-badge {
    font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; white-space: nowrap;
}
.mt-vol-badge.blue   { color: var(--mt-primary); background: var(--mt-primary-light); }
.mt-vol-badge.green  { color: var(--mt-green);   background: var(--mt-green-light); }
.mt-vol-badge.orange { color: var(--mt-orange);  background: var(--mt-orange-light); }

/* ============================================================
   LISTE ITEMS
   ============================================================ */
.mt-list { list-style: none; }
.mt-list-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 20px; border-bottom: 1px solid var(--mt-border);
    transition: background .15s;
}
.mt-list-item:last-child { border-bottom: none; }
.mt-list-item:hover { background: var(--mt-bg); }
.mt-li-name { font-size: 14px; font-weight: 600; }
.mt-li-sub  { font-size: 12px; color: var(--mt-text-soft); margin-top: 2px; }

/* ============================================================
   BADGES
   ============================================================ */
.mt-badge {
    display: inline-flex; align-items: center;
    padding: 3px 9px; border-radius: 20px;
    font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
}
.mt-badge.a_contacter { background: var(--mt-primary-light); color: var(--mt-primary); }
.mt-badge.contacte    { background: var(--mt-green-light);   color: var(--mt-green); }
.mt-badge.relance     { background: var(--mt-orange-light);  color: var(--mt-orange); }
.mt-badge.converti    { background: var(--mt-green-light);   color: var(--mt-green); }
.mt-badge.perdu       { background: var(--mt-red-light);     color: var(--mt-red); }
.mt-badge.a_faire     { background: var(--mt-orange-light);  color: var(--mt-orange); }
.mt-badge.fait        { background: var(--mt-green-light);   color: var(--mt-green); }
.mt-badge.actif       { background: var(--mt-green-light);   color: var(--mt-green); }
.mt-badge.inactif     { background: var(--mt-red-light);     color: var(--mt-red); }

/* ============================================================
   SCORE BAR
   ============================================================ */
.mt-score { display: flex; align-items: center; gap: 8px; }
.mt-score-track { flex: 1; height: 5px; background: var(--mt-border); border-radius: 3px; overflow: hidden; }
.mt-score-fill  { height: 100%; border-radius: 3px; transition: width .4s; }
.mt-score-fill.high   { background: var(--mt-green); }
.mt-score-fill.medium { background: var(--mt-orange); }
.mt-score-fill.low    { background: var(--mt-primary); }
.mt-score-num { font-size: 12px; font-weight: 700; color: var(--mt-text-soft); width: 26px; text-align: right; }

/* ============================================================
   BOUTONS
   ============================================================ */
.mt-btn {
    display: inline-flex !important; align-items: center !important; gap: 6px !important;
    padding: 8px 16px !important; border-radius: var(--mt-radius-sm) !important;
    font-size: 13px !important; font-weight: 600 !important; cursor: pointer !important;
    border: none !important; outline: none !important;
    text-decoration: none !important; transition: all .2s !important;
    white-space: nowrap !important; font-family: var(--mt-font) !important;
    line-height: 1.4 !important; box-shadow: none !important; text-shadow: none !important;
}
.mt-btn-primary   { background: var(--mt-primary) !important;  color: #fff !important; }
.mt-btn-primary:hover { background: var(--mt-primary-dark) !important; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,.28) !important; }
.mt-btn-secondary { background: var(--mt-white) !important; color: var(--mt-text) !important; border: 1.5px solid var(--mt-border) !important; }
.mt-btn-secondary:hover { border-color: var(--mt-primary) !important; color: var(--mt-primary) !important; }
.mt-btn-success   { background: var(--mt-green) !important;  color: #fff !important; }
.mt-btn-success:hover { background: #15803d !important; }
.mt-btn-danger    { background: var(--mt-red) !important;    color: #fff !important; }
.mt-btn-danger:hover  { background: #b91c1c !important; }
.mt-btn-sm { padding: 5px 11px !important; font-size: 12px !important; }

/* ============================================================
   TABLEAU
   ============================================================ */
.mt-table-wrap { overflow-x: auto; }
.mt-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mt-table th {
    background: var(--mt-bg); color: var(--mt-text-soft);
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .05em; padding: 10px 14px; text-align: left;
    white-space: nowrap; border-bottom: 1px solid var(--mt-border);
}
.mt-table td { padding: 11px 14px; border-bottom: 1px solid var(--mt-border); vertical-align: middle; }
.mt-table tr:last-child td { border-bottom: none; }
.mt-table tr:hover td { background: var(--mt-bg); }
.mt-td-actions { display: flex; gap: 5px; }

/* ============================================================
   FORMULAIRES
   ============================================================ */
.mt-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .mt-form-grid { grid-template-columns: 1fr; } }
.mt-form-group { display: flex; flex-direction: column; gap: 5px; }
.mt-form-group.full { grid-column: 1 / -1; }
.mt-label { font-size: 13px; font-weight: 600; color: var(--mt-text); }
.mt-input, .mt-select, .mt-textarea {
    padding: 9px 12px; border: 1.5px solid var(--mt-border);
    border-radius: var(--mt-radius-sm); font-size: 13.5px;
    font-family: var(--mt-font); color: var(--mt-text); background: var(--mt-white);
    transition: border .2s, box-shadow .2s; outline: none; width: 100%;
}
.mt-input:focus, .mt-select:focus, .mt-textarea:focus {
    border-color: var(--mt-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.mt-textarea { resize: vertical; min-height: 80px; }
.mt-input-help { font-size: 11.5px; color: var(--mt-text-soft); margin-top: 3px; }

/* ============================================================
   MODAL
   ============================================================ */
.mt-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.5); z-index: 99999;
    align-items: center; justify-content: center;
}
.mt-modal-overlay.open { display: flex; }
.mt-modal {
    background: var(--mt-white); border-radius: var(--mt-radius);
    box-shadow: 0 20px 60px rgba(0,0,0,.18);
    width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto;
    animation: mtIn .2s ease;
}
.mt-modal-lg { max-width: 660px; }
.mt-modal-head {
    padding: 18px 22px 14px; border-bottom: 1px solid var(--mt-border);
    display: flex; align-items: center; justify-content: space-between;
}
.mt-modal-title { font-size: 16px !important; font-weight: 700 !important; margin: 0 !important; color: var(--mt-text) !important; }
.mt-modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--mt-text-soft); line-height: 1; padding: 2px 4px; }
.mt-modal-body { padding: 20px 22px; }
.mt-modal-foot { padding: 14px 22px; border-top: 1px solid var(--mt-border); display: flex; justify-content: flex-end; gap: 8px; }
@keyframes mtIn { from { opacity:0; transform:translateY(-14px); } to { opacity:1; transform:translateY(0); } }

/* ============================================================
   OPPORTUNITÉ CARD
   ============================================================ */
.mt-opportunity {
    background: linear-gradient(135deg, #2563EB 0%, #1d4ed8 100%);
    border-radius: var(--mt-radius); padding: 22px; color: #fff;
    box-shadow: 0 6px 24px rgba(37,99,235,.3);
}
.mt-opportunity h3 { font-size: 14px !important; font-weight: 700 !important; margin: 0 0 14px !important; opacity: .9; color: #fff !important; }
.mt-opp-item { background: rgba(255,255,255,.14); border-radius: 10px; padding: 11px 14px; margin-bottom: 8px; backdrop-filter: blur(4px); }
.mt-opp-item:last-child { margin-bottom: 0; }
.mt-opp-label { font-size: 11px; opacity: .75; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 3px; }
.mt-opp-value { font-size: 13px; font-weight: 600; }

/* ============================================================
   ACTIONS RÉCENTES
   ============================================================ */
.mt-actions-list { list-style: none; }
.mt-action-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 11px 20px; border-bottom: 1px solid var(--mt-border);
}
.mt-action-item:last-child { border-bottom: none; }
.mt-action-icon {
    width: 32px; height: 32px; border-radius: 8px;
    background: var(--mt-primary-light); color: var(--mt-primary);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 14px;
}
.mt-action-name   { font-size: 13.5px; font-weight: 600; }
.mt-action-detail { font-size: 12px; color: var(--mt-text-soft); margin-top: 2px; }
.mt-action-time   { font-size: 11px; color: var(--mt-text-soft); white-space: nowrap; margin-left: auto; padding-left: 10px; }

/* ============================================================
   CALENDRIER
   ============================================================ */
.mt-calendar { width: 100%; border-collapse: collapse; }
.mt-calendar th {
    background: var(--mt-bg); font-size: 11px; font-weight: 700;
    text-transform: uppercase; color: var(--mt-text-soft); padding: 10px; text-align: center;
}
.mt-calendar td {
    width: calc(100%/7); min-height: 80px; vertical-align: top;
    border: 1px solid var(--mt-border); padding: 7px; cursor: pointer; transition: background .15s;
}
.mt-calendar td:hover { background: var(--mt-bg); }
.mt-calendar td.today { background: var(--mt-primary-light); }
.mt-calendar td.today .mt-day-num { color: var(--mt-primary); font-weight: 700; }
.mt-day-num { font-size: 13px; font-weight: 500; margin-bottom: 4px; display: block; }
.mt-cal-task {
    display: block; font-size: 10.5px; padding: 2px 5px;
    border-radius: 4px; margin-bottom: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    text-decoration: none;
}
.mt-cal-task.prospection { background: var(--mt-primary-light); color: var(--mt-primary); }
.mt-cal-task.relance     { background: var(--mt-orange-light);  color: var(--mt-orange); }
.mt-cal-task.contenu     { background: var(--mt-green-light);   color: var(--mt-green); }

/* ============================================================
   NOTICES / ALERTS
   ============================================================ */
.mt-notice {
    padding: 11px 16px; border-radius: var(--mt-radius-sm);
    font-size: 13px; margin-bottom: 16px;
    display: flex; align-items: center; gap: 8px; line-height: 1.4;
}
.mt-notice.success { background: var(--mt-green-light);   color: #166534; border-left: 3px solid var(--mt-green); }
.mt-notice.error   { background: var(--mt-red-light);     color: #991b1b; border-left: 3px solid var(--mt-red); }
.mt-notice.info    { background: var(--mt-primary-light); color: #1e40af; border-left: 3px solid var(--mt-primary); }
.mt-notice.warning { background: var(--mt-orange-light);  color: #92400e; border-left: 3px solid var(--mt-orange); }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.mt-empty { text-align: center; padding: 40px 20px; color: var(--mt-text-soft); }
.mt-empty svg { width: 52px; height: 52px; opacity: .25; margin: 0 auto 12px; display: block; }
.mt-empty p   { font-size: 14px; margin-bottom: 14px; }

/* ============================================================
   FILTRES / SEARCH BAR
   ============================================================ */
.mt-filters {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 14px 20px; background: var(--mt-white);
    border-radius: var(--mt-radius); box-shadow: var(--mt-shadow); margin-bottom: 18px;
}
.mt-search { position: relative; }
.mt-search input { padding-left: 34px; width: 240px; }
.mt-search svg {
    position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
    width: 15px; height: 15px; color: var(--mt-text-soft); pointer-events: none;
}

/* ============================================================
   PERSONA CARDS
   ============================================================ */
.mt-persona-card .mt-stars { color: #f59e0b; letter-spacing: 2px; font-size: 13px; }
.mt-persona-stat { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; border-bottom: 1px solid var(--mt-border); }
.mt-persona-stat:last-child { border-bottom: none; }
.mt-persona-stat span:first-child { color: var(--mt-text-soft); }
.mt-persona-stat span:last-child  { font-weight: 600; }

/* ============================================================
   MOBILE SIDEBAR TOGGLE
   ============================================================ */
.mt-menu-toggle {
    display: none; background: var(--mt-white); border: 1px solid var(--mt-border);
    border-radius: 8px; padding: 8px 10px; cursor: pointer; align-items: center;
    gap: 6px; font-size: 13px; font-weight: 600; color: var(--mt-text);
}
.mt-menu-toggle svg { width: 18px; height: 18px; }

@media (max-width: 768px) {
    .mt-app { flex-direction: column; }
    .mt-sidebar {
        width: 100%; min-width: 100%; border-right: none;
        border-bottom: 1px solid var(--mt-border);
        display: none;
    }
    .mt-sidebar.open { display: flex; }
    .mt-menu-toggle { display: flex; }
    .mt-content-body { padding: 16px 14px 28px; }
    .mt-kpi-row { grid-template-columns: 1fr 1fr; }
    .mt-sidebar-nav { display: flex; flex-wrap: wrap; padding: 8px; }
    .mt-nav-item    { flex: 1; min-width: 120px; justify-content: center; }
    .mt-nav-item span { display: none; }
    .mt-nav-section { display: none; }
}

/* ============================================================
   ONGLETS HORIZONTAUX (paramètres)
   ============================================================ */
.mt-htabs-wrap {
    margin-bottom: 22px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.mt-htabs {
    display: flex;
    gap: 4px;
    background: var(--mt-white);
    border-radius: var(--mt-radius);
    box-shadow: var(--mt-shadow);
    padding: 6px;
    width: fit-content;
    min-width: 100%;
}
.mt-htab {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 9px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    color: var(--mt-text-soft);
    white-space: nowrap;
    transition: all .18s;
    border: none;
    background: none;
    cursor: pointer;
    flex-shrink: 0;
}
.mt-htab:hover { background: var(--mt-bg); color: var(--mt-text); }
.mt-htab.active {
    background: var(--mt-primary);
    color: #fff !important;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(37,99,235,.25);
}
.mt-htab-icon  { font-size: 15px; line-height: 1; }
.mt-htab-label { line-height: 1; }

@media (max-width: 768px) {
    .mt-htabs { gap: 2px; padding: 4px; }
    .mt-htab  { padding: 8px 11px; font-size: 12px; gap: 5px; }
    .mt-htab-label { display: none; }
    .mt-htab-icon  { font-size: 17px; }
}

/* ============================================================
   CHART CONTAINER
   ============================================================ */
.mt-chart-wrap { position: relative; height: 210px; padding: 4px 0; }

/* ============================================================
   SPINNER
   ============================================================ */
.mt-spinner {
    display: inline-block; width: 18px; height: 18px;
    border: 2px solid var(--mt-border); border-top-color: var(--mt-primary);
    border-radius: 50%; animation: mtSpin .7s linear infinite;
}
@keyframes mtSpin { to { transform: rotate(360deg); } }

/* ============================================================
   OVERRIDE THÈME WORDPRESS — isolation styles
   ============================================================ */
.mt-app h1,.mt-app h2,.mt-app h3,.mt-app h4 { font-family: var(--mt-font); }
.mt-app a { color: var(--mt-primary); }
.mt-app img { max-width: 100%; }
.mt-app button { font-family: var(--mt-font); }
