/********************
 ********************
// Pages CSS Exentis — Design Welly v3
// Sidebar blanche · Cards ombres · Fond gris doux · Vert primaire
 ********************
********************/

/* =============================================
   VARIABLES
   ============================================= */
:root {
    --bm-green:         #48801D;
    --bm-green-dark:    #366014;
    --bm-green-mid:     #5a9a24;
    --bm-green-light:   #EEF5E6;
    --bm-green-pale:    #F6FAF0;
    --bm-green-border:  #D4E8B8;

    --bm-body-bg:       #F2F4F7;
    --bm-sidebar-bg:    #FFFFFF;
    --bm-card-bg:       #FFFFFF;

    --bm-text:          #111827;
    --bm-text-sub:      #374151;
    --bm-text-muted:    #6B7280;
    --bm-border:        #E2E8EF;
    --bm-border-dark:   #C8D4DE;

    --bm-radius:        12px;
    --bm-radius-sm:     8px;
    --bm-radius-xs:     6px;

    /* Ombres — effet profondeur Welly */
    --bm-shadow-xs:  0 1px 2px rgba(0,0,0,.04);
    --bm-shadow-sm:  0 2px 8px rgba(0,0,0,.06),  0 1px 3px rgba(0,0,0,.04);
    --bm-shadow-md:  0 4px 20px rgba(0,0,0,.08),  0 2px 6px rgba(0,0,0,.05);
    --bm-shadow-lg:  0 8px 40px rgba(0,0,0,.10),  0 2px 8px rgba(0,0,0,.06);
    --bm-shadow-card: 0 2px 12px rgba(0,0,0,.07), 0 1px 4px rgba(0,0,0,.04);
}

/* =============================================
   BASE
   ============================================= */
body {
    background: var(--bm-body-bg) !important;
    color: var(--bm-text);
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif !important;
    font-size: 0.925rem;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
}
.app-container { background: var(--bm-body-bg); }
.app-body { padding: 1.5rem 1.75rem !important; }

/* =============================================
   SIDEBAR — BLANCHE style Welly
   ============================================= */
.sidebar-wrapper {
    background: var(--bm-sidebar-bg) !important;
    border-right: 1px solid var(--bm-border) !important;
    box-shadow: 2px 0 16px rgba(0,0,0,.05) !important;
}

.sidebar-wrapper .app-brand {
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--bm-border);
    margin-bottom: 8px;
}
.sidebar-wrapper .app-brand .logo {
    filter: brightness(0);
    opacity: .85;
}

/* Items généraux */
.sidebar-menu > li > a {
    color: var(--bm-text-sub) !important;
    padding: 9px 14px !important;
    margin: 2px 10px;
    border-radius: var(--bm-radius-sm);
    font-size: 0.845rem;
    font-weight: 500;
    border-left: none !important;
    transition: background .15s, color .15s;
}
.sidebar-menu > li > a > i {
    color: var(--bm-text-muted) !important;
    font-size: 1.15rem !important;
    width: 28px !important;
    transition: color .15s;
}

/* Hover */
.sidebar-menu > li:hover > a {
    background: var(--bm-green-light) !important;
    color: var(--bm-green) !important;
    border-left-color: transparent !important;
}
.sidebar-menu > li:hover > a > i {
    color: var(--bm-green) !important;
}

/* Item actif — fond vert pâle + texte vert + barre gauche */
.sidebar-menu > li.active > a,
.sidebar-menu > li.current-page > a {
    background: var(--bm-green-light) !important;
    color: var(--bm-green) !important;
    font-weight: 600;
    border-left-color: transparent !important;
    box-shadow: none;
    position: relative;
}
.sidebar-menu > li.active > a::before,
.sidebar-menu > li.current-page > a::before {
    content: '';
    position: absolute;
    left: -10px; top: 20%; bottom: 20%;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--bm-green);
}
.sidebar-menu > li.active > a > i,
.sidebar-menu > li.current-page > a > i {
    color: var(--bm-green) !important;
}
.sidebar-menu > li.active > a:after { display: none !important; }
.sidebar-menu > li.active > a:hover,
.sidebar-menu > li.current-page > a:hover {
    background: #E2F0D0 !important;
}

/* Flèche treeview */
.sidebar-menu > li.treeview:after {
    color: var(--bm-text-muted) !important;
    right: 20px !important;
}
.sidebar-menu > li.treeview.active:after,
.sidebar-menu > li.treeview.current-page:after {
    color: var(--bm-green) !important;
}

