#infomairie-banner{position:sticky;top:calc(var(--header-height,90px) + var(--rh-info-height,0px));z-index:121;display:flex;align-items:center;gap:10px;padding:8px 20px;background:#dceeff;color:#153f72;border-bottom:2px solid #549bd6;font-size:14px}#infomairie-banner[hidden]{display:none!important}#infomairie-banner strong{background:#246399;color:white;border-radius:8px;padding:4px 8px;white-space:nowrap}.im-current{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left;color:#153f72;background:transparent;font:inherit;padding:4px 6px}.im-current span{font-weight:400}.im-next{background:transparent;color:#153f72;padding:5px;white-space:nowrap}.im-dialog{width:min(760px,calc(100vw - 32px));border:1px solid #abc4d8;border-radius:16px;padding:22px;color:#193f35;max-height:90dvh;overflow:auto}.im-dialog::backdrop{background:#193f3566}.im-dialog header,.im-publications header{display:flex;justify-content:space-between;gap:12px;align-items:center}.im-dialog header h2{margin:0}.im-message{white-space:pre-wrap;overflow-wrap:anywhere}.im-dialog label:not(.im-choice){display:grid;gap:5px;margin:12px 0}.im-dialog input:not([type=checkbox]):not([type=radio]),.im-dialog select,.im-dialog textarea{width:100%;padding:9px;border:1px solid #aac5b7;border-radius:8px;font:inherit}.im-choice{display:flex;align-items:center;gap:8px;padding:7px 0}.im-choice input{flex-shrink:0}.im-editor-body{max-height:65dvh;overflow:auto;padding-right:6px}.im-editor footer{position:sticky;bottom:0;background:#fff;padding-top:8px}.im-people{max-height:180px;overflow:auto;border:1px solid #d2ddd6;padding:8px;border-radius:8px}.im-result{display:grid;grid-template-columns:minmax(100px,1fr) 1fr auto;gap:10px;align-items:center;margin:7px 0}.im-result progress{width:100%;accent-color:#246399}.im-publications h2{font-size:22px}.im-publications article{margin-bottom:18px}
body:has(.planning-expanded) #infomairie-banner{position:fixed;left:0;right:0;top:calc(var(--header-height,90px) + var(--rh-info-height,0px));z-index:121}
@media(max-width:600px){#infomairie-banner{padding:5px 10px;gap:6px;font-size:12px}#infomairie-banner strong{font-size:11px;padding:4px 6px}.im-next{font-size:11px;min-height:32px}.im-current{min-height:32px;font-size:12px}.im-dialog{padding:14px}.im-result{grid-template-columns:1fr auto}.im-result progress{grid-column:1/-1;grid-row:2}.im-editor-body{max-height:60dvh}}
/* Same compact geometry and label alignment for both information strips. */
#infomairie-banner,#inforh.info-rh{box-sizing:border-box;width:calc(100% - 12px);margin:0 6px;min-height:34px;padding:4px 8px;display:flex;flex-wrap:nowrap;gap:8px;align-items:center;border:1px solid #c5daf3;border-radius:10px;background:linear-gradient(100deg,#edf6ff,#f8f5ff);font-size:12px;line-height:1.35;box-shadow:none}
#inforh.info-rh{border-color:#e8c27d;background:linear-gradient(100deg,#fff0ce,#fff9ec);color:#64420b}
#infomairie-banner>strong,#inforh.info-rh>strong{display:inline-flex;align-items:center;gap:6px;flex:none;width:106px;min-width:106px;margin:0;padding:0 8px 0 0;border-right:1px solid #c6d9ee;border-radius:0;background:transparent;color:#164b7b;font-size:12px;line-height:22px;font-weight:750}
#inforh.info-rh>strong{color:#694309;border-right-color:#e5c383}
#infomairie-banner>strong>span,#inforh.info-rh>strong>span{display:inline-flex;align-items:center;justify-content:center;width:21px;height:21px;flex:none;border-radius:7px;color:white;background:linear-gradient(#4381c3,#334da0);box-shadow:0 1px 3px #23425d22;font-size:15px;font-weight:750;font-family:Georgia,serif}
#inforh.info-rh>strong>span{background:linear-gradient(#cc962b,#976110)}
#infomairie-banner .im-current,#inforh.info-rh .info-message{display:block;flex:1;min-width:0;overflow:hidden;white-space:nowrap;padding:0;font-size:12px;line-height:24px;text-overflow:clip;background:transparent;text-align:left}
.im-scroll-text{display:block;white-space:nowrap;width:100%;overflow:hidden;text-overflow:ellipsis;text-align:left;animation:none;transform:none}


#infomairie-banner .im-next,#inforh.info-rh #info-next{min-height:24px;padding:0 4px;font-size:11px;background:transparent;border:0;white-space:nowrap}
#inforh.info-rh #info-open{font-size:0;min-height:24px;padding:0 5px;border:0;background:transparent;color:#694309;flex:none}#inforh.info-rh #info-open:before{content:'☰';font-size:17px}#inforh.info-rh #info-count{font-size:11px}
@media(prefers-reduced-motion:reduce){.im-scroll-text{animation:none;padding-left:0;min-width:0}#infomairie-banner .im-current,#inforh.info-rh .info-message{text-overflow:ellipsis}}

#inforh.info-rh>strong{border-radius:8px;padding-left:6px;overflow:hidden}
#infomairie-banner>strong[role=button]{cursor:pointer}

#infomairie-banner .im-current,#inforh.info-rh .info-message{text-align:left}

/* RH : commandes compactes et alertes de fractionnement */
.rh-file-heading h1 #agent-archive,.rh-file-heading h1 #agent-delete{font-size:12px!important;font-weight:600!important;line-height:1.2!important;padding:5px 9px!important;min-height:28px!important;height:auto!important;vertical-align:middle!important;border-radius:7px!important;}
.rh-file-heading h1 #rh-edit-identity{font-size:12px!important;padding:2px 5px!important;min-height:23px!important;}
.rh-counter.balance-danger{background:#ffeded!important;border-color:#d94b4b!important;color:#9d2020!important;}
.agent-fraction-alert{display:block;color:#a32626;font-weight:700;margin-top:5px;}
#asa-section[open]>summary,#cycle-section[open]>summary{list-style:none;cursor:default;pointer-events:none;}
#asa-section[open]>summary::-webkit-details-marker,#cycle-section[open]>summary::-webkit-details-marker{display:none;}

.rh-inline-identity{display:flex;align-items:end;flex-wrap:wrap;gap:8px;margin:8px 0}.rh-inline-identity label{font-size:12px;display:flex;flex-direction:column;gap:3px}.rh-inline-identity input{width:175px;max-width:100%;font-size:15px;padding:6px 8px}.rh-inline-identity button{font-size:12px;padding:6px 10px;min-height:30px}.agent-balance.balance-danger{background:#fff0ee!important;border:1px solid #ce4848!important;color:#992525!important}

/* Fractionnement : conserver les alertes dans les cartes étroites */
.agent-balance{white-space:normal!important;overflow-wrap:anywhere;min-width:0;max-width:100%;box-sizing:border-box}.agent-balance.balance-danger{line-height:1.35}

/* Harmonisation de l'en-tête RH et des champs de saisie */
.rh-file-heading{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:16px!important;flex-wrap:wrap!important;padding:14px 18px!important}
.rh-file-heading>div:first-child{flex:1 1 300px;min-width:220px}
.rh-file-heading h1{font-size:clamp(19px,2vw,25px)!important;line-height:1.3!important;margin:3px 0!important}
.rh-file-navigation{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:8px!important;flex-wrap:wrap!important;flex:0 1 auto!important}
.rh-file-navigation label{font-size:12px!important;white-space:nowrap!important}
.rh-file-navigation #rh-file-year{width:82px!important;max-width:82px!important}
.rh-file-navigation #rh-agent-jump{width:190px!important;max-width:190px!important}
.rh-file-navigation #rh-list{font-size:13px!important;padding:8px 12px!important;min-height:36px!important;white-space:nowrap!important}
.rh-file-heading input,.rh-file-heading select,.rh-inline-identity input{border-radius:9px!important;box-sizing:border-box!important}
.rh-inline-identity input{border-radius:9px!important}
#rh-work-section #rh-rate{width:120px!important;max-width:100%!important;border-radius:9px!important}
#rh-work-section .profile-fields>div:has(#rh-rate){flex:0 0 auto!important;width:140px!important}
.cf-confirm-dialog{width:min(520px,calc(100vw - 32px));max-width:520px;border-radius:16px;padding:0;overflow:hidden;border:1px solid #d7dcd8;box-shadow:0 22px 65px #10251b44;color:#173c31;background:#fff}
.cf-confirm-dialog::backdrop{background:#10241e9c}
.cf-confirm-head{display:flex;gap:12px;align-items:center;padding:20px 22px 14px;border-bottom:1px solid #e0e9e4}
.cf-confirm-head>span{color:#b2362e;font-size:24px}
.cf-confirm-head h2{margin:0;font-size:19px}.cf-confirm-head p{margin:4px 0 0;font-size:12px;color:#526c61}
.cf-confirm-content{padding:16px 22px!important;line-height:1.5}.cf-confirm-content p{margin:0 0 10px;overflow-wrap:anywhere}
.cf-confirm-note{background:#fff2e4;border:1px solid #f2c7a1;border-radius:9px;padding:10px;font-size:13px}
.cf-confirm-dialog .plan-dialog-footer{display:flex;gap:9px;justify-content:flex-end;padding:14px 22px!important;border-top:1px solid #e0e9e4;flex-wrap:wrap}
.cf-confirm-dialog .plan-dialog-footer button{border-radius:9px;min-height:36px}
@media(max-width:750px){.rh-file-navigation{justify-content:flex-start!important}.rh-file-heading{align-items:flex-start!important}}

/* RH dossier: the identity header must stay in normal document flow.
   A sticky header previously overlapped the draggable tab navigation. */
#rh-root .rh-file-heading {
  position: relative !important;
  top: auto !important;
  z-index: auto !important;
  margin-bottom: 16px !important;
}
#rh-root #rh-tabs {
  position: relative;
  z-index: 1;
  clear: both;
  margin-top: 0 !important;
  margin-bottom: 16px;
  min-height: 44px;
}
#rh-root #rh-tabs button { position: relative; flex-shrink: 0; }
