:root{--navy:#14213d;--blue:#005295;--bg:#f4f6f8;--line:#e4e7ec;--muted:#667085;--green:#027a48;--orange:#b54708;--red:#b42318;--white:#fff}
*{box-sizing:border-box}body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:#101828}.hidden{display:none!important}.eyebrow{font-size:11px;letter-spacing:1.15px;font-weight:900;color:var(--blue);margin:0 0 3px}.muted{color:var(--muted)}.error{color:var(--red);font-weight:700}.login-shell{min-height:100vh;display:grid;place-items:center;padding:24px}.login-card{width:min(430px,100%);background:#fff;border:1px solid var(--line);border-radius:24px;padding:28px;box-shadow:0 18px 60px rgba(16,24,40,.10)}.brand-mark{width:54px;height:54px;border-radius:16px;background:var(--navy);color:white;display:grid;place-items:center;font-weight:900;margin-bottom:20px}.login-card h1,.topbar h1{margin:0;color:var(--navy)}label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:800;color:#344054;margin:12px 0}input,textarea,select{width:100%;border:1px solid #d0d5dd;border-radius:11px;padding:11px 12px;background:white;color:#101828;font:inherit;outline:none}input:focus,textarea:focus,select:focus{border-color:#84caff;box-shadow:0 0 0 3px #eff8ff}.primary,.ghost{border:0;border-radius:11px;padding:11px 14px;font-weight:900;cursor:pointer}.primary{background:var(--blue);color:white}.ghost{background:white;border:1px solid #d0d5dd;color:#344054}.login-card .primary{width:100%;margin-top:8px}.topbar{height:76px;background:white;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 22px;position:sticky;top:0;z-index:20}.top-actions{display:flex;align-items:center;gap:8px}.sync-dot{width:9px;height:9px;border-radius:50%;background:#12b76a}.main{padding:20px;max-width:1900px;margin:auto}.summary{display:grid;grid-template-columns:repeat(6,minmax(120px,1fr));gap:10px;margin-bottom:14px}.summary-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:14px;cursor:pointer}.summary-card strong{display:block;font-size:24px;color:var(--navy)}.summary-card span{font-size:11px;color:var(--muted);font-weight:800}.toolbar{display:grid;grid-template-columns:minmax(280px,1fr) 220px auto;gap:10px;margin-bottom:14px}.table-card{background:#fff;border:1px solid var(--line);border-radius:18px;overflow:hidden}.table-wrap{overflow:auto;max-height:calc(100vh - 245px)}table{width:100%;border-collapse:separate;border-spacing:0;min-width:1650px}th{position:sticky;top:0;background:#f8fafc;text-transform:uppercase;font-size:10px;letter-spacing:.45px;color:#667085;text-align:left;padding:12px;border-bottom:1px solid var(--line);z-index:2}td{padding:12px;border-bottom:1px solid #f0f2f5;font-size:12px;vertical-align:top}.data-row{cursor:pointer}.data-row:hover{background:#f9fbfd}.ref{font-weight:900;color:var(--navy)}.chip{display:inline-flex;padding:5px 8px;border-radius:999px;font-size:10px;font-weight:900;white-space:nowrap}.A_PLANIFIER{background:#fff7e8;color:#b54708}.PLANIFIE{background:#eaf4fb;color:#005295}.A_FACTURER{background:#ecfdf3;color:#027a48}.FACTURE{background:#e8f2ec;color:#166534}.A_VERIFIER{background:#fee4e2;color:#b42318}.ARCHIVE{background:#f2f4f7;color:#475467}.done-check{width:20px;height:20px}.drawer{position:fixed;top:0;right:0;width:min(620px,100vw);height:100vh;background:white;z-index:60;transform:translateX(105%);transition:transform .22s ease;box-shadow:-18px 0 50px rgba(16,24,40,.18);display:flex;flex-direction:column}.drawer.open{transform:translateX(0)}.drawer-head{display:flex;align-items:center;justify-content:space-between;padding:18px 20px;border-bottom:1px solid var(--line)}.drawer-head h2{margin:0;color:var(--navy)}.drawer-body{overflow:auto;padding:18px 20px 60px}.icon{border:0;background:#f2f4f7;border-radius:11px;width:40px;height:40px;font-size:25px;cursor:pointer}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:12px}.checkline{flex-direction:row;align-items:center;gap:9px}.checkline input{width:20px;height:20px}.actions-row{display:flex;gap:10px;align-items:center}.ghost-link{padding:10px 12px;border:1px solid #d0d5dd;border-radius:11px;text-decoration:none;color:#344054;font-weight:800}.panel-block{border-top:1px solid var(--line);padding-top:18px;margin-top:20px}.panel-block h3{margin:0 0 10px;color:var(--navy)}.comment,.event{background:#f8fafc;border-radius:12px;padding:10px;margin:8px 0;font-size:12px}.comment strong{color:var(--navy)}.backdrop{position:fixed;inset:0;background:rgba(16,24,40,.36);z-index:50;opacity:0;pointer-events:none;transition:.2s}.backdrop.open{opacity:1;pointer-events:auto}.modal{position:fixed;inset:0;background:rgba(16,24,40,.42);z-index:80;display:grid;place-items:center;padding:16px}.modal-card{width:min(720px,100%);max-height:92vh;overflow:auto;background:#fff;border-radius:20px;padding:18px}.team-row{display:grid;grid-template-columns:1fr auto auto;gap:8px;align-items:center;border-bottom:1px solid var(--line);padding:10px 0}.mobile-cards{display:none}.mobile-card{padding:14px;border-bottom:1px solid var(--line)}.mobile-card .title{font-weight:900;color:var(--navy)}.mobile-meta{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.mobile-meta span{background:#f2f4f7;border-radius:8px;padding:5px 7px;font-size:10px}.mobile-card p{font-size:12px;margin:7px 0;color:#475467}
@media(max-width:980px){.summary{grid-template-columns:repeat(3,1fr)}.toolbar{grid-template-columns:1fr 160px}.toolbar #importButton{grid-column:1/-1}.table-wrap{display:none}.mobile-cards{display:block}.main{padding:12px}.topbar{padding:0 12px}.top-actions .ghost{padding:9px;font-size:11px}.grid2{grid-template-columns:1fr}.drawer{width:100vw}.summary-card strong{font-size:20px}}
@media(max-width:560px){.summary{grid-template-columns:repeat(2,1fr)}.toolbar{grid-template-columns:1fr}.toolbar #importButton{grid-column:auto}.topbar h1{font-size:18px}.eyebrow{font-size:9px}.top-actions{gap:4px}.login-card{padding:22px;border-radius:18px}}

/* ===== ICF DESIGN V2 ===== */

body{
  background:
    radial-gradient(circle at 100% 0,rgba(8,119,201,.08),transparent 30%),
    linear-gradient(180deg,#f8fbfe 0,#f3f7fb 220px,#f3f7fb 100%);
}

.topbar{
  height:82px;
  border-bottom:1px solid #d9e5ef;
  box-shadow:0 4px 18px rgba(20,33,61,.06);
  background:rgba(255,255,255,.96);
}

.primary,.ghost,.icon,.ghost-link{
  transition:all .16s ease;
}

.primary{
  border:1px solid #005295!important;
  background:linear-gradient(135deg,#005295,#0877c9);
  box-shadow:0 5px 13px rgba(0,82,149,.16);
}

.primary:hover{
  transform:translateY(-2px);
  border-color:#43a6e8!important;
  box-shadow:
    0 0 0 2px rgba(67,166,232,.35),
    0 10px 22px rgba(0,82,149,.22);
}

.ghost{
  border:1px solid #cbd8e5;
  background:#fff;
  color:#233653;
}

.ghost:hover,.ghost-link:hover{
  transform:translateY(-1px);
  border-color:#0877c9;
  color:#005295;
  background:#f7fbff;
  box-shadow:
    0 0 0 2px rgba(8,119,201,.12),
    0 8px 18px rgba(20,33,61,.09);
}

.icon:hover{
  border:1px solid #0877c9;
  color:#005295;
  background:#edf7ff;
  box-shadow:0 0 0 3px rgba(8,119,201,.15);
  transform:scale(1.04);
}

.primary:active,.ghost:active,.icon:active{
  transform:scale(.98);
}

input,textarea,select{
  transition:border-color .16s ease,box-shadow .16s ease;
}

input:hover,textarea:hover,select:hover{
  border-color:#9db8d0;
}

input:focus,textarea:focus,select:focus{
  border-color:#0877c9;
  box-shadow:0 0 0 3px rgba(8,119,201,.16);
}

.summary-card{
  position:relative;
  overflow:hidden;
  border-color:#dbe5ef;
  box-shadow:0 5px 16px rgba(20,33,61,.07);
  transition:all .17s ease;
}

.summary-card:before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:4px;
  background:#005295;
}

.summary-card:hover{
  transform:translateY(-2px);
  box-shadow:0 12px 30px rgba(20,33,61,.12);
  border-color:#9fc6e2;
}

.summary-card[data-status="A_VERIFIER"]:before{background:#d92d20}
.summary-card[data-status="A_PLANIFIER"]:before{background:#f79009}
.summary-card[data-status="PLANIFIE"]:before{background:#2e90fa}
.summary-card[data-status="A_FACTURER"]:before{background:#12b76a}
.summary-card[data-status="FACTURE"]:before{background:#027a48}

.table-card{
  border-color:#d8e4ef;
  box-shadow:0 8px 30px rgba(20,33,61,.065);
}

th{
  background:#edf4fa;
  color:#42536a;
}

.data-row:hover td{
  background:#f0f8ff;
  border-bottom-color:#d9eaf7;
}

.data-row:hover td:first-child{
  box-shadow:inset 4px 0 0 #0877c9;
}

.A_VERIFIER{
  background:#fff0ee;
  color:#b42318;
  border:1px solid #fecdca;
}

.A_PLANIFIER{
  background:#fff7e7;
  color:#a84b08;
  border:1px solid #fedf89;
}

.PLANIFIE{
  background:#eef7ff;
  color:#175cd3;
  border:1px solid #b2ddff;
}

.A_FACTURER{
  background:#ecfdf3;
  color:#027a48;
  border:1px solid #abefc6;
}

.FACTURE{
  background:#e7f7ee;
  color:#05603a;
  border:1px solid #a6e3bf;
}

.drawer{
  border-left:1px solid #cbdbe8;
  box-shadow:-24px 0 60px rgba(20,33,61,.22);
}

.drawer-head{
  background:linear-gradient(135deg,#f5faff,#fff 58%,#eef8ff);
  border-bottom:1px solid #cfe0ed;
}

.panel-block{
  border-top:1px solid #dce7ef;
  background:linear-gradient(180deg,rgba(238,247,255,.38),transparent 54px);
}

.comment,.event{
  background:#f5f9fd;
  border:1px solid #e0eaf2;
}

.brand-mark{
  background:linear-gradient(145deg,#14213d,#005295);
  box-shadow:0 9px 22px rgba(0,82,149,.25);
}


/* ===== ICF_MULTI_DOCUMENTS_STYLE ===== */

.documents-panel{
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid rgba(0,0,0,.10);
}

.documents-title{
  font-size:15px;
  font-weight:700;
  margin-bottom:10px;
}

.documents-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.document-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  border:1px solid rgba(0,0,0,.10);
  border-radius:10px;
  background:rgba(255,255,255,.72);
}

.document-info{
  min-width:0;
  display:flex;
  align-items:center;
  gap:9px;
}

.document-name{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:13px;
}

.document-badge{
  flex:none;
  padding:4px 7px;
  border-radius:7px;
  font-size:11px;
  font-weight:700;
  background:#eceff3;
}

.document-badge.BON_COMMANDE{
  background:#e5f0ff;
}

.document-badge.QUITUS{
  background:#e7f7ed;
}

.document-badge.ANNEXE{
  background:#f3edf9;
}

.document-actions{
  flex:none;
  display:flex;
  gap:6px;
}

.document-actions button{
  padding:6px 9px;
  font-size:12px;
}

.documents-empty,
.documents-loading{
  font-size:13px;
  opacity:.65;
}

@media(max-width:700px){
  .document-row{
    align-items:flex-start;
    flex-direction:column;
  }

  .document-actions{
    width:100%;
  }

  .document-actions button{
    flex:1;
  }
}

/* ===== FIN ICF_MULTI_DOCUMENTS_STYLE ===== */

/* ===== ICF PLANNING INLINE ===== */

.inline-center{
  text-align:center;
}

.inline-done{
  width:20px;
  height:20px;
  cursor:pointer;
  accent-color:currentColor;
}

.inline-date{
  width:138px;
  min-width:138px;
  padding:7px 8px;
  border:1px solid rgba(0,0,0,.16);
  border-radius:8px;
  background:#fff;
  font:inherit;
  cursor:pointer;
}

.inline-assignee{
  width:145px;
  max-width:165px;
  padding:7px 8px;
  border:1px solid rgba(0,0,0,.16);
  border-radius:8px;
  background:#fff;
  font:inherit;
  cursor:pointer;
}

/* ===== FIN ICF PLANNING INLINE ===== */

/* ===== STATUT DIRECT LISTE ===== */

.inline-status{
  min-width:125px;
  padding:7px 8px;
  border:1px solid rgba(0,0,0,.16);
  border-radius:8px;
  background:#fff;
  font:inherit;
  font-size:12px;
  cursor:pointer;
}

/* ===== FIN STATUT DIRECT LISTE ===== */

/* ===== ICF DRAWER COMPACT V3 ===== */

.icf-compact-drawer{
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:12px 2px 24px;
}

.icf-card{
  padding:14px;
  border:1px solid rgba(0,0,0,.09);
  border-radius:14px;
  background:#fff;
  box-shadow:0 2px 10px rgba(0,0,0,.035);
}

.icf-section-title{
  margin-bottom:11px;
  font-size:13px;
  line-height:1;
  font-weight:750;
  text-transform:uppercase;
  letter-spacing:.035em;
  opacity:.65;
}

.icf-grid{
  display:grid;
  gap:10px;
  align-items:end;
}

.icf-grid-4{
  grid-template-columns:
    minmax(110px,1.1fr)
    minmax(110px,1fr)
    minmax(130px,1.15fr)
    minmax(135px,1fr);
}

.icf-grid-3{
  grid-template-columns:
    minmax(140px,1fr)
    minmax(145px,.85fr)
    minmax(180px,1.15fr);
}

.icf-grid-2{
  grid-template-columns:
    repeat(2,minmax(0,1fr));
}

.icf-full{
  margin-top:10px;
}

.icf-card label,
.icf-card .field,
.icf-card .form-group{
  margin:0 !important;
}

.icf-card input,
.icf-card select,
.icf-card textarea{
  width:100%;
  box-sizing:border-box;
}

#dNature{
  min-height:115px;
  line-height:1.45;
}

#dReport{
  min-height:100px;
}

.icf-rdv-card{
  border-width:1.5px;
}

.icf-phone-important{
  font-weight:700 !important;
  font-size:15px !important;
}

.icf-readonly-extracted{
  opacity:.85;
  cursor:not-allowed !important;
}

#documentsPanel{
  margin-top:0 !important;
  padding-top:0 !important;
  border-top:0 !important;
}

#icfDocuments .documents-title{
  display:none;
}

.icf-card details > summary{
  cursor:pointer;
  font-weight:700;
  padding:3px 0;
}

#icfComments,
#icfEvents{
  margin-top:12px;
}

@media(max-width:900px){

  .icf-grid-4,
  .icf-grid-3,
  .icf-grid-2{
    grid-template-columns:
      repeat(2,minmax(0,1fr));
  }
}

@media(max-width:600px){

  .icf-compact-drawer{
    gap:9px;
  }

  .icf-card{
    padding:12px;
  }

  .icf-grid-4,
  .icf-grid-3,
  .icf-grid-2{
    grid-template-columns:1fr;
  }
}

/* ===== FIN ICF DRAWER COMPACT V3 ===== */

/* =========================================================
   FICHE ICF = STYLE OSBRAIN
   ========================================================= */

/*
  Neutralisation de notre ancienne mise en page.
*/
.icf-compact-drawer{
  display:none !important;
}

#drawer{
  display:none !important;
  position:fixed !important;
  top:0 !important;
  right:0 !important;
  bottom:0 !important;

  width:min(620px,100%) !important;
  max-width:620px !important;

  background:#fff !important;
  z-index:40 !important;

  box-shadow:
    -5px 0 25px rgba(0,0,0,.18) !important;

  overflow:auto !important;

  transform:none !important;
  transition:none !important;
}

#drawer.open{
  display:block !important;
}

#drawer > .osb-icf-old{
  display:none !important;
}

#osbIcfShell{
  display:block !important;
  min-height:100%;
  background:#fff;
}


/* ===== HEADER COMME OSBRAIN ===== */

.osb-icf-header{
  padding:20px;

  background:#111827;
  color:#fff;

  position:sticky;
  top:0;
  z-index:10;
}

.osb-icf-title{
  font-size:22px;
  line-height:1.2;
  font-weight:700;
}

.osb-icf-sub{
  margin-top:5px;

  font-size:13px;
  line-height:1.35;

  color:#d1d5db;
}

.osb-icf-close{
  float:right;

  border:0 !important;
  background:transparent !important;

  color:#fff !important;

  font-size:28px !important;
  line-height:1 !important;

  padding:0 !important;
  margin:0 !important;

  cursor:pointer;
}


/* ===== BODY ===== */

.osb-icf-body{
  padding:20px;
}


/* ===== GRILLE CLE / VALEUR COMME OSBRAIN ===== */

.osb-icf-kv{
  display:grid;

  grid-template-columns:
    145px minmax(0,1fr);

  column-gap:16px;
  row-gap:11px;

  align-items:start;
}

.osb-icf-k{
  padding-top:8px;

  font-size:12px;
  font-weight:700;

  color:#6b7280;
}

.osb-icf-v{
  min-width:0;
}


/* ===== CHAMPS ===== */

.osb-icf-v input,
.osb-icf-v select,
.osb-icf-v textarea,
.osb-icf-section input,
.osb-icf-section select,
.osb-icf-section textarea{

  width:100%;

  box-sizing:border-box;

  padding:8px 10px;

  border:
    1px solid #d1d5db;

  border-radius:7px;

  background:#fff;

  color:#111827;

  font:inherit;
  font-size:13px;
}

.osb-icf-v textarea{
  min-height:110px;
  resize:vertical;
  line-height:1.45;
}

#dNature{
  min-height:130px !important;
}

