.fbn-app{box-sizing:border-box;padding:14px;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;color:#111;}
.fbn-app *{box-sizing:border-box;}
.fbn-topbar{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin:0 auto 12px auto;max-width:1100px;}
.fbn-topbar-left{display:flex;flex-direction:column;gap:4px;}
.fbn-app-title{font-weight:700;font-size:16px;line-height:1.1;}
.fbn-app-subtitle{font-size:12px;opacity:.75;}
.fbn-topbar-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end;}
.fbn-view{max-width:1100px;margin:0 auto;}
.fbn-view[aria-hidden="true"]{display:none;}
.fbn-card{background:#fff;border:1px solid rgba(0,0,0,.08);border-radius:14px;box-shadow:0 10px 30px rgba(0,0,0,.06);overflow:hidden;}
.fbn-card-header{padding:18px 24px;border-bottom:1px solid rgba(0,0,0,.07);display:flex;align-items:center;justify-content:space-between;gap:10px;background:linear-gradient(180deg, rgba(0,214,108,.12), rgba(0,214,108,0));}
.fbn-card-header-left{display:flex;flex-direction:column;gap:4px;}
.fbn-card-header-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end;}
.fbn-title{margin:0;font-size:18px;line-height:1.2;}
.fbn-muted{font-size:12px;opacity:.75;}
.fbn-form{padding:24px;}
#fbn_current_body{padding:24px;}
.fbn-section{padding:18px 0;}
.fbn-section + .fbn-section{border-top:1px dashed rgba(0,0,0,.12);}
.fbn-section-title{margin:0 0 12px 0;font-size:14px;}
.fbn-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;}
.fbn-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.fbn-grid-crew{grid-template-columns:repeat(2,minmax(0,1fr));}
.fbn-grid-filters{grid-template-columns:repeat(3,minmax(0,1fr));}
.fbn-grid-crewtools{grid-template-columns:repeat(1,minmax(0,1fr));}
.fbn-grid-particularites{grid-template-columns:repeat(4,minmax(0,1fr));}
@media (max-width:840px){
  .fbn-topbar{flex-direction:column;align-items:flex-start;}
  .fbn-topbar-actions{justify-content:flex-start;}
}
@media (max-width:720px){
  .fbn-grid,.fbn-grid-crew,.fbn-grid-filters{grid-template-columns:1fr;}
  .fbn-grid-particularites{grid-template-columns:repeat(2,minmax(0,1fr));}
  .fbn-section-head{flex-direction:column;align-items:flex-start;}
}
.fbn-field label{display:block;font-size:12px;margin-bottom:6px;}
.fbn-field input[type="text"],.fbn-field input[type="date"],.fbn-field input[type="number"],.fbn-field textarea,.fbn-field select{
  width:100%;border:1px solid rgba(0,0,0,.14);border-radius:10px;padding:12px 14px;font-size:14px;background:#fff;outline:none;
}
.fbn-field textarea{resize:vertical;min-height:90px;}
.fbn-field-full{grid-column:1 / -1;}
.fbn-field-compact input{padding:10px 10px;}
.fbn-options{display:flex;flex-wrap:wrap;gap:10px 14px;padding:4px 0 2px;}
.fbn-option{display:flex;align-items:center;gap:8px;font-size:14px;}
.fbn-option input{transform:translateY(1px);}

.fbn-legs{display:flex;flex-direction:column;gap:14px;}
.fbn-leg{border:1px solid rgba(0,0,0,.10);border-radius:12px;padding:16px;background:rgba(0,0,0,.01);}
.fbn-leg-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px;}
.fbn-leg-title{margin:0;font-size:13px;}
.fbn-subsection{margin-top:12px;}
.fbn-subtitle{font-size:12px;margin-bottom:8px;opacity:.85;}

