:root{
  --sanlam-blue:#0079b8;
  --sanlam-blue-2:#008dcc;
  --sanlam-deep:#006895;
  --sanlam-dark:#005f8e;
  --sanlam-soft:#e8f6fc;
  --bg:#eef4f7;
  --surface:#ffffff;
  --surface-2:#f7fbfd;
  --text:#163246;
  --muted:#657888;
  --line:rgba(0,121,184,.18);
  --shadow:0 18px 38px rgba(0,96,142,.16);
  --shadow-soft:0 10px 22px rgba(0,70,105,.08);
  --success:#147a3f;
  --warning:#9a6700;
  --danger:#b42318;
  --radius:26px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{margin:0;min-height:100vh;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,Helvetica,sans-serif;color:var(--text);background:radial-gradient(circle at top right,rgba(0,141,204,.13),transparent 34%),linear-gradient(180deg,#eaf3f8 0%,#f7fafc 48%,#edf4f7 100%)}
a{color:inherit}.muted{color:var(--muted)}code{background:#eef8fd;border:1px solid rgba(0,121,184,.12);border-radius:8px;padding:2px 6px}
.login-page{min-height:100vh;display:grid;grid-template-columns:1.05fr .95fr}.login-hero{position:relative;color:#fff;background:radial-gradient(circle at 100% 0%,rgba(255,255,255,.20) 0 120px,transparent 122px),radial-gradient(circle at -10% 95%,rgba(255,255,255,.12) 0 160px,transparent 162px),linear-gradient(155deg,var(--sanlam-deep),var(--sanlam-blue) 52%,var(--sanlam-blue-2));padding:58px 54px;display:flex;align-items:center}.brand-large{max-width:620px}.brand-large .logo-wrap{width:94px;height:94px;display:grid;place-items:center;border-radius:26px;background:#fff;box-shadow:0 14px 24px rgba(0,62,94,.20);margin-bottom:26px}.brand-large .logo-wrap img{width:70px;height:70px;object-fit:contain}.brand-large h1{margin:0;font-size:42px;line-height:1.05;letter-spacing:-.04em}.brand-large p{margin:14px 0 0;color:rgba(255,255,255,.84);line-height:1.6}.login-badges{display:flex;flex-wrap:wrap;gap:10px;margin-top:22px}.badge,.pill.badge.light{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:6px 10px;font-size:10.5px;font-weight:900;text-transform:uppercase;letter-spacing:.06em;background:#eef8fd;color:var(--sanlam-dark);border:1px solid rgba(0,121,184,.14)}.login-badges .badge{background:rgba(255,255,255,.16);border-color:rgba(255,255,255,.20);color:#fff}.login-side{display:flex;align-items:center;justify-content:center;padding:54px 42px}.login-box{width:100%;max-width:430px;background:rgba(255,255,255,.94);border:1px solid var(--line);border-radius:32px;box-shadow:var(--shadow-soft);padding:30px}.login-box h2{margin:0;font-size:26px;letter-spacing:-.03em}.login-box p{margin:8px 0 22px;color:var(--muted);line-height:1.5}.form-row{display:grid;gap:8px;margin-bottom:16px}.form-row label,.admin-search label{font-size:12px;font-weight:850;letter-spacing:.06em;text-transform:uppercase;color:var(--sanlam-dark)}input,select{width:100%;min-height:46px;border:1px solid rgba(0,121,184,.22);border-radius:16px;background:#fff;padding:10px 13px;font:inherit;color:var(--text);outline:none}input:focus,select:focus{border-color:var(--sanlam-blue);box-shadow:0 0 0 4px rgba(0,141,204,.12)}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 16px;border:0;border-radius:16px;text-decoration:none;font-weight:850;cursor:pointer;transition:.18s ease;white-space:nowrap}.btn-primary{color:#fff;background:linear-gradient(135deg,var(--sanlam-blue),var(--sanlam-blue-2));box-shadow:0 12px 18px rgba(0,121,184,.22)}.btn-secondary{color:var(--sanlam-dark);background:#eef8fd;border:1px solid rgba(0,121,184,.15)}.btn-muted{color:var(--muted);background:#f3f6f8;border:1px solid rgba(90,110,125,.16)}.btn-danger{color:#fff;background:linear-gradient(135deg,#b42318,#d92d20);box-shadow:0 10px 16px rgba(180,35,24,.18)}.btn-full{width:100%}.alert{padding:12px 14px;border-radius:16px;margin-bottom:16px;font-size:14px}.alert-danger{background:#fff1f0;border:1px solid rgba(179,38,30,.20);color:var(--danger)}.alert-ok{background:#effaf4;border:1px solid rgba(20,122,63,.20);color:var(--success)}
.topbar{position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:14px 32px;background:linear-gradient(90deg,#0a6aa4 0%,#0b73ae 45%,#1387c9 100%);backdrop-filter:blur(12px);border-bottom:1px solid rgba(255,255,255,.14);box-shadow:0 12px 24px rgba(0,73,112,.18)}.brand-mini{display:flex;align-items:center;gap:12px;text-decoration:none}.brand-logo{width:52px;height:52px;display:grid;place-items:center;border-radius:16px;background:#fff;box-shadow:0 8px 16px rgba(0,35,60,.18);border:1px solid rgba(255,255,255,.28)}.brand-logo img{width:38px;height:38px;object-fit:contain}.brand-mini strong{display:block;font-size:18px;letter-spacing:-.03em;color:#fff}.brand-mini small{display:block;color:rgba(255,255,255,.82);font-weight:700;font-size:12px;text-transform:uppercase;letter-spacing:.08em}.top-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.nav-link,.logout{min-height:38px;display:inline-flex;align-items:center;padding:8px 13px;border-radius:999px;text-decoration:none;font-weight:850;font-size:13px;color:#fff;border:1px solid rgba(255,255,255,.2);background:rgba(255,255,255,.10);box-shadow:inset 0 1px 0 rgba(255,255,255,.12)}.nav-link.active,.nav-link:hover{background:rgba(255,255,255,.18);border-color:rgba(255,255,255,.32)}.logout{color:#fff;background:rgba(255,255,255,.12)}.logout:hover{background:rgba(255,255,255,.2)}.user-chip{display:flex;align-items:center;gap:9px;padding:8px 11px;border:1px solid rgba(255,255,255,.2);border-radius:999px;background:rgba(255,255,255,.10);color:#fff}.user-chip b{font-size:13px}.user-chip em{font-style:normal;font-size:10px;font-weight:900;letter-spacing:.08em;color:var(--sanlam-dark);background:#fff;border-radius:999px;padding:4px 7px}.wrapper{width:min(1240px,calc(100% - 52px));margin:0 auto;padding:30px 0 44px}.page-title{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin:14px 0 22px}.page-title h1{margin:0;font-size:34px;line-height:1.08;letter-spacing:-.04em}.page-title p{margin:8px 0 0;color:var(--muted);line-height:1.5;max-width:820px}.page-title-compact{align-items:center}.admin-title{margin-bottom:14px}.stats{display:flex;gap:10px;flex-wrap:wrap}.stat{padding:10px 13px;border:1px solid var(--line);border-radius:18px;background:#fff;box-shadow:var(--shadow-soft)}.stat strong{font-size:20px}.stat span{display:block;font-size:11px;color:var(--muted);font-weight:850;text-transform:uppercase;letter-spacing:.07em}.tools-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.tool-card{position:relative;display:grid;grid-template-columns:72px 1fr auto;align-items:center;gap:15px;min-height:140px;padding:18px;overflow:hidden;text-decoration:none;color:var(--text);background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(255,255,255,.94)),radial-gradient(circle at 0 0,rgba(0,141,204,.08),transparent 45%);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow-soft);transition:.18s ease}.tool-card:before{content:"";position:absolute;inset:0 auto 0 0;width:6px;background:linear-gradient(180deg,var(--sanlam-blue-2),var(--sanlam-deep))}.tool-card:after{content:"";position:absolute;width:120px;height:120px;right:-45px;top:-50px;border-radius:50%;background:rgba(0,141,204,.07)}.tool-card:hover{transform:translateY(-2px);border-color:rgba(0,121,184,.32);box-shadow:0 16px 30px rgba(0,83,125,.14)}.tool-card.disabled{opacity:.68;filter:grayscale(.15)}.tool-icon{z-index:1;width:72px;height:72px;display:grid;place-items:center;border-radius:22px;color:var(--sanlam-deep);background:linear-gradient(145deg,#fff,#eaf7fd);border:1px solid rgba(0,121,184,.18);box-shadow:inset 0 -12px 18px rgba(0,121,184,.055),0 8px 16px rgba(0,70,105,.06);font-size:22px;font-weight:900}.tool-info{z-index:1;min-width:0}.tool-info h3{margin:0;font-size:18px;line-height:1.18;font-weight:900;letter-spacing:-.018em}.tool-info p{margin:8px 0 0;color:var(--muted);font-size:13px;line-height:1.45}.meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px}.pill{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:6px 9px;font-size:10.5px;font-weight:900;text-transform:uppercase;letter-spacing:.06em}.pill-active{background:#e9f8f0;color:var(--success);border:1px solid rgba(20,122,63,.18)}.pill-dev{background:#fff8e6;color:var(--warning);border:1px solid rgba(154,103,0,.18)}.pill-lock{background:#f2f4f6;color:var(--muted);border:1px solid rgba(90,110,125,.18)}.arrow{z-index:1;width:38px;height:38px;display:grid;place-items:center;border-radius:50%;color:#fff;background:linear-gradient(135deg,var(--sanlam-blue),var(--sanlam-blue-2));box-shadow:0 10px 18px rgba(0,121,184,.26);font-size:24px;font-weight:800}.admin-shortcuts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:-4px 0 22px}.shortcut-card{display:block;text-decoration:none;background:#fff;border:1px solid var(--line);border-radius:22px;box-shadow:var(--shadow-soft);padding:18px}.shortcut-card strong{display:block;font-size:17px;color:var(--sanlam-dark);margin-bottom:6px}.shortcut-card span{display:block;color:var(--muted);font-size:13px;line-height:1.45}.shortcut-card:hover{transform:translateY(-1px);border-color:rgba(0,121,184,.32)}.panel{background:#fff;border:1px solid var(--line);border-radius:26px;box-shadow:var(--shadow-soft);padding:22px}.admin-tabs{display:flex;gap:10px;margin-bottom:18px;flex-wrap:wrap}.admin-tabs a{padding:10px 14px;border-radius:999px;text-decoration:none;border:1px solid var(--line);background:#fff;color:var(--sanlam-dark);font-weight:850}.admin-tabs a.active{background:linear-gradient(135deg,var(--sanlam-blue),var(--sanlam-blue-2));color:#fff}.panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:12px}.panel-head h2,.create-user-panel h2,.danger-panel h2{margin-top:0}.panel-head p{margin:6px 0 0;color:var(--muted);font-size:13px}.panel-head-tools{align-items:end}.admin-search{display:grid;gap:7px;width:min(320px,100%)}.table-wrap{width:100%;overflow:auto}.table{width:100%;border-collapse:separate;border-spacing:0 10px}.table th{text-align:left;font-size:11px;text-transform:uppercase;letter-spacing:.07em;color:var(--muted);padding:0 12px;white-space:nowrap}.table td{background:#fff;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:13px 12px;vertical-align:middle}.table td:first-child{border-left:1px solid var(--line);border-radius:16px 0 0 16px}.table td:last-child{border-right:1px solid var(--line);border-radius:0 16px 16px 0}.admin-panel-wide{margin-bottom:18px}.admin-users-table{min-width:1060px}.admin-users-table td{font-size:13px}.admin-users-table .pill{margin:2px}.actions-cell{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.inline-form{display:inline-flex;margin:0}.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:18px}.admin-form h2,.admin-form h3{margin:22px 0 12px}.admin-form h2:first-child{margin-top:0}.permissions{display:grid;gap:10px}.perm-row{display:grid;grid-template-columns:auto 1fr 132px;align-items:center;gap:12px;padding:12px;border:1px solid var(--line);border-radius:18px;background:#fff}.perm-row input[type=checkbox]{width:20px;min-height:20px}.perm-row input[disabled]+span{opacity:.58}.perm-row input[disabled]~select{opacity:.58;pointer-events:none}.readonly-box{min-height:46px;border:1px solid rgba(0,121,184,.22);border-radius:16px;background:#f7fbfd;padding:11px 13px;line-height:1.65;color:var(--muted);font-size:13px}.form-actions{margin:18px 0 0;display:flex;gap:10px;flex-wrap:wrap}.create-user-panel{margin-top:18px}.danger-panel{margin-top:18px;border-color:rgba(180,35,24,.22);background:#fff8f7}.danger-panel p{color:var(--muted)}.tool-preview{min-height:100vh;padding:32px;background:linear-gradient(180deg,#eaf3f8,#f7fafc)}.placeholder{max-width:860px;margin:0 auto;background:#fff;border:1px solid var(--line);border-radius:30px;box-shadow:var(--shadow);padding:28px}.placeholder .brand-mini{margin-bottom:18px}.code-note{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:13px;background:#f4f8fa;border:1px solid var(--line);border-radius:16px;padding:14px;overflow:auto}.footer-note{margin-top:20px;color:var(--muted);font-size:12.5px;line-height:1.5}
@media(max-width:1180px){.tools-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){.login-page{grid-template-columns:1fr}.login-hero{padding:32px}.login-side{padding:28px}.tools-grid{grid-template-columns:1fr}.topbar{position:static;align-items:flex-start;flex-direction:column}.top-actions{flex-wrap:wrap}.wrapper{width:min(100% - 28px,1180px)}.page-title{align-items:flex-start;flex-direction:column}.grid-2{grid-template-columns:1fr}.admin-shortcuts{grid-template-columns:1fr}.panel-head{display:grid}.actions-cell{display:grid}.brand-large h1{font-size:30px}.perm-row{grid-template-columns:auto 1fr}.perm-row select{grid-column:2}}

/* Dashboard MyCorpo — harmonisation graphique des accès outils */
.dashboard-wrapper{padding-top:18px}.portal-hero{position:relative;display:grid;grid-template-columns:1fr minmax(280px,360px);gap:22px;align-items:stretch;margin:4px 0 26px;padding:30px;border:1px solid rgba(0,121,184,.16);border-radius:34px;background:radial-gradient(circle at 92% 18%,rgba(0,141,204,.12),transparent 30%),linear-gradient(135deg,rgba(255,255,255,.98),rgba(247,251,253,.94));box-shadow:var(--shadow-soft);overflow:hidden}.portal-hero:before{content:"";position:absolute;inset:0 auto 0 0;width:7px;background:linear-gradient(180deg,var(--sanlam-blue-2),var(--sanlam-deep))}.portal-hero-copy{position:relative;z-index:1}.eyebrow{display:inline-flex;align-items:center;gap:8px;margin-bottom:12px;padding:7px 11px;border-radius:999px;background:#eef8fd;border:1px solid rgba(0,121,184,.16);color:var(--sanlam-dark);font-size:11px;font-weight:950;text-transform:uppercase;letter-spacing:.08em}.portal-hero h1{margin:0;color:#0b3150;font-size:42px;line-height:1.02;letter-spacing:-.055em}.portal-hero p{max-width:780px;margin:12px 0 0;color:var(--muted);font-size:15px;line-height:1.65}.portal-help-card{position:relative;z-index:1;display:flex;align-items:center;gap:14px;align-self:center;min-height:104px;padding:18px;border:1px solid rgba(0,121,184,.16);border-left:4px solid #f2a900;border-radius:24px;background:#fff;box-shadow:0 12px 24px rgba(0,70,105,.08)}.portal-help-icon{flex:0 0 48px;width:48px;height:48px;display:grid;place-items:center;border-radius:16px;background:linear-gradient(145deg,#eff9ff,#fff);color:var(--sanlam-dark);border:1px solid rgba(0,121,184,.15);font-size:22px;font-weight:950}.portal-help-card strong{display:block;color:#0b3150;font-size:15px}.portal-help-card small{display:block;margin-top:4px;color:var(--muted);line-height:1.45;font-weight:700}.dashboard-section{margin-top:24px}.dashboard-section-first{margin-top:6px}.dashboard-section-title{display:flex;align-items:center;gap:13px;margin:0 0 14px}.dashboard-section-title h2{margin:0;color:#0b3150;font-size:22px;line-height:1.15;letter-spacing:-.035em}.dashboard-section-title p{margin:4px 0 0;color:var(--muted);font-size:13px}.section-icon{width:34px;height:34px;display:grid;place-items:center;border-radius:50%;color:var(--sanlam-dark);background:#fff;border:1px solid rgba(0,121,184,.22);box-shadow:var(--shadow-soft);font-weight:950}.section-icon-dev{color:#9a6700;background:#fffaf0;border-color:rgba(154,103,0,.22)}.tools-grid-active,.tools-grid-dev{gap:20px}.tool-card{grid-template-columns:112px 1fr;min-height:176px;gap:20px;padding:20px 22px}.tool-card:after{width:160px;height:160px;right:-62px;top:-74px;background:rgba(0,141,204,.075)}.tool-card-active:hover .tool-icon{transform:translateY(-2px) scale(1.018)}.tool-card-dev{background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(250,252,253,.94));border-style:dashed}.tool-card-dev:before{background:linear-gradient(180deg,#f2a900,#d39b00)}.tool-card-dev:hover{transform:none;border-color:rgba(154,103,0,.24);box-shadow:var(--shadow-soft)}.tool-card .tool-icon{width:112px;height:112px;border-radius:30px;background:linear-gradient(150deg,#fff 0%,#f1f9fd 58%,#e7f4fa 100%);transition:.18s ease}.tool-info h3{font-size:20px;color:#0b3150}.tool-info p{font-size:13.5px;max-width:430px}.tool-cta{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:38px;padding:8px 14px;border-radius:13px;color:#fff;background:linear-gradient(135deg,var(--sanlam-dark),var(--sanlam-blue));box-shadow:0 10px 18px rgba(0,96,142,.20);font-size:12.5px;font-weight:950;letter-spacing:.01em}.tool-cta.is-disabled,.tool-cta.is-locked{color:#7b8790;background:#eef2f5;box-shadow:none;border:1px solid rgba(90,110,125,.15)}.tool-card.disabled{opacity:.78;filter:grayscale(.25)}.mc-icon-svg{width:100%;height:100%;display:block}.mc-icon-svg .halo{fill:#eaf6fc}.mc-icon-svg .shape{fill:#0b5f8f}.mc-icon-svg .soft{fill:none;stroke:#cfdbe2;stroke-width:8;stroke-linecap:round}.mc-icon-svg .line{fill:none;stroke:#0b3150;stroke-width:4.2;stroke-linecap:round;stroke-linejoin:round}.mc-icon-svg .accent-line{fill:none;stroke:#00a3c7;stroke-width:5;stroke-linecap:round;stroke-linejoin:round}.mc-icon-svg .accent{fill:#f2a900;stroke:#0b3150;stroke-width:2.5;stroke-linejoin:round}.mc-icon-svg .outline{fill:none;stroke:#0082b8;stroke-width:5;stroke-linejoin:round}.mc-icon-svg .shield{fill:#0079b8;stroke:#f2a900;stroke-width:3.5;stroke-linejoin:round}.mc-icon-svg .check{fill:none;stroke:#fff;stroke-width:5;stroke-linecap:round;stroke-linejoin:round}.mc-icon-svg .window{fill:#ffffff;stroke:#0b3150;stroke-width:2.2;stroke-linejoin:round}.mc-icon-svg .umbrella{fill:#0079b8;stroke:#0b3150;stroke-width:3;stroke-linejoin:round}.mc-icon-svg .paper{fill:#fff;stroke:#0b3150;stroke-width:3.5;stroke-linejoin:round}.mc-icon-svg .box{fill:#d79b45;stroke:#0b3150;stroke-width:3;stroke-linejoin:round}.mc-icon-svg .whistle{fill:#7aa9bf;stroke:#0b3150;stroke-width:3.5;stroke-linejoin:round}
@media(max-width:1180px){.portal-hero{grid-template-columns:1fr}.tools-grid-active,.tools-grid-dev{grid-template-columns:repeat(2,minmax(0,1fr))}.tool-card{grid-template-columns:104px 1fr}.tool-card .tool-icon{width:104px;height:104px}}
@media(max-width:720px){.portal-hero{padding:24px;border-radius:26px}.portal-hero h1{font-size:34px}.tool-card{grid-template-columns:92px 1fr;min-height:154px;padding:17px;gap:15px}.tool-card .tool-icon{width:92px;height:92px;border-radius:24px}.tool-info h3{font-size:18px}.tool-info p{font-size:12.8px}.tool-cta{width:100%}.meta{align-items:stretch;display:grid}.tools-grid-active,.tools-grid-dev{grid-template-columns:1fr}}
@media(max-width:520px){.tool-card{grid-template-columns:1fr;text-align:center}.tool-card .tool-icon{margin:0 auto}.tool-info p{margin-left:auto;margin-right:auto}.dashboard-section-title{align-items:flex-start}.portal-help-card{display:none}}

/* Phase 2 — Administration portail */
.admin-toolbar{display:flex;align-items:end;gap:12px;flex-wrap:wrap;justify-content:flex-end}.admin-toolbar .admin-search{width:min(330px,100%)}.compact-field{margin:0 0 8px}.compact-field:last-child{margin-bottom:0}.admin-tools-table{min-width:980px}.admin-tools-table td{vertical-align:top}.admin-tools-table input,.admin-tools-table select{min-height:42px}.audit-filters{display:grid;grid-template-columns:1.2fr 1fr 1fr auto;gap:12px;align-items:end;margin:0 0 16px;padding:14px;border:1px solid var(--line);border-radius:20px;background:#f8fbfd}.audit-filters .form-row{margin:0}.audit-filter-actions{margin:0;display:flex;gap:8px}.pill-maintenance{background:#fff3e6;color:#a15c00;border:1px solid rgba(161,92,0,.2)}.pill-lock{background:#f2f4f6;color:#5a6e7d;border:1px solid rgba(90,110,125,.18)}.admin-users-table{min-width:1180px}.permissions-compact .perm-row{min-height:74px}@media(max-width:980px){.audit-filters{grid-template-columns:1fr}.audit-filter-actions{justify-content:flex-start}.admin-toolbar{justify-content:flex-start}}

/* Correctif visuel — compactage login + dashboard portail sans modifier le header */
@media (min-width: 901px) {
  body:has(.login-page-v2) {
    overflow: hidden;
  }

  .login-page-v2 {
    min-height: 0;
    height: 100vh;
    grid-template-columns: 0.92fr 1.08fr;
    overflow: hidden;
  }

  .login-page-v2 .login-hero {
    padding: 34px 42px;
  }

  .login-page-v2 .brand-large {
    max-width: 560px;
  }

  .login-page-v2 .brand-large .logo-wrap {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    margin-bottom: 18px;
  }

  .login-page-v2 .brand-large .logo-wrap img {
    width: 52px;
    height: 52px;
  }

  .login-page-v2 .login-eyebrow {
    font-size: 13px;
    margin-bottom: 7px;
  }

  .login-page-v2 .brand-large h1 {
    font-size: clamp(34px, 3.2vw, 46px);
    line-height: 1;
  }

  .login-page-v2 .brand-large p {
    margin-top: 10px;
    font-size: 15px;
    line-height: 1.45;
  }

  .login-page-v2 .login-badges {
    gap: 8px;
    margin-top: 18px;
  }

  .login-page-v2 .login-side {
    padding: 24px 34px;
  }

  .login-page-v2 .login-box {
    max-width: 390px;
    border-radius: 26px;
    padding: 22px 24px;
  }

  .login-page-v2 .login-box-logo {
    width: 122px;
    height: 122px;
    margin: 0 auto 14px;
  }

  .login-page-v2 .login-box-logo img {
    width: 112px;
    height: 112px;
  }

  .login-page-v2 .login-box h2 {
    font-size: 23px;
  }

  .login-page-v2 .login-box p {
    margin: 7px 0 14px;
    font-size: 14px;
    line-height: 1.4;
  }

  .login-page-v2 .form-row {
    gap: 6px;
    margin-bottom: 11px;
  }

  .login-page-v2 input {
    min-height: 42px;
    border-radius: 14px;
    padding: 8px 12px;
  }

  .login-page-v2 .btn {
    min-height: 42px;
  }

  .login-page-v2 .login-footnote {
    display: block;
    margin-top: 12px;
  }
}

/* Dashboard compact : garde le header intact et réduit uniquement le contenu */
.dashboard-wrapper {
  width: min(1480px, calc(100% - 40px));
  padding-top: 12px;
  padding-bottom: 14px;
}

.dashboard-section {
  margin-top: 14px;
}

.dashboard-section-first {
  margin-top: 4px;
}

.dashboard-section-title {
  gap: 10px;
  margin-bottom: 10px;
}

.dashboard-section-title h2 {
  font-size: 20px;
}

.dashboard-section-title p {
  font-size: 12.5px;
  margin-top: 2px;
}

.section-icon {
  width: 30px;
  height: 30px;
  font-size: 15px;
}

.tools-grid-active,
.tools-grid-dev {
  gap: 12px 18px;
}

.tool-card {
  grid-template-columns: 86px 1fr;
  min-height: 122px;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 24px;
}

.tool-card .tool-icon {
  width: 86px;
  height: 86px;
  border-radius: 23px;
}

.tool-card:after {
  width: 126px;
  height: 126px;
  right: -48px;
  top: -62px;
}

.tool-info h3 {
  font-size: 18px;
  line-height: 1.08;
}

.tool-info p {
  margin-top: 7px;
  font-size: 12.5px;
  line-height: 1.38;
}

.meta {
  margin-top: 10px;
  gap: 7px;
}

.pill {
  padding: 5px 8px;
  font-size: 10px;
}

.tool-cta {
  min-height: 34px;
  padding: 7px 13px;
  border-radius: 12px;
  font-size: 12px;
}

@media (min-width: 1181px) {
  .tools-grid-active,
  .tools-grid-dev {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-height: 820px) and (min-width: 1181px) {
  .dashboard-wrapper {
    padding-top: 8px;
    padding-bottom: 10px;
  }

  .dashboard-section-title {
    margin-bottom: 8px;
  }

  .dashboard-section {
    margin-top: 10px;
  }

  .tool-card {
    min-height: 112px;
    padding: 12px 16px;
  }

  .tool-card .tool-icon {
    width: 78px;
    height: 78px;
    border-radius: 21px;
  }

  .tool-info h3 {
    font-size: 17px;
  }

  .tool-info p {
    font-size: 12px;
    line-height: 1.32;
  }

  .meta {
    margin-top: 8px;
  }
}

@media (max-width: 1180px) {
  .dashboard-wrapper {
    width: min(100% - 28px, 1180px);
  }

  .tool-card {
    grid-template-columns: 82px 1fr;
  }

  .tool-card .tool-icon {
    width: 82px;
    height: 82px;
  }
}

/* =========================================================
   Correctif pré-hébergement — Dashboard ultra compact
   Objectif : éviter le scroll vertical sur écrans desktop standards
   ========================================================= */
@media (min-width: 1100px) {
  body:has(.dashboard-wrapper) {
    overflow-y: auto;
  }

  .topbar {
    padding: 8px 24px;
    min-height: 72px;
  }

  .brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .brand-logo img {
    width: 32px;
    height: 32px;
  }

  .brand-mini {
    gap: 10px;
  }

  .brand-mini strong {
    font-size: 16px;
    line-height: 1;
  }

  .brand-mini small {
    font-size: 10.5px;
    line-height: 1.15;
  }

  .top-actions {
    gap: 7px;
  }

  .nav-link,
  .logout,
  .user-chip {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 12px;
  }

  .user-chip b {
    font-size: 12px;
  }

  .user-chip em {
    font-size: 9px;
    padding: 3px 6px;
  }

  .dashboard-wrapper {
    width: min(1510px, calc(100% - 28px));
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .dashboard-section {
    margin-top: 8px;
  }

  .dashboard-section-first {
    margin-top: 2px;
  }

  .dashboard-section-title {
    gap: 8px;
    margin-bottom: 7px;
  }

  .dashboard-section-title h2 {
    font-size: 18px;
    line-height: 1.05;
  }

  .dashboard-section-title p {
    font-size: 11.5px;
    line-height: 1.2;
    margin-top: 1px;
  }

  .section-icon {
    width: 27px;
    height: 27px;
    font-size: 14px;
  }

  .tools-grid-active,
  .tools-grid-dev {
    gap: 9px 14px;
  }

  .tool-card {
    grid-template-columns: 72px 1fr;
    min-height: 98px;
    gap: 11px;
    padding: 10px 14px;
    border-radius: 21px;
  }

  .tool-card .tool-icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
  }

  .tool-card:after {
    width: 106px;
    height: 106px;
    right: -42px;
    top: -52px;
  }

  .tool-info h3 {
    font-size: 16px;
    line-height: 1.02;
    margin-bottom: 0;
  }

  .tool-info p {
    margin-top: 5px;
    font-size: 11.4px;
    line-height: 1.25;
    max-width: 410px;
  }

  .meta {
    margin-top: 7px;
    gap: 6px;
  }

  .pill {
    padding: 4px 7px;
    font-size: 9px;
    line-height: 1;
  }

  .tool-cta {
    min-height: 30px;
    padding: 6px 11px;
    border-radius: 11px;
    font-size: 11px;
  }
}

/* Variante encore plus compacte pour hauteur inférieure ou égale à 820px */
@media (min-width: 1100px) and (max-height: 820px) {
  .topbar {
    padding-top: 6px;
    padding-bottom: 6px;
    min-height: 64px;
  }

  .brand-logo {
    width: 40px;
    height: 40px;
  }

  .brand-logo img {
    width: 29px;
    height: 29px;
  }

  .brand-mini strong {
    font-size: 15px;
  }

  .brand-mini small {
    font-size: 10px;
  }

  .dashboard-wrapper {
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .dashboard-section-title {
    margin-bottom: 5px;
  }

  .dashboard-section-title h2 {
    font-size: 17px;
  }

  .dashboard-section-title p {
    font-size: 11px;
  }

  .tools-grid-active,
  .tools-grid-dev {
    gap: 7px 12px;
  }

  .tool-card {
    grid-template-columns: 64px 1fr;
    min-height: 86px;
    padding: 8px 12px;
    gap: 9px;
  }

  .tool-card .tool-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
  }

  .tool-info h3 {
    font-size: 15px;
  }

  .tool-info p {
    font-size: 10.8px;
    line-height: 1.18;
    margin-top: 4px;
  }

  .meta {
    margin-top: 5px;
  }

  .tool-cta {
    min-height: 28px;
    padding: 5px 10px;
    font-size: 10.5px;
  }
}

/* Correctif dashboard — cartes plus ergonomiques sans descriptions outils */
.dashboard-wrapper {
  width: min(1500px, calc(100% - 44px));
  padding-top: 14px;
  padding-bottom: 18px;
}

.dashboard-section {
  margin-top: 18px;
}

.dashboard-section-first {
  margin-top: 6px;
}

.dashboard-section-title {
  margin-bottom: 12px;
}

.dashboard-section-title h2 {
  font-size: 22px;
  line-height: 1.1;
}

.dashboard-section-title p {
  font-size: 13px;
}

.dashboard-wrapper .tools-grid-active,
.dashboard-wrapper .tools-grid-dev {
  gap: 18px 22px;
}

.dashboard-wrapper .tool-card {
  grid-template-columns: 104px 1fr;
  min-height: 142px;
  gap: 20px;
  padding: 18px 22px;
  border-radius: 26px;
}

.dashboard-wrapper .tool-card .tool-icon {
  width: 104px;
  height: 104px;
  border-radius: 28px;
}

.dashboard-wrapper .tool-card:after {
  width: 154px;
  height: 154px;
  right: -58px;
  top: -70px;
}

.dashboard-wrapper .tool-info h3 {
  margin: 0;
  font-size: 20.5px;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.dashboard-wrapper .tool-info p {
  display: none !important;
}

.dashboard-wrapper .meta {
  margin-top: 16px;
  gap: 10px;
}

.dashboard-wrapper .pill {
  padding: 6px 10px;
  font-size: 10.8px;
}

.dashboard-wrapper .tool-cta {
  min-height: 38px;
  padding: 8px 16px;
  border-radius: 14px;
  font-size: 12.8px;
}

@media (min-width: 1181px) {
  .dashboard-wrapper .tools-grid-active,
  .dashboard-wrapper .tools-grid-dev {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) and (max-height: 820px) {
  .dashboard-wrapper {
    width: min(1500px, calc(100% - 36px));
    padding-top: 8px;
    padding-bottom: 10px;
  }

  .dashboard-section {
    margin-top: 12px;
  }

  .dashboard-section-title {
    margin-bottom: 8px;
  }

  .dashboard-section-title h2 {
    font-size: 19px;
  }

  .dashboard-section-title p {
    font-size: 12px;
  }

  .dashboard-wrapper .tools-grid-active,
  .dashboard-wrapper .tools-grid-dev {
    gap: 10px 16px;
  }

  .dashboard-wrapper .tool-card {
    grid-template-columns: 86px 1fr;
    min-height: 112px;
    padding: 12px 16px;
    gap: 14px;
  }

  .dashboard-wrapper .tool-card .tool-icon {
    width: 86px;
    height: 86px;
    border-radius: 23px;
  }

  .dashboard-wrapper .tool-info h3 {
    font-size: 17.2px;
    line-height: 1.08;
  }

  .dashboard-wrapper .meta {
    margin-top: 10px;
  }

  .dashboard-wrapper .pill {
    padding: 5px 8px;
    font-size: 9.8px;
  }

  .dashboard-wrapper .tool-cta {
    min-height: 32px;
    padding: 6px 12px;
    font-size: 11.4px;
  }
}
