/* SignalNids Référent V3.9.0 — Import Excel communes */
.excel-scope{
 display:flex;align-items:center;justify-content:space-between;gap:18px;
 margin:14px 0;padding:16px 18px;border:1px solid #d6e6de;border-left:4px solid #007257;
 border-radius:14px;background:linear-gradient(110deg,#eef8f3,#fcfdfc)
}
.excel-scope strong{display:block;margin-top:3px;color:#123f33;font-size:1.05rem}
.excel-scope p{margin:4px 0 0;color:#657970;font-size:.76rem;line-height:1.45;max-width:780px}
.excel-communes{display:flex;align-items:center;justify-content:space-between;gap:16px}
.excel-communes h2{margin:3px 0;color:#16483b}
.excel-communes p{margin:0;color:#6d7f76;font-size:.72rem}
.excel-commune-chips{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.excel-commune-chips span{display:flex;align-items:center;gap:6px;padding:7px 9px;border:1px solid #d1e1d9;border-radius:999px;background:#fff;color:#28584a;font-size:.70rem}
.excel-commune-chips small{padding:2px 5px;border-radius:999px;background:#eef5f1;color:#6e8178;font-size:.58rem}
.excel-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px;margin:13px 0}
.excel-kpis article{padding:13px;border:1px solid #d9e6df;border-radius:11px;background:#fff}
.excel-kpis span{display:block;color:#708179;font-size:.62rem;font-weight:800;text-transform:uppercase;line-height:1.35}
.excel-kpis strong{display:block;margin-top:5px;color:#07513f;font-size:1.35rem}
.excel-kpis article.bee{border-color:#e4d7b7;background:#fffaf0}
.excel-format-badge{display:inline-flex;align-items:center;min-height:30px;padding:5px 9px;border-radius:999px;background:#edf6f2;color:#356458;font-size:.64rem;font-weight:850}
.excel-upload-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:stretch}
.excel-drop{display:flex!important;align-items:center;gap:12px;min-height:92px;padding:15px;border:2px dashed #bad5c8;border-radius:12px;background:#f7fbf9;cursor:pointer}
.excel-drop input{position:absolute;opacity:0;pointer-events:none}
.excel-drop-icon{display:grid;place-items:center;width:46px;height:46px;min-width:46px;border-radius:12px;background:#e8f5ef;color:#00664e;font-size:1.4rem;font-weight:900}
.excel-drop strong{color:#194c3e}
.excel-drop small{display:block;margin-left:auto;color:#788a81;font-size:.66rem}
.excel-help-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:12px}
.excel-help-grid article{padding:11px;border:1px solid #e0e9e4;border-radius:9px;background:#fbfdfc}
.excel-help-grid strong{color:#215347;font-size:.76rem}
.excel-help-grid p{margin:4px 0 0;color:#6d7e77;font-size:.66rem;line-height:1.45}
.excel-map-panel .section-heading p{margin:3px 0 0;color:#6f8078;font-size:.70rem}
.excel-year-row{display:flex;align-items:end;gap:12px;padding:10px;border:1px solid #e0e9e4;border-radius:9px;background:#f8fbf9}
.excel-year-row label{max-width:180px}
.excel-year-row p{margin:0 0 8px;color:#74857e;font-size:.65rem}
.excel-mapping-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:10px}
.excel-mapping-grid label{min-width:0}
.excel-mapping-grid label>span{display:block;min-height:30px;color:#526d63;font-size:.66rem;font-weight:760;line-height:1.25}
.excel-mapping-grid select{width:100%;min-width:0}
.excel-import-note{display:flex;gap:8px;margin-top:10px;padding:10px 11px;border-left:3px solid #c47b1d;border-radius:7px;background:#fff8e9;color:#735a32;font-size:.67rem;line-height:1.45}
.excel-import-button{margin-top:12px}
.excel-preview{margin-top:18px;padding-top:12px;border-top:1px solid #e2ebe6}
.excel-table-scroll{width:100%;overflow:auto;border:1px solid #dfe8e3;border-radius:9px}
.excel-table-scroll table{width:100%;border-collapse:collapse;min-width:860px;background:#fff}
.excel-table-scroll th{position:sticky;top:0;padding:9px 10px;background:#edf5f1;color:#285648;font-size:.65rem;text-align:left;white-space:nowrap}
.excel-table-scroll td{padding:8px 10px;border-top:1px solid #edf2ef;color:#526c63;font-size:.66rem;vertical-align:top}
.excel-table-scroll td small{display:block;margin-top:1px;color:#8a9892;font-size:.56rem}
.excel-history-list{display:flex;flex-direction:column;gap:7px}
.excel-history-list article{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 11px;border:1px solid #e0e9e4;border-radius:9px;background:#fbfdfc}
.excel-history-list strong{display:block;color:#194b3e;font-size:.76rem}
.excel-history-list small{display:block;margin-top:2px;color:#7b8b84;font-size:.62rem}
.excel-import-counts{display:flex;gap:5px;flex-wrap:wrap;justify-content:flex-end}
.excel-import-counts span{padding:4px 7px;border-radius:999px;background:#f0f4f2;color:#65766f;font-size:.60rem;font-weight:800}
.excel-import-counts span.good{background:#e9f7f0;color:#166047}
.excel-import-counts span.bad{background:#fff0ed;color:#a24337}
.excel-empty{color:#71847a;font-size:.75rem;text-align:center}
@media(max-width:900px){
 .excel-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
 .excel-kpis article.bee{grid-column:1/-1}
 .excel-mapping-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .excel-communes{align-items:flex-start;flex-direction:column}
 .excel-commune-chips{justify-content:flex-start}
}
@media(max-width:760px){
 .excel-scope{align-items:stretch;flex-direction:column;padding:13px}
 .excel-scope .button{width:100%}
 .excel-kpis{gap:7px}
 .excel-kpis article{padding:10px}
 .excel-kpis strong{font-size:1.15rem}
 .excel-upload-form{grid-template-columns:1fr}
 .excel-upload-form>.button{width:100%;min-height:46px}
 .excel-drop{min-height:82px}
 .excel-drop small{margin-left:0}
 .excel-help-grid{grid-template-columns:1fr}
 .excel-mapping-grid{grid-template-columns:1fr}
 .excel-mapping-grid label>span{min-height:0;margin-bottom:3px}
 .excel-year-row{align-items:stretch;flex-direction:column}
 .excel-year-row label{max-width:none}
 .excel-year-row p{margin:0}
 .excel-history-list article{align-items:flex-start;flex-direction:column}
 .excel-import-counts{justify-content:flex-start}
}


/* ============================================================
   SignalNids Référent V3.9.1 — responsive / anti-dépassement
   ============================================================ */
body.excel-import-page{
  overflow-x:hidden!important;
}

body.excel-import-page *,
body.excel-import-page *::before,
body.excel-import-page *::after{
  box-sizing:border-box;
}

body.excel-import-page main,
body.excel-import-page .section,
body.excel-import-page .panel,
body.excel-import-page .excel-scope,
body.excel-import-page .excel-communes,
body.excel-import-page .excel-upload-panel,
body.excel-import-page .excel-map-panel,
body.excel-import-page .excel-history,
body.excel-import-page .excel-recent,
body.excel-import-page .excel-mapping-form,
body.excel-import-page .excel-preview{
  min-width:0!important;
  max-width:100%!important;
}

.excel-table-scroll{
  display:block;
  width:100%;
  max-width:100%;
  min-width:0;
  overflow-x:auto!important;
  overflow-y:hidden;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-x:contain;
}

.excel-table-scroll table{
  width:max-content;
  min-width:100%;
  max-width:none;
}

.excel-mapping-grid>*,
.excel-kpis>*,
.excel-help-grid>*,
.excel-scope>*,
.excel-communes>*,
.excel-history-list article>*{
  min-width:0;
}

.excel-mapping-grid select,
.excel-mapping-grid input,
.excel-year-row input,
.excel-upload-form button{
  width:100%;
  max-width:100%;
}

.excel-scope p,
.excel-help-grid p,
.excel-communes p{
  overflow-wrap:anywhere;
}

@media(max-width:760px){
  body.excel-import-page main{
    overflow-x:hidden!important;
  }

  .excel-scope,
  .excel-communes,
  .excel-upload-panel,
  .excel-map-panel,
  .excel-history,
  .excel-recent{
    width:100%!important;
    max-width:100%!important;
  }

  .excel-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  .excel-mapping-grid{
    grid-template-columns:minmax(0,1fr)!important;
  }

  .excel-upload-form{
    grid-template-columns:minmax(0,1fr)!important;
    width:100%;
  }

  .excel-drop{
    width:100%;
    min-width:0;
    flex-wrap:wrap;
  }

  .excel-drop strong{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    max-width:calc(100vw - 140px);
  }

  .excel-drop small{
    flex-basis:100%;
    padding-left:58px;
  }

  .excel-commune-chips{
    width:100%;
    justify-content:flex-start;
  }

  .excel-commune-chips span{
    max-width:100%;
    min-width:0;
  }

  .excel-commune-chips b{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .excel-history-list article{
    align-items:flex-start!important;
    flex-direction:column!important;
  }

  .excel-import-counts{
    justify-content:flex-start!important;
  }
}

@media(max-width:420px){
  .excel-kpis{
    grid-template-columns:minmax(0,1fr)!important;
  }

  .excel-kpis article.bee{
    grid-column:auto!important;
  }

  .excel-drop small{
    padding-left:0;
  }

  .excel-drop strong{
    max-width:calc(100vw - 100px);
  }
}
