/* Barre de menu commune aux pages publiques de app.towr.fr (voir barre.js).
   Classes en tb- pour ne jamais croiser les styles propres à chaque page.
   Les polices DM Sans et Cooper Hewitt sont déclarées par chaque page. */
.tb {
  --tb-bg: #fafafc; --tb-ink: #161e2d; --tb-soft: #566075; --tb-nav: #3d4555; --tb-line: #dcdce2; --tb-acc: #cc3619;
  position: relative; z-index: 30; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 36px;
  padding: 28px 32px 28px 52px; background: var(--tb-bg); border-bottom: 1px solid rgba(22,30,45,.08);
  font-family: 'DM Sans', 'Helvetica Neue', Arial, sans-serif; line-height: 1.5; color: var(--tb-ink);
}
.tb *, .tb *::before, .tb *::after { box-sizing: border-box; }
.tb-lead { justify-self: start; display: flex; align-items: center; gap: 22px; min-width: 0; }
/* Logo officiel, en masque sur le fichier de l'app : jamais retapé. */
.tb-logo { display: block; width: 150px; aspect-ratio: 704.74 / 167.9; background-color: var(--tb-acc);
  -webkit-mask: url('/app/Logo%20TOWR.svg') center / contain no-repeat; mask: url('/app/Logo%20TOWR.svg') center / contain no-repeat; }
