/* ==================================================================
   Haishen — thème commun
   Chargé sur toutes les pages via supadmin_bar.php, APRÈS les CSS
   propres à chaque page : il harmonise l'apparence (menu, cartes,
   formulaires, boutons, tableaux) sans toucher au fonctionnement.
   ================================================================== */
:root {
  --hs-ink: #11101d;
  --hs-ink-2: #4a4a5e;
  --hs-muted: #7b7f93;
  --hs-line: #e3e6f0;
  --hs-soft: #f5f7fc;
  --hs-bg: #eef1f8;
  --hs-accent: #2f6fd6;
  --hs-accent-soft: #e8f0fd;
  --hs-radius: 14px;
  --hs-shadow: 0 1px 2px rgba(17,16,29,.04), 0 8px 28px rgba(17,16,29,.06);
}

body { background: var(--hs-bg); }
body, body * { font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }

/* ---------------- Menu latéral ---------------- */
.sidebar { background: linear-gradient(180deg, #14132a 0%, #0f0e1c 100%); box-shadow: 2px 0 18px rgba(17,16,29,.12); }
.sidebar .logo-details { gap: 10px; border-bottom: 1px solid rgba(255,255,255,.06); }
.sidebar .logo-details::before {
  content: "H"; flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, #3d7ff0 0%, #7b52c7 50%, #3d7ff0 100%); background-size: 200% 200%;
  color: #fff; font-size: 19px; font-weight: 700; letter-spacing: -.5px; font-style: italic;
  box-shadow: 0 6px 16px rgba(61,127,240,.35), inset 0 1px 0 rgba(255,255,255,.25);
  text-shadow: 0 1px 2px rgba(0,0,0,.25);
  animation: hsLogo 6s ease-in-out infinite;
}
.sidebar .logo-details .logo_name { font-size: 20px !important; letter-spacing: .4px; }
.sidebar.close .logo-details { gap: 0; }
.sidebar .nav-links { padding-top: 12px; }
.sidebar .nav-links li { margin: 2px 10px; border-radius: 10px; transition: background .15s; }
.sidebar .nav-links li:hover { background: rgba(255,255,255,.07) !important; }
.sidebar .nav-links li a { border-radius: 10px; }
.sidebar .nav-links li i { min-width: 58px !important; height: 44px !important; line-height: 44px !important; font-size: 19px !important; color: #aeb2c8 !important; transition: color .15s; }
.sidebar .nav-links li .link_name { font-size: 14.5px !important; color: #c9cbe0 !important; transition: color .15s; }
.sidebar .nav-links li:hover i, .sidebar .nav-links li:hover .link_name { color: #fff !important; }
.sidebar .nav-links li.is-current { background: rgba(61,127,240,.18) !important; box-shadow: inset 3px 0 0 #6fa3ff; }
.sidebar .nav-links li.is-current i, .sidebar .nav-links li.is-current .link_name { color: #fff !important; }
.sidebar .nav-links li.is-current .link_name { font-weight: 500; }
.sidebar .nav-links li.nav-active::before { display: none; }
.sidebar .profile-details { background: rgba(255,255,255,.04) !important; border-top: 1px solid rgba(255,255,255,.07); }
.sidebar .profile-details .profile_name { font-size: 14px !important; }
.sidebar .profile-details a i { opacity: .8; transition: opacity .15s, transform .15s; }
.sidebar .profile-details a:hover i { opacity: 1; transform: translateX(2px); }

/* ---------------- Barre de titre ---------------- */
.home-section { background: var(--hs-bg) !important; }
.home-section .home-content {
  position: sticky; top: var(--sidebar-banner-offset, 0px); z-index: 50;
  height: 64px !important; padding-right: 24px;
  background: rgba(238,241,248,.86); backdrop-filter: saturate(1.4) blur(8px); -webkit-backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid rgba(17,16,29,.05);
}
.home-section .home-content .bx-menu { font-size: 26px !important; width: 40px; height: 40px; line-height: 40px; text-align: center; border-radius: 10px; margin: 0 12px 0 16px !important; transition: background .15s; }
.home-section .home-content .bx-menu:hover { background: rgba(17,16,29,.06); }
.home-section .home-content .text { font-size: 21px !important; font-weight: 600 !important; color: var(--hs-ink) !important; }

/* ---------------- Cartes de contenu ---------------- */
.home-section > .container,
.home-section > .container-admin,
.home-section > .dashboard-info {
  background: #fff !important;
  border-radius: 16px !important;
  box-shadow: var(--hs-shadow) !important;
  border: 0 !important;
  margin: 20px 24px 24px !important;
  padding: 24px 26px !important;
  width: auto !important;
  max-width: none !important;
}
.home-section > .container-admin + .container-admin { margin-top: 0 !important; }
.home-section > :is(.container, .container-admin) :is(h1, h2) { color: var(--hs-ink); font-weight: 600; letter-spacing: -.2px; }
.home-section > :is(.container, .container-admin) h1 { font-size: 24px; margin-bottom: 18px; }
.home-section > :is(.container, .container-admin) h2 { font-size: 19px; margin-bottom: 14px; }
.home-section > :is(.container, .container-admin) h3 { font-size: 16px; font-weight: 600; color: var(--hs-ink); }
.home-section > :is(.container, .container-admin) label { font-size: 13px; font-weight: 500; color: var(--hs-ink-2); }

/* ---------------- Formulaires ---------------- */
.home-section > :is(.container, .container-admin) :is(
  input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]):not([type=hidden]):not([type=file]):not([type=color]),
  select, textarea) {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #d6dbe8 !important;
  border-radius: 10px !important;
  background-color: #fff;
  color: var(--hs-ink);
  font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
  box-shadow: 0 1px 1px rgba(17,16,29,.03);
}
.home-section > :is(.container, .container-admin) textarea { min-height: 80px; }
.home-section > :is(.container, .container-admin) :is(input, select, textarea):hover { border-color: #b9c1d6 !important; }
.home-section > :is(.container, .container-admin) :is(input, select, textarea):focus {
  outline: none; border-color: var(--hs-accent) !important; box-shadow: 0 0 0 3px rgba(47,111,214,.18);
}
.home-section > :is(.container, .container-admin) :is(input[type=checkbox], input[type=radio]) { accent-color: var(--hs-accent); width: 16px; height: 16px; vertical-align: -3px; }

/* ---------------- Boutons ---------------- */
.home-section :is(button, input[type=submit], input[type=button], a.btn, .btn):not(td *):not(.pp *):not(.swal2-container *):not(.bx-menu) {
  min-height: 40px;
  padding: 8px 18px;
  border-radius: 10px !important;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: transform .06s, box-shadow .15s, filter .15s, background-color .15s;
  box-shadow: 0 1px 2px rgba(17,16,29,.12);
}
.home-section :is(button, input[type=submit], input[type=button], a.btn, .btn):not(td *):not(.pp *):not(.swal2-container *):hover {
  filter: brightness(1.12); box-shadow: 0 4px 12px rgba(17,16,29,.16);
}
.home-section :is(button, input[type=submit], input[type=button], a.btn, .btn):not(td *):not(.pp *):not(.swal2-container *):active { transform: translateY(1px); }
.home-section td :is(button, a) { border-radius: 8px; transition: background-color .15s, color .15s, transform .06s; }

/* ---------------- Tableaux ---------------- */
.home-section > :is(.container, .container-admin) table:not(.pp-table):not(.pp-detail):not(.pp-sites) {
  width: 100%;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border: 1px solid var(--hs-line) !important;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  font-variant-numeric: tabular-nums;
}
.home-section > :is(.container, .container-admin) table:not(.pp-table):not(.pp-detail):not(.pp-sites) th {
  background: var(--hs-ink) !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: .4px;
  padding: 12px 14px !important;
  border: 0 !important;
  border-right: 1px solid rgba(255,255,255,.06) !important;
}
.home-section > :is(.container, .container-admin) table:not(.pp-table):not(.pp-detail):not(.pp-sites) td {
  padding: 10px 14px !important;
  font-size: 14px;
  color: var(--hs-ink-2);
  border: 0 !important;
  border-bottom: 1px solid #edf0f6 !important;
  background-color: transparent;
}
.home-section > :is(.container, .container-admin) table:not(.pp-table):not(.pp-detail):not(.pp-sites) tbody tr:nth-child(even) > td { background-color: #fafbfe; }
.home-section > :is(.container, .container-admin) table:not(.pp-table):not(.pp-detail):not(.pp-sites) tbody tr:hover > td { background-color: #f0f5ff; }
.home-section > :is(.container, .container-admin) table:not(.pp-table):not(.pp-detail):not(.pp-sites) tr:last-child > td { border-bottom: 0 !important; }
.home-section > :is(.container, .container-admin) td a { color: var(--hs-accent); font-weight: 500; text-decoration: none; }
.home-section > :is(.container, .container-admin) td a:hover { text-decoration: underline; }

/* ---------------- Accueil (tableau de bord) ---------------- */
.home-section > .dashboard-info { padding: 28px 30px !important; }
.hs-hello { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.hs-hello h1 { font-size: 26px !important; font-weight: 600; color: var(--hs-ink); margin: 0 !important; }
.hs-hello p { color: var(--hs-muted); margin-top: 4px; font-size: 14px; }
.hs-hello .hs-date { font-size: 13px; color: var(--hs-ink-2); background: var(--hs-soft); border: 1px solid var(--hs-line); padding: 6px 12px; border-radius: 999px; text-transform: capitalize; }
.hs-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-top: 24px; }
.hs-tile {
  display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 14px; text-decoration: none;
  background: var(--hs-soft); border: 1px solid var(--hs-line); color: var(--hs-ink);
  transition: transform .12s, box-shadow .15s, border-color .15s, background .15s;
}
.hs-tile:hover { transform: translateY(-2px); background: #fff; border-color: #cdd6ee; box-shadow: 0 10px 24px rgba(17,16,29,.08); }
.hs-tile i { font-size: 22px; width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--hs-accent-soft); color: var(--hs-accent); }
.hs-tile span { font-size: 14.5px; font-weight: 500; }
.hs-tile:nth-child(4n+2) i { background: #efe9fa; color: #7b52c7; }
.hs-tile:nth-child(4n+3) i { background: #e3f5ec; color: #1f7a50; }
.hs-tile:nth-child(4n+4) i { background: #fdf1e4; color: #b26a12; }

/* ---------------- Connexion ---------------- */
body:has(.login-container) {
  background: radial-gradient(1200px 600px at 20% 0%, #24325e 0%, transparent 60%),
              radial-gradient(900px 600px at 100% 100%, #3b2a6b 0%, transparent 55%),
              #11101d !important;
}
.login-container {
  width: min(400px, calc(100vw - 32px)) !important; padding: 34px 32px 30px !important;
  border-radius: 20px !important; box-shadow: 0 30px 80px rgba(0,0,0,.35) !important; border: 0 !important;
}
.login-container::before {
  content: "H"; display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 16px;
  border-radius: 17px; background: linear-gradient(135deg, #3d7ff0 0%, #7b52c7 50%, #3d7ff0 100%); background-size: 200% 200%;
  color: #fff; font-size: 30px; font-weight: 700; font-style: italic; letter-spacing: -1px;
  box-shadow: 0 12px 28px rgba(61,127,240,.4), inset 0 1px 0 rgba(255,255,255,.25); text-shadow: 0 2px 4px rgba(0,0,0,.25);
  animation: hsLogo 6s ease-in-out infinite;
}
.login-container h2 { font-size: 22px !important; font-weight: 600 !important; color: var(--hs-ink) !important; margin-bottom: 4px !important; }
.login-container h2::after { content: "Bienvenue sur Haishen"; display: block; font-size: 13px; font-weight: 400; color: var(--hs-muted); margin-top: 4px; }
.login-container form { margin-top: 18px; }
.login-container label { font-size: 13px; font-weight: 500; color: var(--hs-ink-2); }
.login-container input { height: 44px; border-radius: 11px !important; border: 1px solid #d6dbe8 !important; margin: 6px 0 14px !important; font-size: 15px !important; transition: border-color .15s, box-shadow .15s; }
.login-container input:focus { outline: none; border-color: var(--hs-accent) !important; box-shadow: 0 0 0 3px rgba(47,111,214,.18); }
.login-container button { height: 46px; border-radius: 11px !important; background: var(--hs-ink) !important; font-size: 15px !important; font-weight: 500; margin-top: 6px; transition: filter .15s, transform .06s; }
.login-container button:hover { filter: brightness(1.25); }
.login-container button:active { transform: translateY(1px); }
.login-container p[style*="color:red"] { background: #fdecea; color: #b3322e !important; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; margin-top: 10px; }
.footer .bubble { background: rgba(255,255,255,.08) !important; color: #b9bccc !important; border: 0 !important; box-shadow: none !important; }
.footer .bubble p { color: #b9bccc !important; font-size: 12px; }

/* ---------------- Petits écrans ---------------- */
@media (max-width: 760px) {
  .home-section > :is(.container, .container-admin, .dashboard-info) { margin: 12px !important; padding: 18px 16px !important; overflow-x: auto; }
  .home-section .home-content .text { font-size: 18px !important; }
}

/* ---------------- Ajustements ---------------- */
.sidebar.close .logo-details .logo_name { width: 0; }
.home-section #taux_retour { height: 40px !important; width: 110px !important; vertical-align: middle; }
.home-section .date-form { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center; gap: 10px 14px; }
.home-section .date-form label { margin: 0 !important; }
@media (max-width: 760px) { .hs-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .hs-tile { padding: 12px; } }

/* ==================================================================
   Animations
   ================================================================== */
@keyframes hsLogo { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes hsUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes hsFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes hsPop { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes hsOut { to { opacity: 0; transform: translateY(6px) scale(.97); } }
@keyframes hsRipple { to { transform: scale(1); opacity: 0; } }
@keyframes hsFloat { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(40px, -30px) scale(1.08); } }
@keyframes hsShake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(2px); } 30%, 50%, 70% { transform: translateX(-4px); } 40%, 60% { transform: translateX(4px); } }

/* Entrée des cartes (backwards : aucune transformation ne reste après l'animation) */
.home-section > :is(.container, .container-admin, .dashboard-info),
.pp > * {
  animation: hsUp .5s cubic-bezier(.2,.8,.2,1) backwards;
}
.home-section > :is(.container, .container-admin, .dashboard-info):nth-of-type(2), .pp > :nth-child(2) { animation-delay: .06s; }
.home-section > :is(.container, .container-admin, .dashboard-info):nth-of-type(3), .pp > :nth-child(3) { animation-delay: .12s; }
.pp > :nth-child(4) { animation-delay: .18s; }
.pp > :nth-child(5) { animation-delay: .24s; }
.home-section .home-content .text { animation: hsFade .4s ease backwards; }

/* Tuiles de l'accueil : en cascade */
.hs-tile { animation: hsUp .45s cubic-bezier(.2,.8,.2,1) backwards; animation-delay: calc(var(--i, 0) * 35ms + .12s); }
.hs-tile i { transition: transform .2s cubic-bezier(.3,1.6,.5,1); }
.hs-tile:hover i { transform: scale(1.12) rotate(-6deg); }
.hs-hello { animation: hsFade .5s ease backwards; }

/* Lignes de tableaux : apparition en cascade (premières lignes) */
.home-section > :is(.container, .container-admin) table:not(.pp-table) tbody tr { animation: hsFade .35s ease backwards; }
.home-section > :is(.container, .container-admin) table:not(.pp-table) tbody tr:nth-child(2) { animation-delay: .03s; }
.home-section > :is(.container, .container-admin) table:not(.pp-table) tbody tr:nth-child(3) { animation-delay: .06s; }
.home-section > :is(.container, .container-admin) table:not(.pp-table) tbody tr:nth-child(4) { animation-delay: .09s; }
.home-section > :is(.container, .container-admin) table:not(.pp-table) tbody tr:nth-child(5) { animation-delay: .12s; }
.home-section > :is(.container, .container-admin) table:not(.pp-table) tbody tr:nth-child(6) { animation-delay: .15s; }
.home-section > :is(.container, .container-admin) table:not(.pp-table) tbody tr:nth-child(7) { animation-delay: .18s; }
.home-section > :is(.container, .container-admin) table:not(.pp-table) tbody tr:nth-child(8) { animation-delay: .21s; }
.home-section > :is(.container, .container-admin) table:not(.pp-table) tbody tr:nth-child(n+9) { animation-delay: .24s; }

/* Menu : petit glissement au survol */
.sidebar .nav-links li i { transition: color .15s, transform .2s cubic-bezier(.3,1.6,.5,1) !important; }
.sidebar .nav-links li:hover i { transform: translateX(2px) scale(1.08); }
.sidebar .nav-links li .link_name { transition: color .15s, transform .2s ease, opacity .3s !important; }
.sidebar .nav-links li:hover .link_name { transform: translateX(3px); }

/* Effet « ripple » au clic */
.hs-ripple-host { overflow: hidden; }
.hs-ripple-pos { position: relative; }
.hs-ripple { position: absolute; border-radius: 50%; pointer-events: none; background: currentColor; opacity: .22; transform: scale(0); animation: hsRipple .55s ease-out forwards; }

/* Transition douce entre les pages (navigateurs récents) */
@view-transition { navigation: auto; }
.sidebar { view-transition-name: hs-sidebar; }
.supadmin-banner { view-transition-name: hs-banner; }
::view-transition-old(root) { animation: .16s ease both hsOutFade; }
::view-transition-new(root) { animation: .22s ease both hsFade; }
@keyframes hsOutFade { to { opacity: 0; } }

/* Connexion : halos lumineux qui flottent + carte qui apparaît */
body:has(.login-container)::before, body:has(.login-container)::after {
  content: ""; position: fixed; z-index: 0; border-radius: 50%; filter: blur(70px); opacity: .55; pointer-events: none;
}
body:has(.login-container)::before { width: 420px; height: 420px; left: -80px; top: -60px; background: #3d7ff0; animation: hsFloat 14s ease-in-out infinite; }
body:has(.login-container)::after { width: 380px; height: 380px; right: -60px; bottom: -80px; background: #7b52c7; animation: hsFloat 17s ease-in-out infinite reverse; }
body:has(.login-container) .main, body:has(.login-container) .footer { position: relative; z-index: 1; }
.login-container { animation: hsPop .55s cubic-bezier(.2,.9,.3,1.15) backwards; }
.login-container:has(p[style*="color:red"]) { animation: hsPop .55s cubic-bezier(.2,.9,.3,1.15) backwards, hsShake .45s .55s ease; }

/* ==================================================================
   Pop-ups : un seul style partout
   ================================================================== */
/* --- Fenêtre maison (remplace alert / confirm) --- */
.hs-dialog { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 16px; }
.hs-dialog-backdrop { position: absolute; inset: 0; background: rgba(17,16,29,.45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: hsFade .2s ease; }
.hs-dialog-box {
  position: relative; width: min(420px, 100%); background: #fff; border-radius: 20px; padding: 26px 24px 20px; text-align: center;
  box-shadow: 0 30px 70px rgba(17,16,29,.3); animation: hsPop .3s cubic-bezier(.2,.9,.3,1.2);
}
.hs-dialog.is-closing .hs-dialog-backdrop { animation: hsOutFade .18s ease forwards; }
.hs-dialog.is-closing .hs-dialog-box { animation: hsOut .18s ease forwards; }
.hs-dialog-icon { width: 54px; height: 54px; margin: 0 auto 12px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; animation: hsPop .4s .08s cubic-bezier(.2,.9,.3,1.4) backwards; }
.hs-dialog--success .hs-dialog-icon { background: #e3f5ec; color: #1f7a50; }
.hs-dialog--error .hs-dialog-icon { background: #fde8e7; color: #c0392b; }
.hs-dialog--info .hs-dialog-icon { background: var(--hs-accent-soft); color: var(--hs-accent); }
.hs-dialog--confirm .hs-dialog-icon { background: #fdf1e4; color: #c27411; }
.hs-dialog-title { font-size: 18px; font-weight: 600; color: var(--hs-ink); margin-bottom: 6px; }
.hs-dialog-text { font-size: 14.5px; line-height: 1.55; color: var(--hs-ink-2); white-space: pre-line; word-break: break-word; }
.hs-dialog-code { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 14px auto 0; padding: 8px 8px 8px 14px; width: fit-content; max-width: 100%;
  background: var(--hs-soft); border: 1px dashed #c9d2e8; border-radius: 12px; font: 600 16px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important; color: var(--hs-ink); letter-spacing: .5px; }
.hs-dialog-code button { font: 500 12.5px 'Poppins', system-ui, sans-serif !important; border: 0; background: var(--hs-ink); color: #fff; border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.hs-dialog-actions { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }
.hs-dialog-actions button {
  min-width: 110px; height: 42px; padding: 0 18px; border-radius: 11px; font-size: 14px; font-weight: 500; cursor: pointer;
  border: 1px solid var(--hs-line); background: #fff; color: var(--hs-ink); transition: filter .15s, transform .06s, box-shadow .15s;
}
.hs-dialog-actions button:hover { box-shadow: 0 4px 12px rgba(17,16,29,.12); }
.hs-dialog-actions button:active { transform: translateY(1px); }
.hs-dialog-actions .hs-primary { background: var(--hs-ink); border-color: var(--hs-ink); color: #fff; }
.hs-dialog-actions .hs-danger { background: #d9534f; border-color: #d9534f; color: #fff; }
.hs-dialog-actions button:focus-visible { outline: 3px solid rgba(47,111,214,.35); outline-offset: 2px; }

/* --- SweetAlert2 (pages Historique, Pêches…) --- */
body .swal2-container.swal2-backdrop-show { background: rgba(17,16,29,.45) !important; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
body .swal2-popup:not(.hs-modal) { border-radius: 20px !important; padding: 26px 24px 22px !important; box-shadow: 0 30px 70px rgba(17,16,29,.3) !important; width: min(32em, calc(100vw - 32px)); }
body .swal2-popup.swal2-show { animation: hsPop .3s cubic-bezier(.2,.9,.3,1.2) !important; }
body .swal2-popup.swal2-hide { animation: hsOut .18s ease forwards !important; }
body .swal2-popup.hs-modal { border-radius: 20px !important; box-shadow: 0 30px 70px rgba(17,16,29,.3) !important; }
body .swal2-popup:not(.hs-modal) .swal2-title { font-size: 19px !important; font-weight: 600 !important; color: var(--hs-ink) !important; padding-top: 6px !important; }
body .swal2-popup:not(.hs-modal) .swal2-html-container { font-size: 14.5px !important; color: var(--hs-ink-2) !important; line-height: 1.55; }
body .swal2-icon { transform: scale(.78); margin: 4px auto 0 !important; }
body .swal2-styled { border-radius: 11px !important; padding: 10px 22px !important; font-size: 14px !important; font-weight: 500 !important; box-shadow: none !important; transition: filter .15s, transform .06s !important; }
body .swal2-styled:hover { filter: brightness(1.12); }
body .swal2-styled:active { transform: translateY(1px); }
body .swal2-styled.swal2-confirm { background: var(--hs-ink) !important; }
body .swal2-styled.swal2-cancel { background: #fff !important; color: var(--hs-ink) !important; border: 1px solid var(--hs-line) !important; }
body .swal2-styled.swal2-deny { background: #d9534f !important; }
body .swal2-styled:focus, body .swal2-styled:focus-visible { box-shadow: 0 0 0 3px rgba(47,111,214,.3) !important; }
body .swal2-popup :is(.swal2-input, .swal2-select, .swal2-textarea) { border-radius: 10px !important; border: 1px solid #d6dbe8 !important; box-shadow: none !important; font-size: 14px !important; }
body .swal2-popup :is(.swal2-input, .swal2-select, .swal2-textarea):focus { border-color: var(--hs-accent) !important; box-shadow: 0 0 0 3px rgba(47,111,214,.18) !important; }
body .swal2-timer-progress-bar { background: var(--hs-accent) !important; }

/* --- Fenêtres maison existantes (Recherche : nouveau contenant, Utilisateurs : permissions) --- */
.modal-overlay { background: rgba(17,16,29,.45) !important; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: hsFade .2s ease; }
.modal:not(.hidden) .modal-dialog, .modal.show .modal-content { animation: hsPop .32s cubic-bezier(.2,.9,.3,1.2) !important; }
.modal-dialog, .modal-content { border-radius: 20px !important; box-shadow: 0 30px 70px rgba(17,16,29,.3) !important; border: 0 !important; overflow: hidden; }
.modal.show { background-color: rgba(17,16,29,.45) !important; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal-header { border-bottom: 1px solid var(--hs-line) !important; }
.modal-header :is(h2, h3) { font-size: 18px !important; font-weight: 600 !important; color: var(--hs-ink); }
.modal-footer { border-top: 1px solid var(--hs-line) !important; }
.modal-header :is(.close, .icon-button) { width: 34px; height: 34px; border-radius: 10px; display: inline-grid; place-items: center; line-height: 1; border: 1px solid var(--hs-line); background: #fff; transition: background .15s; }
.modal-header :is(.close, .icon-button):hover { background: var(--hs-soft); }
.modal-tabs .tab { border-radius: 999px !important; transition: background .15s, color .15s; }
.modal :is(input:not([type=checkbox]):not([type=radio]), select, textarea) { border-radius: 10px !important; border: 1px solid #d6dbe8 !important; min-height: 40px; padding: 8px 12px; }
.modal :is(input, select, textarea):focus { outline: none; border-color: var(--hs-accent) !important; box-shadow: 0 0 0 3px rgba(47,111,214,.18); }

/* Accessibilité : moins d'animations si le système le demande */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  @view-transition { navigation: none; }
}

/* Menu latéral : jamais de barre de défilement visible (le menu reste défilable à la molette / au doigt) */
.sidebar .nav-links { scrollbar-width: none !important; -ms-overflow-style: none !important; padding-bottom: 76px !important; }
.sidebar .nav-links::-webkit-scrollbar { width: 0 !important; height: 0 !important; display: none !important; }
/* Écrans peu hauts : lignes resserrées pour que tout le menu tienne sans défiler */
@media (max-height: 900px) {
  .sidebar .nav-links { padding-top: 6px !important; }
  .sidebar .nav-links li { margin: 1px 10px !important; }
  .sidebar .nav-links li i { height: 37px !important; line-height: 37px !important; font-size: 18px !important; }
  .sidebar .nav-links li .link_name { font-size: 14px !important; }
}
@media (max-height: 740px) {
  .sidebar .nav-links li { margin: 0 10px !important; }
  .sidebar .nav-links li i { height: 31px !important; line-height: 31px !important; font-size: 16px !important; }
  .sidebar .nav-links li .link_name { font-size: 13px !important; }
}
