:root{
  --green:#087a4a;--green-2:#0f925c;--green-dark:#075a38;--mint:#e9f7f0;
  --ink:#102c23;--muted:#60736d;--line:#dbe7e1;--surface:#fff;
  --bg:#f3f8f5;--soft:#f7faf8;--warning:#fff6dc;--warning-line:#ebc85f;
  --shadow:0 18px 50px rgba(13,69,49,.10);--shadow-soft:0 8px 28px rgba(13,69,49,.08);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

/* Bottom navigation (mobile app shell) */
.bottom-nav {display:flex;gap:6px;align-items:center;justify-content:space-between;position:fixed;left:0;right:0;bottom:0;padding:8px 12px;background:linear-gradient(180deg,rgba(255,255,255,.8),#fff);border-top:1px solid var(--line);box-shadow:0 -6px 18px rgba(8,122,74,.06)}
.bottom-nav .nav-item{flex:1;display:flex;flex-direction:column;align-items:center;gap:6px;padding:6px;border-radius:12px;background:transparent;border:0;font-weight:800;color:var(--muted)}
.bottom-nav .nav-item .nav-icon{font-size:1.15rem}
.bottom-nav .nav-item.nav-center{position:relative;transform:translateY(-8px)}
.bottom-nav .nav-item.nav-center .nav-icon{font-size:1.5rem}
.bottom-nav .nav-item.nav-center{flex:0 0 84px;background:linear-gradient(135deg,var(--green),var(--green-2));color:#fff;box-shadow:0 10px 26px rgba(8,122,74,.18)}
.bottom-nav .nav-item.nav-center .nav-label{font-size:0.78rem}
.bottom-nav .nav-item.active{color:var(--green-dark)}

/* Test panel */
.test-panel{padding:12px;border:1px solid var(--line);border-radius:12px;background:rgba(255,255,255,.98);margin-top:10px}
.test-checklist{display:grid;gap:8px}
.test-item{display:flex;align-items:center;justify-content:space-between;padding:8px;border-radius:10px;border:1px solid #eef3ef;background:var(--soft)}
.test-item .desc{flex:1;margin-right:8px;font-size:0.92rem}
.test-item .controls{display:flex;gap:6px}
.test-badge.pass{background:#dff3e8;color:#0d6039;padding:6px 8px;border-radius:8px;font-weight:800}
.test-badge.minor{background:#fff3c8;color:#725a00;padding:6px 8px;border-radius:8px;font-weight:800}
.test-badge.fail{background:#fff1ee;color:#a02f20;padding:6px 8px;border-radius:8px;font-weight:800}
.test-counter{font-weight:900;margin-bottom:8px}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;min-height:100vh;background:radial-gradient(circle at top right,#e9f7f0 0,transparent 34%),linear-gradient(180deg,#f7fbf9 0%,var(--bg) 100%);color:var(--ink);overflow-x:hidden}
button,input{font:inherit}
button{-webkit-tap-highlight-color:transparent}
.app-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  padding: 1.25rem 1rem calc(1.25rem + env(safe-area-inset-bottom));
  color: #587068;
  font-size: 0.78rem;
  font-weight: 600;
}
.app-shell{width:100%;max-width:820px;margin:0 auto;padding:max(12px,env(safe-area-inset-top)) 16px max(28px,env(safe-area-inset-bottom));box-sizing:border-box}
.app-header{padding:2px 2px 18px}
.brand-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:28px}
.brand-lockup{display:flex;align-items:center;gap:11px}
.cgi-logo{display:block;height:36px;width:auto}
.blason{display:block;height:28px;width:auto}
.app-brand-top{display:flex;align-items:center;gap:8px}
.app-brand-top img{background:none;border-radius:6px}
.app-brand-bottom{display:flex;flex-direction:column}
.brand-mark{width:42px;height:42px;display:grid;place-items:center;border-radius:14px;background:linear-gradient(145deg,var(--green),var(--green-2));color:#fff;font-size:1.25rem;box-shadow:0 8px 20px rgba(8,122,74,.22)}
.brand-site,.brand-product{display:block;line-height:1.15}
.brand-site{font-size:.75rem;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);font-weight:800}
.brand-product{margin-top:4px;font-size:1rem}
.icon-link{display:grid;place-items:center;width:42px;height:42px;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.78);text-decoration:none;color:var(--green-dark);font-size:1.05rem;box-shadow:var(--shadow-soft)}
.hero-copy{max-width:600px}
.eyebrow{margin:0 0 8px;color:var(--green);font-size:.76rem;text-transform:uppercase;letter-spacing:.09em;font-weight:850}
h1{margin:0;font-size:clamp(1.9rem,6.5vw,3.6rem);line-height:1;letter-spacing:-.04em}
.subtitle{margin:14px 0 0;color:var(--muted);font-size:1rem;line-height:1.48;max-width:560px}
.trust-row{display:flex;gap:8px;overflow-x:auto;margin-top:18px;padding-bottom:2px;scrollbar-width:none}
.trust-row::-webkit-scrollbar{display:none}
.trust-row span{flex:0 0 auto;padding:8px 11px;border:1px solid #cce4d7;border-radius:999px;background:rgba(255,255,255,.75);color:var(--green-dark);font-size:.76rem;font-weight:750}
.search-card{position:relative;background:rgba(255,255,255,.94);border:1px solid rgba(208,226,217,.95);border-radius:26px;padding:16px;box-shadow:var(--shadow);backdrop-filter:blur(14px)}
.search-composer{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;padding:0 14px;border:1.5px solid #c5d9cf;border-radius:18px;background:#fff;transition:border-color .15s,box-shadow .15s}
.search-composer:focus-within{border-color:var(--green);box-shadow:0 0 0 5px rgba(8,122,74,.10)}
.search-icon{font-size:1.65rem;line-height:1;color:var(--green)}
.search-composer input{min-width:0;width:100%;height:58px;border:0;outline:0;background:transparent;color:var(--ink);font-size:1rem}
.search-composer input::placeholder{color:#8a9a95}
.clear-search{width:34px;height:34px;border:0;border-radius:50%;background:#edf3f0;color:var(--muted);font-size:1.25rem;cursor:pointer}
.primary{border:0;border-radius:17px;background:linear-gradient(135deg,var(--green),var(--green-2));color:#fff;font-weight:850;cursor:pointer;box-shadow:0 12px 25px rgba(8,122,74,.20)}
.primary:disabled{opacity:.45;cursor:not-allowed;box-shadow:none}
.search-submit{width:100%;min-height:56px;margin-top:12px;padding:0 18px;display:flex;align-items:center;justify-content:space-between;font-size:1rem}
.photo-action{width:100%;margin-top:10px;padding:13px 14px;display:grid;grid-template-columns:44px 1fr 28px;align-items:center;gap:12px;border:1px solid var(--line);border-radius:17px;background:var(--soft);color:var(--ink);text-align:left;opacity:1}
.photo-action:disabled{cursor:default}
.photo-icon{width:44px;height:44px;display:grid;place-items:center;border-radius:12px;background:#e7efeB;color:var(--green-dark);font-size:1.1rem}
.photo-action > span{min-width:0}
.photo-action > span:nth-child(2){overflow:hidden}
.photo-action .arrow{display:grid;place-items:center;width:28px}
.photo-action strong,.photo-action small{display:block}
.photo-action strong{font-size:.9rem}
.photo-action small{margin-top:3px;color:var(--muted);font-size:.75rem;white-space:normal;overflow-wrap:break-word}

/* Make photo-action shrink-friendly on narrow screens */
.photo-action{min-width:0}
.photo-action > span{min-width:0}
.photo-action strong{white-space:normal;word-break:break-word}
.photo-action small{display:block;opacity:.9}

.photo-panel{position:relative;max-height:calc(100vh - 140px);overflow:auto;padding-bottom:160px}

/* Photo preview layout: cap image height and keep submit button visible */
.photo-preview-container{display:flex;flex-direction:column;gap:12px}
.photo-preview-container img#photoPreview{width:100%;height:auto;max-height:36vh;object-fit:contain;border-radius:12px;box-shadow:inset 0 2px 10px rgba(0,0,0,0.04)}

/* Prominent sticky primary button: full width, elevated above bottom-nav */
.photo-submit{
  position:static;
  display:block;
  align-self:stretch;
  width:100%;
  padding:14px 16px;
  border-radius:14px;
  background:linear-gradient(135deg,var(--green),var(--green-2));
  color:#fff;
  font-weight:900;
  box-shadow:0 12px 30px rgba(8,122,74,.18);
  border:0;
}

/* If a photo preview is present, nudge/hide the bottom nav to avoid overlap (uses :has — modern browsers) */
body.photo-preview-active .bottom-nav{
  transform:translateY(12px);
  opacity:0.85;
  transition:transform .18s,opacity .18s;
}

/* Enhanced visibility for the photo submit action */
.photo-submit{
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  gap:10px;
  font-size:1.06rem;
  padding:16px 20px;
  border-radius:18px;
  letter-spacing:0.01em;
  text-transform:none;
  transition:transform .12s ease, box-shadow .18s ease, opacity .12s ease;
}

.photo-submit .btn-icon{font-size:1.05rem;display:inline-block}
.photo-submit .btn-label{font-weight:900}

.photo-submit{
  font-size:1.08rem;
  padding:16px 22px;
  border-radius:20px;
}

/* Slightly elevate above the bottom nav */
@media (max-width:720px){
  .photo-panel{max-height:calc(100vh - 120px);padding-bottom:140px}
  .photo-submit{bottom:calc(env(safe-area-inset-bottom,0px) + 64px)}
}

@media(max-width:420px){
  .photo-panel{padding-bottom:100px}
  .photo-preview-container img#photoPreview{max-height:32vh}
  .photo-submit{font-size:1rem;padding:12px 14px}
}
.soon-badge{padding:5px 8px;border-radius:999px;background:#e7efeB;color:var(--green-dark);font-size:.67rem;font-weight:850;text-transform:uppercase;letter-spacing:.05em}
.live-suggestions{margin-top:8px;border:1px solid var(--line);border-radius:16px;background:#fff;overflow:hidden;box-shadow:var(--shadow-soft)}
.live-suggestion{width:100%;display:grid;grid-template-columns:44px 1fr auto;align-items:center;gap:11px;padding:10px 12px;border:0;border-bottom:1px solid #edf2ef;background:#fff;text-align:left;color:var(--ink);cursor:pointer}
.live-suggestion:last-child{border-bottom:0}.live-suggestion:hover{background:var(--mint)}
.live-rule-visual {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  object-fit: contain;
  border-radius: 11px;
  background: #fff;
}
.live-suggestion strong,.live-suggestion small{display:block}.live-suggestion strong{font-size:.88rem}.live-suggestion small{margin-top:3px;color:var(--muted);font-size:.72rem}
.live-suggestion .suggestion-arrow{color:var(--green);font-weight:900}
.frequent-section{margin-top:26px}
.section-heading{display:flex;align-items:end;justify-content:space-between;gap:12px;margin:0 2px 12px}
.section-kicker{margin:0 0 3px;color:var(--green);font-size:.72rem;text-transform:uppercase;letter-spacing:.08em;font-weight:850}
h2{margin:0;font-size:1.22rem;letter-spacing:-.02em}
.swipe-hint {
  padding: 8px 4px;
  border: 0;
  background: transparent;
  color: var(--green);
  font-size: .74rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.swipe-hint:hover {
  text-decoration: underline;
}

.swipe-hint:focus-visible {
  outline: 3px solid rgba(22, 120, 74, .20);
  outline-offset: 3px;
  border-radius: 8px;
}
.quick-grid{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(120px,44%);gap:14px;overflow-x:auto;padding:8px 8px 14px;scroll-snap-type:x mandatory;scrollbar-width:none}
.quick-grid::-webkit-scrollbar{display:none}
.quick-choice{scroll-snap-align:start;min-height:178px;padding:0;border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.98);color:var(--ink);text-align:left;overflow:hidden;cursor:pointer;box-shadow:var(--shadow-soft);transition:transform .14s,border-color .14s,box-shadow .14s;display:flex;flex-direction:column;flex:0 0 auto;max-width:100%}
.quick-choice:active{transform:scale(.985)}
.quick-choice:hover{border-color:#9ccbb3;box-shadow:0 12px 30px rgba(13,69,49,.12)}
.quick-image{width:100%;aspect-ratio:4/3;display:block;object-fit:cover;padding:6px;background:linear-gradient(180deg,#fff,#f9fbfa);border-bottom:1px solid #edf2ef;overflow:hidden}
.quick-content{padding:12px;display:flex;flex-direction:column;gap:8px;overflow:hidden}
.quick-title{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;font-weight:850;font-size:.95rem;line-height:1.24;word-break:break-word}
.quick-content .meta{font-size:0.82rem;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.quick-content .meta{display:none}
.card{background:rgba(255,255,255,.96);border:1px solid var(--line);border-radius:24px;box-shadow:var(--shadow);padding:18px;margin-top:18px}
.hidden{display:none!important}.visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.debug-banner{margin:0 0 14px;padding:11px 13px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-radius:15px;background:#123b2d;color:#fff;box-shadow:var(--shadow-soft)}
.debug-banner div{display:grid;gap:2px}.debug-banner strong{font-size:.86rem}.debug-banner span{font-size:.72rem;opacity:.78}.debug-banner a{color:#fff;font-size:.78rem;font-weight:850}
.pilot-notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 14px 0;
  padding: 14px 16px;
  border: 1px solid #b8d8ca;
  border-radius: 14px;
  background: #eef8f3;
  color: #173f32;
  line-height: 1.45;
}

.pilot-notice strong {
  flex: 0 0 auto;
}

.pilot-notice span {
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  .pilot-notice {
    flex-direction: column;
    gap: 4px;
  }
}
.back-link{padding:8px 0;border:0;background:transparent;color:var(--green);font-weight:850;cursor:pointer;margin-bottom:10px}
.result-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}
.preview-card{padding:12px;border:1px solid var(--line);border-radius:19px;background:var(--soft)}
.preview-card img{width:100%;height:165px;object-fit:contain;border-radius:15px;background:#fff}
.preview-name{margin:11px 0 4px;font-size:1rem;font-weight:850}.preview-meta{margin:0;color:var(--muted);font-size:.82rem;line-height:1.45}
.result-heading-row{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.result-label{margin:0;color:var(--green);font-size:.72rem;text-transform:uppercase;letter-spacing:.08em;font-weight:900}
.result-title{margin:12px 0 8px;font-size:clamp(2.2rem,8vw,3rem);line-height:.98;letter-spacing:-.04em;color:var(--green);font-weight:950}.object-name{margin:8px 0 14px;color:var(--muted);font-size:.95rem}
.bin-box{padding:16px;border:1.5px solid #9cd1b5;border-radius:18px;background:var(--mint);margin:14px 0}.bin-box strong{display:block;color:var(--green-dark);font-size:1.2rem}.bin-location{margin-top:5px;color:var(--muted);font-size:.88rem}
.collector-card {
  margin: 14px 0;
  overflow: hidden;
  border: 1.5px solid #9cd1b5;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(17, 70, 51, 0.08);
}

.collector-image {
  display: block;
  width: 100%;
  height: 320px;
  padding: 14px;
  object-fit: contain;
  background: linear-gradient(135deg, #f7fbf9 0%, #e9f7f0 100%);
  border-radius: 20px;
  box-shadow: inset 0 2px 8px rgba(13, 69, 49, 0.08);
}

.meta-list{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:12px 0}.meta-item{padding:11px 12px;border:1px solid var(--line);border-radius:14px;background:var(--soft)}.meta-item .label{display:block;color:var(--muted);font-size:.66rem;text-transform:uppercase;letter-spacing:.07em;font-weight:850}.meta-item .value{display:block;margin-top:5px;font-size:.86rem;font-weight:800}
.explanation{line-height:1.6;margin:14px 0;color:var(--ink);font-size:.9rem}.explanation.short{max-height:4.5em;overflow:hidden}.explanation-toggle{display:block;margin-top:8px;color:var(--green);font-weight:700;font-size:.85rem;cursor:pointer}.warning{padding:12px 13px;border:1px solid var(--warning-line);border-radius:14px;background:var(--warning);font-size:.9rem;line-height:1.45}.warning.forbidden{background:#fee2e2;border:1px solid #fecaca;color:#7f1d1d}.forbidden-badge{display:flex;align-items:center;gap:8px;margin:12px 0 14px;padding:10px 12px;border-radius:10px;border-left:4px solid #dc2626;background:#fef2f2;color:#7f1d1d;font-size:.88rem;font-weight:700;letter-spacing:.02em}.forbidden-badge::before{content:"🔴";font-size:1rem}.forbidden-heading{display:flex;align-items:center;gap:8px;margin:0 0 8px;font-size:1rem;color:#dc2626;font-weight:800}
/* Filière spécifique — mise en évidence UX */
.unknown-box.forbidden-box {
  border: 2px solid #dc2626;
  background: #fff7f7;
  box-shadow: 0 10px 24px rgba(127, 29, 29, 0.08);
}

.forbidden-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 10px;
  color: #b91c1c;
  font-weight: 900;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.forbidden-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 50%;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 1.1rem;
}

.forbidden-box .result-title {
  color: #7f1d1d;
  font-size: clamp(1.8rem, 6vw, 2.4rem);
  line-height: 1.05;
  margin-top: 10px;
}

.forbidden-box .object-name {
  color: #4b1d1d;
  font-weight: 800;
}

.forbidden-box .explanation {
  font-weight: 700;
}

.forbidden-badge {
  margin: 16px 0;
  padding: 12px 14px;
  border: 1px solid #fca5a5;
  border-left: 5px solid #dc2626;
  background: #fee2e2;
  color: #7f1d1d;
  font-weight: 900;
}

.forbidden-box .warning.forbidden {
  background: #fff1f1;
  border: 1px solid #fca5a5;
  border-left: 5px solid #dc2626;
  color: #7f1d1d;
  font-weight: 700;
}

@media(max-width:620px) {
  .unknown-box.forbidden-box {
    padding: 15px;
  }

  .forbidden-box .result-title {
    font-size: 1.65rem;
  }

  .forbidden-icon {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
  }
}

.question-options,.suggestion-list{display:grid;gap:10px;margin-top:16px}.option{padding:15px;border:1.5px solid #acd1bd;border-radius:15px;background:#fff;color:var(--ink);font-weight:850;text-align:left;cursor:pointer}.option:hover{background:var(--mint);border-color:var(--green)}
.feedback{display:flex;gap:8px;flex-wrap:wrap;margin-top:18px;padding-top:15px;border-top:1px solid var(--line)}.feedback p{flex-basis:100%;margin:0 0 2px;font-weight:800}.feedback button{padding:10px 13px;border:0;border-radius:12px;background:#edf3f0;color:var(--ink);font-weight:800;cursor:pointer}

/* Feedback reason (negative) — improved UX */
.feedback-reason{margin-top:12px;padding-top:12px}
.feedback-reason-inner{background:transparent;padding:0}
.feedback-reason-title{margin:0 0 8px;font-weight:800;color:var(--ink);font-size:0.98rem}
.feedback-reason-options{display:flex;flex-direction:column;gap:8px;margin:8px 0}
.feedback-reason-options .feedback-radio{display:flex;align-items:center;gap:12px;padding:8px 10px;border:1px solid var(--line);border-radius:12px;background:#fff;cursor:pointer}
.feedback-reason-options .feedback-radio input[type="radio"]{flex:0 0 auto}
.feedback-reason-options .feedback-radio span{font-weight:700;color:var(--ink)}
.feedback-comment-label{display:block;margin-top:10px;margin-bottom:6px;color:var(--muted);font-weight:700}
#feedbackComment{width:100%;min-height:64px;padding:10px;border:1px solid var(--line);border-radius:12px;background:var(--soft);margin-top:4px;resize:vertical;font-size:0.95rem}
.feedback-actions{margin-top:12px;display:flex;justify-content:flex-start}
.feedback-actions .primary{padding:12px 20px;border-radius:12px;font-weight:900}

@media(max-width:620px){
  .feedback-reason-options .feedback-radio{padding:10px}
  #feedbackComment{min-height:56px}
  .feedback-actions .primary{width:44%;min-width:120px}
}
.resources-section{margin-top:24px;padding-top:16px;border-top:1px solid var(--line)}.resources-heading{display:block;margin:0 0 12px;color:var(--green);font-size:.72rem;text-transform:uppercase;letter-spacing:.08em;font-weight:900}.resources-links{display:flex;flex-direction:column;gap:8px}.resources-link{display:flex;align-items:center;gap:10px;padding:11px 13px;border:1px solid var(--line);border-radius:13px;background:var(--soft);color:var(--ink);text-decoration:none;font-weight:800;font-size:.88rem;cursor:pointer;transition:all .15s}.resources-link:hover:not(.disabled){background:#e9f7f0;border-color:var(--green)}.resources-link.disabled{opacity:.45;cursor:not-allowed;pointer-events:none}.resources-link::before{display:inline-block;width:24px;height:24px;text-align:center;font-size:.95rem;flex:0 0 auto}
.match-badge{display:inline-flex;padding:6px 9px;border-radius:999px;font-size:.69rem;font-weight:900}.match-fort{background:#dff3e8;color:#0d6039}.match-moyen{background:#fff3c8;color:#725a00}.match-faible{background:#ffe8d5;color:#82430c}.match-confirmed{background:#e7efff;color:#234f8c}.match-weak{background:#f1f1f1;color:#555}
.choice-box{max-width:680px}.suggestion-card{display:grid;grid-template-columns:68px 1fr;gap:12px;align-items:center;padding:9px;border:1.5px solid var(--line);border-radius:15px;background:#fff;text-align:left;color:var(--ink);cursor:pointer}.suggestion-rule-visual {
  width: 68px;
  height: 60px;
  object-fit: contain;
  border-radius: 11px;
}
.generic-rule-visual {
  display: grid;
  place-items: center;
  border: 1px solid #e2bf62;
  background: #fff5d8;
  color: #765900;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
}

.suggestion-rule-visual.generic-rule-visual {
  font-size: 1.7rem;
}
.suggestion-card strong,.suggestion-card small{display:block}.suggestion-card small{margin-top:4px;color:var(--muted)}.none-choice{padding:10px 0;border:0;background:transparent;color:var(--muted);text-decoration:underline;cursor:pointer}
.unknown-box{padding:17px;border:1px solid var(--warning-line);border-radius:17px;background:var(--warning)}
.diagnostic-panel{margin-top:18px;padding:15px;border-radius:16px;background:#112f25;color:#f4fff9;overflow:auto}.diagnostic-panel h3{margin:0 0 12px}.diagnostic-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:12px}.diagnostic-grid>div{padding:9px;border-radius:10px;background:rgba(255,255,255,.08)}
.diagnostic-grid dt{
  display:block;
  font-size:.65rem;
  text-transform:uppercase;
  letter-spacing:.06em;
  opacity:.7;
}

.diagnostic-grid dd{
  display:block;
  margin:4px 0 0;
  font-size:.8rem;
  font-weight:700;
  word-break:break-word;
}
.diagnostic-table{width:100%;border-collapse:collapse;font-size:.78rem}.diagnostic-table th,.diagnostic-table td{padding:8px;text-align:left;border-bottom:1px solid rgba(255,255,255,.13)}
.diagnostic-note{margin:10px 0 0;font-size:.72rem;opacity:.72}
.diagnostic-grid{
  margin:0 0 12px;
}
.utility-drawer{margin-top:20px;border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.75);overflow:hidden}
.utility-drawer>summary{padding:14px 16px;cursor:pointer;color:var(--muted);font-size:.82rem;font-weight:800}
.utility-content{padding:0 14px 15px}.catalog-card{border-top:1px solid var(--line);padding-top:12px}
.catalog-card>summary{cursor:pointer;color:var(--green-dark);font-weight:800;font-size:.85rem}
.catalog-summary{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:12px}
.catalog-item{padding:11px;border:1px solid var(--line);border-radius:13px;background:#fff}.catalog-item strong{display:block;margin-bottom:5px;font-size:.84rem}.catalog-status{margin-top:5px;color:var(--muted);font-size:.76rem}.tool-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.secondary{padding:10px 12px;border:0;border-radius:12px;background:var(--ink);color:#fff;font-weight:800;cursor:pointer}.link-button{text-decoration:none;display:inline-flex;align-items:center}.text-button{padding:9px;border:0;background:transparent;color:var(--muted);text-decoration:underline;cursor:pointer}.log-count{display:block;margin-top:10px;color:var(--muted);font-size:.76rem}
/* Validation */
.validation-shell{width:min(1180px,calc(100% - 24px));margin:0 auto;padding:28px 0 44px}.validation-shell .topbar{display:grid;gap:14px;margin-bottom:16px}.validation-toolbar{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin:16px 0}.validation-toolbar label{display:grid;gap:5px;font-size:.82rem;color:var(--muted);font-weight:760}.validation-toolbar input{width:115px;padding:9px 10px;border:1px solid var(--line);border-radius:10px}.metrics{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;margin:18px 0}.metric{padding:16px;border:1px solid var(--line);border-radius:16px;background:#fff}.metric span{display:block;font-size:.76rem;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);font-weight:800}.metric strong{display:block;margin-top:7px;font-size:1.6rem}.validation-table-wrap{overflow:auto;border:1px solid var(--line);border-radius:18px;background:#fff}.validation-table{width:100%;border-collapse:collapse;min-width:1000px;font-size:.84rem}.validation-table th{position:sticky;top:0;background:#eaf6ef;color:#143e30;text-align:left;padding:11px;border-bottom:1px solid var(--line)}.validation-table td{padding:10px 11px;border-bottom:1px solid #edf2ef;vertical-align:top}.validation-table tr.pass{background:#fbfffc}.validation-table tr.fail{background:#fff1ee}.status-pass{color:#0e7545;font-weight:850}.status-fail{color:#a02f20;font-weight:850}.filters{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.filter-button{padding:8px 12px;border:1px solid var(--line);background:#fff;border-radius:999px;cursor:pointer}.filter-button.active{background:var(--green);color:#fff;border-color:var(--green)}
@media(min-width:760px){.quick-grid{grid-auto-flow:initial;grid-template-columns:repeat(4,1fr);overflow:visible}.swipe-hint{display:none}}
@media(max-width:620px){.app-shell{padding-left:12px;padding-right:12px}.brand-row{margin-bottom:22px}.trust-row{margin-right:-12px}.result-grid{grid-template-columns:1fr}.preview-card{display:grid;grid-template-columns:96px 1fr;gap:12px;align-items:center}.preview-card img{height:96px}.preview-name{margin:0 0 4px}.meta-list{grid-template-columns:1fr}.catalog-summary{grid-template-columns:1fr}.diagnostic-grid{grid-template-columns:1fr 1fr}.preview-placeholder {
  height: 96px;
}}
.preview-placeholder {
  width: 100%;
  height: 165px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--mint);
  color: var(--green-dark);
  font-size: 2rem;
  font-weight: 900;
}
@media(max-width:390px){.quick-grid{grid-auto-columns:minmax(138px,48%)}.trust-row span{font-size:.71rem}.hero-copy h1{font-size:2.45rem}.diagnostic-grid{grid-template-columns:1fr}}
@media(max-width:850px){.metrics{grid-template-columns:repeat(2,1fr)}}
@media(max-width:520px){.metrics{grid-template-columns:1fr}}

/* Compact period filters */
.admin-overview-filters{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.admin-overview-filters .admin-period-buttons{display:flex;gap:6px}
.admin-overview-filters label{display:flex;flex-direction:column;gap:4px;margin:0;font-size:0.88rem}
.admin-overview-filters input[type="date"]{height:36px;padding:6px;border-radius:8px;border:1px solid var(--line)}
.admin-overview-filters #applyAdminPeriod{height:38px;padding:8px 12px}
.admin-period-active{margin-left:auto;font-size:0.88rem;color:var(--muted)}

/* Compact admin auth panel */
.admin-auth-section{padding:10px;border-radius:12px}
.admin-auth-section .admin-auth-form{display:flex;gap:8px;align-items:center}
.admin-auth-section .admin-auth-form label{display:none}
.admin-auth-section input#adminToken{min-width:220px;height:36px;padding:6px;border-radius:8px;border:1px solid var(--line)}
.admin-auth-section .primary{height:38px;padding:8px 12px}


/* Views and premium adjustments */
.view{display:block}
.view.hidden{display:none}
.view.active{display:block}

/* Header compact and persistent */
.app-header{padding:8px 0 12px 6px;border-bottom:1px solid rgba(15,120,92,0.06);background:linear-gradient(180deg,rgba(255,255,255,.6),transparent)}
.brand-row{align-items:center}
.brand-lockup .app-brand-bottom{line-height:1}

/* Trois zones : icône, identité (commandes en haut à droite), visuel du site aligné sur le conteneur de résultat */
.brand-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;justify-content:normal;align-items:center;gap:16px}
.brand-lockup{display:contents}
.brand-lockup .brand-mark{grid-column:1;grid-row:1}
.brand-lockup .app-brand{grid-column:2;grid-row:1;align-self:center;justify-self:start;min-width:0}
.header-actions{grid-column:2;grid-row:1;align-self:start;justify-self:end;display:flex;gap:8px}
.header-actions:not(:has(a:not(.hidden))){display:none}
.site-building{grid-column:3;grid-row:1;width:180px;margin:0;min-width:0}
.site-building:not(:has(img[src])){display:none}
.app-brand .orleans-visual:not([src]){display:none}
.site-building-visual{display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;border-radius:14px;box-shadow:var(--shadow-soft)}
@media (max-width:760px){
  .site-building{width:150px}
}
@media (max-width:620px){
  .brand-row{gap:12px}
  .site-building{width:104px}
  .header-actions{grid-column:1 / -1;grid-row:2;margin-top:8px}
}
@media (max-width:420px){
  .site-building{width:88px}
}

/* Home premium */
.hero-copy{padding:6px 0 4px}
.home-ctas{display:flex;flex-direction:column;gap:10px;margin-top:14px}
.large-cta{padding:14px 16px;border-radius:14px;font-size:1.05rem}
.home-sub{font-size:.88rem;color:var(--muted);margin-top:6px}
.how-it-works ol{margin:8px 0 0;padding-left:18px}
.how-it-works li{margin:6px 0}

/* Premium polish additions */
body{
  background-image: radial-gradient(circle at 10% 10%, rgba(255,255,255,0.35) 0px, rgba(255,255,255,0.02) 120px),
                    linear-gradient(180deg, rgba(246,250,248,0.6), rgba(243,248,245,0.9));
  background-color: var(--bg);
}

.hero-stage{
  display:flex;flex-direction:column;align-items:stretch;gap:18px;padding:18px;border-radius:22px;background:linear-gradient(180deg,rgba(255,255,255,0.98),rgba(250,255,250,0.95));box-shadow:0 18px 50px rgba(8,122,74,0.06);border:1px solid rgba(12,80,50,0.04);
}
.hero-copy h1{font-weight:900;color:var(--green-dark);text-shadow:0 2px 0 rgba(255,255,255,0.6)}
.hero-intro{max-width:640px}
.hero-ctas-row{display:flex;flex-wrap:wrap;gap:12px;align-items:center}
.large-cta{padding:14px 18px;border-radius:14px;font-size:1.05rem;box-shadow:0 12px 30px rgba(8,122,74,0.16);transition:transform .16s,box-shadow .16s}
.large-cta:hover{transform:translateY(-3px);box-shadow:0 20px 40px rgba(8,122,74,0.18)}
.secondary{background:transparent;color:var(--green-dark);border:1.5px solid rgba(8,122,74,0.12);padding:12px 14px;border-radius:12px}
.how-cards{display:flex;gap:12px;margin-top:6px;overflow-x:auto;padding-bottom:6px;scroll-snap-type:x mandatory}
.how-step{display:flex;gap:12px;align-items:center;background:transparent;padding:10px;border-radius:12px;min-width:180px;flex:0 0 auto;scroll-snap-align:start}
.how-step .num{flex:0 0 46px;width:46px;height:46px;border-radius:12px;background:linear-gradient(180deg,#fff,#f3f7f3);display:grid;place-items:center;font-weight:900;color:var(--green);box-shadow:0 6px 18px rgba(8,122,74,0.06)}
.how-step .desc{font-weight:800;color:var(--muted);white-space:normal;word-break:break-word;line-height:1.35}

/* Make hero more visible on mobile first screen */
@media(max-width:420px){
  .hero-stage{padding:14px;border-radius:18px}
  .hero-copy h1{font-size:2.25rem}
}

/* Admin dashboard V5 skeleton styles */
.admin-overview-v5{display:grid;gap:16px}
.admin-kpi-row .metric .kpi-sub{margin-top:6px;color:var(--muted);font-size:0.85rem}
.admin-kpi-row{display:flex;gap:12px;align-items:stretch;flex-wrap:wrap;margin-bottom:6px}
.admin-kpi-row .metric{flex:1;min-width:140px;padding:12px;border-radius:12px;border:1px solid var(--line);background:#fff}
.admin-activity-card .admin-activity-chart{min-height:140px;border:1px dashed var(--line);display:flex;align-items:center;justify-content:center;padding:12px;border-radius:12px;background:linear-gradient(180deg,#fff,#fbfff9)}
.admin-day-summary{margin-top:12px;padding:10px;border-top:1px dashed var(--line)}
.admin-day-summary-title{font-weight:800;margin-bottom:8px}
.admin-day-summary-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.admin-day-summary-grid div{padding:10px;border-radius:10px;border:1px solid #eef6ef;background:var(--soft);text-align:center}
.admin-causes-list{display:grid;gap:8px;margin-top:8px}
.admin-cause{display:flex;justify-content:space-between;align-items:center;padding:10px;border-radius:10px;border:1px solid var(--line);background:#fff}
.admin-tnr-summary{display:flex;gap:12px;align-items:center;margin-top:8px}
.tnr-item{padding:8px 10px;border-radius:10px;border:1px solid var(--line);background:#fff}
.admin-tnr-actions{margin-top:10px}
.admin-todo-grid{display:flex;gap:10px;margin-top:10px}
.todo-pill{display:flex;flex-direction:column;align-items:flex-start;gap:6px;padding:10px;border-radius:12px;border:1px solid var(--line);background:#fff;min-width:80px}

/* Hidden helper to keep DOM nodes without showing them */
.admin-collector-card.hidden,.admin-source-card.hidden,.admin-pilotage-card.hidden{display:none}

@media(max-width:760px){
  .admin-day-summary-grid{grid-template-columns:repeat(2,1fr)}
  .admin-kpi-row{gap:8px}
  .admin-kpi-row .metric{min-width:120px}
  .admin-activity-card .admin-activity-chart{min-height:120px}
  .admin-todo-grid{flex-wrap:wrap}
}

@media(max-width:620px){
  .how-cards{
    display:grid;
    grid-template-columns:1fr;
    gap:10px;
    overflow-x:visible;
    padding-bottom:0;
  }

  .how-step{
    min-width:0;
    padding:12px;
  }
}

/* Quick choices polish */
.quick-choice{min-height:200px;border-radius:18px;padding:0;overflow:hidden;display:flex;flex-direction:column}
.quick-image{height:140px;padding:12px;background:linear-gradient(180deg,#fff,#f8fcf8)}
.quick-content{padding:14px}
.quick-title{font-size:1rem}
.quick-choice .meta{display:block;color:var(--muted);font-size:0.82rem;margin-top:8px}
.quick-choice:focus{outline:3px solid rgba(8,122,74,0.12);outline-offset:4px}

/* Déchets fréquents — liste verticale sur mobile */
@media (max-width:620px) {

  .quick-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-flow: row;
    grid-auto-columns: initial;
    gap: 10px;
    overflow-x: visible;
    padding: 4px 0 12px;
    scroll-snap-type: none;
  }

  .quick-choice {
    width: 100%;
    min-height: 92px;
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 8px 12px 8px 8px;
    border-radius: 16px;
    text-align: left;
    scroll-snap-align: none;
  }

  .quick-image {
    width: 78px;
    height: 78px;
    aspect-ratio: auto;
    padding: 6px;
    border: 0;
    border-radius: 12px;
    object-fit: contain;
    background: #fff;
  }

  .quick-content {
    min-width: 0;
    padding: 0;
    overflow: visible;
  }

  .quick-title {
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
    font-size: 1rem;
    line-height: 1.25;
    font-weight: 850;
  }

  .quick-choice::after {
    content: "›";
    color: var(--green);
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1;
  }

  .swipe-hint {
    display: none;
  }
}

/* Result card premium */
.result-card{transition:transform .18s,opacity .18s}
.result-card.showing{transform:translateY(-6px);opacity:1}
.result-heading-row{align-items:flex-start}
.result-title{color:var(--green-dark);font-weight:980}
.back-link{background:transparent;padding:8px 0;color:var(--green-dark);font-weight:900}
.collector-card{border-radius:16px;overflow:hidden}
.collector-image{height:260px}
.bin-box{border-radius:14px;padding:14px}

/* Bottom nav: elevate central button */
.bottom-nav{backdrop-filter: blur(6px);background:linear-gradient(180deg,rgba(255,255,255,0.9),rgba(255,255,255,0.8));border-radius:18px}
.bottom-nav .nav-item{transition:transform .12s,box-shadow .12s}
.bottom-nav .nav-item.nav-center{transform:translateY(-10px);box-shadow:0 18px 40px rgba(8,122,74,0.12);width:88px;height:88px;border-radius:22px;display:flex;align-items:center;justify-content:center}
.bottom-nav .nav-item .nav-icon{font-size:1.4rem}
.bottom-nav .nav-item.active{background:#fff;border:1px solid rgba(8,122,74,0.06)}

/* subtle transitions and focus */
button, .nav-item, .quick-choice, .primary, .secondary {transition:all .14s ease}

/* Accessibility: focus visible */
:focus{outline: none}
:focus-visible{outline:3px solid rgba(8,122,74,0.16);outline-offset:3px}

/* Desktop: limit content width and create card centered layout */
@media(min-width:900px){
  .app-shell{width:820px}
  .hero-stage{padding:28px}
  .collector-image{height:340px}
}

/* Identifier view adjustments */
.identifier-actions{display:flex;flex-direction:column;gap:10px;align-items:stretch;margin-top:12px}
.identifier-actions .search-submit,.identifier-actions .photo-action{width:100%}
.photo-action{min-width:0;display:grid;grid-template-columns:44px 1fr 28px;align-items:center;gap:10px;padding:10px 12px}
.photo-action > span{min-width:0}
.photo-action > span:nth-child(2){overflow:hidden}
.photo-action strong,.photo-action small{white-space:normal;overflow-wrap:break-word}

@media(min-width:620px){
  .identifier-actions{flex-direction:row;align-items:center}
  .identifier-actions .search-submit{flex:1;width:auto}
  .identifier-actions .photo-action{width:auto;min-width:160px}
}

/* Fréquents view uses existing quick-grid but center content */
#frequentsView{padding-top:6px}

/* Result card — softer, premium */
.result-card{border-radius:18px;padding:16px;box-shadow:0 10px 28px rgba(13,69,49,.06);border:0;background:linear-gradient(180deg,#fff,#fbfffb)}
.result-title{font-size:1.8rem}
.preview-card{border:0;padding:10px;background:transparent}
.collector-card{border:0}

/* Bottom nav polish */
.bottom-nav{max-width:720px;margin:0 auto;padding:10px 14px;border-radius:16px}
.bottom-nav .nav-item{min-height:48px}
.bottom-nav .nav-item.active{box-shadow:0 6px 18px rgba(8,122,74,.08);background:#fff;border:1px solid #edf6ef}

/* Desktop layout center content */
@media(min-width:900px){
  .app-shell{width:720px}
  .bottom-nav{position:sticky;bottom:18px}
}

@media (min-width: 760px) {
  .app-shell {
    padding-top: 10px;
  }

  .app-header {
    padding-bottom: 12px;
  }

  .brand-row {
    margin-bottom: 16px;
  }

  .hero-copy h1 {
    font-size: 3.35rem;
    line-height: 0.96;
  }

  .subtitle {
    margin-top: 9px;
  }

  .trust-row {
    margin-top: 12px;
  }
}

.admin-shell {
  width: min(1400px, calc(100% - 24px));
}

.admin-auth-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 16px;
}

.admin-auth-form label {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.admin-auth-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1.5px solid #c5d9cf;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.admin-auth-form input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(8, 122, 74, 0.1);
}

.admin-auth-form .primary {
  min-height: 48px;
  padding: 0 18px;
}

.admin-status {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.admin-status[data-state="success"] {
  color: #0e7545;
  font-weight: 760;
}

.admin-status[data-state="error"] {
  color: #a02f20;
  font-weight: 760;
}

.admin-status[data-state="loading"] {
  color: var(--green-dark);
  font-weight: 760;
}

.admin-status[data-state="empty"] {
  color: #725a00;
  font-weight: 760;
}

.pilotage-shell {
  width: min(1280px, calc(100% - 24px));
}

.pilotage-card {
  overflow: hidden;
}

.pilotage-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(220px, 1.4fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr);
  gap: 12px;
  align-items: end;
  margin-top: 16px;
}

.pilotage-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.pilotage-filters input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1.5px solid #c5d9cf;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.pilotage-filters input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(8, 122, 74, 0.1);
}

.pilotage-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.pilotage-actions button {
  min-height: 44px;
  padding: 0 16px;
}

.pilotage-metrics {
  grid-template-columns: repeat(4, 1fr);
}

.pilotage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.pilotage-scope-note {
  margin: 12px 0 16px;
  padding: 12px 14px;
  border: 1px solid #ebc85f;
  border-radius: 14px;
  background: #fff6dc;
  color: #5e4b06;
  font-size: 0.88rem;
  line-height: 1.45;
}

.dashboard-bars {
  display: grid;
  gap: 11px;
  margin-top: 14px;
}

.dashboard-bar-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.85fr) minmax(120px, 1.4fr) auto;
  gap: 12px;
  align-items: center;
}

.dashboard-bar-label {
  min-width: 0;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.dashboard-bar-track {
  display: block;
  height: 12px;
  border-radius: 999px;
  background: #e5eee9;
  overflow: hidden;
}

.dashboard-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--green), var(--green-2));
}

.dashboard-bar-value {
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.pilotage-empty {
  margin: 0;
  padding: 13px 14px;
  border: 1px dashed #c8d9d0;
  border-radius: 14px;
  background: #f8fbf9;
  color: var(--muted);
  font-size: 0.86rem;
}

.pilotage-definition-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
}

.pilotage-definition-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid #edf2ef;
}

.pilotage-definition-list div:last-child {
  border-bottom: 0;
}

.pilotage-definition-list dt {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 760;
}

.pilotage-definition-list dd {
  margin: 0;
  color: var(--ink);
  font-weight: 900;
  text-align: right;
}

.pilotage-table {
  min-width: 560px;
}

@media (max-width: 980px) {
  .pilotage-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pilotage-metrics,
  .pilotage-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .pilotage-filters,
  .pilotage-metrics,
  .pilotage-grid {
    grid-template-columns: 1fr;
  }

  .pilotage-actions button {
    width: 100%;
  }

  .dashboard-bar-row {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .dashboard-bar-value {
    white-space: normal;
  }

  .pilotage-definition-list div {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .pilotage-definition-list dd {
    text-align: left;
  }
}

.admin-priority-row {
  background: #fff6dc;
}

.admin-priority-row td:first-child {
  font-weight: 850;
  color: #725a00;
}

.admin-candidate-photo {
  display: block;
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #d8e6df;
  background: #f4f8f6;
  cursor: pointer;
}

@media (max-width: 620px) {
  .admin-auth-form {
    grid-template-columns: 1fr;
  }

  .admin-auth-form label {
    grid-column: auto;
  }

  .admin-auth-form .primary {
    width: 100%;
  }
}

.admin-table-field {
  width: 100%;
  min-width: 150px;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.78rem;
}

.admin-table-field:focus {
  border-color: var(--green);
  outline: none;
  box-shadow: 0 0 0 3px rgba(8, 122, 74, 0.1);
}

.admin-save-button {
  min-height: 38px;
  padding: 7px 11px;
  white-space: nowrap;
}

.admin-save-button:disabled {
  opacity: 0.65;
  cursor: wait;
}
.photo-action {
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s,
    transform 0.15s;
}

.photo-action:hover {
  border-color: #9ccbb3;
  background: var(--mint);
}

.photo-action:active {
  transform: scale(0.99);
}

.photo-action:focus-visible {
  outline: 3px solid rgba(8, 122, 74, 0.16);
  outline-offset: 3px;
}

.photo-panel {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--soft);
}

.photo-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.photo-panel-heading h3 {
  margin: 2px 0 0;
  font-size: 1.05rem;
  line-height: 1.25;
}

.photo-help {
  margin: 12px 0 14px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.photo-select-label {
  width: 100%;
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  text-align: center;
  text-decoration: none;
  font-size: 1rem;
  cursor: pointer;
}

.photo-select-label:focus-visible,
.photo-change-label:focus-visible,
.photo-submit:focus-visible,
.photo-remove:focus-visible {
  outline: 3px solid rgba(8, 122, 74, 0.22);
  outline-offset: 3px;
}

.photo-preview-container {
  margin-top: 14px;
}

.photo-preview-container img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.photo-submit {
  width: 100%;
  min-height: 56px;
  margin-top: 12px;
  padding: 0 18px;
  font-size: 1rem;
}

.photo-preview-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.photo-change-label,
.photo-remove {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.photo-change-label {
  padding: 0 14px;
  border-radius: 12px;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 800;
}

.photo-remove {
  padding: 0 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.photo-status {
  min-height: 1.25em;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.photo-status.is-error {
  color: #a02f20;
}

.photo-status.is-success {
  color: var(--green-dark);
  font-weight: 750;
}

@media (max-width: 520px) {
  .photo-task-active .app-header {
    padding-bottom: 10px;
  }

  .photo-task-active .brand-row {
    margin-bottom: 12px;
  }

  .photo-task-active .hero-copy .eyebrow,
  .photo-task-active .hero-copy .subtitle,
  .photo-task-active .trust-row {
    display: none;
  }

  .photo-task-active .hero-copy h1 {
    font-size: 1.65rem;
    line-height: 1.05;
    letter-spacing: 0;
  }

  .photo-task-active .search-composer,
  .photo-task-active .search-submit {
    display: none;
  }

  .photo-panel {
    padding: 12px;
  }

  .photo-preview-actions {
    justify-content: space-between;
  }

  .photo-preview-container img {
    max-height: 48vh;
  }
}

/* Administration — tableau des candidats dans une zone de navigation dédiée */
.validation-table-wrap:has(#identificationCandidatesBody) {
  max-height: 70vh;
  overflow: auto;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

/* Administration compact */
.admin-page {
  width: min(1500px, calc(100% - 24px));
}

.admin-page .admin-topbar {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
  margin-bottom: 12px;
}

.admin-page h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: -0.035em;
}

.admin-dashboard {
  display: grid;
  gap: 14px;
}

.admin-zone,
.admin-section {
  margin-top: 14px;
}

.admin-page .card.admin-section {
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--shadow-soft);
}

.admin-section-header,
.admin-zone-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.admin-section-header h2,
.admin-zone-heading h2,
.admin-section-header h3 {
  margin: 0;
}

.admin-section-header h3 {
  font-size: 1rem;
}

.admin-section-subtitle {
  margin: 5px 0 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.45;
}

.admin-terms-header-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.admin-toggle-analysis {
  min-height: 38px;
  padding: 7px 12px;
  border-radius: 8px;
}

.admin-count {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: right;
}

.admin-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 8px 0 12px;
}

.admin-metrics .metric {
  min-width: 0;
  padding: 12px;
  border-radius: 10px;
}

.admin-metrics .metric span {
  font-size: 0.68rem;
}

.admin-metrics .metric output {
  margin-top: 5px;
  font-size: 1.3rem;
}

.admin-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-overview-filters {
  display: grid;
  grid-template-columns: auto repeat(2, minmax(120px, 150px)) auto minmax(210px, 1fr);
  gap: 10px;
  align-items: end;
  margin: 8px 0 10px;
}

.admin-overview-filters label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.admin-overview-filters input {
  width: 100%;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.78rem;
}

.admin-period-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-period-buttons button {
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 850;
  cursor: pointer;
}

.admin-period-buttons button.active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.admin-overview-filters button:disabled,
.admin-overview-filters input:disabled {
  cursor: progress;
  opacity: 0.62;
}

.admin-period-active {
  align-self: center;
  margin: 0;
  color: var(--green-dark);
  font-size: 0.82rem;
  font-weight: 900;
}

.admin-overview-note,
.admin-overview-loading {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.admin-overview-loading {
  min-height: 1.1rem;
  font-weight: 850;
}

.admin-overview-loading[data-state="loading"] {
  color: var(--green-dark);
}

.admin-time-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-period-metrics {
  grid-template-columns: repeat(8, minmax(0, 1fr));
}

.admin-metrics .metric small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.admin-activity-chart {
  display: flex;
  align-items: end;
  gap: 7px;
  min-height: 168px;
  max-width: 100%;
  overflow-x: auto;
  padding: 8px 2px 2px;
  color: var(--muted);
  font-size: 0.78rem;
}

.admin-activity-bar {
  display: grid;
  grid-template-rows: 1fr auto auto;
  justify-items: center;
  gap: 4px;
  min-width: 34px;
  height: 148px;
}

.admin-activity-bar-fill {
  align-self: end;
  width: 18px;
  height: var(--bar-height);
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, #087a4a, #69b58c);
}

.admin-activity-bar strong {
  color: var(--ink);
  font-size: 0.72rem;
  line-height: 1;
}

.admin-activity-bar small {
  color: var(--muted);
  font-size: 0.66rem;
  white-space: nowrap;
}

.admin-collector-chart,
.admin-source-chart {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.admin-chart-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.9fr) minmax(90px, 1.2fr) auto;
  gap: 8px;
  align-items: center;
}

.admin-chart-label {
  overflow: hidden;
  color: var(--ink);
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-chart-track {
  display: block;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8f1ec;
}

.admin-chart-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #087a4a;
}

.admin-chart-row strong {
  color: var(--ink);
  font-size: 0.76rem;
  text-align: right;
  white-space: nowrap;
}

.admin-chart-legend {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.admin-chart-legend span {
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.admin-pilotage-card {
  align-content: start;
}

.admin-compact-card {
  min-width: 0;
}

.admin-filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 10px;
  align-items: end;
  margin: 0 0 12px;
}

.admin-terms-filters {
  grid-template-columns: minmax(160px, 0.85fr) minmax(240px, 1.4fr) auto;
}

.admin-filters label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.admin-filters input,
.admin-filters select,
.admin-table-field {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.78rem;
}

.admin-filters input:focus,
.admin-filters select:focus,
.admin-table-field:focus {
  border-color: var(--green);
  outline: none;
  box-shadow: 0 0 0 3px rgba(8, 122, 74, 0.1);
}

.admin-reset-button {
  min-height: 38px;
  align-self: end;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
}

.admin-table-wrap {
  border-radius: 10px;
  max-width: 100%;
  background: #fff;
}

.admin-page .admin-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  font-size: 0.78rem;
}

.admin-page .admin-table th,
.admin-page .admin-table td {
  padding: 8px 9px;
  vertical-align: top;
}

.admin-page .admin-table th {
  z-index: 1;
  font-size: 0.72rem;
}

.admin-summary-table th:nth-child(1),
.admin-summary-table td:nth-child(1) {
  width: 58%;
}

.admin-summary-wrap {
  max-height: 270px;
  overflow: auto;
}

.admin-terms-table-wrap {
  max-height: 560px;
  overflow: auto;
  overscroll-behavior: contain;
}

.admin-candidates-table-wrap {
  max-height: 72vh;
  overflow: auto;
  overscroll-behavior: contain;
}

.admin-cell-text {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.35;
}

.admin-candidate-label-cell .admin-cell-text {
  -webkit-line-clamp: 3;
  font-weight: 800;
}

.admin-term-cell .admin-cell-text {
  font-weight: 850;
}

.admin-candidates-table th:nth-child(1),
.admin-candidates-table td:nth-child(1) { width: 76px; }
.admin-candidates-table th:nth-child(2),
.admin-candidates-table td:nth-child(2) { width: 104px; }
.admin-candidates-table th:nth-child(3),
.admin-candidates-table td:nth-child(3) { width: 116px; }
.admin-candidates-table th:nth-child(4),
.admin-candidates-table td:nth-child(4) { width: 18%; }
.admin-candidates-table th:nth-child(5),
.admin-candidates-table td:nth-child(5) { width: 146px; }
.admin-candidates-table th:nth-child(6),
.admin-candidates-table td:nth-child(6) { width: 136px; }
.admin-candidates-table th:nth-child(7),
.admin-candidates-table td:nth-child(7) { width: 146px; }
.admin-candidates-table th:nth-child(8),
.admin-candidates-table td:nth-child(8) { width: 190px; }
.admin-candidates-table th:nth-child(9),
.admin-candidates-table td:nth-child(9) { width: 102px; }
.admin-candidates-table th:nth-child(10),
.admin-candidates-table td:nth-child(10) { width: 72px; }

.admin-terms-table th:nth-child(1),
.admin-terms-table td:nth-child(1) { width: 20%; }
.admin-terms-table th:nth-child(2),
.admin-terms-table td:nth-child(2),
.admin-terms-table th:nth-child(6),
.admin-terms-table td:nth-child(6),
.admin-terms-table th:nth-child(9),
.admin-terms-table td:nth-child(9) { width: 90px; }
.admin-terms-table th:nth-child(3),
.admin-terms-table td:nth-child(3) { width: 120px; }
.admin-terms-table th:nth-child(8),
.admin-terms-table td:nth-child(8) { width: 142px; }

.admin-candidate-photo {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f4f8f5;
  background-position: center;
  background-size: cover;
  color: var(--muted);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 850;
  text-align: center;
  cursor: pointer;
}

.admin-photo-placeholder,
.admin-photo-loading,
.admin-photo-error {
  display: grid;
  place-items: center;
  padding: 5px;
  line-height: 1.15;
}

.admin-photo-loading {
  background: #edf5f0;
  color: var(--green-dark);
  cursor: progress;
}

.admin-photo-error {
  background: #fff4ef;
  color: #9d3d28;
  cursor: default;
}

.admin-candidates-load-more {
  min-width: 180px;
}

.admin-block-status {
  min-height: 1.1rem;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.admin-block-warning {
  color: #9d3d28;
}

.admin-save-button {
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  border-radius: 8px;
}

.admin-details-toggle {
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--green-dark);
  text-decoration: none;
  font-weight: 850;
}

.admin-field-preview {
  margin-top: 6px;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 25px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.admin-badge-todo {
  border-color: #d9c56c;
  background: #fff8db;
  color: #6d5700;
}

.admin-badge-progress,
.admin-badge-new {
  border-color: #b8d0ed;
  background: #eef5ff;
  color: #234f8c;
}

.admin-badge-linked,
.admin-badge-published {
  border-color: #9ccbb3;
  background: #e7f5ee;
  color: var(--green-dark);
}

.admin-badge-unpublished {
  border-color: #e1d6b2;
  background: #fffaf0;
  color: #725a00;
}

.admin-badge-muted {
  border-color: #d6dedb;
  background: #f2f5f3;
  color: #586963;
}

.admin-badge-danger {
  border-color: #efb3a7;
  background: #fff1ee;
  color: #a02f20;
}

.admin-process-help {
  display: grid;
  gap: 8px;
  margin: -2px 0 14px;
  padding: 11px 12px;
  border: 1px solid #c9ded4;
  border-radius: 8px;
  background: #f7fbf9;
  color: var(--ink);
}

.admin-process-help ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-process-help li {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--green-dark);
  font-size: 0.72rem;
  font-weight: 900;
}

.admin-process-help p,
.admin-priority-summary-note,
.admin-treatment-summary-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.admin-action-notice {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf8;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.45;
}

.admin-action-notice[data-state="success"] {
  border-color: #9ccbb3;
  background: #e7f5ee;
  color: var(--green-dark);
}

.admin-action-notice[data-state="warning"] {
  border-color: #e1c36c;
  background: #fff8db;
  color: #6d5700;
}

.admin-action-notice[data-state="error"] {
  border-color: #efb3a7;
  background: #fff1ee;
  color: #a02f20;
}

.admin-priority-only-label {
  align-self: end;
  display: flex;
  min-height: 42px;
  flex-direction: row;
  gap: 8px;
  align-items: center;
}

.admin-priority-only-label input {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}

.admin-priority-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 6px;
}

.admin-treatment-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 6px;
}

.admin-analysis-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 6px;
}

.admin-analysis-summary button,
.admin-treatment-summary button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.15;
  cursor: pointer;
}

.admin-analysis-summary button:hover,
.admin-analysis-summary button.is-active,
.admin-treatment-summary button:hover,
.admin-treatment-summary button.is-active {
  border-color: #9ccbb3;
  background: #e7f5ee;
  color: var(--green-dark);
}

.admin-analysis-summary button:focus-visible,
.admin-treatment-summary button:focus-visible {
  outline: 3px solid rgba(8, 122, 74, 0.18);
  outline-offset: 2px;
}

.admin-analysis-note {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.45;
}

.admin-analysis-content {
  display: grid;
  gap: 0;
}

.admin-treatment-preview {
  display: flex;
}

.admin-priority-summary-note,
.admin-treatment-summary-note {
  margin-bottom: 14px;
}

.admin-treatment-summary-note {
  margin-top: 0;
}

.admin-priority-summary span,
.admin-priority-badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.15;
}

.admin-priority-summary span {
  gap: 5px;
  padding: 5px 9px;
  background: #f7faf8;
  color: var(--ink);
  border-color: var(--line);
}

.admin-priority-badge {
  justify-content: center;
  max-width: 100%;
  padding: 5px 8px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.admin-priority-high {
  border-color: #cf7a7a;
  background: #fff0f0;
  color: #842323;
}

.admin-priority-medium {
  border-color: #d9b45d;
  background: #fff7df;
  color: #634a00;
}

.admin-priority-low {
  border-color: #8fb7d5;
  background: #edf7ff;
  color: #214f72;
}

.admin-priority-none {
  border-color: #d6dedb;
  background: #f2f5f3;
  color: #586963;
}

.admin-priority-details {
  overflow-wrap: anywhere;
}

.admin-details-row td {
  background: #f8fbf9;
  border-bottom: 1px solid #dfeae4;
}

.admin-details {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 1fr);
  gap: 14px;
}

.admin-details-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.admin-details-list div,
.admin-details-actions label {
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-details-list dt,
.admin-details-actions label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.admin-details-list dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.admin-details-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.admin-details-actions label {
  display: grid;
  gap: 6px;
}

.admin-observed-terms {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-observed-terms h3 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.admin-observed-terms-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.admin-observed-terms-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-observed-terms-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: baseline;
  color: var(--ink);
  font-size: 0.8rem;
}

.admin-observed-terms-list span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-observed-terms-list strong {
  color: var(--green-dark);
  font-size: 0.78rem;
  white-space: nowrap;
}

.admin-associated-count {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 900;
}

.admin-view-candidates-button {
  width: 100%;
  min-height: 30px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--green-dark);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 900;
}

.admin-details-notice {
  margin: 0;
  min-height: 100%;
  padding: 10px;
  border: 1px solid #c9ded4;
  border-radius: 8px;
  background: #f7fbf9;
  color: var(--green-dark);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.45;
}

.admin-list-footer {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.admin-show-more {
  min-height: 38px;
  padding: 7px 14px;
  border-radius: 8px;
}

.admin-priority-row {
  background: #fffaf0;
}

.admin-priority-row td:first-child {
  color: #725a00;
}

.admin-page :focus-visible {
  outline: 3px solid rgba(8, 122, 74, 0.18);
  outline-offset: 2px;
}

@media (max-width: 1180px) {
  .admin-filters,
  .admin-terms-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-overview-filters,
  .admin-period-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .admin-details,
  .admin-details-list,
  .admin-details-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .admin-page {
    width: min(100% - 16px, 1500px);
    padding-top: 18px;
  }

  .admin-page .admin-topbar,
  .admin-overview-grid,
  .admin-metrics,
  .admin-overview-filters,
  .admin-filters,
  .admin-terms-filters {
    grid-template-columns: 1fr;
  }

  .admin-chart-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-chart-row strong {
    text-align: left;
  }

  .admin-page .card.admin-section {
    padding: 12px;
  }

  .admin-section-header {
    display: grid;
  }

  .admin-terms-header-actions {
    justify-items: stretch;
  }

  .admin-count {
    text-align: left;
  }

  .admin-page .admin-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .admin-candidates-table-wrap,
  .admin-terms-table-wrap,
  .admin-summary-wrap {
    max-height: none;
  }

  .admin-page .admin-candidates-table,
  .admin-page .admin-candidates-table thead,
  .admin-page .admin-candidates-table tbody,
  .admin-page .admin-candidates-table tr,
  .admin-page .admin-candidates-table td,
  .admin-page .admin-terms-table,
  .admin-page .admin-terms-table thead,
  .admin-page .admin-terms-table tbody,
  .admin-page .admin-terms-table tr,
  .admin-page .admin-terms-table td {
    display: block;
    width: 100%;
  }

  .admin-page .admin-candidates-table thead,
  .admin-page .admin-terms-table thead {
    display: none;
  }

  .admin-page .admin-main-row {
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
  }

  .admin-page .admin-main-row td {
    display: grid;
    grid-template-columns: minmax(92px, 0.36fr) minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    padding: 7px 0;
    border: 0;
  }

  .admin-page .admin-main-row td::before {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
  }

  .admin-candidates-table .admin-main-row td:nth-child(1)::before { content: "Photo"; }
  .admin-candidates-table .admin-main-row td:nth-child(2)::before { content: "Date"; }
  .admin-candidates-table .admin-main-row td:nth-child(3)::before { content: "Priorité"; }
  .admin-candidates-table .admin-main-row td:nth-child(4)::before { content: "Libellé"; }
  .admin-candidates-table .admin-main-row td:nth-child(5)::before { content: "Déchet"; }
  .admin-candidates-table .admin-main-row td:nth-child(6)::before { content: "Statut"; }
  .admin-candidates-table .admin-main-row td:nth-child(7)::before { content: "Alias"; }
  .admin-candidates-table .admin-main-row td:nth-child(8)::before { content: "Action"; }
  .admin-candidates-table .admin-main-row td:nth-child(9)::before { content: "Enregistrer"; }
  .admin-candidates-table .admin-main-row td:nth-child(10)::before { content: "Détails"; }

  .admin-terms-table .admin-main-row td:nth-child(1)::before { content: "Terme"; }
  .admin-terms-table .admin-main-row td:nth-child(2)::before { content: "Occurrences"; }
  .admin-terms-table .admin-main-row td:nth-child(3)::before { content: "Dernière saisie"; }
  .admin-terms-table .admin-main-row td:nth-child(4)::before { content: "Décision"; }
  .admin-terms-table .admin-main-row td:nth-child(5)::before { content: "Règle"; }
  .admin-terms-table .admin-main-row td:nth-child(6)::before { content: "Score"; }
  .admin-terms-table .admin-main-row td:nth-child(7)::before { content: "Réponse"; }
  .admin-terms-table .admin-main-row td:nth-child(8)::before { content: "Candidats"; }
  .admin-terms-table .admin-main-row td:nth-child(9)::before { content: "Détails"; }

  .admin-details-row {
    margin: -10px 0 12px;
  }

  .admin-details-row td {
    display: block;
    padding: 10px;
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 10px 10px;
  }

  .admin-details,
  .admin-details-list,
  .admin-details-actions {
    grid-template-columns: 1fr;
  }
}
.candidate-technical-status-column,
.candidate-technical-status-cell {
  display: none;
}

/* App header compact branding */
.app-brand{display:flex;flex-direction:column;line-height:1}
.app-brand-top{display:flex;align-items:center;gap:8px}
.app-brand .brand-site{font-weight:900;font-size:0.9rem}
.app-brand .brand-sub{display:block;font-size:0.78rem;color:var(--muted)}
.blason{display:inline-block;vertical-align:middle;border-radius:4px}

/* Bottom navigation (mobile-first) */
.bottom-nav{position:fixed;left:0;right:0;bottom:0;display:flex;gap:6px;padding:8px 10px;background:linear-gradient(180deg,rgba(255,255,255,0.98),#fff);border-top:1px solid var(--line);box-shadow:0 -6px 18px rgba(8,122,74,.06);justify-content:space-between;align-items:center;z-index:40}
.bottom-nav .nav-item{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:8px;border:0;background:transparent;color:var(--muted);font-weight:800;border-radius:12px;min-width:0}
.bottom-nav .nav-item .nav-icon{font-size:1.25rem}
.bottom-nav .nav-item .nav-label{font-size:0.72rem;margin-top:4px}
.bottom-nav .nav-center{background:linear-gradient(135deg,var(--green),var(--green-2));color:#fff;padding:10px 12px;border-radius:14px;box-shadow:0 10px 30px rgba(8,122,74,.16);transform:translateY(-6px)}

/* Ensure main content has bottom padding to avoid being hidden */
.app-shell{padding-bottom:calc(max(34px,env(safe-area-inset-bottom)) + 80px)}

/* On desktop keep bottom nav hidden, will use normal layout */
@media(min-width:760px){
  .bottom-nav{display:none}
  .app-shell{padding-bottom:34px}
}

/* Compact hero while a photo task is active */
.photo-task-active .hero-copy .eyebrow,
.photo-task-active .hero-copy .subtitle,
.photo-task-active .trust-row{display:none}
.photo-task-active .hero-copy h1{font-size:1.65rem}

/* G22 - Respect de la préférence de réduction des mouvements */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
/* G22 - Afficher directement les trois étapes sur ordinateur */
@media (min-width: 621px) {
  .how-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    overflow-x: visible;
    scroll-snap-type: none;
  }

  .how-step {
    min-width: 0;
    padding: 8px 4px;
    scroll-snap-align: none;
  }

  .how-step .num {
    flex-shrink: 0;
  }

  .how-step .desc {
    overflow-wrap: anywhere;
  }
}
/* Correction : le texte d'aide occupe sa propre ligne */
.search-composer .search-hint {
  grid-column: 1 / -1;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* G22 - Simplification visuelle du champ de recherche */

/* Supprimer la croix native pour conserver le bouton dédié */
.search-composer input[type="search"]::-webkit-search-cancel-button,
.search-composer input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

/* Focus plus discret, tout en restant visible */
.search-composer:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(8, 122, 74, .12);
}

/* Conserver une largeur suffisante pour la saisie */
.search-composer {
  grid-template-columns: 22px minmax(0, 1fr) 34px;
  column-gap: 10px;
}

/* Texte d'aide sur une ligne séparée */
.search-composer .search-hint {
  grid-column: 1 / -1;
  padding: 0 0 10px;
  font-size: .78rem;
  line-height: 1.4;
  color: var(--muted);
}

/* G22 - Supprimer l'aide redondante du formulaire */
.search-composer .search-hint {
  display: none !important;
}

/* G22 - Navigation : fond vert uniquement sur l'onglet actif */

/* Identifier non sélectionné */
.bottom-nav .nav-item.nav-center:not(.active) {
  background: #fff;
  color: var(--muted);
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(8, 122, 74, .08);
}

/* Identifier sélectionné */
.bottom-nav .nav-item.nav-center.active {
  background: var(--green);
  color: #fff;
  border-color: transparent;
}

/* Autres onglets sélectionnés */
.bottom-nav .nav-item.active:not(.nav-center) {
  background: #eaf6ef;
  color: var(--green-dark);
  border: 1px solid #cce4d7;
}
/* G22 - Harmonisation de la navigation mobile */

/* Même géométrie pour les trois onglets */
.bottom-nav .nav-item.nav-center {
  flex: 1 1 0;
  width: auto;
  height: auto;
  min-height: 48px;
  padding: 8px;
  transform: none;
  border-radius: 12px;
  box-shadow: none;
}

/* Identifier non sélectionné */
.bottom-nav .nav-item.nav-center:not(.active) {
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  box-shadow: none;
}

/* Identifier sélectionné */
.bottom-nav .nav-item.nav-center.active {
  background: var(--green);
  color: #fff;
  border: 1px solid transparent;
  box-shadow: none;
}

/* Autres onglets sélectionnés */
.bottom-nav .nav-item.active:not(.nav-center) {
  background: #eaf6ef;
  color: var(--green-dark);
  border: 1px solid #cce4d7;
  box-shadow: none;
}

/* G28 — Valeurs calculées des indicateurs TNR */
.metrics .metric output {
  display: block;
  margin-top: 7px;
  font-size: 1.6rem;
  font-weight: 700;
}

/* G28 — Titres des fiches du référentiel */
.catalog-item h2 {
  display: block;
  margin: 0 0 5px;
  font-size: .84rem;
  font-weight: 700;
}

/* G28 — Libellés visuels sans emphase sémantique */
.brand-product {
  font-weight: 700;
}

.photo-action .photo-action-label {
  display: block;
  font-size: .9rem;
  font-weight: 700;
  white-space: normal;
  overflow-wrap: break-word;
}

/* G28 — Sémantique des libellés dynamiques */

.live-suggestion .live-suggestion-label {
  display: block;
  font-size: .88rem;
  font-weight: 700;
}

.suggestion-card .suggestion-card-label {
  display: block;
  font-weight: 700;
}

.catalog-item h3 {
  display: block;
  margin: 0 0 5px;
  font-size: .84rem;
  font-weight: 700;
}

/* G28 — Présentation du titre du pied de page */
.footer-card .footer-title {
  font-weight: 700;
}

/* G28 — Valeurs numériques de l'administration */
.admin-day-summary-grid output,
.admin-cause output,
.tnr-item output,
.todo-pill output {
  font-weight: 700;
}

.admin-section output {
  font-weight: 700;
}
/* G29 — Impression sobre des consignes de tri */
@media print {
  @page {
    size: A4 portrait;
    margin: 15mm;
  }

  html,
  body {
    width: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  .app-shell {
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
  }

  .bottom-nav,
  #searchView,
  #diagnosticPanel,
  .app-footer {
    display: none !important;
  }

  .app-header {
    position: static !important;
    padding: 0 0 10mm !important;
    background: none !important;
    box-shadow: none !important;
  }

  #resultCard:not(.hidden) {
    display: block !important;
    position: static !important;
    transform: none !important;
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    background: #fff !important;
    break-inside: avoid;
  }

  #resultCard.hidden {
    display: none !important;
  }

  * {
    text-shadow: none !important;
    print-color-adjust: economy;
  }
}

/* G29 — Éviter les impressions sans consigne définitive */
@media print {
  .app-shell:has(#resultCard.hidden)::after {
    content: "Aucune consigne de tri définitive à imprimer. Sélectionnez un déchet et affichez sa consigne avant d'imprimer.";
    display: block;
    margin-top: 15mm;
    padding: 8mm;
    border: 1px solid #999;
    color: #222;
    background: #fff;
    font-size: 12pt;
    line-height: 1.5;
  }
}

/* G29 — Masquer le bouton de retour à l'impression */
@media print {
  #resultCard > .back-link {
    display: none !important;
  }
}

/* Multisite - Masquage de securite en cas d'echec d'initialisation */
main.app-shell[hidden] {
  display: none !important;
}
/* Message de blocage du demarrage multisite */
#siteStartupError {
  box-sizing: border-box;
  width: min(640px, calc(100% - 32px));
  margin: 64px auto;
  padding: 24px 28px;
  border: 1px solid #d6dfdb;
  border-left: 4px solid #006b49;
  border-radius: 12px;
  background: #ffffff;
  color: #183b30;
  font-size: 1rem;
  line-height: 1.6;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}



/* UX Premium P1 : accès direct à la recherche et à la photo depuis l'accueil.
   Le moteur et le catalogue restent ceux de l'écran d'identification. */
.home-search-form{
  display:flex;align-items:stretch;gap:8px;margin:20px 0 12px;
  padding:5px;border:1px solid var(--line);border-radius:16px;background:#fff;
  box-shadow:0 6px 20px rgba(13,69,49,.06);
}
.home-search-form:focus-within{border-color:var(--green);box-shadow:0 0 0 3px rgba(8,122,74,.1)}
.home-search-form input{flex:1;min-width:0;border:0;outline:0;padding:11px;background:transparent;color:var(--ink)}
.home-search-submit{flex:0 0 auto;padding:0 16px;border-radius:12px}
.hero-ctas-row #homePhotoBtn{flex:1 1 180px}
.hero-ctas-row #homeIdentifierBtn{flex:1 1 110px}
.hero-ctas-row #homeFrequentsBtn{flex:1 1 100%;text-align:center}
@media(max-width:420px){
  .home-search-form{margin-top:16px}
  .home-search-form input{font-size:.88rem}
  .home-search-submit{padding:0 12px;font-size:.85rem}
}

/* Navigation de bureau : les mêmes écrans que sur mobile. */
.desktop-site-nav{display:none}
@media(min-width:760px){
  .desktop-site-nav{display:flex;align-items:center;justify-content:center;gap:12px;margin:0 0 18px}
  .desktop-site-nav button{border:1px solid var(--line);border-radius:12px;background:#fff;padding:10px 18px;color:var(--green-dark);font-weight:750;cursor:pointer}
  .desktop-site-nav button.active{background:var(--green);color:#fff;border-color:var(--green)}
  .desktop-site-nav button:focus-visible{outline:3px solid rgba(8,122,74,.25);outline-offset:2px}
}
/* La liste de suggestions existante est déplacée à côté de la saisie active. */
#homeView .live-suggestions{position:relative;z-index:5;margin:0 0 12px}


/* UX Premium P1 — suggestions consultables sur les petits écrans.
   La barre mobile ne masque pas les choix pendant leur affichage. */
@media (max-width: 759px) {
  #homeView .live-suggestions:not(.hidden) {
    max-height: min(42dvh, 280px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scroll-margin-bottom: 16px;
  }

  body:has(#homeView .live-suggestions:not(.hidden)) .bottom-nav {
    transform: translateY(calc(100% + env(safe-area-inset-bottom) + 12px));
    pointer-events: none;
  }
}

/* Un seul composant de fréquents, déplacé entre accueil et liste complète. */
.home-frequents{margin:20px 0 24px}
.home-frequents-heading{display:flex;align-items:end;justify-content:space-between;gap:12px;margin-bottom:10px}
.home-frequents-all{border:0;background:transparent;color:var(--green-dark);font-weight:800;padding:8px 4px;cursor:pointer;white-space:nowrap}
.home-frequents-all:focus-visible{outline:3px solid rgba(8,122,74,.22);outline-offset:2px;border-radius:8px}
#homeFrequentMount .quick-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-flow:row;grid-auto-columns:initial;gap:10px;overflow:visible;padding:0;scroll-snap-type:none}
#homeFrequentMount .quick-choice{display:flex;flex-direction:column;min-height:0;width:100%;gap:0;padding:8px;text-align:center;border-radius:16px;scroll-snap-align:none}
#homeFrequentMount .quick-choice:nth-child(n+5){display:none}
#homeFrequentMount .quick-image{width:100%;height:86px;object-fit:contain;background:transparent;padding:5px;border-radius:12px}
#homeFrequentMount .quick-content{width:100%;padding:8px 2px 4px}
#homeFrequentMount .quick-title{font-size:.82rem;line-height:1.3;overflow-wrap:anywhere}
@media(max-width:620px){
  #homeFrequentMount .quick-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  #homeFrequentMount .quick-image{height:74px}
  #homeFrequentMount .quick-choice{min-height:130px}
  #homeFrequentMount .quick-content{min-width:0}
}


/* Iconographie SVG uniforme — navigation mobile, sans modification des contrôles. */
.bottom-nav .nav-icon{display:grid;place-items:center;width:26px;height:26px;flex:0 0 26px}
.bottom-nav .nav-icon svg{display:block;width:23px;height:23px;stroke:currentColor}
.bottom-nav .nav-center .nav-icon svg{width:26px;height:26px}


/* UX Premium P2 — navigation de bureau alignée sur les icônes mobiles.
   Aucun changement d'espacement ni de composant sur smartphone. */
@media (min-width: 760px) {
  .app-header {
    padding: 12px 18px 0;
    margin: 0 0 20px;
    border: 1px solid rgba(11, 111, 75, .09);
    border-radius: 24px;
    background: linear-gradient(115deg, rgba(255,255,255,.98), rgba(239,248,243,.88));
    box-shadow: 0 12px 38px rgba(15,66,48,.055);
  }

  .app-header .brand-row {
    margin-bottom: 0;
    padding: 4px 4px 14px;
    gap: 20px;
  }

  .app-header .site-building {
    width: 168px;
  }

  .app-header .site-building-visual {
    border-radius: 14px;
  }

  .desktop-site-nav {
    width: max-content;
    max-width: 100%;
    margin: 0 auto;
    gap: 4px;
    padding: 5px;
    border-radius: 15px 15px 0 0;
    background: rgba(218,234,225,.55);
  }

  .desktop-site-nav button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid transparent;
    border-radius: 11px;
    background: transparent;
    padding: 11px 14px;
    color: var(--green-dark);
    font-size: .91rem;
    font-weight: 750;
    white-space: nowrap;
    transition: background-color .15s ease, box-shadow .15s ease;
  }

  .desktop-site-nav button svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
  }

  .desktop-site-nav button:hover:not(.active) {
    background: rgba(255,255,255,.78);
  }

  .desktop-site-nav button.active {
    background: #fff;
    color: var(--green-dark);
    border-color: rgba(6,114,73,.13);
    box-shadow: 0 3px 12px rgba(9,75,49,.08);
  }
}

/* Point d'entrée neutre CGI, indépendant de tout référentiel métier. */
.site-hub[hidden]{display:none!important}
.site-hub{min-height:100dvh;padding:clamp(24px,5vw,64px) 20px 60px;background:linear-gradient(155deg,#f4faf6 0%,#fff 65%);color:var(--ink)}
.site-hub-header,.site-hub-grid,.site-hub-message{max-width:1100px;margin-left:auto;margin-right:auto}
.site-hub-header img{display:block;width:104px;height:auto;max-height:56px;object-fit:contain;object-position:left}
.site-hub-eyebrow{margin:32px 0 8px;color:var(--green);font-weight:800;letter-spacing:.055em;text-transform:uppercase;font-size:.82rem}
.site-hub-header h1{font-size:clamp(2rem,5vw,3.5rem);line-height:1.12;letter-spacing:-.04em;margin:0 0 14px}
.site-hub-header>p:last-child{color:var(--muted);font-size:1.1rem;line-height:1.55;margin:0 0 26px}
.site-hub-message:not(:empty){padding:14px 18px;margin-bottom:20px;border-radius:12px;border:1px solid var(--warning-line);background:var(--warning);color:#654b11}
.site-hub-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:24px}
.site-hub-card{overflow:hidden;border:1px solid var(--line);border-radius:22px;background:#fff;box-shadow:var(--shadow-soft)}
.site-hub-visual{height:220px;background:linear-gradient(135deg,#e5f1eb,#f8faf8);display:grid;place-items:center}
.site-hub-visual img{display:block;width:100%;height:100%;object-fit:contain;padding:16px;box-sizing:border-box}
.site-hub-placeholder{font-size:2.5rem;font-weight:850;color:var(--green)}
.site-hub-body{padding:22px}
.site-hub-body h2{font-size:1.35rem;line-height:1.25;margin:0 0 18px}
.site-hub-link{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:13px 17px;border-radius:12px;background:var(--green);color:white;text-decoration:none;font-weight:800}
.site-hub-link:hover{background:var(--green-dark);color:white}
.site-hub-link:focus-visible{outline:3px solid var(--green);outline-offset:3px}
.site-hub-unavailable{display:block;color:var(--muted);font-size:.94rem;font-weight:700;padding:12px 0}
@media(max-width:600px){.site-hub{padding:24px 16px 40px}.site-hub-visual{height:190px}.site-hub-body{padding:18px}}

/* Regroupement par société, puis tri alphabétique des mini-sites. */
.site-hub-company{max-width:1100px;margin:0 auto 32px}
.site-hub-company-title{font-size:1.35rem;line-height:1.3;margin:0 0 16px;color:var(--ink)}
.site-hub-company-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:24px}
.site-hub-body h3{font-size:1.35rem;line-height:1.25;margin:0 0 18px}

/* Les sociétés se succèdent verticalement ; les sites sont en grille dans chacune. */
.site-hub-grid{display:block}

/* Hub : filtre société et carte unique, détails sous l'image sans chevauchement. */
.site-hub-controls{max-width:1100px;margin:0 auto 22px;display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.site-hub-controls label{font-weight:800;color:var(--ink)}
.site-hub-controls select{appearance:auto;min-width:min(100%,260px);padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--ink);font:inherit}
.site-hub-controls select:focus-visible{outline:3px solid rgba(8,122,74,.25);outline-offset:2px}
.site-hub-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:24px}
.site-hub-card{display:flex;flex-direction:column;min-width:0}
.site-hub-visual{flex:0 0 auto;overflow:hidden}
.site-hub-body{position:relative;z-index:1;background:#fff;flex:1 1 auto;display:flex;flex-direction:column;gap:12px;padding:20px 22px 24px}
.site-hub-body h2{position:static;display:block;margin:0;color:var(--ink);font-size:1.35rem;line-height:1.3}
.site-hub-company-caption{margin:0;color:var(--muted);font-size:.88rem}
.site-hub-link,.site-hub-unavailable{margin-top:auto}
@media(max-width:600px){.site-hub-controls{align-items:stretch;flex-direction:column;gap:8px}.site-hub-controls select{width:100%}.site-hub-body{padding:18px}}

/* Carte multisite et état de publication, sans changer les règles métier. */
.site-hub-layout{max-width:1100px;margin:0 auto;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:22px;align-items:start}
.site-hub-layout .site-hub-grid{margin:0;grid-template-columns:1fr;gap:16px}
.site-hub-layout .site-hub-card{display:grid;grid-template-columns:160px minmax(0,1fr);min-height:150px;box-shadow:0 5px 22px rgba(13,69,49,.06)}
.site-hub-layout .site-hub-visual{height:100%;min-height:150px;background:var(--soft)}
.site-hub-layout .site-hub-visual img{padding:8px;object-fit:contain}
.site-hub-layout .site-hub-body{padding:18px;gap:10px}
.site-hub-card-head{display:flex;align-items:start;justify-content:space-between;gap:8px;flex-wrap:wrap}
.site-hub-card-head h2{margin:0;font-size:1.2rem}
.site-hub-badge{display:inline-flex;align-items:center;white-space:nowrap;padding:5px 9px;border-radius:999px;font-size:.78rem;font-weight:800}
.site-hub-badge.published{background:#e2f5e8;color:#086c37}
.site-hub-badge.draft{background:#fff2d2;color:#885d00}
.site-hub-badge.inactive{background:#edf0f1;color:#53626b}
.site-hub-card[data-status=published]{border-color:#9ddab5}
.site-hub-card[data-status=draft]{border-color:#e7c976}
.site-hub-card[data-status=inactive]{border-color:#cdd4d8}
.site-hub-address{font-size:.9rem;line-height:1.5;margin:0;color:var(--muted)}
.site-hub-map-panel{position:relative;border:1px solid var(--line);border-radius:20px;background:#edf4f0;overflow:hidden}
.site-hub-map{height:470px;min-height:260px;z-index:0}
.site-hub-map-status{margin:0;padding:12px 16px;font-size:.85rem;line-height:1.45;color:var(--muted);background:white}
.site-hub-legend{max-width:1100px;margin:20px auto 0;display:flex;gap:24px;flex-wrap:wrap;font-size:.88rem;color:var(--muted)}
.site-hub-legend span{display:inline-flex;align-items:center;gap:7px}
.site-state-dot{width:11px;height:11px;border-radius:50%;display:inline-block}
.site-state-dot.published{background:#0a8e56}
.site-state-dot.draft{background:#efa900}
.site-state-dot.inactive{background:#87939b}
@media(min-width:761px){.site-hub-map-panel{position:sticky;top:20px}}
@media(max-width:760px){.site-hub-layout{grid-template-columns:1fr}.site-hub-map{height:290px}.site-hub-map-panel{order:-1}.site-hub-layout .site-hub-card{grid-template-columns:130px minmax(0,1fr)}}
@media(max-width:420px){.site-hub-layout .site-hub-card{grid-template-columns:1fr}.site-hub-layout .site-hub-visual{height:175px;min-height:175px}.site-hub-map{height:250px}}

/* Correspondance visuelle carte <-> vignette, sans autoriser les brouillons. */
.site-hub-card{cursor:pointer;transition:box-shadow .18s ease,transform .18s ease}
.site-hub-card:hover{box-shadow:0 8px 24px rgba(13,69,49,.14)}
.site-hub-card:focus-visible{outline:3px solid #127a52;outline-offset:3px}
.site-hub-card.site-hub-card-selected{outline:3px solid #147a53;outline-offset:2px;box-shadow:0 8px 24px rgba(13,69,49,.16)}
.site-map-popup{display:flex;flex-direction:column;gap:7px;min-width:150px}
.site-map-popup strong{font-size:1rem}
.site-map-popup p{margin:0;color:#435767}
.site-map-popup a{display:block;background:#087d4b;color:white;text-decoration:none;text-align:center;padding:8px 12px;border-radius:8px;font-weight:750}
.site-map-popup a:focus-visible{outline:3px solid #087d4b;outline-offset:2px}
.site-map-unavailable{font-weight:650}

/* Lien de prévisualisation dans les fenêtres Leaflet du portail CGI */
.site-map-popup .site-map-preview-link {
  display: block;
  margin-top: 12px;
  padding: 11px 14px;
  border-radius: 8px;
  background: #007d55;
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
}

.site-map-popup .site-map-preview-link:hover,
.site-map-popup .site-map-preview-link:focus-visible {
  background: #005e40;
  color: #ffffff !important;
  text-decoration: none;
}

.site-map-popup .site-map-preview-link:focus-visible {
  outline: 2px solid #003b2a;
  outline-offset: 2px;
}


/* Local recipe: full-width text-only partial search suggestions. */
.suggestion-card[data-local-partial-rule] {
  display: block;
  width: 100%;
  padding: 14px 16px;
  font: inherit;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: break-word;
}

.suggestion-card[data-local-partial-rule]:hover {
  border-color: var(--green);
  background: var(--soft);
}

.suggestion-card[data-local-partial-rule]:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
