@import url("mobile-app.css?v=4");

.pending-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ff2e6e;
  color: #fff;
  font-size: 11px;
  margin-left: 6px;
}
body{
margin:0;
font-family:'Inter',system-ui,-apple-system,Segoe UI,sans-serif;
font-size:clamp(12.5px, 0.32vw + 11px, 16px);
line-height:1.5;
-webkit-font-smoothing:antialiased;
-moz-osx-font-smoothing:grayscale;
background:url("../public/fireworks.jpg") center/cover no-repeat fixed;
color:white;
display:flex;
/* Rail : confort lecture + largeurs fluides sur HD / ultrawide */
--sidebar-rail-expanded:clamp(252px, 11vw + 140px, 312px);
--sidebar-rail-collapsed:72px;
--sidebar-width:var(--sidebar-rail-expanded);
}
body.sidebar--collapsed{
--sidebar-width:var(--sidebar-rail-collapsed);
}



/* ===== SIDEBAR — navigation 2026 ===== */
@keyframes navItemReveal{
  from{
    opacity:0;
    transform:translateY(4px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}

/* ≤1200px : barre horizontale en tête (comportement historique + mobile-nav.js) */
@media (max-width:1200px){
  .sidebar-rail-toggle{
    display:none !important;
  }

.sidebar{
  width:100%;
  min-width:100%;
  flex:none;
  min-height:72px;
  height:72px;
  position:fixed;
  z-index:130;
  top:0;
  left:0;
  display:flex;
  flex-direction:row;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  padding:0 210px 0 16px;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:thin;
  scrollbar-color:rgba(56,189,248,0.35) transparent;
  border-right:none;
  border-bottom:1px solid rgba(30,58,138,0.26);
  background:linear-gradient(
    180deg,
    rgba(10,15,30,0.97) 0%,
    rgba(10,15,30,0.92) 88%,
    rgba(10,15,30,0.78) 100%
  );
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  box-shadow:
    0 10px 28px rgba(2,6,23,0.44),
    inset 0 1px 0 rgba(148,163,184,0.08);
}

.sidebar::-webkit-scrollbar{
  width:6px;
}
.sidebar::-webkit-scrollbar-thumb{
  background:linear-gradient(180deg,rgba(236,72,153,0.4),rgba(139,92,246,0.35));
  border-radius:10px;
  border:1px solid rgba(255,255,255,0.06);
}
.sidebar::-webkit-scrollbar-thumb:hover{
  background:linear-gradient(180deg,rgba(236,72,153,0.55),rgba(139,92,246,0.5));
}

.sidebar > *{
  position:relative;
  z-index:1;
}

.sidebar .logo-container{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:0;
  padding:0 16px 0 0;
  margin:0;
  width:auto;
  flex:0 0 auto;
  order:0;
}

.sidebar .logo{
  width:auto;
  max-width:120px;
  max-height:52px;
  height:52px;
  object-fit:contain;
  filter:drop-shadow(0 8px 20px rgba(3,105,161,0.28));
  transition:transform 0.22s ease,filter 0.22s ease;
}

.sidebar .logo-container:hover .logo{
  transform:scale(1.02);
  filter:drop-shadow(0 10px 24px rgba(30,41,59,0.58));
}

.sidebar .menu{
  list-style:none;
  margin:0;
  padding:0;
  flex:1 1 auto;
  display:flex;
  flex-direction:row;
  align-items:center;
  justify-content:flex-start;
  gap:6px;
  min-width:0;
  overflow-x:auto;
  overflow-y:hidden;
  order:1;
}

.sidebar .menu,
#sidebarMenu{
  display:flex !important;
  visibility:visible !important;
  opacity:1 !important;
}

.sidebar .menu::before{
  content:none;
  display:none;
}

.sidebar .menu::after{
  content:none;
  display:none;
}

/* Rail SaaS : titres de section masqués en barre horizontale */
.sidebar .sidebar-nav__section-heading,
#sidebarMenu .sidebar-nav__section-heading{
  display:none !important;
}

.sidebar .sidebar-foot{
  display:none !important;
}

.sidebar .menu-item,
.sidebar .menu > li{
  display:flex;
  margin:0;
  width:auto;
  min-width:max-content;
  animation:navItemReveal 0.35s cubic-bezier(0.22,1,0.36,1) backwards;
}

.sidebar .menu-item:nth-child(1){animation-delay:0.04s;}
.sidebar .menu-item:nth-child(2){animation-delay:0.08s;}
.sidebar .menu-item:nth-child(3){animation-delay:0.12s;}
.sidebar .menu-item:nth-child(4){animation-delay:0.16s;}
.sidebar .menu-item:nth-child(5){animation-delay:0.2s;}
.sidebar .menu-item:nth-child(6){animation-delay:0.24s;}
.sidebar .menu-item:nth-child(7){animation-delay:0.28s;}
.sidebar .menu-item:nth-child(8){animation-delay:0.32s;}
.sidebar .menu-item:nth-child(9){animation-delay:0.36s;}
.sidebar .menu-item:nth-child(10){animation-delay:0.4s;}
.sidebar .menu-item:nth-child(11){animation-delay:0.44s;}
.sidebar .menu-item:nth-child(12){animation-delay:0.48s;}

.sidebar .menu-item a,
.sidebar .menu > li > a{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  flex-wrap:wrap;
  gap:10px 10px;
  box-sizing:border-box;
  width:auto;
  min-width:max-content;
  padding:9px 14px;
  margin:0;
  border-radius:0;
  text-decoration:none;
  font-size:14px;
  font-weight:500;
  letter-spacing:0;
  color:rgba(226,232,240,0.88);
  border:1px solid rgba(255,255,255,0.06);
  border-bottom-color:rgba(255,255,255,0.08);
  background:rgba(255,255,255,0.02);
  box-shadow:none;
  overflow:hidden;
  isolation:isolate;
  transition:
    color 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.14s ease;
}

.sidebar .menu-item a::before{content:none;}

.sidebar .menu-item a::after{
  content:none;
}

.sidebar .menu-item a:hover::before{
  opacity:0;
  transform:none;
}

.sidebar .menu-item.active a::before{
  opacity:0;
}

.sidebar .menu-item a:hover{
  color:#fff;
  background:rgba(255,255,255,0.06);
  border-color:rgba(255,255,255,0.14);
  border-bottom-color:rgba(255,255,255,0.22);
  transform:translateY(0);
  box-shadow:0 8px 18px rgba(2,6,23,0.24);
}

.sidebar .menu-item a:hover::after{
  opacity:0;
  transform:none;
}

.sidebar .menu-item a:focus-visible{
  outline:none;
  color:#fff;
  border-color:rgba(236,72,153,0.55);
  box-shadow:0 0 0 3px rgba(236,72,153,0.2);
}

.sidebar .menu-item.active a{
  color:#fff;
  font-weight:600;
  border-radius:0;
  background:rgba(236,72,153,0.12);
  border-color:rgba(236,72,153,0.38);
  border-bottom-color:rgba(236,72,153,0.68);
  transform:translateY(0);
  box-shadow:inset 2px 0 0 rgba(236,72,153,0.92);
}

.sidebar .menu-item.active a::after{
  opacity:0;
}

.sidebar .menu-item.active a:hover{
  transform:translateY(0);
  box-shadow:none;
}

.sidebar .menu-item a .pending-badge{
  margin-left:10px;
  flex-shrink:0;
  box-shadow:0 2px 10px rgba(248,113,113,0.45);
}

.sidebar .menu-item a > span:first-child:not(.pending-badge){
  flex:1;
  min-width:0;
}

@media (prefers-reduced-motion: reduce){
  .sidebar .menu-item{
    animation:none;
  }
  .sidebar .menu-item a,
  .sidebar .logo{
    transition:none;
  }
  .sidebar .menu-item a:hover,
  .sidebar .menu-item.active a:hover{
    transform:translateY(0);
  }
  .sidebar .logo-container:hover .logo{
    transform:none;
  }
  .sidebar .menu-item a:hover::before{
    transform:translateY(-50%);
  }
  .sidebar .menu-item a:hover::after{
    transform:translateY(-50%) rotate(-45deg);
  }
}

}

/* Menu horizontal (≤1200px) : palier intermédiaire — typo et hauteur un peu plus serrées avant le resserrement 980px */
@media (max-width:1200px) and (min-width:981px){
  .sidebar{
    min-height:68px;
    height:68px;
    gap:8px;
    padding:0 clamp(120px, 16vw, 210px) 0 16px;
  }
  .sidebar .logo{
    max-height:44px;
    height:44px;
    max-width:100px;
  }
  .sidebar .menu{
    gap:5px;
  }
  .sidebar .menu-item a,
  .sidebar .menu > li > a{
    font-size:clamp(12px, 0.35vw + 10px, 14px);
    padding:7px 10px;
  }
  .top-user-actions{
    min-height:68px;
  }
  body .main{
    padding-top:92px;
  }
  body.has-top-profile-menu .main{
    padding-top:calc(68px + 12px) !important;
  }
}

