/* Lucas GILL V0.82 · unified contrasts and organization controls. */
html[data-theme="dark"]{--v74-text:#f6f9ff;--v74-muted:#d2e2f0;--v74-blue:#b0e5ff;--v74-strong:#fff;--v74-line:#496c89;--crm-text:#f6f9ff;--crm-muted:#d2e2f0;--crm-border:#496c89}
html[data-theme="dark"] .portal-layout :is(.hub-card,.hub-pinned,.tile,.research-card,.hub-feature-route,.hub-quick-menu,.v74-app-kpi){color:#f5faff!important}
html[data-theme="dark"] .portal-layout :is(.tile-title,.tile-sub,.hub-card-title,.hub-card-description,.sec-head h2,.sec-head p,.hub-link-name strong,.hub-link-name small,.hub-task-main strong,.hub-task-main small,.hub-agenda-label strong,.hub-agenda-label small,.hub-pinned-head h2,.hub-pinned-head span,.hub-filter button,.hub-empty,.hub-subnote,.hub-disclaimer,.hub-feature-route small,.hub-feature-route strong,.hub-news-foot,.hub-news-disclaimer,.hub-notes-list,.hub-vault-item,.hub-vault-detail small,.hub-field,.hub-field span,.hub-settings label,.research-publisher,.research-muted,.research-article-kind,.research-article-top time){color:#eaf3ff!important;opacity:1!important}
html[data-theme="dark"] .portal-layout :is(.services-title h2,.services-title span,.hub-catalog-tools h2,.hub-catalog-tools p,.hub-pinned-title,.launch-title h2,.launch-title p,.hub-section-label,.hub-section-label span,.hub-overview-label span,.hub-overview-label strong,.v74-home-heading h2,.v74-home-heading p,.v74-app-meta,.v74-app-notes){color:#f5faff!important}
html[data-theme="dark"] .portal-layout :is(.hub-link-action,.hub-link-primary,.hub-feature-route,.nav-item,.portfolio-return,.hub-pinned-card a,.hub-custom-card a,.tile-main,.hub-quick-menu a,.v74-reading-entry a){color:#e9f6ff!important;opacity:1!important}
html[data-theme="dark"] .portal-layout :is(.hub-link-action:hover,.hub-feature-route:hover,.nav-item:hover,.portfolio-return:hover,.v74-reading-entry a:hover){color:#fff!important}
html[data-theme="dark"] .portal-layout :is(input,select,textarea,button),html[data-theme="dark"] .crm-main :is(input,select,textarea,button){accent-color:#89cbff}
html[data-theme="dark"] .portal-layout :is(input,select,textarea)::placeholder{color:#b7cbe0!important;opacity:1}
html[data-theme="dark"] .portal-layout :is(.hub-task,.hub-agenda-item,.hub-vault-item,.hub-news-item,.hub-custom-card){border-color:#4a6782!important}
html[data-theme="dark"] .portal-layout .hub-filter button.active{color:#fff!important;background:#2a5274!important}
html[data-theme="dark"] .portal-layout .hub-danger-btn{color:#ffdfe3!important}
html[data-theme="dark"] .portal-layout :is(.site-build-version,.crm-footnote,.crm-footnote a,.crm-tab,.crm-stat small,.crm-record-meta,.crm-company small,.crm-empty){color:#e2f1ff!important}
html[data-theme="dark"] .portal-layout :is(.hub-featured-drive,.hub-search-intro,.v074-customize,.v74-customize){border-color:#5b7590!important}
/* Priority Proton Drive: purple, wide action and accessible on touch. */
.hub-featured-drive{background:linear-gradient(110deg,#eeeaff,#f8f6ff 52%,#fff 100%)!important;border-color:#bdb3e5!important}
.hub-featured-drive .hub-drive-cta{flex:0 1 55%;min-width:min(520px,52%)!important;min-height:64px;padding:8px 9px!important;border-color:#b4a3e0!important;background:#fff!important}
.hub-featured-drive .hub-proton-visual{background:#f0eaff!important;display:grid;place-items:center}
.hub-featured-drive .hub-proton-go{min-width:154px;min-height:44px;justify-content:center;background:#6d43bd!important;border:1px solid #7653c2;border-radius:8px;color:#fff!important;font-size:12px;font-weight:800}
.hub-featured-drive .hub-drive-cta:hover{border-color:#8065c8!important;box-shadow:0 8px 26px #6654a82b!important}
html[data-theme="dark"] .hub-featured-drive{background:linear-gradient(115deg,#292248,#1b2441 56%,#172d43)!important;border:1px solid #7567a2!important}
html[data-theme="dark"] .hub-featured-drive .hub-drive-cta{background:#28233f!important;border-color:#8373b5!important;box-shadow:0 8px 26px #08051566!important}
html[data-theme="dark"] .hub-featured-drive .hub-proton-info strong{color:#fff!important}
html[data-theme="dark"] .hub-featured-drive .hub-proton-info span{color:#e5dcff!important}
html[data-theme="dark"] .hub-featured-drive .hub-proton-go{background:#7850cf!important;border-color:#9e7ce6!important;color:#fff!important}
html[data-theme="dark"] .hub-featured-drive .hub-drive-cta:hover{background:#322c53!important}
@media(max-width:720px){.hub-featured-drive .hub-drive-cta{flex:1 1 auto;min-width:0!important;width:100%!important}.hub-featured-drive .hub-proton-go{min-width:0!important;width:auto!important}}
/* Logo in login, both themes, without disturbing Turnstile. */
.login-story .brand-mark{display:inline-flex;align-items:center;gap:12px;text-decoration:none}
.login-story .lg-login-logo{width:53px;height:53px;object-fit:contain;border-radius:13px;box-shadow:0 0 0 1px #8bb8da88}
.login-story .brand-mark span{font-weight:750;letter-spacing:-.03em}
html[data-theme="dark"] .login-story .brand-mark span{color:#fff!important}
@media(max-width:700px){.login-story .lg-login-logo{width:42px;height:42px}}
/* Refresh, folder selection; controls visible only in organizer mode. */
.v82-home-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:9px}
.v82-home-actions .r-outline{min-height:38px;padding:8px 11px;border-radius:8px;flex:1 1 auto}
.v075-tile-editor form{grid-template-columns:minmax(155px,1fr) minmax(180px,1.6fr) minmax(170px,1fr) auto}
.v075-tile-editor select{min-height:41px;padding:8px 10px;border-radius:9px;border:1px solid var(--v74-line);background:var(--v74-surface);color:var(--v74-text);max-width:100%}
.v82-tile-mover{display:none;position:absolute;left:6px;right:6px;bottom:5px;z-index:6;gap:5px;align-items:center;border:1px solid var(--v74-line);border-radius:8px;padding:5px;background:var(--v74-surface);box-shadow:0 4px 15px #0002}
.v82-tile-mover label{display:flex;flex:1;min-width:0;flex-direction:column;gap:3px;font-size:9px;font-weight:700;color:var(--v74-muted)}
.v82-tile-mover select{width:100%;min-width:0;max-width:100%;font-size:11px;padding:5px 6px;min-height:31px;border:1px solid var(--v74-line);border-radius:6px;background:var(--v74-soft);color:var(--v74-text)}
.v82-tile-mover button{min-height:31px;min-width:26px;border:1px solid var(--v74-line);border-radius:6px;background:var(--v74-soft);color:var(--v74-text)}
.reorder-active .v82-tile-mover{display:flex}
.reorder-active .tile-entry>.tile-main{padding-bottom:75px!important}
.reorder-active .tile-entry{min-height:182px!important}
.reorder-active .tile-entry .tile-move-controls{display:none!important}
html[data-theme="dark"] .v82-tile-mover{background:#14293f!important;border-color:#6b85a0!important;box-shadow:0 10px 25px #0008}
html[data-theme="dark"] .v82-tile-mover :is(label,select,button){color:#f2f7ff!important}
@media(max-width:1050px){.v075-tile-editor form{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:610px){.v075-tile-editor form{grid-template-columns:1fr}.v82-home-actions{flex-direction:column}.v82-home-actions .r-outline{width:100%}}

/* V0.83 — Actualités : contrastes vérifiés dans le thème sombre.
   La liste ne doit jamais hériter des textes bleu foncé de portal.css. */
html[data-theme="dark"] .portal-layout .hub-news-list,
html[data-theme="dark"] .portal-layout .hub-news-entry {
  color:#f5f9ff!important;
}
html[data-theme="dark"] .portal-layout .hub-news-entry {
  display:grid;
  grid-template-columns:30px minmax(0,1fr);
  align-items:start;
  gap:12px;
  padding:13px 9px;
  margin:0;
  border-bottom:1px solid #405c78!important;
  border-radius:8px;
  text-decoration:none!important;
  background:transparent!important;
  transition:background .16s ease;
}
html[data-theme="dark"] .portal-layout .hub-news-entry:hover,
html[data-theme="dark"] .portal-layout .hub-news-entry:focus-visible {
  background:#223f5b!important;
}
html[data-theme="dark"] .portal-layout .hub-news-index {
  display:grid;
  place-items:center;
  width:29px;
  height:28px;
  min-width:29px;
  border:1px solid #527b9e;
  border-radius:8px;
  background:#23435f!important;
  color:#d7edff!important;
  font:750 11px/1 system-ui,sans-serif;
}
html[data-theme="dark"] .portal-layout .hub-news-copy {
  display:grid;
  align-content:start;
  gap:7px;
  min-width:0;
}
html[data-theme="dark"] .portal-layout .hub-news-headline {
  color:#f5f9ff!important;
  font-size:13px;
  font-weight:700;
  line-height:1.55;
  letter-spacing:0;
  -webkit-line-clamp:3;
  overflow-wrap:anywhere;
}
html[data-theme="dark"] .portal-layout .hub-news-entry:hover .hub-news-headline {
  color:#d5eeff!important;
  text-decoration:underline;
  text-decoration-color:#75bff0;
  text-underline-offset:3px;
}
html[data-theme="dark"] .portal-layout .hub-news-meta {
  display:flex;
  flex-wrap:wrap;
  gap:5px 10px;
  color:#c9d9e9!important;
  font-size:11px;
  line-height:1.3;
}
html[data-theme="dark"] .portal-layout .hub-news-meta b,
html[data-theme="dark"] .portal-layout .hub-news-meta span {
  color:#d8e9fa!important;
  font-weight:650;
}
html[data-theme="dark"] .portal-layout .hub-news-tabs {
  border-color:#45617b;
}
html[data-theme="dark"] .portal-layout .hub-news-tabs button {
  color:#d9e7f5!important;
  border-color:transparent;
  background:transparent!important;
}
html[data-theme="dark"] .portal-layout .hub-news-tabs button:hover {
  color:#fff!important;
  background:#24425f!important;
}
html[data-theme="dark"] .portal-layout .hub-news-tabs button.is-active {
  color:#fff!important;
  background:#285476!important;
  border-color:#6ea3c6!important;
}
html[data-theme="dark"] .portal-layout .hub-news-foot,
html[data-theme="dark"] .portal-layout .hub-news-foot > span,
html[data-theme="dark"] .portal-layout .hub-news-disclaimer,
html[data-theme="dark"] .portal-layout .hub-news-loading,
html[data-theme="dark"] .portal-layout .hub-news-empty {
  color:#d4e4f2!important;
  border-color:#45617b;
}
html[data-theme="dark"] .portal-layout .hub-news-sources a {
  color:#a9dfff!important;
}
html[data-theme="dark"] .portal-layout .hub-news-foot > button {
  background:#203e59!important;
  border:1px solid #537b9d!important;
  color:#fff!important;
}
@media(max-width:620px){
 html[data-theme="dark"] .portal-layout .hub-news-entry{padding:11px 4px;gap:9px}
 html[data-theme="dark"] .portal-layout .hub-news-headline{font-size:12.5px;line-height:1.5}
}
@media(prefers-reduced-motion:reduce){html[data-theme="dark"] .portal-layout .hub-news-entry{transition:none}}
