/* Ali Gator v170 — IA appliquée visible dans l'en-tête + Paramètres › Fournisseurs IA plus clairs et plus rapides (ia-v170.js). */

/* ---------- pastille de l'en-tête ---------- */
html:root body .app-header .agia{position:relative;display:inline-flex;align-items:center;flex:none}
html:root body .app-header .agia-pill{display:inline-flex;align-items:center;gap:8px;height:36px;padding:0 13px 0 6px;margin:0;border:0;border-radius:999px;cursor:pointer;white-space:nowrap;font:600 13px/1 var(--lx-sans,inherit);letter-spacing:-.005em;color:#16402b;background:linear-gradient(180deg,#fff,#f4faec);box-shadow:inset 0 1px 0 #fff,0 0 0 1px rgba(29,97,65,.15),0 8px 18px -12px rgba(8,30,18,.4);transition:box-shadow .25s ease}
html:root body .app-header .agia-pill:hover,html:root body .app-header .agia-pill:focus-visible{outline:0;box-shadow:inset 0 1px 0 #fff,0 0 0 1px rgba(29,97,65,.32),0 12px 24px -14px rgba(8,30,18,.45)}
html:root body .agia-spark{flex:none;width:24px;height:24px;border-radius:50%;display:grid;place-items:center;color:#0e3523;background:radial-gradient(circle at 30% 25%,#e2fbb2,#a2de4a 70%);box-shadow:0 4px 10px -6px rgba(127,191,42,.9)}
html:root body .agia-spark svg{width:14px;height:14px}
html:root body .agia-meter{display:inline-flex;align-items:flex-end;gap:2px;height:12px;flex:none}
html:root body .agia-meter i{display:block;width:3px;border-radius:2px;background:rgba(29,97,65,.17)}
html:root body .agia-meter i:nth-child(1){height:5px}
html:root body .agia-meter i:nth-child(2){height:7px}
html:root body .agia-meter i:nth-child(3){height:9px}
html:root body .agia-meter i:nth-child(4){height:11px}
html:root body .agia-meter i:nth-child(5){height:13px}
html:root body .agia-meter i.on{background:linear-gradient(180deg,#5aa83f,#1d6141)}
html:root body .app-header .agia-eff{font-size:12.5px;font-weight:550;color:#3a6a4c}
/* détail par rôle, au survol */
html:root body .app-header .agia-card{position:absolute;z-index:1300;top:calc(100% + 12px);right:0;width:max-content;min-width:320px;max-width:420px;padding:14px 16px 12px;border-radius:18px;text-align:left;background:rgba(255,255,255,.98);-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);box-shadow:0 0 0 1px rgba(12,40,24,.08),0 26px 54px -26px rgba(8,30,18,.5);opacity:0;visibility:hidden;transform:translateY(-6px);pointer-events:none;transition:opacity .25s ease,transform .35s cubic-bezier(.22,1,.36,1),visibility 0s linear .35s}
html:root body .app-header .agia:is(:hover,:focus-within) .agia-card{opacity:1;visibility:visible;transform:none;transition:opacity .25s ease,transform .35s cubic-bezier(.22,1,.36,1),visibility 0s}
html:root body .agia-card strong,html:root body .agia-sum-h strong{display:block}
html:root body .agia-card>strong{margin:0 0 6px;font:600 10.5px/1.2 var(--lx-mono,ui-monospace,monospace);letter-spacing:.14em;text-transform:uppercase;color:#2f6a3f}
html:root body .agia-card small{display:block;margin-top:8px;font-size:11.5px;color:#8a968e}
html:root body :is(.agia-card,.agia-sum) .agia-row{display:grid;grid-template-columns:minmax(118px,1fr) auto auto minmax(66px,auto);align-items:center;gap:10px;padding:8px 0;border-top:1px solid rgba(12,40,24,.06);font-size:12.5px;line-height:1.3;color:#4a5a50}
html:root body :is(.agia-card,.agia-sum) .agia-row b{font-weight:650;color:#0c1a12;white-space:nowrap}
html:root body :is(.agia-card,.agia-sum) .agia-row em{font-style:normal;font-weight:550;color:#3a6a4c;white-space:nowrap}
html:root body :is(.agia-card,.agia-sum) .agia-row .is-off{grid-column:2/-1;font-weight:500;color:#9aa69e}
@media (max-width:1100px){html:root body .app-header .agia-model{display:none}}
@media (max-width:700px){html:root body .app-header .agia{display:none}}
@media (prefers-reduced-motion:reduce){html:root body .app-header .agia-card{transition:none!important}}

/* ---------- Paramètres › Fournisseurs IA ---------- */
html:root body .settings-modal .agia-sum{margin:4px 0 20px;padding:14px 18px 8px;border-radius:18px;border:1px solid rgba(29,97,65,.14);background:radial-gradient(120% 90% at 0% 0%,rgba(197,242,111,.24),rgba(197,242,111,0) 62%),#fbfdf8;box-shadow:inset 0 1px 0 #fff}
html:root body .settings-modal .agia-sum-h{display:flex;align-items:center;gap:10px;margin-bottom:6px}
html:root body .settings-modal .agia-sum-h strong{font-size:14.5px;font-weight:650;color:#0c1a12}
html:root body .settings-modal .agia-sum-h em{margin-left:auto;padding:4px 10px;border-radius:999px;font-style:normal;font-size:11.5px;font-weight:600;white-space:nowrap;transition:background-color .3s ease,color .3s ease}
html:root body .settings-modal .agia-live{background:rgba(162,222,74,.25);color:#2a5a0b}
html:root body .settings-modal .agia-pending{background:rgba(240,190,80,.22);color:#7a4f06}
html:root body .settings-modal .agia-sum .agia-row{grid-template-columns:minmax(130px,1fr) auto auto auto minmax(70px,auto)}
html:root body .settings-modal .agia-prov{font-style:normal;padding:3px 8px;border-radius:999px;background:rgba(12,40,24,.05);color:#4a5a50;font-size:11.5px;font-weight:600;white-space:nowrap}
@media (max-width:640px){html:root body .settings-modal .agia-sum .agia-row{grid-template-columns:1fr auto auto}html:root body .settings-modal .agia-sum .agia-row>span{grid-column:1/-1}html:root body .settings-modal .agia-prov{display:none}}

/* listes : plus hautes, plus nettes */
html:root body .settings-modal :is(.role-grid,.provider-card) label{display:grid;gap:7px}
html:root body .settings-modal :is(.role-grid,.provider-card) select:not(.agia-native){-webkit-appearance:none;appearance:none;width:100%;height:44px;padding:0 40px 0 14px;border-radius:12px;border:1px solid rgba(29,97,65,.18);background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 9.5 12 15l5.5-5.5' fill='none' stroke='%231d6141' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 14px center/15px no-repeat;font:550 14px/1.2 var(--lx-sans,inherit);color:#0c1a12;cursor:pointer;box-shadow:inset 0 1px 0 #fff,0 1px 2px rgba(8,30,18,.05);transition:border-color .2s ease,box-shadow .2s ease}
html:root body .settings-modal :is(.role-grid,.provider-card) select:not(.agia-native):hover{border-color:rgba(29,97,65,.34)}
html:root body .settings-modal :is(.role-grid,.provider-card) select:not(.agia-native):focus{outline:0;border-color:rgba(29,97,65,.5);box-shadow:0 0 0 4px rgba(162,222,74,.3)}

/* fournisseurs : onglets en pastilles */
html:root body .settings-modal .provider-tabs{display:inline-flex!important;gap:4px;padding:4px;margin:20px 0 14px;border:0!important;border-radius:14px;background:rgba(12,40,24,.05)}
html:root body:not(#lx) .settings-modal .provider-tabs>button{height:34px;padding:0 16px;border:0!important;border-radius:11px!important;background:transparent;color:#4a5a50;font-size:13px!important;font-weight:600;box-shadow:none;transition:background-color .25s ease,color .25s ease,box-shadow .25s ease}
html:root body:not(#lx) .settings-modal .provider-tabs>button.active{background:#fff;color:#0e3523;box-shadow:0 1px 2px rgba(8,30,18,.08),0 0 0 1px rgba(29,97,65,.16)}
html:root body .settings-modal .provider-card .tag{padding:4px 10px;border-radius:999px;background:rgba(162,222,74,.2);color:#2a5a0b;font-weight:600}

/* niveau de raisonnement : boutons + curseur qui glisse */
html:root body .settings-modal select.agia-native{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:0!important;opacity:0!important;pointer-events:none!important;overflow:hidden}
html:root body .settings-modal .agia-seg{position:relative;display:flex;flex-wrap:wrap;gap:4px;padding:4px;border-radius:14px;background:rgba(12,40,24,.05);box-shadow:inset 0 1px 2px rgba(8,30,18,.06)}
html:root body .settings-modal .agia-seg>button{position:relative;z-index:1;flex:1 1 0;min-width:92px;display:inline-flex;align-items:center;justify-content:center;gap:8px;height:38px;padding:0 10px;margin:0;border:0;border-radius:11px;background:transparent;color:#4a5a50;font:600 13px/1 var(--lx-sans,inherit);cursor:pointer;transition:color .25s ease}
html:root body .settings-modal .agia-seg>button:hover{color:#0e3523}
html:root body .settings-modal .agia-seg>button.on{color:#0e3523}
html:root body .settings-modal .agia-seg>button:focus{outline:0}
html:root body .settings-modal .agia-seg>button:focus-visible{box-shadow:0 0 0 3px rgba(162,222,74,.45)}
html:root body .settings-modal .agia-thumb{position:absolute;z-index:0;left:0;top:4px;width:0;height:38px;border-radius:11px;opacity:0;background:#fff;box-shadow:0 1px 2px rgba(8,30,18,.08),0 6px 14px -8px rgba(8,30,18,.3),0 0 0 1px rgba(29,97,65,.18);transition:left .42s cubic-bezier(.22,1,.36,1),top .42s cubic-bezier(.22,1,.36,1),width .42s cubic-bezier(.22,1,.36,1),opacity .3s ease}
html:root body .settings-modal .agia-bars{display:inline-flex;align-items:flex-end;gap:2px;height:12px}
html:root body .settings-modal .agia-bars i{display:block;width:3px;border-radius:2px;background:rgba(29,97,65,.16)}
html:root body .settings-modal .agia-bars i:nth-child(1){height:5px}
html:root body .settings-modal .agia-bars i:nth-child(2){height:7px}
html:root body .settings-modal .agia-bars i:nth-child(3){height:9px}
html:root body .settings-modal .agia-bars i:nth-child(4){height:11px}
html:root body .settings-modal .agia-bars i:nth-child(5){height:13px}
html:root body .settings-modal .agia-seg>button.on .agia-bars i.on{background:linear-gradient(180deg,#5aa83f,#1d6141)}
html:root body .settings-modal .agia-seg>button:not(.on) .agia-bars i.on{background:rgba(29,97,65,.42)}
@media (prefers-reduced-motion:reduce){html:root body .settings-modal .agia-thumb{transition:none}}