/* ≥1201px : rail vertical SaaS — fond uni, lignes plates, accent Madness */
@media (min-width:1201px){
  .sidebar{
    position:fixed;
    z-index:130;
    width:var(--sidebar-width);
    min-width:var(--sidebar-width);
    max-width:var(--sidebar-width);
    height:100vh;
    min-height:100vh;
    max-height:100vh;
    top:0;
    left:0;
    display:flex;
    flex-direction:column;
    align-items:stretch;
    justify-content:flex-start;
    gap:0;
    padding:12px 10px 10px;
    /* visible : si overflow-y ≠ visible, le navigateur coupe aussi l’axe X → bouton rail rogné */
    overflow:visible;
    border-right:1px solid rgba(255,255,255,0.08);
    border-bottom:none;
    box-shadow:
      4px 0 32px rgba(0,0,0,0.45),
      inset 1px 0 0 rgba(255,255,255,0.06);
    background:
      radial-gradient(ellipse 140% 90% at 0% -10%, rgba(236,72,153,0.18) 0%, transparent 52%),
      radial-gradient(ellipse 100% 70% at 100% 25%, rgba(99,102,241,0.12) 0%, transparent 48%),
      radial-gradient(ellipse 80% 50% at 50% 100%, rgba(15,23,42,0.9) 0%, transparent 55%),
      linear-gradient(165deg, #0f172a 0%, #111827 38%, #0b1220 100%);
    backdrop-filter:none;
    -webkit-backdrop-filter:none;
    -webkit-font-smoothing:antialiased;
    transition:width 0.22s ease,min-width 0.22s ease,max-width 0.22s ease,padding 0.22s ease;
  }
  .sidebar::before{
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    z-index:0;
    opacity:0.45;
    background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    mix-blend-mode:overlay;
  }
  .sidebar > *{
    position:relative;
    z-index:1;
  }
  .sidebar .logo-container{
    width:100%;
    display:flex;
    flex-direction:column;
    align-items:center;
    text-align:center;
    padding:6px 8px 12px;
    margin:0 0 8px;
    border-bottom:1px solid rgba(255,255,255,0.06);
    flex-shrink:0;
    box-sizing:border-box;
  }
  .sidebar .logo-container .logo{
    display:block;
    width:auto;
    max-width:100%;
    height:auto;
    max-height:clamp(72px, 10vh + 36px, 120px);
    margin:0 auto;
    object-fit:contain;
    filter:drop-shadow(0 2px 8px rgba(0,0,0,0.4));
  }
  .sidebar .menu,
  .sidebar .sidebar-nav-list{
    flex:1 1 auto;
    flex-direction:column;
    align-items:stretch;
    justify-content:flex-start;
    gap:4px;
    min-height:0;
    overflow-x:hidden;
    overflow-y:auto;
    overscroll-behavior:contain;
    padding:6px 6px 10px;
    scrollbar-width:thin;
    scrollbar-color:rgba(100,116,139,0.28) transparent;
    list-style:none;
  }
  .sidebar .menu::-webkit-scrollbar,
  .sidebar .sidebar-nav-list::-webkit-scrollbar{
    width:5px;
  }
  .sidebar .menu::-webkit-scrollbar-thumb,
  .sidebar .sidebar-nav-list::-webkit-scrollbar-thumb{
    background:rgba(148,163,184,0.35);
    border-radius:6px;
  }
  .sidebar .sidebar-nav__section-heading{
    display:block !important;
    list-style:none;
    margin:0;
    padding:14px 10px 4px;
    width:100%;
    box-sizing:border-box;
    pointer-events:none;
  }
  .sidebar .sidebar-nav__section-heading:first-child{
    padding-top:4px;
  }
  .sidebar .sidebar-nav__section-title{
    display:block;
    font-size:clamp(10px, 0.15vw + 9px, 11px);
    font-weight:600;
    letter-spacing:0.08em;
    text-transform:uppercase;
    color:rgba(148,163,184,0.82);
    line-height:1.35;
  }
  body.sidebar--collapsed .sidebar .sidebar-nav__section-heading{
    position:absolute;
    width:1px;
    height:1px;
    padding:0;
    margin:-1px;
    overflow:hidden;
    clip:rect(0,0,0,0);
    white-space:nowrap;
    border:0;
  }
  .sidebar .menu-item,
  .sidebar .menu > li:not(.sidebar-nav__section-heading){
    width:100%;
    min-width:0;
    flex-shrink:0;
    animation:none;
    margin:0;
    padding:0;
    position:relative;
  }
  .sidebar .menu-item a,
  .sidebar .menu > li:not(.sidebar-nav__section-heading) > a,
  #sidebarMenu .menu-item > a{
    position:relative;
    display:flex;
    align-items:center;
    justify-content:flex-start;
    flex-wrap:nowrap;
    gap:10px;
    width:100%;
    min-width:0;
    min-height:clamp(38px, 1.2vw + 34px, 46px);
    box-sizing:border-box;
    padding:8px 10px;
    border-radius:8px;
    font-size:clamp(13px, 0.25vw + 12px, 15px);
    font-weight:500;
    line-height:1.35;
    letter-spacing:0.01em;
    text-decoration:none !important;
    color:rgba(226,232,240,0.95) !important;
    border:none;
    background:transparent;
    box-shadow:none;
    overflow:hidden;
    transition:background 0.18s ease,color 0.18s ease,box-shadow 0.18s ease;
  }
  .sidebar .menu-item a:visited,
  .sidebar .menu > li > a:visited,
  #sidebarMenu .menu-item > a:visited{
    color:rgba(226,232,240,0.95) !important;
  }
  .sidebar .menu-item a:hover{
    color:#fff !important;
    background:rgba(255,255,255,0.07);
  }
  .sidebar .menu-item a:focus-visible{
    outline:2px solid rgba(236,72,153,0.5);
    outline-offset:2px;
  }
  .sidebar .menu-item a .nav-ico{
    flex:0 0 clamp(18px, 1vw + 14px, 22px);
    width:clamp(18px, 1vw + 14px, 22px);
    height:clamp(18px, 1vw + 14px, 22px);
    display:flex;
    align-items:center;
    justify-content:center;
    color:rgba(226,232,240,0.95);
  }
  .sidebar .menu-item a .nav-ico svg{
    width:100%;
    height:100%;
    display:block;
  }
  .sidebar .menu-item.active a .nav-ico{
    color:#fbcfe8;
  }
  .sidebar .menu-item a .nav-label{
    flex:1;
    min-width:0;
    white-space:normal;
    word-break:break-word;
  }
  .sidebar .menu-item.active a{
    color:#fff !important;
    font-weight:600;
    background:rgba(236,72,153,0.14);
    box-shadow:inset 3px 0 0 #ec4899;
  }
  .sidebar .menu-item.active a:hover{
    background:rgba(236,72,153,0.2);
  }
  .sidebar .menu-item a .pending-badge{
    margin-left:auto;
    flex-shrink:0;
  }
  body.sidebar--collapsed .sidebar .menu-item a .pending-badge{
    position:absolute;
    top:2px;
    right:2px;
    margin-left:0;
    min-width:16px;
    height:16px;
    padding:0 4px;
    font-size:10px;
  }
  .sidebar .sidebar-foot{
    display:block !important;
    flex-shrink:0;
    margin-top:auto;
    padding:10px 8px 8px;
    border-top:1px solid rgba(255,255,255,0.06);
  }
  .sidebar .sidebar-foot__brand{
    display:block;
    font-size:11px;
    font-weight:500;
    letter-spacing:0.04em;
    color:rgba(148,163,184,0.75);
    line-height:1.3;
    text-align:center;
  }
  body.sidebar--collapsed .sidebar{
    padding-left:10px;
    padding-right:10px;
    overflow:visible;
  }
  body.sidebar--collapsed .sidebar .logo-container{
    align-items:center;
    padding-left:4px;
    padding-right:4px;
  }
  body.sidebar--collapsed .sidebar .logo{
    max-height:clamp(44px, 6vh + 24px, 64px);
  }
  body.sidebar--collapsed .sidebar .menu-item a{
    justify-content:center;
    align-items:center;
    min-height:44px;
    padding:8px 8px;
    border-radius:8px;
  }
  body.sidebar--collapsed .sidebar .menu-item a .nav-ico{
    flex:0 0 26px;
    width:26px;
    height:26px;
  }
  body.sidebar--collapsed .sidebar .menu-item a .nav-ico svg{
    width:26px;
    height:26px;
  }
  body.sidebar--collapsed .sidebar .menu-item.active a .nav-ico{
    color:#fbcfe8;
  }
  body.sidebar--collapsed .sidebar .menu-item a .nav-label{
    position:absolute;
    width:1px;
    height:1px;
    padding:0;
    margin:-1px;
    overflow:hidden;
    clip:rect(0,0,0,0);
    white-space:nowrap;
    border:0;
  }
  body.sidebar--collapsed .sidebar .sidebar-foot{
    padding-left:4px;
    padding-right:4px;
  }
  body.sidebar--collapsed .sidebar .sidebar-foot__brand{
    font-size:0;
    width:1px;
    height:1px;
    overflow:hidden;
    position:absolute;
  }
  /* Poignée sur le bord droit : moitié dans le rail, moitié sur le contenu — sans « carte » */
  .sidebar .sidebar-rail-toggle{
    position:absolute;
    right:0;
    top:50%;
    z-index:250;
    width:18px;
    height:52px;
    margin:0;
    padding:0;
    border:none;
    border-radius:0 10px 10px 0;
    background:rgba(17,24,39,0.55);
    color:rgba(226,232,240,0.88);
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    transform:translate(50%,-50%);
    box-shadow:0 0 0 1px rgba(255,255,255,0.06),2px 2px 12px rgba(0,0,0,0.2);
    backdrop-filter:blur(6px);
    -webkit-backdrop-filter:blur(6px);
    transition:background 0.15s ease,color 0.15s ease,box-shadow 0.15s ease;
    pointer-events:auto;
  }
  .sidebar .sidebar-rail-toggle:hover{
    background:rgba(30,41,59,0.75);
    color:#fff;
    box-shadow:0 0 0 1px rgba(255,255,255,0.1),2px 4px 16px rgba(0,0,0,0.28);
  }
  .sidebar .sidebar-rail-toggle:active{
    background:rgba(15,23,42,0.85);
  }
  .sidebar .sidebar-rail-toggle:focus-visible{
    outline:2px solid rgba(148,163,184,0.5);
    outline-offset:1px;
  }
  .sidebar-rail-toggle__ico{
    width:12px;
    height:12px;
    margin-left:-2px;
    flex-shrink:0;
    display:block;
    pointer-events:none;
    opacity:0.95;
  }
  @media (min-width:1201px) and (prefers-reduced-motion:reduce){
    .sidebar .sidebar-rail-toggle:hover,
    .sidebar .sidebar-rail-toggle:active{
      transform:translate(50%,-50%);
    }
  }
  body:not(.nav-mobile) .top-user-actions{
    left:var(--sidebar-width);
    right:0;
    width:auto;
    transition:left 0.22s ease;
  }
  body:not(.nav-mobile).has-top-profile-menu .sidebar{
    padding-right:12px !important;
  }
}

/* Barre applicative : actions de page + notif + profil (fixe, même couche) */
body.has-top-profile-menu{
  --app-top-chrome-height:0px;
}

/* Barre fixe : titre + actions de page | notifications + profil */
.top-user-actions{
position:fixed;
top:0;
left:0;
right:0;
width:auto;
padding-left:max(12px, env(safe-area-inset-left, 0px));
padding-right:max(12px, env(safe-area-inset-right, 0px));
padding-top:8px;
padding-bottom:8px;
z-index:131;
display:flex;
flex-direction:row;
align-items:center;
justify-content:flex-start;
flex-wrap:wrap;
gap:10px;
row-gap:8px;
min-height:72px;
height:auto;
max-height:none;
box-sizing:border-box;
background:transparent;
border:none;
backdrop-filter:none;
-webkit-backdrop-filter:none;
box-shadow:none;
pointer-events:none;
}

.top-user-actions > *{
pointer-events:auto;
}

.app-top-bar-start{
display:flex;
flex-direction:row;
align-items:center;
justify-content:flex-start;
gap:12px;
flex:1;
min-width:0;
margin-right:auto;
padding-right:8px;
}

.app-top-page-head{
display:flex;
flex-direction:column;
align-items:flex-start;
justify-content:center;
gap:2px;
min-width:0;
flex:0 1 auto;
}

.app-top-page-title{
margin:0;
padding:0;
font-size:clamp(1rem, 0.85rem + 0.55vw, 1.4rem);
font-weight:600;
line-height:1.2;
letter-spacing:-0.02em;
color:#fff;
max-width:min(56vw, 820px);
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
}

.app-top-page-sub{
margin:0;
padding:0;
font-size:clamp(11px, 0.65rem + 0.35vw, 13px);
line-height:1.3;
font-weight:400;
color:rgba(226,232,240,0.72);
max-width:min(62vw, 900px);
display:block;
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
}

.app-top-page-sub[hidden]{
display:none !important;
}

.app-top-header-slot{
display:flex;
flex-direction:row;
flex-wrap:wrap;
align-items:center;
justify-content:flex-end;
gap:8px;
min-width:0;
flex:1 1 auto;
}

