/**
 * DSF — coque header / footer (IDENTIQUE dans toutes les apps).
 * Seules les couleurs viennent du thème module (--sf-*).
 * Ne pas modifier les tailles ici par application.
 */

/* -------------------------------------------------------------------------- */
/* Police Outfit — auto-hébergée (RGPD : aucun appel à Google Fonts)          */
/* Licence SIL OFL 1.1 — static/fonts/OFL.txt                                 */
/* -------------------------------------------------------------------------- */

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/outfit-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/outfit-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* -------------------------------------------------------------------------- */
/* Header — dimensions fixes                                                  */
/* -------------------------------------------------------------------------- */

.sf-app-header {
  --sf-header-height: 6.5rem;
  --sf-logo-height: 4.5rem; /* 72px — lisible (×2) */
  --sf-logo-pad-y: 0.25rem;
  --sf-logo-pad-x: 0.4rem;
  position: relative;
  overflow: hidden;
  min-height: var(--sf-header-height);
  box-sizing: border-box;
}

.sf-app-header .sf-app-navbar,
.sf-app-header > .navbar,
.sf-app-header nav.navbar {
  position: relative;
  z-index: 2;
  min-height: var(--sf-header-height);
  height: var(--sf-header-height);
  padding: 0 !important;
  margin: 0;
  flex-wrap: nowrap;
}

.sf-app-header .sf-header-inner,
.sf-app-header .container-fluid {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  height: 100%;
  min-height: var(--sf-header-height);
  padding: 0 1rem !important;
  margin: 0;
}

.sf-header-left,
.sf-header-right {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  min-width: 0;
}

.sf-header-right {
  margin-left: auto;
  justify-content: flex-end;
  flex-shrink: 0;
}

.sf-app-header .navbar-brand,
.sf-header-brand {
  display: inline-flex !important;
  align-items: center;
  gap: 0.65rem;
  margin: 0 !important;
  padding: 0 !important;
  min-width: 0;
  text-decoration: none;
  line-height: 1.15;
}

.sf-header-brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.sf-app-header .navbar-brand,
.sf-app-header .navbar-brand:hover,
.sf-app-header .navbar-brand:focus,
.sf-app-header .navbar-brand .sf-header-title,
.sf-app-header .navbar-brand span:not(.sf-header-brand-icon) {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: none !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.sf-header-title {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(42vw, 22rem);
}

.sf-app-header .navbar-brand small,
.sf-header-subtitle {
  display: block !important;
  font-size: 0.68rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.78) !important;
  margin-top: 0.1rem !important;
  line-height: 1.2 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(42vw, 22rem);
}

/* Logo ministère — taille UNIQUE (cadre assez large pour le SVG 276×172) */
.sf-app-header .navbar-brand .sf-header-brand-icon,
.sf-header-brand-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  width: auto !important;
  min-width: calc(var(--sf-logo-height) * 1.605 + 2 * var(--sf-logo-pad-x)) !important;
  height: calc(var(--sf-logo-height) + 2 * var(--sf-logo-pad-y)) !important;
  min-height: calc(var(--sf-logo-height) + 2 * var(--sf-logo-pad-y)) !important;
  max-height: calc(var(--sf-logo-height) + 2 * var(--sf-logo-pad-y)) !important;
  padding: var(--sf-logo-pad-y) var(--sf-logo-pad-x) !important;
  margin: 0 !important;
  border-radius: 0.35rem !important;
  flex-shrink: 0 !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
  border: 1px solid rgba(255, 255, 255, 0.55) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18) !important;
  overflow: visible !important;
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
  text-shadow: none !important;
  font-size: 0 !important;
  letter-spacing: 0 !important;
}

.sf-app-header .navbar-brand .sf-header-brand-icon img,
.sf-app-header .sf-header-logo,
.sf-header-brand-icon img,
.sf-header-logo {
  display: block !important;
  height: var(--sf-logo-height) !important;
  width: auto !important;
  max-width: none !important;
  max-height: var(--sf-logo-height) !important;
  object-fit: contain !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

.sf-header-user {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.2;
  max-width: 14rem;
  color: #fff !important;
}

.sf-header-user-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72) !important;
}

.sf-header-user-name {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 14rem;
}

.sf-header-user-meta {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.65) !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 14rem;
}

.sf-app-header .btn-sm {
  white-space: nowrap;
  flex-shrink: 0;
}

.sf-app-header .btn-outline-light {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.8) !important;
  background: rgba(255, 255, 255, 0.12);
  text-shadow: none;
}

.sf-app-header .btn-outline-light:hover,
.sf-app-header .btn-outline-light:focus {
  color: #143d32 !important;
  background: #fff !important;
  border-color: #fff !important;
}

.sf-app-header .btn-light {
  color: var(--sf-forest-dark, #1e4d2b) !important;
  background: #fff !important;
  border-color: #fff !important;
}

.sf-app-header .btn-light:hover {
  background: #f8faf8 !important;
}

@media (max-width: 575.98px) {
  .sf-app-header {
    --sf-header-height: 5.25rem;
    --sf-logo-height: 3.25rem;
  }

  .sf-header-title,
  .sf-header-subtitle {
    max-width: 38vw;
  }

  .sf-header-user {
    display: none;
  }
}

/* -------------------------------------------------------------------------- */
/* Footer — dimensions fixes                                                  */
/* -------------------------------------------------------------------------- */

.dsf-site-footer {
  --sf-footer-height: 2.75rem;
  min-height: var(--sf-footer-height);
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  margin-top: auto;
  background: linear-gradient(
    90deg,
    var(--sf-canopy, #0d2818) 0%,
    var(--sf-forest-dark, #1e4d2b) 55%,
    var(--sf-forest, #2d7a4e) 100%
  );
  color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.12);
}

.dsf-site-footer .dsf-site-footer-inner,
.dsf-site-footer .container-fluid {
  width: 100%;
  padding: 0 !important;
  margin: 0;
}

.dsf-site-footer-text,
.dsf-site-footer p {
  margin: 0 !important;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.88) !important;
}

.print-only {
  display: none !important;
}

@media print {
  .no-print {
    display: none !important;
  }
  .print-only {
    display: block !important;
  }
}
