/* ==========================================================
   INTRANET CRM — compléments charte Triphase (étend base.css)
   Pages : login, menu, dashboards. Header/footer repris du site public.
   ========================================================== */

/* ── Bloc droit header (user + logout) ─────────────────────── */
.intr-header__right {
  margin-left: auto;
  display: flex; align-items: center; gap: 16px;
  font-size: 14px;
}
.intr-user { color: var(--c-text-mute); }
.intr-logout {
  color: var(--c-blue);
  padding: 6px 12px;
  border: 1px solid var(--c-blue);
  border-radius: var(--r-sm);
  font-weight: 500;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.intr-logout:hover { background: var(--c-blue); color: white; }

@media (max-width: 880px) {
  .site-nav { display: none; }
  .intr-header__right { margin-left: auto; }
}
@media (max-width: 540px) {
  .intr-user { display: none; }
  .brand__name { display: none; }
}

/* ── FOOTER INTRANET ─────────────────────────────────────── */
.intr-footer {
  margin-top: 64px;
  padding: 24px 0;
  border-top: 1px solid rgba(10, 44, 92, 0.08);
  background: var(--c-bg-soft);
}
.intr-footer__inner {
  max-width: 1180px; margin: 0 auto;
  padding: 0 24px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--c-text-mute);
}
.intr-footer__inner a { color: var(--c-text-mute); }
.intr-footer__inner a:hover { color: var(--c-blue); }

/* ── FLASH ─────────────────────────────────────────────── */
.intr-flash-wrap {
  max-width: 1180px; margin: 16px auto; padding: 0 24px;
}
.intr-flash {
  padding: 10px 14px; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 500;
}
.intr-flash--error { background: #fee; border-left: 3px solid var(--c-error); color: #900; }
.intr-flash--success { background: var(--c-teal-soft); border-left: 3px solid var(--c-teal); color: #055; }

/* ── LOGIN (gradient navy/blue plein écran) ─────────────── */
.page-login,
.page-logout,
.page-change-pw {
  background: linear-gradient(135deg, var(--c-navy) 0%, var(--c-blue) 100%);
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.page-login .site-header,
.page-login .intr-footer,
.page-logout .site-header,
.page-logout .intr-footer,
.page-change-pw .site-header,
.page-change-pw .intr-footer { display: none; }
.login-wrap { width: 100%; max-width: 420px; }
.login-card {
  background: white;
  border-radius: 12px;
  padding: 40px 36px 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}
.login-logo {
  display: block; margin: 0 auto 24px; text-align: center;
}
.login-logo img { margin: 0 auto; }
.login-title {
  font-size: 22px; font-weight: 700; color: var(--c-navy);
  text-align: center; margin-bottom: 6px;
}
.login-sub {
  font-size: 14px; color: var(--c-text-mute);
  text-align: center; margin-bottom: 28px;
}
.login-form { display: flex; flex-direction: column; gap: 6px; }
.login-form label {
  font-size: 13px; font-weight: 600; color: var(--c-text);
  margin: 8px 0 4px;
}
.login-form input {
  width: 100%; padding: 11px 12px;
  border: 1px solid #d0d6de; border-radius: var(--r-sm);
  font-size: 15px; font-family: var(--ff-body);
  background: white;
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
}
.login-form input:focus {
  outline: none;
  border-color: var(--c-blue);
  box-shadow: 0 0 0 3px var(--c-blue-soft);
}
.login-form button { margin-top: 20px; }
.btn {
  display: inline-block;
  padding: 11px 22px;
  font-family: var(--ff-body); font-size: 15px; font-weight: 600;
  border: none; border-radius: var(--r-sm);
  cursor: pointer; text-decoration: none;
  transition: background .2s var(--ease), color .2s var(--ease), transform .1s;
}
.btn--primary { background: var(--c-blue); color: white; }
.btn--primary:hover { background: var(--c-blue-hover); }
.btn--block { display: block; width: 100%; text-align: center; }
.btn:active { transform: translateY(1px); }

.login-foot {
  margin-top: 24px; text-align: center;
  font-size: 13px; color: var(--c-text-mute);
}
.login-foot a { color: var(--c-blue); margin: 0 6px; }

/* ── MENU (page d'accueil post-login) ─────────────────────── */
.page-menu { background: var(--c-bg); }
.menu-hero {
  background: linear-gradient(135deg, var(--c-navy) 0%, var(--c-blue) 70%);
  color: white;
  padding: 64px 24px 56px;
}
.menu-hero__inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.menu-hero__label {
  font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.8px;
  opacity: 0.75;
  margin-bottom: 8px;
}
.menu-hero__title {
  font-family: var(--ff-display);
  font-size: 32px; font-weight: 700;
  line-height: 1.15;
  margin: 0;
}
.menu-hero__sub {
  font-size: 15px; opacity: 0.85;
  margin-top: 8px;
}
.menu-hero__brand {
  display: flex; align-items: center; gap: 16px;
  text-decoration: none; color: white;
  background: rgba(255, 255, 255, 0.08);
  padding: 10px 18px;
  border-radius: var(--r-pill);
  font-weight: 600; font-size: 14px;
}

.menu-section { max-width: 1180px; margin: 0 auto; padding: 48px 24px; }
.menu-section__label {
  font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--c-text-mute);
  margin-bottom: 20px;
}
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.theme-card {
  display: block; text-decoration: none;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 24px;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.theme-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--c-blue);
}
.theme-card__icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--c-blue-soft);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.theme-card__title {
  font-family: var(--ff-display);
  font-size: 17px; font-weight: 600;
  color: var(--c-navy);
  margin-bottom: 6px;
}
.theme-card__desc {
  font-size: 14px; color: var(--c-text-mute);
  line-height: 1.55;
  margin-bottom: 14px;
}
.theme-card__arrow {
  font-size: 13px; font-weight: 600;
  color: var(--c-blue);
}

@media (max-width: 720px) {
  .menu-hero { padding: 40px 20px; }
  .menu-hero__title { font-size: 24px; }
  .menu-hero__inner { flex-direction: column; align-items: flex-start; }
}

/* ── PAGES DASHBOARD (suivi-prix, carto, arret-sur-watt) ─── */
.page-suivi-prix,
.page-carto,
.page-arret-watt {
  background: var(--c-bg-soft);
  min-height: 100vh;
}
/* Header sticky sur les pages dashboard pour ne pas chevaucher le contenu
   (sur le site public le header est fixed, mais les pages ont un hero qui
   compense ; les dashboards n'ont pas de hero, on passe donc en sticky). */
.page-suivi-prix .site-header,
.page-carto .site-header,
.page-arret-sur-watt .site-header {
  position: sticky;
  top: 0;
}
.dash-wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px;
}
.dash-meta-bar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
  font-size: 14px; color: var(--c-text-mute);
}
.dash-source { color: var(--c-blue); }
.dash-footer {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid rgba(10, 44, 92, 0.08);
  font-size: 13px; color: var(--c-text-mute);
}