:root{
  --blue:#0757a6;
  --blue-strong:#054783;
  --blue-50:#f3f7fc;
  --blue-100:#eaf2fb;
  --yellow:#f4c90d;
  --yellow-50:#fff9df;
  --text:#182536;
  --muted:#7b8795;
  --muted-2:#9aa4b0;
  --line:#e7ebf0;
  --line-strong:#dce3ea;
  --surface:#fff;
  --surface-soft:#fbfcfe;
  --success:#258245;
  --danger:#c63b3b;
  --danger-soft:#fff3f3;
  --shadow:0 10px 30px rgba(18,44,73,.045);
  --radius:16px;
  --content:1120px;
  /* Marge latérale mobile (gauche/droite) : ajustable ici, appliquée sous 760 px. */
  --mobile-pad:20px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:"Inter var","Inter",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--text);
  background:#fff;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
button,input,textarea{font:inherit}
button{cursor:pointer}
.hidden{display:none!important}
.muted{color:var(--muted);line-height:1.7}
.small-note,.field-hint{font-size:11px;color:var(--muted);line-height:1.55}
.eyebrow{font-size:10px;font-weight:800;letter-spacing:.14em;color:var(--blue)}

/* ---------- Brand ---------- */
.brand-logo{display:block;width:auto;height:46px;max-width:64px;max-height:46px;object-fit:contain;object-position:center}
.brand-logo-auth{height:88px;max-height:88px;max-width:84px;margin:0 auto 6px}
.brand-logo-topbar{height:72px;max-height:72px;max-width:120px}
.brand-lockup{display:flex;align-items:center;gap:11px;margin-bottom:32px}
.auth-brand{justify-content:center}
.brand-lockup.compact{margin:0}
.brand-mark{
  width:40px;height:40px;display:grid;grid-template-columns:repeat(3,1fr);gap:4px;align-items:end;
  padding:7px;background:var(--blue);border-radius:12px;box-shadow:0 7px 16px rgba(7,87,166,.13)
}
.brand-mark span{display:block;background:var(--yellow);border-radius:3px 3px 4px 4px}
.brand-mark span:nth-child(1){height:55%}
.brand-mark span:nth-child(2){height:82%}
.brand-mark span:nth-child(3){height:68%}
.brand-name{font-size:15px;font-weight:800;letter-spacing:.06em}
.brand-subtitle{font-size:10px;color:var(--muted);margin-top:3px}

