/*
Theme Name: Agence du Trégor — Espace Client
Author: MEPHIVIO
Description: Thème portail client sombre conçu pour le shortcode [agence_crm_portal] du plugin Agence CRM.
Version: 1.5.0
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 8.2
Text Domain: agence-tregor-client
*/

:root {
  --at-bg: #020b16;
  --at-bg-soft: #071423;
  --at-panel: rgba(10, 25, 40, .92);
  --at-panel-soft: rgba(255, 255, 255, .035);
  --at-line: rgba(132, 174, 201, .18);
  --at-line-strong: rgba(77, 217, 239, .36);
  --at-text: #f8fbff;
  --at-muted: #f2f6fb;
  --at-cyan: #61d9ec;
  --at-cyan-strong: #37c9df;
  --at-red: #ff8191;
  --at-yellow: #ffd85d;
  --at-radius: 22px;
  --at-shadow: 0 30px 80px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html { background: var(--at-bg); scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--at-text);
  background:
    radial-gradient(circle at 53% 104%, rgba(29, 187, 201, .16), transparent 30%),
    radial-gradient(circle at 8% 0%, rgba(42, 167, 192, .08), transparent 23%),
    linear-gradient(180deg, #020b16 0%, #030b15 48%, #020914 100%);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--at-cyan); text-decoration: none; }
a:hover, a:focus { color: #a9f4ff; }
button, input, select, textarea { font: inherit; }

.at-site { min-height: 100vh; }
.at-shell {
  width: min(1400px, calc(100% - 48px));
  margin: 0 auto;
}
.at-topbar {
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.at-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--at-text);
}
.at-brand:hover { color: var(--at-text); }
.at-brand-mark {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(97,217,236,.34);
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(97,217,236,.12), rgba(255,255,255,.03));
  box-shadow: 0 0 34px rgba(59, 204, 226, .12);
}
.at-brand-mark svg { width: 25px; height: 25px; color: var(--at-cyan); }
.at-brand-copy { display: grid; gap: 0; line-height: 1.05; }
.at-brand-copy strong { font-size: 17px; letter-spacing: -.02em; }
.at-brand-copy small { margin-top: 5px; color: var(--at-cyan); font-size: 10px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; }
.at-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 41px;
  padding: 0 20px;
  border: 1px solid var(--at-line);
  border-radius: 999px;
  color: var(--at-text);
  background: rgba(255,255,255,.025);
  font-size: 14px;
  font-weight: 650;
}
.at-help:hover { border-color: var(--at-line-strong); background: rgba(97,217,236,.06); }

.at-login-layout {
  min-height: calc(100vh - 222px);
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(380px, .82fr);
  gap: clamp(48px, 7vw, 100px);
  align-items: center;
  padding: clamp(54px, 8vh, 110px) 0 72px;
}
.at-hero { max-width: 840px; }
.at-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 13px;
  border: 1px solid rgba(58, 207, 228, .37);
  border-radius: 999px;
  color: #75e9f8;
  background: rgba(29, 183, 203, .08);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.at-kicker svg { width: 14px; height: 14px; }
.at-hero h1 {
  max-width: 760px;
  margin: 28px 0 20px;
  color: #fff;
  font-size: clamp(50px, 5.2vw, 78px);
  line-height: .99;
  letter-spacing: -.055em;
  font-weight: 800;
}
.at-hero h1 .at-accent { color: var(--at-cyan); }
.at-lead {
  max-width: 680px;
  margin: 0;
  color: #f4f8fc;
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.65;
}
.at-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 46px;
}
.at-feature {
  min-height: 175px;
  padding: 20px 20px 18px;
  border: 1px solid var(--at-line);
  border-radius: 17px;
  background: rgba(255,255,255,.032);
}
.at-feature-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border: 1px solid rgba(97,217,236,.32);
  border-radius: 10px;
  color: var(--at-cyan);
  background: rgba(97,217,236,.08);
}
.at-feature:nth-child(1) .at-feature-icon { color: var(--at-red); border-color: rgba(255,129,145,.34); background: rgba(255,129,145,.08); }
.at-feature:nth-child(2) .at-feature-icon { color: var(--at-yellow); border-color: rgba(255,216,93,.35); background: rgba(255,216,93,.07); }
.at-feature-icon svg { width: 18px; height: 18px; }
.at-feature strong { display: block; margin-bottom: 6px; color: #fff; font-size: 14px; }
.at-feature p { margin: 0; color: #f2f6fb; font-size: 13px; line-height: 1.6; }
.at-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 28px;
  color: #f2f6fb;
  font-size: 13px;
}
.at-trust span { display: inline-flex; align-items: center; gap: 9px; }
.at-trust svg { width: 17px; height: 17px; color: var(--at-cyan); }

.at-login-panel {
  position: relative;
  padding: 34px 34px 30px;
  border: 1px solid rgba(83, 205, 225, .34);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(11, 29, 45, .96), rgba(7, 20, 35, .96));
  box-shadow: var(--at-shadow), 0 0 70px rgba(32, 201, 218, .07);
  overflow: hidden;
}
.at-login-panel:after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -110px;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: rgba(45, 207, 222, .08);
  filter: blur(50px);
  pointer-events: none;
}
.at-login-title { margin-bottom: 27px; }
.at-login-title h2 { margin: 0 0 4px; font-size: 21px; letter-spacing: -.025em; }
.at-login-title p { margin: 0; color: #f2f6fb; font-size: 14px; }

/* Shortcode login */
.at-login-panel .acrm-portal,
.at-login-panel .acrm-portal-login { all: unset; display: block; }
.at-login-panel .acrm-portal-login > p:first-child { display: none; }
.at-login-panel #loginform { margin: 0; }
.at-login-panel #loginform > p { margin: 0 0 18px; }
.at-login-panel #loginform label {
  display: block;
  color: #f4f8fc;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.at-login-panel #loginform input[type="text"],
.at-login-panel #loginform input[type="password"] {
  width: 100%;
  min-height: 49px;
  margin-top: 8px;
  padding: 0 15px;
  border: 1px solid rgba(160, 190, 211, .18);
  border-radius: 12px;
  outline: none;
  color: #f8fbff;
  background: rgba(255,255,255,.035);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
}
.at-login-panel #loginform input[type="text"]:focus,
.at-login-panel #loginform input[type="password"]:focus {
  border-color: rgba(97,217,236,.72);
  box-shadow: 0 0 0 3px rgba(97,217,236,.09);
}
.at-login-panel #loginform .login-remember { display: none !important; }
.at-login-panel #loginform .login-submit { margin: 24px 0 0; }
.at-login-panel #wp-submit {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 13px;
  cursor: pointer;
  color: #041019;
  background: var(--at-cyan);
  font-size: 15px;
  font-weight: 850;
  box-shadow: none;
}
.at-login-panel #wp-submit:hover { background: #86e8f5; transform: translateY(-1px); }
.at-login-tools {
  display: flex;
  justify-content: flex-end;
  margin: 16px 1px 8px;
  min-height: 20px;
}
.at-login-tools a {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}
.at-login-contact {
  position: relative;
  z-index: 1;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(158, 186, 207, .13);
  color: #f4f8fc;
  font-size: 12px;
  line-height: 1.6;
}
.at-login-contact a { font-weight: 650; }

