:root {
  --di-teal: #0b5d5a;
  --di-teal-dark: #084543;
  --di-sidebar-w: 250px;
}

.bg-dark-teal {
  background-color: var(--di-teal);
}

.text-teal { color: var(--di-teal) !important; }

@media (min-width: 992px) {
  .border-start-lg { border-left: 1px solid rgba(11, 93, 90, .12); }
}

.btn-teal {
  background-color: var(--di-teal);
  border-color: var(--di-teal);
  color: #fff;
}
.btn-teal:hover { background-color: var(--di-teal-dark); border-color: var(--di-teal-dark); color: #fff; }

/* ======================================================================== */
/*  Shell d'application : sidebar (couleur unie) + topbar + contenu         */
/* ======================================================================== */
.app-body { background-color: #f4f6f7; }

.app-shell { min-height: 100vh; }

.app-sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--di-sidebar-w);
  background-color: var(--di-teal);   /* couleur UNIE, sans dégradé */
  color: rgba(255, 255, 255, .85);
  display: flex;
  flex-direction: column;
  padding: 1rem .75rem;
  overflow-y: auto;
  z-index: 1040;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  padding: .35rem .5rem 1rem;
}
.app-brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: .6rem;
  background: rgba(255, 255, 255, .15);
  font-weight: 800; font-size: .85rem;
}

.app-nav { display: flex; flex-direction: column; gap: .15rem; }
.app-nav-link {
  display: flex; align-items: center; gap: .7rem;
  padding: .6rem .75rem;
  border-radius: .6rem;
  color: rgba(255, 255, 255, .82);
  text-decoration: none;
  font-weight: 500;
  transition: background-color .12s ease, color .12s ease;
}
.app-nav-link svg { width: 20px; height: 20px; flex-shrink: 0; }
.app-nav-link:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.app-nav-link.active {
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--bs-warning, #ffc107);
}
.app-nav-sep {
  margin: .9rem .75rem .35rem;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, .45);
}

.app-main {
  margin-left: var(--di-sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-topbar {
  position: sticky; top: 0;
  height: 64px;
  background: #fff;
  border-bottom: 1px solid rgba(11, 93, 90, .1);
  display: flex; align-items: center; gap: .75rem;
  padding: 0 1.25rem;
  z-index: 1030;
}

.app-search { position: relative; flex: 1; max-width: 420px; }
.app-search svg {
  position: absolute; left: .7rem; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: #9aa5a5; pointer-events: none;
}
.app-search input {
  padding-left: 2.2rem;
  background: #f4f6f7;
  border-color: transparent;
  border-radius: .6rem;
}
.app-search input:focus {
  background: #fff;
  border-color: var(--di-teal);
  box-shadow: 0 0 0 .2rem rgba(11, 93, 90, .12);
}

.app-user {
  display: flex; align-items: center; gap: .55rem;
  text-decoration: none; color: #33413f; font-weight: 600;
}
.app-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--di-teal); color: #fff; font-weight: 700;
}
.app-role-badge {
  background: rgba(11, 93, 90, .1) !important;
  color: var(--di-teal) !important;
  font-weight: 600;
}
.app-burger { color: var(--di-teal); border: none; padding: .25rem; }

.app-content { padding: 1.5rem; flex: 1; }

/* Backdrop mobile (caché par défaut) */
.app-backdrop {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .4);
  opacity: 0; visibility: hidden; transition: opacity .15s ease; z-index: 1035;
}

/* --- Responsive : sidebar en tiroir sous 992px ------------------------- */
@media (max-width: 991.98px) {
  .app-sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  .app-main { margin-left: 0; }
  .sidebar-open .app-sidebar { transform: translateX(0); }
  .sidebar-open .app-backdrop { opacity: 1; visibility: visible; }
}

.htmx-indicator {
  opacity: 0;
  transition: opacity 150ms ease-in;
}
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  opacity: 1;
}

.table code {
  color: #6c757d;
}

/* --- Vitrine publique ---------------------------------------------------- */
.hero {
  background:
    radial-gradient(1200px 400px at 15% -10%, rgba(255, 193, 7, .18), transparent 60%),
    linear-gradient(135deg, #0b5d5a 0%, #073f3d 100%);
  color: #fff;
  border-radius: 1rem;
  overflow: hidden;
  position: relative;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .6), transparent 70%);
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }

.stat-card {
  border: 1px solid rgba(11, 93, 90, .12);
  border-radius: .9rem;
  transition: transform .15s ease, box-shadow .15s ease;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 .75rem 1.5rem rgba(11, 93, 90, .12);
}
.stat-icon {
  width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: .75rem;
  background: rgba(11, 93, 90, .1);
  color: var(--di-teal);
}

.step-number {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--di-teal);
  color: #fff; font-weight: 700;
}

.cat-tile {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(11, 93, 90, .12);
  border-radius: .9rem;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.cat-tile:hover {
  transform: translateY(-3px);
  border-color: var(--di-teal);
  box-shadow: 0 .75rem 1.5rem rgba(11, 93, 90, .12);
}

.opp-card { transition: transform .15s ease, box-shadow .15s ease; }
.opp-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 .75rem 1.5rem rgba(0, 0, 0, .1);
}

.cta-band {
  background: linear-gradient(135deg, #0b5d5a 0%, #073f3d 100%);
  color: #fff;
  border-radius: 1rem;
}

.site-footer {
  border-top: 1px solid rgba(0, 0, 0, .08);
  color: #6c757d;
}

/* --- Polish global des sections ------------------------------------------ */
body { background-color: #f6f8f8; }

main.container > h1,
main.container .h3 {
  letter-spacing: -.01em;
}

/* Titre de page avec filet d'accent */
main.container > .d-flex h1,
main.container > h1 {
  position: relative;
}

/* Cartes : coins doux, ombre légère, léger soulèvement au survol */
.card {
  border-radius: .85rem;
  border-color: rgba(11, 93, 90, .1);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card.shadow-sm:hover {
  transform: translateY(-2px);
  box-shadow: 0 .75rem 1.5rem rgba(11, 93, 90, .12) !important;
}
.card-header {
  background: linear-gradient(180deg, rgba(11, 93, 90, .04), transparent);
  border-bottom-color: rgba(11, 93, 90, .1);
}

/* En-têtes de tableaux plus lisibles */
.table > thead th {
  text-transform: uppercase;
  font-size: .72rem;
  letter-spacing: .04em;
  color: #5a6a6a;
  border-bottom: 2px solid rgba(11, 93, 90, .15);
}
.table-hover > tbody > tr:hover > * {
  background-color: rgba(11, 93, 90, .04);
}

/* Listes cliquables plus vivantes */
.list-group-item { border-color: rgba(11, 93, 90, .08); }
.list-group-flush .list-group-item:hover {
  background-color: rgba(11, 93, 90, .03);
}

/* Badges légèrement arrondis */
.badge { border-radius: .5rem; font-weight: 600; }

/* Barres de filtres : carte claire homogène */
.card.card-body.bg-light {
  background: #fff !important;
  border: 1px solid rgba(11, 93, 90, .1);
  box-shadow: 0 .25rem .75rem rgba(11, 93, 90, .05);
}

/* Boutons : coins un peu plus doux */
.btn { border-radius: .55rem; }

/* Modales HTMX : coins doux */
.modal-content { border-radius: .85rem; border: none; }
