/* ==========================================================================
   TraLIS — mise en page "application" (pages internes) — v01.01.00
   Lanceur de modules (pages sans parent) + sous-pages du module en haut.
   Même charte que skin.css (indigo, dégradé magenta → bleu) : seule la densité change.
   Tout est limité à .tl-app pour ne pas toucher la page d'accueil (Home.ascx).
   ========================================================================== */

.tl-app { --tl-gutter: 24px; --tl-header-h: 52px; background: #F3FBFC; min-height: 100vh; }

/* ---------- Barre supérieure ---------- */
.tl-app .tl-topbar { font-size: .78rem; }
.tl-app .tl-topbar__in { min-height: 28px; }

/* ---------- En-tête (2 lignes) ---------- */
.tl-appbar { position: sticky; top: 0; z-index: 900; background: #fff; border-bottom: 1px solid var(--tl-line); }
.tl-appbar__row { display: flex; align-items: center; gap: 14px; padding: 0 var(--tl-gutter); min-height: var(--tl-header-h); }
.tl-appbar .tl-logo img { height: 36px; width: auto; }
.tl-appbar__sep { width: 1px; height: 24px; background: var(--tl-line); flex: 0 0 auto; }
.tl-appbar__module { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: .95rem; color: var(--tl-ink); white-space: nowrap; }
.tl-appbar__dot { width: 10px; height: 10px; border-radius: 3px; background: var(--tl-grad); flex: 0 0 auto; }
.tl-appbar .tl-search { margin-left: auto; }

.tl-launcher-btn { width: 38px; height: 38px; flex: 0 0 auto; border: 0; border-radius: 10px; background: var(--tl-bg-soft); color: var(--tl-indigo); display: grid; place-items: center; cursor: pointer; transition: background .15s; }
.tl-launcher-btn:hover, .tl-launcher-btn[aria-expanded="true"] { background: #E8F7F8; }
.tl-launcher-btn:focus-visible { outline: 2px solid var(--tl-blue); outline-offset: 2px; }

/* Recherche : champ arrondi + bouton loupe (le lien "OK" de DNN est transformé en icône) */
.tl-app .tl-search { font-size: .85rem; }
.tl-app .tl-search .SearchContainer, .tl-app .tl-search > span { display: flex; align-items: center; background: var(--tl-bg-soft); border-radius: 999px; padding: 0 4px 0 14px; }
.tl-app .tl-search input[type="text"] { border: 0; background: transparent; outline: 0; padding: 7px 0; min-width: 180px; }
.tl-app .tl-search a { font-size: 0; line-height: 0; width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto; display: block; text-decoration: none;
  background: var(--tl-grad-btn) center / 14px 14px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='7' cy='7' r='4.5' fill='none' stroke='%23fff' stroke-width='1.8'/%3E%3Cpath d='m10.5 10.5 3.5 3.5' stroke='%23fff' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); }
.tl-app .tl-search a.dnnSearchBoxClearText { display: none; }

/* ---------- Sous-pages du module (ligne 2) ---------- */
.tl-subnav { border-top: 1px solid #EEF9FA; padding: 0 var(--tl-gutter); }
.tl-subnav:empty, .tl-subnav[hidden] { display: none; }
.tl-sub { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 2px; }
.tl-sub__item { position: relative; display: flex; align-items: center; }
.tl-page .tl-sub__link { display: flex; align-items: center; height: 40px; padding: 0 12px; color: var(--tl-indigo); font-weight: 700; font-size: .88rem; white-space: nowrap; border-bottom: 3px solid transparent; }
.tl-page .tl-sub__link:hover, .tl-page .tl-sub__item.is-open > .tl-sub__link { color: var(--tl-blue); text-decoration: none; }
.tl-page .tl-sub__item.active > .tl-sub__link { color: var(--tl-blue); border-bottom-width: 3px; border-image: var(--tl-grad) 1; }

.tl-sub__toggle { width: 18px; height: 40px; margin-left: -10px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; }
.tl-sub__toggle::before { content: ""; position: absolute; left: 4px; top: 16px; width: 6px; height: 6px; border-right: 2px solid var(--tl-indigo); border-bottom: 2px solid var(--tl-indigo); transform: rotate(45deg); transition: transform .15s; }
.tl-sub__item.is-open > .tl-sub__toggle::before { transform: rotate(-135deg); top: 19px; }
.tl-sub__toggle:focus-visible { outline: 2px solid var(--tl-blue); }

.tl-sub__drop { list-style: none; margin: 0; padding: 14px 16px 16px; position: absolute; left: 0; top: 100%; z-index: 960; background: #fff; border: 1px solid var(--tl-line); border-top: 0;
  box-shadow: 0 20px 40px rgba(0, 80, 96, .16); min-width: 270px; width: max-content; max-width: calc(100vw - 16px); column-count: 1; column-gap: 28px;
  visibility: hidden; opacity: 0; transform: translateY(6px); transition: opacity .15s ease, transform .15s ease, visibility 0s linear .15s; }
.tl-sub__drop::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--tl-grad); }
.tl-sub__item:hover > .tl-sub__drop, .tl-sub__item:focus-within > .tl-sub__drop, .tl-sub__item.is-open > .tl-sub__drop { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.tl-sub__drop li { margin: 0; break-inside: avoid; }
.tl-page .tl-sub__drop a, .tl-sub__drop span { display: block; padding: 6px 8px; border-radius: 7px; color: var(--tl-muted); font-size: .88rem; font-weight: 500; }
.tl-page .tl-sub__drop a:hover { background: var(--tl-bg-soft); color: var(--tl-blue); text-decoration: none; }
.tl-sub__drop li.active > a { color: var(--tl-blue); font-weight: 700; }

/* ---------- Lanceur de modules ---------- */
.tl-launcher { position: absolute; left: 16px; top: calc(var(--tl-header-h) + 4px); width: 520px; max-width: calc(100vw - 32px); max-height: calc(100vh - 140px); overflow-y: auto;
  background: #fff; border: 1px solid var(--tl-line); border-radius: 16px; box-shadow: 0 24px 56px rgba(0, 80, 96, .30); padding: 16px 16px 12px; z-index: 970; }
.tl-launcher[hidden] { display: none; }
.tl-launcher__search { width: 100%; border: 1px solid #D6EDF0; border-radius: 10px; padding: 9px 12px; font: inherit; font-size: .9rem; margin-bottom: 14px; background: #fff; }
.tl-launcher__search:focus { outline: 2px solid var(--tl-blue); outline-offset: 1px; }
.tl-launcher__title { margin: 0 4px 8px; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--tl-muted); }
.tl-launcher__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.tl-page .tl-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 4px; border-radius: 12px; color: var(--tl-ink); text-align: center; }
.tl-page .tl-tile:hover, .tl-page .tl-tile:focus-visible { background: var(--tl-bg-soft); text-decoration: none; color: var(--tl-ink); }
.tl-tile.is-current { background: #F1FAFB; }
.tl-tile__ico { width: 44px; height: 44px; border-radius: 12px; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1rem; letter-spacing: -.02em; }
.tl-tile__label { font-size: .78rem; font-weight: 700; line-height: 1.2; }
.tl-launcher__list { list-style: none; margin: 0; padding: 0; }
.tl-page .tl-launcher__list a { display: block; padding: 7px 8px; border-radius: 8px; font-size: .86rem; font-weight: 600; color: #3A6266; }
.tl-page .tl-launcher__list a:hover { background: var(--tl-bg-soft); color: var(--tl-blue); text-decoration: none; }
.tl-launcher__recent { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--tl-line); }
.tl-launcher__empty { margin: 4px 8px; font-size: .86rem; color: var(--tl-muted); }
.tl-launcher [hidden] { display: none !important; }

/* ---------- Bandeau de titre compact ---------- */
.tl-app .tl-pagehead { background: linear-gradient(100deg, var(--tl-indigo) 0%, var(--tl-indigo-700) 55%, var(--tl-blue) 150%); border-bottom: 0; padding: 10px 0 13px; }
.tl-app .tl-pagehead::after { height: 3px; }
.tl-app .tl-breadcrumb { margin: 0; font-size: .78rem; color: #BFE3DD; }
.tl-page.tl-app .tl-breadcrumb a, .tl-page.tl-app .tl-breadcrumb span { color: #BFE3DD; }
.tl-page.tl-app .tl-breadcrumb a:hover { color: #fff; text-decoration: none; }
.tl-page.tl-app h1.tl-pagehead__title, .tl-page.tl-app #TitlePane h1, .tl-page.tl-app #TitlePane h2 { color: #fff; font-size: 1.3rem; font-weight: 800; margin: 2px 0 0; letter-spacing: -.01em; }
.tl-pagehead__title:empty { display: none; }

/* ---------- Contenu ---------- */
.tl-app .tl-main { padding: 16px 0 24px; }
.tl-app .tl-layout { gap: 24px; }
.tl-app .tl-cta { padding: 0; }
.tl-app .tl-cta:has(> .DNNEmptyPane:only-child), .tl-app .tl-cta:empty { display: none; }

/* ---------- Pied de page compact ---------- */
.tl-app .tl-footer { padding-top: 0; }
.tl-app .tl-footer__brand { display: none; }
.tl-app .tl-footer__cols:not(:has(> :not(.DNNEmptyPane))) { display: none; }
.tl-app .tl-footer__cols:has(> :not(.DNNEmptyPane)) { padding-top: 28px; }
.tl-app .tl-footer__bottom { margin-top: 0; padding: 10px 0; font-size: .78rem; }

/* ---------- Tablette / mobile ---------- */
@media (max-width: 899px) {
  .tl-app { --tl-gutter: 14px; }
  .tl-appbar__row { flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
  .tl-appbar .tl-search { display: flex; order: 5; flex: 1 1 100%; margin-left: 0; }
  .tl-app .tl-search .SearchContainer, .tl-app .tl-search > span { width: 100%; }
  .tl-app .tl-search input[type="text"] { flex: 1; min-width: 0; }
  .tl-subnav { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tl-sub { flex-wrap: nowrap; }
  .tl-sub__drop { position: fixed; left: 8px; right: 8px; width: auto; max-width: none; top: auto; }
  .tl-page .tl-sub__drop a, .tl-sub__drop span { white-space: normal; }
  .tl-launcher { left: 8px; right: 8px; width: auto; max-width: none; }
  .tl-launcher__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tl-app .tl-topbar__tag { display: none; }
}
@media (prefers-reduced-motion: reduce) { .tl-app * { transition: none !important; } }
.tl-app .tl-breadcrumb[hidden] { display: none; }

/* ---------------------------------------------------------------
   Pages sociales DNN : Flux d'activité, Profil, Amis, Messages
   (modules Console, ViewProfile, Journal, MemberDirectory)
   --------------------------------------------------------------- */
.tl-app .tl-layout__content:has(.DnnModule-Console) { display: flex; flex-direction: column; gap: 14px; }
.tl-app .tl-layout__content .DnnModule { margin: 0; }
.tl-app .dnnLoading, .tl-app .dnnPanelLoading, .tl-app #loading:empty { display: none !important; }
.tl-app .DnnModule-MemberDirectory:has(.mdMemberList:empty):has(.dnnFormMessage:empty) { display: none; }

/* Titre « Navigation » : masqué visuellement, conservé pour l'accessibilité */
.tl-app .DnnModule-Console .heading_wrapper > h4 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Navigation sociale : onglets à pastilles */
.tl-app .DnnModule-Console .console.profile { display: block; padding: 0; margin: 0; background: none !important; border: 0; box-shadow: none; }
.tl-app .DnnModule-Console .console.profile > .console-none { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; background: var(--tl-bg); border: 1px solid var(--tl-line); border-radius: 12px; }
.tl-app .DnnModule-Console .console.profile > .console-none > .console-none { position: relative; flex: 0 0 auto; float: none !important; margin: 0; padding: 0; width: auto !important; min-width: 0; height: auto; background: none; border: 0; border-radius: 8px; }
.tl-app .DnnModule-Console .console.profile > .console-none > .console-none > .console-none { display: none; }
.tl-app .DnnModule-Console .console.profile a { position: absolute; inset: 0; z-index: 1; margin: 0; padding: 0; background: none; border: 0; }
.tl-app .DnnModule-Console .console.profile a::before, .tl-app .DnnModule-Console .console.profile h3::before, .tl-app .DnnModule-Console .console.profile h3::after { display: none; }
.tl-app .DnnModule-Console .console.profile h3 { margin: 0; padding: 8px 16px; font-size: .9rem; line-height: 1.2; font-weight: 700; color: var(--tl-ink); background: none; border: 0; border-radius: 8px; text-transform: none; transition: background .15s, color .15s; }
.tl-app .DnnModule-Console .console.profile > .console-none > .console-none:hover h3 { background: var(--tl-bg-soft); color: var(--tl-indigo-700); }
.tl-app .DnnModule-Console .console.profile > .console-none > .console-none.active h3 { background: var(--tl-grad-btn); color: #fff; }

/* En-tête de profil */
.tl-app #UserDisplayNameHeader h2 { margin: 6px 0 0; font-size: 1.5rem; line-height: 1.2; font-weight: 800; letter-spacing: -.01em; color: var(--tl-indigo); font-family: var(--tl-font); }
.tl-app #ctr_ViewProfile_profileOutput, .tl-app .DnnModule-ViewProfile [id$="_profileOutput"] { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.tl-app #UserProfileImg { flex: 0 0 auto; }
.tl-app #UserProfileImg img, .tl-app img.ProfilePhoto { display: block; width: 88px; height: 88px; object-fit: cover; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 4px 14px rgba(0, 80, 96, .18); }
.tl-app .UserProfileControls ul { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.tl-app .UserProfileControls li { margin: 0; padding: 0; list-style: none; float: none; }
.tl-app .UserProfileControls a, .tl-app .UserProfileControls a:visited { display: inline-flex; align-items: center; height: 40px; padding: 0 18px; margin: 0; border-radius: 10px; font-size: .88rem; font-weight: 700; text-decoration: none; color: var(--tl-indigo-700); background: #fff; border: 1.5px solid var(--tl-line); transition: background .15s, border-color .15s; }
.tl-app .UserProfileControls li:first-child a { color: #fff; background: var(--tl-grad-btn); border-color: transparent; }
.tl-app .UserProfileControls a:hover { background: var(--tl-bg-soft); border-color: var(--tl-violet); }
.tl-app .UserProfileControls li:first-child a:hover { background: var(--tl-grad-btn); filter: brightness(1.08); }

/* Zone de message du journal */
.tl-app .journalTools { margin: 0; }
.tl-app #journalContent { box-sizing: border-box; width: 100%; padding: 12px 14px; font-family: var(--tl-font); font-size: .95rem; color: var(--tl-ink); background: #fff; border: 1.5px solid var(--tl-line); border-radius: 12px; }
.tl-app #journalContent:focus { outline: none; border-color: var(--tl-violet); box-shadow: 0 0 0 3px rgba(67, 179, 160, .18); }
@media (max-width: 640px) { .tl-app .DnnModule-Console .console.profile > .console-none { gap: 4px; } .tl-app .DnnModule-Console .console.profile h3 { padding: 8px 12px; } }

/* ---------------------------------------------------------------
   Formulaires DNN (Mon profil, Gérer le compte, paramètres...)
   --------------------------------------------------------------- */
.tl-app .dnnForm { font-family: var(--tl-font); color: var(--tl-ink); }
.tl-app .tl-layout__content .dnnForm, .tl-app .tl-layout__content > .DnnModule .dnnFormItem { max-width: 980px; }

/* Onglets */
.tl-app ul.dnnAdminTabNav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; padding: 0; border: 0; border-bottom: 1px solid var(--tl-line); }
.tl-app ul.dnnAdminTabNav li { margin: 0; list-style: none; }
.tl-app ul.dnnAdminTabNav li a { display: block; margin: 0; padding: 10px 16px; font-size: .9rem; font-weight: 700; text-decoration: none; color: var(--tl-muted); background: none; border: 0; border-bottom: 3px solid transparent; border-radius: 8px 8px 0 0; }
.tl-app ul.dnnAdminTabNav li a:hover { color: var(--tl-indigo-700); background: var(--tl-bg-soft); }
.tl-app ul.dnnAdminTabNav li.ui-tabs-active a, .tl-app ul.dnnAdminTabNav li.ui-state-active a { color: var(--tl-indigo-700); background: none; border-bottom-color: var(--tl-violet); }

/* Sections repliables */
.tl-app h2.dnnFormSectionHead { margin: 22px 0 12px; padding: 0 0 8px; font-size: 1.05rem; line-height: 1.3; font-weight: 800; color: var(--tl-indigo); border-bottom: 1px solid var(--tl-line); letter-spacing: 0; }
.tl-app h2.dnnFormSectionHead a, .tl-app h2.dnnFormSectionHead > span { display: block; font: inherit; color: inherit; text-decoration: none; }
.tl-app h2.dnnFormSectionHead a:hover { background-color: transparent; color: var(--tl-indigo-700); }

/* Lignes et champs */
.tl-app .dnnFormItem .dnnLabel, .tl-app .dnnFormItem .dnnFormLabel { padding-top: 10px; font-size: .88rem; font-weight: 600; color: var(--tl-ink); }
.tl-app .dnnFormItem input[type=text], .tl-app .dnnFormItem input[type=email], .tl-app .dnnFormItem input[type=password], .tl-app .dnnFormItem input[type=date], .tl-app .dnnFormItem input[type=search], .tl-app .dnnFormItem select, .tl-app .dnnFormItem textarea { box-sizing: border-box; padding: 9px 12px; font-family: var(--tl-font); font-size: .92rem; color: var(--tl-ink); background: #fff; border: 1.5px solid var(--tl-line); border-radius: 10px; transition: border-color .15s, box-shadow .15s; }
.tl-app .dnnFormItem input[type=text]:focus, .tl-app .dnnFormItem input[type=email]:focus, .tl-app .dnnFormItem input[type=password]:focus, .tl-app .dnnFormItem select:focus, .tl-app .dnnFormItem textarea:focus { outline: none; border-color: var(--tl-violet); box-shadow: 0 0 0 3px rgba(67, 179, 160, .18); }
.tl-app .dnnFormItem .dnnFilePicker, .tl-app .dnnFilePicker { background: #fff; border: 1.5px solid var(--tl-line); border-radius: 12px; }

/* Boutons : texte toujours lisible */
.tl-app .dnnForm a.dnnPrimaryAction, .tl-app .dnnForm a.dnnPrimaryAction:visited, .tl-app a.dnnPrimaryAction, .tl-app a.dnnPrimaryAction:visited,
.tl-app .dnnForm input[type=submit], .tl-app .dnnFormItem input[type=submit] { display: inline-flex; align-items: center; justify-content: center; height: 40px; min-width: 120px; padding: 0 20px; margin: 0 8px 8px 0; box-sizing: border-box; font-family: var(--tl-font); font-size: .9rem; font-weight: 700; text-decoration: none; color: #fff; background: var(--tl-grad-btn); border: 0; border-radius: 10px; cursor: pointer; box-shadow: 0 6px 16px rgba(26, 127, 124, .22); }
.tl-app .dnnForm a.dnnPrimaryAction:hover, .tl-app a.dnnPrimaryAction:hover { color: #fff; background: var(--tl-grad-btn); filter: brightness(1.08); }
.tl-app .dnnForm a.dnnSecondaryAction, .tl-app .dnnForm a.dnnSecondaryAction:visited, .tl-app a.dnnSecondaryAction, .tl-app a.dnnSecondaryAction:visited,
.tl-app .dnnForm a.dnnTertiaryAction, .tl-app a.dnnTertiaryAction,
.tl-app .dnnFormItem input[type=button], .tl-app .dnnFormItem input[type=reset] { display: inline-flex; align-items: center; justify-content: center; height: 40px; min-width: 100px; padding: 0 18px; margin: 0 8px 8px 0; box-sizing: border-box; font-family: var(--tl-font); font-size: .9rem; font-weight: 700; text-decoration: none; color: var(--tl-indigo-700); background: #fff; border: 1.5px solid var(--tl-line); border-radius: 10px; cursor: pointer; }
.tl-app .dnnForm a.dnnSecondaryAction:hover, .tl-app a.dnnSecondaryAction:hover { color: var(--tl-indigo-700); background: var(--tl-bg-soft); border-color: var(--tl-violet); }
.tl-app .dnnActions { padding-top: 14px; }

/* Messages */
.tl-app .dnnFormMessage { border-radius: 10px; font-size: .9rem; }
.tl-app .dnnFormMessage.dnnFormSuccess { color: #14532D; }
@media (max-width: 720px) { .tl-app .dnnFormItem .dnnLabel, .tl-app .dnnFormItem .dnnFormLabel { float: none; width: auto; padding: 0 0 4px; margin: 0; text-align: left; } .tl-app .dnnFormItem input[type=text], .tl-app .dnnFormItem select, .tl-app .dnnFormItem textarea { width: 100%; max-width: none; } }

/* Sous-pages de niveau 3 et 4 : groupes dans le menu déroulant (ex. Dossiers Maritimes > Import / Export) */
.tl-sub__drop li.has-children { margin-bottom: 4px; }
.tl-page .tl-sub__drop li.has-children > a, .tl-sub__drop li.has-children > span { color: var(--tl-ink); font-weight: 700; }
.tl-sub__group { list-style: none; margin: 0 0 4px 12px; padding: 0 0 0 10px; border-left: 2px solid var(--tl-line); }
.tl-page .tl-sub__group a, .tl-sub__group span { padding: 4px 8px; font-size: .84rem; }
.tl-sub__group li.active > a { color: var(--tl-blue); font-weight: 700; }

/* Libellés des menus : jamais sur deux lignes */
.tl-page .tl-sub__drop a, .tl-sub__drop span, .tl-page .tl-sub__group a, .tl-sub__group span { white-space: nowrap; }
.tl-sub__drop li { break-inside: avoid; }

/* ===============================================================
   Version 01.04.00 : icônes, animations, thème sombre, accueil
   =============================================================== */

/* ---------- Icônes ---------- */
.tl-ico { font-style: normal; display: inline-flex; flex: 0 0 auto; vertical-align: -3px; margin-right: 8px; opacity: .8; transition: opacity .15s, transform .15s; }
.tl-ico svg { display: block; }
.tl-page .tl-sub__link { gap: 0; }
.tl-sub__link:hover > .tl-ico, .tl-sub__item.active > .tl-sub__link > .tl-ico, .tl-sub__drop a:hover > .tl-ico { opacity: 1; transform: scale(1.08); }
.tl-sub__drop a > .tl-ico, .tl-sub__drop span > .tl-ico { margin-right: 9px; vertical-align: -3px; }
.tl-sub__group .tl-ico { margin-right: 7px; }
.tl-tile__ico svg { display: block; }

/* ---------- Bouton de thème ---------- */
.tl-theme-btn { width: 38px; height: 38px; flex: 0 0 auto; margin-left: auto; border: 0; border-radius: 10px; background: var(--tl-bg-soft); color: var(--tl-indigo); display: grid; place-items: center; cursor: pointer; transition: background .15s, transform .15s; }
.tl-theme-btn + .tl-search { margin-left: 8px; }
.tl-theme-btn:hover { transform: rotate(-12deg); }
.tl-theme-btn:focus-visible { outline: 2px solid var(--tl-blue); outline-offset: 2px; }

/* ---------- Barre de chargement ---------- */
#tlProgress { position: fixed; left: 0; top: 0; height: 3px; width: 0; z-index: 99999; background: var(--tl-grad); box-shadow: 0 0 10px rgba(67, 179, 160, .6); opacity: 0; pointer-events: none; }
#tlProgress.is-on { opacity: 1; width: 82%; transition: width 6s cubic-bezier(.1, .8, .2, 1); }
#tlProgress.is-on.is-done { width: 100%; opacity: 0; transition: width .2s ease, opacity .3s ease .15s; }

/* ---------- Animations ---------- */
@keyframes tl-app-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes tl-app-pop { from { opacity: 0; transform: scale(.97) translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes tl-app-item { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
.tl-app .tl-layout__content > .DnnModule, .tl-app .tl-layout__side > .DnnModule { animation: tl-app-rise .42s cubic-bezier(.2, .7, .2, 1) backwards; }
.tl-app .tl-layout__content > .DnnModule:nth-child(2) { animation-delay: .05s; }
.tl-app .tl-layout__content > .DnnModule:nth-child(3) { animation-delay: .1s; }
.tl-app .tl-layout__content > .DnnModule:nth-child(4) { animation-delay: .15s; }
.tl-app .tl-layout__content > .DnnModule:nth-child(n+5) { animation-delay: .2s; }
.tl-launcher:not([hidden]) { animation: tl-app-pop .18s ease-out; transform-origin: top left; }
.tl-sub__item:hover > .tl-sub__drop > li, .tl-sub__item:focus-within > .tl-sub__drop > li, .tl-sub__item.is-open > .tl-sub__drop > li { animation: tl-app-item .22s ease-out backwards; }
.tl-sub__drop > li:nth-child(2) { animation-delay: .02s; } .tl-sub__drop > li:nth-child(3) { animation-delay: .04s; } .tl-sub__drop > li:nth-child(4) { animation-delay: .06s; }
.tl-sub__drop > li:nth-child(5) { animation-delay: .08s; } .tl-sub__drop > li:nth-child(6) { animation-delay: .1s; } .tl-sub__drop > li:nth-child(n+7) { animation-delay: .12s; }
.tl-page .tl-tile { transition: background .15s, transform .15s; }
.tl-page .tl-tile:hover { transform: translateY(-2px); }
.tl-tile__ico { transition: transform .18s, box-shadow .18s; }
.tl-tile:hover .tl-tile__ico { transform: scale(1.07); box-shadow: 0 8px 18px rgba(0, 80, 96, .22); }
.tl-page .tl-sub__link { transition: color .15s; }
.tl-app .dnnPrimaryAction:active, .tl-app a.dnnPrimaryAction:active { transform: translateY(1px); }
@media (prefers-reduced-motion: reduce) {
  .tl-app *, .tl-app *::before, .tl-app *::after { animation: none !important; transition: none !important; }
  #tlProgress { display: none; }
}

/* ---------- Accueil enrichi ---------- */
.tl-homehero { position: relative; overflow: hidden; color: #fff; background: linear-gradient(135deg, #003640 0%, #005060 45%, #12707A 100%); }
.tl-homehero::before { content: ""; position: absolute; width: 520px; height: 520px; right: -140px; top: -200px; border-radius: 50%; background: radial-gradient(circle, rgba(111, 211, 192, .35), rgba(111, 211, 192, 0) 70%); pointer-events: none; }
.tl-homehero__in { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: center; padding-top: 34px; padding-bottom: 12px; }
.tl-homehero__hello { margin: 0 0 4px; font-size: .95rem; font-weight: 600; color: #D5F0F3; animation: tl-app-rise .5s ease-out backwards; }
.tl-page .tl-homehero__title, .tl-homehero__title { margin: 0 0 18px; font-size: clamp(1.5rem, 2.6vw, 2.2rem); line-height: 1.15; font-weight: 800; letter-spacing: -.02em; color: #fff; animation: tl-app-rise .5s .06s ease-out backwards; }
.tl-ask { display: flex; align-items: center; gap: 10px; max-width: 640px; padding: 6px 6px 6px 14px; background: #fff; border-radius: 14px; box-shadow: 0 14px 34px rgba(0, 30, 36, .35); animation: tl-app-rise .5s .12s ease-out backwards; }
.tl-ask > .tl-ico { margin: 0; color: #1B8F86; opacity: 1; }
.tl-ask input { flex: 1; min-width: 0; height: 42px; border: 0; outline: 0; background: transparent; font: inherit; font-size: .95rem; color: #0B2F36; }
.tl-ask input::placeholder { color: #8AACB0; }
.tl-ask button { flex: 0 0 auto; height: 42px; padding: 0 20px; border: 0; border-radius: 10px; font: inherit; font-weight: 800; font-size: .9rem; color: #fff; cursor: pointer; background: linear-gradient(135deg, #1B8F86, #0F766E); transition: filter .15s, transform .15s; }
.tl-ask button:hover { filter: brightness(1.1); }
.tl-ask button:active { transform: translateY(1px); }
.tl-ask:focus-within { box-shadow: 0 0 0 3px rgba(67, 179, 160, .55), 0 14px 34px rgba(0, 30, 36, .35); }
.tl-ask__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; animation: tl-app-rise .5s .18s ease-out backwards; }
.tl-page .tl-ask__chips a { padding: 6px 13px; border-radius: 999px; font-size: .82rem; font-weight: 600; color: #fff; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18); text-decoration: none; transition: background .15s; }
.tl-page .tl-ask__chips a:hover { background: rgba(255, 255, 255, .24); color: #fff; }
.tl-homehero__visual { position: relative; min-height: 200px; display: flex; justify-content: center; }
.tl-homehero__visual img { display: block; width: 100%; max-width: 560px; height: auto; max-height: 260px; object-fit: contain; }
.tl-homehero__short { position: relative; padding-top: 6px; padding-bottom: 26px; }
.tl-homehero__label { margin: 14px 0 8px; font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #A7DFE5; }
.tl-homehero__tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.tl-page .tl-htile { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 12px; font-size: .84rem; font-weight: 700; color: #fff; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); text-decoration: none; transition: background .15s, transform .15s; }
.tl-page .tl-htile:hover { background: rgba(255, 255, 255, .17); color: #fff; transform: translateY(-2px); }
.tl-htile__ico { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; }
.tl-htile__ico svg { width: 17px; height: 17px; }
.tl-homehero__recent { display: flex; flex-wrap: wrap; gap: 8px; }
.tl-page .tl-homehero__recent a { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; font-size: .82rem; font-weight: 600; color: #E9F7F8; background: rgba(255, 255, 255, .08); text-decoration: none; }
.tl-page .tl-homehero__recent a:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.tl-homehero__recent .tl-ico { margin-right: 7px; }
.tl-app .tl-pagehead--home { display: none; }
@media (max-width: 899px) {
  .tl-homehero__in { grid-template-columns: 1fr; padding-top: 24px; }
  .tl-homehero__visual { display: none; }
  .tl-ask { padding-left: 12px; }
  .tl-ask button { padding: 0 14px; }
}

/* ---------- Thème sombre : l'enveloppe (en-tête, menus, pied) passe en sombre ; les écrans ERP restent sur un panneau clair ---------- */
html[data-tl-theme="dark"] .tl-app {
  color-scheme: dark; --tl-ink: #E6F4F1; --tl-muted: #9CC7C0; --tl-line: #164A52; --tl-bg: #03242A; --tl-bg-soft: #053A42; --tl-surface: #042E35;
  background: var(--tl-bg);
}
html[data-tl-theme="dark"] .tl-appbar, html[data-tl-theme="dark"] .tl-header { background: var(--tl-surface); border-bottom-color: var(--tl-line); }
html[data-tl-theme="dark"] .tl-appbar .tl-logo img { content: url("images/logo-white.png"); }
html[data-tl-theme="dark"] .tl-appbar__module { color: var(--tl-ink); }
html[data-tl-theme="dark"] .tl-launcher-btn, html[data-tl-theme="dark"] .tl-theme-btn { background: var(--tl-bg-soft); color: #CDEBE6; }
html[data-tl-theme="dark"] .tl-page .tl-sub__link { color: var(--tl-ink); }
html[data-tl-theme="dark"] .tl-page .tl-sub__link:hover, html[data-tl-theme="dark"] .tl-page .tl-sub__item.is-open > .tl-sub__link, html[data-tl-theme="dark"] .tl-page .tl-sub__item.active > .tl-sub__link { color: #7FD8C6; }
html[data-tl-theme="dark"] .tl-sub__toggle::before { border-color: #CDEBE6; }
html[data-tl-theme="dark"] .tl-sub__drop, html[data-tl-theme="dark"] .tl-launcher { background: var(--tl-surface); border-color: var(--tl-line); box-shadow: 0 24px 56px rgba(0, 0, 0, .55); }
html[data-tl-theme="dark"] .tl-page .tl-sub__drop a, html[data-tl-theme="dark"] .tl-sub__drop span { color: #B9E1E6; }
html[data-tl-theme="dark"] .tl-page .tl-sub__drop li.has-children > a, html[data-tl-theme="dark"] .tl-sub__drop li.has-children > span { color: var(--tl-ink); }
html[data-tl-theme="dark"] .tl-page .tl-sub__drop a:hover { background: var(--tl-bg-soft); color: #7FD8C6; }
html[data-tl-theme="dark"] .tl-launcher__search { background: var(--tl-bg); color: var(--tl-ink); border-color: var(--tl-line); }
html[data-tl-theme="dark"] .tl-tile.is-current { background: #1F5157; }
html[data-tl-theme="dark"] .tl-app .tl-search .SearchContainer, html[data-tl-theme="dark"] .tl-app .tl-search > span { background: var(--tl-bg-soft); }
html[data-tl-theme="dark"] .tl-app .tl-search input[type="text"] { color: var(--tl-ink); }
html[data-tl-theme="dark"] .tl-main { background: var(--tl-bg); }
/* Panneau de contenu : rendu clair conservé (compatibilité avec les écrans ERP) */
html[data-tl-theme="dark"] .tl-app .tl-layout__content, html[data-tl-theme="dark"] .tl-app .tl-layout__side {
  color-scheme: light; --tl-ink: #0B2F36; --tl-muted: #4F6B70; --tl-line: #DAEBE8; --tl-bg: #FFFFFF; --tl-bg-soft: #F0F8F7;
  background: #F6FCFC; color: #0B2F36; border-radius: 14px; padding: 14px; box-shadow: 0 0 0 1px #164A52;
}
html[data-tl-theme="dark"] .tl-app .tl-pagehead { border-bottom: 1px solid #164A52; }
.tl-page .tl-homehero h2.tl-homehero__title { color: #fff; }
html[data-tl-theme="dark"] .tl-appbar .tl-subnav, html[data-tl-theme="dark"] .tl-appbar__row { border-color: var(--tl-line); }

/* ===== 01.04.01 : accueil compact (sans liste de modules) ===== */
.tl-homehero__in { padding-top: 22px; padding-bottom: 6px; gap: 16px; }
.tl-page .tl-homehero__title, .tl-homehero__title { margin-bottom: 12px; font-size: clamp(1.3rem, 2.2vw, 1.8rem); }
.tl-homehero__visual { min-height: 0; }
.tl-homehero__visual img { max-height: 170px; }
.tl-homehero__short { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding-top: 0; padding-bottom: 16px; }
.tl-homehero__short .tl-homehero__label { margin: 0; white-space: nowrap; }

/* ===== 01.05.04 : thème sombre à contraste élevé (lisibilité renforcée, rapports > 12:1) ===== */
html[data-tl-theme="dark"] .tl-app {
  --tl-ink: #FFFFFF; --tl-muted: #DDF0EC; --tl-line: #3F8C8C; --tl-bg: #021A1F; --tl-bg-soft: #0B3F47; --tl-surface: #052A30;
  letter-spacing: .01em;
}
html[data-tl-theme="dark"] .tl-topbar, html[data-tl-theme="dark"] .tl-page .tl-topbar a, html[data-tl-theme="dark"] .tl-topbar__tag { color: #FFFFFF; }
html[data-tl-theme="dark"] .tl-topbar { background: #021A1F; }
html[data-tl-theme="dark"] .tl-page .tl-sub__link { color: #FFFFFF; font-weight: 700; }
html[data-tl-theme="dark"] .tl-page .tl-sub__link:hover, html[data-tl-theme="dark"] .tl-page .tl-sub__item.is-open > .tl-sub__link, html[data-tl-theme="dark"] .tl-page .tl-sub__item.active > .tl-sub__link { color: #FFD966; }
html[data-tl-theme="dark"] .tl-page .tl-sub__item.active > .tl-sub__link { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
html[data-tl-theme="dark"] .tl-page .tl-sub__drop a, html[data-tl-theme="dark"] .tl-sub__drop span { color: #EEF8F6; font-size: 1rem; font-weight: 500; }
html[data-tl-theme="dark"] .tl-page .tl-sub__drop li.has-children > a, html[data-tl-theme="dark"] .tl-sub__drop li.has-children > span { color: #FFFFFF; font-weight: 800; }
html[data-tl-theme="dark"] .tl-page .tl-sub__drop a:hover { background: #14565F; color: #FFD966; }
html[data-tl-theme="dark"] .tl-page .tl-sub__drop li.active > a { color: #FFD966; font-weight: 800; }
html[data-tl-theme="dark"] .tl-sub__toggle::before { border-color: #FFFFFF; }
html[data-tl-theme="dark"] .tl-launcher-btn, html[data-tl-theme="dark"] .tl-theme-btn { color: #FFFFFF; background: #0E4A53; border: 1px solid #3F8C8C; }
html[data-tl-theme="dark"] .tl-appbar__module, html[data-tl-theme="dark"] .tl-tile__label { color: #FFFFFF; }
html[data-tl-theme="dark"] .tl-app .tl-ico { color: #FFFFFF; opacity: 1; }
html[data-tl-theme="dark"] .tl-app .tl-ico svg { stroke-width: 2; }
html[data-tl-theme="dark"] .tl-tile.is-current { background: #14565F; outline: 2px solid #FFD966; }
html[data-tl-theme="dark"] .tl-app input::placeholder { color: #C9E7E2; opacity: 1; }
html[data-tl-theme="dark"] .tl-launcher__search, html[data-tl-theme="dark"] .tl-app .tl-search input[type="text"] { color: #FFFFFF; border-color: #6CB5AD; }
html[data-tl-theme="dark"] .tl-app .tl-breadcrumb, html[data-tl-theme="dark"] .tl-page.tl-app .tl-breadcrumb a, html[data-tl-theme="dark"] .tl-page.tl-app .tl-breadcrumb span { color: #EEF8F6; }
html[data-tl-theme="dark"] .tl-footer, html[data-tl-theme="dark"] .tl-page .tl-footer a, html[data-tl-theme="dark"] .tl-footer__bottom { color: #DDF0EC; }
html[data-tl-theme="dark"] .tl-homehero__hello, html[data-tl-theme="dark"] .tl-homehero__label { color: #FFD966; }
html[data-tl-theme="dark"] .tl-page .tl-ask__chips a { color: #FFFFFF; border: 1px solid #86C9C0; background: rgba(255, 255, 255, .12); font-weight: 700; }
html[data-tl-theme="dark"] .tl-ask input { color: #0B2F36; }
html[data-tl-theme="dark"] .tl-app :focus-visible { outline: 3px solid #FFD966; outline-offset: 2px; }
/* panneau de contenu ERP : textes secondaires plus foncés */
html[data-tl-theme="dark"] .tl-app .tl-layout__content, html[data-tl-theme="dark"] .tl-app .tl-layout__side { --tl-muted: #3E5E63; --tl-ink: #0A2A30; color: #0A2A30; box-shadow: 0 0 0 2px #6CB5AD; }

/* ===== 01.06.00 : accessibilité, palette Ctrl+K, favoris, notifications, indicateurs, mobile ===== */
.tl-appbar__row { position: relative; }
.tl-skip { position: absolute; left: 8px; top: -60px; z-index: 5000; padding: 10px 16px; border-radius: 10px; background: #005060; color: #fff !important; font-weight: 800; text-decoration: none; transition: top .15s; }
.tl-skip:focus { top: 8px; }
.tl-page .tl-a11y-btn, .tl-pal-btn, .tl-bell { position: relative; }
.tl-bell__badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #D92D20; color: #fff; font-size: .68rem; font-weight: 800; line-height: 18px; text-align: center; }
.tl-a11y { position: absolute; right: 0; top: calc(100% + 6px); z-index: 1300; width: min(340px, calc(100vw - 24px)); padding: 14px; border-radius: 14px; background: var(--tl-surface, #fff); color: var(--tl-ink, #0B2F36); border: 1px solid var(--tl-line, #DAEBE8); box-shadow: 0 24px 56px rgba(0, 80, 96, .22); }
.tl-a11y[hidden], .tl-pal[hidden] { display: none; }
.tl-a11y__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 1rem; }
.tl-a11y__x { width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: inherit; font-size: 1.4rem; cursor: pointer; }
.tl-a11y__group { margin-bottom: 12px; }
.tl-a11y__label { margin-bottom: 6px; font-size: .78rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--tl-muted, #4F6B70); }
.tl-a11y__seg { display: flex; gap: 6px; flex-wrap: wrap; }
.tl-a11y__opt { flex: 1 1 0; min-width: 44px; min-height: 40px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--tl-line, #DAEBE8); background: var(--tl-bg-soft, #F0F8F7); color: inherit; font: inherit; font-weight: 700; cursor: pointer; }
.tl-a11y__opt[aria-pressed="true"] { background: #005060; border-color: #005060; color: #fff; }
.tl-a11y__reset { width: 100%; min-height: 40px; border-radius: 10px; border: 1px dashed var(--tl-line, #C4E5DF); background: transparent; color: inherit; font: inherit; font-weight: 700; cursor: pointer; }
.tl-notif { width: min(380px, calc(100vw - 24px)); max-height: 70vh; overflow: auto; }
.tl-notif__item { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; margin-bottom: 6px; background: var(--tl-bg-soft, #F0F8F7); color: inherit; text-decoration: none; border-left: 4px solid #0F766E; }
.tl-notif__item--warn { border-left-color: #D92D20; }
.tl-notif__t { font-weight: 800; }
.tl-notif__x, .tl-notif__empty { font-size: .85rem; color: var(--tl-muted, #4F6B70); }

/* Palette de recherche */
body.tl-pal-open { overflow: hidden; }
.tl-pal { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: flex-start; justify-content: center; padding: 12vh 12px 0; }
.tl-pal__back { position: absolute; inset: 0; background: rgba(0, 26, 31, .55); backdrop-filter: blur(2px); }
.tl-pal__box { position: relative; width: min(640px, 100%); border-radius: 16px; background: var(--tl-surface, #fff); color: var(--tl-ink, #0B2F36); border: 1px solid var(--tl-line, #DAEBE8); box-shadow: 0 30px 80px rgba(0, 0, 0, .4); overflow: hidden; animation: tl-app-pop .16s ease-out; }
.tl-pal__in { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--tl-line, #DAEBE8); }
.tl-pal__input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: inherit; font: inherit; font-size: 1.05rem; }
.tl-pal__kbd { padding: 2px 7px; border-radius: 6px; border: 1px solid var(--tl-line, #C4E5DF); font-size: .72rem; color: var(--tl-muted, #4F6B70); }
.tl-pal__list { list-style: none; margin: 0; padding: 6px; max-height: 52vh; overflow: auto; }
.tl-pal__item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.tl-pal__item.is-sel { background: var(--tl-bg-soft, #F2FAFB); outline: 2px solid #0F766E; outline-offset: -2px; }
.tl-pal__txt { display: flex; flex-direction: column; min-width: 0; }
.tl-pal__t { font-weight: 700; }
.tl-pal__p { font-size: .8rem; color: var(--tl-muted, #4F6B70); }
.tl-pal__empty { padding: 18px; text-align: center; color: var(--tl-muted, #4F6B70); }

/* Favoris */
.tl-pagehead .tl-wrap { position: relative; }
.tl-fav-btn { position: absolute; right: var(--tl-gutter, 24px); top: 50%; transform: translateY(-50%); width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 12px; background: transparent; color: #BFE3DD; cursor: pointer; }
.tl-fav-btn:hover { background: rgba(255, 255, 255, .14); }
.tl-fav-btn.is-on { color: #FFC83D; }
.tl-fav-btn.is-on svg { fill: currentColor; }
.tl-launcher__fav { margin-bottom: 10px; }
.tl-launcher__favlist { display: flex; flex-wrap: wrap; gap: 8px; }
.tl-launcher__favlink { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; background: var(--tl-bg-soft, #F0F8F7); color: inherit !important; font-weight: 700; font-size: .88rem; text-decoration: none; }
.tl-launcher__favlink .tl-ico { color: #E0A800; }
.tl-launcher__favlink:hover { outline: 2px solid #0F766E; }

/* Indicateurs d'accueil */
.tl-homekpis { background: var(--tl-bg-soft, #F0F8F7); border-bottom: 1px solid var(--tl-line, #DAEBE8); }
.tl-homekpis__in { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; padding-top: 14px; padding-bottom: 14px; }
.tl-kpi-card { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: 14px; background: var(--tl-bg, #fff); border: 1px solid var(--tl-line, #DAEBE8); border-left: 5px solid #0F766E; color: var(--tl-ink, #0B2F36); text-decoration: none; animation: tl-app-rise .45s ease-out backwards; }
.tl-kpi-card--warn { border-left-color: #D92D20; }
.tl-kpi-card--good { border-left-color: #1A8F4A; }
a.tl-kpi-card:hover { box-shadow: 0 10px 24px rgba(0, 80, 96, .14); transform: translateY(-2px); transition: .15s; }
.tl-kpi-card__l { font-size: .8rem; font-weight: 700; color: var(--tl-muted, #4F6B70); }
.tl-kpi-card__v { font-size: 1.6rem; line-height: 1.15; font-weight: 800; }
.tl-kpi-card__h { font-size: .78rem; color: var(--tl-muted, #4F6B70); }

/* Notifications visuelles ($.notify de remplacement) */
.tl-toasts { position: fixed; right: 16px; bottom: 16px; z-index: 4000; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.tl-toast { padding: 12px 16px; border-radius: 12px; background: #005060; color: #fff; font-weight: 600; box-shadow: 0 14px 34px rgba(0, 0, 0, .3); border-left: 5px solid #0F766E; animation: tl-app-rise .25s ease-out; transition: opacity .3s, transform .3s; }
.tl-toast--success { border-left-color: #1A8F4A; } .tl-toast--error { border-left-color: #D92D20; } .tl-toast--warn { border-left-color: #E08A1E; }
.tl-toast.is-out { opacity: 0; transform: translateY(8px); }

/* Barre mobile */
.tl-dock { display: none; }
@media (max-width: 760px) {
  .tl-dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1200; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--tl-surface, #fff); border-top: 1px solid var(--tl-line, #DAEBE8); box-shadow: 0 -8px 24px rgba(0, 80, 96, .12); padding-bottom: env(safe-area-inset-bottom, 0); }
  .tl-dock__item { min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; background: transparent; color: var(--tl-ink, #0B2F36) !important; font: inherit; font-size: .72rem; font-weight: 700; text-decoration: none; cursor: pointer; }
  body { padding-bottom: 64px; }
  .tl-pal-btn, .tl-a11y-btn { display: none; }
  .tl-a11y { position: fixed; left: 12px; right: 12px; top: auto; bottom: 72px; width: auto; }
  .tl-fav-btn { right: 12px; }
  .tl-page button, .tl-page .tl-link, .tl-page select, .tl-page input[type="checkbox"] { min-height: 40px; }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .tl-layout__content table { display: block; overflow-x: auto; }
}

/* Taille du texte, densité */
html[data-tl-fs="115"] .tl-app { zoom: 1.15; } html[data-tl-fs="130"] .tl-app { zoom: 1.3; } html[data-tl-fs="150"] .tl-app { zoom: 1.5; }
html[data-tl-den="compact"] .tl-layout__content { zoom: .92; }
html[data-tl-den="compact"][data-tl-fs="115"] .tl-layout__content { zoom: .92; }

/* Harmonisation des écrans ERP (sans toucher aux couleurs propres aux modules) */
.tl-layout__content, .tl-layout__content input, .tl-layout__content select, .tl-layout__content textarea, .tl-layout__content button { font-family: var(--tl-font); }
.tl-layout__content :focus-visible { outline: 2px solid #0F766E; outline-offset: 2px; }
.tl-layout__content a { text-underline-offset: 3px; }
.tl-layout__content ::-webkit-scrollbar { width: 10px; height: 10px; }
.tl-layout__content ::-webkit-scrollbar-thumb { background: #B6D8DC; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
.tl-layout__content ::-webkit-scrollbar-track { background: transparent; }

/* Contraste élevé (option explicite ou préférence du système) */
html[data-tl-hc="1"] .tl-app a { text-decoration: underline; text-underline-offset: 3px; }
html[data-tl-hc="1"] .tl-app *:focus-visible { outline: 4px solid #FFD966 !important; outline-offset: 2px; }
html[data-tl-hc="1"] .tl-app .tl-appbar, html[data-tl-hc="1"] .tl-app .tl-sub__drop, html[data-tl-hc="1"] .tl-app .tl-launcher { border-width: 2px; border-color: #FFFFFF; }
html[data-tl-hc="1"] .tl-a11y, html[data-tl-hc="1"] .tl-pal__box { border: 2px solid #FFFFFF; }
@media (prefers-contrast: more) { .tl-app a { text-decoration: underline; } .tl-app :focus-visible { outline: 3px solid #FFD966; outline-offset: 2px; } }

/* Mouvement réduit */
@media (prefers-reduced-motion: reduce) {
  .tl-app *, .tl-pal *, .tl-toast, .tl-homehero * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* Marque par client : le logo personnalisé n'est plus remplacé par la version blanche */
html[data-tl-brand][data-tl-theme="dark"] .tl-appbar .tl-logo img { content: normal; }
html[data-tl-theme="dark"] .tl-a11y__opt[aria-pressed="true"] { background: #FFD966; border-color: #FFD966; color: #0A2A30; }
html[data-tl-theme="dark"] .tl-a11y__opt { background: #0B3F47; border-color: #3F8C8C; color: #fff; }
html[data-tl-theme="dark"] .tl-skip { background: #FFD966; color: #0A2A30 !important; }
.tl-theme-btn + .tl-theme-btn { margin-left: 8px; }
.tl-pal, .tl-toasts, .tl-dock, .tl-skip { font-family: var(--tl-font); }
@media (max-width: 760px) { .tl-toasts { bottom: 76px; } }

