*{box-sizing:border-box}

html,body{
    margin:0;
    padding:0;
    font-family:'Inter',Arial,sans-serif;
    background:#f3f6fb;
    color:#0f172a;
}

a{text-decoration:none;color:inherit}
button,input,select,textarea{font:inherit}

/* LOGIN */
.orga-crm-login-body{
    margin:0;
    min-height:100vh;
    background:linear-gradient(135deg,#0f172a,#1e3a8a);
    display:flex;
    align-items:center;
    justify-content:center;
}

.orga-crm-login-container{
    width:100%;
    max-width:420px;
    padding:20px;
}

.orga-crm-login-box{
    background:rgba(255,255,255,.96);
    backdrop-filter:blur(10px);
    padding:40px 34px;
    border-radius:18px;
    width:100%;
    box-shadow:0 25px 60px rgba(0,0,0,.28);
}

.orga-crm-login-box h1{
    font-size:22px;
    margin:0 0 6px;
    font-weight:700;
    color:#0f172a;
}

.orga-crm-login-box .subtitle{
    font-size:14px;
    color:#64748b;
    margin:0 0 24px;
}

.orga-crm-login-box label{
    font-size:13px;
    color:#475569;
    margin-bottom:6px;
    display:block;
    font-weight:600;
}

.orga-crm-login-box input[type="text"],
.orga-crm-login-box input[type="password"]{
    width:100%;
    padding:12px 14px;
    margin-bottom:16px;
    border:1px solid #dbe3ef;
    border-radius:10px;
    font-size:14px;
    background:#fff;
}

.orga-crm-login-box input:focus{
    border-color:#3b82f6;
    outline:none;
    box-shadow:0 0 0 3px rgba(59,130,246,.18);
}

.orga-crm-login-box button{
    width:100%;
    padding:13px 14px;
    background:linear-gradient(135deg,#142c73,#2563eb);
    color:#fff;
    border:none;
    border-radius:10px;
    font-weight:700;
    font-size:14px;
    cursor:pointer;
}

.orga-crm-remember{
    display:flex;
    align-items:center;
    gap:10px;
    margin:8px 0 20px;
    font-size:13px;
    color:#64748b;
}

.orga-crm-remember input[type="checkbox"]{
    width:16px;
    height:16px;
    margin:0;
    flex:0 0 16px;
}

.orga-crm-error{
    margin:0 0 16px;
    padding:12px 14px;
    border-radius:10px;
    background:#fee2e2;
    color:#991b1b;
    font-size:13px;
    font-weight:600;
}

/* APP */
.orga-crm-app{
    display:flex;
    flex-direction:column;
    min-height:100vh;
    background:#f3f6fb;
}

/* TOP BAR */
.orga-crm-sidebar{
    width:100%;
    background:linear-gradient(90deg,#0b1535 0%,#0f1d4d 100%);
    color:#fff;
    padding:16px 24px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    box-shadow:0 8px 30px rgba(15,23,42,.10);
}

.orga-crm-brand-wrap{
    min-width:220px;
}

.orga-crm-brand{
    font-size:22px;
    line-height:1;
    font-weight:800;
    letter-spacing:-0.02em;
}

.orga-crm-nav{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:12px;
    flex:1;
    flex-wrap:wrap;
}

.orga-crm-nav a{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:14px 20px;
    border-radius:14px;
    background:rgba(255,255,255,.06);
    color:#fff;
    font-weight:800;
    min-width:160px;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.06);
}

.orga-crm-nav a:hover,
.orga-crm-nav a.is-active{
    background:rgba(255,255,255,.14);
}

.orga-crm-user{
    min-width:180px;
    padding:12px 16px;
    border-radius:14px;
    background:rgba(255,255,255,.06);
    text-align:right;
}

.orga-crm-user-name{
    font-size:14px;
    font-weight:800;
    color:#fff;
    line-height:1.35;
}

.orga-crm-main{
    flex:1;
    padding:30px;
    min-width:0;
}

/* PAGE HEAD */
.orga-crm-page-head{
    margin-bottom:28px;
}

.orga-crm-page-head h1{
    margin:0 0 10px;
    font-size:64px;
    line-height:1;
    font-weight:900;
    letter-spacing:-0.05em;
    color:#0f172a;
}

.orga-crm-page-head p{
    margin:0;
    font-size:18px;
    font-weight:500;
    color:#64748b;
}

/* CLIENTS TOP */
.orga-crm-clients-top-actions{
    margin-bottom:16px;
}

.orga-crm-search-form{
    display:flex;
    gap:12px;
    align-items:center;
    flex-wrap:wrap;
}

.orga-crm-search-form input[type="text"]{
    flex:1;
    min-width:260px;
    padding:14px 16px;
    border:1px solid #dbe3ef;
    border-radius:12px;
    background:#fff;
}

/* STATS */
.orga-crm-stats{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:22px;
    margin-bottom:28px;
}

.orga-crm-stat{
    position:relative;
    overflow:hidden;
    border-radius:24px;
    padding:28px 24px 24px;
    border:1px solid #e2e8f0;
    background:
        radial-gradient(circle at top right, rgba(255,255,255,.95), rgba(255,255,255,.72)),
        linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
    box-shadow:0 18px 35px rgba(15,23,42,.08);
    text-align:left;
}

.orga-crm-stat::after{
    content:"";
    position:absolute;
    inset:0 0 auto 0;
    height:6px;
    border-radius:24px 24px 0 0;
}

.orga-crm-stat:nth-child(1)::after{
    background:linear-gradient(90deg,#2563eb 0%,#60a5fa 100%);
}

.orga-crm-stat:nth-child(2)::after{
    background:linear-gradient(90deg,#7c3aed 0%,#c084fc 100%);
}

.orga-crm-stat:nth-child(3)::after{
    background:linear-gradient(90deg,#dc2626 0%,#f59e0b 50%,#16a34a 100%);
}

.orga-crm-stat-title{
    font-size:20px;
    font-weight:900;
    color:#0f172a;
    margin-bottom:16px;
    letter-spacing:-0.02em;
}

.orga-crm-stat-value{
    font-size:58px;
    line-height:1;
    font-weight:900;
    color:#0f172a;
    margin-bottom:14px;
    letter-spacing:-0.06em;
}

.orga-crm-stat-sub{
    font-size:14px;
    font-weight:700;
    color:#64748b;
}

.orga-crm-progress{
    width:100%;
    height:18px;
    margin:18px 0 12px;
    background:#e5e7eb;
    border-radius:999px;
    overflow:hidden;
    box-shadow:inset 0 2px 6px rgba(0,0,0,.08);
}

.orga-crm-progress-bar{
    height:100%;
    border-radius:999px;
    background:linear-gradient(90deg,#dc2626 0%,#f97316 25%,#f59e0b 50%,#84cc16 75%,#16a34a 100%);
    box-shadow:inset 0 1px 2px rgba(255,255,255,.35),0 4px 12px rgba(0,0,0,.12);
    transition:width .45s ease;
}

/* PANELS */
.orga-crm-block-grid{
    display:grid;
    grid-template-columns:1fr;
    gap:22px;
}

.orga-crm-panel{
    background:#fff;
    border:1px solid #e5eaf3;
    border-radius:22px;
    box-shadow:0 10px 30px rgba(15,23,42,.05);
    padding:24px;
}

.orga-crm-section-title{
    font-size:34px;
    font-weight:900;
    letter-spacing:-0.04em;
    color:#475569;
    margin:0 0 16px;
}

.orga-crm-muted{
    color:#64748b;
    font-size:14px;
}

/* MINI CARDS */
.orga-crm-card-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:14px;
}

.orga-crm-mini-card{
    background:#fff;
    border:1px solid #e5eaf3;
    border-left:4px solid #cbd5e1;
    border-radius:16px;
    box-shadow:0 6px 18px rgba(15,23,42,.04);
    padding:16px;
    display:flex;
    flex-direction:column;
    gap:10px;
}

.orga-crm-mini-card.is-late{
    border-left-color:#dc2626;
}

.orga-crm-mini-card.is-today{
    border-left-color:#f59e0b;
}

.orga-crm-mini-card.is-opportunity{
    border-left-color:#2563eb;
}

.orga-crm-mini-title{
    font-size:16px;
    font-weight:800;
    color:#0f172a;
    line-height:1.25;
}

.orga-crm-mini-row{
    font-size:13px;
    color:#334155;
    line-height:1.45;
}

.orga-crm-mini-actions{
    margin-top:auto;
    display:flex;
    flex-wrap:wrap;
    gap:8px;
}

/* TABLE */
.orga-crm-table-wrap{
    overflow:auto;
    background:#fff;
    border:1px solid #e5eaf3;
    border-radius:20px;
    box-shadow:0 10px 30px rgba(15,23,42,.05);
}

.orga-crm-table{
    width:100%;
    border-collapse:collapse;
    min-width:1200px;
}

.orga-crm-table th,
.orga-crm-table td{
    padding:16px 18px;
    text-align:left;
    border-bottom:1px solid #eef2f7;
    font-size:14px;
    vertical-align:middle;
}

.orga-crm-table th{
    font-size:13px;
    color:#475569;
    font-weight:800;
    background:#f8fafc;
}

.orga-crm-table tr:hover td{
    background:#fbfdff;
}

.orga-crm-link{
    color:#6d28d9;
    font-weight:700;
}

/* BUTTONS */
.orga-crm-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:42px;
    padding:10px 16px;
    border:none;
    border-radius:12px;
    background:linear-gradient(135deg,#0f172a,#172554);
    color:#fff;
    font-size:14px;
    font-weight:800;
    cursor:pointer;
}

.orga-crm-btn-danger{
    background:linear-gradient(135deg,#991b1b,#dc2626);
}

/* BELL */
.orga-crm-bell{
    position:fixed;
    right:24px;
    bottom:24px;
    width:74px;
    height:74px;
    border:none;
    border-radius:999px;
    background:linear-gradient(135deg,#0f172a 0%,#1e3a8a 100%);
    color:#fbbf24;
    display:flex;
    align-items:center;
    justify-content:center;
    box-shadow:0 18px 40px rgba(15,23,42,.28);
    z-index:9999;
    cursor:pointer;
    font-size:30px;
    transition:transform .2s ease, box-shadow .2s ease;
}

.orga-crm-bell:hover{
    transform:translateY(-2px) scale(1.03);
    box-shadow:0 24px 50px rgba(15,23,42,.34);
}

.orga-crm-bell-badge{
    position:absolute;
    top:-6px;
    right:-6px;
    min-width:28px;
    height:28px;
    padding:0 7px;
    border-radius:999px;
    background:#dc2626;
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:13px;
    font-weight:900;
    box-shadow:0 8px 16px rgba(220,38,38,.35);
    border:2px solid #fff;
}

/* RESPONSIVE */
@media (max-width: 980px){
    .orga-crm-sidebar{
        flex-direction:column;
        align-items:flex-start;
    }

    .orga-crm-nav{
        width:100%;
        justify-content:flex-start;
    }

    .orga-crm-user{
        width:100%;
        text-align:left;
    }

    .orga-crm-main{
        padding:20px;
    }

    .orga-crm-stats{
        grid-template-columns:1fr;
    }

    .orga-crm-page-head h1{
        font-size:46px;
    }
}

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

    .orga-crm-nav a{
        min-width:unset;
        width:100%;
    }
}

/* FORMULAIRE CONTACT PLUS PROCHE DU CHECK-IN */

#orga-crm-contact-form .orga-crm-form-title{
    font-size:52px;
    font-weight:900;
    letter-spacing:-0.05em;
    line-height:1;
    margin:0 0 22px;
    color:#0f172a;
}

#orga-crm-contact-form .orga-crm-form-section{
    margin-bottom:34px;
}

#orga-crm-contact-form .orga-crm-radio-row{
    gap:24px;
    padding-top:0;
}

#orga-crm-contact-form .orga-crm-radio-row label{
    font-size:16px;
    font-weight:700;
    color:#334155;
}

#orga-crm-contact-form .orga-crm-field label{
    font-size:15px;
    font-weight:800;
    color:#1e293b;
    margin-bottom:10px;
}

#orga-crm-contact-form .orga-crm-field input,
#orga-crm-contact-form .orga-crm-field select{
    height:56px;
    padding:14px 16px;
    border:1px solid #dbe3ef;
    border-radius:14px;
    font-size:15px;
    background:#fff;
}

#orga-crm-contact-form .orga-crm-field input::placeholder{
    color:#94a3b8;
}

#orga-crm-contact-form .orga-crm-form-panel,
#orga-crm-contact-form.orga-crm-form-panel{
    padding:30px;
}

@media (max-width: 980px){
    #orga-crm-contact-form .orga-crm-form-title{
        font-size:38px;
    }
}

.crm-activities-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.crm-activity-item {
    padding: 12px 15px;
    border-radius: 10px;
    background: #f9fafb;
    border-left: 4px solid #1e3a8a;
}

/* TYPE (Appel, RDV...) */
.crm-activity-type {
    font-size: 18px;
    font-weight: 700;
    text-decoration: underline;
    margin-bottom: 4px;
}

/* DATE */
.crm-activity-date {
    font-size: 14px;
    color: #dc2626; /* rouge propre */
    font-weight: 600;
    margin-bottom: 6px;
}

/* DESCRIPTION */
.crm-activity-desc {
    font-size: 14px;
    color: #374151;
}