.app-top-header-slot:empty{
display:none;
}

.app-top-bar-end{
display:flex;
flex-direction:row;
align-items:center;
gap:12px;
flex-shrink:0;
margin-left:auto;
position:relative;
z-index:2;
}

body.has-top-profile-menu .main .project-header[hidden],
body.has-top-profile-menu .main .project-header.project-header--merged-into-topbar{
display:none !important;
}

/* Réserve à droite du menu horizontal (≤1200px) : icônes notif + profil */
@media (max-width:1200px){
  body:not(.nav-mobile).has-top-profile-menu .sidebar{
    padding-right:clamp(140px, 18vw, 220px) !important;
  }
}

.top-notif-wrap,
.top-profile-trigger{
flex-shrink:0;
}

.top-profile-trigger,
.top-notif-trigger{
width:52px;
height:52px;
border-radius:999px;
border:1px solid rgba(255,255,255,0.48);
background:linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.10));
color:#fff;
display:flex;
align-items:center;
justify-content:center;
cursor:pointer;
backdrop-filter:blur(10px);
box-shadow:0 8px 20px rgba(0,0,0,0.28);
transition:transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.top-profile-trigger:hover,
.top-notif-trigger:hover{
transform:translateY(-1px);
border-color:rgba(255,255,255,0.72);
box-shadow:0 12px 26px rgba(0,0,0,0.34), 0 0 0 1px rgba(255,255,255,0.30) inset;
}

.top-profile-avatar{
display:inline-flex;
width:24px;
height:24px;
color:#fff;
filter:drop-shadow(0 0 6px rgba(255,255,255,0.28));
}

.top-profile-avatar svg{
width:100%;
height:100%;
fill:currentColor;
}

.top-notif-wrap{
position:relative;
}

.top-notif-icon{
display:inline-flex;
width:24px;
height:24px;
color:#fff;
}

.top-notif-icon svg{
width:100%;
height:100%;
fill:currentColor;
}

.top-notif-badge{
position:absolute;
top:-2px;
right:-2px;
min-width:19px;
height:19px;
padding:0 5px;
border-radius:999px;
background:#ff3a52;
color:#fff;
font-size:11px;
font-weight:700;
display:inline-flex;
align-items:center;
justify-content:center;
border:1px solid rgba(255,255,255,0.55);
}

.top-profile-dropdown{
position:absolute;
top:calc(100% + 10px);
right:0;
width:300px;
padding:10px;
border-radius:10px;
border:1px solid rgba(255,255,255,0.16);
background:rgba(15,18,35,0.92);
backdrop-filter:blur(14px);
box-shadow:0 16px 34px rgba(0,0,0,0.35);
opacity:0;
visibility:hidden;
transform:translateY(-8px);
transition:opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.top-profile-card-head{
padding:8px 8px 10px;
border-bottom:1px solid rgba(255,255,255,0.12);
}

.top-profile-card-name{
font-size:24px;
font-weight:700;
line-height:1.15;
color:#fff;
letter-spacing:-0.02em;
}

.top-profile-card-email{
margin-top:4px;
font-size:14px;
color:#cbd5e1;
}

.top-profile-card-list{
padding:8px 0;
display:flex;
flex-direction:column;
gap:2px;
}

.top-profile-card-item{
width:100%;
display:flex;
align-items:center;
gap:10px;
padding:10px 8px;
border:none;
border-radius:8px;
background:transparent;
color:#f8fafc;
text-decoration:none;
text-align:left;
font-size:14px;
font-family:inherit;
cursor:pointer;
}

.top-profile-card-item:hover{
background:rgba(255,255,255,0.12);
}

.top-profile-card-item .item-ico{
width:26px;
height:26px;
border-radius:999px;
background:#1f2937;
display:inline-flex;
align-items:center;
justify-content:center;
color:#fff;
flex:0 0 26px;
}

.top-profile-card-item .item-ico svg,
.top-profile-card-foot .item-ico svg{
width:15px;
height:15px;
fill:currentColor;
}

.top-profile-card-foot .item-ico{
width:26px;
height:26px;
border-radius:999px;
background:#1f2937;
display:inline-flex;
align-items:center;
justify-content:center;
color:#fff;
flex:0 0 26px;
}

.top-profile-card-item.is-split{
justify-content:space-between;
}

.top-profile-card-item .item-left{
display:inline-flex;
align-items:center;
gap:10px;
}

.top-profile-card-item .item-right{
font-size:14px;
color:#dbe4f0;
}

.top-profile-card-foot{
border-top:1px solid rgba(255,255,255,0.12);
padding-top:8px;
}

.top-profile-card-foot #topProfileLogout{
width:100%;
display:flex;
align-items:center;
gap:10px;
padding:10px 8px;
border:none;
border-radius:10px;
background:transparent;
color:#f8fafc;
text-align:left;
font-size:14px;
font-family:inherit;
cursor:pointer;
}

.top-profile-card-foot #topProfileLogout:hover{
background:rgba(255,255,255,0.12);
}