.tb-tag { font-family: 'Cooper Hewitt', 'Helvetica Neue', Arial, sans-serif; font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--tb-ink); white-space: nowrap; }
.tb-r { color: var(--tb-acc); }
.tb .tb-end { display: flex; align-items: center; gap: 28px; margin: 0; padding: 0; font-size: 15px; font-weight: 600; letter-spacing: 0; }
.tb-end { justify-self: end; justify-content: flex-end; }
/* Bouton du milieu : le Smart Link gratuit, cerné (le rouge reste à « Réserver sa place »). */
.tb .tb-mid { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 15px; font-weight: 600; color: var(--tb-ink); text-decoration: none;
  padding: 8px 18px; border: 1px solid var(--tb-line); border-radius: 999px; background: #fff; transition: border-color .15s, color .15s; }
.tb .tb-mid svg { width: 16px; height: 16px; color: var(--tb-acc); }
.tb .tb-mid:hover, .tb .tb-mid[aria-current="page"] { border-color: var(--tb-acc); color: var(--tb-ink); }
.tb-end > a, .tb-login, .tb .tb-cta { white-space: nowrap; }
.tb-end > a, .tb-login { text-decoration: none; color: var(--tb-nav); background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.tb-end > a:hover, .tb-login:hover { color: var(--tb-ink); }
.tb [aria-current="page"] { color: var(--tb-ink); font-weight: 700; }
.tb .tb-cta { background: var(--tb-acc); color: #fff; padding: 7px 16px; border-radius: 10px; transition: opacity .15s; }
.tb .tb-cta:hover { color: #fff; opacity: .88; }
/* Menu : l'icône à gauche du logo, le panneau qui s'ouvre dessous, aligné à gauche de la barre. */
.tb-burger { position: static; }
.tb-burger > summary { list-style: none; display: grid; place-items: center; width: 42px; height: 42px; margin-left: -10px; border-radius: 10px; color: var(--tb-ink); cursor: pointer; transition: background .15s; }
.tb-burger > summary::-webkit-details-marker { display: none; }
.tb-burger > summary:hover, .tb-burger[open] > summary { background: rgba(22,30,45,.06); }
.tb-burger > summary:focus-visible { outline: 2px solid var(--tb-acc); outline-offset: 2px; }
.tb-burger > summary svg { width: 24px; height: 24px; }
.tb-panel { position: absolute; top: calc(100% + 8px); left: 24px; width: max-content; max-width: calc(100vw - 48px); display: grid; grid-template-columns: auto auto; gap: 0 8px; padding: 24px 26px;
  background: var(--tb-bg); border: 1px solid var(--tb-line); border-radius: 20px; box-shadow: 0 30px 60px -28px rgba(22,30,45,.35); text-align: left; white-space: normal; }
.tb-prin { display: flex; flex-direction: column; gap: 14px; padding: 8px 30px 8px 4px; border-right: 1px solid var(--tb-line); }
.tb-prin a { text-decoration: none; color: var(--tb-ink); font-family: 'DM Sans', 'Helvetica Neue', Arial, sans-serif; font-size: 19px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; white-space: nowrap; }
.tb-prin a:hover { color: var(--tb-acc); }
.tb-prin a[aria-current="page"] { color: var(--tb-acc); }
.tb-mega { display: grid; grid-template-columns: repeat(4, auto); gap: 4px 14px; padding-left: 14px; }
.tb-mega > div { padding: 8px 12px; }
.tb-mega .tb-da { --c: #6f5cc4; } .tb-mega .tb-dist { --c: #c63f74; } .tb-mega .tb-mkt { --c: #1d78af; } .tb-mega .tb-live { --c: #278257; }
.tb-grp { display: block; margin-bottom: 14px; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--c); }
.tb-mega ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.tb-mega li { margin: 0; padding: 0; }
.tb-mega ul a, .tb-pied { display: flex; align-items: center; gap: 9px; text-decoration: none; font-family: 'DM Sans', 'Helvetica Neue', Arial, sans-serif; font-size: 15px; font-weight: 500; line-height: 1.3; color: var(--tb-ink); }
.tb-mega ul a { white-space: nowrap; }
.tb-mega ul a:hover { color: var(--c); }
.tb-mega ul a svg, .tb-pied svg { flex: none; width: 17px; height: 17px; color: var(--c, var(--tb-acc)); }
.tb-pied { grid-column: 1 / -1; margin-top: 12px; padding: 18px 12px 6px; border-top: 1px solid var(--tb-line); }
.tb-pied:hover { color: var(--tb-acc); }
@media (max-width: 1120px) { .tb-tag { display: none; } }
/* Le bouton du milieu (« Crée ton Smart Link gratuitement ») prend la place de la signature sous 1380 px. */
@media (max-width: 1380px) { .tb:not(.tb-sobre) .tb-tag { display: none; } }
/* Sous 900 px, plus la place au milieu : le bouton se cache, l'entrée du menu prend le relais. */
@media (max-width: 900px) { .tb { grid-template-columns: 1fr auto; } .tb .tb-mid { display: none; } }
/* Tablette : le détail par bureau passe sous les trois liens, en deux colonnes. */
@media (max-width: 1000px) {
  .tb-panel { grid-template-columns: 1fr; gap: 14px 0; }
  .tb-prin { flex-direction: row; flex-wrap: wrap; gap: 12px 26px; padding: 0 4px 16px; border-right: 0; border-bottom: 1px solid var(--tb-line); }
  .tb-mega { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-left: 0; }
  .tb-mega ul a { white-space: normal; }
}
@media (max-width: 640px) {
  .tb { gap: 12px 14px; padding: 14px 16px; }
  .tb-lead { gap: 10px; }
  .tb-logo { width: 96px; }
  .tb nav.tb-end { gap: 14px; font-size: 14px; }
  .tb .tb-cta { padding: 7px 12px; }
  .tb-panel { left: 12px; max-width: calc(100vw - 24px); width: calc(100vw - 24px); padding: 16px; }
  .tb-prin a { font-size: 18px; }
}
/* Téléphone étroit : « Se connecter » et le bouton rouge passent sur une seconde ligne. */
@media (max-width: 440px) {
  .tb { grid-template-columns: 1fr; }
  .tb nav.tb-end { justify-content: space-between; }
  .tb-mega { grid-template-columns: 1fr; }
}

/* Version app (formule gratuite Lien, barre.js data-mode="app") : pas de bouton au milieu, deux colonnes. */
.tb-app { grid-template-columns: 1fr auto; }
@media (max-width: 440px) { .tb-app { grid-template-columns: 1fr auto; } }

/* Version sobre (page de connexion) : logo et signature, puis le seul retour au site, en bouton cerné. */
.tb-sobre { grid-template-columns: 1fr auto; padding-left: 62px; }
@media (max-width: 640px) { .tb-sobre { padding-left: 16px; } }
.tb .tb-retour { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 14px; font-weight: 600; color: var(--tb-ink); text-decoration: none;
  padding: 10px 18px; border: 1px solid var(--tb-line); border-radius: 10px; background: #fff; transition: border-color .15s; }
.tb .tb-retour:hover { color: var(--tb-ink); border-color: var(--tb-ink); }
@media (max-width: 1120px) and (min-width: 641px) { .tb-sobre .tb-tag { display: inline; } }
@media (max-width: 640px) { .tb .tb-retour { padding: 8px 12px; font-size: 13px; } }
