/* ===== Dashboard layout (sidebar + topbar) ===== */

.dash-layout{
    min-height: 100vh;
    display: flex;
    background: #F7F5FB;
}

/* Sidebar */

.dash-sidebar{
    width: 260px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #ECE6F4;
    display: flex;
    flex-direction: column;
    padding: 24px 18px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.dash-brand{
    display: block;
    padding: 4px 10px 24px;
}

.dash-brand img{
    height: 34px;
}

.dash-menu{
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dash-menu a{
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    color: #5C5372;
    font-size: 15px;
    font-weight: 500;
    transition: background .2s ease, color .2s ease;
}

.dash-menu a i{
    width: 20px;
    text-align: center;
    font-size: 16px;
    color: #A99FBF;
    transition: color .2s ease;
}

.dash-menu a:hover{
    background: #F6F0FD;
    color: #1A1332;
}

.dash-menu a.active{
    background: linear-gradient(98deg, #EC02A3 0%, #831CF8 100%);
    color: #fff;
}

.dash-menu a.active i{
    color: #fff;
}

.dash-sidebar-foot{
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid #F1ECF7;
}

.dash-sidebar-foot form{
    margin: 0;
}

.dash-logout-link{
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: none;
    background: transparent;
    border-radius: 12px;
    color: #B3034F;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
}

.dash-logout-link:hover{
    background: #FDECF3;
}

/* Shell (topbar + main) */

.dash-shell{
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.dash-topbar{
    position: sticky;
    top: 0;
    z-index: 5;
    background: #fff;
    border-bottom: 1px solid #ECE6F4;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px 28px;
}

.dash-burger{
    display: none;
    background: transparent;
    border: none;
    font-size: 20px;
    color: #1A1332;
    cursor: pointer;
}

.dash-search{
    display: flex;
    align-items: center;
    gap: 10px;
    background: #F4F1F9;
    border-radius: 100px;
    padding: 10px 18px;
    flex: 1;
    max-width: 420px;
}

.dash-search i{
    color: #A99FBF;
    font-size: 15px;
}

.dash-search input{
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    font-size: 14.5px;
    color: #1A1332;
}

.dash-userbox{
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 14px;
}

.dash-bell{
    background: #F4F1F9;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 100%;
    color: #5C5372;
    cursor: pointer;
    font-size: 16px;
}

.dash-avatar{
    width: 42px;
    height: 42px;
    border-radius: 100%;
    background: linear-gradient(135deg, #EC02A3, #831CF8);
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dash-userinfo{
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.dash-userinfo strong{
    color: #1A1332;
    font-size: 14.5px;
}

.dash-userinfo span{
    color: #9A90AE;
    font-size: 12.5px;
}

/* Main content */

.dash-main{
    padding: 30px 28px 50px;
}

.dash-page-head{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 26px;
}

.dash-page-head h1{
    color: #1A1332;
    font-size: 28px;
    font-weight: 700;
}

.dash-page-head p{
    color: #5C5372;
    font-size: 15px;
    margin-top: 6px;
}

.dash-page-head .plan-btn i{
    margin-right: 8px;
}

/* Stat cards */

.dash-stats{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 26px;
}

.dash-stat{
    background: #fff;
    border: 1px solid #ECE6F4;
    border-radius: 16px;
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.dash-stat-ic{
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.dash-stat-ic.doc{ background: #F1E9FE; color: #8B0EF0; }
.dash-stat-ic.site{ background: #FCE6F5; color: #EC02A3; }
.dash-stat-ic.proj{ background: #E9F0FE; color: #3B6FE0; }
.dash-stat-ic.plan{ background: #FFF2DC; color: #E0930B; }

.dash-stat-num{
    display: block;
    color: #1A1332;
    font-size: 24px;
    font-weight: 700;
}

.dash-stat-label{
    color: #5C5372;
    font-size: 13.5px;
}

/* Action cards */

.dash-actions{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.dash-card{
    background: #fff;
    border: 1px solid #ECE6F4;
    border-radius: 16px;
    padding: 26px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.dash-ic{
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: #F6F0FD;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dash-ic i{
    color: #8B0EF0;
    font-size: 22px;
}

.dash-card h3{
    color: #1A1332;
    font-size: 18px;
    font-weight: 700;
    margin-top: 16px;
}

.dash-card p{
    color: #5C5372;
    font-size: 14px;
    line-height: 1.6;
    margin: 10px 0 20px;
    flex-grow: 1;
}

/* Account */

.dash-account{
    background: #fff;
    border: 1px solid #ECE6F4;
    border-radius: 16px;
    padding: 28px;
    margin-top: 24px;
}

.dash-account h2{
    color: #1A1332;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 14px;
}

.dash-account-row{
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid #F1ECF7;
    color: #5C5372;
    font-size: 15px;
}

.dash-account-row:last-child{
    border-bottom: none;
}

.dash-account-row strong{
    color: #1A1332;
    font-weight: 600;
}

/* Responsive */

@media (max-width: 1024px){
    .dash-stats{ grid-template-columns: repeat(2, 1fr); }
    .dash-actions{ grid-template-columns: 1fr; }
}

@media (max-width: 820px){
    .dash-sidebar{
        position: fixed;
        z-index: 30;
        left: 0;
        top: 0;
        transform: translateX(-100%);
        transition: transform .25s ease;
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.12);
    }

    .dash-layout.is-open .dash-sidebar{
        transform: translateX(0);
    }

    .dash-burger{
        display: inline-flex;
    }

    .dash-userinfo{
        display: none;
    }
}

@media (max-width: 560px){
    .dash-stats{ grid-template-columns: 1fr; }
    .dash-search{ display: none; }
    .dash-main{ padding: 22px 16px 40px; }
}

/* ===== Document generation chat ===== */

.chat{
    max-width: 100%;
    background: #fff;
    border: 1px solid #ECE6F4;
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(131, 28, 248, 0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.chat-head{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 22px;
    border-bottom: 1px solid #F1ECF7;
}

.chat-bot{
    display: flex;
    align-items: center;
    gap: 14px;
}

.chat-bot-avatar{
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #EC02A3, #831CF8);
    color: #fff;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-bot-meta{
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-bot-meta strong{
    color: #1A1332;
    font-size: 18px;
    font-weight: 700;
}

.chat-status{
    background: linear-gradient(98deg, #EC02A3 0%, #831CF8 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 100px;
}

.chat-restart{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1.5px solid #F0DCEC;
    color: #ED01AB;
    font-size: 14px;
    font-weight: 500;
    padding: 9px 16px;
    border-radius: 100px;
    cursor: pointer;
}

.chat-restart:hover{
    border-color: #ED01AB;
}

.chat-body{
    padding: 24px 22px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-height: 460px;
    overflow-y: auto;
}

.chat-msg{
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.chat-avatar{
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 100%;
    background: #F1E3FB;
    color: #8B0EF0;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-bubble{
    background: #FBF1F8;
    border-radius: 4px 16px 16px 16px;
    padding: 14px 18px;
    max-width: 80%;
}

/* ROSAI (AI) replies: no background, plain streamed text */
.chat-msg:not(.user) .chat-bubble{
    background: transparent;
    padding: 2px 0;
    border-radius: 0;
    max-width: 92%;
}

.chat-msg:not(.user) .chat-bubble.chat-typing{
    padding: 8px 0;
}

.chat-bubble p{
    color: #3F3654;
    font-size: 14.5px;
    line-height: 1.6;
}

.chat-time{
    display: block;
    color: #B0A6C2;
    font-size: 12px;
    margin-top: 8px;
}

.chat-step{
    display: inline-block;
    background: #F0E4FB;
    color: #8B0EF0;
    font-size: 11.5px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 100px;
    margin-bottom: 8px;
}

/* User (right-aligned) messages */

.chat-msg.user{
    flex-direction: row-reverse;
}

.chat-msg.user .chat-bubble{
    background: linear-gradient(98deg, #EC02A3 0%, #831CF8 100%);
    border-radius: 16px 4px 16px 16px;
    margin-left: auto;
}

.chat-msg.user .chat-bubble p{
    color: #fff;
}

.chat-msg.user .chat-time{
    color: rgba(255, 255, 255, 0.8);
}

.chat-options{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 4px;
}

.chat-options button{
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1.5px solid #ECE2F8;
    border-radius: 12px;
    padding: 16px 18px;
    color: #1A1332;
    font-size: 14.5px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease, transform .15s ease;
}

.chat-options button i{
    color: #8B0EF0;
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.chat-options button:hover{
    border-color: #B98BE8;
    box-shadow: 0 8px 20px rgba(131, 28, 248, 0.08);
    transform: translateY(-2px);
}

.chat-hint{
    display: flex;
    align-items: center;
    gap: 8px;
    color: #9A90AE;
    font-size: 13.5px;
    margin-top: 6px;
}

.chat-hint i{
    color: #B14BFF;
}

.chat-input{
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 22px;
    border-top: 1px solid #F1ECF7;
}

.chat-input input{
    flex: 1;
    border: 1.5px solid #ECE2F8;
    border-radius: 100px;
    padding: 14px 20px;
    font-size: 14.5px;
    color: #1A1332;
    outline: none;
    transition: border-color .2s ease;
}

.chat-input input:focus{
    border-color: #8B0EF0;
}

.chat-input button{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(98deg, #EC02A3 0%, #831CF8 100%);
    color: #fff;
    border: none;
    font-size: 14.5px;
    font-weight: 600;
    padding: 14px 24px;
    border-radius: 100px;
    cursor: pointer;
}

@media (max-width: 560px){
    .chat-options{ grid-template-columns: 1fr; }
    .chat-input button span{ display: none; }
}

/* Typing indicator (3 dots) */

.chat-typing{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 16px 18px;
}

.chat-typing span{
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #C9A8EC;
    animation: chat-typing-bounce 1.2s infinite ease-in-out;
}

.chat-typing span:nth-child(2){ animation-delay: .2s; }
.chat-typing span:nth-child(3){ animation-delay: .4s; }

@keyframes chat-typing-bounce{
    0%, 80%, 100%{ transform: translateY(0); opacity: .45; }
    40%{ transform: translateY(-5px); opacity: 1; }
}

/* ===== Chat footer: progress + actions ===== */

.chat-foot{
    border-top: 1px solid #F1ECF7;
}

.chat-foot .chat-input{
    border-top: none;
}

.chat-progress{
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 22px 0;
}

.chat-progress-track{
    flex: 1;
    height: 8px;
    background: #EFE7F8;
    border-radius: 100px;
    overflow: hidden;
}

.chat-progress-bar{
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #EC02A3, #831CF8);
    border-radius: 100px;
    transition: width .4s ease;
}

.chat-progress-label{
    color: #8B0EF0;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.chat-action{
    padding: 18px 22px;
}

.chat-cta{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: linear-gradient(98deg, #EC02A3 0%, #831CF8 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    padding: 15px;
    border-radius: 12px;
    transition: opacity .2s ease;
}

.chat-cta:hover{
    opacity: .92;
}

.chat-gen{
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-gen-row{
    display: flex;
    align-items: center;
    gap: 10px;
    color: #5C5372;
    font-size: 14.5px;
}

.chat-gen-row i{
    color: #8B0EF0;
}

.chat-gen-bar{
    display: block;
    height: 8px;
    width: 0;
    background: linear-gradient(90deg, #EC02A3, #831CF8);
    border-radius: 100px;
    transition: width 2.5s ease;
}

/* Utility: force-hide (beats display:flex/grid) */
.is-hidden{ display: none !important; }

/* ===== Générateur de site (formulaire + récap) ===== */

.site-form{
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 920px;
}

.site-card{
    background: #fff;
    border: 1px solid #ECE6F4;
    border-radius: 16px;
    padding: 26px 28px;
}

.site-card-head{
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 22px;
}

.site-card-head h2{
    font-size: 18px;
    margin: 0 0 2px;
    color: #1B1330;
}

.site-card-head p{
    margin: 0;
    font-size: 13.5px;
    color: #8B85A0;
}

.site-step{
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 15px;
    color: #6C3CE0;
    background: #F1EBFD;
}

.site-grid{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
    margin-bottom: 16px;
}

.site-textarea{
    width: 100%;
    border: 1px solid #E4DEF0;
    border-radius: 12px;
    padding: 12px 14px;
    font: inherit;
    color: #1B1330;
    background: #FBFAFE;
    resize: vertical;
}

.site-textarea:focus{
    outline: none;
    border-color: #6C3CE0;
    background: #fff;
}

.site-file{
    width: 100%;
    border: 1px dashed #CFC5E6;
    border-radius: 12px;
    padding: 14px;
    background: #FBFAFE;
    font-size: 13.5px;
    color: #6b6580;
    cursor: pointer;
}

.site-colors{
    display: flex;
    gap: 16px;
}

.site-color{
    width: 56px;
    height: 42px;
    padding: 2px;
    border: 1px solid #E4DEF0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.site-form-foot{
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    max-width: 920px;
    margin-top: 4px;
}

.site-form-foot .plan-btn{ border: 0; cursor: pointer; }

/* Récapitulatif (show) */
.site-show{ max-width: 920px; display: flex; flex-direction: column; gap: 20px; }

.site-badge{
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: #F1EBFD;
    color: #6C3CE0;
    text-transform: capitalize;
}

.site-show-logo{ margin-bottom: 18px; }
.site-show-logo img{ max-height: 90px; }

.site-defs{ margin: 0; display: flex; flex-direction: column; gap: 14px; }
.site-def dt{ font-size: 12.5px; font-weight: 700; color: #8B85A0; text-transform: uppercase; letter-spacing: .03em; }
.site-def dd{ margin: 4px 0 0; color: #2A2240; font-size: 14.5px; }
.site-def dd p{ margin: 0; }

.site-show-colors{ display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.site-swatch{ width: 22px; height: 22px; border-radius: 6px; border: 1px solid #0001; display: inline-block; }
.site-show-colors code{ font-size: 13px; color: #6b6580; margin-right: 12px; }

.site-show-images{ display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.site-show-images img{ border-radius: 10px; border: 1px solid #ECE6F4; }

/* Liste des sites */
.site-list{ display: flex; flex-direction: column; gap: 12px; max-width: 920px; }
.site-list-item{
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid #ECE6F4;
    border-radius: 14px;
    text-decoration: none;
    transition: border-color .15s ease, transform .15s ease;
}
.site-list-item:hover{ border-color: #CFC5E6; transform: translateY(-1px); }
.site-list-ic{
    width: 44px; height: 44px; flex-shrink: 0;
    border-radius: 12px; display: grid; place-items: center;
    background: #F1EBFD; color: #6C3CE0; font-size: 18px;
}
.site-list-meta{ flex: 1; display: flex; flex-direction: column; }
.site-list-meta strong{ color: #1B1330; font-size: 15px; }
.site-list-meta span{ color: #8B85A0; font-size: 13px; }

.site-empty{ max-width: 480px; text-align: center; }

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

/* ===== Dashboard live de génération (Paperclip) ===== */

.org-head-meta{ display:flex; align-items:center; gap:10px; }

.status{ display:inline-block; padding:4px 12px; border-radius:999px; font-size:12.5px; font-weight:600; text-transform:capitalize; background:#EEF; color:#445; }
.status-pending{ background:#FFF4E5; color:#A85B00; }
.status-provisioning{ background:#E8F0FE; color:#1A56DB; }
.status-ready{ background:#E6F7EC; color:#067647; }
.status-failed{ background:#FDECEC; color:#C81E1E; }

.live-pill{ display:inline-block; padding:4px 12px; border-radius:999px; font-size:12px; font-weight:600; text-transform:capitalize; }
.live-pill-connecting{ background:#FFF4E5; color:#A85B00; }
.live-pill-connected{ background:#E6F7EC; color:#067647; }
.live-pill-offline{ background:#FDECEC; color:#C81E1E; }

.summary-grid{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin-bottom:20px; }
.metric-tile{ background:#fff; border:1px solid #ECE6F4; border-radius:16px; padding:18px 20px; display:flex; flex-direction:column; gap:6px; }
.metric-tile span{ color:#8B85A0; font-size:13px; }
.metric-tile strong{ font-size:24px; color:#1B1330; }
.metric-tile-alert strong{ color:#C81E1E; }

.content-grid{ display:grid; grid-template-columns:2fr 1fr; gap:20px; margin-bottom:20px; }
.content-grid:has(.panel:only-child){ grid-template-columns:1fr; }

.panel{ background:#fff; border:1px solid #ECE6F4; border-radius:16px; padding:24px 26px; }
.panel-large{ grid-column:auto; }
.panel-header{ display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:18px; gap:12px; }
.panel-header h2{ font-size:18px; margin:2px 0 0; color:#1B1330; }
.eyebrow{ font-size:11.5px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:#8B5CF6; }
.muted{ color:#8B85A0; }
.small-text{ font-size:12.5px; }

.progress-block{ margin-bottom:20px; }
.progress-topline{ display:flex; justify-content:space-between; align-items:baseline; margin-bottom:8px; }
.progress-topline span{ color:#6b6580; font-size:14px; }
.progress-topline strong{ font-size:18px; color:#6C3CE0; }
.progress-track{ height:8px; border-radius:999px; background:#EFEAF9; overflow:hidden; }
.progress-track > div{ height:100%; background:linear-gradient(90deg,#8B5CF6,#6C3CE0); transition:width .6s ease; }

.stage-rail{ display:flex; flex-direction:column; gap:4px; }
.stage-step{ display:flex; gap:14px; padding:12px 0; position:relative; }
.stage-step .stage-dot{ width:14px; height:14px; border-radius:50%; flex-shrink:0; margin-top:3px; background:#D8CFEC; border:3px solid #fff; box-shadow:0 0 0 2px #D8CFEC; }
.stage-step strong{ color:#1B1330; font-size:14.5px; }
.stage-step p{ margin:2px 0 0; color:#8B85A0; font-size:13px; }
.stage-step small{ color:#6C3CE0; font-size:12px; font-weight:600; }
.stage-active .stage-dot{ background:#6C3CE0; box-shadow:0 0 0 2px #6C3CE0, 0 0 0 6px rgba(108,60,224,.18); }
.stage-done .stage-dot{ background:#067647; box-shadow:0 0 0 2px #067647; }
.stage-blocked .stage-dot{ background:#C81E1E; box-shadow:0 0 0 2px #C81E1E; }

.detail-list{ margin:0; display:flex; flex-direction:column; gap:14px; }
.detail-list dt{ font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.03em; color:#8B85A0; }
.detail-list dd{ margin:3px 0 0; color:#2A2240; font-size:14px; word-break:break-all; }

.task-list, .timeline{ display:flex; flex-direction:column; gap:12px; }
.task-row{ display:flex; justify-content:space-between; align-items:flex-start; gap:12px; padding:14px 16px; border:1px solid #ECE6F4; border-radius:12px; }
.task-row strong{ color:#1B1330; font-size:14.5px; }
.task-row p{ margin:3px 0 0; color:#8B85A0; font-size:13px; }
.task-alert{ color:#C81E1E !important; }
.task-status{ flex-shrink:0; padding:4px 10px; border-radius:999px; font-size:12px; font-weight:600; background:#F1EBFD; color:#6C3CE0; text-transform:capitalize; }
.task-status-blocked{ background:#FDECEC; color:#C81E1E; }
.task-status-done{ background:#E6F7EC; color:#067647; }
.task-status-in-review{ background:#FFF4E5; color:#A85B00; }

.timeline-item{ display:flex; gap:12px; }
.timeline-item > span{ width:10px; height:10px; border-radius:50%; flex-shrink:0; margin-top:5px; background:#8B5CF6; }
.timeline-info > span{ background:#8B5CF6; }
.timeline-success > span{ background:#067647; }
.timeline-warning > span{ background:#A85B00; }
.timeline-danger > span{ background:#C81E1E; }
.timeline-item strong{ color:#1B1330; font-size:14px; text-transform:capitalize; }
.timeline-item p{ margin:3px 0 0; color:#6b6580; font-size:13px; }
.timeline-item small{ color:#A39DB5; font-size:12px; }

.empty-state{ text-align:center; padding:24px; color:#8B85A0; }
.empty-state strong{ display:block; color:#1B1330; margin-bottom:4px; }

.notice-error{ background:#FDECEC; color:#C81E1E; border-radius:12px; padding:12px 16px; font-size:14px; }
.org-error{ margin-bottom:20px; }

.admin-actions{ display:flex; gap:12px; flex-wrap:wrap; }
.admin-actions form{ margin:0; }
.admin-panel{ display:flex; justify-content:space-between; align-items:center; gap:16px; }

@media (max-width: 900px){
  .summary-grid{ grid-template-columns:repeat(2,1fr); }
  .content-grid{ grid-template-columns:1fr; }
}

/* --- Livrables générés (site prêt) --- */
.deliverables-panel{
  margin: 18px 0;
  border: 1px solid #E7D8FB;
  background: linear-gradient(180deg, #FBF5FF 0%, #FFFFFF 60%);
}
.deliverables-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.deliverable-card{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #EDE6F6;
  border-radius: 14px;
  background: #fff;
  text-decoration: none;
  color: #2A2140;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.deliverable-card:hover{
  border-color: #C9A8F2;
  box-shadow: 0 6px 18px rgba(131,28,248,.12);
  transform: translateY(-1px);
}
.deliverable-card > i{
  font-size: 20px;
  color: #831CF8;
  width: 24px;
  text-align: center;
}
.deliverable-meta{ display:flex; flex-direction:column; min-width:0; flex:1; }
.deliverable-meta strong{ font-size: 14px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.deliverable-meta small{ color:#8A82A0; font-size:12px; }
.deliverable-actions{ display:flex; gap:6px; }
.deliverable-actions a{
  width: 32px; height: 32px;
  display: inline-flex; align-items:center; justify-content:center;
  border-radius: 100%;
  background: #F4F1F9; color:#5A5470;
  transition: background .15s ease, color .15s ease;
}
.deliverable-actions a:hover{ background: linear-gradient(135deg,#EC02A3,#831CF8); color:#fff; }
.deliverable-image{ flex-direction: column; align-items: stretch; padding: 8px; }
.deliverable-image img{
  width: 100%; height: 130px; object-fit: cover;
  border-radius: 10px; background:#F4F1F9; display:block;
}
.deliverable-image span{ font-size:13px; margin-top:8px; text-align:center; color:#5A5470; }

/* ===== Projets ===== */

.proj-section-title{
    margin: 30px 0 14px;
    font-size: 18px;
    font-weight: 700;
    color: #1A1332;
}

.proj-files{
    margin-top: 18px;
    border-top: 1px solid #ECE4F6;
    padding-top: 16px;
}

.proj-files-title{
    font-size: 13px;
    font-weight: 600;
    color: #6B6383;
    margin: 0 0 10px;
}

.proj-file{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #F6F0FD;
    border: 1px solid #E7DEF5;
    border-radius: 10px;
    padding: 8px 12px;
    margin: 0 8px 8px 0;
    color: #463C5C;
    font-size: 13.5px;
}

.proj-file:hover{ border-color: #8B0EF0; color: #8B0EF0; }
.proj-file i{ color: #8B0EF0; }
.proj-file small{ color: #9A90AE; }

/* ============================================================
   Équipes (collaboration) — sélecteur + réglages
   ============================================================ */

/* Sélecteur d'équipe dans la topbar */
.team-switcher{ position: relative; margin-left: auto; }
.team-switcher > summary{
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #F4F1F9;
    border-radius: 100px;
    padding: 8px 14px;
    cursor: pointer;
    color: #1A1332;
    font-size: 14px;
    font-weight: 600;
    user-select: none;
}
.team-switcher > summary::-webkit-details-marker{ display: none; }
.team-switcher-ic{ color: #831CF8; }
.team-switcher-name{ max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-switcher-caret{ font-size: 11px; color: #9A90AE; }
.team-switcher[open] .team-switcher-caret{ transform: rotate(180deg); }

.team-switcher-menu{
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 280px;
    background: #fff;
    border: 1px solid #ECE6F4;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(26,19,50,.14);
    padding: 10px;
    z-index: 20;
}
.team-switcher-label{ font-size: 12px; color: #9A90AE; text-transform: uppercase; letter-spacing: .04em; margin: 6px 8px; }
.team-switcher-item{
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: none;
    border-radius: 10px;
    padding: 9px 10px;
    font-size: 14px;
    color: #1A1332;
    cursor: pointer;
    text-align: left;
}
.team-switcher-item:hover{ background: #F4F1F9; }
.team-switcher-item.is-active{ color: #831CF8; font-weight: 600; }
.team-switcher-item i:first-child{ width: 16px; color: #9A90AE; }
.team-switcher-item.is-active i:first-child{ color: #831CF8; }
.team-switcher-check{ margin-left: auto; color: #831CF8; }
.team-switcher-divider{ height: 1px; background: #ECE6F4; margin: 8px 4px; }
.team-switcher-link{
    display: flex; align-items: center; gap: 10px;
    padding: 9px 10px; border-radius: 10px;
    font-size: 14px; color: #1A1332; text-decoration: none;
}
.team-switcher-link:hover{ background: #F4F1F9; }
.team-switcher-link i{ width: 16px; color: #9A90AE; }
.team-switcher-new{ display: flex; gap: 6px; margin-top: 8px; }
.team-switcher-new input{
    flex: 1; min-width: 0;
    border: 1px solid #ECE6F4; border-radius: 10px;
    padding: 8px 10px; font-size: 13px; outline: none;
}
.team-switcher-new input:focus{ border-color: #831CF8; }
.team-switcher-new-btn{
    border: none; cursor: pointer;
    background: linear-gradient(135deg, #EC02A3, #831CF8);
    color: #fff; font-weight: 600; font-size: 13px;
    border-radius: 10px; padding: 0 14px;
}

/* Cartes de réglages d'équipe */
.team-card{
    background: #fff;
    border: 1px solid #ECE6F4;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
}
.team-card h2{ font-size: 17px; margin: 0 0 16px; }
.team-card-head{ display: flex; align-items: center; justify-content: space-between; }
.team-count{
    display: inline-block; background: #F4F1F9; color: #5C5372;
    border-radius: 100px; padding: 1px 10px; font-size: 13px; margin-left: 6px;
}
.team-subhead{ font-size: 14px; color: #5C5372; margin: 22px 0 10px; }

.team-rename{ display: flex; gap: 10px; }
.team-rename input{
    flex: 1; border: 1px solid #ECE6F4; border-radius: 12px;
    padding: 11px 14px; font-size: 14px; outline: none;
}
.team-rename input:focus{ border-color: #831CF8; }

.team-members{ list-style: none; margin: 0; padding: 0; }
.team-member{
    display: flex; align-items: center; gap: 14px;
    padding: 14px 0; border-bottom: 1px solid #F1ECF8;
}
.team-member:last-child{ border-bottom: none; }
.team-member-avatar{
    width: 42px; height: 42px; border-radius: 100%; flex-shrink: 0;
    background: linear-gradient(135deg, #EC02A3, #831CF8); color: #fff;
    font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.team-member-info{ display: flex; flex-direction: column; line-height: 1.35; }
.team-member-info span{ font-size: 13px; color: #9A90AE; }
.team-you{ font-size: 12px; color: #831CF8; font-weight: 600; }
.team-member-role{ margin-left: auto; }
.team-role-form select,
.team-invite select,
.team-switcher-new select{
    border: 1px solid #ECE6F4; border-radius: 10px;
    padding: 7px 10px; font-size: 13px; color: #1A1332; outline: none; cursor: pointer;
}
.team-role-badge{
    font-size: 12px; font-weight: 600; border-radius: 100px; padding: 4px 12px;
}
.role-owner{ background: #FCE7F6; color: #C0148C; }
.role-admin{ background: #EDE4FF; color: #6C2BD9; }
.role-member{ background: #F4F1F9; color: #5C5372; }
.team-member-actions{ margin-left: 14px; }
.team-link-danger{
    background: transparent; border: none; cursor: pointer;
    color: #D6336C; font-size: 13px; font-weight: 600; padding: 0;
}
.team-link-danger:hover{ text-decoration: underline; }

.team-invite{ display: flex; gap: 10px; flex-wrap: wrap; }
.team-invite input[type="email"]{
    flex: 1; min-width: 220px;
    border: 1px solid #ECE6F4; border-radius: 12px;
    padding: 11px 14px; font-size: 14px; outline: none;
}
.team-invite input[type="email"]:focus{ border-color: #831CF8; }

.team-invites{ list-style: none; margin: 0; padding: 0; }
.team-invite-row{
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 0; border-bottom: 1px solid #F1ECF8;
}
.team-invite-row:last-child{ border-bottom: none; }
.team-invite-row > div{ display: flex; align-items: center; gap: 10px; }

/* Page d'atterrissage d'invitation */
.team-invite-landing{ text-align: center; max-width: 520px; margin: 0 auto; }
.team-invite-landing-ic{
    width: 64px; height: 64px; border-radius: 18px; margin: 4px auto 16px;
    background: linear-gradient(135deg, #EC02A3, #831CF8); color: #fff;
    font-size: 26px; display: flex; align-items: center; justify-content: center;
}
.team-invite-landing p{ color: #5C5372; line-height: 1.6; margin: 0 auto 22px; max-width: 420px; }
.team-invite-landing-actions{ display: flex; gap: 12px; justify-content: center; }

/* Abonnement (billing) */
.billing-current{ display: flex; align-items: center; justify-content: space-between; }
.billing-current-label{ font-size: 12px; color: #9A90AE; text-transform: uppercase; letter-spacing: .04em; }
.billing-current h2{ margin: 6px 0 4px; display: flex; align-items: center; gap: 10px; }
.billing-current-seats{ color: #5C5372; font-size: 14px; margin: 0; }

.billing-note{ color: #9A90AE; font-size: 13.5px; display: flex; align-items: center; gap: 8px; margin: 0 0 18px; }
.billing-note-soft{ margin-top: 22px; }

.billing-plans{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.billing-plan{
    position: relative; background: #fff; border: 1px solid #ECE6F4;
    border-radius: 16px; padding: 26px 22px; display: flex; flex-direction: column;
}
.billing-plan.is-current{ border-color: #831CF8; box-shadow: 0 10px 30px rgba(131,28,248,.10); }
.billing-plan-flag{
    position: absolute; top: -11px; left: 22px;
    background: linear-gradient(98deg, #EC02A3 0%, #831CF8 100%); color: #fff;
    font-size: 12px; font-weight: 600; border-radius: 100px; padding: 4px 12px;
}
.billing-plan h3{ font-size: 18px; margin: 0 0 4px; }
.billing-plan-tag{ color: #9A90AE; font-size: 13.5px; margin: 0 0 16px; }
.billing-plan-price{ margin-bottom: 18px; }
.billing-plan-price .amount{ font-size: 30px; font-weight: 800; color: #1A1332; }
.billing-plan-price .per{ color: #9A90AE; font-size: 14px; }
.billing-plan-feats{ list-style: none; margin: 0 0 22px; padding: 0; flex: 1; }
.billing-plan-feats li{ display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 14px; color: #5C5372; }
.billing-plan-feats li i{ color: #831CF8; font-size: 13px; }
.billing-plan .plan-btn{ width: 100%; border: 0; cursor: pointer; }
.billing-plan .plan-btn[disabled]{ opacity: .55; cursor: default; }

@media (max-width: 860px){ .billing-plans{ grid-template-columns: 1fr; } }

/* Dashboard contextuel — espace d'équipe */
.dash-team-grid{
    display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px;margin-top: 20px;
}
.dash-card-link{
    margin-left: auto; color: #831CF8; font-size: 13.5px; font-weight: 600;
    text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.dash-card-link:hover{ text-decoration: underline; }
.dash-card-link i{ font-size: 11px; }
.dash-team-invite{ width: 100%; margin-top: 16px; text-align: center; }

.dash-activity{ list-style: none; margin: 0; padding: 0; }
.dash-activity-row{
    display: flex; align-items: center; gap: 12px;
    padding: 12px 0; border-bottom: 1px solid #F1ECF8;
}
.dash-activity-row:last-child{ border-bottom: none; }
.dash-activity-ic{
    width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: #F4EEFE; color: #831CF8; font-size: 16px;
}
.dash-activity-info{ display: flex; flex-direction: column; line-height: 1.4; min-width: 0; }
.dash-activity-info strong{ font-size: 14px; color: #1A1332; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-activity-info span{ font-size: 12.5px; color: #9A90AE; }
.dash-empty{ color: #9A90AE; font-size: 14px; margin: 4px 0 0; }

@media (max-width: 860px){ .dash-team-grid{ grid-template-columns: 1fr; } }

/* Indicateur d'espace actif (sidebar) */
.dash-space{
    display: flex; align-items: center; gap: 11px;
    padding: 10px 12px; margin-bottom: 16px;
    background: #F6F0FD; border: 1px solid #ECE0FB; border-radius: 14px;
}
.dash-space-ic{
    width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #EC02A3, #831CF8); color: #fff; font-size: 16px;
}
.dash-space-info{ display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.dash-space-info strong{
    font-size: 14px; color: #1A1332;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dash-space-info span{ font-size: 12px; color: #9A90AE; }