/* ---------- Auth ---------- */
.auth-view{min-height:100vh;display:grid;place-items:center;padding:28px 20px;position:relative;overflow:hidden}
.auth-view:after{
  content:"";position:absolute;right:-160px;bottom:-190px;width:420px;height:420px;border-radius:50%;
  border:58px solid var(--yellow-50);pointer-events:none
}
.auth-wrap{width:min(470px,100%);position:relative;z-index:1}
.auth-card{
  background:#fff;border:0;border-radius:22px;padding:34px;
  box-shadow:0 22px 65px rgba(18,44,73,.09),0 2px 8px rgba(18,44,73,.04)
}
.auth-panel{display:none}
.auth-panel.active{display:block}
.auth-card h1{font-size:32px;line-height:1.12;letter-spacing:-.045em;margin:10px 0 11px}
.auth-card .muted{margin:0 0 26px;font-size:13px}
.form-stack{display:grid;gap:9px}
.field-label{font-size:12px;font-weight:700;color:#334155}
.field-row{display:flex;align-items:center;justify-content:space-between;margin-top:9px}
.input{
  width:100%;height:49px;padding:0 14px;border:1px solid var(--line-strong);background:#fff;color:var(--text);
  border-radius:11px;outline:none;transition:border-color .16s ease,box-shadow .16s ease,background .16s ease
}
.input:hover{border-color:#ccd6e0}
.input:focus{border-color:var(--blue);box-shadow:0 0 0 4px rgba(7,87,166,.07)}
.input::placeholder{color:#a5adb7}
.input-large{height:56px;font-size:15px;padding-left:42px}
.password-field,.input-with-action{position:relative}
.password-field .input{padding-right:45px}
.icon-button{
  border:0;background:transparent;color:#798594;display:inline-flex;align-items:center;justify-content:center;
  width:38px;height:38px;border-radius:9px;transition:background .16s ease,color .16s ease
}
.icon-button:hover{background:var(--surface-soft);color:var(--blue)}
.password-field .icon-button{position:absolute;right:7px;top:5px}
.link-button,.text-button{border:0;background:transparent;color:var(--blue);font-weight:700;padding:0}
.link-button{font-size:11px}
.text-button{font-size:12px}
.text-button:hover,.link-button:hover{text-decoration:underline}
.check-row{display:flex;gap:8px;align-items:center;margin:7px 0 8px;font-size:12px;color:#596777}
.check-row input{accent-color:var(--blue)}
.btn{
  height:49px;padding:0 17px;border-radius:11px;border:1px solid transparent;font-weight:700;font-size:12px;
  display:inline-flex;align-items:center;justify-content:center;gap:9px;transition:transform .16s ease,background .16s ease,border-color .16s ease,box-shadow .16s ease;white-space:nowrap
}
.btn:hover{transform:translateY(-1px)}
.btn-primary{background:var(--blue);color:#fff}
.btn-primary:hover{background:var(--blue-strong);box-shadow:0 10px 22px rgba(7,87,166,.14)}
.btn-secondary{background:#fff;color:var(--blue);border-color:var(--line-strong)}
.btn-secondary:hover{border-color:#bfcbd8;background:var(--blue-50)}
.btn-block{width:100%}
.auth-divider{display:flex;align-items:center;gap:12px;margin:20px 0}
.auth-divider:before,.auth-divider:after{content:"";height:1px;background:var(--line);flex:1}
.auth-divider span{font-size:10px;color:var(--muted-2)}

/* ---------- App shell ---------- */
.app-view{min-height:100vh;background:#fff}
.topbar{
  height:144px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;
  padding:0 28px;position:static;background:#ecf2ff;z-index:20
}
.topbar-left,.topbar-right{display:flex;align-items:center;gap:15px}
.online-dot{display:flex;align-items:center;gap:7px;font-size:11px;color:#697787}
.online-dot i{width:6px;height:6px;background:var(--success);border-radius:50%;display:block}
.service-status{display:flex;align-items:center;gap:8px;padding:10px 12px;font-size:11px;color:#667687}
.service-status i{width:7px;height:7px;background:var(--success);border-radius:50%;display:block;box-shadow:0 0 0 3px #edf8f0}
.profile-chip{background:#fff;border:0;display:flex;align-items:center;gap:8px;text-align:left;padding:4px 6px 4px 4px;border-radius:999px}
.profile-chip:hover{background:var(--surface-soft)}
.avatar,.big-avatar{display:grid;place-items:center;background:var(--blue-50);color:var(--blue);font-weight:800;border-radius:11px}
.avatar{width:36px;height:36px;font-size:11px;flex:0 0 36px}
.profile-account-label{font-size:11px;font-weight:700;color:#405269;padding-right:8px;white-space:nowrap}
.profile-text{display:none}
.mobile-nav-toggle{display:none}
.layout{display:grid;grid-template-columns:224px minmax(0,1fr);min-height:calc(100vh - 144px)}
.sidebar{border-right:1px solid var(--line);padding:18px 12px;display:flex;flex-direction:column;justify-content:space-between}
.sidebar nav{display:grid;gap:3px}
.nav-item{
  width:100%;border:0;background:transparent;color:#6b7887;padding:11px 12px;border-radius:10px;display:flex;align-items:center;
  gap:10px;text-align:left;font-size:12px;position:relative;transition:background .16s ease,color .16s ease
}
.nav-item:hover{background:var(--surface-soft);color:var(--text)}
.nav-link{text-decoration:none;color:#6b7887}
.nav-link:hover{color:var(--text);text-decoration:none}
.nav-item.active{background:var(--blue-50);color:var(--blue);font-weight:700}
.nav-item b{margin-left:auto;font-size:10px;background:#fff;padding:3px 6px;border-radius:99px;border:1px solid #e2eaf2}
.nav-icon{font-size:17px;line-height:1;width:20px;text-align:center}
.sidebar-bottom{display:grid;gap:8px}
.logout-button{border:0;background:#fff;color:#8c97a2;padding:10px 12px;text-align:left;font-size:11px}
.logout-button:hover{color:var(--danger)}

/* ---------- Main content ---------- */
.content{padding:46px 40px 80px;width:100%;max-width:calc(var(--content) + 80px);margin:0 auto}
.page{display:none}.page.active{display:block}
.hero-copy,.page-heading,.section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:24px}
.hero-copy h2,.page-heading h2{font-size:34px;letter-spacing:-.045em;line-height:1.08;margin:9px 0 8px}
.hero-copy .muted,.page-heading .muted{margin:0;font-size:13px}
.section-heading h3{font-size:18px;letter-spacing:-.025em;margin:7px 0 0}
.help-pill{border:1px solid var(--line);border-radius:999px;padding:8px 11px;display:flex;gap:8px;align-items:center;font-size:11px;color:#677586}
.help-pill span{width:18px;height:18px;border-radius:50%;display:grid;place-items:center;background:var(--yellow-50);color:#927900;font-weight:800}

/* ---------- Shared cards ---------- */
.card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
.search-card{margin-top:25px;padding:25px}
.search-form{display:grid;grid-template-columns:minmax(0,1fr);align-items:end}
.search-input-wrap label{display:block;margin-bottom:8px;font-size:12px;font-weight:700}
.input-with-action{position:relative}
.leading-symbol{position:absolute;left:14px;top:16px;color:var(--blue);font-weight:800;z-index:1;font-size:13px}
.search-input-wrap .input{padding-right:174px}
.clear-field{position:absolute;right:150px;top:9px}
.search-btn{position:absolute;right:5px;top:5px;height:46px;padding:0 18px;border-radius:100px}
.demo-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:13px;font-size:11px;color:var(--muted)}

/* ---------- Result ---------- */
.result-area{margin-top:22px}
.hero-copy,#resultArea{scroll-margin-top:5px}
.result-card{padding:22px 24px}
.result-header{display:flex;justify-content:space-between;gap:14px;align-items:flex-start}
.result-head-main{min-width:0}
.result-line{display:flex;align-items:baseline;flex-wrap:wrap;gap:1px 10px;margin-top:6px}
.result-card h3{font-size:21px!important;letter-spacing:-.025em;line-height:1.15;margin:0!important}
.result-id{font-size:11.5px;color:var(--muted)}
.result-message{margin:0;text-align:center;font-weight:700;padding-top:4px;padding-bottom:4px}
.result-header + .result-message{margin-top:12px}
.result-status{display:inline-flex;align-items:center;gap:4px;font-size:11px;font-weight:700;padding:0;border-radius:0;background:transparent;color:#786100;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}
.result-status>span:first-child{display:none}
.result-status.success{background:transparent;color:#28743e}
.result-status.danger{background:transparent;color:var(--danger)}
.meta-grid{display:grid;grid-template-columns:repeat(4,1fr);margin:14px 0 16px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.meta-item{padding:10px 14px;border-right:1px solid var(--line);min-width:0}
.meta-item:last-child{border-right:0}
.meta-item small{display:block;color:var(--muted);font-size:10px;margin-bottom:3px}
.meta-item strong{font-size:12px;overflow-wrap:anywhere}

/* ---------- Circuit du dossier : compact, avec un pouls doux sur l'étape actuelle ---------- */
.circuit{margin-top:16px}
.stepper{list-style:none;margin:0;padding:0;display:flex;counter-reset:s;--pulse:244,201,13}
.stepper.tone-success{--pulse:37,130,69}
.stepper.tone-reject{--pulse:198,59,59}
.step{position:relative;flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;text-align:center;padding:0 4px;counter-increment:s}
/* rail : de cette pastille à la suivante */
.step:not(:last-child):before{content:"";position:absolute;top:10px;left:calc(50% + 16px);width:calc(100% - 32px);height:2px;border-radius:2px;background:var(--line-strong)}
.step.done:not(:last-child):after,.step.maybe:not(:last-child):after{content:"";position:absolute;top:10px;left:calc(50% + 16px);width:calc(100% - 32px);height:2px;border-radius:2px;background:var(--blue);transform-origin:left center;animation:railFill calc(var(--d,200ms) * .95) ease-in-out calc(var(--i,0) * var(--d,200ms) + var(--d,200ms) * .15) backwards}
.step-dot{position:relative;flex:none;width:22px;height:22px}
.step-dot i{position:relative;z-index:1;display:grid;place-items:center;width:100%;height:100%;border-radius:50%;border:1.5px solid var(--line-strong);background:var(--surface);color:var(--muted-2);font-size:10px;font-weight:800;font-style:normal;line-height:1}
.step-dot i:after{content:counter(s)}
.step.done .step-dot i{background:var(--blue);border-color:var(--blue);color:#fff}
.step.done .step-dot i:after{content:"✓";font-size:11px}
/* étape conditionnelle (pointillés) : jamais cochée tant qu'elle n'est pas l'étape actuelle */
.step.cond:not(.current):not(.rejected) .step-dot i{border-style:dashed;background:transparent}
.step.current .step-dot i{background:var(--yellow);border-color:var(--yellow);color:#4a3b00;box-shadow:0 0 0 4px rgba(var(--pulse),.24),0 4px 14px rgba(var(--pulse),.35)}
.tone-success .step.current .step-dot i{background:var(--success);border-color:var(--success);color:#fff}
.step.rejected .step-dot i{background:var(--danger);border-color:var(--danger);color:#fff;box-shadow:0 0 0 4px rgba(var(--pulse),.18)}
.step.rejected .step-dot i:after{content:"!"}
.step-label{margin-top:7px;font-size:11px;font-weight:700;line-height:1.28;color:var(--muted-2);overflow-wrap:anywhere}
.step.done .step-label,.step.current .step-label,.step.rejected .step-label{color:var(--text)}
.step-caption{margin-top:2px;font-size:10px;font-weight:600;line-height:1.2;color:var(--muted)}
.step.current .step-caption{color:#8a6d00}
.tone-success .step.current .step-caption{color:var(--success)}
.step.rejected .step-caption{color:var(--danger)}
.circuit-note{margin:12px 0 0;text-align:center;font-size:10.5px;line-height:1.4;color:var(--muted-2)}
/* pouls : deux anneaux qui s'élargissent en se dissipant + légère respiration de la pastille */
.step.current .step-dot:before,.step.current .step-dot:after,
.step.rejected .step-dot:before,.step.rejected .step-dot:after{content:"";position:absolute;inset:0;z-index:0;border-radius:50%;pointer-events:none;background:rgba(var(--pulse),.55);opacity:0;will-change:transform,opacity;animation:stepPulse 3.4s cubic-bezier(.25,.6,.35,1) calc(var(--t) + .5s) infinite}
.step.current .step-dot:after,.step.rejected .step-dot:after{animation-delay:calc(var(--t) + 2.2s)}
/* --- entrée : chaque étape franchie se remplit à son tour (--i = rang, --d = pas, posés par le JS) --- */
.step{--t:calc(var(--i,0) * var(--d,200ms))}
.step.done .step-dot i{animation:dotFill .42s cubic-bezier(.2,.8,.3,1) var(--t) backwards}
.step.maybe .step-dot i{animation:dotPop .35s ease-out var(--t) backwards}
.step.current .step-dot i,.step.rejected .step-dot i{animation:dotArrive .6s cubic-bezier(.2,.9,.3,1.25) var(--t) backwards,stepBreathe 3.4s ease-in-out calc(var(--t) + .6s) infinite}
.step.done .step-label,.step.current .step-label,.step.rejected .step-label{animation:labelIn .4s ease var(--t) backwards}
.step-caption{animation:captionIn .4s ease calc(var(--t) + .3s) backwards}
@keyframes dotFill{from{background:var(--surface);border-color:var(--line-strong);color:transparent;transform:scale(.7)}55%{transform:scale(1.16)}}
@keyframes dotPop{from{opacity:.2;transform:scale(.7)}}
@keyframes dotArrive{from{background:var(--surface);border-color:var(--line-strong);color:transparent;box-shadow:none;transform:scale(.7)}55%{transform:scale(1.22)}}
@keyframes railFill{from{transform:scaleX(0)}}
@keyframes labelIn{from{color:var(--muted-2)}}
@keyframes captionIn{from{opacity:0;transform:translateY(-4px)}}
/* tant que le circuit n'est pas à l'écran, tout reste en pause à l'état de départ */
.circuit.hold *,.circuit.hold *:before,.circuit.hold *:after{animation-play-state:paused!important}
@keyframes stepPulse{0%{transform:scale(1);opacity:.7}70%{opacity:0}100%{transform:scale(2.9);opacity:0}}
@keyframes stepBreathe{0%,100%{transform:scale(1)}50%{transform:scale(1.08)}}
@media (prefers-reduced-motion:reduce){
  .stepper *,.stepper *:before,.stepper *:after{animation:none!important}
  .step-dot:before,.step-dot:after{opacity:0!important}
}
/* mobile : 2 rangées (4 étapes par rangée, 3 pour le circuit court) au lieu d'une longue colonne */
@media (max-width:760px){
  .circuit{margin-top:14px}
  .stepper{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));row-gap:14px}
  .stepper.n6{grid-template-columns:repeat(3,minmax(0,1fr))}
  .stepper.n8 .step:nth-child(4n):before,.stepper.n8 .step:nth-child(4n):after,.stepper.n6 .step:nth-child(3n):before,.stepper.n6 .step:nth-child(3n):after{display:none}
  .step{padding:0 2px}
  .step-label{margin-top:6px;font-size:10.5px}
}
@media (max-width:360px){.step-label{font-size:10px}.meta-item strong{font-size:11px}}
html[data-theme="dark"] .stepper.tone-success{--pulse:76,175,125}
html[data-theme="dark"] .stepper.tone-reject{--pulse:224,108,108}
html[data-theme="dark"] .step.current .step-caption{color:var(--yellow)}
html[data-theme="dark"] .tone-success .step.current .step-caption{color:var(--success)}
.reject-banner{margin-top:17px;padding:13px 14px;border-radius:11px;background:var(--danger-soft);border:1px solid #f1dada;color:#a13232;font-size:11px;line-height:1.6}

/* ---------- Recent ---------- */
.recent-section{margin-top:38px}
.recent-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:15px}
.recent-item{
  position:relative;padding:15px 46px 15px 15px;text-align:left;border:1px solid var(--line);border-radius:13px;background:#fff;display:flex;flex-direction:column;gap:7px;
  transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease
}
.recent-item:hover{border-color:#cdd8e4;box-shadow:0 10px 22px rgba(20,45,70,.04);transform:translateY(-1px)}
.recent-item .code-button{border:0;background:transparent;padding:0;text-align:left;font:inherit;color:inherit;display:block;width:100%}
.recent-item .code{font-weight:800;letter-spacing:.04em;color:#24384d;font-size:12px}
.recent-item .date{font-size:10px;color:var(--muted)}
.recent-item .mini-status{font-size:9px;font-weight:700;align-self:flex-start;padding:0;border-radius:0;background:transparent;color:var(--blue);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}
.recent-item .mini-status.reject{background:transparent;color:var(--danger)}
.recent-delete{position:absolute;right:8px;top:9px;width:34px;height:34px;padding:0}
.recent-delete img{display:block;width:18px;height:18px;object-fit:contain;opacity:.8}
.recent-delete:hover img{opacity:1}

/* ---------- History ---------- */
.page-heading{align-items:flex-start}
.page-heading h2{margin-bottom:6px}
.table-card{margin-top:25px;overflow:hidden}
.history-row{display:grid;grid-template-columns:1.45fr 1fr .7fr auto;gap:20px;align-items:center;padding:17px 19px;border-bottom:1px solid var(--line)}
.history-row:last-child{border-bottom:0}
.history-head{background:var(--surface-soft);font-size:9px;text-transform:uppercase;letter-spacing:.1em;color:#8a96a3;font-weight:800}
.history-row .history-code{font-weight:800;color:#28415e;font-size:12px}
.history-row span{font-size:11px;color:#687788}
.history-row .repeat{font-size:10px;background:#f5f7fa;padding:5px 8px;border-radius:999px;justify-self:start}

/* ---------- Suggestion ---------- */
.suggestion-card{margin-top:25px;padding:25px}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}
.form-grid>div,.suggestion-card>div:not(.form-footer){display:grid;gap:8px}
.textarea{height:auto;padding:13px;resize:vertical;min-height:145px;line-height:1.55}
.form-footer{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-top:14px}

/* ---------- Account ---------- */
.account-grid{display:grid;grid-template-columns:285px 1fr;gap:15px;margin-top:25px}
.profile-card{padding:25px;text-align:center}
.big-avatar{width:68px;height:68px;border-radius:18px;margin:0 auto 14px;font-size:17px}
.profile-card h3{margin:0 0 4px;font-size:16px}
.profile-card .muted{margin:0 0 18px;font-size:11px}
.info-card{padding:4px 21px}
#logoutBtnAccount{margin-top:10px}
.info-row{display:flex;justify-content:space-between;gap:20px;align-items:center;padding:17px 0;border-bottom:1px solid var(--line);font-size:11px}
.info-row:last-child{border-bottom:0}
.info-row span:first-child{color:var(--muted)}
.status{display:inline-flex;padding:5px 8px;border-radius:999px}
.status.success{background:#edf8ef;color:#26753a}

/* Icônes animées Lottie : jouées une fois par vue, sans boucle. */
.lottie-icon{width:84px;height:84px;margin:0 auto 18px}
.lottie-icon svg{width:100%!important;height:100%!important;display:block}
/* Popups : Lottie seule sur sa ligne, en haut à gauche, titres en dessous. */
.modal-lottie-head{margin-bottom:12px}
.modal-lottie-head .lottie-icon{width:64px;height:64px;margin:0 0 12px}
.modal-lottie-titles{min-width:0}
.help-modal .modal-lottie-head h2{margin:4px 0 0;font-size:22px}
/* Cartes résultat : icône à gauche, texte à droite. */
.result-card .result-header-lottie{align-items:center}
.result-card .result-header-lottie .lottie-icon{width:64px;height:64px;flex:none;margin:0}
.result-card .result-header-lottie .lottie-check{width:48px;height:48px}
.result-card .result-header-lottie .result-head-main{flex:1;min-width:0}
/* Minuteur déplacé au-dessus du champ : même design, pleine largeur de la grille. */
#searchForm .wait-box{grid-column:1 / -1;margin:0 0 12px}
html[data-theme="dark"] .lottie-icon{filter:invert(1)}
/* ---------- Toast ---------- */
.toast{
  position:fixed;left:50%;top:calc(16px + env(safe-area-inset-top,0px));transform:translate(-50%,-18px);
  width:min(440px,calc(100vw - 32px));display:flex;align-items:flex-start;gap:12px;
  padding:14px 46px 14px 14px;border-radius:14px;background:#0757a6;color:#fff;
  font-size:13.5px;font-weight:600;line-height:1.45;box-shadow:0 18px 45px rgba(12,24,40,.28);
  opacity:0;pointer-events:none;transition:opacity .22s ease,transform .22s ease;z-index:400
}
.toast.show{opacity:1;transform:translate(-50%,0);pointer-events:auto}
.toast-icon{flex:0 0 24px;width:24px;height:24px;border-radius:50%;background:rgba(255,255,255,.22);display:grid;place-items:center;font-size:13px;font-weight:800}
.toast-msg{flex:1;padding-top:2px;overflow-wrap:anywhere}
.toast-close{position:absolute;top:9px;right:9px;width:30px;height:30px;border:0;border-radius:8px;background:transparent;color:inherit;font-size:21px;line-height:1;opacity:.85;cursor:pointer}
.toast-close:hover{background:rgba(255,255,255,.18);opacity:1}
.toast-success{background:#1f7a3f}
.toast-error{background:#c0392b}
.toast-warning{background:#9a5b00}
.toast-info{background:#0757a6}


/* ---------- Footer ---------- */
.site-footer{
  display:flex;justify-content:space-between;align-items:center;gap:18px;
  margin-top:54px;padding-top:18px;border-top:1px solid var(--line);
  color:var(--muted-2);font-size:10px;line-height:1.5;
}
.site-footer a{color:#6e7c8b;text-decoration:none;font-weight:500;transition:color .16s ease}
.site-footer a:hover{color:var(--blue)}

/* ---------- Help modal ---------- */
.modal-backdrop{
  position:fixed;inset:0;display:grid;place-items:center;padding:22px;background:rgba(16,31,48,.34);
  backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);opacity:0;visibility:hidden;pointer-events:none;
  transition:opacity .18s ease,visibility .18s ease;z-index:200;
}
.modal-backdrop.open{opacity:1;visibility:visible;pointer-events:auto}
.help-modal{position:relative;width:min(430px,100%);background:#fff;border:1px solid rgba(220,227,234,.9);border-radius:22px;padding:30px;box-shadow:0 26px 80px rgba(21,42,65,.18);transform:translateY(10px) scale(.985);transition:transform .2s ease}
.modal-backdrop.open .help-modal{transform:translateY(0) scale(1)}
.help-modal h2{margin:9px 0 8px;font-size:25px;line-height:1.12;letter-spacing:-.04em}
.help-modal .muted{margin:0;font-size:12px;line-height:1.7;max-width:330px}
.modal-icon{width:44px;height:44px;display:grid;place-items:center;margin-bottom:18px;border-radius:14px;background:var(--yellow-50);color:#7a6500;font-weight:800;font-size:17px}
.modal-close{position:absolute;right:12px;top:12px;width:36px;height:36px;font-size:21px;color:#8b97a4}
.modal-actions{display:grid;gap:10px;margin-top:24px}
.modal-actions .btn{height:48px}
body.modal-open{overflow:hidden}

/* ---------- Responsive ---------- */
@media (max-width:1020px){
  .content{padding:38px 28px 66px}
  .layout{grid-template-columns:210px minmax(0,1fr)}
  .recent-grid{grid-template-columns:1fr 1fr}
}

@media (max-width:760px){
  .topbar{height:100px;padding:0 var(--mobile-pad)}
  .mobile-nav-toggle{display:inline-flex;position:relative;z-index:41;width:42px;height:42px}
  .mobile-nav-toggle span{display:block;width:18px;height:1.5px;background:#24384d;border-radius:999px;transition:transform .2s ease,opacity .2s ease}
  .mobile-nav-toggle{flex-direction:column;gap:4px}
  .mobile-nav-toggle.is-open span:nth-child(1){transform:translateY(5.5px) rotate(45deg)}
  .mobile-nav-toggle.is-open span:nth-child(2){opacity:0}
  .mobile-nav-toggle.is-open span:nth-child(3){transform:translateY(-5.5px) rotate(-45deg)}
  .sidebar{
    position:fixed;left:0;top:100px;bottom:0;width:100%;background:#fff;z-index:40;
    transform:translateX(-100%);transition:transform .22s ease;box-shadow:20px 0 45px rgba(20,50,80,.08);overflow:auto
  }
  .sidebar.open{transform:translateX(0)}
  .sidebar{padding:24px 18px 30px}
  .layout{grid-template-columns:1fr;min-height:calc(100vh - 100px)}
  .content{padding:31px var(--mobile-pad) 50px}
  .hero-copy h2,.page-heading h2{font-size:30px}
}

@media (max-width:620px){
  .profile-text,.online-dot{display:none}
  .profile-account-label{display:none}
  .brand-mark{width:38px;height:38px}
  .brand-logo-topbar{height:72px;max-width:100px}
  .content{padding:26px var(--mobile-pad) 42px}
  .hero-copy,.page-heading,.section-heading{align-items:flex-start;flex-direction:column}
  .hero-copy{align-items:center;text-align:center;width:100%}
  .hero-copy h2{width:100%;text-align:center}
  .help-pill{display:none}
  .search-card,.result-card,.suggestion-card{padding:19px}
  .search-form{grid-template-columns:1fr}
  .search-input-wrap .input{padding-right:42px}
  .clear-field{right:9px}
  .search-btn{position:static;width:100%;margin-top:10px}
  .recent-grid,.form-grid,.account-grid{grid-template-columns:1fr}
  .result-card{padding:16px}
  .meta-grid{grid-template-columns:1.4fr 1fr;margin:12px 0 14px}
  .meta-item{padding:8px 12px;border-right:0;border-bottom:1px solid var(--line)}
  .meta-item:nth-child(odd){border-right:1px solid var(--line)}
  .meta-item:nth-last-child(-n+2){border-bottom:0}
  .auth-card{padding:25px 22px}
  .brand-logo-auth{height:78px;max-width:74px}
  .auth-card h1{font-size:29px}
  .history-row{grid-template-columns:1fr auto;gap:8px 15px}
  .history-head{display:none}
  .history-row>span:nth-child(2){grid-column:1}
  .history-row>span:nth-child(3){grid-column:1}
  .history-row>button{grid-column:2;grid-row:1 / span 3;align-self:center}
  .form-footer{flex-direction:column;align-items:stretch}
  .form-footer .btn{width:100%}
  .btn{width:100%}
  .site-footer{flex-direction:column;align-items:flex-start;gap:6px;margin-top:42px}
  .help-modal{width:min(430px,100%);max-width:calc(100vw - 40px);margin-inline:auto;padding:25px 21px}
}


/* ---------- Image icons ---------- */
.leading-symbol{position:absolute;left:12px;top:50%;transform:translateY(-50%);width:28px;height:28px;display:grid;place-items:center;pointer-events:none}
.leading-symbol img{display:block;width:28px;height:28px;object-fit:contain}
.clear-field{position:absolute;right:7px;top:50%;transform:translateY(-50%);padding:0}
.clear-field img,.history-delete img{display:block;width:20px;height:20px;object-fit:contain}
.clear-field:hover,.history-delete:hover{background:var(--surface-soft)}
.history-delete{padding:7px}


/* ---------- Refinements V6 ---------- */
.auth-links{font-size:11px;gap:5px}
.auth-demo{margin-top:14px;display:flex;align-items:center;justify-content:center;gap:6px;font-size:9px;color:var(--muted-2)}
.auth-demo .text-button{font-size:10px;font-weight:650}
.auth-demo span{font-size:9px;color:var(--muted-2)}

.brand-logo{max-width:100%;}
.brand-logo-auth{width:auto;height:78px;max-width:90px;object-fit:contain}
.brand-logo-topbar{width:auto;height:42px;max-width:60px;object-fit:contain}

.recent-item{padding-right:82px}
.recent-actions{position:absolute;right:8px;top:9px;display:flex;align-items:center;justify-content:flex-end;gap:3px;height:34px}
.recent-actions .icon-button{width:34px;height:34px;min-width:34px;padding:0;display:inline-flex;align-items:center;justify-content:center}
.recent-actions .notification-toggle{order:1}
.recent-actions .recent-delete{order:2}
.recent-actions img{display:block;width:17px;height:17px;object-fit:contain;flex:0 0 17px}
.recent-actions .recent-delete img{width:18px;height:18px;flex-basis:18px}
.notification-toggle img{opacity:.62;transition:opacity .16s ease,transform .16s ease}
.notification-toggle:hover img{opacity:1;transform:scale(1.04)}
.notification-toggle.is-active img{opacity:1}
.notification-toggle.is-active{background:var(--yellow-50)}

.modal-backdrop{padding:20px}
.compact-modal{width:min(440px,100%);padding:28px}
.modal-icon img{width:22px;height:22px;object-fit:contain;display:block}
.danger-modal-icon{background:var(--danger-soft);color:var(--danger)}
.modal-reference{margin-top:18px;padding:11px 13px;border:1px solid var(--line);border-radius:10px;background:var(--surface-soft);font-size:12px;font-weight:750;letter-spacing:.04em;color:#30455e}
.modal-actions-inline{grid-template-columns:1fr 1fr}
.danger-action{background:var(--danger)}
.danger-action:hover{background:#a92f2f;box-shadow:0 10px 22px rgba(198,59,59,.14)}

@media (max-width:620px){
  .auth-links{font-size:10px}
  .auth-links .text-button{font-size:11px}
  .auth-demo{font-size:8px;margin-top:12px}
  .auth-demo .text-button{font-size:9px}
  .recent-item{padding-right:82px}
  .recent-actions{right:6px}
  .compact-modal{width:min(430px,100%);max-width:calc(100vw - 40px);margin-inline:auto;padding:24px 20px}
  .modal-actions-inline{grid-template-columns:1fr}
}


/* ---------- V7 refinements ---------- */
.auth-register-prompt{display:grid;gap:9px;margin-top:18px;text-align:center;font-size:11px;color:var(--muted)}
.auth-register-button{height:49px;text-decoration:none}
.auth-register-button span{font-size:14px}
.field-group{display:grid;gap:8px}
.field-hint{display:block;font-size:10px;color:var(--muted-2);line-height:1.45}
.profile-modal{width:min(560px,100%)}
.profile-modal-icon{background:var(--blue-50);color:var(--blue);font-size:18px}
.profile-photo-editor{display:flex;align-items:center;gap:15px;padding:14px;border:1px solid var(--line);background:var(--surface-soft);border-radius:14px;margin-top:22px}
.profile-preview-wrap{position:relative;flex:0 0 auto;width:64px;height:64px}
.profile-preview-avatar,.profile-preview-image{width:64px;height:64px;border-radius:18px;display:grid;place-items:center;object-fit:cover}
.profile-preview-avatar{background:var(--blue-50);color:var(--blue);font-weight:800;font-size:16px}
.profile-upload-copy{display:grid;gap:3px;min-width:0}
.profile-upload-copy strong{font-size:12px}
.profile-upload-copy span{font-size:10px;color:var(--muted)}
.upload-button{display:inline-flex;align-items:center;justify-content:center;align-self:start;margin-top:4px;width:max-content;height:30px;padding:0 10px;border:1px solid var(--line-strong);background:#fff;border-radius:8px;color:var(--blue);font-size:10px;font-weight:700;cursor:pointer}
.upload-button:hover{background:var(--blue-50);border-color:#c8d5e2}
.profile-form{margin-top:4px}
.profile-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:16px}
.profile-form-grid .field-group:last-child{grid-column:1 / -1}
.profile-modal-actions{margin-top:20px}
.profile-image{display:block;width:68px;height:68px;border-radius:18px;object-fit:cover;margin:0 auto 14px}
.profile-card .profile-photo-wrap{width:68px;height:68px;margin:0 auto 14px}
.profile-card .profile-photo-wrap .big-avatar{margin:0}
.recent-actions .icon-button{margin:0}

@media (max-width:620px){
  .profile-form-grid{grid-template-columns:1fr}
  .profile-form-grid .field-group:last-child{grid-column:auto}
  .profile-photo-editor{align-items:flex-start}
  .profile-modal-actions{grid-template-columns:1fr}
}


/* ---------- V9 polish ---------- */
.topbar{background:#ecf2ff}
.mobile-nav-toggle{position:relative;flex:0 0 38px;width:38px;height:38px;padding:0;color:#173654;border:1px solid rgba(7,87,166,.10);background:rgba(255,255,255,.62);border-radius:11px;display:none}
.mobile-nav-toggle svg{position:absolute;left:50%;top:50%;width:20px;height:20px;transform:translate(-50%,-50%);display:block;overflow:visible;transition:opacity .16s ease,transform .2s ease}
.mobile-nav-toggle .menu-dots{fill:currentColor}
.mobile-nav-toggle .menu-close{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;opacity:0;transform:translate(-50%,-50%) scale(.82)}
.mobile-nav-toggle.is-open .menu-dots{opacity:0;transform:translate(-50%,-50%) scale(.82)}
.mobile-nav-toggle.is-open .menu-close{opacity:1;transform:translate(-50%,-50%) scale(1)}
.back-button{width:40px;height:40px;flex:0 0 40px;border:1px solid var(--line-strong);background:#fff;border-radius:100px;color:var(--blue);display:grid;place-items:center;transition:background .16s ease,border-color .16s ease,transform .16s ease}
.back-button:hover{background:var(--blue-50);border-color:#c8d5e2;transform:translateX(-1px)}
.back-button svg{width:19px;height:19px;display:block}
.auth-heading-row{display:flex;align-items:flex-start;gap:14px}
.auth-heading-row h1{margin-top:2px}
.auth-switch-bottom{display:grid;gap:8px;margin-top:18px;text-align:center;font-size:11px;color:var(--muted)}
.auth-switch-bottom .btn{height:49px}
.hero-copy{align-items:flex-end}
.hero-copy h2{margin-top:0}
.demo-row{display:none}
.suggestion-card{margin-top:30px;padding:30px}
.suggestion-card .form-grid{gap:18px}
.suggestion-card .field-label{margin-bottom:1px}
.suggestion-card .textarea{min-height:170px;margin-top:0}
.suggestion-card>div + div{margin-top:20px}
.suggestion-card .form-footer{margin-top:22px;padding-top:4px}
.recent-actions{position:absolute;top:8px;right:8px;width:68px;height:32px;display:grid;grid-template-columns:32px 32px;align-items:center;justify-content:end;gap:4px}
.recent-actions .icon-button{width:32px;height:32px;min-width:32px;padding:0;border-radius:9px;display:flex;align-items:center;justify-content:center;line-height:0}
.recent-actions .icon-button img{display:block;width:18px;height:18px;min-width:18px;min-height:18px;object-fit:contain;flex:0 0 18px;line-height:0}
.recent-actions .notification-toggle img,
.recent-actions .recent-delete img{width:18px;height:18px;flex:0 0 18px}
.notification-toggle{color:#56718d}
.notification-toggle.is-active{color:#7a6400;background:var(--yellow-50)}
.recent-delete{color:#7d8996}
.recent-delete:hover{color:var(--danger)}
.modal-icon img{width:20px;height:20px;display:block;object-fit:contain}

@media (max-width:760px){
  .mobile-nav-toggle{display:inline-flex;order:1}
  .profile-chip{order:2}
  .topbar-right{gap:8px}
  .sidebar{top:100px;width:100vw}
}


/* ---------- V10 alignment polish ---------- */
.recent-actions{isolation:isolate}
.recent-actions .icon-button{vertical-align:middle}
.recent-actions .icon-button img{aspect-ratio:1 / 1}

@media (max-width:620px){
  .recent-actions{top:8px;right:8px;width:68px;grid-template-columns:32px 32px;gap:4px}
  .profile-chip{padding:4px}
  .mobile-nav-toggle{order:1}
  .profile-chip{order:2}
}


/* ---------- V11 final alignment / header polish ---------- */
.recent-actions{
  position:absolute;
  top:8px;
  right:8px;
  width:auto;
  height:32px;
  display:flex;
  flex-direction:row;
  align-items:center;
  justify-content:flex-end;
  gap:4px;
  margin:0;
  padding:0;
}
.recent-actions .icon-button{
  position:relative;
  flex:0 0 32px;
  width:32px;
  min-width:32px;
  height:32px;
  min-height:32px;
  margin:0;
  padding:0;
  border:0;
  border-radius:9px;
  display:flex;
  flex-direction:row;
  align-items:center;
  justify-content:center;
  line-height:0;
}
.recent-actions .icon-button img{
  display:block;
  width:18px;
  height:18px;
  min-width:18px;
  min-height:18px;
  max-width:18px;
  max-height:18px;
  flex:0 0 18px;
  object-fit:contain;
  object-position:center;
  margin:0;
  padding:0;
}
.recent-actions .notification-toggle,
.recent-actions .recent-delete{
  position:relative;
  top:auto;
  right:auto;
  order:initial;
}

/* Mobile header: menu at the far right, profile immediately to its left. */
@media (max-width:760px){
  .topbar{padding-left:var(--mobile-pad);padding-right:var(--mobile-pad)}
  .topbar-right{
    margin-left:auto;
    width:auto;
    gap:12px;
    justify-content:flex-end;
  }
  .mobile-nav-toggle{
    order:2;
    border:0;
    background:transparent;
    width:44px;
    min-width:44px;
    height:44px;
    color:#173654;
    border-radius:0;
  }
  .mobile-nav-toggle:hover,
  .mobile-nav-toggle:focus-visible{background:transparent;color:var(--blue)}
  .mobile-nav-toggle svg{width:28px;height:28px}
  .mobile-nav-toggle .menu-dots circle{r:2.1}
  .profile-chip{
    order:1;
    margin:0;
    padding:0;
    background:transparent;
    border:0;
    width:40px;
    min-width:40px;
    height:40px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
  }
  .profile-chip:hover,
  .profile-chip:focus-visible{background:transparent}
  .profile-chip .avatar{
    width:36px;
    height:36px;
    border-radius:50%;
  }
  .recent-actions{
    display:flex;
    flex-direction:row;
    align-items:center;
    justify-content:flex-end;
    gap:4px;
    width:auto;
    height:32px;
    top:8px;
    right:8px;
  }
  .recent-actions .icon-button,
  .recent-actions .notification-toggle,
  .recent-actions .recent-delete{
    flex:0 0 32px;
    width:32px;
    min-width:32px;
    height:32px;
    min-height:32px;
  }
}

/* Desktop header: give the SONILOGA mark more presence. */
@media (min-width:761px){
  .topbar{height:144px}
  .layout{min-height:calc(100vh - 144px)}
  .brand-logo-topbar{
    height:84px;
    width:auto;
    max-width:140px;
  }
}


/* ---------- V12 administration ---------- */
.brand-home-link{appearance:none;border:0;background:transparent;padding:0;cursor:pointer}
.brand-home-link:focus-visible{outline:2px solid rgba(7,87,166,.25);outline-offset:5px;border-radius:10px}
.admin-heading{align-items:center}
.admin-role-pill{font-size:10px;font-weight:750;color:var(--blue);background:var(--blue-50);border:1px solid #dce8f4;padding:8px 11px;border-radius:999px}
.admin-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-top:26px}
.admin-kpi{padding:18px 18px 16px;display:grid;gap:4px}
.admin-kpi span{font-size:10px;color:var(--muted);font-weight:650}
.admin-kpi strong{font-size:25px;letter-spacing:-.04em}
.admin-kpi small{font-size:9px;color:var(--muted-2)}
.admin-chart-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(300px,.8fr);gap:14px;margin-top:14px}
.admin-chart-card{padding:20px}
.admin-chart-wide{min-width:0}
.admin-card-head{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:12px}
.admin-card-head h3{font-size:15px;letter-spacing:-.02em;margin:0 0 4px}
.admin-card-head span{font-size:10px;color:var(--muted)}
.chart-wrap{height:270px;position:relative}
.chart-small{height:270px}
.admin-quick-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:14px}
.admin-quick{text-align:left;padding:18px;display:grid;grid-template-columns:auto 1fr auto;column-gap:11px;row-gap:3px;transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease}
.admin-quick:hover{transform:translateY(-1px);border-color:#ccd8e4;box-shadow:0 10px 24px rgba(18,44,73,.05)}
.admin-quick-icon{grid-row:1 / span 2;width:34px;height:34px;border-radius:10px;background:var(--blue-50);display:grid;place-items:center;color:var(--blue);font-weight:800}
.admin-quick strong{font-size:12px;align-self:end}
.admin-quick small{font-size:9px;color:var(--muted);line-height:1.45}
.admin-quick>span:last-child{grid-column:3;grid-row:1 / span 2;align-self:center;color:var(--blue);font-size:16px}
.admin-table-card{margin-top:26px;overflow:hidden}
.admin-toolbar{padding:16px;display:flex;gap:10px;align-items:center;border-bottom:1px solid var(--line)}
.admin-search{position:relative;flex:1;min-width:0}
.admin-search>span{position:absolute;left:12px;top:14px;color:var(--muted);font-size:14px;z-index:1}
.admin-search .input{padding-left:34px}
.admin-select{width:170px;height:43px;font-size:11px}
.admin-table-wrap{overflow-x:auto}
.admin-table{width:100%;border-collapse:collapse;min-width:760px}
.admin-table th{font-size:9px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted-2);font-weight:750;text-align:left;padding:13px 16px;background:#fcfdff;border-bottom:1px solid var(--line)}
.admin-table td{font-size:11px;color:#516174;padding:14px 16px;border-bottom:1px solid #eef1f4;vertical-align:middle}
.admin-table tr:last-child td{border-bottom:0}
.admin-table td strong{display:block;color:var(--text);font-size:11px;margin-bottom:3px}
.admin-table td small{display:block;color:var(--muted-2);font-size:9px}
.role-badge,.admin-status{display:inline-flex;align-items:center;border-radius:999px;font-size:9px;font-weight:750;padding:4px 7px}
.role-badge.user{color:#52657a;background:#f2f5f8}.role-badge.admin{color:var(--blue);background:var(--blue-50)}
.admin-status.done{color:var(--success);background:#eef8f0}.admin-status.pending{color:#8d7600;background:var(--yellow-50)}.admin-status.suspended{color:var(--danger);background:var(--danger-soft)}
.table-actions{display:flex;gap:7px;justify-content:flex-end}
.table-action{border:0;background:transparent;color:var(--blue);font-size:10px;font-weight:700;padding:5px 0}.table-action:hover{text-decoration:underline}.danger-text{color:var(--danger)}
.empty-cell{text-align:center!important;padding:40px!important;color:var(--muted-2)!important}
.admin-summary{font-size:10px;color:var(--muted);margin-right:auto}
.admin-search-filters{display:grid;grid-template-columns:minmax(190px,1.4fr) minmax(150px,1fr) 160px minmax(145px,.7fr) minmax(145px,.7fr)}
.date-filter{display:grid;gap:4px;min-width:0;font-size:9px;font-weight:700;color:var(--muted)}
.date-filter .input{width:100%;height:43px;min-width:0}
.users-admin-table{min-width:980px}
.admin-bulk-actions{display:flex;align-items:center;gap:8px;padding:12px 16px;border-bottom:1px solid var(--line);background:var(--blue-50)}
.admin-bulk-actions>span{margin-right:auto;font-size:11px;font-weight:700;color:var(--blue)}
.admin-bulk-actions .btn{height:38px;padding:0 14px}
.admin-user-modal{width:min(620px,100%)}
.admin-user-form{margin-top:18px}
.admin-user-actions{margin-top:22px}
.analytics-grid{grid-template-columns:minmax(0,1.55fr) minmax(300px,.8fr)}

@media (max-width:900px){
  .admin-kpis{grid-template-columns:repeat(2,1fr)}
  .admin-chart-grid,.analytics-grid{grid-template-columns:1fr}
  .admin-chart-wide{grid-column:auto}
  .admin-quick-grid{grid-template-columns:1fr}
}
@media (max-width:620px){
  .admin-heading{align-items:flex-start;flex-direction:column;gap:12px}
  .admin-heading .btn{width:100%}
  .admin-kpis{grid-template-columns:1fr 1fr;gap:9px}
  .admin-kpi{padding:14px}.admin-kpi strong{font-size:21px}
  .admin-toolbar{flex-direction:column;align-items:stretch}.admin-search,.admin-select{width:100%}
  .admin-chart-card{padding:16px}.chart-wrap{height:230px}
}


/* ---------- V14 final responsive/demo polish ---------- */
@media (max-width:620px){
  /* Force the search hero title to remain truly centered despite later desktop overrides. */
  .hero-copy{
    width:100%;
    display:flex;
    flex-direction:column;
    align-items:center !important;
    justify-content:center;
    text-align:center !important;
  }
  .hero-copy > div{
    width:100%;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    text-align:center !important;
  }
  .hero-copy h2{
    width:100% !important;
    margin-left:auto;
    margin-right:auto;
    text-align:center !important;
  }
}


/* ---------- V15 final menu + action sizing ---------- */
.sidebar nav .nav-item[data-view="search"],
.sidebar nav .nav-item[data-view="suggestion"],
.sidebar nav .nav-item[data-view="account"],
.sidebar-bottom .nav-item[data-view="admin-dashboard"]{
  font-size:15px;
  font-weight:750;
  letter-spacing:-.015em;
  gap:0;
  padding:13px 14px;
  background:transparent;
  text-decoration:none;
}
.sidebar nav .nav-item[data-view="search"]:hover,
.sidebar nav .nav-item[data-view="suggestion"]:hover,
.sidebar nav .nav-item[data-view="account"]:hover,
.sidebar-bottom .nav-item[data-view="admin-dashboard"]:hover,
.sidebar nav .nav-item[data-view="search"].active,
.sidebar nav .nav-item[data-view="suggestion"].active,
.sidebar nav .nav-item[data-view="account"].active{
  background:transparent;
  text-decoration:none;
}
.sidebar nav .nav-item[data-view="search"].active,
.sidebar nav .nav-item[data-view="suggestion"].active,
.sidebar nav .nav-item[data-view="account"].active{
  font-weight:800;
}
.sidebar-bottom .nav-item[data-view="admin-dashboard"]{display:flex}

/* Keep the admin entry visible in demo mode as well as for real admins. */
#adminNavItem.hidden{display:none}

.recent-item{padding-right:112px}
.recent-actions{
  top:8px;
  right:8px;
  width:auto;
  height:40px;
  gap:8px;
  display:flex;
  align-items:center;
  justify-content:flex-end;
}
.recent-actions .icon-button,
.recent-actions .notification-toggle,
.recent-actions .recent-delete{
  flex:0 0 40px;
  width:40px;
  min-width:40px;
  height:40px;
  min-height:40px;
  padding:0;
  margin:0;
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.recent-actions .notification-toggle,
.recent-actions .recent-delete{
  border:1px solid #e2e7ec;
  background:#fff;
  box-sizing:border-box;
}
.recent-actions .notification-toggle:hover,
.recent-actions .recent-delete:hover{
  background:#fbfcfe;
  border-color:#d7dee6;
}

.recent-actions .icon-button img,
.recent-actions .notification-toggle img,
.recent-actions .recent-delete img{
  width:23px;
  height:23px;
  min-width:23px;
  min-height:23px;
  max-width:23px;
  max-height:23px;
  flex:0 0 23px;
  display:block;
  margin:0;
  padding:0;
  object-fit:contain;
  object-position:center;
}

@media (max-width:760px){
  .sidebar nav .nav-item[data-view="search"],
  .sidebar nav .nav-item[data-view="suggestion"],
  .sidebar nav .nav-item[data-view="account"],
  .sidebar-bottom .nav-item[data-view="admin-dashboard"]{
    font-size:16px;
    font-weight:750;
    padding:14px 16px;
  }
  .recent-item{padding-right:112px}
  .recent-actions{
    top:8px;
    right:8px;
    height:40px;
    gap:8px;
  }
  .recent-actions .icon-button,
  .recent-actions .notification-toggle,
  .recent-actions .recent-delete{
    flex-basis:40px;
    width:40px;
    min-width:40px;
    height:40px;
    min-height:40px;
  }
  .recent-actions .icon-button img,
  .recent-actions .notification-toggle img,
  .recent-actions .recent-delete img{
    width:23px;
    height:23px;
    min-width:23px;
    min-height:23px;
    max-width:23px;
    max-height:23px;
    flex-basis:23px;
  }
}

/* ---------- V16 requested UI refinements ---------- */
@media (min-width:761px){
  .topbar{height:144px}
  .layout{min-height:calc(100vh - 144px)}
  .brand-logo-topbar{height:84px;max-height:84px;max-width:140px;width:auto}
}
.sidebar nav .nav-item[data-view="search"],
.sidebar nav .nav-item[data-view="suggestion"],
.sidebar nav .nav-item[data-view="account"],
.sidebar-bottom .nav-item[data-view="admin-dashboard"]{
  background:transparent!important;
  text-decoration:none!important;
}
.sidebar nav .nav-item[data-view="search"]:hover,
.sidebar nav .nav-item[data-view="suggestion"]:hover,
.sidebar nav .nav-item[data-view="account"]:hover,
.sidebar-bottom .nav-item[data-view="admin-dashboard"]:hover,
.sidebar nav .nav-item[data-view="search"].active,
.sidebar nav .nav-item[data-view="suggestion"].active,
.sidebar nav .nav-item[data-view="account"].active{
  background:transparent!important;
  text-decoration:none!important;
}
.recent-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:8px!important;flex-wrap:nowrap!important;height:40px!important}
.recent-actions .notification-toggle,
.recent-actions .recent-delete{
  flex:0 0 40px!important;
  width:40px!important;
  height:40px!important;
  min-width:40px!important;
  min-height:40px!important;
  padding:0!important;
  margin:0!important;
  border:1px solid #e2e7ec!important;
  background:#fff!important;
  border-radius:10px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  box-sizing:border-box!important;
}


/* ---------- V17 Back-office + CTA polish ---------- */
.hero-actions{display:flex;align-items:center;justify-content:flex-end;gap:9px;flex-wrap:wrap}
.btn-admin-outline{background:#fff;color:var(--blue);border-color:#cfd9e4}
.btn-admin-outline:hover{background:var(--blue-50);border-color:#b9c9da;box-shadow:none}
.admin-demo-note{font-size:9px;color:var(--muted-2);margin-top:10px}
.admin-kpis{grid-template-columns:repeat(3,1fr)}
.admin-kpi{min-height:120px}
.admin-kpi small{display:flex;align-items:center;gap:5px}
.availability-dot{width:7px;height:7px;border-radius:50%;background:var(--success);display:inline-block;box-shadow:0 0 0 3px rgba(37,130,69,.08)}
.admin-insight-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:14px}
.popular-list,.activity-list{display:grid;gap:0}
.popular-item{display:grid;grid-template-columns:26px 1fr auto;align-items:center;gap:10px;padding:11px 0;border-bottom:1px solid #eef1f4}
.popular-item:last-child{border-bottom:0}
.popular-rank{width:24px;height:24px;border-radius:8px;background:var(--blue-50);color:var(--blue);display:grid;place-items:center;font-size:10px;font-weight:800}
.popular-item strong{display:block;font-size:11px}.popular-item small{display:block;color:var(--muted);font-size:9px;margin-top:2px}.popular-item b{font-size:11px;color:var(--text)}
.activity-item{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 0;border-bottom:1px solid #eef1f4}.activity-item:last-child{border-bottom:0}.activity-item>div{display:grid;grid-template-columns:8px auto;column-gap:8px;align-items:center}.activity-item strong{font-size:10px}.activity-item small{grid-column:2;font-size:9px;color:var(--muted);margin-top:2px}.activity-item time{font-size:9px;color:var(--muted-2);white-space:nowrap}.activity-dot{width:7px;height:7px;border-radius:50%;background:var(--blue)}
.admin-quick-grid-four{grid-template-columns:repeat(4,1fr)}
.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:26px}.settings-card{padding:20px}.settings-card-full{grid-column:1 / -1}.settings-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:20px}.settings-card-head h3{margin:0 0 4px;font-size:15px}.settings-card-head>div span{font-size:10px;color:var(--muted)}.settings-row{display:grid;gap:8px;margin-top:16px}.settings-row label{font-size:11px;font-weight:700;color:#334155}.settings-inline{grid-template-columns:150px 1fr;align-items:center}.settings-actions{margin-top:18px}.system-status{display:inline-flex;align-items:center;gap:6px;font-size:9px;font-weight:750;color:var(--success);white-space:nowrap}.system-status i{width:7px;height:7px;border-radius:50%;background:var(--success)}.system-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:18px 0}.system-metrics div{padding:12px;border:1px solid var(--line);border-radius:11px;background:var(--surface-soft)}.system-metrics strong{display:block;font-size:11px}.system-metrics span{display:block;margin-top:4px;font-size:8px;color:var(--muted)}.cron-info{display:flex;justify-content:space-between;align-items:center;padding:11px 12px;background:var(--surface-soft);border:1px solid var(--line);border-radius:10px;font-size:9px;color:var(--muted)}.cron-info strong{color:var(--text);font-size:10px}
.switch{position:relative;display:inline-flex;flex:0 0 auto}.switch input{position:absolute;opacity:0;pointer-events:none}.switch-track{width:46px;height:27px;border-radius:999px;background:#dfe5eb;position:relative;transition:background .18s ease}.switch-track:after{content:"";position:absolute;width:21px;height:21px;top:3px;left:3px;border-radius:50%;background:#fff;box-shadow:0 2px 6px rgba(18,44,73,.18);transition:transform .18s ease}.switch input:checked + .switch-track{background:var(--blue)}.switch input:checked + .switch-track:after{transform:translateX(19px)}

@media (max-width:900px){.admin-kpis{grid-template-columns:repeat(2,1fr)}.admin-quick-grid-four{grid-template-columns:repeat(2,1fr)}.admin-insight-grid{grid-template-columns:1fr}.settings-grid{grid-template-columns:1fr}}
@media (max-width:620px){.hero-actions{width:100%;justify-content:center}.hero-actions .help-pill,.hero-actions .btn-admin-outline{width:100%}.admin-kpis{grid-template-columns:1fr 1fr}.admin-quick-grid-four{grid-template-columns:1fr}.settings-inline{grid-template-columns:1fr}.system-metrics{grid-template-columns:1fr}.settings-card .btn{width:100%}}


/* ---------- V18 back-office enrichment ---------- */
.admin-heading-actions{display:flex;gap:8px;align-items:center}
.admin-nav-strip{display:flex;align-items:center;gap:4px;overflow-x:auto;margin-top:20px;padding:4px;border:1px solid var(--line);background:var(--surface-soft);border-radius:12px;scrollbar-width:none}
.admin-nav-strip::-webkit-scrollbar{display:none}
.admin-nav-link{border:0;background:transparent;color:var(--muted);font-size:10px;font-weight:750;padding:9px 11px;border-radius:8px;white-space:nowrap}
.admin-nav-link:hover{color:var(--text);background:#fff}
.admin-nav-link.active{color:var(--blue);background:#fff;box-shadow:0 2px 8px rgba(18,44,73,.05)}
.admin-kpis-six{grid-template-columns:repeat(6,1fr)}
.admin-kpis-four{grid-template-columns:repeat(4,1fr)}
.compact-admin-kpis{margin-top:20px}
.admin-dashboard-grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(280px,.75fr);gap:14px;margin-top:14px}
.admin-chart-main{grid-row:span 2}
.admin-chart-full{grid-column:1 / -1}
.health-list{display:grid;gap:0}
.health-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:13px 0;border-bottom:1px solid #eef1f4}
.health-row:last-child{border-bottom:0}
.health-row div{display:grid;gap:3px}.health-row span{font-size:10px;color:var(--muted)}.health-row strong{font-size:11px}
.health-state{width:8px;height:8px;border-radius:50%;background:var(--success);box-shadow:0 0 0 4px rgba(37,130,69,.08)}
.health-state.info{background:#d7a900;box-shadow:0 0 0 4px rgba(244,201,13,.12)}
.alert-list{display:grid;gap:8px}.alert-row{width:100%;border:1px solid var(--line);background:#fff;border-radius:11px;padding:12px 13px;display:grid;grid-template-columns:1fr auto auto;gap:12px;align-items:center;text-align:left;color:var(--text)}.alert-row:hover{border-color:#ccd8e4;background:var(--surface-soft)}.alert-row span:first-child{font-size:10px;color:var(--muted)}.alert-row strong{font-size:13px}.alert-row span:last-child{font-size:14px;color:var(--blue)}
.admin-quick-grid-six{grid-template-columns:repeat(3,1fr)}
.admin-export{height:43px;white-space:nowrap}
.admin-table td:last-child{min-width:190px}.table-actions{flex-wrap:wrap}
.admin-modal-icon{background:var(--yellow-50);color:#8d7600;font-weight:800}
.suggestion-admin-modal{width:min(620px,100%)}
.suggestion-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:20px;padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--surface-soft)}
.suggestion-detail-grid div{display:grid;gap:5px}.suggestion-detail-grid span{font-size:9px;color:var(--muted-2);text-transform:uppercase;letter-spacing:.08em}.suggestion-detail-grid strong{font-size:11px}.suggestion-detail-message{margin-top:14px;padding:16px;border:1px solid var(--line);border-radius:12px;line-height:1.7;font-size:11px;color:#48576a;background:#fff;min-height:100px}
.admin-action-row{display:flex;gap:8px}
@media (max-width:1100px){.admin-kpis-six{grid-template-columns:repeat(3,1fr)}.admin-dashboard-grid{grid-template-columns:1fr}.admin-chart-main{grid-row:auto}}
@media (max-width:900px){.admin-kpis-four{grid-template-columns:repeat(2,1fr)}.admin-quick-grid-six{grid-template-columns:repeat(2,1fr)}}
@media (max-width:620px){.admin-heading-actions{width:100%}.admin-heading-actions .btn{width:100%}.admin-kpis-six,.admin-kpis-four{grid-template-columns:1fr 1fr}.admin-nav-strip{margin-top:16px}.admin-quick-grid-six{grid-template-columns:1fr}.admin-table td:last-child{min-width:230px}.admin-export{width:100%}.suggestion-detail-grid{grid-template-columns:1fr}.admin-toolbar>.admin-export{width:100%}}
@media (max-width:900px){.admin-search-filters{grid-template-columns:1fr 1fr}}
@media (max-width:620px){.admin-search-filters{grid-template-columns:1fr}.admin-bulk-actions{flex-wrap:wrap}.admin-bulk-actions>span{flex-basis:100%}.admin-bulk-actions .btn{flex:1}}

/* --- Suivi actif : cloche en jaune léger --- */
.recent-actions .notification-toggle.is-active{background:var(--yellow-50)}

/* --- Loader global : fond flouté, animation minimaliste --- */
.global-loader{position:fixed;inset:0;z-index:300;display:none;align-items:center;justify-content:center;background:rgba(255,255,255,.6);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.global-loader.show{display:flex}
.gloader-box{display:grid;justify-items:center;gap:14px}
.gloader-spin{width:44px;height:44px;border-radius:50%;border:3px solid var(--blue-100);border-top-color:var(--blue);animation:gloader-spin .16s linear infinite}
.gloader-box p{margin:0;font-size:12px;font-weight:700;color:var(--blue)}
@keyframes gloader-spin{to{transform:rotate(360deg)}}

/* --- Bouton nouvelle recherche sous le résultat --- */
.new-search-wrap{margin-top:16px;display:flex;justify-content:center;gap:12px;flex-wrap:wrap}
@media (max-width:760px){
  .new-search-wrap{flex-direction:column;align-items:stretch}
  .new-search-wrap .btn{width:100%}
}

/* --- Header : avatar seul, agrandi, photo de profil --- */
.profile-chip .avatar{width:44px;height:44px;flex-basis:44px;font-size:13px;background-size:cover;background-position:center;background-repeat:no-repeat}

/* --- Suivi actif : fond + bordure jaune (sans décalage de layout) --- */
.recent-actions .notification-toggle.is-active{background:var(--yellow-50);box-shadow:inset 0 0 0 1px var(--yellow)}

/* --- Poubelle : bordure rouge au survol (sans décalage de layout) --- */
.recent-actions .recent-delete:hover{box-shadow:inset 0 0 0 1px var(--danger)}

/* --- Pied de page login --- */
.auth-footer{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px;margin-top:26px;font-size:11px;color:var(--muted);text-align:center}
.auth-footer a{color:var(--muted);font-weight:700;text-decoration:none}
.auth-footer a:hover{color:var(--blue)}

/* --- 1. Header : avatar 100% rond --- */
.profile-chip .avatar{border-radius:50%;overflow:hidden}

/* --- 2. Login : footer au-dessus du décor jaune + logo agrandi --- */
.auth-footer{position:relative;z-index:1}
@media (min-width:761px){.brand-logo-auth{height:100px;max-height:100px;max-width:96px}}

/* --- 4. Mobile : menu 3 points agrandi + photo profil ronde --- */
@media (max-width:760px){
  .mobile-nav-toggle{width:52px;min-width:52px;height:52px}
  .mobile-nav-toggle svg{width:34px;height:34px}
  .mobile-nav-toggle .menu-dots circle{r:2.5}
  .profile-chip .avatar{background-size:cover;background-position:center;background-repeat:no-repeat}
}

/* --- Honeypot anti-bot : invisible humain, tentant robot --- */
.hp-field{position:absolute!important;left:-9999px!important;top:auto!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}

/* --- PWA : état hors ligne --- */
.service-status.offline{color:var(--danger)}
.service-status.offline i{background:var(--danger);box-shadow:0 0 0 3px #fbe9e9}
.offline-bar{display:none;background:#3a2b00;color:#ffe9a8;font-size:11px;font-weight:700;text-align:center;padding:8px 12px}
.offline-bar.show{display:block}
.install-top-btn{border:1px solid rgba(7,87,166,.14);background:#fff;color:var(--blue);font-size:11px;font-weight:800;border-radius:999px;padding:9px 14px;white-space:nowrap}
.install-top-btn:hover{background:var(--blue-50)}
.install-hero-btn{width:100%;padding:14px;margin-bottom:20px;font-size:12px}

/* --- Suggestion : champs pré-remplis non modifiables --- */
.input[readonly]{background:var(--surface-soft);color:#405269;cursor:not-allowed}

/* --- 8. Anti-zoom iOS : 16px minimum sur mobile --- */
@media (max-width:760px){
  .input,.textarea,select.input{font-size:16px}
}

/* --- 1. Cloche : sonnerie 1x par survol --- */
.notification-toggle img{transform-origin:top center}
.notification-toggle:hover img{animation:bell-ring .6s ease 1}
@keyframes bell-ring{
  0%{transform:rotate(0)}
  15%{transform:rotate(18deg)}
  30%{transform:rotate(-14deg)}
  45%{transform:rotate(9deg)}
  60%{transform:rotate(-6deg)}
  75%{transform:rotate(3deg)}
  100%{transform:rotate(0)}
}

/* --- 4. Guide visible : bouton détouré fond jaune léger --- */
.auth-guide-btn{display:inline-flex;align-items:center;gap:8px;border:1px solid #e7d47e;background:var(--yellow-50);color:#7a6400;font-weight:800;font-size:12px;border-radius:999px;padding:10px 22px;text-decoration:none}
.auth-guide-btn:hover{background:#fff3bf;border-color:var(--yellow);color:#6b5600}

/* --- 1. Bannière maintenance jaune permanente --- */
.maintenance-bar{background:var(--yellow);color:#4d3d00;font-size:12px;font-weight:700;text-align:center;padding:10px 14px;display:flex;justify-content:center;align-items:center;gap:8px;flex-wrap:wrap}
.maintenance-bar strong{font-weight:800}
.maintenance-bar span{font-weight:600}

/* --- 3. Bouton Installer mis en valeur + espacements dashboard --- */
.install-hero-btn{width:100%;padding:0;margin:0 0 50px;border:0;border-radius:18px;background:linear-gradient(135deg,var(--blue) 0,var(--blue-strong) 100%);color:#fff;font-size:13px;box-shadow:0 14px 30px rgba(7,87,166,.22);display:flex;align-items:center;justify-content:center;gap:12px;height:60px}
.install-hero-btn:hover{background:linear-gradient(135deg,#0a63bb 0,var(--blue-strong) 100%);transform:translateY(-1px)}
.install-hero-icon{width:32px;height:32px;border-radius:50%;background:rgba(255,255,255,.16);display:grid;place-items:center;font-size:15px}
.install-hero-arrow{opacity:.8}
.recent-section{margin-top:50px!important}
.hero-help-wrap{display:flex;justify-content:center;margin-top:20px}

/* --- 4. Back-office sidebar en vrai bouton --- */
.sidebar-bottom .nav-item.nav-cta[data-view="admin-dashboard"]{background:var(--blue)!important;color:#fff!important;font-weight:800;font-size:12px;letter-spacing:0;justify-content:center;gap:8px;margin-top:6px;padding:13px 14px;border-radius:12px;box-shadow:0 8px 18px rgba(7,87,166,.18);text-decoration:none!important}
.sidebar-bottom .nav-item.nav-cta[data-view="admin-dashboard"]:hover{background:var(--blue-strong);color:#fff}
.sidebar-bottom .nav-item.nav-cta[data-view="admin-dashboard"].active{background:var(--blue-strong);color:#fff}

/* --- Bannière maintenance sur la vue connexion (pleine largeur en haut) --- */
#authView .maintenance-bar{width:100%;justify-self:stretch;align-self:start}

/* --- Navigation : sidebar supprimée, menu plein écran --- */
.sidebar{display:none!important}
.layout{display:block;min-height:calc(100vh - 144px)}
body.menu-open{overflow:hidden}
.menu-trigger{display:inline-flex;align-items:center;gap:10px;border:0;background:transparent;color:#173654;font-size:15px;font-weight:800;padding:10px 6px}
.menu-trigger-label{letter-spacing:-.01em}
.menu-trigger .menu-dots{width:30px;height:30px;fill:currentColor}
.menu-trigger:hover{color:var(--blue)}
.menu-overlay{position:fixed;inset:0;z-index:200;background:#fff;overflow-y:auto;padding:26px clamp(20px,6vw,70px) 40px}
.menu-overlay-head{display:flex;justify-content:flex-end;margin-bottom:10px}
.menu-close-link{display:inline-flex;align-items:center;gap:12px;border:0;background:transparent;font-size:clamp(18px,2.6vw,24px);font-weight:700;color:var(--text);padding:6px 0}
.menu-close-link span{text-decoration:underline;text-underline-offset:4px}
.menu-close-link svg{width:30px;height:30px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.menu-overlay-list{display:grid}
.menu-overlay-item{display:flex;align-items:center;width:100%;border:0;background:transparent;text-align:left;font-size:clamp(24px,4.6vw,40px);font-weight:800;letter-spacing:-.02em;color:var(--text);padding:26px 4px;border-top:1px solid #e3ddcf;text-decoration:none;cursor:pointer}
.menu-overlay-item:last-child{border-bottom:1px solid #e3ddcf}
.menu-overlay-item:hover{color:var(--blue)}
.menu-overlay-item.nav-item.active{background:transparent;color:var(--text)}
.menu-overlay-item.nav-item.active span{text-decoration:underline;text-underline-offset:6px}
.menu-account{gap:16px}
.menu-account .avatar{width:52px;height:52px;flex-basis:52px;font-size:15px;border-radius:50%;background-size:cover;background-position:center}
.menu-account strong{font-size:clamp(24px,4.6vw,40px);font-weight:800}
.menu-chevron{margin-left:auto;width:1px;align-self:stretch;background:#e3ddcf;position:relative;min-height:60px}
.menu-chevron svg{position:absolute;right:18px;top:50%;width:30px;height:30px;transform:translateY(-50%);fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.menu-logout{color:var(--text)}
.menu-overlay-foot{margin-top:26px;display:flex;justify-content:flex-start}

/* --- Aide flottante (mobile : "?" rond) --- */
.hero-help-wrap{display:contents}
.help-pill{position:fixed;right:22px;bottom:22px;z-index:150;border:1px solid var(--line);border-radius:999px;padding:12px 18px;display:flex;gap:8px;align-items:center;font-size:12px;font-weight:700;color:#405269;background:#fff;box-shadow:0 12px 30px rgba(18,44,73,.14)}
.help-pill:hover{border-color:#bfcbd8;color:var(--blue)}
.help-pill span{width:20px;height:20px;border-radius:50%;display:grid;place-items:center;background:var(--yellow-50);color:#927900;font-weight:800}
@media (max-width:760px){
  .help-pill{right:14px;bottom:14px;width:54px;height:54px;padding:0;justify-content:center;font-size:0;gap:0;border-radius:50%}
  .help-pill span{width:24px;height:24px;font-size:15px;border-radius:50%}
}

/* --- Installer : détouré professionnel et léger --- */
.install-hero-btn{width:100%;padding:0;margin:0 0 50px;border:1px solid #b9d0e8;border-radius:16px;background:#f4f8fd;color:var(--blue);font-size:12.5px;box-shadow:0 4px 14px rgba(7,87,166,.06);display:flex;align-items:center;justify-content:center;gap:12px;height:58px}
.install-hero-btn:hover{background:#eaf2fb;border-color:var(--blue);transform:none;box-shadow:0 6px 18px rgba(7,87,166,.1)}
.install-hero-icon{width:30px;height:30px;border-radius:50%;background:var(--blue-50);color:var(--blue);display:grid;place-items:center;font-size:14px}
.install-hero-arrow{opacity:.7}

/* --- Mobile : resserrer titre → formulaire --- */
@media (max-width:760px){
  .hero-copy{margin-bottom:4px}
  .hero-copy h2{margin-bottom:6px}
  .search-card{margin-top:10px}
  .topbar-right{gap:4px}
  .menu-trigger{font-size:14px;gap:7px}
  .menu-trigger .menu-dots{width:26px;height:26px}
}

/* --- Menu : panneau 50% centré, textes réduits, actif souligné seul --- */
.menu-overlay-head,.menu-overlay-list,.menu-overlay-foot{width:min(50%,640px);margin-inline:auto}
.menu-overlay-item{font-size:clamp(19px,2.4vw,26px);padding:20px 4px}
.menu-close-link{font-size:clamp(16px,2vw,20px)}
.menu-close-link svg{width:26px;height:26px}
.menu-account strong{font-size:clamp(19px,2.4vw,26px)}
.menu-account .avatar{width:46px;height:46px;flex-basis:46px}
@media (max-width:760px){
  .menu-overlay-head,.menu-overlay-list,.menu-overlay-foot{width:100%}
  .menu-overlay{padding:26px var(--mobile-pad) 40px}
}
/* Icône lien externe du menu (même ↗ que le reste de la plateforme, pas de lib externe). */
.menu-overlay-item .menu-ext{margin-left:14px;font-size:.65em;font-weight:400;opacity:.55}

/* --- Récentes : chrono seul en haut, date + statut en dessous --- */
.recent-item .code-button .code{display:block}
.recent-item .code-button .date{display:block;margin-top:3px}
.recent-item .code-button .date .mini-status{display:inline}

/* --- Erreur visible + secousse légère (modale suivi, résultat recherche) --- */
.modal-error{display:block;background:var(--danger-soft);border:1px solid #f0c9c9;color:var(--danger);font-weight:700;border-radius:10px;padding:10px 12px}
@keyframes modal-shake{
  0%,100%{transform:translateX(0)}
  20%{transform:translateX(-7px)}
  40%{transform:translateX(6px)}
  60%{transform:translateX(-4px)}
  80%{transform:translateX(3px)}
}
.shake{animation:modal-shake .45s ease 1}

/* ================= DARK MODE ================= */
html[data-theme="dark"]{
  --blue:#3f7fc4;--blue-strong:#2f66a3;--blue-50:#14273f;--blue-100:#1b3355;
  --yellow:#f4c90d;--yellow-50:#2a240e;
  --text:#e9eff6;--muted:#93a1b3;--muted-2:#6e7c8f;
  --line:#26334a;--line-strong:#33445f;
  --surface:#131c2c;--surface-soft:#182336;
  --success:#4caf7d;--danger:#e06c6c;--danger-soft:#2a1a1a;
  --shadow:0 10px 30px rgba(0,0,0,.35);
  color-scheme:dark;
}
html[data-theme="dark"] body{background:#0c1320;color:var(--text)}
html[data-theme="dark"] .app-view,html[data-theme="dark"] .auth-view{background:#0c1320}
/* coquilles */
html[data-theme="dark"] .auth-card{background:var(--surface);box-shadow:0 22px 65px rgba(0,0,0,.4)}
html[data-theme="dark"] .card,html[data-theme="dark"] .search-card,html[data-theme="dark"] .result-card,html[data-theme="dark"] .suggestion-card,html[data-theme="dark"] .profile-card,html[data-theme="dark"] .info-card,html[data-theme="dark"] .admin-chart-card,html[data-theme="dark"] .admin-kpi,html[data-theme="dark"] .admin-quick,html[data-theme="dark"] .settings-card,html[data-theme="dark"] .admin-table-card,html[data-theme="dark"] .help-modal{background:var(--surface)}
html[data-theme="dark"] .topbar{background:#101828;border-color:var(--line)}
html[data-theme="dark"] .menu-overlay{background:#0c1320}
html[data-theme="dark"] .menu-overlay-item{border-color:#2a3a52}
html[data-theme="dark"] .menu-chevron{background:#2a3a52}
html[data-theme="dark"] .modal-backdrop{background:rgba(4,8,16,.6)}
/* champs + boutons */
html[data-theme="dark"] .input{background:#0f1727;border-color:var(--line-strong);color:var(--text)}
html[data-theme="dark"] .input::placeholder{color:#5b6a7e}
html[data-theme="dark"] .input[readonly]{background:#141e30;color:var(--muted)}
html[data-theme="dark"] .field-label{color:#c3cedb}
html[data-theme="dark"] .check-row{color:var(--muted)}
html[data-theme="dark"] .btn-secondary{background:#182336;color:#7fb3ea;border-color:var(--line-strong)}
html[data-theme="dark"] .btn-secondary:hover{background:#1e2c46;border-color:#3f5878}
html[data-theme="dark"] .icon-button{color:#8fa0b5}
html[data-theme="dark"] .icon-button:hover{background:#1b2740;color:#7fb3ea}
html[data-theme="dark"] .profile-chip{background:#182336}
html[data-theme="dark"] .profile-chip:hover{background:#1e2c46}
html[data-theme="dark"] .menu-trigger{color:#dbe4ef}
html[data-theme="dark"] .help-pill{background:#182336;border-color:var(--line-strong);color:#c3cedb}
html[data-theme="dark"] .back-button{background:#182336;border-color:var(--line-strong);color:#c3cedb}
html[data-theme="dark"] .table-action{background:#182336;border-color:var(--line-strong);color:#9fc0e8}
html[data-theme="dark"] .logout-button{background:transparent;color:var(--muted)}
/* navigation + statuts */
html[data-theme="dark"] .nav-item{color:#8fa0b5}
html[data-theme="dark"] .nav-item:hover{background:#1b2740;color:var(--text)}
html[data-theme="dark"] .nav-item b{background:#182336;border-color:var(--line-strong)}
html[data-theme="dark"] .menu-account .avatar{background:var(--blue-100)}
/* tableaux + listes */
html[data-theme="dark"] .admin-table th{background:#101828;color:var(--muted-2)}
html[data-theme="dark"] .admin-table td{color:#b9c5d4;border-color:#1e2a40}
html[data-theme="dark"] .admin-table td strong{color:var(--text)}
html[data-theme="dark"] .popular-item,html[data-theme="dark"] .activity-item,html[data-theme="dark"] .health-row{border-color:#1e2a40}
html[data-theme="dark"] .alert-row{background:var(--surface)}
html[data-theme="dark"] .alert-row:hover{background:#182336;border-color:#3f5878}
html[data-theme="dark"] .system-metrics div,html[data-theme="dark"] .cron-info,html[data-theme="dark"] .suggestion-detail-grid{background:#101828}
html[data-theme="dark"] .suggestion-detail-message{background:#0f1727;color:#c3cedb}
html[data-theme="dark"] .recent-item{background:var(--surface)}
html[data-theme="dark"] .recent-item .code{color:#dbe4ef}
html[data-theme="dark"] .recent-actions .notification-toggle,html[data-theme="dark"] .recent-actions .recent-delete{background:#182336!important;border-color:var(--line-strong)!important}
html[data-theme="dark"] .recent-actions .notification-toggle.is-active{background:#2a240e!important}
html[data-theme="dark"] .auth-divider:before,html[data-theme="dark"] .auth-divider:after{background:var(--line)}
html[data-theme="dark"] .switch-track{background:#33445f}
html[data-theme="dark"] .admin-nav-strip{background:#101828}
html[data-theme="dark"] .admin-nav-link:hover{background:#182336;color:var(--text)}
html[data-theme="dark"] .admin-nav-link.active{background:#1e2c46}
/* jaunes / pastilles */
html[data-theme="dark"] .help-pill span,html[data-theme="dark"] .auth-guide-btn{background:#2a240e;border-color:#5c4d10;color:#f0d060}
html[data-theme="dark"] .auth-guide-btn:hover{background:#38300f;border-color:var(--yellow);color:#f5d76a}
html[data-theme="dark"] .modal-icon.admin-modal-icon{background:#2a240e;color:#f0d060}
html[data-theme="dark"] .offline-bar{background:#3a2b00;color:#ffe9a8}
html[data-theme="dark"] .availability-dot{box-shadow:0 0 0 3px rgba(76,175,125,.15)}
html[data-theme="dark"] .service-status i{box-shadow:0 0 0 3px rgba(76,175,125,.15)}
/* install + divers */
html[data-theme="dark"] .install-hero-btn{background:#101c30;border-color:#2c4a75;color:#7fb3ea}
html[data-theme="dark"] .install-hero-btn:hover{background:#16263f;border-color:#3f7fc4}
html[data-theme="dark"] .install-hero-icon{background:#1b3355;color:#7fb3ea}
html[data-theme="dark"] .global-loader{background:rgba(8,13,24,.6)}
html[data-theme="dark"] kbd,html[data-theme="dark"] .tag{background:#1b3355;border-color:#2c4a75;color:#7fb3ea}
html[data-theme="dark"] .flow span{background:#101828;border-color:var(--line-strong)}
html[data-theme="dark"] .modal-reference{background:#101828;border-color:var(--line)}
html[data-theme="dark"] .toast{box-shadow:0 18px 45px rgba(0,0,0,.55)}
html[data-theme="dark"] select.input option{background:#131c2c}
html[data-theme="dark"] .site-footer,html[data-theme="dark"] .auth-footer{color:var(--muted)}

/* --- Toggle thème --- */
.theme-toggle svg{width:20px;height:20px}

/* --- Dark : icônes cloche/poubelle lisibles --- */
html[data-theme="dark"] .recent-actions .notification-toggle,html[data-theme="dark"] .recent-actions .recent-delete{color:#a9b8ca}
html[data-theme="dark"] .recent-actions .notification-toggle:hover,html[data-theme="dark"] .recent-actions .recent-delete:hover{color:#e9eff6}
html[data-theme="dark"] .recent-actions .notification-toggle.is-active{color:#f0d060}
html[data-theme="dark"] .recent-actions .notification-toggle img,html[data-theme="dark"] .recent-actions .recent-delete img{opacity:.95}
html[data-theme="dark"] .clear-field{color:#a9b8ca}
html[data-theme="dark"] .leading-symbol img{opacity:.75}

/* --- Dark : bordures adoucies --- */
html[data-theme="dark"]{--line:#1c2740;--line-strong:#28375a}
html[data-theme="dark"] .card,html[data-theme="dark"] .search-card,html[data-theme="dark"] .result-card,html[data-theme="dark"] .suggestion-card,html[data-theme="dark"] .profile-card,html[data-theme="dark"] .info-card,html[data-theme="dark"] .admin-chart-card,html[data-theme="dark"] .admin-kpi,html[data-theme="dark"] .admin-quick,html[data-theme="dark"] .settings-card,html[data-theme="dark"] .admin-table-card,html[data-theme="dark"] .help-modal,html[data-theme="dark"] .auth-card{border-color:#222f4b}
html[data-theme="dark"] .input{border-color:#222f4b}
html[data-theme="dark"] .input:hover{border-color:#2e405f}
html[data-theme="dark"] .btn-secondary{border-color:#222f4b}
html[data-theme="dark"] .recent-actions .notification-toggle,html[data-theme="dark"] .recent-actions .recent-delete{border-color:#222f4b!important}
html[data-theme="dark"] .menu-overlay-item{border-color:#222f4b}
html[data-theme="dark"] .install-hero-btn{border-color:#24405f}
html[data-theme="dark"] kbd,html[data-theme="dark"] .tag{border-color:#24405f}
html[data-theme="dark"] .table-action{border-color:#222f4b}
html[data-theme="dark"] .help-pill{border-color:#222f4b}
html[data-theme="dark"] .alert-row{border-color:#222f4b}
html[data-theme="dark"] .system-status,html[data-theme="dark"] .system-metrics div,html[data-theme="dark"] .cron-info,html[data-theme="dark"] .suggestion-detail-grid,html[data-theme="dark"] .suggestion-detail-message,html[data-theme="dark"] .modal-reference{border-color:#222f4b}
html[data-theme="dark"] .auth-guide-btn{border-color:#4a3f10}

/* --- Header harmonisé : toggle 44px comme l'avatar, menu agrandi --- */
.theme-toggle{width:44px;height:44px;flex-basis:44px;border-radius:50%}
.theme-toggle svg{width:22px;height:22px}
.menu-trigger{font-size:18px;gap:12px;padding:10px 8px}
.menu-trigger .menu-dots{width:38px;height:38px}
.topbar-right{gap:12px}
@media (max-width:760px){
  .menu-trigger{font-size:16px;gap:9px}
  .menu-trigger .menu-dots{width:32px;height:32px}
}

/* --- Dark : icônes SVG noires inversées (currentColor ne traverse pas <img>) --- */
html[data-theme="dark"] .recent-actions img,
html[data-theme="dark"] .clear-field img,
html[data-theme="dark"] .modal-icon img{filter:invert(.82)}
html[data-theme="dark"] .leading-symbol img{opacity:.85}

/* --- Dark : bannière Conseil lisible --- */
html[data-theme="dark"] .reject-banner{background:#2a1a1a;border-color:#5a2b2b;color:#f0a0a0}
html[data-theme="dark"] .reject-banner strong{color:#f5bcbc}

/* --- Boot : masque les vues + loader tant que la session n'est pas résolue (anti-flash) --- */
body.booting #authView,body.booting #appView{visibility:hidden}
body.booting #globalLoader{display:flex}

/* --- Footer login : guide, thème, © et Par chacun sur sa ligne --- */
.auth-footer-row{display:flex;flex-direction:column;align-items:center;gap:5px}
.auth-footer-row .theme-toggle{width:40px;height:40px;flex-basis:40px}

/* --- SEO : titre réservé aux moteurs/lecteurs d'écran --- */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* --- Cron : URL + exemples + debug e-mail --- */
.cron-url-row{display:flex;gap:8px}
.cron-url-row .input{flex:1;min-width:0;font-size:11px}
.cron-url-row .btn{white-space:nowrap}
.code-block{background:#0f1727;color:#c9d6e6;font-size:11px;line-height:1.65;padding:12px 14px;border-radius:10px;overflow-x:auto;white-space:pre-wrap;margin:0}
.mail-debug{background:#0f1727;color:#c9d6e6;font-size:11px;line-height:1.65;padding:12px 14px;border-radius:10px;white-space:pre-wrap;margin:12px 0 0;max-height:220px;overflow-y:auto}

/* --- Dashboard : 8 KPIs + outils rapides --- */
.admin-kpis-eight{grid-template-columns:repeat(4,1fr)}
.admin-tools-card{margin-top:14px}
.tools-row{display:flex;gap:10px;flex-wrap:wrap}
.tools-row .btn{flex:1 1 200px}
@media (max-width:1100px){.admin-kpis-eight{grid-template-columns:repeat(3,1fr)}}
@media (max-width:900px){.admin-kpis-eight{grid-template-columns:repeat(2,1fr)}}
@media (max-width:620px){.admin-kpis-eight{grid-template-columns:1fr 1fr}.tools-row .btn{flex:1 1 100%}}

/* --- Récentes : cloche + poubelle 100% rondes --- */
.recent-actions .notification-toggle,
.recent-actions .recent-delete{border-radius:100px!important}

/* --- Réglages : boutons d'enregistrement aérés + champ code --- */
.settings-card > .btn,.settings-card .settings-actions{margin-top:20px}
.code-input{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px;line-height:1.6}

/* --- Rapport statistiques : impression / PDF --- */
@media print{
  .topbar,.menu-overlay,.help-pill,.toast,.global-loader,.offline-bar,.maintenance-bar,.admin-nav-strip,.admin-heading-actions,#installBtn{display:none!important}
  .layout,.content{display:block;max-width:100%;padding:0;margin:0}
  body{background:#fff}
  .card{box-shadow:none;break-inside:avoid}
  .chart-wrap{height:220px}
}

/* --- Connexion : liens sous les champs, à droite (mot de passe oublié, sans mot de passe) --- */
.field-link-row{display:flex;justify-content:flex-end}
.field-link-row .link-button{display:inline-flex;align-items:center;gap:5px}
/* Sans mot de passe : affiché dès qu'un e-mail est saisi. */
.otp-inline{animation:otpIn .2s ease}
@keyframes otpIn{from{opacity:0;transform:translateY(-3px)}to{opacity:1;transform:none}}
#otpResend:disabled{opacity:.6;cursor:default}

/* --- Connexion : plus d'air entre le logo et le formulaire --- */
.auth-brand{margin-bottom:30px}
@media (max-width:760px){.auth-brand{margin-bottom:22px}}

/* --- Connexion / inscription / mot de passe : transition façon appli mobile ---
   avancer (créer un compte, code…) = arrive de la droite ; revenir = de la gauche. */
@keyframes authInFwd{from{opacity:0;transform:translateX(36px)}to{opacity:1;transform:none}}
@keyframes authInBack{from{opacity:0;transform:translateX(-36px)}to{opacity:1;transform:none}}
.auth-panel.active.slide-fwd{animation:authInFwd .3s cubic-bezier(.22,.8,.3,1)}
.auth-panel.active.slide-back{animation:authInBack .3s cubic-bezier(.22,.8,.3,1)}
@media (prefers-reduced-motion:reduce){.auth-panel.active.slide-fwd,.auth-panel.active.slide-back{animation:none}}

/* --- Nouvelle version disponible (bandeau, comme maintenance / hors ligne) --- */
.update-bar{display:flex;justify-content:center;align-items:center;gap:12px;flex-wrap:wrap;background:var(--blue-strong);color:#fff;font-size:12px;font-weight:600;text-align:center;padding:9px 14px}
.update-bar button{border:0;border-radius:8px;background:#fff;color:var(--blue-strong);font-size:12px;font-weight:800;padding:6px 13px}
#authView .update-bar{width:100%;justify-self:stretch;align-self:start}
@media print{.update-bar{display:none!important}}

/* --- Trop de recherches : minuteur avant la prochaine tentative --- */
.btn:disabled{opacity:.55;cursor:not-allowed;box-shadow:none}
.btn-primary:disabled:hover{background:var(--blue)}
.wait-box{display:flex;align-items:center;gap:14px;margin-top:14px;padding:12px 14px;border-radius:12px;background:var(--yellow-50);border:1px solid #f0e3a8;color:#5c4a00;transition:background .3s ease,border-color .3s ease}
.wait-ring{position:relative;flex:none;width:46px;height:46px}
.wait-ring svg{display:block;width:100%;height:100%;transform:rotate(-90deg)}
.wait-track,.wait-arc{fill:none;stroke-width:3.4}
.wait-track{stroke:rgba(92,74,0,.14)}
.wait-arc{stroke:#e0a800;stroke-linecap:round;transition:stroke-dashoffset 1s linear,stroke .3s ease}
.wait-num{position:absolute;inset:0;display:grid;place-items:center;font-size:15px;font-weight:800;font-variant-numeric:tabular-nums}
.wait-text{min-width:0;font-size:13px;line-height:1.45}
.wait-text b{font-weight:800;font-variant-numeric:tabular-nums}
.wait-text small{display:block;margin-top:2px;font-size:11px;color:#8a6d00}
.wait-box.ready{background:#eef8f1;border-color:#cfe8d7;color:#1d6b3a}
.wait-box.ready .wait-arc{stroke:var(--success);stroke-dashoffset:0!important}   /* terminé : anneau complet */
.wait-box.ready .wait-track{stroke:rgba(29,107,58,.14)}
.wait-box.ready .wait-text small{display:none}
.btn.is-ready{animation:btnReady 1.6s ease-out 1}
@keyframes btnReady{0%{box-shadow:0 0 0 0 rgba(7,87,166,.45)}100%{box-shadow:0 0 0 16px rgba(7,87,166,0)}}
html[data-theme="dark"] .wait-box{background:#2a240e;border-color:#5c4d10;color:#f0d060}
html[data-theme="dark"] .wait-track{stroke:rgba(240,208,96,.18)}
html[data-theme="dark"] .wait-arc{stroke:#f4c90d}
html[data-theme="dark"] .wait-text small{color:#c9b25a}
html[data-theme="dark"] .wait-box.ready{background:#132a1e;border-color:#24523a;color:#7fd6a0}
html[data-theme="dark"] .wait-box.ready .wait-arc{stroke:#4caf7d}
html[data-theme="dark"] .wait-box.ready .wait-track{stroke:rgba(127,214,160,.18)}
@media (prefers-reduced-motion:reduce){.wait-arc{transition:none}.btn.is-ready{animation:none}}

/* --- Notifications in-app : cloche + badge + popup + page dédiée --- */
.notif-wrap{position:relative}
.notif-bell{position:relative;width:44px;height:44px;flex-basis:44px;border-radius:50%}
.notif-bell svg{width:22px;height:22px}
.notif-badge{
  position:absolute;top:1px;right:0;min-width:20px;height:20px;padding:0 5px;
  background:#d92d20;color:#fff;font-size:11px;font-weight:800;line-height:1;
  border-radius:999px;display:grid;place-items:center;border:2px solid #ecf2ff;
  font-variant-numeric:tabular-nums;
}
.notif-bell.has-new svg{animation:bell-ring .6s ease 1}
/* Popup notifications : plein écran comme le menu (même taille, même animation). */
body.notif-open{overflow:hidden}
.notif-popup{
  position:fixed;inset:0;width:auto;max-width:none;
  background:#fff;border:0;border-radius:0;overflow-y:auto;
  box-shadow:none;z-index:300;transform-origin:top center;
  padding:26px clamp(20px,6vw,70px) 40px;
}
.notif-popup:not(.hidden){animation:menuFade .25s ease}
.notif-popup:not(.hidden) .notif-popup-head{animation:menuFade .25s ease}
.notif-popup:not(.hidden) .notif-item{animation:menuItemUp .42s cubic-bezier(.22,.8,.3,1) backwards}
.notif-popup:not(.hidden) .notif-item:nth-child(1){animation-delay:.03s}
.notif-popup:not(.hidden) .notif-item:nth-child(2){animation-delay:.07s}
.notif-popup:not(.hidden) .notif-item:nth-child(3){animation-delay:.11s}
.notif-popup:not(.hidden) .notif-item:nth-child(4){animation-delay:.15s}
.notif-popup:not(.hidden) .notif-item:nth-child(5){animation-delay:.19s}
.notif-popup:not(.hidden) .notif-item:nth-child(6){animation-delay:.23s}
.notif-popup:not(.hidden) .notif-item:nth-child(7){animation-delay:.27s}
.notif-popup:not(.hidden) .notif-item:nth-child(8){animation-delay:.31s}
.notif-popup:not(.hidden) .notif-empty{animation:menuItemUp .42s cubic-bezier(.22,.8,.3,1) backwards;animation-delay:.07s}
.notif-popup:not(.hidden) .notif-foot{animation:menuItemUp .42s cubic-bezier(.22,.8,.3,1) backwards;animation-delay:.23s}
.notif-popup-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0;margin:0 auto 10px;width:min(50%,640px)}
.notif-popup-titles{display:grid;gap:6px;justify-items:start}
.notif-popup-titles strong{font-size:clamp(16px,2vw,20px);letter-spacing:-.01em}
.notif-popup .notif-list{max-height:none;overflow:visible;width:min(50%,640px);margin-inline:auto}
.notif-popup .notif-foot{width:min(50%,640px);margin:14px auto 0;border-radius:12px}
.notif-list{max-height:380px;overflow-y:auto}
.notif-item{
  width:100%;text-align:left;border:0;background:transparent;padding:13px 16px 13px 34px;
  display:grid;gap:3px;border-bottom:1px solid #eef1f4;position:relative;color:var(--text);
}
.notif-item:last-child{border-bottom:0}
.notif-item:hover{background:var(--surface-soft)}
.notif-item.unread{background:#f3f7fc}
.notif-item.unread:before{content:"";position:absolute;left:13px;top:19px;width:8px;height:8px;border-radius:50%;background:var(--blue)}
.notif-item-code{font-weight:800;font-size:12px;letter-spacing:.03em}
.notif-item-change{font-size:11px;color:var(--muted);line-height:1.5;overflow-wrap:anywhere}
.notif-item-date{font-size:10px;color:var(--muted-2)}
.notif-empty{padding:28px 20px;text-align:center;color:var(--muted);font-size:12px;line-height:1.6}
.notif-foot{
  width:100%;border:0;background:var(--surface-soft);padding:13px 16px;
  font-weight:800;color:var(--blue);font-size:12px;display:flex;align-items:center;justify-content:center;gap:8px;
}
.notif-foot:hover{background:var(--blue-50)}
.notif-page-card{margin-top:20px;padding:0;overflow:hidden}
.notif-page-list .notif-item{padding:16px 20px 16px 40px}
.notif-page-list .notif-item.unread:before{left:17px;top:23px}
.notif-item-actions{display:flex;gap:8px;margin-top:6px;flex-wrap:wrap}
.notif-mini-btn{border:1px solid var(--line-strong);background:#fff;border-radius:8px;font-size:11px;font-weight:700;color:var(--blue);padding:6px 10px}
.notif-mini-btn:hover{background:var(--blue-50)}
.notif-pager{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 16px;border-top:1px solid var(--line)}
.notif-nav-badge{background:#d92d20!important;color:#fff!important;border:0!important}
/* Mobile : entête resserrée — texte « Menu » masqué, trois points seuls,
   pour laisser la place à la cloche. Popup en pleine largeur sous l'entête. */
@media (max-width:760px){
  .menu-trigger-label{display:none!important}
  .menu-trigger{padding:10px 4px;gap:0}
  .topbar-right{gap:8px}
  .notif-bell{width:40px;height:40px;flex-basis:40px}
  .notif-popup{padding:26px var(--mobile-pad) 40px}
  .notif-popup-head,.notif-popup .notif-list,.notif-popup .notif-foot{width:100%}
}
/* Arrière-plan flouté quand le popup de notifications est ouvert
   (même voile que le loader global). */
.notif-backdrop{position:fixed;inset:0;z-index:240;background:rgba(255,255,255,.45);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
/* Page Notifications : boutons et pagination empilés sur mobile. */
@media (max-width:620px){
  .admin-heading-actions{flex-direction:column;align-items:stretch}
  .admin-heading-actions .btn{width:100%}
  .notif-pager{flex-wrap:wrap}
  .notif-pager .btn{flex:1 1 40%;width:auto}
  #notifPageInfo{order:-1;flex-basis:100%;text-align:center}
  .notif-page-list .notif-item{padding:14px 14px 14px 34px}
  .notif-item-actions .notif-mini-btn{flex:1 1 100%;text-align:center}
}
/* --- Disponibilité SOAP : mini-KPIs + incidents --- */
.admin-avail-card{margin-top:14px}
.avail-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:16px}
.avail-kpis div{padding:12px;border:1px solid var(--line);border-radius:11px;background:var(--surface-soft)}
.avail-kpis strong{display:block;font-size:18px;letter-spacing:-.03em}
.avail-kpis span{display:block;margin-top:4px;font-size:9px;color:var(--muted)}
.incident-list{display:grid;margin-top:14px}
.incident-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 0;border-top:1px solid #eef1f4;font-size:11px}
.incident-row strong{font-size:11px}
.incident-row small{display:block;color:var(--muted);font-size:10px;margin-top:2px}
.incident-state{flex:none;font-size:9px;font-weight:750;padding:4px 8px;border-radius:999px;background:var(--danger-soft);color:var(--danger)}
.incident-state.ongoing{background:var(--yellow-50);color:#8d7600}
.incident-empty{padding:14px 0 2px;color:var(--muted);font-size:11px}
@media (max-width:620px){.avail-kpis{grid-template-columns:1fr 1fr}}
html[data-theme="dark"] .avail-kpis div{background:#101828;border-color:#222f4b}
html[data-theme="dark"] .incident-row{border-color:#1e2a40}
html[data-theme="dark"] .incident-state.ongoing{background:#2a240e;color:#f0d060}
/* Changement de page (dont Mon compte) : même entrée que le menu. */
.page.view.active{animation:menuFade .25s ease}
.page.view.active > *{animation:menuItemUp .42s cubic-bezier(.22,.8,.3,1) backwards}
.page.view.active > :nth-child(1){animation-delay:.03s}
.page.view.active > :nth-child(2){animation-delay:.07s}
.page.view.active > :nth-child(3){animation-delay:.11s}
.page.view.active > :nth-child(4){animation-delay:.15s}
.page.view.active > :nth-child(5){animation-delay:.19s}
.page.view.active > :nth-child(6){animation-delay:.23s}
/* Menu plein écran : entrée en fondu, liens en remontée fluide et en cascade. */
.menu-overlay:not(.hidden){animation:menuFade .25s ease}
.menu-overlay:not(.hidden) .menu-overlay-head{animation:menuFade .25s ease}
.menu-overlay:not(.hidden) .menu-overlay-item{animation:menuItemUp .42s cubic-bezier(.22,.8,.3,1) backwards}
.menu-overlay:not(.hidden) .menu-overlay-item:nth-child(1){animation-delay:.03s}
.menu-overlay:not(.hidden) .menu-overlay-item:nth-child(2){animation-delay:.07s}
.menu-overlay:not(.hidden) .menu-overlay-item:nth-child(3){animation-delay:.11s}
.menu-overlay:not(.hidden) .menu-overlay-item:nth-child(4){animation-delay:.15s}
.menu-overlay:not(.hidden) .menu-overlay-item:nth-child(5){animation-delay:.19s}
.menu-overlay:not(.hidden) .menu-overlay-item:nth-child(6){animation-delay:.23s}
.menu-overlay:not(.hidden) .menu-overlay-item:nth-child(7){animation-delay:.27s}
.menu-overlay:not(.hidden) .menu-overlay-item:nth-child(8){animation-delay:.31s}
@keyframes menuFade{from{opacity:0}to{opacity:1}}
@keyframes menuItemUp{from{opacity:0;transform:translateY(22px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){
  .menu-overlay:not(.hidden),.menu-overlay:not(.hidden) .menu-overlay-head,.menu-overlay:not(.hidden) .menu-overlay-item,
  .notif-popup:not(.hidden),.notif-popup:not(.hidden) .notif-popup-head,.notif-popup:not(.hidden) .notif-item,
  .notif-popup:not(.hidden) .notif-empty,.notif-popup:not(.hidden) .notif-foot,
  .page.view.active,.page.view.active > *{animation:none}
}
html[data-theme="dark"] .notif-badge{border-color:#101828}
html[data-theme="dark"] .notif-backdrop{background:rgba(8,13,24,.5)}
html[data-theme="dark"] .notif-popup{background:#0c1320;border-color:#222f4b}
html[data-theme="dark"] .notif-popup-head{border-color:#1e2a40}
html[data-theme="dark"] .notif-item{border-color:#1e2a40;color:var(--text)}
html[data-theme="dark"] .notif-item:hover{background:#182336}
html[data-theme="dark"] .notif-item.unread{background:#14273f}
html[data-theme="dark"] .notif-foot{background:#101828;color:#7fb3ea}
html[data-theme="dark"] .notif-foot:hover{background:#182336}
html[data-theme="dark"] .notif-mini-btn{background:#182336;border-color:#222f4b;color:#9fc0e8}
html[data-theme="dark"] .notif-pager{border-color:#1e2a40}
@media (prefers-reduced-motion:reduce){.notif-bell.has-new svg{animation:none}}
/* Logo entête mobile encore agrandi : surcharge la règle globale V6 placée plus haut. */
@media (max-width:760px){
  .brand-logo-topbar{height:72px;max-width:100px}
}

/* Formulaires et actions arrondis sur toute l'interface. */
button{border-radius:100px!important}
/* rayon des champs : voir design.css */
.input-with-action .search-btn{width:auto;border-radius:100px!important}
/* rayon des champs : voir design.css */
.profile-card .profile-image,.profile-card .big-avatar{border-radius:100%!important}
.modal-actions a[href="guide-utilisation.html"]{border-radius:100px!important}
.menu-overlay-item{border-radius:0!important}
@media (max-width:620px){
  .search-input-wrap,.search-input-wrap .input,.input-with-action{width:100%;box-sizing:border-box}
  .search-input-wrap .input{padding-right:42px}
  .input-with-action .leading-symbol{top:28px}
  .input-with-action .clear-field{right:9px;top:28px}
  .input-with-action .search-btn{position:static;display:flex;width:100%;box-sizing:border-box;margin-top:10px}
}


/* --- Rejet : provenance / destination (nouveaux champs ORA) --- */
.reject-meta{display:flex;flex-wrap:wrap;gap:3px 16px;margin-top:8px;padding-top:8px;border-top:1px solid rgba(161,50,50,.18);font-size:11px;font-weight:600}
.reject-meta small{font-size:10px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;opacity:.75;margin-right:4px}
html[data-theme="dark"] .reject-meta{border-top-color:rgba(240,160,160,.2)}

/* --- File d'attente : carte « recherche en attente » --- */
.queue-box{display:flex;align-items:center;gap:16px;margin-top:14px;padding:14px 16px;border-radius:14px;background:var(--blue-50);border:1px solid var(--blue-100);color:var(--text)}
.queue-orb{--pulse:7,87,166;position:relative;flex:none;width:54px;height:54px;display:grid;place-items:center}
.queue-orb i{position:absolute;inset:0;border-radius:50%;background:rgba(var(--pulse),.28);opacity:0;animation:queuePulse 2.6s cubic-bezier(.25,.6,.35,1) infinite}
.queue-orb i:nth-child(2){animation-delay:1.3s}
.queue-pos{position:relative;z-index:1;display:grid;place-items:center;width:100%;height:100%;border-radius:50%;background:var(--blue);color:#fff;font-size:20px;font-weight:800;font-variant-numeric:tabular-nums;box-shadow:0 6px 16px rgba(var(--pulse),.3)}
.queue-orb.bump .queue-pos{animation:queueBump .5s cubic-bezier(.2,.9,.3,1.3)}
.queue-text{min-width:0;line-height:1.45}
.queue-line{display:block;font-size:14px}
.queue-line b{font-weight:800}
.queue-text small{display:block;margin-top:3px;font-size:11.5px;color:var(--muted)}
@keyframes queuePulse{0%{transform:scale(1);opacity:.7}70%{opacity:0}100%{transform:scale(2.3);opacity:0}}
@keyframes queueBump{0%{transform:scale(1)}45%{transform:scale(1.18)}100%{transform:scale(1)}}
@media (prefers-reduced-motion:reduce){.queue-orb i{animation:none;opacity:0}.queue-orb.bump .queue-pos{animation:none}}
html[data-theme="dark"] .queue-box{background:#14273f;border-color:#1f3a5e}
html[data-theme="dark"] .queue-orb{--pulse:63,127,196}
@media (max-width:480px){.queue-box{padding:12px;gap:12px}.queue-orb{width:48px;height:48px}.queue-pos{font-size:18px}}

/* --- Réglages : webservice (paramètres façon Postman) et file d'attente --- */
.api-params{display:grid;gap:10px}
.api-param{display:grid;grid-template-columns:minmax(0,1fr) 150px;gap:8px;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--surface-soft)}
.api-param .api-value{grid-column:1 / -1}
.api-param-foot{grid-column:1 / -1;display:flex;align-items:center;gap:18px;flex-wrap:wrap}
.api-param-foot .check-row{margin:0}
.api-param-foot .table-action{margin-left:auto}
.api-param.is-off{opacity:.55}
.api-add{display:flex;gap:10px;flex-wrap:wrap;margin-top:2px}
.api-add .btn{height:40px}
.api-test-out{max-height:380px;overflow-wrap:anywhere;word-break:break-word}
.api-empty{margin:0}
.queue-metrics{grid-template-columns:repeat(3,1fr)!important}
.queue-metrics strong{font-size:20px;font-variant-numeric:tabular-nums}
.queue-metrics span{font-size:10px!important}
.system-status.is-ok{color:var(--success)}
.system-status.is-warn{color:#b07a00}
.system-status.is-warn i{background:#e0a800}
html[data-theme="dark"] .api-param{background:#182336;border-color:var(--line-strong)}
html[data-theme="dark"] .system-status.is-warn{color:#f0c040}
@media (max-width:520px){.api-param{grid-template-columns:1fr}.api-param-foot{gap:14px}}
.api-actions{grid-template-columns:repeat(3,1fr)}
@media (max-width:620px){.api-actions{grid-template-columns:1fr}}

/* --- Administration des comptes : fiche complète, mot de passe, verrou, pagination --- */
.admin-user-modal{width:min(680px,100%)}
.user-form-grid .field-group:last-child{grid-column:auto}
.user-pass-box{margin:18px 0 0;padding:14px 16px 12px;border:1px solid var(--line);border-radius:14px;display:grid;gap:8px;min-width:0}
.user-pass-box legend{padding:0 6px;font-size:12px;font-weight:800;color:var(--text)}
.user-pass-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center}
.user-pass-row .btn{height:49px}
.user-pass-result{margin-top:14px;display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:12px 14px;border-radius:12px;background:#eef8f1;border:1px solid #cfe8d7;color:#1d6b3a;font-size:12.5px}
.user-pass-result code{font-size:17px;font-weight:800;letter-spacing:.06em;background:#fff;border:1px solid #cfe8d7;border-radius:8px;padding:6px 10px;color:#123;user-select:all}
.user-pass-result .btn{height:38px;margin-left:auto}
.user-lock-banner{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:12px;padding:10px 14px;border-radius:12px;background:var(--danger-soft);border:1px solid #f1dada;color:#a13232;font-size:12.5px}
.user-lock-banner .btn{height:38px}
.admin-pager{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:12px 16px;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}
.admin-pager-btns{display:flex;gap:8px}
.admin-pager .btn{height:38px}
.admin-pager .btn:disabled{opacity:.45;cursor:default}
html[data-theme="dark"] .user-pass-result{background:#132a1e;border-color:#24523a;color:#7fd6a0}
html[data-theme="dark"] .user-pass-result code{background:#0f1727;border-color:#24523a;color:#e9eff6}
html[data-theme="dark"] .user-lock-banner{background:#2a1a1a;border-color:#5a2b2b;color:#f0a0a0}
@media (max-width:620px){.user-pass-row{grid-template-columns:1fr}.admin-pager{justify-content:center}}