.top-notif-dropdown{
position:absolute;
top:calc(100% + 10px);
right:0;
min-width:300px;
max-width:360px;
max-height:430px;
padding:8px;
border-radius:14px;
border:1px solid rgba(255,255,255,0.16);
background:rgba(15,18,35,0.92);
backdrop-filter:blur(14px);
box-shadow:0 16px 34px rgba(0,0,0,0.35);
opacity:0;
visibility:hidden;
transform:translateY(-8px);
transition:opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.top-user-actions.notif-open .top-notif-dropdown{
opacity:1;
visibility:visible;
transform:translateY(0);
}

.top-user-actions.profile-open .top-profile-dropdown{
opacity:1;
visibility:visible;
transform:translateY(0);
}

.top-notif-head{
display:flex;
align-items:center;
justify-content:space-between;
padding:4px 4px 8px;
}

.top-notif-head strong{
font-size:14px;
}

.top-notif-clear-btn{
border:none;
background:transparent;
color:#d8dbe6;
font-size:12px;
cursor:pointer;
padding:6px 8px;
border-radius:8px;
}

.top-notif-clear-btn:hover{
background:rgba(255,255,255,0.12);
color:#fff;
}

.top-notif-list{
display:flex;
flex-direction:column;
gap:8px;
max-height:360px;
overflow:auto;
padding-right:2px;
}

.top-notif-empty{
padding:16px 10px;
font-size:13px;
color:#c9cedd;
text-align:center;
}

.top-notif-item{
display:flex;
gap:8px;
align-items:flex-start;
padding:10px;
border-radius:10px;
background:rgba(255,255,255,0.07);
border:1px solid rgba(255,255,255,0.09);
}

.top-notif-item-main{
flex:1;
min-width:0;
}

.top-notif-item-title{
font-size:13px;
font-weight:700;
color:#fff;
margin-bottom:3px;
}

.top-notif-item-text{
font-size:12px;
color:#d6dbeb;
}

.top-notif-item-time{
font-size:11px;
opacity:0.7;
margin-top:4px;
}

.top-notif-remove{
border:none;
background:transparent;
color:#fff;
cursor:pointer;
padding:4px 6px;
border-radius:8px;
}

.top-notif-remove:hover{
background:rgba(255,255,255,0.14);
}

@media (max-width: 1100px){
  body.has-top-profile-menu{
    --app-top-chrome-height:0px;
  }
  .top-user-actions{
    left:0;
    right:0;
    padding-left:12px;
    padding-right:8px;
  }
}

@media (max-width: 980px){
  .sidebar{
    height:80px;
    min-height:80px;
    padding:0 92px 0 12px;
    gap:8px;
  }
  .sidebar .logo{
    max-width:82px;
    max-height:40px;
    height:40px;
  }
  .sidebar .menu{
    gap:4px;
    padding-right:0;
  }
  .sidebar .menu-item a,
  .sidebar .menu > li > a{
    font-size:13px;
    padding:8px 12px 8px 30px;
  }
  .top-user-actions{
    min-height:80px;
    height:auto;
    max-height:none;
    left:0;
    right:0;
    padding-right:6px;
  }
  /* Ne pas masquer les actions remontées (devis, facturation…) — scroll horizontal si besoin */
  body .main{
    padding-top:104px;
  }
  body.has-top-profile-menu .main{
    padding-top:calc(80px + 16px);
  }
}

/* Sidebar empilée en colonne : barre sur toute la largeur */
@media (max-width: 860px){
  body.has-top-profile-menu .top-user-actions{
    left:0;
    border-left:none;
  }
}

/* Aligne les boutons d'action en haut, juste à gauche des icônes */
body.has-top-profile-menu .main [class*="topbar-right"],
body.has-top-profile-menu .main [class*="toolbar-actions"],
body.has-top-profile-menu .main [class*="header-actions"]{
  margin-left:auto !important;
  justify-content:flex-end !important;
  align-items:center;
  text-align:right;
}

/* Les actions de page ne sont plus dans la barre fixe : pas de retrait supplémentaire à droite */
body.has-top-profile-menu .dashboard-header-actions,
body.has-top-profile-menu .parametres-toolbar,
body.has-top-profile-menu .projets-topbar,
body.has-top-profile-menu .projects-header,
body.has-top-profile-menu .facturation-topbar,
body.has-top-profile-menu .artificier-compte-topbar-right,
body.has-top-profile-menu .nf-topbar-actions,
body.has-top-profile-menu .project-dates-topbar,
body.has-top-profile-menu .feux-passes-topbar{
padding-right:0 !important;
}

body.has-top-profile-menu .main [class*="topbar"],
body.has-top-profile-menu .main [class*="toolbar"],
body.has-top-profile-menu .main [class*="header-actions"],
body.has-top-profile-menu .main [class*="topbar-right"],
body.has-top-profile-menu .main [class*="toolbar-actions"],
body.has-top-profile-menu .main [class*="header-right"]{
padding-right:0 !important;
}

@media (max-width: 1100px){
  body.has-top-profile-menu .main [class*="topbar-right"],
  body.has-top-profile-menu .main [class*="toolbar-actions"],
  body.has-top-profile-menu .main [class*="header-actions"]{
    margin-left:auto !important;
    justify-content:flex-end !important;
  }
}

/* ---------- Un seul bandeau sticky : titre + barre d’actions (alignée avec les icônes) ---------- */
body.has-top-profile-menu .main .app-page-top-sticky {
  position: sticky;
  top: var(--app-top-chrome-height, 72px);
  z-index: 95;
  box-sizing: border-box;
  margin-left: -40px;
  margin-right: -40px;
  margin-top: -8px;
  padding: 12px 40px 16px 40px;
  background: linear-gradient(
    180deg,
    rgba(10, 15, 30, 0.97) 0%,
    rgba(10, 15, 30, 0.92) 88%,
    rgba(10, 15, 30, 0.78) 100%
  );
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

@media (max-width: 1100px) {
  body.has-top-profile-menu .main .app-page-top-sticky {
    padding-right: 32px;
  }
}

/* Évite le double bandeau : l’intérieur n’est plus sticky séparément (toolbars : voir bloc suivant) */
body.has-top-profile-menu .main .app-page-top-sticky .project-header,
body.has-top-profile-menu .main .app-page-top-sticky .sticky-topbar,
body.has-top-profile-menu .main .app-page-top-sticky .facturation-topbar {
  position: static !important;
  top: auto !important;
  z-index: auto !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-top: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  box-shadow: none !important;
}

body.has-top-profile-menu .main .app-page-top-sticky .project-header {
  padding: 0 0 12px 0 !important;
  gap: clamp(8px, 1vw, 12px);
}

@media (max-width:640px){
  body.has-top-profile-menu .main .app-page-top-sticky .project-header {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (min-width:641px){
  body.has-top-profile-menu .main .app-page-top-sticky .project-header {
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
}

body.has-top-profile-menu .main .app-page-top-sticky .projets-kpi-grid {
  margin-bottom: 12px;
}

body.has-top-profile-menu .main .app-page-top-sticky .sticky-topbar {
  border-radius: 0;
  padding-top: 4px !important;
}

/* Barres d’outils seules (fiche client, profil artificier, etc.) — hors wrapper */
body.has-top-profile-menu .main .parametres-toolbar,
body.has-top-profile-menu .main [class*="sticky-toolbar"] {
  position: sticky;
  top: var(--app-top-chrome-height, 72px);
  z-index: 95;
  box-sizing: border-box;
  align-self: stretch;
  background: linear-gradient(
    180deg,
    rgba(10, 15, 30, 0.97) 0%,
    rgba(10, 15, 30, 0.92) 88%,
    rgba(10, 15, 30, 0.78) 100%
  );
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  margin-left: -40px;
  margin-right: -40px;
  padding-left: 40px;
  padding-right: 40px;
  padding-top: 12px;
  padding-bottom: 14px;
}

body.has-top-profile-menu .main .app-page-top-sticky .parametres-toolbar,
body.has-top-profile-menu .main .app-page-top-sticky [class*="sticky-toolbar"] {
  position: static !important;
  top: auto !important;
  z-index: auto !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-top: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  box-shadow: none !important;
  border-bottom: none !important;
}

@media (max-width: 1100px) {
  body.has-top-profile-menu .main .parametres-toolbar,
  body.has-top-profile-menu .main [class*="sticky-toolbar"] {
    padding-right: 32px;
  }
}

/* En-tête seul avec boutons (tableau de bord, fiche projet, devis, compte, etc.) */
body.has-top-profile-menu .main .dashboard-page > .project-header:first-child,
body.has-top-profile-menu .main .artificier-dash-root > .project-header:first-child,
body.has-top-profile-menu .main .project-page-modern > .project-header:first-child,
body.has-top-profile-menu .main .devis-page > .project-header:first-child,
body.has-top-profile-menu .main .compte-page > .project-header:first-child,
body.has-top-profile-menu .main .taches-page > .project-header:first-child,
body.has-top-profile-menu .main .artificier-compte-page > .project-header:first-child,
body.has-top-profile-menu .main .db-page > .project-header:first-child,
body.has-top-profile-menu .main > .project-header:first-child {
  position: sticky;
  top: var(--app-top-chrome-height, 72px);
  z-index: 95;
  box-sizing: border-box;
  margin-left: -40px;
  margin-right: -40px;
  margin-top: -8px;
  padding: 12px 40px 16px 40px;
  background: linear-gradient(
    180deg,
    rgba(10, 15, 30, 0.97) 0%,
    rgba(10, 15, 30, 0.92) 88%,
    rgba(10, 15, 30, 0.78) 100%
  );
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

@media (max-width: 1100px) {
  body.has-top-profile-menu .main .dashboard-page > .project-header:first-child,
  body.has-top-profile-menu .main .artificier-dash-root > .project-header:first-child,
  body.has-top-profile-menu .main .project-page-modern > .project-header:first-child,
  body.has-top-profile-menu .main .devis-page > .project-header:first-child,
  body.has-top-profile-menu .main .compte-page > .project-header:first-child,
  body.has-top-profile-menu .main .taches-page > .project-header:first-child,
  body.has-top-profile-menu .main .artificier-compte-page > .project-header:first-child,
  body.has-top-profile-menu .main .db-page > .project-header:first-child,
  body.has-top-profile-menu .main > .project-header:first-child {
    padding-right: 32px;
  }
}

body.has-top-profile-menu .main .project-header .project-header-actions,
body.has-top-profile-menu .main .project-header .dashboard-header-actions,
body.has-top-profile-menu .main .project-header .compte-header-actions,
body.has-top-profile-menu .main .project-header .taches-header-actions,
body.has-top-profile-menu .main .project-header .devis-header-actions,
body.has-top-profile-menu .main .project-header .artificier-compte-topbar-right {
  margin-left: 0;
  width: 100%;
  flex-shrink: 0;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Feux passés : topbar seule si pas de wrapper */
body.has-top-profile-menu .main .feux-passes-topbar {
  position: sticky;
  top: var(--app-top-chrome-height, 72px);
  z-index: 95;
  box-sizing: border-box;
  margin-left: -40px;
  margin-right: -40px;
  padding: 12px 40px 14px 40px;
  background: linear-gradient(
    180deg,
    rgba(10, 15, 30, 0.97) 0%,
    rgba(10, 15, 30, 0.92) 88%,
    rgba(10, 15, 30, 0.78) 100%
  );
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

@media (max-width: 1100px) {
  body.has-top-profile-menu .main .feux-passes-topbar {
    padding-right: 32px;
  }
}

/* MAIN */

.main{
flex:1;
padding:40px;


background:linear-gradient(
90deg,
rgba(10,15,30,0.70),
rgba(10,15,30,0.92)
);

backdrop-filter:blur(16px);
-webkit-backdrop-filter:blur(16px);

position:relative;
z-index:2;
}

@media (max-width:1200px){
  body .main{
    padding-top:104px;
  }
  body.has-top-profile-menu .main{
    padding-top:calc(88px + 16px);
  }
}

@media (min-width:1201px){
  body:not(.nav-mobile) .main{
    margin-left:var(--sidebar-width);
    flex:1;
    min-width:0;
    box-sizing:border-box;
    padding-top:calc(88px + 14px);
    padding-left:clamp(20px, 2.5vw, 52px);
    padding-right:clamp(20px, 2.5vw, 52px);
    padding-bottom:clamp(24px, 2.8vw, 44px);
    transition:margin-left 0.22s ease;
  }
  body:not(.nav-mobile).has-top-profile-menu .main{
    padding-top:calc(88px + 14px);
  }
}

/* Laptop / écran étroit : réduire le gabarit avant le passage barre horizontale */
@media (min-width:1201px) and (max-width:1600px){
  body:not(.nav-mobile) .main{
    padding-left:clamp(16px, 1.6vw, 40px);
    padding-right:clamp(16px, 1.6vw, 40px);
    padding-bottom:clamp(18px, 2vw, 36px);
  }
}
.main h1{
  font-weight:600;
  font-size:clamp(1.4rem, 1.1rem + 1.1vw, 2rem);
  line-height:1.2;
  letter-spacing:-0.02em;
  margin:0 0 0.35em;
}

/* DASHBOARD */

.cards{
display:grid;
grid-template-columns:repeat(4,1fr);
gap:25px;
margin-top:30px;
}
.card{
background:rgba(255,255,255,0.06);
backdrop-filter:blur(20px);
border-radius:10px;
padding:25px;
border:1px solid rgba(255,255,255,0.15);
box-shadow:0 10px 30px rgba(0,0,0,0.4);
transition:all 0.25s ease;
}

.card:hover{
transform:translateY(-4px);
background:rgba(255,255,255,0.10);
}

/* COULEURS */

.red{
color:#ef4444;
}

.orange{
color:#f59e0b;
}

.green{
color:#22c55e;
}
.logo-container{
width:100%;
display:flex;
justify-content:center;
margin-bottom:40px;
}

.logo{
width:180px;
}

/* PROJETS */

.projects-header{
display:flex;
justify-content:space-between;
align-items:center;

margin-bottom:20px;
}

.btn-new-project{
background:rgba(255,255,255,0.1);
border:1px solid rgba(255,255,255,0.2);
color:white;
padding:10px 18px;
border-radius:6px;
cursor:pointer;
backdrop-filter:blur(10px);
transition:0.2s;
}

.btn-new-project:hover{
background:rgba(255,255,255,0.2);
}

.projects-table{
background:rgba(255,255,255,0.05);
backdrop-filter:blur(15px);
border-radius:10px;
padding:20px;
border:1px solid rgba(255,255,255,0.1);
}

table{
width:100%;
border-collapse:collapse;
color:white;
}

th{
text-align:left;
padding:12px;
font-weight:500;
border-bottom:1px solid rgba(255,255,255,0.1);
}

td{
padding:12px;
border-bottom:1px solid rgba(255,255,255,0.05);
}

/* MODAL */

.modal{
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
display:none;
justify-content:center;
align-items:center;
background:rgba(0,0,0,0.6);
z-index:1000;
}

.modal-content{
width:420px;
background:rgba(20,25,40,0.6);
backdrop-filter:blur(20px);
padding:30px;
border-radius:16px;
border:1px solid rgba(255,255,255,0.1);
color:white;
}

.form-group{
margin-bottom:15px;
display:flex;
flex-direction:column;
}

.form-group label{
margin-bottom:15px;
font-size:14px;
opacity:0.8;
}

.form-group input,
.form-group select{
padding:10px;
border-radius:8px;
border:1px solid rgba(255,255,255,0.2);
background:rgba(255,255,255,0.05);
color:white;
}

.modal-buttons{
display:flex;
justify-content:flex-end;
gap:10px;
margin-top:20px;
}

.btn-cancel{
background:rgba(255,255,255,0.1);
border:1px solid rgba(255,255,255,0.2);
padding:10px 15px;
border-radius:8px;
color:white;
cursor:pointer;
}

.btn-create{
background:#ff2c70;
border:none;
padding:10px 15px;
border-radius:8px;
color:white;
cursor:pointer;
}

.projects-table td,
.projects-table th{
text-align:center;
vertical-align:middle;
}

.projects-table tr{
border-bottom:1px solid rgba(255,255,255,0.08);
}

.projects-table tbody tr:hover{
background:rgba(255,255,255,0.05);
}

.projects-summary{
margin-top:25px;
display:flex;
gap:20px;
flex-wrap:wrap;
}

.summary-item{
padding:12px 18px;
border-radius:10px;
background:rgba(255,255,255,0.05);
border:1px solid rgba(255,255,255,0.1);
font-weight:500;
}

.summary-item.todo{
color:#bbbbbb;
}

.summary-item.progress{
color:#ff2c70;
}

.summary-item.accepted{
color:#27d17f;
}

.summary-item.refused{
color:#ff4c4c;
}

/* LIEN PROJET CLIQUABLE */

.project-link{
cursor:pointer;
transition:all 0.2s ease;
font-weight:500;
}

/* HOVER */

.project-link:hover{

transform:scale(1.05);
color:#ff4d9d;

}

/* LIGNE DU TABLEAU */

tr{
transition:all 0.2s ease;
}

tr:hover{

background:rgba(255,255,255,0.05);
transform:scale(1.01);

}

.project-page{
padding:40px;
}

.project-grid{
display:grid;
grid-template-columns: 3fr 1fr;
gap:30px;
}

.card{
background: rgba(20,20,30,0.55);
backdrop-filter: blur(14px);
-webkit-backdrop-filter: blur(14px);

border:1px solid rgba(255,255,255,0.08);

border-radius:10px;
padding:30px;

box-shadow:0 10px 40px rgba(0,0,0,0.35);

margin-bottom:25px;
}

.card h2{
margin-bottom:20px;
font-size:16px;
letter-spacing:1px;
text-transform:uppercase;
}

.card h3{
margin-bottom:20px;
letter-spacing:1px;
font-size:14px;
opacity:0.7;
}

.form-row{
display:flex;
justify-content:space-between;
margin-bottom:12px;
}

.form-row input{
width:180px;
padding:6px;
border-radius:4px;
border:none;
background:rgba(255,255,255,0.1);
color:white;
}

.calc-row{
display:flex;
justify-content:space-between;
padding:10px 0;
border-bottom:1px solid rgba(255,255,255,0.08);
font-size:15px;
}

.calc-card{
padding:30px;
border-radius:12px;
background:rgba(20,20,30,0.6);
backdrop-filter:blur(8px);
}

.calc-card h3{
font-size:18px;
margin-bottom:20px;
letter-spacing:1px;
}



.calc-row{
display:flex;
justify-content:space-between;
align-items:center;
padding:10px 0;
border-bottom:1px solid rgba(255,255,255,0.08);
font-size:20px;
}

.calc-row:last-child{
margin-bottom:0;
}

.calc-row span:last-child{
font-weight:600;
font-size:20px;
}

.calc-row.highlight{
margin-top:12px;
padding-top:14px;
border-top:1px solid rgba(255,255,255,0.15);
}

.calc-title{
font-size:18px;
font-weight:600;
margin-bottom:20px;
letter-spacing:1px;
}

.benef{
color:#5cff9f;
font-weight:bold;
}

.marge{
font-weight:bold;
}

.projects-table tr:hover{
background: rgba(255,255,255,0.05);
}

.info-grid{
display:flex;
flex-direction:column;
gap:12px;
margin-top:15px;
}

.info-row{
display:flex;
align-items:center;
gap:40px;
margin-bottom:12px;
}

.info-label{
width:120px;
opacity:0.6;
}

.info-value{
font-weight:600;
}
.budget-box{
margin-top:15px;
display:flex;
flex-direction:column;
gap:12px;
}

.budget-row{
display:flex;
align-items:center;
gap:40px;
padding:10px 0;
}

.budget-row span:first-child{
width:120px;
opacity:0.6;
}

.budget-row span:last-child{
font-size:18px;
font-weight:600;
}

.marge-vert{
color:#3cff88;
font-weight:600;
}

.marge-orange{
color:#ffb347;
font-weight:600;
}

.marge-rouge{
color:#ff5c5c;
font-weight:600;
}

/* supprimer flèches input number */

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}

input[type=number] {
-moz-appearance: textfield;
}

/* ============================= */
/* TABLEAU ÉQUIPE ARTIFICIERS */
/* ============================= */

.team-card{
margin-top:40px;
}

.team-table{
width:100%;
border-collapse:collapse;
margin-top:10px;
}

.team-table th{
text-align:left;
padding:14px 0;
font-size:13px;
letter-spacing:1px;
color:rgba(255,255,255,0.65);
border-bottom:1px solid rgba(255,255,255,0.12);
}

.team-table td{
padding:12px 0;
border-bottom:1px solid rgba(255,255,255,0.06);
position:relative;
}


/* ============================= */
/* SELECT MODERN */
/* ============================= */

.team-table select{

background:rgba(255,255,255,0.06);

border:1px solid rgba(255,255,255,0.15);

color:white;

padding:6px 30px 6px 12px;

border-radius:6px;

font-size:13px;

outline:none;

cursor:pointer;

transition:all 0.2s ease;

appearance:none;
-webkit-appearance:none;
-moz-appearance:none;

min-width:120px;

}


.team-table select:hover{
border-color:rgba(255,255,255,0.35);
background:rgba(255,255,255,0.09);
}

.team-table select:focus{
border-color:#ff2c70;
box-shadow:0 0 0 2px rgba(255,44,112,0.25);
}


/* flèche custom */

.team-table select{

background:rgba(255,255,255,0.06);
border:1px solid rgba(255,255,255,0.15);

color:white;

padding:6px 12px;

border-radius:6px;

font-size:16px;

outline:none;

cursor:pointer;

transition:all 0.2s ease;

}


/* colonnes résultats */

.team-table .qualification,
.team-table .cout-client,
.team-table .salaire-net{

font-weight:500;

color:rgba(255,255,255,0.9);

}

.project-actions{
display:flex;
justify-content:flex-end;
margin-bottom:20px;
}




.project-save-btn{

padding:14px 28px;

font-size:18px;

font-weight:500;

letter-spacing:0.3px;

color:white;

border-radius:14px;

background:rgba(255,255,255,0.08);

border:1px solid rgba(255,255,255,0.15);

backdrop-filter:blur(12px);

cursor:pointer;

transition:all 0.25s ease;

box-shadow:0 8px 30px rgba(0,0,0,0.3);

}

.project-save-btn:hover{

background:rgba(255,255,255,0.18);

border:1px solid rgba(255,255,255,0.35);

transform:translateY(-2px);

}

/* ========================= */
/* SAVE PROJECT */
/* ========================= */

/* HEADER ACTIONS */

/* SAVE BAR */

.save-container{

display:flex;

justify-content:flex-end;

align-items:center;

gap:12px;

margin-bottom:20px;

}

/* MESSAGE */

.save-message{

font-size:14px;

color:#57ffa0;

font-weight:500;

opacity:0;

transition:opacity 0.25s ease;

white-space:nowrap;

}

.save-message.visible{
opacity:1;
}

/* POPUP SAVE */

.save-popup{

position:fixed;

top:40px;
left:50%;

transform:translateX(-50%) scale(0.9);

padding:16px 28px;

background:rgba(20,30,40,0.55);

border:1px solid rgba(255,255,255,0.2);

border-radius:14px;

backdrop-filter:blur(14px);

-webkit-backdrop-filter:blur(14px);

color:#67ffb0;

font-size:15px;

font-weight:500;

letter-spacing:0.3px;

opacity:0;

transition:all 0.35s ease;

z-index:9999;

box-shadow:0 15px 40px rgba(0,0,0,0.45);

}

/* état visible */

.save-popup.show{

opacity:1;

transform:translateX(-50%) scale(1);

}

.save-popup.save-popup-error{
color:#fecaca;
border-color:rgba(248,113,113,0.45);
background:rgba(60,20,28,0.88);
}

#projects-list tr {
cursor: pointer;
}

#projects-list td[contenteditable="true"] {
cursor: text;
}

.delete-btn{
background:rgba(255,60,60,0.15);
border:1px solid rgba(255,60,60,0.4);
}

.delete-btn:hover{
background:rgba(255,60,60,0.25);
}

.projects-header{
display:flex;
justify-content:flex-end;
margin-bottom:20px;
}

.projects-actions{
display:flex;
gap:10px;
align-items:center;
}

.project-btn{

padding:10px 18px;

font-size:14px;

color:white;

border-radius:10px;

background:rgba(255,255,255,0.1);

border:1px solid rgba(255,255,255,0.2);

cursor:pointer;

backdrop-filter:blur(10px);

transition:all 0.2s ease;

margin-top: 20px;
display: inline-block;

}

.project-btn:hover{

background:rgba(255,255,255,0.2);

transform:translateY(-1px);

}

.delete-btn{

background:rgba(255,60,60,0.15);
border:1px solid rgba(255,60,60,0.4);

}

.delete-btn:hover{

background:rgba(255,60,60,0.25);

}

#projects-list tr{
cursor:pointer;
}

#projects-list td[contenteditable="true"]{
cursor:text;
background:rgba(255,255,255,0.05);
border-radius:6px;
}

/* ============================= */
/* CHAMPS MODE EDITION PROJETS */
/* ============================= */

.projects-table input,
.projects-table select{

font-family: inherit;
font-size:15px;
font-weight:500;

color:white;

background:rgba(255,255,255,0.06);
border:1px solid rgba(255,255,255,0.15);

padding:6px 10px;

border-radius:6px;

outline:none;

transition:all 0.2s ease;

backdrop-filter:blur(6px);

}

/* HOVER */

.projects-table input:hover,
.projects-table select:hover{

border-color:rgba(255,255,255,0.35);
background:rgba(255,255,255,0.09);

}

/* FOCUS */

.projects-table input:focus,
.projects-table select:focus{

border-color:#ff2c70;
box-shadow:0 0 0 2px rgba(255,44,112,0.25);

}

/* DATE */

.projects-table input[type="date"]{

color:white;
letter-spacing:0.3px;

}

/* BUDGET */

.edit-budget{

width:110px;
text-align:right;

}

/* STATUT */

.edit-status{

min-width:140px;
appearance:none;
-webkit-appearance:none;
-moz-appearance:none;

}

/* CELLS EDITABLES */

td[contenteditable="true"]{

font-family:inherit;
font-size:15px;
font-weight:500;

background:rgba(255,255,255,0.05);

border-radius:6px;

padding:6px 10px;

}

/* ============================= */
/* CHAMPS EDITION PROJETS */
/* ============================= */

.projects-table input,
.projects-table select{

font-family: inherit;

font-size:16px;
font-weight:500;

color:white;

background:rgba(255,255,255,0.06);

border:1px solid rgba(255,255,255,0.15);

padding:10px 14px;

border-radius:8px;

outline:none;

transition:all 0.2s ease;

backdrop-filter:blur(6px);

}

/* HOVER */

.projects-table input:hover,
.projects-table select:hover{

border-color:rgba(255,255,255,0.35);
background:rgba(255,255,255,0.09);

}

/* FOCUS */

.projects-table input:focus,
.projects-table select:focus{

border-color:#ff2c70;

box-shadow:0 0 0 2px rgba(255,44,112,0.25);

}

/* DATE */

.projects-table input[type="date"]{

font-size:16px;
text-align:center;

}

/* STATUT */

.edit-status{

font-size:16px;

min-width:160px;

text-align:center;

appearance:none;
-webkit-appearance:none;
-moz-appearance:none;

}

/* BUDGET */

.edit-budget{

width:120px;

font-size:16px;

text-align:center;

}

/* CENTRAGE COLONNES */

.projects-table td:nth-child(6){
text-align:center;
}

.projects-table td:nth-child(7){
text-align:center;
}

/* CELLS EDITABLES */

td[contenteditable="true"]{

font-family:inherit;

font-size:16px;
font-weight:500;

background:rgba(255,255,255,0.05);

border-radius:8px;

padding:10px 14px;

}

.btn-back{

margin-right:10px;

}

.project-actions{

position:absolute;

top:30px;
right:40px;

display:flex;

gap:12px;

}

/* SELECT STYLE GLASS */

select{

appearance:none;
-webkit-appearance:none;
-moz-appearance:none;

background: rgba(255,255,255,0.06);
border:1px solid rgba(255,255,255,0.15);

color:#fff;

padding:10px 14px;

border-radius:10px;

backdrop-filter:blur(10px);

font-size:14px;

cursor:pointer;

}

/* options */

select option{

background:#0f172a;
color:white;

}.dropdown{

position:relative;
width:140px;

}

.dropdown-btn{

background:rgba(255,255,255,0.08);
border:1px solid rgba(255,255,255,0.15);
backdrop-filter:blur(12px);

color:white;

padding:8px 14px;

border-radius:10px;

cursor:pointer;

font-size:14px;

}

.dropdown-menu{

position:absolute;
top:110%;
left:0;

width:100%;

background:rgba(15,23,42,0.85);
backdrop-filter:blur(14px);

border:1px solid rgba(255,255,255,0.15);

border-radius:12px;

overflow:hidden;

display:none;

z-index:1000;

}

.dropdown-menu div{

padding:10px 14px;
cursor:pointer;

}

.dropdown-menu div:hover{

background:rgba(255,255,255,0.08);

}

.dropdown.open .dropdown-menu{
display:block;
}

/* ============================= */
/* SELECT GLASS MODERN */
/* ============================= */

.projects-table select,
.modal select{

appearance:none;
-webkit-appearance:none;
-moz-appearance:none;

background:rgba(20,25,40,0.75);

border:1px solid rgba(255,255,255,0.2);

color:white;

padding:10px 14px;

border-radius:10px;

backdrop-filter:blur(10px);

font-size:15px;

cursor:pointer;

}

/* options */

.projects-table select option,
.modal select option{

background:#0f172a;
color:white;

}

/* hover */

.projects-table select:hover,
.modal select:hover{

background:rgba(255,255,255,0.1);

border-color:rgba(255,255,255,0.4);

}

.summary-item{
cursor:pointer;
transition:all 0.2s ease;
}

.summary-item:hover{
transform:translateY(-2px);
background:rgba(255,255,255,0.1);
}

.summary-item.active{

background:rgba(255,255,255,0.15);
border:1px solid rgba(255,255,255,0.4);

}

.status-icon{
width:24px;
text-align:center;
}

.status-dot{

display:inline-block;

width:15px;
height:15px;

border-radius:50%;

}

.status-dot.accepted{
background:#27d17f;
}

.status-dot.refused{
background:#ff4c4c;
}

.status-dot.cancelled{
background:#fb923c;
}

.status-dot.encours{
background:#eb0565;
}

.status-dot.neutral{
background:rgba(255,255,255,0.4);
}
/* couleur lignes projets */


.status-accepted{
background:rgba(0,255,140,0.06);
}

.status-refused{
background:rgba(255,70,70,0.06);
}

.status-cancelled{
background:rgba(251,146,60,0.08);
}

.status-progress{
background:rgba(0,150,255,0.06);
}

.status-todo{
background:rgba(255,255,255,0.03);
}

.notes-editable{

min-height:160px;

padding:10px;

outline:none;

color:white;

font-size:15px;

line-height:1.6;

opacity:0.9;

}

/* texte placeholder */

.notes-editable:empty:before{
content:attr(placeholder);
opacity:0.4;
}

.form-row{

display:flex;
align-items:center;
gap:12px;

}

.form-row label{
white-space:nowrap;
opacity:0.7;
}

.form-row .dots{

flex:1;

border-bottom:1px dotted rgba(255,255,255,0.25);

margin:0 8px;

}

/* ===== COLONNE DROITE DOCUMENTS ===== */

.documents-card{

width:380px;          /* plus large */
min-height:520px;     /* plus haut */

display:flex;
flex-direction:column;

gap:8px;

}

/* lignes documents */

.doc-row{

display:flex;
justify-content:space-between;
align-items:center;

padding:12px 0;

border-bottom:1px solid rgba(255,255,255,0.05);

}

.doc-actions{

display:flex;
gap:8px;

}

.doc-actions button{

background:rgba(255,255,255,0.06);
border:none;

color:white;

padding:6px 12px;

border-radius:6px;

cursor:pointer;

transition:0.2s;

}

.doc-actions button:hover{

background:rgba(255,255,255,0.18);

}


/* responsive */

@media (max-width:1200px){

.documents-card{
width:100%;
margin-top:20px;
}

}

/* modal fond */

.doc-modal{

position:fixed;

top:0;
left:0;

width:100%;
height:100%;

background:rgba(0,0,0,0.85);

display:none;

justify-content:center;
align-items:center;

z-index:999;

}

/* contenu */

.doc-modal-content{

width:80%;
height:85%;

background:#0c0f18;

border-radius:10px;

position:relative;

overflow:hidden;

}

/* viewer */

#docViewer{

width:100%;
height:100%;

border:none;

}

/* bouton fermer */

.doc-close{

position:absolute;

top:10px;
right:10px;

background:rgba(255,255,255,0.1);

border:none;

color:white;

font-size:18px;

width:35px;
height:35px;

border-radius:6px;

cursor:pointer;

}

.doc-item{
margin-bottom:25px;
padding-bottom:20px;
border-bottom:1px solid rgba(255,255,255,0.05);
}

.doc-label{
font-size:14px;
font-weight:500;
margin-bottom:8px;
}

.doc-content{
display:flex;
justify-content:space-between;
align-items:center;
gap:15px;
}

.doc-name{
font-size:13px;
color:#bfc6d1;
}

.doc-name.empty{
opacity:0.6;
}

/* BOUTONS DOCUMENTS */

.doc-buttons button{

background: linear-gradient(
145deg,
rgba(255,255,255,0.08),
rgba(255,255,255,0.03)
);

border:1px solid rgba(255,255,255,0.08);

color:white;

padding:8px 16px;

border-radius:8px;

font-size:13px;

cursor:pointer;

transition:all 0.2s ease;

backdrop-filter:blur(10px);

margin-top:15px; /* espace vertical */

}


/* HOVER */

.doc-buttons button:hover{

background:linear-gradient(
145deg,
rgba(255,255,255,0.18),
rgba(255,255,255,0.06)
);

transform:translateY(-1px);

}


/* BOUTON AJOUTER */

.doc-buttons button:first-child{

background:linear-gradient(
145deg,
rgba(0,120,255,0.25),
rgba(0,120,255,0.10)
);

border:1px solid rgba(0,120,255,0.35);

}


/* BOUTON AFFICHER */

.doc-buttons button:last-child{

background:linear-gradient(
145deg,
rgba(255,255,255,0.10),
rgba(255,255,255,0.04)
);

}



.info-base{
display:flex;
justify-content:space-between;
align-items:center;
}

.photo-container{
width:120px;
height:120px;
display:flex;
align-items:center;
justify-content:center;
margin-right:30px;   /* espace à droite */

}

#photoPreview{
width:180px;
height:180px;

object-fit:cover;

border-radius:12px;

border:1px solid rgba(255,255,255,0.15);

box-shadow:0 10px 25px rgba(0,0,0,0.45);

transition:all 0.25s ease;

cursor:pointer;
}

#photoPreview:hover{

transform:scale(1.05);

box-shadow:
0 15px 35px rgba(0,0,0,0.6),
0 0 12px rgba(255,255,255,0.15);

}