#dPrestation:disabled{
  opacity:1 !important;

  background:#f3f4f6 !important;

  color:#374151 !important;

  cursor:not-allowed;
}

.osb-icf-phone{
  font-weight:700 !important;
  font-size:15px !important;
}


/* ===== CASE TRAVAUX ===== */

#dDone{
  width:20px !important;
  height:20px !important;

  margin-top:6px;

  cursor:pointer;
}


/* ===== SECTIONS OSBRAIN ===== */

.osb-icf-section{
  margin-top:22px;

  padding-top:18px;

  border-top:
    1px solid #e5e7eb;
}

.osb-icf-section h3{
  margin:
    0 0 10px;

  font-size:15px;
  line-height:1.3;

  color:#111827;
}


/* ===== COMMENTAIRES ===== */

#commentText{
  min-height:90px;
}

.osb-icf-actions{
  display:flex;
  justify-content:flex-end;

  gap:10px;

  margin-top:8px;
}

.osb-icf-main-actions{
  margin-top:20px;
}


/* ===== DOCUMENTS ===== */

#documentsPanel{
  margin:0 !important;

  padding:0 !important;

  border:0 !important;
}

#documentsPanel .documents-title{
  display:none;
}

.document-row{
  border:
    1px solid #e5e7eb !important;

  border-radius:8px !important;

  padding:9px 10px !important;

  box-shadow:none !important;
}