/* Sous-menus */
.sidebar-menu > li > .treeview-menu {
    background: var(--bm-green-pale) !important;
    border-radius: var(--bm-radius-sm);
    margin: 0 10px 6px !important;
    padding: 4px 0 !important;
    border-left: none !important;
}
.treeview-menu > li {
    border-left: none !important; border: none !important;
    background: none !important; list-style: none !important;
}
.treeview-menu > li::before,
.treeview-menu > li::after { display: none !important; }
.treeview-menu > li > a {
    color: var(--bm-text-sub) !important;
    padding: 6px 14px 6px 20px !important;
    font-size: 0.81rem !important;
    font-weight: 400;
    border-radius: var(--bm-radius-xs);
    margin: 1px 6px;
    display: block;
    text-decoration: none;
    border-left: none !important;
    transition: color .15s, background .15s;
}
.treeview-menu > li > a:hover {
    color: var(--bm-green) !important;
    background: var(--bm-green-light) !important;
}
.treeview-menu > li.active > a {
    color: var(--bm-green) !important;
    background: var(--bm-green-light) !important;
    font-weight: 600;
}

/* Lien externe */
.sidebar-menu a[target="_blank"] .menu-text::after,
.treeview-menu a[target="_blank"]::after {
    content: "\F1C5";
    font-family: "bootstrap-icons";
    font-size: .62rem; opacity: .4;
    margin-left: 5px; vertical-align: middle;
    display: inline-block;
}

/* Chrono — adapté fond blanc */
#chronowrap { color: var(--bm-text-sub) !important; }
#chronowrap p { color: var(--bm-text) !important; font-size: 40px; }
#chronowrap .btn-outline-info {
    color: var(--bm-green); border-color: var(--bm-green-border);
}
#chronowrap .btn-outline-info:hover {
    background: var(--bm-green); border-color: var(--bm-green); color: #fff;
}
#chronowrap select {
    background: var(--bm-green-pale);
    color: var(--bm-text-sub);
    border-color: var(--bm-green-border);
}

/* =============================================
   APP HEADER
   ============================================= */
.app-header {
    background: var(--bm-body-bg) !important;
    border-bottom: 1px solid var(--bm-border) !important;
    box-shadow: none !important;
}

/* =============================================
   CARDS — effet de profondeur Welly
   ============================================= */
.card {
    background: var(--bm-card-bg) !important;
    border: 1px solid var(--bm-border) !important;
    border-radius: var(--bm-radius) !important;
    box-shadow: var(--bm-shadow-card) !important;
    transition: box-shadow .22s ease, transform .22s ease;
}
.card:hover {
    box-shadow: var(--bm-shadow-md) !important;
    transform: translateY(-1px);
}

.card-header {
    background: #fff !important;
    border-bottom: 1px solid var(--bm-border) !important;
    border-radius: var(--bm-radius) var(--bm-radius) 0 0 !important;
    padding: 0.85rem 1.25rem !important;
    position: relative;
    min-height: unset !important;
}
/* Accent vert gauche */
.card-header::before {
    content: '';
    position: absolute;
    left: 0; top: 14%; bottom: 14%;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--bm-green);
    opacity: 1;
}
/* Normalise tous les titres dans les card-header */
.card-header h1, .card-header h2, .card-header h3,
.card-header h4, .card-header h5, .card-header h6,
.card-header .card-title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--bm-text);
    margin: 0 !important;
    line-height: 1.4;
}
.card-header .card-title i,
.card-header h5 i { color: var(--bm-green); }

/* Card-body : padding réduit en haut pour rapprocher le tableau du header */
.card-body { padding: 0.6rem 1.25rem 1rem !important; }
/* Tables flush — rapproche le tableau du bord */
.card-body > .table-responsive { margin-top: -0.1rem; }

/* =============================================
   TABLES — style Soft
   ============================================= */
.table { font-size: .9rem; }

.table thead th {
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--bm-text-sub) !important;
    border-bottom: 2px solid var(--bm-green-border) !important;
    padding: .75rem .9rem;
    background: transparent;
}
.table tbody td {
    padding: .75rem .9rem;
    vertical-align: middle;
    border-color: var(--bm-border);
    color: var(--bm-text);
    font-weight: 500;
}
/* Première colonne de données (nom patient, libellé…) en gras */
.table tbody td:nth-child(2) { font-weight: 600; }
.table tbody tr { transition: background .12s ease; }
.table tbody tr:hover > * {
    background: var(--bm-green-light) !important;
}
.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(72,128,29,.045) !important;
}