.at-footer {
  min-height: 118px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-top: 1px solid rgba(143, 173, 196, .12);
  color: #f4f8fc;
  font-size: 12px;
}
.at-footer nav { display: flex; flex-wrap: wrap; gap: 30px; }
.at-footer a { color: #f4f8fc; }
.at-footer a:hover { color: var(--at-cyan); }

/* Connected portal workspace */
body.logged-in .at-public-intro { display: none; }
body.logged-in .at-shell.at-portal-shell-wrap { width: min(1660px, calc(100% - 32px)); }
.at-connected { padding: 24px 0 48px; }
.at-connected .acrm-portal { color: var(--at-text); }
.at-connected .acrm-portal-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: calc(100vh - 190px);
  border: 1px solid var(--at-line);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(6, 15, 26, .76);
  box-shadow: var(--at-shadow);
}
.at-connected .acrm-portal-sidebar { padding: 27px 18px; background: rgba(2, 8, 16, .82); border-right: 1px solid var(--at-line); }
.at-connected .acrm-portal-brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.at-connected .acrm-portal-brand-mark { display:grid; place-items:center; width:42px; height:42px; border-radius:12px; background:var(--at-cyan); color:#03111b; font-weight:900; }
.at-connected .acrm-portal-brand span:last-child { display:grid; }
.at-connected .acrm-portal-brand small { color:var(--at-muted); font-size:11px; }
.at-connected .acrm-portal-nav { display:grid; gap:6px; margin-top:34px; }
.at-connected .acrm-portal-nav a,
.at-connected .acrm-portal-back { padding: 10px 12px; border-radius: 10px; color: #f4f8fc; }
.at-connected .acrm-portal-nav a:hover,
.at-connected .acrm-portal-nav a.is-active { background: rgba(97,217,236,.09); color:#fff; }
.at-connected .acrm-portal-back { display:block; margin-top:28px; border-top:1px solid var(--at-line); border-radius:0; padding-top:20px; }
.at-connected .acrm-portal-main { min-width:0; padding: 32px; }
.at-connected .acrm-portal-topbar { display:flex; align-items:flex-start; justify-content:space-between; gap:30px; }
.at-connected .acrm-portal-eyebrow { color:var(--at-cyan); font-size:11px; font-weight:850; letter-spacing:.16em; }
.at-connected .acrm-portal-topbar h2 { margin:5px 0 0; color:#fff; font-size:34px; }
.at-connected .acrm-portal-topbar p { margin:6px 0 0; color:var(--at-muted); }
.at-connected .acrm-portal-user { padding:9px 13px; border:1px solid var(--at-line); border-radius:999px; color:#f8fbff; }
.at-connected .acrm-portal-notice { margin-top:22px; padding:14px 16px; border:1px solid rgba(77,217,239,.25); border-radius:12px; background:rgba(77,217,239,.07); color:#dffaff; }
.at-connected .acrm-portal-kpis { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin:28px 0; }
.at-connected .acrm-portal-kpi { padding:20px; border:1px solid var(--at-line); border-radius:16px; background:var(--at-panel-soft); }
.at-connected .acrm-portal-kpi strong { display:block; color:#fff; font-size:34px; }
.at-connected .acrm-portal-kpi span { color:var(--at-muted); font-size:13px; }
.at-connected .acrm-portal-section { margin-top:18px; padding:23px; border:1px solid var(--at-line); border-radius:18px; background:rgba(255,255,255,.025); }
.at-connected .acrm-portal-section h3 { margin:4px 0 14px; color:#fff; font-size:22px; }
.at-connected .acrm-portal-table { width:100%; border-collapse:collapse; color:#eaf4fb; }
.at-connected .acrm-portal-table th,
.at-connected .acrm-portal-table td { padding:12px 10px; border-bottom:1px solid var(--at-line); text-align:left; }
.at-connected .acrm-portal-table th { color:#f4f8fc; font-size:12px; text-transform:uppercase; letter-spacing:.08em; }
.at-connected .acrm-portal-list { list-style:none; padding:0; margin:0; }
.at-connected .acrm-portal-list li { padding:13px 0; border-bottom:1px solid var(--at-line); color:#f4f8fc; }
.at-connected .acrm-portal-list strong { color:#fff; }
.at-connected .acrm-portal-progress { height:7px; margin-top:9px; overflow:hidden; border-radius:999px; background:#172333; }
.at-connected .acrm-portal-progress-bar { height:100%; border-radius:inherit; background:var(--at-cyan); }
.at-connected .acrm-portal-form { margin-top:22px; padding:20px; border:1px solid var(--at-line); border-radius:15px; background:rgba(0,0,0,.14); }
.at-connected .acrm-portal-form h4 { margin:0 0 14px; color:#fff; }
.at-connected .acrm-portal-form label { color:#f4f8fc; }
.at-connected .acrm-portal-input { width:100%; margin-top:6px; padding:11px 12px; border:1px solid var(--at-line); border-radius:10px; color:#fff; background:#0c1725; }
.at-connected .acrm-portal-button { padding:11px 18px; border:0; border-radius:10px; cursor:pointer; color:#03111b; background:var(--at-cyan); font-weight:800; }
.at-connected .acrm-portal-empty { color:var(--at-muted); }

/* High-contrast accessibility: light text on every dark surface. */
.at-login-panel .acrm-portal,
.at-login-panel .acrm-portal-login,
.at-login-panel #loginform,
.at-login-panel #loginform p,
.at-login-panel #loginform label,
.at-login-contact,
.at-footer,
.at-footer a,
.at-feature p,
.at-trust,
.at-lead,
.at-login-title p,
.at-connected .acrm-portal,
.at-connected .acrm-portal p,
.at-connected .acrm-portal span,
.at-connected .acrm-portal label,
.at-connected .acrm-portal td,
.at-connected .acrm-portal th,
.at-connected .acrm-portal li {
  color: #f4f8fc;
}
.at-login-panel input::placeholder,
.at-connected input::placeholder,
.at-connected textarea::placeholder {
  color: #e8eef5;
  opacity: 1;
}
/* Keep cyan calls-to-action dark because black-on-cyan has the strongest contrast. */
.at-login-panel #wp-submit,
.at-page-button,
.at-connected .acrm-portal-button {
  color: #041019 !important;
}

.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height:1px; margin:-1px; overflow:hidden; padding:0; position:absolute!important; width:1px; word-wrap:normal!important;
}

@media (max-width: 1050px) {
  .at-login-layout { grid-template-columns: 1fr; padding-top: 50px; }
  .at-login-panel { max-width: 620px; width:100%; }
  .at-feature-grid { max-width: 820px; }
  .at-connected .acrm-portal-shell { grid-template-columns:1fr; }
  .at-connected .acrm-portal-sidebar { border-right:0; border-bottom:1px solid var(--at-line); }
  .at-connected .acrm-portal-nav { grid-template-columns:repeat(4,1fr); }
  .at-connected .acrm-portal-back { margin-top:12px; }
}
@media (max-width: 720px) {
  .at-shell { width:min(100% - 28px, 1400px); }
  .at-topbar { min-height:88px; }
  .at-brand-copy strong { font-size:15px; }
  .at-help { padding:0 14px; }
  .at-login-layout { padding:34px 0 50px; gap:38px; }
  .at-hero h1 { font-size:clamp(42px, 13vw, 62px); }
  .at-feature-grid { grid-template-columns:1fr; }
  .at-feature { min-height:0; }
  .at-login-panel { padding:26px 22px 24px; border-radius:22px; }
  .at-footer { align-items:flex-start; flex-direction:column; justify-content:center; padding:28px 0; }
  .at-footer nav { gap:16px 22px; }
  .at-connected .acrm-portal-main { padding:20px 16px; }
  .at-connected .acrm-portal-nav { grid-template-columns:1fr 1fr; }
  .at-connected .acrm-portal-kpis { grid-template-columns:1fr; }
  .at-connected .acrm-portal-topbar { flex-direction:column; }
  .at-connected .acrm-portal-table { display:block; overflow-x:auto; }
}


/* Informations, legal and support pages */
.at-content-page {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 76px 0 64px;
}
.at-page-hero {
  max-width: 820px;
  margin-bottom: 34px;
}
.at-page-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  margin-bottom: 20px;
  border: 1px solid rgba(97,217,236,.30);
  border-radius: 999px;
  color: var(--at-cyan);
  background: rgba(97,217,236,.07);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.at-page-hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -.045em;
}
.at-page-hero p {
  margin: 16px 0 0;
  color: #f4f8fc;
  font-size: 16px;
}
.at-page-card {
  padding: clamp(26px, 5vw, 56px);
  border: 1px solid var(--at-line-strong);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(10,25,40,.94), rgba(6,18,31,.94));
  box-shadow: var(--at-shadow);
}
.at-prose,
.at-prose p,
.at-prose li,
.at-prose strong,
.at-prose em,
.at-prose td,
.at-prose th { color: #edf7ff; }
.at-prose p,
.at-prose li { font-size: 15px; line-height: 1.78; }
.at-prose h2 {
  margin: 42px 0 12px;
  padding-top: 4px;
  color: #fff;
  font-size: 22px;
  letter-spacing: -.025em;
}
.at-prose h2:first-child { margin-top: 0; }
.at-prose h3 { color: #fff; }
.at-prose a { color: var(--at-cyan); text-decoration: underline; text-underline-offset: 3px; }
.at-prose ul,
.at-prose ol { padding-left: 22px; }
.at-legal-intro {
  margin: 0 0 34px;
  padding: 18px 20px;
  border: 1px solid rgba(97,217,236,.24);
  border-radius: 14px;
  background: rgba(97,217,236,.06);
}
.at-legal-intro p { margin: 0; color: #dff9ff; }
.at-support-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin: 4px 0 38px;
}
.at-support-card {
  padding: 22px;
  border: 1px solid var(--at-line);
  border-radius: 17px;
  background: rgba(255,255,255,.025);
}
.at-support-card h2 { margin: 12px 0 8px; font-size: 18px; }
.at-support-card p { margin: 8px 0 0; font-size: 14px; }
.at-support-badge {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.at-support-badge-red { color: #ffd8de; background: rgba(255,129,145,.12); border: 1px solid rgba(255,129,145,.3); }
.at-support-badge-cyan { color: #d8fbff; background: rgba(97,217,236,.10); border: 1px solid rgba(97,217,236,.28); }
.at-support-badge-yellow { color: #fff3bd; background: rgba(255,216,93,.10); border: 1px solid rgba(255,216,93,.28); }
.at-page-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 12px;
  color: #041019 !important;
  background: var(--at-cyan);
  font-weight: 850;
  text-decoration: none !important;
}
.at-page-button:hover { background: #86e8f5; }
.at-page-actions {
  margin-top: 24px;
}
.at-page-actions a {
  color: #f4f8fc;
  font-size: 13px;
}
.at-page-actions a:hover { color: var(--at-cyan); }

@media (max-width: 850px) {
  .at-content-page { padding-top: 44px; }
  .at-support-grid { grid-template-columns: 1fr; }
}

/* 1.1.5 — champ de pièce jointe du formulaire Support CRM */
.acrm-portal-file {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--at-line-strong);
  border-radius: 12px;
  background: rgba(255,255,255,.035);
  color: #f8fbff;
}
.acrm-portal-file::file-selector-button {
  margin-right: 12px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 8px;
  padding: 8px 12px;
  background: rgba(255,255,255,.08);
  color: #f8fbff;
  cursor: pointer;
}
.acrm-portal-file-help,
.acrm-portal-optional {
  color: #f4f8fc;
}
.acrm-portal-file-help {
  display: block;
  margin-top: 7px;
  font-size: .82rem;
}
.acrm-portal-notice-error {
  border-color: rgba(239,107,115,.75) !important;
  background: rgba(239,107,115,.12) !important;
  color: #fff !important;
}

/* 1.1.6 — ticketing CRM */
.at-connected .acrm-ticket-list { display:grid; gap:10px; }
.at-connected .acrm-ticket-list-item { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:15px 16px; border:1px solid var(--at-line); border-radius:13px; background:rgba(255,255,255,.025); color:#f8fbff; text-decoration:none; }
.at-connected .acrm-ticket-list-item:hover { border-color:var(--at-cyan); background:rgba(97,217,236,.05); }
.at-connected .acrm-ticket-list-main { display:grid; gap:5px; }
.at-connected .acrm-ticket-list-main strong,
.at-connected .acrm-ticket-list-main small { color:#f8fbff !important; }
.at-connected .acrm-ticket-list-meta { display:flex; flex-wrap:wrap; gap:8px; }
.at-connected .acrm-ticket-status,
.at-connected .acrm-ticket-priority,
.at-connected .acrm-ticket-badges span { display:inline-flex; padding:5px 9px; border:1px solid var(--at-line); border-radius:999px; color:#f8fbff !important; font-size:12px; }
.at-connected .acrm-ticket-priority-urgente { border-color:#ef6b73; background:rgba(239,107,115,.16); }
.at-connected .acrm-ticket-priority-haute { border-color:#e2ad16; background:rgba(226,173,22,.14); }
.at-connected .acrm-ticket-portal-detail { display:grid; gap:12px; }
.at-connected .acrm-ticket-portal-head { display:flex; justify-content:space-between; gap:20px; align-items:flex-start; }
.at-connected .acrm-ticket-portal-head h4 { margin:6px 0 0; color:#fff; font-size:22px; }
.at-connected .acrm-ticket-portal-head a { color:#f8fbff; }
.at-connected .acrm-ticket-badges { display:flex; gap:8px; }
.at-connected .acrm-ticket-message-card { padding:16px; border:1px solid var(--at-line); border-radius:13px; background:#0c1725; color:#f8fbff; }
.at-connected .acrm-ticket-message-card.client { border-left:4px solid var(--at-cyan); }
.at-connected .acrm-ticket-message-card.staff { border-left:4px solid #8b7dff; background:#101529; }
.at-connected .acrm-ticket-message-card header,
.at-connected .acrm-ticket-message-card p,
.at-connected .acrm-ticket-message-card div { color:#f8fbff !important; }
.at-connected .acrm-ticket-files { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.at-connected .acrm-ticket-files a { padding:6px 9px; border:1px solid var(--at-line); border-radius:8px; color:#f8fbff; text-decoration:none; }
.at-connected .acrm-portal-button-secondary { background:transparent; color:#f8fbff; border:1px solid var(--at-line); }
@media (max-width:700px) { .at-connected .acrm-ticket-list-item,.at-connected .acrm-ticket-portal-head { flex-direction:column; align-items:stretch; } }

/* 1.2.0 — Portail client Premium */
body.logged-in.at-portal-connected {
  background:
    radial-gradient(circle at 78% 8%, rgba(73, 210, 235, .11), transparent 28%),
    radial-gradient(circle at 18% 90%, rgba(82, 111, 255, .10), transparent 32%),
    linear-gradient(145deg, #020913 0%, #04111f 48%, #020a14 100%);
}

body.logged-in .at-shell.at-portal-shell-wrap {
  width: min(1780px, calc(100% - 38px));
}

.at-connected {
  position: relative;
  isolation: isolate;
  padding: 18px 0 36px;
}

.at-connected::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .22;
  background-image: radial-gradient(rgba(255,255,255,.16) .6px, transparent .6px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, #000, transparent 76%);
}

.at-connected .acrm-portal {
  width: 100%;
  margin: 0;
  border: 1px solid rgba(125, 200, 231, .18);
  border-radius: 28px;
  overflow: hidden;
  background: rgba(4, 13, 24, .82);
  box-shadow:
    0 38px 100px rgba(0, 0, 0, .34),
    inset 0 1px 0 rgba(255,255,255,.035);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.at-connected .acrm-portal-shell {
  grid-template-columns: 254px minmax(0, 1fr);
  min-height: 760px;
}

.at-connected .acrm-portal-sidebar {
  position: relative;
  padding: 30px 20px 24px;
  border-right: 1px solid rgba(126, 185, 211, .15);
  background:
    linear-gradient(180deg, rgba(7, 24, 37, .98), rgba(3, 13, 24, .98));
}

.at-connected .acrm-portal-sidebar::after {
  content: "";
  position: absolute;
  top: 0;
  right: -1px;
  width: 1px;
  height: 220px;
  background: linear-gradient(to bottom, rgba(97,217,236,.62), transparent);
}

.at-connected .acrm-portal-brand {
  gap: 13px;
  padding: 0 8px 27px;
  border-bottom: 1px solid rgba(130, 177, 202, .11);
}

.at-connected .acrm-portal-brand-mark {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(103, 229, 247, .42);
  border-radius: 15px;
  background:
    radial-gradient(circle at 35% 25%, rgba(255,255,255,.35), transparent 32%),
    linear-gradient(145deg, #65deef, #3197b8);
  color: #02111a;
  box-shadow: 0 14px 32px rgba(68, 205, 228, .22);
  font-size: 15px;
  letter-spacing: .02em;
}

.at-connected .acrm-portal-brand strong {
  font-size: 15px;
  letter-spacing: -.015em;
}

.at-connected .acrm-portal-brand small {
  margin-top: 3px;
  color: #91aabe;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.at-connected .acrm-portal-nav {
  gap: 8px;
  margin-top: 25px;
}

.at-connected .acrm-portal-nav a {
  position: relative;
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0 14px 0 42px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: #dceaf5;
  font-size: 13.5px;
  font-weight: 720;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}

.at-connected .acrm-portal-nav a::before {
  content: "";
  position: absolute;
  left: 14px;
  width: 10px;
  height: 10px;
  border: 2px solid #6f879b;
  border-radius: 50%;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.at-connected .acrm-portal-nav a:hover {
  transform: translateX(2px);
  border-color: rgba(97,217,236,.19);
  background: rgba(97,217,236,.055);
}

.at-connected .acrm-portal-nav a.is-active {
  color: #fff;
  border-color: rgba(97,217,236,.24);
  background:
    linear-gradient(90deg, rgba(97,217,236,.14), rgba(97,217,236,.045));
  box-shadow: inset 3px 0 0 #61d9ec;
}

.at-connected .acrm-portal-nav a.is-active::before {
  border-color: #61d9ec;
  background: #61d9ec;
  box-shadow: 0 0 0 5px rgba(97,217,236,.10), 0 0 18px rgba(97,217,236,.32);
}

.at-connected .acrm-portal-back {
  margin-top: auto;
  padding: 14px 16px;
  border: 1px solid rgba(130, 177, 202, .15);
  border-radius: 13px;
  color: #d9e8f3;
  background: rgba(255,255,255,.025);
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}

.at-connected .acrm-portal-back:hover {
  color: #fff;
  border-color: rgba(97,217,236,.34);
  background: rgba(97,217,236,.075);
}

.at-connected .acrm-portal-main {
  padding: clamp(34px, 3.5vw, 58px);
  background:
    radial-gradient(circle at 96% 0%, rgba(79, 206, 232, .09), transparent 24%),
    linear-gradient(160deg, rgba(6,18,31,.92), rgba(3,12,22,.96));
}

.at-connected .acrm-portal-topbar {
  position: relative;
  align-items: center;
  margin: 0 0 28px;
  padding: 26px 28px;
  border: 1px solid rgba(119, 184, 214, .18);
  border-radius: 20px;
  background:
    linear-gradient(120deg, rgba(97,217,236,.08), rgba(101,87,232,.055) 48%, rgba(255,255,255,.022));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
  overflow: hidden;
}

.at-connected .acrm-portal-topbar::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -90px;
  top: -150px;
  border-radius: 50%;
  background: rgba(97,217,236,.10);
  filter: blur(8px);
  pointer-events: none;
}

.at-connected .acrm-portal-eyebrow {
  color: #75e9f8;
  font-size: 10px;
  letter-spacing: .18em;
  font-weight: 850;
}

.at-connected .acrm-portal-topbar h2 {
  margin: 7px 0 5px;
  max-width: 820px;
  font-size: clamp(29px, 2.3vw, 42px);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.at-connected .acrm-portal-topbar p {
  color: #e9f2f8 !important;
  font-size: 14px;
}

.at-connected .acrm-portal-user {
  position: relative;
  z-index: 1;
  min-width: 126px;
  padding: 10px 15px;
  border-color: rgba(119, 184, 214, .26);
  background: rgba(3, 14, 25, .55);
  color: #fff;
  text-align: center;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}

.at-connected .acrm-portal-kpis {
  gap: 18px;
  margin: 0 0 24px;
}

.at-connected .acrm-portal-kpi {
  position: relative;
  min-height: 142px;
  padding: 24px 24px 22px;
  border: 1px solid rgba(121, 184, 212, .18);
  border-radius: 19px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(15,34,49,.96), rgba(8,23,36,.94));
  box-shadow:
    0 16px 38px rgba(0,0,0,.18),
    inset 0 1px 0 rgba(255,255,255,.03);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.at-connected .acrm-portal-kpi::before {
  content: "";
  position: absolute;
  width: 94px;
  height: 94px;
  top: -35px;
  right: -28px;
  border-radius: 50%;
  background: rgba(97,217,236,.12);
  box-shadow: 0 0 50px rgba(97,217,236,.10);
}

.at-connected .acrm-portal-kpi:nth-child(2)::before {
  background: rgba(139,125,255,.14);
  box-shadow: 0 0 50px rgba(139,125,255,.11);
}

.at-connected .acrm-portal-kpi:nth-child(3)::before {
  background: rgba(42,203,128,.13);
  box-shadow: 0 0 50px rgba(42,203,128,.10);
}

.at-connected .acrm-portal-kpi:hover {
  transform: translateY(-3px);
  border-color: rgba(97,217,236,.36);
  box-shadow: 0 22px 48px rgba(0,0,0,.24);
}

.at-connected .acrm-portal-kpi strong {
  position: relative;
  z-index: 1;
  margin-bottom: 10px;
  font-size: clamp(34px, 3vw, 48px);
  line-height: 1;
  letter-spacing: -.04em;
  text-shadow: 0 10px 26px rgba(0,0,0,.25);
}

.at-connected .acrm-portal-kpi span {
  position: relative;
  z-index: 1;
  color: #edf7fd !important;
  font-size: 13px;
  font-weight: 650;
}

.at-connected .acrm-portal-section {
  position: relative;
  margin: 0 0 20px;
  padding: 28px;
  border: 1px solid rgba(119, 184, 214, .17);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(10, 29, 43, .78), rgba(5, 18, 30, .84));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}

.at-connected .acrm-portal-section::before {
  content: "";
  position: absolute;
  left: 0;
  top: 29px;
  width: 3px;
  height: 34px;
  border-radius: 0 6px 6px 0;
  background: #61d9ec;
  box-shadow: 0 0 16px rgba(97,217,236,.28);
}

.at-connected .acrm-portal-section:nth-of-type(2)::before {
  background: #8b7dff;
  box-shadow: 0 0 16px rgba(139,125,255,.28);
}

.at-connected .acrm-portal-section:nth-of-type(3)::before {
  background: #2acb80;
  box-shadow: 0 0 16px rgba(42,203,128,.24);
}

.at-connected .acrm-portal-section-head {
  margin-bottom: 21px;
}

.at-connected .acrm-portal-section h3 {
  margin-top: 6px;
  font-size: 22px;
  letter-spacing: -.025em;
}

.at-connected .acrm-portal-empty {
  min-height: 70px;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 18px 20px;
  border: 1px dashed rgba(139, 184, 205, .18);
  border-radius: 13px;
  color: #dbeaf4 !important;
  background: rgba(255,255,255,.018);
}

.at-connected .acrm-portal-table {
  border-color: rgba(119,184,214,.17);
  border-radius: 13px;
  background: rgba(3, 15, 25, .34);
}

.at-connected .acrm-portal-table th {
  padding-top: 13px;
  padding-bottom: 13px;
  background: rgba(255,255,255,.035);
  color: #dfeef7 !important;
}

.at-connected .acrm-portal-table td {
  padding-top: 14px;
  padding-bottom: 14px;
  color: #f6fbff !important;
}

.at-connected .acrm-portal-table tbody tr {
  transition: background .16s ease;
}

.at-connected .acrm-portal-table tbody tr:hover td {
  background: rgba(97,217,236,.045);
}

.at-connected .acrm-portal-table a {
  color: #8eeaf7;
}

.at-connected .acrm-portal-list li {
  padding: 16px 4px;
  color: #f4f9fc !important;
}

.at-connected .acrm-portal-progress {
  height: 8px;
  background: rgba(255,255,255,.08);
}

.at-connected .acrm-portal-progress-bar {
  background: linear-gradient(90deg, #61d9ec, #8b7dff);
  box-shadow: 0 0 14px rgba(97,217,236,.28);
}

.at-connected .acrm-portal-form {
  margin-top: 22px;
  padding: 22px;
  border-color: rgba(119,184,214,.19);
  border-radius: 16px;
  background: rgba(2, 15, 25, .46);
}

.at-connected .acrm-portal-form h4 {
  margin-bottom: 18px;
  font-size: 16px;
}

.at-connected .acrm-portal-input,
.at-connected .acrm-portal-file {
  min-height: 46px;
  border-color: rgba(130, 185, 211, .22);
  border-radius: 11px;
  background: rgba(12, 32, 48, .92);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}

.at-connected textarea.acrm-portal-input {
  min-height: 132px;
  resize: vertical;
}

.at-connected .acrm-portal-input:focus {
  border-color: #61d9ec;
  box-shadow: 0 0 0 3px rgba(97,217,236,.10), 0 0 22px rgba(97,217,236,.08);
}

.at-connected .acrm-portal-button {
  min-height: 44px;
  padding: 0 19px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 11px;
  background: linear-gradient(135deg, #68e1ef, #46c9e0);
  color: #02121a;
  box-shadow: 0 12px 28px rgba(63, 196, 220, .18);
  font-weight: 850;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.at-connected .acrm-portal-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 16px 32px rgba(63, 196, 220, .24);
}

.at-connected .acrm-ticket-list {
  gap: 12px;
}

.at-connected .acrm-ticket-list-item {
  padding: 17px 18px;
  border-color: rgba(119,184,214,.18);
  border-radius: 15px;
  background: rgba(5, 22, 35, .72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
  transition: transform .17s ease, border-color .17s ease, background .17s ease;
}

.at-connected .acrm-ticket-list-item:hover {
  transform: translateY(-2px);
  border-color: rgba(97,217,236,.38);
  background: rgba(10, 35, 50, .82);
}

.at-connected .acrm-ticket-status,
.at-connected .acrm-ticket-priority,
.at-connected .acrm-ticket-badges span {
  border-color: rgba(139,184,205,.24);
  background: rgba(255,255,255,.035);
}

.at-connected .acrm-ticket-message-card {
  border-color: rgba(119,184,214,.18);
  border-radius: 15px;
  background: rgba(5, 24, 38, .78);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}

.at-connected .acrm-ticket-message-card.staff {
  background: rgba(38, 31, 76, .38);
}

.at-connected .acrm-portal-notice {
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}

@media (max-width: 1120px) {
  .at-connected .acrm-portal-shell { grid-template-columns: 220px minmax(0,1fr); }
  .at-connected .acrm-portal-main { padding: 32px 24px; }
}

@media (max-width: 860px) {
  body.logged-in .at-shell.at-portal-shell-wrap { width: min(100% - 18px, 760px); }
  .at-connected { padding-top: 8px; }
  .at-connected .acrm-portal { border-radius: 20px; }
  .at-connected .acrm-portal-shell { grid-template-columns: 1fr; }
  .at-connected .acrm-portal-sidebar { padding: 18px; border-right: 0; border-bottom: 1px solid rgba(126,185,211,.15); }
  .at-connected .acrm-portal-sidebar::after { display:none; }
  .at-connected .acrm-portal-brand { padding-bottom:16px; }
  .at-connected .acrm-portal-nav { grid-template-columns: repeat(2,minmax(0,1fr)); margin-top:16px; }
  .at-connected .acrm-portal-nav a { padding-left:38px; }
  .at-connected .acrm-portal-back { margin-top:14px; }
  .at-connected .acrm-portal-main { padding: 22px 16px 28px; }
  .at-connected .acrm-portal-topbar { padding:22px; align-items:flex-start; }
  .at-connected .acrm-portal-kpis { grid-template-columns:1fr; }
  .at-connected .acrm-portal-kpi { min-height:112px; }
  .at-connected .acrm-portal-section { padding:22px 18px; }
}

@media (max-width: 560px) {
  .at-connected .acrm-portal-nav { grid-template-columns:1fr; }
  .at-connected .acrm-portal-topbar { flex-direction:column; }
  .at-connected .acrm-portal-user { align-self:flex-start; }
  .at-connected .acrm-portal-section { border-radius:16px; }
}

/* =========================================================
   Portal Premium 1.4.0 — dashboard + routed client workspace
   ========================================================= */
body.at-portal-connected {
  background:
    radial-gradient(circle at 74% -12%, rgba(31, 173, 211, .16), transparent 33%),
    radial-gradient(circle at 20% 90%, rgba(91, 78, 220, .10), transparent 34%),
    #020b16;
}

.at-connected .at-portal-app {
  box-shadow: 0 35px 110px rgba(0,0,0,.38), 0 0 0 1px rgba(99,211,235,.035);
}

.at-connected .acrm-portal-main {
  min-width: 0;
}

/* Navigation applicative */
.at-connected .acrm-portal-sidebar {
  width: 100%;
}
.at-connected .acrm-portal-nav a {
  position: relative;
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0 44px 0 45px;
  border: 1px solid transparent;
  border-radius: 14px;
  letter-spacing: -.01em;
}
.at-connected .acrm-portal-nav a::before {
  left: 17px;
  width: 17px;
  height: 17px;
  border: 0;
  border-radius: 0;
  background: center/17px 17px no-repeat;
  box-shadow: none;
  opacity: .78;
}
.at-connected .acrm-portal-nav a[data-icon="dashboard"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dff8ff' stroke-width='1.8'%3E%3Cpath d='M4 13h6V4H4v9Zm10 7h6v-9h-6v9ZM4 20h6v-3H4v3Zm10-13h6V4h-6v3Z'/%3E%3C/svg%3E");
}
.at-connected .acrm-portal-nav a[data-icon="documents"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dff8ff' stroke-width='1.8'%3E%3Cpath d='M7 3h7l4 4v14H7V3Z'/%3E%3Cpath d='M14 3v5h5M10 12h5M10 16h5'/%3E%3C/svg%3E");
}
.at-connected .acrm-portal-nav a[data-icon="projects"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dff8ff' stroke-width='1.8'%3E%3Cpath d='M3 7h7l2 2h9v11H3V7Z'/%3E%3C/svg%3E");
}
.at-connected .acrm-portal-nav a[data-icon="support"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dff8ff' stroke-width='1.8'%3E%3Cpath d='M4 5h16v12H9l-5 4V5Z'/%3E%3Cpath d='M8 9h8M8 13h5'/%3E%3C/svg%3E");
}
.at-connected .acrm-portal-nav a.is-active::before {
  background-color: transparent;
  box-shadow: none;
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(97,217,236,.65));
}
.at-nav-count {
  position: absolute;
  right: 13px;
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0 6px;
  border: 1px solid rgba(97,217,236,.25);
  border-radius: 999px;
  color: #dffaff;
  background: rgba(97,217,236,.09);
  font-size: 10px;
  font-weight: 850;
}

/* Hero premium */
.at-connected .acrm-portal-topbar {
  min-height: 176px;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 20px 30px;
  padding: 32px 34px;
  border-color: rgba(105,205,230,.22);
  background:
    radial-gradient(circle at 88% 18%, rgba(97,217,236,.16), transparent 22%),
    radial-gradient(circle at 60% 120%, rgba(139,125,255,.11), transparent 34%),
    linear-gradient(128deg, rgba(12,38,55,.97), rgba(8,24,39,.96) 54%, rgba(6,18,31,.98));
}
.at-connected .acrm-portal-topbar h2 {
  font-size: clamp(32px, 2.7vw, 48px);
}
.at-connected .acrm-portal-topbar p {
  max-width: 650px;
}
.at-portal-quick-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  z-index: 2;
}
.at-portal-quick-actions button,
.at-overview-head button,
.at-section-back,
.at-new-ticket-button {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid rgba(145,195,218,.18);
  border-radius: 11px;
  color: #f7fcff;
  background: rgba(255,255,255,.035);
  cursor: pointer;
  font-weight: 750;
  font-size: 12px;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.at-portal-quick-actions button:hover,
.at-overview-head button:hover,
.at-section-back:hover,
.at-new-ticket-button:hover {
  transform: translateY(-1px);
  border-color: rgba(97,217,236,.42);
  background: rgba(97,217,236,.085);
}
.at-portal-quick-actions .at-quick-primary,
.at-new-ticket-button {
  color: #02131c;
  border-color: rgba(97,217,236,.7);
  background: linear-gradient(135deg, #74e4f1, #43cadf);
  box-shadow: 0 12px 30px rgba(54,197,222,.18);
}
.at-portal-quick-actions .at-quick-primary span,
.at-new-ticket-button span { font-size: 17px; margin-right: 5px; }

/* KPI interactifs */
.at-connected .acrm-portal-kpis {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.at-connected .acrm-portal-kpi {
  cursor: pointer;
  min-height: 132px;
}
.at-connected .acrm-portal-kpi:focus-visible {
  outline: 3px solid rgba(97,217,236,.34);
  outline-offset: 3px;
}
.at-kpi-arrow {
  position: absolute;
  right: 18px;
  bottom: 17px;
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(157,201,222,.16);
  border-radius: 999px;
  color: #dffaff;
  background: rgba(255,255,255,.03);
  font-size: 13px;
}

/* Dashboard allégé */
.at-dashboard-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(250px, .65fr);
  gap: 18px;
  margin: 0 0 26px;
}
.at-overview-card,
.at-mini-card {
  border: 1px solid rgba(119,184,214,.17);
  border-radius: 19px;
  background: linear-gradient(145deg, rgba(10,29,43,.82), rgba(5,18,30,.90));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}
.at-overview-card { padding: 24px; }
.at-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}
.at-overview-head h3 { margin: 4px 0 0; font-size: 19px; }
.at-overview-ticket-list { display: grid; gap: 10px; }
.at-overview-ticket-list .acrm-ticket-list-item { padding: 13px 14px; }
.at-overview-side { display: grid; grid-template-rows: 1fr 1fr; gap: 18px; }
.at-mini-card {
  position: relative;
  min-height: 0;
  padding: 20px;
  text-align: left;
  color: #fff;
  cursor: pointer;
  overflow: hidden;
}
.at-mini-card::after {
  content: "";
  position: absolute;
  width: 100px;
  height: 100px;
  right: -42px;
  top: -45px;
  border-radius: 50%;
  background: rgba(97,217,236,.10);
}
.at-mini-card:nth-child(2)::after { background: rgba(139,125,255,.12); }
.at-mini-card strong { display:block; margin: 6px 0 0; font-size: 28px; }
.at-mini-card > span:not(.at-mini-icon) { display:block; color:#f5fbff; font-size:12px; font-weight:750; }
.at-mini-card small { display:block; margin-top:8px; color:#d7e8f2; font-size:11px; }
.at-mini-icon { color: var(--at-cyan); font-size:16px; }
.at-overview-empty {
  min-height: 115px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 18px;
  border: 1px dashed rgba(139,184,205,.18);
  border-radius: 13px;
  color: #f7fcff;
}
.at-overview-empty span { color:#d9e9f2; font-size:12px; }

/* Router visuel : une vraie vue par rubrique */
.at-connected .at-portal-app[data-view="home"] .acrm-portal-section,
.at-connected .at-portal-app[data-view="documents"] .acrm-portal-kpis,
.at-connected .at-portal-app[data-view="projects"] .acrm-portal-kpis,
.at-connected .at-portal-app[data-view="support"] .acrm-portal-kpis,
.at-connected .at-portal-app:not([data-view="home"]) .at-dashboard-overview {
  display: none;
}
.at-connected .at-portal-app[data-view="documents"] .acrm-portal-section:not(#acrm-portal-documents),
.at-connected .at-portal-app[data-view="projects"] .acrm-portal-section:not(#acrm-portal-projects),
.at-connected .at-portal-app[data-view="support"] .acrm-portal-section:not(#acrm-portal-support) {
  display: none;
}
.at-connected .at-portal-app:not([data-view="home"]) .acrm-portal-topbar {
  min-height: auto;
  padding: 22px 26px;
  margin-bottom: 18px;
}
.at-connected .at-portal-app:not([data-view="home"]) .acrm-portal-topbar h2 { font-size: 24px; }
.at-connected .at-portal-app:not([data-view="home"]) .acrm-portal-topbar p,
.at-connected .at-portal-app:not([data-view="home"]) .at-portal-quick-actions { display:none; }
.at-connected .at-portal-app:not([data-view="home"]) .acrm-portal-section {
  min-height: 480px;
  margin-bottom:0;
  padding: 30px;
}
.at-connected .acrm-portal-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.at-section-back {
  flex: 0 0 auto;
  order: 2;
}

/* Support = helpdesk premium */
.at-connected #acrm-portal-support .acrm-ticket-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}
.at-connected #acrm-portal-support .acrm-ticket-list-item {
  min-height: 112px;
  align-items: flex-start;
  padding: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(97,217,236,.08), transparent 35%),
    rgba(5,22,35,.76);
}
.at-connected #acrm-portal-support .acrm-ticket-list-main strong { font-size: 15px; }
.at-connected #acrm-portal-support .acrm-ticket-list-main small { color:#d4e5ef !important; font-size:11px; }
.at-connected #acrm-portal-support .acrm-ticket-list-meta { justify-content:flex-end; }
.at-new-ticket-button { margin-left:auto; }
.at-ticket-create-collapsible[hidden] { display:none !important; }
.at-connected .at-ticket-create-collapsible {
  max-width: 780px;
  margin: 24px auto 0;
  padding: 26px;
  border: 1px solid rgba(97,217,236,.22);
  box-shadow: 0 20px 60px rgba(0,0,0,.20);
}

.at-connected .at-support-detail-mode {
  max-width: 1040px;
  margin-inline: auto;
}
.at-connected .acrm-ticket-portal-detail { gap: 18px; }
.at-connected .acrm-ticket-portal-head {
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(136,187,210,.16);
}
.at-connected .acrm-ticket-portal-head h4 { font-size: clamp(24px,2.2vw,32px); }
.at-connected .acrm-ticket-message-card {
  position: relative;
  width: min(86%, 780px);
  padding: 18px 20px;
  animation: atMessageIn .28s ease both;
  animation-delay: calc(var(--at-message-index, 0) * 35ms);
}
.at-connected .acrm-ticket-message-card.client { margin-right:auto; }
.at-connected .acrm-ticket-message-card.staff { margin-left:auto; }
.at-connected .acrm-ticket-message-card header {
  margin-bottom: 8px;
  color: #9cecf7 !important;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.at-connected .acrm-ticket-message-card.staff header { color:#b9b0ff !important; }
.at-connected .acrm-ticket-message-card p:last-child { margin-bottom:0; }
.at-connected .acrm-ticket-portal-reply {
  max-width: 820px;
  margin: 24px auto 0;
  padding: 24px;
  border-color: rgba(97,217,236,.22);
}
.at-connected .acrm-ticket-status-form {
  display:flex;
  justify-content:center;
  margin-top:4px;
}
@keyframes atMessageIn {
  from { opacity:0; transform:translateY(8px); }
  to { opacity:1; transform:translateY(0); }
}

/* Plus de sensation d'application sur grands écrans */
@media (min-width: 1450px) {
  body.logged-in .at-shell.at-portal-shell-wrap { width: min(1560px, calc(100% - 70px)); }
  .at-connected .acrm-portal-shell { grid-template-columns: 230px minmax(0,1fr); }
}

@media (max-width: 1080px) {
  .at-dashboard-overview { grid-template-columns: 1fr; }
  .at-overview-side { grid-template-columns: 1fr 1fr; grid-template-rows:auto; }
  .at-connected #acrm-portal-support .acrm-ticket-list { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .at-connected .acrm-portal-topbar { grid-template-columns:1fr; min-height:auto; }
  .at-connected .acrm-portal-user { justify-self:start; }
  .at-portal-quick-actions { grid-column:auto; }
  .at-connected .acrm-portal-kpis { grid-template-columns:1fr; }
  .at-overview-side { grid-template-columns:1fr; }
  .at-connected .acrm-ticket-message-card { width:100%; }
}
@media (max-width: 560px) {
  .at-portal-quick-actions { display:grid; grid-template-columns:1fr; }
  .at-portal-quick-actions button { width:100%; }
  .at-connected .acrm-portal-section-head { align-items:flex-start; flex-direction:column; }
  .at-section-back, .at-new-ticket-button { margin-left:0; }
}

/* Project checklist progress */
.at-connected .acrm-portal-project-card { padding:18px 0; }
.at-connected .acrm-portal-project-title { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:2px 18px; align-items:center; }
.at-connected .acrm-portal-project-title strong { font-size:17px; }
.at-connected .acrm-portal-project-title span { grid-column:1; color:var(--at-muted); font-size:12px; opacity:.82; }
.at-connected .acrm-portal-project-title b { grid-column:2; grid-row:1 / span 2; color:var(--at-cyan); font-size:18px; }
.at-connected .acrm-portal-project-phases { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 18px; margin-top:14px; padding:14px; border:1px solid var(--at-line); border-radius:12px; background:rgba(255,255,255,.02); }
.at-connected .acrm-portal-project-phase { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:5px 10px; align-items:center; }
.at-connected .acrm-portal-project-phase span { overflow:hidden; color:var(--at-muted); font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.at-connected .acrm-portal-project-phase strong { color:#fff; font-size:11px; }
.at-connected .acrm-portal-phase-track { grid-column:1 / -1; height:4px; overflow:hidden; border-radius:999px; background:#172333; }
.at-connected .acrm-portal-phase-track i { display:block; height:100%; border-radius:inherit; background:var(--at-cyan); }
@media (max-width:700px) {
  .at-connected .acrm-portal-project-phases { grid-template-columns:1fr; }
}
