/* ════════════════════════════════════════════════════════════
   Medys — Espace connecté : styles
   Palette : bleu profond #0e3a5f, accent teal #0e7490
   ════════════════════════════════════════════════════════════ */
:root {
    --medys-primary: #0e3a5f;
    --medys-accent:  #0e7490;
    --medys-soft:    #eef5f9;
    --bs-primary:        #0e7490;
    --bs-primary-rgb:    14,116,144;
}
.btn-primary { --bs-btn-bg:#0e7490; --bs-btn-border-color:#0e7490; --bs-btn-hover-bg:#0b5e74; --bs-btn-hover-border-color:#0b5e74; --bs-btn-active-bg:#0b5e74; }
.text-primary { color: var(--medys-accent) !important; }
a { color: var(--medys-accent); }

/* ─── Sidebar ─── */
.app-sidebar { --lte-sidebar-bg: var(--medys-primary); }
.sidebar-brand { background: rgba(0,0,0,.15); }
.app-sidebar .brand-text { color:#fff; }
.app-sidebar .sidebar-menu .nav-link { color:#cfe0ec; }
.app-sidebar .sidebar-menu .nav-link.active { background: var(--medys-accent); color:#fff; }
.app-sidebar .sidebar-menu .nav-link:hover { background: rgba(255,255,255,.08); color:#fff; }
.app-sidebar .nav-header { color:#7fa6c0; letter-spacing:.04em; font-size:.7rem; }

/* ════════════════════════════════════════════════════════════
   Pages d'authentification
   ════════════════════════════════════════════════════════════ */
.auth-page {
    margin:0; min-height:100vh; display:flex; align-items:center; justify-content:center;
    background: linear-gradient(135deg, #0e3a5f 0%, #0e7490 100%);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.auth-wrap { width:100%; max-width:430px; padding:24px; }
.auth-card { background:#fff; border-radius:18px; padding:38px 34px; box-shadow:0 24px 60px rgba(0,0,0,.25); }
.auth-brand { text-align:center; margin-bottom:26px; }
.auth-brand img { max-height:46px; }
.auth-baseline { color:#64748b; font-size:.85rem; margin-top:8px; }
.auth-title { font-size:1.5rem; font-weight:700; color:var(--medys-primary); margin-bottom:4px; }
.auth-sub { color:#64748b; font-size:.92rem; margin-bottom:22px; }
.auth-links { margin-top:18px; display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap; font-size:.9rem; }
.auth-links a { color:var(--medys-accent); text-decoration:none; }
.auth-links a:hover { text-decoration:underline; }
.auth-footer { text-align:center; color:rgba(255,255,255,.8); font-size:.8rem; margin-top:18px; }
.auth-alert { display:flex; align-items:center; gap:10px; padding:12px 14px; border-radius:10px; font-size:.9rem; margin-bottom:18px; }
.auth-alert--error   { background:#fef2f2; color:#b91c1c; border:1px solid #fecaca; }
.auth-alert--success { background:#f0fdf4; color:#15803d; border:1px solid #bbf7d0; }

/* ════════════════════════════════════════════════════════════
   Cartes & composants de l'app
   ════════════════════════════════════════════════════════════ */
.stat-card { border:none; border-radius:14px; box-shadow:0 4px 14px rgba(15,40,70,.06); }
.stat-card .stat-ico { width:52px; height:52px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:1.3rem; color:#fff; }
.stat-card .stat-val { font-size:1.9rem; font-weight:800; line-height:1; color:var(--medys-primary); }
.stat-card .stat-lbl { color:#64748b; font-size:.85rem; }

.card { border:none; border-radius:14px; box-shadow:0 4px 14px rgba(15,40,70,.05); }
.card-header { background:#fff; border-bottom:1px solid #eef1f5; font-weight:600; }

.act-chip { display:inline-flex; align-items:center; gap:6px; padding:3px 10px; border-radius:999px; font-size:.78rem; font-weight:600; color:#fff; }

/* Timeline du journal */
.timeline-day { border-left:3px solid var(--medys-accent); padding:4px 0 14px 18px; position:relative; }
.timeline-day::before { content:""; position:absolute; left:-8px; top:6px; width:13px; height:13px; border-radius:50%; background:var(--medys-accent); border:3px solid #fff; box-shadow:0 0 0 1px var(--medys-accent); }
.timeline-date { font-weight:700; color:var(--medys-primary); margin-bottom:8px; }

/* Messagerie */
.chat-box { height:420px; overflow-y:auto; background:#f6f9fb; border-radius:12px; padding:16px; }
.chat-msg { max-width:78%; margin-bottom:12px; padding:10px 14px; border-radius:14px; font-size:.9rem; }
.chat-msg .chat-meta { font-size:.72rem; opacity:.7; margin-top:4px; }
.chat-mine { background:var(--medys-accent); color:#fff; margin-left:auto; border-bottom-right-radius:4px; }
.chat-other { background:#fff; border:1px solid #e6ebf1; border-bottom-left-radius:4px; }

.doc-row .doc-ico { width:40px; height:40px; border-radius:10px; display:flex; align-items:center; justify-content:center; background:var(--medys-soft); color:var(--medys-accent); }
.empty-state { text-align:center; padding:48px 20px; color:#94a3b8; }
.empty-state i { font-size:2.4rem; margin-bottom:10px; opacity:.6; }


.app-content{ padding-top: 30px;}

/* ════════════════════════════════════════════════════════════
   Bootstrap-select : aligné sur l'apparence des champs Medys
   ════════════════════════════════════════════════════════════ */
/* neutralise le chrome .form-select hérité par le wrapper (flèche en double) */
.bootstrap-select.form-select,
.bootstrap-select.form-select-sm { background:none; border:0; padding:0; height:auto; box-shadow:none; }

.bootstrap-select > .dropdown-toggle {
    background:#fff; color:#212529; font-weight:400; text-align:left;
    border:1px solid var(--bs-border-color, #dee2e6); border-radius:.375rem;
    padding:.375rem .75rem;
}
.bootstrap-select > .dropdown-toggle:hover { background:#fff; }
.bootstrap-select > .dropdown-toggle:focus,
.bootstrap-select.show > .dropdown-toggle {
    background:#fff; border-color:#6bbcd0; outline:0;
    box-shadow:0 0 0 .25rem rgba(14,116,144,.2);
}
.bootstrap-select > .dropdown-toggle.bs-placeholder { color:#6c757d; }
.bootstrap-select.form-select-sm > .dropdown-toggle { padding:.25rem .5rem; font-size:.875rem; }

.bootstrap-select .dropdown-menu { border-radius:.5rem; border:1px solid #eef1f5; box-shadow:0 8px 24px rgba(15,40,70,.12); }
.bootstrap-select .dropdown-item.selected.active,
.bootstrap-select .dropdown-item.active,
.bootstrap-select .dropdown-item:active { background:var(--medys-accent); color:#fff; }
.bootstrap-select .dropdown-menu .notify { border-radius:.375rem; }

/* ════════════════════════════════════════════════════════════
   Zone de dépôt de document (drag & drop)
   ════════════════════════════════════════════════════════════ */
.dropzone {
    border:2px dashed #cdd9e3; border-radius:12px; background:#f8fafc;
    padding:22px 14px; text-align:center; cursor:pointer; transition:border-color .15s, background .15s;
}
.dropzone:hover, .dropzone:focus { border-color:var(--medys-accent); background:#f1f8fb; outline:none; }
.dropzone.dragover { border-color:var(--medys-accent); background:#e3f2f7; }
.dropzone.has-file { border-style:solid; border-color:#16a34a; background:#f0fdf4; }
.dropzone .dz-ico { font-size:1.8rem; color:var(--medys-accent); margin-bottom:6px; display:block; }
.dropzone.has-file .dz-ico { color:#16a34a; }
.dropzone .dz-text { font-size:.85rem; color:#64748b; margin-bottom:8px; }
.dropzone .dz-filename { margin-top:10px; font-size:.82rem; font-weight:600; color:#15803d; word-break:break-all; }


/**********************   Supprimer les outlines / focus Bootstrap  *************************/

input:focus,
textarea:focus,
select:focus,
button:focus,
.form-control:focus,
.form-select:focus,
.btn:focus,
.btn:active:focus {
    outline: none !important;
    box-shadow: none !important;
}
/**********************   textarea autorisize *************************/

 .grow-wrap {
	/* easy way to plop the elements on top of each other and have them both sized based on the tallest one's height */
	display: grid;
	 
	 
  }
  .grow-wrap::after { 
	/* Note the weird space! Needed to preventy jumpy behavior */
	content: attr(data-replicated-value) " ";
  
	/* This is how textarea text behaves */
	white-space: pre-wrap;
  
	/* Hidden from view, clicks, and screen readers */
	visibility: hidden;
  }
  .grow-wrap > textarea {
	/* You could leave this, but after a user resizes, then it ruins the auto sizing */
	resize: none;
  
	/* Firefox shows scrollbar on growth, you can hide like this. */
	overflow: hidden;
  }

  .grow-wrap > textarea,
  .grow-wrap::after {
	/* Identical styling required!! */
	
	padding: 0.5rem;
	border: 1px solid #dadee3;
  
	/* Place on top of each other */
	grid-area: 1 / 1 / 2 / 2;
  }

/**********************   Supprimer zoom input  *************************/

input,
textarea,
select {
    font-size: 16px;
}

/* ════════════════════════════════════════════════════════════
   Litepicker — accent Medys
   ════════════════════════════════════════════════════════════ */
.lp-input { cursor: pointer; background:#fff; }
.litepicker .container__days .day-item:hover { color:var(--medys-accent); box-shadow: inset 0 0 0 1px var(--medys-accent); }
.litepicker .container__days .day-item.is-today { color:var(--medys-accent); }
.litepicker .container__days .day-item.is-start-date,
.litepicker .container__days .day-item.is-end-date,
.litepicker .container__days .day-item.is-in-range { background-color:var(--medys-accent) !important; color:#fff !important; }
.litepicker .container__footer .button-apply { background-color:var(--medys-accent); }