.fbn-btn{border:none;cursor:pointer;border-radius:10px;padding:12px 16px;font-size:14px;line-height:1;user-select:none;}
.fbn-btn-icon{padding:0;width:38px;height:38px;display:inline-flex;align-items:center;justify-content:center;font-size:16px;line-height:1;border-radius:10px;}
.fbn-btn-icon:active{transform:translateY(1px);}
.fbn-btn-primary{background:rgba(0,214,108,.95);color:#fff;}
.fbn-btn-primary:hover{background:rgba(0,214,108,1);}
.fbn-btn-secondary{background:rgba(0,214,108,.16);color:#075a33;}
.fbn-btn-secondary:hover{background:rgba(0,214,108,.22);}
.fbn-btn-danger{background:rgba(220,53,69,.12);color:#842029;}
.fbn-btn-danger:hover{background:rgba(220,53,69,.18);}
.fbn-btn-ghost{background:transparent;border:1px solid rgba(0,0,0,.10);padding:10px 12px;color:#333;}
.fbn-btn-ghost[disabled]{opacity:.35;cursor:not-allowed;}

.fbn-archives-filters{padding:18px 24px;border-bottom:1px solid rgba(0,0,0,.07);}
.fbn-table-wrap{padding:18px 24px 24px;}
.fbn-table{width:100%;border-collapse:separate;border-spacing:0 10px;}
.fbn-table thead th{font-size:12px;text-align:left;opacity:.8;padding:0 10px;}
.fbn-table tbody td{background:#fff;border:1px solid rgba(0,0,0,.10);border-left:none;border-right:none;padding:12px 10px;font-size:14px;vertical-align:middle;}
.fbn-table tbody tr td:first-child{border-left:1px solid rgba(0,0,0,.10);border-top-left-radius:10px;border-bottom-left-radius:10px;}
.fbn-table tbody tr td:last-child{border-right:1px solid rgba(0,0,0,.10);border-top-right-radius:10px;border-bottom-right-radius:10px;}
.fbn-col-actions{width:420px;}
.fbn-actions{display:flex;gap:8px;flex-wrap:nowrap;justify-content:flex-end;align-items:center;}

/* Responsive pour mode paysage mini tablette */
@media (max-width:1024px) and (orientation:landscape){
  .fbn-actions{gap:6px;}
  .fbn-actions .fbn-btn{padding:9px 12px;font-size:13px;}
}

@media (max-width:920px){
  .fbn-col-actions{width:auto;}
  .fbn-actions{flex-wrap:nowrap;}
  .fbn-actions .fbn-btn{padding:10px 14px;font-size:13px;white-space:nowrap;}
}

@media (max-width:720px){
  .fbn-col-actions{width:100%;}
  .fbn-actions{justify-content:flex-start;gap:6px;}
  .fbn-actions .fbn-btn{padding:8px 10px;font-size:12px;}
}

@media (max-width:580px){
  .fbn-actions{gap:5px;}
  .fbn-actions .fbn-btn{padding:7px 8px;font-size:11px;}
}


/* iPad mini (portrait + paysage) : confort de lecture + actions stables */
@media (max-width: 820px){
  .fbn-app{padding:10px;}
  .fbn-topbar{align-items:stretch;}
  .fbn-topbar-actions{gap:8px;}
  .fbn-card-header{padding:14px 16px;}
  .fbn-card-body{padding:14px 16px 16px;}
  .fbn-archives-filters{padding:14px 16px;}
  .fbn-table-wrap{padding:14px 16px 18px; overflow-x:auto;}
  .fbn-table{min-width:720px;}
  .fbn-table thead th{padding:0 8px;}
  .fbn-table tbody td{padding:10px 8px;font-size:13px;}
  .fbn-actions{gap:6px;}
  .fbn-btn-icon{width:34px;height:34px;font-size:15px;}
}

.fbn-drawer{position:fixed;inset:0;display:none;z-index:99999;}
.fbn-drawer[aria-hidden="false"]{display:block;}
.fbn-drawer-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.35);}
.fbn-drawer-panel{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);height:auto;max-height:90vh;width:min(760px, 92vw);background:#fff;box-shadow:0 10px 30px rgba(0,0,0,.25);display:flex;flex-direction:column;border-radius:14px;overflow:hidden;}
.fbn-drawer-header{padding:18px 24px;border-bottom:1px solid rgba(0,0,0,.08);display:flex;align-items:flex-start;justify-content:space-between;gap:12px;}
.fbn-drawer-title{font-weight:700;}
.fbn-drawer-body{padding:24px 28px;overflow:auto;}
.fbn-kv{display:grid;grid-template-columns: 160px 1fr;gap:8px 12px;margin:10px 0;}
.fbn-kv div{padding:10px 0;border-bottom:1px dashed rgba(0,0,0,.10);}
.fbn-kv .k{font-size:12px;opacity:.75;}
.fbn-kv .v{font-size:14px;}
.fbn-chip{display:inline-block;border:1px solid rgba(0,0,0,.12);padding:4px 8px;border-radius:999px;font-size:12px;margin-right:6px;margin-bottom:6px;}

.fbn-crew-tools{padding:18px 24px;border-bottom:1px solid rgba(0,0,0,.07);}
.fbn-crew-matches{border:1px solid rgba(0,0,0,.10);border-radius:12px;padding:16px;background:rgba(0,0,0,.01);width:100%;max-width:none;display:block;}
.fbn-match{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px;border-bottom:1px dashed rgba(0,0,0,.12);}
.fbn-match:last-child{border-bottom:none;}
.fbn-match .left{display:flex;flex-direction:column;}
.fbn-match .left .main{font-weight:600;}
.fbn-match .left .sub{font-size:12px;opacity:.75;}