.artificiers-stats{

display:flex;
gap:10px;

align-items:center;

margin-right:50px;

}
.stat-card{

padding:12px 18px;

border-radius:10px;

background:rgba(255,255,255,0.04);

border:1px solid rgba(255,255,255,0.08);

font-size:14px;

}

.artificiers-table tbody tr{

cursor:pointer;
transition:all 0.2s ease;

}

.artificiers-table tbody tr:hover{

background:rgba(255,255,255,0.05);
transform:translateY(-1px);

}

.artificier-select,
.statut-select{
width: 95%;
min-width: 180px;
padding: 6px 10px;
border-radius: 6px;
}

.settings-modal{
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
background:rgba(0,0,0,0.6);
display:none;
z-index:9999;
}

.settings-modal.open{
display:flex;
justify-content:center;
align-items:center;
}

.settings-container{
width:1100px;
height:700px;
background:#1f2430;
border-radius:12px;
display:flex;
overflow:hidden;
}

.settings-sidebar{
width:220px;
background:#161a22;
padding:20px;
}

.settings-sidebar ul{
list-style:none;
padding:0;
}

.settings-sidebar li{
padding:10px;
cursor:pointer;
border-radius:6px;
}

.settings-sidebar li:hover{
background:rgba(255,255,255,0.08);
}

