/* Espace Human Smile – socle (portail, super admin, connexion) */
:root {
  --blue: #2375A6; --blue-d: #1A5C83; --blue-t: #E4EFF6;
  --ink: #14212B; --ink2: #4A5865; --ink3: #7A8792;
  --line: #DCE3E8; --line2: #EDF1F4; --bg: #F3F6F8; --card: #fff;
  --green: #0E7A50; --green-t: #E3F7EE; --orange: #8A5A00; --orange-t: #FFF1D6;
  --red: #B3122E; --red-t: #FDE6E9; --purple: #5B3FA6; --purple-t: #EEE8FB; --teal: #0B6577; --teal-t: #E0F4F7;
  --r: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body.hse-body { background: var(--bg); font-family: 'Alexandria', system-ui, sans-serif; color: var(--ink); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--blue-d); }
button, input, select, textarea { font: inherit; color: inherit; }
.hse-h1 { margin: 0; font: 800 28px/1.2 Raleway, sans-serif; }
.hse-h2 { margin: 0; font: 800 18px/1.25 Raleway, sans-serif; }
.hse-muted { color: var(--ink2); }
.hse-small { font-size: 12px; }
.hse-loading { padding: 80px 20px; text-align: center; color: var(--ink2); }
.hse-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; }

/* Connexion et messages */
.hse-center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.hse-login, .hse-msg { width: 100%; max-width: 400px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.hse-msg { padding: 28px 22px; }
.hse-mark { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.hse-mark-txt { background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; font: 800 20px Raleway, sans-serif; }
.hse-login-card { width: 100%; padding: 20px; text-align: left; margin-top: 8px; }
.hse-login-card form p { margin: 0 0 14px; display: flex; flex-direction: column; gap: 6px; }
.hse-login-card label { font-size: 12px; font-weight: 600; color: var(--ink2); }
.hse-login-card input[type=text], .hse-login-card input[type=password] { min-height: 48px; border: 1px solid #C9D3DA; border-radius: var(--r); padding: 0 14px; font-size: 15px; }
.hse-login-card .login-remember label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; }
.hse-login-card .login-remember input { width: 18px; height: 18px; accent-color: var(--blue); }
.hse-login-card input[type=submit] { width: 100%; min-height: 52px; border: 0; border-radius: 14px; background: var(--blue); color: #fff; font: 700 16px Raleway, sans-serif; cursor: pointer; }
.hse-lost { text-align: center; margin: 4px 0 0; font-size: 13px; font-weight: 600; }
.hse-alert { width: 100%; border-radius: var(--r); padding: 10px 14px; font-size: 13px; }
.hse-alert-err { background: var(--red-t); color: var(--red); }
.hse-alert-ok { background: var(--green-t); color: var(--green); }
.hse-link { font-size: 13px; color: var(--ink2); }

/* En-tête */
.hse-top { background: #fff; border-bottom: 1px solid var(--line); }
.hse-top-in { max-width: 1280px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hse-logo { width: 40px; height: 40px; border-radius: 50%; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; font: 800 14px Raleway, sans-serif; flex: none; text-decoration: none; overflow: hidden; }
.hse-logo img { width: 100%; height: 100%; object-fit: cover; }
.hse-brand { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.hse-brand b { font: 800 17px Raleway, sans-serif; }
.hse-brand span { font-size: 12px; color: var(--ink2); }
.hse-top-r { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.hse-me { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border: 1px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; }
.hse-me b { font-size: 13px; font-weight: 600; display: block; }
.hse-me small { font-size: 11px; color: var(--ink2); display: block; }
.hse-av { width: 32px; height: 32px; border-radius: 50%; background: var(--blue-t); color: var(--blue-d); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; flex: none; }
.hse-badge-super { display: inline-flex; align-items: center; gap: 6px; background: var(--ink); color: #fff; border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 700; }
.hse-tabs { max-width: 1280px; margin: 0 auto; padding: 0 24px; display: flex; gap: 4px; overflow-x: auto; }
.hse-tabs a { padding: 12px 14px; color: var(--ink2); text-decoration: none; font-weight: 600; white-space: nowrap; }
.hse-tabs a.on { color: var(--blue-d); box-shadow: inset 0 -3px 0 var(--blue); }

/* Boutons */
.hse-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: var(--r); border: 1px solid var(--line); background: #fff; color: var(--ink); font: 700 14px Raleway, sans-serif; text-decoration: none; cursor: pointer; white-space: nowrap; }
.hse-btn:hover { border-color: #B9C6CF; }
.hse-btn-p { background: var(--blue); border-color: var(--blue); color: #fff !important; }
.hse-btn-dark { background: var(--ink); border-color: var(--ink); color: #fff !important; }
.hse-btn-r { color: var(--red); border-color: #F1B5BE; }
.hse-btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.hse-btn[disabled] { opacity: .5; cursor: default; }
.hse-ico { width: 42px; height: 42px; border-radius: var(--r); border: 1px solid var(--line); background: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink); text-decoration: none; }

/* Mise en page */
.hse-main { max-width: 1280px; margin: 0 auto; padding: 28px 24px 48px; display: flex; flex-direction: column; gap: 22px; }
.hse-row { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.hse-grow { flex: 999 1 600px; min-width: 0; }
.hse-side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.hse-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.hse-head > div { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 4px; }

/* Tuiles du portail */
.hse-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; align-items: start; }
.hse-tile-desc { font-size: 13px; color: var(--ink2); margin-top: -6px; }
.hse-tile { text-decoration: none; color: inherit; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 14px; transition: border-color .15s, box-shadow .15s; }
.hse-tile:hover { border-color: #B9C6CF; box-shadow: 0 6px 18px rgba(20, 33, 43, .06); }
.hse-tile-h { display: flex; align-items: flex-start; gap: 12px; }
.hse-tile-ic { width: 50px; height: 50px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex: none; }
.hse-tile-t { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.hse-tile-t b { font: 800 18px/1.25 Raleway, sans-serif; }
.hse-tile-t span { font-size: 13px; color: var(--ink2); }
.hse-pill { border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.hse-pill-red { background: #D7263D; color: #fff; }
.hse-pill-orange { background: var(--orange-t); color: var(--orange); }
.hse-pill-grey { background: var(--line2); color: var(--ink2); }
.hse-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hse-stat { background: var(--bg); border-radius: var(--r); padding: 10px 12px; display: flex; flex-direction: column; min-width: 0; }
.hse-stat span { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink2); }
.hse-stat b { font-size: 20px; }
.hse-open { display: flex; align-items: center; gap: 6px; font: 700 14px Raleway, sans-serif; }
.hse-tile-soon { background: #F8FAFB; border: 1px dashed #C9D3DA; color: var(--ink2); }
.hse-tile-soon:hover { box-shadow: none; border-color: #C9D3DA; }
.hse-superbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--ink); color: #fff; border-radius: 18px; padding: 16px 20px; text-decoration: none; }
.hse-superbar span.ic { width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .12); display: flex; align-items: center; justify-content: center; }
.hse-superbar div { flex: 1; min-width: 200px; display: flex; flex-direction: column; }
.hse-superbar div span { font-size: 13px; color: #C9D3DA; }
.hse-todo { list-style: none; margin: 0; padding: 0; }
.hse-todo li { padding: 13px 18px; border-top: 1px solid var(--line2); display: flex; gap: 10px; align-items: flex-start; }
.hse-todo li > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.hse-todo li > div span { font-size: 12px; color: var(--ink2); }
.hse-tag { border-radius: 6px; padding: 1px 7px; font-size: 11px; font-weight: 700; margin-top: 2px; white-space: nowrap; }
.hse-cardhead { padding: 14px 18px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Tableaux */
.hse-tw { overflow-x: auto; }
.hse-tbl { width: 100%; border-collapse: collapse; }
.hse-tbl th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink2); background: #F8FAFB; padding: 11px 12px; white-space: nowrap; }
.hse-tbl td { padding: 11px 12px; border-top: 1px solid var(--line2); vertical-align: middle; }
.hse-tbl th:first-child, .hse-tbl td:first-child { padding-left: 18px; }
.hse-tbl th:last-child, .hse-tbl td:last-child { padding-right: 18px; }
.hse-tbl tr.sel td { background: #F2F8FC; }
.hse-tbl tr.click { cursor: pointer; }
.hse-tbl tr.click:hover td { background: #F7FAFC; }
.hse-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hse-who b { font-weight: 600; display: block; }
.hse-who small { font-size: 12px; color: var(--ink2); display: block; }
.hse-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line2); }
.hse-inp { min-height: 42px; border: 1px solid #C9D3DA; border-radius: 10px; padding: 0 12px; background: #fff; font-size: 14px; width: 100%; }
textarea.hse-inp { padding: 10px 12px; min-height: 70px; resize: vertical; }
.hse-inp-sm { min-height: 38px; font-size: 13px; width: auto; }
.hse-search { position: relative; flex: 1; min-width: 200px; max-width: 320px; display: flex; }
.hse-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink3); }
.hse-search .hse-inp { padding-left: 34px; }
.hse-adj { background: var(--orange-t); color: var(--orange); border-radius: 6px; padding: 1px 6px; font-size: 11px; font-weight: 700; margin-left: 4px; }
.hse-none { color: #9AA8B3; }

/* Statuts (couleurs) */
.hse-st { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.hse-st-blue { background: var(--blue-t); color: var(--blue-d); }
.hse-st-purple { background: var(--purple-t); color: var(--purple); }
.hse-st-green { background: var(--green-t); color: var(--green); }
.hse-st-orange { background: var(--orange-t); color: var(--orange); }
.hse-st-teal { background: var(--teal-t); color: var(--teal); }
.hse-st-red { background: var(--red-t); color: var(--red); }
.hse-st-grey { background: var(--line2); color: var(--ink2); }
.hse-st-super { background: var(--ink); color: #fff; }

/* Panneau d'édition */
.hse-panel { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; }
.hse-panel-h { padding: 14px 18px; border-bottom: 1px solid var(--line2); display: flex; align-items: center; gap: 10px; }
.hse-panel-b { padding: 16px 18px; display: flex; flex-direction: column; gap: 16px; }
.hse-panel-f { padding: 12px 18px; border-top: 1px solid var(--line2); background: #FAFBFC; display: flex; gap: 10px; }
.hse-panel-f .hse-btn { flex: 1; }
.hse-panel-f .hse-btn-p { flex: 2; }
.hse-fld { display: flex; flex-direction: column; gap: 5px; }
.hse-fld > label, .hse-lbl { font-size: 12px; font-weight: 600; color: var(--ink2); }
.hse-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink2); margin: 0 0 8px; }
.hse-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hse-span2 { grid-column: 1 / -1; }
.hse-choice { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; cursor: pointer; }
.hse-choice.on { border: 2px solid var(--blue); background: #F2F8FC; padding: 9px 11px; }
.hse-choice input { margin-top: 3px; accent-color: var(--blue); }
.hse-choice b { font-weight: 600; font-size: 13px; display: block; }
.hse-choice small { font-size: 11px; color: var(--ink2); display: block; }
.hse-acc { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.hse-acc-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; }
.hse-acc-row + .hse-acc-row { border-top: 1px solid var(--line2); }
.hse-acc-row b { flex: 1; font-weight: 600; font-size: 13px; }
.hse-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.hse-check { display: flex; align-items: flex-start; gap: 10px; border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; font-size: 13px; cursor: pointer; }
.hse-check input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--ink); }
.hse-note { display: flex; gap: 10px; align-items: flex-start; background: var(--bg); border-radius: var(--r); padding: 10px 12px; font-size: 13px; color: var(--ink2); }

/* Statuts : cartes */
.hse-scards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.hse-scard { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.hse-colors { display: flex; gap: 6px; }
.hse-color { width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.hse-color.on { border-color: var(--ink); }

/* Journal */
.hse-log { list-style: none; margin: 0; padding: 0; }
.hse-log li { padding: 12px 18px; border-top: 1px solid var(--line2); display: flex; gap: 12px; align-items: flex-start; }
.hse-log li > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.hse-log li > div span { font-size: 12px; color: var(--ink2); }
.hse-log li > small { font-size: 12px; color: var(--ink2); white-space: nowrap; }

/* Fenêtres, menus, messages */
.hse-modal { position: fixed; inset: 0; background: rgba(20, 33, 43, .45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.hse-modal[hidden] { display: none !important; }
.hse-modal-box { width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; background: #fff; border-radius: 20px; box-shadow: 0 24px 60px rgba(20, 33, 43, .25); }
.hse-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 230px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(20, 33, 43, .16); padding: 6px; z-index: 40; display: flex; flex-direction: column; }
.hse-menu a, .hse-menu button { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; text-decoration: none; color: var(--ink); background: none; border: 0; text-align: left; cursor: pointer; font-weight: 600; }
.hse-menu a:hover, .hse-menu button:hover { background: var(--bg); }
.hse-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; opacity: 0; transition: .2s; z-index: 60; max-width: calc(100% - 32px); }
.hse-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.hse-toast.err { background: #B3122E; }
.hse-linkbox { display: flex; gap: 8px; }

@media (max-width: 760px) {
  .hse-top-in { padding: 10px 16px; }
  .hse-main { padding: 18px 16px 40px; }
  .hse-h1 { font-size: 24px; }
  .hse-me b, .hse-me small { display: none; }
  .hse-me { padding: 3px; }
  .hse-hide-sm { display: none !important; }
  .hse-tbl.hse-cards thead { display: none; }
  .hse-tbl.hse-cards tr { display: block; padding: 12px 16px; border-top: 1px solid var(--line2); }
  .hse-tbl.hse-cards td { display: block; border: 0; padding: 3px 0 !important; }
  .hse-grid2 { grid-template-columns: 1fr; }
}
.hse-fresh { position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 55; display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(20, 33, 43, .16); padding: 10px 12px 10px 16px; font-weight: 600; max-width: calc(100% - 24px); }
