:root{
    --primary:#4F39F6;
    --primary-hover:#3526B8;
    --indigo:#4F39F6;
    --indigo2:#7565F7;

    --ink:#1F1F26;
    --slate-700:#45454F;
    --slate-500:#73737F;
    --slate-400:#9A9AA5;
    --slate-200:#E5E5EA;
    --slate-100:#F5F5F7;
    --slate-50:#FAFAFB;

    /* Couleurs sémantiques conservées */
    --emerald:#10b981;
    --emerald-dark:#059669;
    --amber:#f59e0b;
    --rose:#f43f5e;
    --violet:#8b5cf6;
  }

  *{box-sizing:border-box;}

  body{
    margin:0;
    min-height:100vh;
    display:flex;
    flex-direction:column;
    font-family:'Inter',system-ui,-apple-system,sans-serif;
    background:var(--slate-50);
    color:var(--ink);
    -webkit-font-smoothing:antialiased;
  }

  /* =========================================================
     HEADER GLOBAL FLUIDOPS
     ========================================================= */

  .site-header{
    position:sticky;
    top:0;
    z-index:50;
    background:rgba(255,255,255,.92);
    border-bottom:1px solid var(--slate-200);
    backdrop-filter:blur(10px);
  }

  .site-header-inner{
    max-width:1080px;
    margin:0 auto;
    min-height:64px;
    padding:0 20px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
  }

  .site-brand{
    display:inline-flex;
    align-items:center;
    gap:9px;
    color:var(--ink);
    text-decoration:none;
    font-size:15px;
    font-weight:800;
    letter-spacing:-.02em;
  }

  .site-brand-mark{
    width:30px;
    height:30px;
    border-radius:9px;
    display:grid;
    place-items:center;
    background:var(--primary);
    color:#fff;
    font-size:13px;
    font-weight:800;
  }

  .site-nav{
    display:flex;
    align-items:center;
    gap:24px;
    margin-left:auto;
  }

  .site-nav a{
    color:var(--slate-500);
    text-decoration:none;
    font-size:12.5px;
    font-weight:600;
    transition:.15s;
  }

  .site-nav a:hover{
    color:var(--primary);
  }

  .site-cta{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:9px 14px;
    border-radius:10px;
    background:var(--primary);
    color:#fff;
    text-decoration:none;
    font-size:12px;
    font-weight:700;
    transition:.15s;
  }

  .site-cta:hover{
    background:var(--primary-hover);
  }

  /* =========================================================
     MAIN
     ========================================================= */

  .site-main{
    flex:1;
  }

  .wrap{
    max-width:1080px;
    margin:0 auto;
    padding:40px 20px 64px;
  }

  /* ---------- header démo ---------- */

  .head{
    margin-bottom:20px;
  }

  .head .tag{
    display:inline-flex;
    align-items:center;
    gap:6px;
    font-size:12.5px;
    font-weight:600;
    color:var(--primary);
    background:#F3F1FF;
    border:1px solid #DDD8FF;
    padding:4px 10px;
    border-radius:999px;
    margin-bottom:14px;
  }

  .head h1{
    font-size:clamp(24px,4vw,30px);
    font-weight:800;
    line-height:1.2;
    margin:0 0 6px;
    letter-spacing:-0.02em;
  }

  .head p{
    font-size:14.5px;
    color:var(--slate-500);
    margin:0;
    max-width:58ch;
    line-height:1.55;
  }

  /* ---------- filters bar ---------- */

  .filters-bar{
    background:#fff;
    border:1px solid var(--slate-200);
    border-radius:16px;
    padding:12px 14px;
    display:flex;
    align-items:center;
    gap:14px;
    flex-wrap:wrap;
    margin:20px 0 18px;
  }

  .gran-group{
    display:flex;
    align-items:center;
    background:#EEEEF2;
    padding:4px;
    border-radius:12px;
  }

  .gran-btn{
    border:none;
    background:transparent;
    padding:7px 13px;
    border-radius:9px;
    font-size:12px;
    font-weight:700;
    color:#555561;
    cursor:pointer;
    font-family:inherit;
    transition:.15s;
  }

  .gran-btn.active{
    background:#fff;
    color:var(--ink);
    box-shadow:0 1px 2px rgba(31,31,38,.08);
  }

  .period-nav{
    display:flex;
    align-items:center;
    gap:2px;
  }

  .period-nav button{
    width:28px;
    height:28px;
    border-radius:9px;
    border:1px solid var(--slate-200);
    background:#fff;
    color:var(--slate-500);
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    transition:.15s;
  }

  .period-nav button:hover{
    background:var(--slate-50);
    color:var(--primary);
  }

  .period-label{
    font-size:12px;
    font-weight:700;
    color:var(--slate-700);
    min-width:160px;
    text-align:center;
  }

  /* ---------- kpi grid ---------- */

  .kpi-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:14px;
    margin-bottom:18px;
  }

  .kpi-card{
    background:#fff;
    border:1px solid var(--slate-200);
    border-radius:16px;
    padding:17px;
    box-shadow:0 1px 2px rgba(31,31,38,.04);
    transition:border-color .15s,box-shadow .15s;
  }

  .kpi-card:hover{
    border-color:#D8D3ED;
    box-shadow:0 4px 10px rgba(31,31,38,.05);
  }

  .kpi-top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:10px;
  }

  .kpi-label{
    font-size:10.5px;
    font-weight:800;
    color:var(--slate-500);
    text-transform:uppercase;
    letter-spacing:.05em;
  }

  .kpi-icon{
    width:30px;
    height:30px;
    border-radius:10px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:14px;
    flex:none;
  }

  .kpi-icon.indigo{
    background:#F3F1FF;
    color:var(--primary);
  }

  .kpi-icon.emerald{
    background:#ecfdf5;
    color:var(--emerald-dark);
  }

  .kpi-icon.amber{
    background:#fffbeb;
    color:#b45309;
  }

  .kpi-icon.rose{
    background:#fef2f4;
    color:#e11d48;
  }

  .kpi-value-row{
    display:flex;
    align-items:baseline;
    gap:7px;
  }

  .kpi-value{
    font-size:24px;
    font-weight:900;
    letter-spacing:-.01em;
  }

  .kpi-hint{
    font-size:10.5px;
    font-weight:700;
    color:var(--slate-500);
  }

  /* ---------- panels ---------- */

  .grid-2{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:16px;
    margin-bottom:16px;
  }

  .panel{
    background:#fff;
    border:1px solid var(--slate-200);
    border-radius:18px;
    padding:20px;
    box-shadow:0 1px 2px rgba(31,31,38,.04);
  }

  .panel-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:16px;
  }

  .panel-head h2{
    font-size:13.5px;
    font-weight:800;
    margin:0;
  }

  .panel-head .icon{
    color:var(--primary);
  }

  .panel-head p{
    font-size:11.5px;
    color:var(--slate-500);
    margin:3px 0 0;
  }

  /* ---------- status bars ---------- */

  .bar-row + .bar-row{
    margin-top:14px;
  }

  .bar-row-top{
    display:flex;
    justify-content:space-between;
    font-size:11.5px;
    font-weight:700;
    color:var(--slate-700);
    margin-bottom:5px;
  }

  .bar-track{
    width:100%;
    height:10px;
    background:var(--slate-100);
    border-radius:999px;
    overflow:hidden;
  }

  .bar-fill{
    height:100%;
    border-radius:999px;
    transition:width .4s ease;
  }

  /* ---------- workload ---------- */

  .wl-row{
    background:var(--slate-50);
    border:1px solid var(--slate-100);
    border-radius:13px;
    padding:11px 12px;
  }

  .wl-row + .wl-row{
    margin-top:10px;
  }

  .wl-top{
    display:flex;
    align-items:center;
    justify-content:space-between;
  }

  .wl-left{
    display:flex;
    align-items:center;
    gap:9px;
    min-width:0;
  }

  .wl-left img{
    width:27px;
    height:27px;
    border-radius:50%;
    object-fit:cover;
    border:1px solid var(--slate-200);
    flex:none;
  }

  .wl-name{
    font-size:11.5px;
    font-weight:700;
    color:var(--slate-700);
  }

  .wl-pts{
    font-size:10px;
    color:var(--slate-500);
  }

  .wl-count{
    font-size:11px;
    font-weight:700;
    background:#fff;
    border:1px solid var(--slate-200);
    color:var(--slate-700);
    padding:2px 9px;
    border-radius:8px;
    flex:none;
  }

  .wl-track{
    width:100%;
    height:6px;
    background:var(--slate-200);
    border-radius:999px;
    overflow:hidden;
    margin-top:9px;
  }

  .wl-fill{
    height:100%;
    background:var(--emerald);
    border-radius:999px;
  }

  .wl-pct{
    font-size:10px;
    color:var(--slate-500);
    margin-top:5px;
    display:block;
  }

  .empty-note{
    font-size:12px;
    color:var(--slate-400);
    padding:10px 0;
  }

  /* ---------- mindmap ---------- */

  .mindmap-svg-wrap{
    border:1px solid var(--slate-100);
    border-radius:12px;
    background:linear-gradient(135deg,#FAFAFB,#FFFFFF);
    overflow:hidden;
  }

  .mm-legend{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:16px;
    margin-top:14px;
  }

  .mm-legend-title{
    font-size:11.5px;
    font-weight:700;
    color:var(--slate-700);
    margin-bottom:8px;
  }

  .mm-legend-item{
    display:flex;
    align-items:center;
    gap:8px;
    font-size:11.5px;
    color:#555561;
    margin-bottom:6px;
  }

  .mm-dot{
    width:14px;
    height:14px;
    border-radius:50%;
    flex:none;
  }

  .mm-hint{
    font-size:11px;
    color:var(--slate-500);
    margin-bottom:5px;
  }

  /* ---------- CTA ---------- */

  .cta-band{
    margin-top:6px;
    padding:18px 20px;
    border-radius:14px;
    background:linear-gradient(135deg,#4F39F6,#3526B8);
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    flex-wrap:wrap;
  }

  .cta-title{
    font-size:14px;
    font-weight:700;
    color:#fff;
  }

  .cta-sub{
    font-size:12px;
    color:#E9E6FA;
    margin-top:2px;
  }

  .btn-primary{
    border:none;
    border-radius:11px;
    padding:10px 18px;
    font-size:13px;
    font-weight:700;
    cursor:pointer;
    transition:.15s;
    font-family:inherit;
    text-decoration:none;
    display:inline-block;
    background:#fff;
    color:var(--primary);
  }

  .btn-primary:hover{
    background:#F5F5F7;
  }

  /* ---------- DB simulation ---------- */

  .db-toggle{
    margin-top:22px;
    display:flex;
    align-items:center;
    gap:8px;
    font-size:12.5px;
    font-weight:600;
    color:var(--slate-500);
    cursor:pointer;
    user-select:none;
  }

  .db-toggle .dot{
    width:7px;
    height:7px;
    border-radius:50%;
    background:var(--emerald);
    box-shadow:0 0 0 3px #10b9811f;
  }

  .db-toggle svg.chevron{
    transition:transform .15s;
  }

  .db-toggle.open svg.chevron{
    transform:rotate(90deg);
  }

  .db-panel{
    display:none;
    margin-top:10px;
    background:var(--ink);
    border-radius:14px;
    overflow:hidden;
  }

  .db-panel.open{
    display:block;
  }

  .db-panel-bar{
    display:flex;
    gap:6px;
    padding:10px 14px;
    border-bottom:1px solid #303039;
  }

  .db-panel-bar span{
    width:9px;
    height:9px;
    border-radius:50%;
    background:#3B3B46;
  }

  .db-panel pre{
    margin:0;
    padding:16px;
    font-family:'JetBrains Mono',monospace;
    font-size:11.5px;
    color:#B8B0E8;
    overflow-x:auto;
    line-height:1.6;
    max-height:280px;
    overflow-y:auto;
  }

  .db-panel .caption{
    padding:8px 14px 14px;
    font-size:11px;
    color:#73737F;
    border-top:1px solid #303039;
  }

  /* =========================================================
     FOOTER GLOBAL FLUIDOPS
     ========================================================= */

  .site-footer{
    margin-top:40px;
    background:#1F1F26;
    color:#A9A9B4;
  }

  .site-footer-inner{
    max-width:1080px;
    margin:0 auto;
    padding:18px 20px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    flex-wrap:wrap;
    font-size:11px;
  }

  .footer-brand{
    color:#E5E5EA;
    font-size:12px;
    font-weight:700;
  }

  .footer-copy{
    margin-top:2px;
    color:#858590;
  }

  .footer-made{
    display:inline-flex;
    align-items:center;
    gap:7px;
    color:#E5E5EA;
    font-size:11px;
    font-weight:600;
  }

  .footer-made svg{
    width:24px;
    height:24px;
    flex-shrink:0;
  }

  .footer-year{
    color:#73737F;
  }

  @media(max-width:680px){
    .site-nav{
      display:none;
    }
  }

  @media(max-width:820px){
    .kpi-grid{
      grid-template-columns:1fr 1fr;
    }

    .grid-2{
      grid-template-columns:1fr;
    }

    .mm-legend{
      grid-template-columns:1fr;
    }
  }

  @media(max-width:600px){
    .site-footer-inner{
      justify-content:center;
      text-align:center;
    }
  }