/* =============================================
   BOUTONS
   ============================================= */
.btn {
    border-radius: var(--bm-radius-sm) !important;
    font-size: .835rem !important;
    font-weight: 500 !important;
    transition: all .18s ease !important;
}
.btn-primary {
    background: var(--bm-green) !important;
    border-color: var(--bm-green) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(72,128,29,.28) !important;
}
.btn-primary:hover, .btn-primary:focus {
    background: var(--bm-green-dark) !important;
    border-color: var(--bm-green-dark) !important;
    box-shadow: 0 4px 16px rgba(72,128,29,.38) !important;
    transform: translateY(-1px);
    color: #fff !important;
}
.btn-outline-primary {
    color: var(--bm-green) !important;
    border-color: var(--bm-green) !important;
}
.btn-outline-primary:hover {
    background: var(--bm-green) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(72,128,29,.25) !important;
    transform: translateY(-1px);
}
.btn-info {
    background: var(--bm-green-light) !important;
    border-color: var(--bm-green-border) !important;
    color: var(--bm-green) !important;
    box-shadow: none !important;
}
.btn-info:hover {
    background: #ddf0bc !important;
    color: var(--bm-green-dark) !important;
}
.btn-success {
    background: #2a7f62 !important;
    border-color: #2a7f62 !important;
    box-shadow: 0 2px 8px rgba(42,127,98,.28) !important;
}
.btn-success:hover {
    background: #1e6349 !important;
    border-color: #1e6349 !important;
    transform: translateY(-1px);
}
.btn-outline-success {
    color: #2a7f62 !important;
    border-color: #2a7f62 !important;
}
.btn-outline-success:hover {
    background: #2a7f62 !important;
    color: #fff !important;
}
.btn-danger {
    background: #C0392B !important;
    border-color: #C0392B !important;
    box-shadow: 0 2px 8px rgba(192,57,43,.25) !important;
}
.btn-outline-danger {
    color: #C0392B !important;
    border-color: #C0392B !important;
}
.btn-outline-danger:hover {
    background: #C0392B !important;
    color: #fff !important;
}
.btn-secondary {
    background: #64748B !important;
    border-color: #64748B !important;
}
.btn-sm { padding: .3rem .7rem !important; font-size: .78rem !important; }

/* =============================================
   FORMULAIRES
   ============================================= */
.form-control, .form-select {
    border-radius: var(--bm-radius-sm) !important;
    border-color: var(--bm-border-dark) !important;
    background: #FAFCF8 !important;
    font-size: .875rem;
    color: var(--bm-text);
    transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--bm-green) !important;
    box-shadow: 0 0 0 3px rgba(72,128,29,.14) !important;
    background: #fff !important;
}
.form-label {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--bm-text-muted);
}
.input-group-text {
    background: var(--bm-green-light) !important;
    border-color: var(--bm-border-dark) !important;
    color: var(--bm-green) !important;
}

/* =============================================
   BADGES
   ============================================= */
.badge {
    font-size: .68rem; font-weight: 600;
    letter-spacing: .04em;
    border-radius: 20px !important;
    padding: .3em .7em;
}
.badge.bg-secondary {
    background: #E2E8F0 !important;
    color: #475569 !important;
}
.badge.bg-primary {
    background: var(--bm-green) !important;
}

/* =============================================
   ALERTS
   ============================================= */