.settings-content{
flex:1;
padding:30px;
overflow:auto;
}

.settings-tab{
display:none;
}

.settings-tab.active{
display:block;
}

.close-settings{
position:absolute;
top:20px;
right:20px;
}

.statut-select,
.artificier-select{
cursor: pointer;
}

select option {
background: #0f172a;
color: white;
}
select option:hover {
background: #1e293b;
}
select{
background:#0f172a;
color:white;
border:1px solid rgba(255,255,255,0.1);
padding:6px 10px;
border-radius:6px;
cursor:pointer;
}

.statut-dropdown{
position:relative;
width:80%;
cursor:pointer;
}

.statut-selected{
background:#1e293b;
padding:8px;
border-radius:6px;
border:1px solid rgba(255,255,255,0.1);
}

.statut-menu{
position:absolute;
top:100%;
left:0;
right:0;
background:#0f172a;
border-radius:6px;
border:1px solid rgba(255,255,255,0.1);
display:none;
z-index:10;
}

.statut-option{
padding:8px;
cursor:pointer;
}

.statut-option:hover{
background:#1e293b;
}

.artificier-dropdown{
position:relative;
width:80%;
cursor:pointer;
z-index:100;
}

.artificier-selected{
background:#1e293b;
padding:8px;
border-radius:6px;
border:1px solid rgba(255,255,255,0.1);
}

.artificier-menu{
position:absolute;
top:100%;
left:0;
right:0;
background:#0f172a;
border-radius:6px;
border:1px solid rgba(255,255,255,0.1);
display:none;
z-index:999;
}

.artificier-option{
padding:8px;
cursor:pointer;
}

.artificier-option:hover{
background:#1e293b;
}

.cerfa-actions{
    display:flex;
    justify-content:flex-end;
    margin-top:20px;
}

.cerfa-inline-row{
display:flex;
gap:150px;
align-items:flex-start;
}

.cerfa-inline-block{
min-width:220px;
}

.checkbox-inline {
display: flex;
gap: 20px;
align-items: center;
}

table input {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  padding: 6px 8px;
  border-radius: 6px;
  width: 100%;
}

.graph-container {
margin-top: 30px;
padding: 25px;
border-radius: 20px;
background: rgba(255,255,255,0.03);
backdrop-filter: blur(10px);
border: 1px solid rgba(255,255,255,0.05);
height: 400px; /* 👈 ici seulement */
}

.graphs-row {
display: flex;
gap: 20px;
margin-top: 30px;
}

.graph-box {
flex: 1;
height: 580px; /* même taille pour tous */
padding: 20px;
border-radius: 20px;
background: rgba(255,255,255,0.03);
border: 1px solid rgba(255,255,255,0.05);
display: flex;
flex-direction: column;
}

