/* ==========================================================================
   TraLIS — skin DNN 10 — ERP & IA pour le transport et la logistique
   Charte issue du logo : indigo #1B1464, dégradé magenta #F066FF → bleu #3C66FF
   ========================================================================== */

:root {
  --tl-indigo:      #1B1464;
  --tl-indigo-900:  #120C4A;
  --tl-indigo-700:  #2A2090;
  --tl-blue:        #3C66FF;
  --tl-blue-dark:   #2D52D6;
  --tl-violet:      #AC66FF;
  --tl-pink:        #F066FF;
  --tl-grad:        linear-gradient(135deg, #F066FF 0%, #AC66FF 50%, #3C66FF 100%);
  --tl-grad-btn:    linear-gradient(135deg, #7047F0 0%, #3C66FF 100%);
  --tl-ink:         #1E1B4B;
  --tl-muted:       #5B5F87;
  --tl-line:        #E6E5F5;
  --tl-bg:          #FFFFFF;
  --tl-bg-soft:     #F6F5FF;
  --tl-radius:      14px;
  --tl-shadow:      0 10px 30px rgba(27, 20, 100, .10);
  --tl-font:        "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --tl-gutter:      clamp(16px, 3vw, 56px);
  --tl-header-h:    76px;
}

/* ---------- Base ---------- */
.tl-page { font-family: var(--tl-font); color: var(--tl-ink); background: var(--tl-bg); line-height: 1.6; -webkit-font-smoothing: antialiased; width: 100%; }
.tl-page *, .tl-page *::before, .tl-page *::after { box-sizing: border-box; }
.tl-page img { max-width: 100%; height: auto; }
.tl-page a { color: var(--tl-blue); text-decoration: none; }
.tl-page a:hover, .tl-page a:focus { color: var(--tl-blue-dark); text-decoration: underline; }
.tl-page h1, .tl-page h2, .tl-page h3, .tl-page h4 { color: var(--tl-indigo); line-height: 1.2; margin: 0 0 .6em; font-weight: 800; }
.tl-page h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
.tl-page h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.tl-page h3 { font-size: 1.25rem; }
.tl-page p  { margin: 0 0 1em; }

/* Conteneur PLEIN LARGEUR par défaut (100 %) ; marges latérales fluides.
   Pour une zone centrée, ajouter la classe  tl-wrap--boxed  sur un module HTML ou une section. */
.tl-wrap { width: 100%; max-width: none; margin: 0; padding-left: var(--tl-gutter); padding-right: var(--tl-gutter); }
.tl-wrap--boxed { max-width: 1320px; margin-left: auto; margin-right: auto; }
.tl-grid { display: grid; gap: 24px; }
.tl-grid--3 { grid-template-columns: repeat(3, 1fr); }
.tl-grid--4 { grid-template-columns: repeat(4, 1fr); }

/* Panes vides masqués (sauf en mode édition, pour pouvoir y déposer des modules) */
body:not(.dnnEditState) .tl-page .DNNEmptyPane { display: none; }
body:not(.dnnEditState) .tl-page :is(.tl-cta, .tl-band, .tl-hero, .tl-section):has(> .DNNEmptyPane:only-child) { display: none; }

/* ---------- Boutons ---------- */
.tl-btn, .tl-page a.tl-btn { display: inline-block; padding: .85em 1.7em; border-radius: 999px; font-weight: 700; background: var(--tl-grad-btn); color: #fff; border: 2px solid transparent; transition: filter .2s, transform .2s, box-shadow .2s; text-decoration: none; cursor: pointer; box-shadow: 0 8px 20px rgba(60, 102, 255, .25); }
.tl-btn:hover, .tl-page a.tl-btn:hover { filter: brightness(1.08); color: #fff; text-decoration: none; transform: translateY(-1px); }
.tl-btn--ghost, .tl-page a.tl-btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); box-shadow: none; }
.tl-btn--ghost:hover, .tl-page a.tl-btn--ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.tl-btn--outline, .tl-page a.tl-btn--outline { background: transparent; color: var(--tl-indigo); border-color: var(--tl-indigo); box-shadow: none; }
.tl-btn--sm, .tl-page a.tl-btn--sm { padding: .55em 1.2em; font-size: .9rem; }

/* ---------- Barre supérieure ---------- */
.tl-topbar { background: var(--tl-indigo-900); color: #C9C6F2; font-size: .82rem; }
.tl-topbar__in { display: flex; justify-content: space-between; align-items: center; min-height: 36px; gap: 16px; }
.tl-topbar__tools { display: flex; align-items: center; gap: 16px; }
.tl-page .tl-topbar a, .tl-page .tl-topbar .tl-link { color: #C9C6F2; }
.tl-page .tl-topbar a:hover { color: #fff; text-decoration: none; }
.tl-lang { margin-left: 8px; }

/* ---------- En-tête ---------- */
.tl-header { position: sticky; top: 0; z-index: 900; background: #fff; border-bottom: 1px solid var(--tl-line); transition: box-shadow .2s; }
.tl-header.is-stuck { box-shadow: var(--tl-shadow); }
.tl-header__in { display: flex; align-items: stretch; gap: 28px; min-height: var(--tl-header-h); }
.tl-logo { display: flex; align-items: center; flex: 0 0 auto; }
.tl-logo a { display: flex; align-items: center; }
.tl-logo img { height: 46px; width: auto; display: block; }
.tl-search { display: flex; align-items: center; font-size: .9rem; margin-left: auto; }
.tl-search input[type="text"] { border: 1px solid var(--tl-line); border-radius: 999px; padding: 8px 14px; font: inherit; background: var(--tl-bg-soft); }
.tl-header__cta { display: flex; align-items: center; }

.tl-burger { display: none; background: none; border: 0; padding: 8px; cursor: pointer; margin-left: auto; align-self: center; }
.tl-burger span { display: block; width: 24px; height: 2px; background: var(--tl-indigo); margin: 5px 0; transition: transform .2s, opacity .2s; }

/* ---------- Navigation + MÉGA MENU ---------- */
.tl-nav { flex: 1 1 auto; display: flex; }
.tl-nav ul { list-style: none; margin: 0; padding: 0; }
.tl-nav > ul { display: flex; align-items: stretch; gap: 2px; }
.tl-nav > ul > li { display: flex; align-items: center; }      /* li statique : le panneau se cale sur l'en-tête */
.tl-page .tl-nav__link, .tl-page .tl-nav > ul > li > a { display: flex; align-items: center; height: var(--tl-header-h); padding: 0 14px; color: var(--tl-indigo); font-weight: 700; font-size: .95rem; white-space: nowrap; position: relative; }
.tl-page .tl-nav > ul > li > a:hover, .tl-page .tl-nav > ul > li.active > a, .tl-page .tl-nav > ul > li.open > a { color: var(--tl-blue); text-decoration: none; }
.tl-page .tl-nav > ul > li > a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 14px; height: 3px; border-radius: 3px; background: var(--tl-grad); transform: scaleX(0); transform-origin: left; transition: transform .2s; }
.tl-page .tl-nav > ul > li:hover > a::after, .tl-page .tl-nav > ul > li.active > a::after, .tl-page .tl-nav > ul > li.is-open > a::after { transform: scaleX(1); }

/* Bouton chevron (accessibilité clavier + mobile) */
.tl-nav__toggle { width: 22px; height: 28px; margin-left: -8px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; }
.tl-nav__toggle::before { content: ""; position: absolute; left: 6px; top: 8px; width: 7px; height: 7px; border-right: 2px solid var(--tl-indigo); border-bottom: 2px solid var(--tl-indigo); transform: rotate(45deg); transition: transform .2s; }
.tl-nav li.is-open > .tl-nav__toggle::before { transform: rotate(-135deg); top: 11px; }

/* Panneau méga menu (pleine largeur de la fenêtre) */
.tl-mega { background: #fff; }
.tl-mega__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 28px 40px; }
.tl-mega__col { min-width: 0; }
.tl-mega__title { margin: 0 0 10px; padding-bottom: 10px; position: relative; font-weight: 800; font-size: .95rem; letter-spacing: .01em; color: var(--tl-indigo); }
.tl-mega__title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 36px; height: 3px; border-radius: 3px; background: var(--tl-grad); }
.tl-page .tl-mega__title a, .tl-mega__title span { color: var(--tl-indigo); }
.tl-page .tl-mega__title a:hover { color: var(--tl-blue); text-decoration: none; }
.tl-mega__list li { margin: 0; }
.tl-page .tl-mega__list a, .tl-mega__list span { display: block; padding: 6px 0; color: var(--tl-muted); font-size: .92rem; font-weight: 500; transition: color .15s, padding-left .15s; }
.tl-page .tl-mega__list a:hover { color: var(--tl-blue); padding-left: 6px; text-decoration: none; }
.tl-mega__list li.active > a { color: var(--tl-blue); font-weight: 700; }

@media (min-width: 1100px) {
  .tl-mega { position: absolute; left: 0; right: 0; top: 100%; z-index: 950; padding: 30px var(--tl-gutter) 36px;
             border-top: 3px solid transparent; border-image: var(--tl-grad) 1;
             box-shadow: 0 28px 50px rgba(27, 20, 100, .16); max-height: calc(100vh - 150px); overflow-y: auto;
             visibility: hidden; opacity: 0; transform: translateY(8px);
             transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s; }
  .tl-nav li:hover > .tl-mega, .tl-nav li:focus-within > .tl-mega, .tl-nav li.is-open > .tl-mega
    { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .tl-nav__toggle { pointer-events: none; }   /* au survol sur ordinateur ; reste focusable au clavier */
}

/* ---------- Héro ---------- */
.tl-hero { color: #E9E8FF; padding: 84px 0 96px; position: relative; overflow: hidden;
  background: radial-gradient(900px 520px at 88% -10%, rgba(240,102,255,.38), transparent 60%),
              radial-gradient(760px 520px at 100% 105%, rgba(60,102,255,.50), transparent 60%),
              linear-gradient(135deg, var(--tl-indigo) 0%, var(--tl-indigo-900) 100%); }
.tl-hero__in { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; position: relative; z-index: 1; }
.tl-page .tl-hero h1, .tl-page .tl-hero h2 { color: #fff; }
.tl-hero p { font-size: 1.12rem; color: #CFCDF5; max-width: 62ch; }
.tl-hero__visual img { border-radius: var(--tl-radius); box-shadow: 0 22px 60px rgba(0,0,0,.40); }

/* ---------- Chiffres clés ---------- */
.tl-band { background: var(--tl-bg-soft); border-bottom: 1px solid var(--tl-line); padding: 34px 0; }
.tl-band > .tl-wrap, .tl-band.tl-wrap { text-align: center; }
.tl-kpi__value { display: inline-block; font-size: 2.3rem; font-weight: 800; line-height: 1.1; background: var(--tl-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tl-kpi__label { color: var(--tl-muted); font-size: .92rem; }

/* ---------- Sections ---------- */
.tl-section { padding: 76px 0; }
.tl-section .tl-grid { margin-top: 34px; }
.tl-cta { background: linear-gradient(120deg, var(--tl-indigo) 0%, var(--tl-indigo-700) 55%, var(--tl-blue) 130%); color: #fff; text-align: center; padding: 60px 0; }
.tl-page .tl-cta h2, .tl-page .tl-cta h3 { color: #fff; }
.tl-cta p { color: #D9D7F7; }

/* ---------- Pages internes ---------- */
.tl-pagehead { background: var(--tl-bg-soft); border-bottom: 1px solid var(--tl-line); padding: 28px 0 20px; position: relative; }
.tl-pagehead::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--tl-grad); }
.tl-breadcrumb { font-size: .85rem; color: var(--tl-muted); margin-bottom: 6px; }
.tl-breadcrumb a { color: var(--tl-muted); }
.tl-main { padding: 44px 0 64px; }
.tl-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; }
.tl-layout:has(> .tl-layout__side.DNNEmptyPane) { grid-template-columns: minmax(0, 1fr); }

/* ---------- Pied de page ---------- */
.tl-footer { background: var(--tl-indigo); color: #BEBBEA; padding-top: 52px; }
.tl-footer__brand { padding-bottom: 28px; }
.tl-footer__brand img { height: 56px; width: auto; display: block; }
.tl-page .tl-footer h3, .tl-page .tl-footer h4 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; }
.tl-page .tl-footer a { color: #BEBBEA; }
.tl-page .tl-footer a:hover { color: #fff; }
.tl-footer ul { list-style: none; padding: 0; margin: 0; }
.tl-footer li { margin-bottom: 8px; }
.tl-footer__bottom { border-top: 1px solid rgba(255,255,255,.14); margin-top: 40px; padding: 18px 0; font-size: .85rem; }
.tl-footer__bottom-in { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------- Compatibilité administration DNN (barre d'édition / Personabar) ---------- */
.tl-page { overflow: visible; }

/* ---------- RTL (arabe) ---------- */
[dir="rtl"] .tl-page { text-align: right; }
[dir="rtl"] .tl-search { margin-left: 0; margin-right: auto; }
[dir="rtl"] .tl-burger { margin-left: 0; margin-right: auto; }

/* ---------- Mobile / tablette : menu en accordéon ---------- */
@media (max-width: 1099px) {
  .tl-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .tl-grid--3 { grid-template-columns: 1fr; }
  .tl-hero__in { grid-template-columns: 1fr; }
  .tl-layout { grid-template-columns: 1fr; }
  .tl-burger { display: block; }
  .tl-header__in { flex-wrap: wrap; min-height: 64px; gap: 12px; }
  .tl-logo img { height: 40px; }
  .tl-nav { display: none; flex-basis: 100%; order: 3; padding-bottom: 12px; }
  .tl-nav.is-open { display: block; }
  .tl-nav > ul { flex-direction: column; }
  .tl-nav > ul > li { flex-wrap: wrap; justify-content: space-between; border-bottom: 1px solid var(--tl-line); }
  .tl-page .tl-nav__link, .tl-page .tl-nav > ul > li > a { height: 48px; flex: 1 1 auto; }
  .tl-page .tl-nav > ul > li > a::after { display: none; }
  .tl-nav__toggle { width: 48px; height: 48px; margin-left: 0; }
  .tl-nav__toggle::before { left: 20px; top: 19px; }
  .tl-nav li.is-open > .tl-nav__toggle::before { top: 23px; }
  .tl-mega { display: none; flex-basis: 100%; padding: 4px 0 14px 12px; }
  .tl-nav li.is-open > .tl-mega { display: block; }
  .tl-mega__grid { grid-template-columns: 1fr; gap: 18px; }
  .tl-search, .tl-header__cta { display: none; }
  .tl-topbar__tag { display: none; }
}
@media (max-width: 575px) {
  .tl-grid--4 { grid-template-columns: 1fr; }
  .tl-hero { padding: 56px 0 64px; }
  .tl-section { padding: 48px 0; }
}
@media (prefers-reduced-motion: reduce) { .tl-page * { transition: none !important; } }