/* ===== MOBILE ===== */

@media(max-width:650px){

  #drawer{
    width:100% !important;
    max-width:100% !important;
  }

  .osb-icf-header{
    padding:17px;
  }

  .osb-icf-body{
    padding:16px;
  }

  .osb-icf-kv{
    grid-template-columns:
      115px minmax(0,1fr);

    column-gap:10px;
  }
}

/* =========================================================
   FIN STYLE OSBRAIN
   ========================================================= */

/* ===== FIX FICHE OSBRAIN ACCESSIBLE ===== */

/* voile gris toujours derrière la fiche */
#backdrop,
.backdrop{
  z-index:39 !important;
}

#backdrop.open,
.backdrop.open{
  z-index:39 !important;
  pointer-events:auto !important;
}

/* fiche toujours au-dessus et cliquable */
#drawer,
#drawer.open{
  z-index:100 !important;
  pointer-events:auto !important;
  opacity:1 !important;
  filter:none !important;
}

#osbIcfShell,
#osbIcfShell *{
  pointer-events:auto !important;
}

#osbIcfShell{
  position:relative !important;
  z-index:101 !important;
  opacity:1 !important;
  background:#fff !important;
}

/* ===== FIN FIX ===== */

/* Masquer l'historique technique dans la fiche ICF */
#events{
  display:none !important;
}

/* Si aucun commentaire, on garde uniquement la zone commentaire utile */
#comments:empty{
  display:none !important;
}