.graph-box canvas {
display: block;
}

.chart-wrapper {
flex: 1;
position: relative;
}




/* TOP LINE */
.card-top {
display: flex;
justify-content: space-between;
align-items: center;
}

/* TREND */
.trend {
font-size: 12px;
padding: 3px 8px;
border-radius: 8px;
}

.trend.up {
background: rgba(46, 204, 113, 0.15);
color: #2ecc71;
}

.trend.down {
background: rgba(231, 76, 60, 0.15);
color: #e74c3c;
}

/* VALUE */
.card p {
font-size: 16px;
font-weight: 600;
margin: 10px 0;
}

/* PROGRESS BAR */
.progress-bar {
height: 6px;
background: rgba(255,255,255,0.05);
border-radius: 10px;
overflow: hidden;
}

.progress-fill {
height: 100%;
background: linear-gradient(90deg, #4dabf7, #2ecc71);
border-radius: 10px;
}

#cityResults{
position: absolute;
background: #1e1e2f;
width: 100%;
border-radius: 8px;
margin-top: 5px;
z-index: 999;
max-height: 200px;
overflow-y: auto;
}

.dropdown-item{
padding: 10px;
cursor: pointer;
}

.dropdown-item:hover{
background: #2a2a40;
}

/* =======================
   CHECKBOX PROPRE
======================= */

.custom-checkbox {
  appearance: none;
  -webkit-appearance: none;

  width: 18px;
  height: 18px;

  border-radius: 6px;
  border: 2px solid rgba(255,255,255,0.25);

  background: rgba(255,255,255,0.05);
  cursor: pointer;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  transition: all 0.2s ease;
}

/* hover */
.custom-checkbox:hover {
  border-color: #ff2e63;
}

/* checked */
.custom-checkbox:checked {
  background: linear-gradient(135deg, #ff2e63, #ff4d7a);
  border-color: transparent;
}

/* CHECK ICON PROPRE */
.custom-checkbox:checked::after {
  content: "✓";
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.edit-text {
  width: 100%;
  max-width: 180px;
  box-sizing: border-box;
}

/* =======================
   FIX INPUT DATE
======================= */

.edit-date {
  width: 340px;
  max-width: 100%;
  box-sizing: border-box;

  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;

  color: white;
  padding: 6px 8px;

  font-size: 13px;
}

/* enlève le style natif moche */
.edit-date::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.7;
  cursor: pointer;
}

/* =========================
ROWS CLIQUABLES
========================= */

tr {
  transition: all 0.2s ease;
}

tr:hover {
  cursor: pointer;
  background: rgba(255,255,255,0.05);
  transform: scale(1.002);
}

/* effet plus visible */
tr:hover td {
  color: #fff;
}

.client-side-card{
  margin-top:25px;
  padding:20px;
  border-radius:12px;
  background:rgba(255,255,255,0.03);
  border:1px solid rgba(255,255,255,0.05);
}

.client-side-card h3{
  font-size:16px;
  font-weight:500;
  color:#fff;
}

.client-side-card button{
  width:28px;
  height:28px;
  border-radius:6px;
  border:none;
  background:rgba(255,255,255,0.1);
  color:#fff;
  cursor:pointer;
  transition:0.2s;
}

.client-side-card button:hover{
  background:#ff2e6e;
}

#contactBlock{
  margin-top:15px;
  display:flex;
  flex-direction:column;
  gap:8px;
}

#contactName{
  font-size:15px;
  font-weight:600;
  color:#fff;
}

.contact-line{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:13px;
  color:rgba(255,255,255,0.7);
}

.contact-note{
  margin-top:10px;
  padding:10px;
  border-radius:8px;
  background:rgba(255,255,255,0.04);
  font-size:13px;
  color:rgba(255,255,255,0.7);
}

.modal-content{
  position:relative; /* IMPORTANT */
}

.modal-close{
  position:absolute;
  top:12px;
  right:15px;
  font-size:22px;
  color:rgba(255,255,255,0.6);
  cursor:pointer;
  transition:0.2s;
}

.modal-close:hover{
  color:#ff2e6e;
}

.modal{
  display:none;
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background:rgba(0,0,0,0.7);
  justify-content:center;
  align-items:center;
  z-index:1000;
}

.modal.active{
  display:flex;
}

.modal-content{
  position:relative;
  background:#111;
  padding:20px;
  border-radius:10px;
  width:350px;
}

.contact-card{
  margin-top:20px;
  padding:22px;
  border-radius:16px;
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.08);
}

.contact-top{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.contact-badge-line{
  display:flex;
  justify-content:flex-end;
}

.contact-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:18px;
  font-size:13px;
  opacity:0.6;
}

.contact-btn{
  padding:10px 18px;              /* 🔥 plus gros */
  border-radius:10px;

  background:rgba(255,255,255,0.08);  /* 🔥 style comme tes autres boutons */
  border:1px solid rgba(255,255,255,0.15);

  color:white;
  font-size:13px;
  font-weight:500;

  cursor:pointer;

  backdrop-filter:blur(10px);

  transition:all 0.25s ease;
}

.contact-btn:hover{
  background:rgba(255,255,255,0.18);
  border:1px solid rgba(255,255,255,0.35);

  transform:translateY(-1px);
}
.contact-body{
  display:flex;
  flex-direction:column;
  gap:18px;
}

/* NOM + BADGE */

.contact-name{
  font-size:22px;
  font-weight:600;
  margin-bottom:6px;
}

.contact-top{
  display:flex;
  flex-direction:column;
  gap:6px;
}


/* GRID INFOS */

.contact-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}

.contact-box{
  padding:14px;
  border-radius:12px;
  background:rgba(255,255,255,0.03);
  border:1px solid rgba(255,255,255,0.05);
}

.contact-box span{
  font-size:11px;
  opacity:0.5;
}

.contact-box strong{
  display:block;
  margin-top:4px;
  font-size:15px;
}

/* NOTE */

.contact-note{
  margin-top:6px;
  padding:14px;
  border-radius:12px;
  background:rgba(255,255,255,0.05);
  font-size:13px;
  opacity:0.8;
}

.badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  padding:8px 16px;        /* 🔥 plus gros */
  border-radius:999px;

  font-size:13px;          /* 🔥 plus lisible */
  font-weight:600;

  background:linear-gradient(135deg,#ff2e6e,#ff4d8a); /* 🔥 dégradé premium */

  white-space:nowrap;
  width:auto;

  box-shadow:0 4px 12px rgba(255,46,110,0.35); /* 🔥 petit glow */
}

.status-badge{
  font-size:11px;
  padding:4px 10px;
  border-radius:999px;
  background:rgba(255,255,255,0.1);
  color:#fff;
}

.contact-title-line{
  display:flex;
  align-items:center;
  gap:12px;
}

.pdf-viewer-modal{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.65);
  z-index:9999;
  align-items:center;
  justify-content:center;
}

.pdf-viewer-box{
  width:90%;
  height:90%;
  background:#111827;
  border:1px solid rgba(255,255,255,0.08);
  border-radius:16px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  box-shadow:0 20px 60px rgba(0,0,0,0.4);
}

.pdf-viewer-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 18px;
  border-bottom:1px solid rgba(255,255,255,0.08);
  color:#fff;
}

.pdf-viewer-frame{
  width:100%;
  height:100%;
  border:none;
  background:#fff;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.input-group label {
  font-size: 14px;
  font-weight: 600;
  color: #e5e7eb;
}

.dark-input {
  width: 220px;
  height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  outline: none;
  transition: 0.2s ease;
}

.dark-input:focus {
  border-color: rgba(236, 72, 153, 0.45);
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.12);
}

.dark-input::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.75;
  cursor: pointer;
}

/* ===== Mobile : menu hamburger (body.nav-mobile + js/mobile-nav.js) ===== */
body.nav-mobile {
  -webkit-tap-highlight-color: transparent;
}

:root {
  --nav-topbar-height: 88px;
}

@media (max-width: 980px) {
  :root {
    --nav-topbar-height: 80px;
  }
}

.nav-hamburger {
  display: none;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  cursor: pointer;
  flex: 0 0 auto;
  order: 1;
  z-index: 2;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.nav-hamburger:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(236, 72, 153, 0.45);
}

.nav-hamburger:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.35);
}

.nav-hamburger-icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 20px;
}

.nav-hamburger-icon span {
  display: block;
  height: 2px;
  background: #f8fafc;
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

body.nav-drawer-open .nav-hamburger-icon span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.nav-drawer-open .nav-hamburger-icon span:nth-child(2) {
  opacity: 0;
}

body.nav-drawer-open .nav-hamburger-icon span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-drawer-backdrop {
  display: none;
  position: fixed;
  top: var(--nav-topbar-height);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 125;
  background: rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

body.nav-mobile.nav-drawer-open .nav-drawer-backdrop {
  display: block;
  /* Au-dessus de la barre du haut (130) mais sous le panneau liens */
  z-index: 138 !important;
}

body.nav-mobile .sidebar {
  overflow: visible !important;
  /* Réserve à droite pour notif + profil (~3×52px + écarts), sans chevaucher logo / hamburger */
  padding: 0 max(200px, calc(12px + env(safe-area-inset-right, 0px))) 0 max(12px, env(safe-area-inset-left, 0px)) !important;
  max-height: none !important;
}

/* Barre logo + hamburger au-dessus du voile quand le tiroir est ouvert */
body.nav-mobile.nav-drawer-open .sidebar {
  z-index: 141 !important;
}

/* Icônes notif / profil sous le panneau menu (évite tout chevauchement visuel) */
body.nav-mobile.nav-drawer-open .top-user-actions {
  z-index: 128 !important;
}

body.nav-mobile:not(.nav-drawer-open) #sidebarMenu {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body.nav-mobile.nav-drawer-open #sidebarMenu {
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

body.nav-mobile .nav-hamburger {
  display: inline-flex !important;
}

body.nav-mobile.nav-drawer-open #sidebarMenu {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  position: fixed !important;
  top: var(--nav-topbar-height) !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  /* Au-dessus de .top-user-actions (131) pour ne pas être masqué par les notif / profil */
  z-index: 140 !important;
  margin: 0 !important;
  padding: 12px 14px max(28px, calc(env(safe-area-inset-bottom, 0px) + 20px)) !important;
  gap: 6px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  list-style: none !important;
  background: linear-gradient(
    180deg,
    rgba(8, 12, 26, 0.99) 0%,
    rgba(15, 23, 42, 0.98) 45%,
    rgba(17, 24, 39, 0.97) 100%
  ) !important;
  border-bottom: 1px solid rgba(30, 58, 138, 0.26) !important;
  box-shadow:
    inset 0 1px 0 rgba(148, 163, 184, 0.06),
    0 -20px 48px rgba(2, 6, 23, 0.35) !important;
}

/* Tiroir plein écran : afficher les titres de section (liste verticale) */
body.nav-mobile.nav-drawer-open #sidebarMenu .sidebar-nav__section-heading{
  display:block !important;
  padding:14px 4px 6px !important;
  margin:0 !important;
  width:100% !important;
  height:auto !important;
  position:static !important;
  overflow:visible !important;
}

