/* ===========================
   SaaS Modern Layer (append)
   =========================== */

:root{
  --bg-app: #f6f7fb;
  --surface: #ffffff;
  --text-strong: #111827;
  --text-muted: #6b7280;
  --border-soft: rgba(17,24,39,.10);

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;

  --shadow-xs: 0 1px 2px rgba(0,0,0,.06);
  --shadow-sm: 0 8px 24px rgba(17,24,39,.08);
  --shadow-md: 0 14px 40px rgba(17,24,39,.12);

  --ring: 0 0 0 .25rem rgba(var(--primary-color-rgb), .18);
}

/* Base */
html, body { height: 100%; }
body{
  background: var(--bg-app);
  color: var(--text-strong);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

a { text-decoration: none; }
a:hover { text-decoration: none; }

/* Layout helpers */
.page-wrap{ padding: 24px 0; }
.section-title{
  font-weight: 650;
  letter-spacing: -0.02em;
}

/* Cards */
.card{
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card .card-header{
  background: transparent;
  border-bottom: 1px solid var(--border-soft);
}
.card-hover{
  transition: transform .15s ease, box-shadow .15s ease;
}
.card-hover:hover{
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Inputs */
.form-control, .form-select, textarea{
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  background: #fff;
}
.form-control:focus, .form-select:focus, textarea:focus{
  border-color: rgba(var(--primary-color-rgb), .35);
  box-shadow: var(--ring);
}

/* Buttons */
.btn{
  border-radius: var(--radius-md);
  font-weight: 600;
  padding: .55rem .9rem;
}
.btn-primary{
  background: var(--primary-color);
  border-color: transparent;
  box-shadow: 0 10px 22px rgba(var(--primary-color-rgb), .18);
}
.btn-primary:hover{
  filter: brightness(0.98);
}
.btn-outline-secondary{
  border-color: var(--border-soft);
}

/* Badges / pills */
.badge, .rounded-pill{
  font-weight: 600;
}

/* Tables */
.table{
  color: var(--text-strong);
}
.table thead th{
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-soft) !important;
  background: rgba(17,24,39,.02);
}
.table tbody td{
  border-top: 1px solid var(--border-soft);
}

/* Tiny “key/value” blocks (pour fiches) */
.kv-label{
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.kv-value{
  font-size: 1rem;
  font-weight: 650;
  color: var(--text-strong);
}

/* Optional: separators without ugly <hr> */
.soft-divider{
  height: 1px;
  background: var(--border-soft);
  margin: 16px 0;
}

/* ===== SaaS client details ===== */

.saas-page{ padding:20px; }
.saas-header{ display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:16px; }
.saas-title{ display:flex; align-items:center; gap:12px; }
.saas-avatar{
  width:44px; height:44px; border-radius:14px;
  display:flex; align-items:center; justify-content:center;
  font-weight:700;
  background:rgba(var(--primary-color-rgb),.10);
  color:var(--primary-color);
}
.saas-h1{ margin:0; font-size:20px; font-weight:700; letter-spacing:-0.02em; }
.saas-sub{ margin-top:4px; color:rgba(0,0,0,.55); font-size:12px; }
.saas-actions{ display:flex; gap:8px; flex-wrap:wrap; }

.saas-grid{ display:grid; grid-template-columns: 1fr 1fr; gap:12px; }
@media (max-width: 980px){ .saas-grid{ grid-template-columns: 1fr; } }

.saas-card{
  background:#fff;
  border:1px solid rgba(0,0,0,.10);
  border-radius:16px;
  box-shadow:0 10px 30px rgba(0,0,0,.06);
}
.saas-card-h{
  padding:14px 16px;
  border-bottom:1px solid rgba(0,0,0,.08);
  display:flex; justify-content:space-between; align-items:center;
}
.saas-card-b{ padding:16px; }

.kv{ display:grid; grid-template-columns: 1fr 1fr; gap:12px; }
@media (max-width: 640px){ .kv{ grid-template-columns: 1fr; } }
.kv-item .k{ font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:rgba(0,0,0,.55); }
.kv-item .v{ margin-top:4px; font-weight:650; color:#111; }

.pill{
  display:inline-flex; align-items:center; gap:6px;
  padding:6px 10px; border-radius:999px;
  border:1px solid rgba(0,0,0,.10);
  font-size:12px; background:rgba(0,0,0,.02);
}
.dot{ width:8px; height:8px; border-radius:99px; display:inline-block; background:#999; }
.dot.on{ background:#22c55e; }
.dot.off{ background:#94a3b8; }

.muted{ color:rgba(0,0,0,.55); font-weight:500; }
.note{ white-space:pre-wrap; color:#111; line-height:1.45; }

.table-wrap{ overflow:auto; }
.saas-table{ width:100%; border-collapse:separate; border-spacing:0; }
.saas-table th{
  text-align:left; font-size:11px; letter-spacing:.08em; text-transform:uppercase;
  color:rgba(0,0,0,.55);
  padding:10px 12px;
  background:rgba(0,0,0,.02);
  border-bottom:1px solid rgba(0,0,0,.08);
}
.saas-table td{ padding:12px; border-bottom:1px solid rgba(0,0,0,.06); vertical-align:middle; }

.badge{
  display:inline-flex; align-items:center;
  padding:4px 8px; border-radius:999px;
  font-size:12px;
  border:1px solid rgba(0,0,0,.10);
  background:#fff;
}
.badge.primary{
  border-color: rgba(var(--primary-color-rgb), .35);
  background: rgba(var(--primary-color-rgb), .10);
  color: var(--primary-color);
  font-weight:650;
}


/* ===== Page Header System ===== */

.page-header {
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:20px;
    margin-bottom:28px;
}

.page-header-left {
    display:flex;
    align-items:center;
    gap:14px;
}

.page-avatar {
    width:48px;
    height:48px;
    border-radius:16px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:700;
    font-size:18px;
    background:rgba(var(--primary-color-rgb),.10);
    color:var(--primary-color);
}

.page-title {
    margin:0;
    font-size:24px;
    font-weight:700;
    letter-spacing:-0.02em;
}

.page-subtitle {
    margin-top:6px;
    font-size:12px;
    color:rgba(0,0,0,.6);
}

.page-actions {
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}


/* ===========================
   Home page – modernized
													 
   =========================== */

.home-page{
  padding: 18px 22px 28px 22px !important;
}

/* Small hero header */
.home-page .home-hero{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin: 6px 6px 22px 6px;
}
.home-page .home-hero-kicker{
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--text-strong);
}
.home-page .home-hero-sub{
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
  max-width: 56ch;
}
.home-page .home-hero-right{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.home-page .stat-pill{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-xs);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.home-page .stat-pill:hover{
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  border-color: rgba(var(--primary-color-rgb), .25);
}
.home-page .stat-label{
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 650;
}
.home-page .stat-value{
  font-size: 14px;
  font-weight: 800;
  color: var(--text-strong);
}

/* Grid sizing: reduce the “floating” feeling */
.home-page .grid{
  padding: 0 6px 60px 6px !important;
  max-width: 1320px;
}

/* Card modernization (keep Isotope absolute positioning intact) */
.home-page .homepagebox{
			   
  height: auto !important;
  min-height: 168px;
  width: 320px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 16px 16px 14px 16px;
  overflow: hidden;
  position: relative;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

/* Accent bar */
.home-page .homepagebox:before{
  content:"";
  position:absolute;
  left:0; top:0; bottom:0;
  width: 4px;
  background: rgba(var(--primary-color-rgb), .85);
  opacity: .65;
}

/* Hover */
.home-page .homepagebox:hover{
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(var(--primary-color-rgb), .25);
}

/* Internal layout (override legacy floats) */
.home-page .homepagebox .row{
  margin: 0 !important;
  display:flex;
  align-items:center;
  gap: 12px;
					  
 

							 
								
			  
}

.home-page .homepageboximage{
  float: none !important;
  margin: 0 !important;
  height: 44px !important;
  width: 44px;
			   
  border-radius: 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(var(--primary-color-rgb), .10);
}

.home-page .homepageboximage img{
  height: 22px !important;
  width: 22px !important;
				  
  max-height:none !important;
  max-width:none !important;
}

.home-page .homepageoptiontitle{
  float: none !important;
  margin: 0 !important;
  height: auto !important;
  line-height: 1.15 !important;
				   
  font-size: 16px !important;
  font-weight: 800 !important;
  text-align: left !important;
  color: var(--text-strong);
}

.home-page .homepageoptiondescription{
  margin: 10px 0 0 0 !important;
  font-size: 12px !important;
				   
  color: var(--text-muted);
  line-height: 1.45;
}

/* Circles (counters) */
.home-page .circle{
  box-shadow: var(--shadow-xs);
			  
			   
					  
									   
			   
					 
						 
  border: 1px solid rgba(0,0,0,.06);
}

/* ===== Zone Theming ===== */
body.zone-clients   { --zone-color:#1565c0; --zone-rgb:21,101,192; }
body.zone-campagnes { --zone-color:#00695c; --zone-rgb:0,105,92;   }
body.zone-staff     { --zone-color:#5c35b5; --zone-rgb:92,53,181;  }
body.zone-params      { --zone-color:#475569; --zone-rgb:71,85,105;  }
body.zone-teleconsult { --zone-color:#c2185b; --zone-rgb:194,24,91; }

.tc-range-item {
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 16px; margin-top:10px;
  background: rgba(var(--zone-rgb, 194,24,91), .06);
  border-left: 4px solid var(--zone-color, #c2185b);
  border-radius: 4px;
}
.tc-range-time {
  font-size:1.2em; font-weight:700;
  color: var(--zone-color, #c2185b);
  letter-spacing:0.02em;
}

body[class*="zone-"] .saas-avatar {
  background: var(--zone-color) !important;
  color: #fff !important;
}
body[class*="zone-"] .saas-card {
  border-top: 3px solid rgba(var(--zone-rgb), .55) !important;
}
body[class*="zone-"] .saas-header {
  background: rgba(var(--zone-rgb), .05);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
  border-bottom: 2px solid rgba(var(--zone-rgb), .12);
}
body[class*="zone-"] .ep-section-icon {
  background: var(--zone-color) !important;
  color: #fff !important;
}
body[class*="zone-"] .layout-section-content a.active,
body[class*="zone-"] .layout-subsection-links a.active {
  color: var(--zone-color) !important;
  background: rgba(var(--zone-rgb), .10) !important;
  box-shadow: inset 0 0 0 1px rgba(var(--zone-rgb), .35), 0 4px 10px rgba(0,0,0,.06) !important;
}

/* Sidebar refresh (more “2026”, less “2015”) */
.sidebar{
  box-shadow: 0 10px 30px rgba(17,24,39,.08) !important;
  border-right: 1px solid var(--border-soft);
  border-top-right-radius: 16px !important;
}
.sidebar li a{
  border-radius: 12px !important;
}
.sidebar li a:hover{
  background: rgba(var(--primary-color-rgb), .10) !important;
}
.sidebar li a:hover .icon,
.sidebar li a:hover .text{
  color: var(--primary-color) !important;
}