.alert {
    border-radius: var(--bm-radius-sm) !important;
    border: none !important;
    font-size: .875rem;
}
.alert-success {
    background: var(--bm-green-light) !important;
    color: var(--bm-green-dark) !important;
}
.alert-danger  { background: #FEF2F2 !important; color: #991B1B !important; }
.alert-warning { background: #FFFBEB !important; color: #92400E !important; }
.alert-info    { background: #EFF6FF !important; color: #1E40AF !important; }

/* =============================================
   MODALS
   ============================================= */
.modal-content {
    border: none !important;
    border-radius: var(--bm-radius) !important;
    box-shadow: var(--bm-shadow-lg) !important;
}
.modal-header {
    border-bottom: 1px solid var(--bm-border) !important;
    padding: 1.15rem 1.5rem !important;
    background: var(--bm-green-pale);
}
.modal-footer {
    border-top: 1px solid var(--bm-border) !important;
    padding: 1rem 1.5rem !important;
}
.modal-title { font-weight: 600; color: var(--bm-text); }

/* =============================================
   LIST GROUPS
   ============================================= */
.list-group-item {
    border-color: var(--bm-border) !important;
    font-size: .875rem;
    transition: background .12s;
}
.list-group-item-action:hover {
    background: var(--bm-green-light) !important;
}

/* =============================================
   HERO HEADER (breadcrumb banner) — sobre, sans fond
   ============================================= */
.app-hero-header {
    background: transparent !important;
    border-radius: 0;
    padding: 0.35rem 1.75rem !important;
    margin-bottom: 0.25rem;
    box-shadow: none !important;
}
.app-hero-header .breadcrumb-item,
.app-hero-header .breadcrumb-item a {
    color: var(--bm-text-muted) !important;
    font-size: .8rem;
}
.app-hero-header .breadcrumb-item a:hover { color: var(--bm-green) !important; }
.app-hero-header .breadcrumb-item + .breadcrumb-item::before {
    color: var(--bm-text-muted) !important;
}
.app-hero-header .breadcrumb-item.active { color: var(--bm-text-sub) !important; }

/* =============================================
   STAT CARDS (header Patients / Fiches)
   ============================================= */
.stat-card {
    background: #fff;
    border: 1px solid var(--bm-border);
    border-radius: var(--bm-radius);
    padding: 0.55rem 1.1rem 0.6rem;
    min-width: 88px;
    box-shadow: var(--bm-shadow);
    text-align: center;
    transition: box-shadow .18s, transform .18s;
}
.stat-card:hover {
    box-shadow: var(--bm-shadow-md);
    transform: translateY(-1px);
}
.stat-card .stat-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--bm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.55px;
    margin-bottom: 2px;
}
.stat-card .stat-value {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--bm-text);
    line-height: 1.2;
}

/* =============================================
   COULEURS UTILITAIRES
   ============================================= */
.first-color  { color: var(--bm-green) !important; }
.text-success { color: var(--bm-green) !important; }
.second-color { color: var(--bm-text-sub) !important; font-weight: 600; }
.grey-color   { color: var(--bm-text-muted) !important; font-weight: 500; }
.red          { color: #C0392B; }
.green        { color: #2a7f62; }

/* =============================================
   SEXE ICON
   ============================================= */
.sexeicon { width: 25px; height: 25px; opacity: .5; }

/* =============================================
   SCROLLBARS
   ============================================= */
* { scrollbar-width: thin; scrollbar-color: var(--bm-green-border) transparent; }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-thumb { background: var(--bm-green-border); border-radius: 10px; }

/* =============================================
   DIVERS UTILITAIRES (inchangés)
   ============================================= */
.logo-login, .logo-abo { max-width: 200px; }
.verticaltext {
    writing-mode: vertical-rl; text-orientation: mixed;
    transform: rotate(-180deg);
    filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
}
.bg-image { background-size: contain; background-position: center; background-repeat: no-repeat; }
.div_fiche { width: 100%; }
.div_fiche .row div { height: 40px; padding: 0; text-align: center; cursor: pointer; }
.div_fiche .row div span { opacity: 0; }
.div_fiche .row div.active { background: rgba(72,128,29,.08); }
.div_fiche .row div.formactive { background: url("../../img/check-zone.svg"); }
.div_fiche .row div:nth-child(1) img { width: 38px; float: right; }
.div_fiche .row div:nth-child(2) img { width: 38px; float: left; }
#div_zone_f1 { width:100px; background:url('../../img/female-zone-1.png') no-repeat; margin:auto; }
#div_zone_f2 { width:100px; background:url('../../img/female-zone-2.png') no-repeat; margin:auto; }
#div_zone_f3 { width:100px; background:url('../../img/female-face.png') no-repeat; margin:auto; }
#div_zone_h1 { width:110px; background:url('../../img/male-zone-1.png') no-repeat; margin:auto; }
#div_zone_h2 { width:100px; background:url('../../img/male-zone-2.png') no-repeat; margin:auto; }
.btn-url { height: 40px; }
.btn-url p { display: inline-block; margin: 0; padding: 0; line-height: 26px; }
.btn-url span { display: inline-block; float: right; padding: 0; line-height: 22px; margin-left:15px; font-size: 30px; }
textarea.form-control { height: 100px !important; }
.input-long  { width: 100%; border: none; }
.input-long2 { width: 70%;  border: none; }
.formline { display: inline-block; }
.patientLine { cursor: pointer; }
.fiche_aff p { margin: 0; }
#form_seance_add, #form_pack_add { display: none; }
.custom-combobox { position: relative; display: inline-block; width: 100%; }
#add_new_goole { display: none; }
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button { margin-left: 20px; }
input[type=number] { -moz-appearance: textfield; }

/* Upload */
#files { width: 0; height: 0; overflow: hidden; visibility: hidden; }
#docsWrap { overflow: hidden; float: right; width: 50%; margin: 0; padding: 0; }
.docsWrapFiche { float: none !important; width: 100% !important; }
#docsWrap ul { margin: 0; padding: 0; }
#docsWrap li { background: none; overflow: hidden; border: none; margin-bottom: 7px; }
#docsWrap li a { clear: inherit; margin-left: 10px; }
#docsWrap li > a:first-child,
#docsWrap li > a:nth-child(1),
#docsWrap li > a:nth-child(2) { float: left; width: 60px; margin: 0; }
#docsWrap li span { float: left; display: inline-block; line-height: 40px; clear: inherit; margin-left: 10px; }
#docsWrap img { float: left; border: solid 5px #fff; max-width: 100%; max-height: 40px; box-sizing: border-box; }
#docsWrap img.docs { max-width: 50px; }
.docsSupp { display: inline-block; clear: both; color: #94A3B8 !important; margin: 0; }
.docsSupp:hover { color: #C0392B !important; }
.deleteFile { opacity: .4; }
.deleteFile:hover { opacity: 1; }
#iaLink { clear: both; }

/* Prescription */
.prescriptionarea, .prescmodele { width:45%; float:left; margin-right:4%; margin-bottom:30px; }
.prescmodele { color: #64748B; }
.prescmodele:hover { background: #F8FAFC; cursor: pointer; }
.prescriptionarea textarea.form-control { min-height: 400px !important; }

/* Abonnement */
.bg-abo { background-image:url("../../img/bg-abo.svg"); background-repeat:no-repeat; background-size:cover; overflow-x:hidden; }
h1 { font-family:"M PLUS Rounded 1c",sans-serif; font-weight:400; font-style:normal; font-size:1.8rem; line-height:50px; }
h1 .span1 { font-weight:700; margin-left:100px; }
h1 .span2 { margin-left:75px; color:#64748B; }
h1 .span3 { font-weight:500; margin-left:150px; font-size:2.2rem; }
.h2prix { font-family:"M PLUS Rounded 1c",sans-serif; font-size:2.2rem; }
.h2prix sup { font-size:1.2rem; }
.h2prix span { font-weight:300; font-size:1rem; margin-left:7px; }
.formabo { margin-top:100px; }
.formabo > div { box-shadow:0 10px 15px -3px rgba(0,0,0,.1); }
.login-form li { line-height:40px; }
.login-form i { color: var(--bm-green); }
#sw-js-blob-svg { width:150%; margin-left:100px; }
.bg-abo2 { right:-100px; top:0; }
.bg-abo3 { left:-500px; top:1%; }
.img-abo { width:100%; }
.img-abo img { margin-top:60px; float:left; width:50%; }
.img-abo-left  { transform:skew(-13deg,14deg);  box-shadow:0 10px 15px -3px rgba(0,0,0,.1); }
.img-abo-right { margin-left:-50px; transform:skew(12deg,-12deg); box-shadow:0 10px 15px -3px rgba(0,0,0,.1); }

/* Responsive */
@media only screen and (max-width:1200px) { h1 .span3 { margin-left:50px; } }
@media only screen and (max-width:991px) {
    h1 { font-weight:600; font-size:1.5rem; line-height:40px; }
    h1 .span1 { font-weight:700; margin-left:80px; }
    h1 .span2 { margin-left:35px; }
    h1 .span3 { font-weight:600; margin-left:0; font-size:1.6rem; }
    .img-abo-right { margin-left:0; }
    .formabo { margin-top:80px; }
}

/* Marge haute uniforme sur tous les boutons */
.btn { margin-top: 4px; }