body.nav-mobile.nav-drawer-open #sidebarMenu .sidebar-nav__section-title{
  font-size:11px;
  font-weight:600;
  letter-spacing:0.06em;
  text-transform:uppercase;
  color:rgba(148,163,184,0.9);
}

body.nav-mobile.nav-drawer-open #sidebarMenu .menu-item,
body.nav-mobile.nav-drawer-open #sidebarMenu > li {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  animation: none !important;
}

/* Liste détachée dans body : hors .sidebar, les liens reprenaient le style navigateur (bleu). */
body.nav-mobile.nav-drawer-open #sidebarMenu .menu-item > a,
body.nav-mobile.nav-drawer-open #sidebarMenu > li.menu-item > a,
body.nav-mobile.nav-drawer-open #sidebarMenu > li:not(.sidebar-nav__section-heading) > a {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  border-radius: 14px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex-wrap: nowrap !important;
  gap: 12px !important;
  min-height: 48px !important;
  padding: 12px 14px !important;
  margin: 0 !important;
  text-decoration: none !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  letter-spacing: 0.01em !important;
  color: rgba(248, 250, 252, 0.96) !important;
  -webkit-tap-highlight-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset !important;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease !important;
}

body.nav-mobile.nav-drawer-open #sidebarMenu .menu-item > a:visited,
body.nav-mobile.nav-drawer-open #sidebarMenu > li.menu-item > a:visited,
body.nav-mobile.nav-drawer-open #sidebarMenu > li:not(.sidebar-nav__section-heading) > a:visited {
  color: rgba(248, 250, 252, 0.96) !important;
}

body.nav-mobile.nav-drawer-open #sidebarMenu .menu-item > a:hover,
body.nav-mobile.nav-drawer-open #sidebarMenu > li.menu-item > a:hover,
body.nav-mobile.nav-drawer-open #sidebarMenu > li:not(.sidebar-nav__section-heading) > a:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
}

body.nav-mobile.nav-drawer-open #sidebarMenu .menu-item > a:active,
body.nav-mobile.nav-drawer-open #sidebarMenu > li.menu-item > a:active,
body.nav-mobile.nav-drawer-open #sidebarMenu > li:not(.sidebar-nav__section-heading) > a:active {
  background: rgba(236, 72, 153, 0.12) !important;
}

body.nav-mobile.nav-drawer-open #sidebarMenu .menu-item.active > a,
body.nav-mobile.nav-drawer-open #sidebarMenu > li.menu-item.active > a,
body.nav-mobile.nav-drawer-open #sidebarMenu > li.active > a {
  color: #fff !important;
  font-weight: 600 !important;
  background: linear-gradient(
    135deg,
    rgba(236, 72, 153, 0.2) 0%,
    rgba(139, 92, 246, 0.14) 100%
  ) !important;
  border-color: rgba(236, 72, 153, 0.35) !important;
  box-shadow:
    inset 0 0 0 1px rgba(236, 72, 153, 0.12),
    inset 3px 0 0 #ec4899 !important;
}

body.nav-mobile.nav-drawer-open #sidebarMenu .menu-item > a:focus-visible,
body.nav-mobile.nav-drawer-open #sidebarMenu > li.menu-item > a:focus-visible {
  outline: 2px solid rgba(236, 72, 153, 0.55) !important;
  outline-offset: 2px !important;
}

body.nav-mobile.nav-drawer-open #sidebarMenu .menu-item > a span,
body.nav-mobile.nav-drawer-open #sidebarMenu > li.menu-item > a span {
  color: inherit !important;
}

body.nav-mobile.nav-drawer-open #sidebarMenu .menu-item > a .pending-badge,
body.nav-mobile.nav-drawer-open #sidebarMenu > li.menu-item > a .pending-badge {
  margin-left: auto !important;
  flex-shrink: 0 !important;
  color: #fff !important;
}

@media (max-width: 860px) {
  body.nav-mobile .sidebar {
    min-height: var(--nav-topbar-height) !important;
    height: auto !important;
    border-radius: 0 0 18px 18px !important;
  }
}

/* Barre compte (z-index 131) au-dessus de la sidebar (130) : .app-top-bar-start
   capturait les clics sur toute la largeur (flex:1) → menu hamburger inutilisable. */
body.nav-mobile.has-top-profile-menu .top-user-actions {
  padding-left: calc(
    max(12px, env(safe-area-inset-left, 0px))
    + clamp(82px, 6vw + 60px, 120px)
    + 16px
    + 10px
    + 44px
    + 8px
  );
}

body.nav-mobile.has-top-profile-menu .app-top-bar-start {
  pointer-events: none;
}

body.nav-mobile.has-top-profile-menu .app-top-bar-start .app-top-page-head,
body.nav-mobile.has-top-profile-menu .app-top-bar-start .app-top-header-slot {
  pointer-events: auto;
}

@media (max-width: 520px) {
  body.nav-mobile.has-top-profile-menu .app-top-header-slot {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  body.nav-mobile.has-top-profile-menu .app-top-header-slot .action-btn {
    flex: 0 0 auto;
  }
}

/* Liens « nus » dans le contenu (sans attribut class) : éviter le bleu système sur fond sombre */
body.nav-mobile .main a[href]:not([class]) {
  color: rgba(224, 231, 255, 0.96);
  text-decoration: underline;
  text-decoration-color: rgba(129, 140, 248, 0.45);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

body.nav-mobile .main a[href]:not([class]):visited {
  color: rgba(211, 196, 253, 0.9);
}

body.nav-mobile .main a[href]:not([class]):hover {
  color: #fff;
  text-decoration-color: rgba(236, 72, 153, 0.55);
}

/* ==========================================================================
   APP RESPONSIVE LAYER — petits écrans, tablettes, débordements horizontaux
   ========================================================================== */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Échelle UI : les composants peuvent s’appuyer sur ces variables pour rester compacts sans empiler trop tôt */
  --app-ui-pad: clamp(10px, 0.9vw + 6px, 24px);
  --app-ui-gap: clamp(6px, 0.5vw + 4px, 14px);
  --app-ui-fs: clamp(12px, 0.22vw + 11px, 15px);
  --app-ui-fs-sm: clamp(11px, 0.18vw + 10px, 13px);
}

body {
  min-width: 0;
  max-width: 100vw;
  overflow-x: clip;
}

/* Contenu principal : padding fluide + pas de débordement */
body .main,
.main {
  min-width: 0;
  box-sizing: border-box;
  max-width: 100%;
}

@media (max-width: 900px) {
  body .main,
  .main {
    padding-left: clamp(12px, 4vw, 24px) !important;
    padding-right: clamp(12px, 4vw, 24px) !important;
  }
}

@media (max-width: 600px) {
  body .main,
  .main {
    padding-left: 12px !important;
    padding-right: 12px !important;
    padding-bottom: max(20px, env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* Grille dashboard (style.css) */
@media (max-width: 1200px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 640px) {
  .cards {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}

/* En-têtes de page : d’abord compacter (ligne + défilement), empiler seulement sur très petit écran */
@media (max-width: 900px) and (min-width: 641px) {
  .main .project-header,
  .projets-page .projets-topbar,
  .clients-page .clients-topbar,
  .facturation-page .project-header,
  .compte-page .project-header,
  .parametres-page .parametres-toolbar,
  .devis-page .project-header,
  .commandes-page .project-header,
  .dashboard-page .project-header {
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .project-header-actions,
  .projets-topbar-right,
  .clients-toolbar-actions,
  .dashboard-header-actions,
  .devis-header-actions,
  .compte-header-actions,
  .nf-topbar-actions,
  .commandes-page .project-header-actions {
    width: auto !important;
    flex: 0 0 auto !important;
    justify-content: flex-end !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
  }

  .project-header h1,
  .dashboard-page h1,
  .projets-page .projets-topbar h1,
  .clients-page .clients-topbar h1 {
    font-size: clamp(18px, 2.4vw + 10px, 28px) !important;
    line-height: 1.2 !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }
}

@media (max-width: 640px) {
  .main .project-header,
  .projets-page .projets-topbar,
  .clients-page .clients-topbar,
  .facturation-page .project-header,
  .compte-page .project-header,
  .parametres-page .parametres-toolbar,
  .devis-page .project-header,
  .commandes-page .project-header,
  .dashboard-page .project-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 14px !important;
  }

  .project-header-actions,
  .projets-topbar-right,
  .clients-toolbar-actions,
  .dashboard-header-actions,
  .devis-header-actions,
  .compte-header-actions,
  .nf-topbar-actions,
  .commandes-page .project-header-actions {
    width: 100% !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
  }

  .project-header h1,
  .dashboard-page h1 {
    font-size: clamp(22px, 6vw, 34px) !important;
    line-height: 1.15 !important;
  }
}

/* Grilles KPI courantes (projets, clients, etc.) */
@media (max-width: 1100px) {
  .projets-kpi-grid,
  .clients-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 600px) {
  .projets-kpi-grid,
  .clients-kpi-grid {
    grid-template-columns: 1fr !important;
  }

  .projets-topbar {
    flex-wrap: wrap !important;
  }

  .clients-topbar-left {
    min-width: 0 !important;
    width: 100% !important;
  }

  .filter-select-modern {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Dashboard : bandeau KPI + colonne droite */
@media (max-width: 1100px) {
  .dashboard-mid-band {
    grid-template-columns: 1fr !important;
  }

  .dashboard-kpis-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .dashboard-graphs-bottom .dashboard-graphs {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 600px) {
  .dashboard-kpis-wide {
    grid-template-columns: 1fr !important;
  }
}

/* Tableaux : défilement horizontal sans casser la page */
.main table,
.facturation-card table,
.documents-table,
.clients-table,
.projets-table,
.commandes-table,
.team-table-modern,
.db-page table {
  max-width: 100%;
}

.documents-table-wrap,
.table-responsive,
.clients-table-wrap,
.projets-table-wrap,
.commandes-table-shell {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Modales plein écran sur mobile */
@media (max-width: 600px) {
  .project-modal-overlay,
  .project-modal-card,
  .modern-modal-overlay {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  .project-modal-card {
    width: 100% !important;
    max-width: min(100%, 100vw - 16px) !important;
  }
}

/* Formulaires : champs pleine largeur */
@media (max-width: 600px) {
  .project-form-grid .form-group input,
  .project-form-grid .form-group select,
  .project-form-grid .form-group textarea,
  .clients-page input[type="text"],
  .clients-page input[type="search"] {
    max-width: 100%;
  }
}

/* Réduit les marges négatives sticky qui peuvent déborder */
@media (max-width: 900px) {
  .app-page-top-sticky {
    margin-left: clamp(-16px, -2vw, -40px) !important;
    margin-right: clamp(-16px, -2vw, -40px) !important;
    padding-left: clamp(12px, 3vw, 40px) !important;
    padding-right: clamp(12px, 3vw, 40px) !important;
  }
}

/* Très large : un peu plus d’air latéral (lecture confortable sur ultrawide / incurvé) */
@media (min-width: 2200px) {
  body:not(.nav-mobile) .main {
    padding-left: clamp(40px, 4vw, 88px);
    padding-right: clamp(40px, 4vw, 88px);
  }
}
