/* ==========================================================================
   MINEFOP - institutional design system

   Layered on top of Bootstrap (reset, grid, components) and Tailwind
   (utilities, preflight disabled). The visual language follows the codes of
   an official government portal: a sober national masthead, a single
   authoritative green for actions, generous rules instead of heavy shadows,
   serif headings for institutional weight and a high-contrast, keyboard-first
   interaction model.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */

:root {
  /* National colours (flag & coat of arms) - used for identity, not for UI. */
  --cm-green: #04502c;
  --cm-green-dark: #023018;
  --cm-red: #ce1126;
  --cm-yellow: #fcd116;

  /* Institutional palette derived from the national green. */
  --green-900: #012414;
  --green-800: #023018;
  --green-700: #04502c;
  --green-600: #0a6b3c;
  --green-100: #e4efe9;
  --green-050: #f1f7f3;

  /* Gold rule used to separate the state identity from the site chrome. */
  --gold: #c8a951;
  --gold-dark: #9b7f30;

  /* Neutrals. */
  --ink: #14231e;
  --ink-soft: #40514a;
  --muted: #66776f;
  --rule: #d9e2dd;
  --rule-soft: #e8eeeb;
  --surface: #f4f7f5;
  --surface-alt: #eef3f0;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Source Serif 4", "Merriweather", Georgia, "Times New Roman", serif;

  --radius: 4px;
  --radius-lg: 6px;
  --shadow-sm: 0 1px 2px rgba(1, 36, 20, 0.06);
  --shadow-md: 0 4px 16px rgba(1, 36, 20, 0.08);
  --shadow-lg: 0 12px 32px rgba(1, 36, 20, 0.12);

  --container-pad: 1rem;

  /* Re-point Bootstrap's own "success" utilities (text-success, bg-success,
     btn-success, border-success…) at the MINEFOP green so both frameworks
     agree on a single base colour. */
  --bs-success: var(--green-700);
  --bs-success-rgb: 4, 80, 44;
  --bs-body-color: var(--ink);
  --bs-body-font-family: var(--font-sans);
  /* Bootstrap 5.3 resolves link colours through the -rgb custom properties, so
     both forms have to be re-pointed for the green to actually apply. */
  --bs-link-color: var(--green-700);
  --bs-link-color-rgb: 4, 80, 44;
  --bs-link-hover-color: var(--green-900);
  --bs-link-hover-color-rgb: 1, 36, 20;
  --bs-border-color: var(--rule);
  --bs-border-radius: var(--radius);
}

.text-success { color: var(--green-700) !important; }
.bg-success { background-color: var(--green-700) !important; }
.border-success { border-color: var(--green-700) !important; }
.text-success-emphasis { color: var(--green-900) !important; }
.btn-success {
  background-color: var(--green-700);
  border-color: var(--green-700);
}
.btn-success:hover,
.btn-success:focus,
.btn-success:active {
  background-color: var(--green-900) !important;
  border-color: var(--green-900) !important;
}

/* --------------------------------------------------------------------------
   2. Base typography
   -------------------------------------------------------------------------- */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background-color: #fff;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, .h1, .h2, .h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* Small headings stay in the interface face even when the element is an <h2>
   used as a card title - serif is reserved for page and section headings. */
h4, h5, h6, .h4, .h5, .h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.005em;
}

p { max-width: 72ch; }
.prose p, .prose li { max-width: 70ch; }

a { text-underline-offset: 0.18em; }

strong, b { font-weight: 600; }

.font-serif-brand { font-family: var(--font-serif); }

.lead {
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-600);
}

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

/* Visible, high-contrast focus ring on every interactive element. */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2000;
  margin: 0.5rem;
  padding: 0.6rem 1rem;
  background: var(--green-700);
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius);
}

/* --------------------------------------------------------------------------
   3. National identity bars
   -------------------------------------------------------------------------- */

.tricolor-bar {
  display: flex;
  height: 4px;
  width: 100%;
}
.tricolor-bar span { flex: 1 1 0; }
.tricolor-bar .bar-green { background-color: var(--cm-green); }
.tricolor-bar .bar-red { background-color: var(--cm-red); }
.tricolor-bar .bar-yellow { background-color: var(--cm-yellow); }

/* --------------------------------------------------------------------------
   4. Language switcher (now hosted inside the main navbar)
   -------------------------------------------------------------------------- */

.lang-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius);
  overflow: hidden;
}
.lang-switch button {
  background: none;
  border: 0;
  padding: 0.15rem 0.55rem;
  color: #d6e3dc;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.6;
}
.lang-switch button:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.lang-switch button[aria-current="true"] {
  background: var(--cm-yellow);
  color: var(--green-900);
}

/* --------------------------------------------------------------------------
   5. Masthead (coat of arms + ministry identity + search)
   -------------------------------------------------------------------------- */

.masthead {
  background: #fff;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--rule);
}
.masthead-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
}
.masthead-brand img {
  width: 66px;
  height: auto;
  flex-shrink: 0;
}
.masthead-republic {
  display: block;
  font-family: var(--font-serif);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cm-red);
  line-height: 1.35;
}
.masthead-name {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--green-900);
}
.masthead-name-en {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.4;
  margin-top: 0.15rem;
}
.masthead-motto {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-dark);
  font-weight: 700;
}

.site-search .form-control {
  border-right: 0;
  border-color: var(--rule);
  min-width: 12rem;
}
.site-search .form-control:focus {
  box-shadow: none;
  border-color: var(--green-600);
}
.site-search .btn {
  background: var(--green-700);
  border-color: var(--green-700);
  color: #fff;
}
.site-search .btn:hover { background: var(--green-900); border-color: var(--green-900); }

/* --------------------------------------------------------------------------
   6. Primary navigation
   -------------------------------------------------------------------------- */

.main-navbar {
  background-color: var(--green-700);
  border-top: 3px solid var(--gold);
  box-shadow: var(--shadow-sm);
  padding: 0;
}
.main-navbar .navbar-nav { gap: 0; }
.main-navbar .nav-link,
.main-navbar .nav-link:visited {
  color: #eaf3ee;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  padding: 0.95rem 0.9rem;
  border-bottom: 3px solid transparent;
  border-radius: 0;
}
.main-navbar .nav-link:hover,
.main-navbar .nav-link:focus,
.main-navbar .nav-link.show {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.09);
}
.main-navbar .nav-link.active,
.main-navbar .nav-link[aria-current="page"] {
  color: #fff;
  border-bottom-color: var(--cm-yellow);
}
.main-navbar .dropdown-toggle::after { margin-left: 0.4rem; }
.main-navbar .dropdown-menu {
  border: 0;
  border-top: 3px solid var(--cm-yellow);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.4rem 0;
  margin-top: 0;
  min-width: 17rem;
}
.main-navbar .dropdown-item {
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  white-space: normal;
}
.main-navbar .dropdown-item:hover,
.main-navbar .dropdown-item:focus {
  background-color: var(--green-050);
  color: var(--green-900);
}
.main-navbar .dropdown-item.active {
  background-color: var(--green-100);
  color: var(--green-900);
  font-weight: 600;
}

/* Nested "Directions" flyout inside the Le Ministère dropdown: a pure-CSS
   hover enhancement on desktop, layered over a toggle that is itself a real
   link to the directorate list page - so it always works (click straight
   through to the list) even where hover doesn't apply (touch, the
   collapsed mobile nav) or JavaScript fails to run. No JS dependency. */
.dropdown-submenu { position: relative; }
.dropdown-submenu > .dropdown-toggle::after { transform: rotate(-90deg); }
.dropdown-submenu > .dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: 0;
  display: none;
}
@media (min-width: 992px) {
  .dropdown-submenu:hover > .dropdown-menu { display: block; }
}
.main-navbar .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
  margin: 0.5rem 0;
}
.main-navbar .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.main-navbar .navbar-nav .nav-item:last-child .nav-link { padding-right: 0.9rem; }

@media (max-width: 991.98px) {
  .main-navbar .navbar-collapse { padding-bottom: 0.75rem; }
  .main-navbar .nav-link {
    padding: 0.7rem 0.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }
  .main-navbar .nav-link.active { border-bottom-color: var(--cm-yellow); }
  .main-navbar .dropdown-menu {
    border-top: 0;
    box-shadow: none;
    background: rgba(0, 0, 0, 0.18);
    margin: 0 0 0.5rem;
  }
  .main-navbar .dropdown-item { color: #eaf3ee; }
  .main-navbar .dropdown-item:hover,
  .main-navbar .dropdown-item:focus {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
  }
}

/* --------------------------------------------------------------------------
   7. Buttons
   -------------------------------------------------------------------------- */

.btn {
  border-radius: var(--radius);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.btn-minefop {
  background-color: var(--green-700);
  border-color: var(--green-700);
  color: #fff;
}
.btn-minefop:hover,
.btn-minefop:focus {
  background-color: var(--green-900);
  border-color: var(--green-900);
  color: #fff;
}
.btn-outline-minefop {
  border-color: var(--green-700);
  color: var(--green-700);
  background-color: transparent;
}
.btn-outline-minefop:hover,
.btn-outline-minefop:focus {
  background-color: var(--green-700);
  border-color: var(--green-700);
  color: #fff;
}
.btn-gold {
  background-color: var(--cm-yellow);
  border-color: var(--cm-yellow);
  color: var(--green-900);
}
.btn-gold:hover,
.btn-gold:focus {
  background-color: #e5bd13;
  border-color: #e5bd13;
  color: var(--green-900);
}

/* --------------------------------------------------------------------------
   8. Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  background: linear-gradient(115deg, var(--green-900) 0%, var(--green-700) 58%, var(--green-600) 100%);
  color: #fff;
  overflow: hidden;
}
.hero::after {
  /* Faint coat-of-arms watermark, decorative only. */
  content: "";
  position: absolute;
  right: -3rem;
  top: 50%;
  transform: translateY(-50%);
  width: 26rem;
  height: 26rem;
  background: radial-gradient(circle, rgba(252, 209, 22, 0.16) 0%, rgba(252, 209, 22, 0) 62%);
  pointer-events: none;
}
.hero h1 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.85rem, 3.4vw, 2.75rem);
  line-height: 1.16;
  color: #fff;
}
.hero p { color: #d7e7de; }
.hero .hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cm-yellow);
  border-left: 3px solid var(--cm-yellow);
  padding-left: 0.7rem;
}

.hero-carousel .carousel-item {
  min-height: 460px;
  background-size: cover;
  background-position: center;
  background-color: var(--green-900);
}
/* Bootstrap only shows .active (plus the two slide-transition classes) at a
   time - everything else stays display:none. Scope our own flex layout to
   those same classes; a bare ".carousel-item { display:flex }" would beat
   Bootstrap's display:none on specificity and show every slide at once,
   stacked/overlapping. */
.hero-carousel .carousel-item.active,
.hero-carousel .carousel-item.carousel-item-next,
.hero-carousel .carousel-item.carousel-item-prev {
  display: flex;
  align-items: center;
}
.hero-slide-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(1, 36, 20, 0.94) 0%, rgba(1, 36, 20, 0.75) 48%, rgba(1, 36, 20, 0.3) 100%);
}
.hero-carousel .carousel-caption-custom {
  position: relative;
  z-index: 2;
  max-width: 44rem;
  text-align: left;
  padding: 3rem 0;
}
.hero-carousel .carousel-caption-custom h1 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.85rem, 3.4vw, 2.75rem);
  line-height: 1.16;
  color: #fff;
}
.hero-carousel .carousel-caption-custom p { color: #d7e7de; }
.hero-carousel .carousel-indicators {
  margin-bottom: 1rem;
  justify-content: flex-start;
  margin-left: max(var(--container-pad), calc((100vw - 1320px) / 2 + 0.75rem));
}
.hero-carousel .carousel-indicators [data-bs-target] {
  width: 28px;
  height: 4px;
  border-radius: 2px;
  background-color: rgba(255, 255, 255, 0.45);
  border: 0;
}
.hero-carousel .carousel-indicators .active { background-color: var(--cm-yellow); }

/* Service shortcuts sitting directly under the hero. */
.hero-services {
  background: #fff;
  border-bottom: 1px solid var(--rule);
}
.hero-service {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.15rem 0.5rem;
  text-decoration: none;
  color: var(--ink);
  border-left: 1px solid var(--rule-soft);
  height: 100%;
  transition: background-color 0.15s ease;
}
.hero-service:first-child { border-left: 0; }
.hero-service:hover,
.hero-service:focus { background-color: var(--green-050); color: var(--green-900); }
.hero-service i {
  font-size: 1.4rem;
  color: var(--green-600);
  flex-shrink: 0;
}
.hero-service span {
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.3;
}
@media (max-width: 767.98px) {
  .hero-service { border-left: 0; border-top: 1px solid var(--rule-soft); }
}

/* Hero sidebar: a minister teaser and a short events agenda, floated as
   light cards over the hero's dark background. */
.hero-sidebar-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.1rem 1.25rem;
}
.hero-sidebar-eyebrow {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green-700);
  margin-bottom: 0.6rem;
}
.hero-minister-teaser {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 168px;
  padding: 1.35rem 1.5rem;
  color: var(--ink);
  transition: box-shadow 0.15s ease;
}
.hero-minister-teaser:hover,
.hero-minister-teaser:focus { box-shadow: var(--shadow-lg), 0 0 0 2px var(--cm-yellow) inset; }
.hero-minister-teaser .hero-sidebar-eyebrow {
  font-size: 0.78rem;
  margin-bottom: 0.75rem;
}
.hero-minister-teaser img {
  width: 124px;
  height: 124px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  flex-shrink: 0;
  border: 3px solid var(--green-100);
}
.hero-minister-name {
  display: block;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.25;
  color: var(--ink);
}
.hero-minister-link {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--green-700);
  margin-top: 0.35rem;
}
.hero-agenda-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  text-decoration: none;
  border-top: 1px solid var(--rule-soft);
}
.hero-agenda-row:first-of-type { border-top: 0; }
.date-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: var(--radius);
  background: var(--green-700);
  color: #fff;
  line-height: 1.1;
}
.date-tile-day { font-weight: 700; font-size: 1rem; }
.date-tile-month { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.04em; }
.hero-agenda-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}
.hero-agenda-empty {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.25rem 0 0;
}
.hero-sidebar-more {
  display: block;
  margin-top: 0.75rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--rule-soft);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--green-700);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   9. Sections & headings
   -------------------------------------------------------------------------- */

.section { padding: 3.5rem 0; }
.section-tight { padding: 2.5rem 0; }
.section-alt { background-color: var(--surface); }
.section-rule { border-top: 1px solid var(--rule); }

.section-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  position: relative;
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
}
.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 72px;
  background: linear-gradient(90deg, var(--cm-green) 0 34%, var(--cm-red) 34% 67%, var(--cm-yellow) 67% 100%);
}
.section-title.text-center::after {
  left: 50%;
  transform: translateX(-50%);
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.section-head .section-title { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   10. Key figures
   -------------------------------------------------------------------------- */

.key-figure {
  background: #fff;
  border: 1px solid var(--rule);
  border-top: 3px solid var(--green-700);
  border-radius: var(--radius);
  height: 100%;
  padding: 1.5rem 1.25rem;
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}
.key-figure:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--green-600);
}
.key-figure .icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--green-100);
  color: var(--green-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 0.9rem;
}
.key-figure .value {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--green-800);
}
.key-figure .label {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.35rem;
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   11. Cards
   -------------------------------------------------------------------------- */

/* Height is deliberately not forced here: cards that must line up inside a
   grid row opt in with Bootstrap's `.h-100`, so a card sitting in a tall
   sidebar column does not stretch past its own content. */
.card-minefop {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}
.card-minefop:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--rule);
}
.card-minefop .card-img-top {
  height: 190px;
  width: 100%;
  object-fit: cover;
  background-color: var(--surface-alt);
}
.card-minefop .card-title a {
  color: var(--ink);
  text-decoration: none;
}
.card-minefop:hover .card-title a { color: var(--green-700); }

.badge-category {
  background-color: var(--green-100);
  color: var(--green-800);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 2px;
  padding: 0.3rem 0.5rem;
}
.badge-date {
  color: var(--muted);
  font-size: 0.8125rem;
}

.mission-card {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--green-700);
  border-radius: var(--radius);
  background: #fff;
  height: 100%;
  padding: 1.5rem;
  transition: box-shadow 0.18s ease, border-left-color 0.18s ease;
}
.mission-card:hover {
  box-shadow: var(--shadow-md);
  border-left-color: var(--cm-yellow);
}
.mission-card .icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--green-100);
  color: var(--green-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 0.9rem;
}
/* Quick-access tiles. */
.quick-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-align: center;
  height: 100%;
  padding: 1.75rem 1rem;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.quick-tile:hover,
.quick-tile:focus {
  border-color: var(--green-600);
  box-shadow: var(--shadow-md);
  color: var(--green-900);
}
.quick-tile i {
  font-size: 1.75rem;
  color: var(--green-700);
}
.quick-tile span { font-weight: 600; font-size: 0.9rem; line-height: 1.35; }

/* --------------------------------------------------------------------------
   12. Minister block
   -------------------------------------------------------------------------- */

.minister-panel {
  background: linear-gradient(115deg, var(--green-900) 0%, var(--green-700) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.minister-panel .section-title { color: #fff; }
.minister-panel .section-title::after { opacity: 0.9; }
.minister-photo {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  object-position: center 22%;
  display: block;
}
.minister-quote {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  line-height: 1.7;
  color: #e6f0ea;
  border-left: 3px solid var(--cm-yellow);
  padding-left: 1.25rem;
  margin-bottom: 1.5rem;
}
.minister-name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 0.1rem;
}
.minister-role {
  font-size: 0.85rem;
  color: #b8cec3;
  margin-bottom: 0;
}

/* Portrait card used on the "Mot du Ministre" page. */
.portrait-card {
  border: 1px solid var(--rule);
  border-top: 3px solid var(--green-700);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}
.portrait-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}
.portrait-card .portrait-body { padding: 1.15rem 1.25rem; }

/* --------------------------------------------------------------------------
   13. Organisation chart
   -------------------------------------------------------------------------- */

.org-tree ul { list-style: none; }
.org-node {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--green-700);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 0.6rem;
  background: #fff;
}
.org-node .unit-type {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-dark);
  font-weight: 700;
}
.org-node .head-title { font-size: 0.82rem; color: var(--muted); }
.org-children {
  margin-left: 1.25rem;
  padding-left: 1rem;
  border-left: 1px dashed var(--rule);
}

/* --------------------------------------------------------------------------
   14. Timeline
   -------------------------------------------------------------------------- */

.timeline {
  position: relative;
  padding-left: 2rem;
  border-left: 2px solid var(--rule);
}
.timeline-item { position: relative; margin-bottom: 2rem; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -2.42rem;
  top: 0.45rem;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--green-700);
}
.timeline-year {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--green-700);
}

/* --------------------------------------------------------------------------
   15. Page header & breadcrumb
   -------------------------------------------------------------------------- */

.page-header {
  background: var(--green-800);
  background-image: linear-gradient(115deg, var(--green-900) 0%, var(--green-700) 100%);
  color: #fff;
  padding: 2.5rem 0 2.25rem;
  border-bottom: 3px solid var(--gold);
}
.page-header h1 {
  font-family: var(--font-serif);
  font-weight: 700;
  color: #fff;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  margin-bottom: 0;
}
.page-header .page-subtitle {
  color: #cfe2d7;
  margin: 0.6rem 0 0;
  max-width: 62ch;
}
.page-header .breadcrumb {
  --bs-breadcrumb-divider-color: #8fae9d;
  font-size: 0.8125rem;
  margin-bottom: 0.75rem;
}
.page-header .breadcrumb a { color: #cfe2d7; text-decoration: none; }
.page-header .breadcrumb a:hover { color: #fff; text-decoration: underline; }
.page-header .breadcrumb-item.active { color: #fff; }
.page-header .breadcrumb-item + .breadcrumb-item::before { color: #79997f; }

/* --------------------------------------------------------------------------
   16. Notices, documents, filters
   -------------------------------------------------------------------------- */

.alert-minefop {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--green-700);
  background-color: var(--green-050);
  color: var(--ink-soft);
  border-radius: var(--radius);
}
.alert-minefop a { color: var(--green-700); font-weight: 600; }

.doc-row {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: #fff;
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}
.doc-row:hover { box-shadow: var(--shadow-md); border-color: var(--green-600); }
/* The text column must shrink rather than push the download button onto its
   own line - a long decree title would otherwise break the row apart. */
.doc-row-body {
  flex: 1 1 16rem;
  min-width: 0;
}
.doc-row-actions {
  flex: 0 0 auto;
  margin-left: auto;
}
.doc-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: rgba(206, 17, 38, 0.08);
  color: var(--cm-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.doc-icon-green { background: var(--green-100); color: var(--green-700); }

.filter-bar {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1rem;
}
.filter-chip {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.filter-chip:hover,
.filter-chip:focus { border-color: var(--green-600); color: var(--green-800); }
.filter-chip.active {
  background: var(--green-700);
  border-color: var(--green-700);
  color: #fff;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--green-600);
  box-shadow: 0 0 0 0.2rem rgba(10, 107, 60, 0.15);
}

/* Definition-style contact / info list. */
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li {
  display: flex;
  gap: 0.9rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule-soft);
}
.info-list li:last-child { border-bottom: 0; }
.info-list .info-label {
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   17. Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background-color: var(--green-900);
  color: #b9cdc2;
  border-top: 4px solid var(--gold);
  font-size: 0.9rem;
}
.site-footer a { color: #d3e2da; text-decoration: none; }
.site-footer a:hover,
.site-footer a:focus { color: var(--cm-yellow); text-decoration: underline; }
.site-footer h2,
.site-footer h3 {
  font-family: var(--font-sans);
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}
.site-footer .footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}
.site-footer .footer-brand img {
  width: 58px;
  height: auto;
  background: #fff;
  border-radius: var(--radius);
  padding: 0.3rem;
  flex-shrink: 0;
}
.site-footer .footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.footer-bottom {
  background-color: #011a0e;
  font-size: 0.8125rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-legal {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  padding: 0;
  margin: 0;
}
.social-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #d3e2da;
  transition: background-color 0.18s ease;
}
.social-icon:hover,
.social-icon:focus { background-color: var(--green-600); color: #fff; }

/* --------------------------------------------------------------------------
   18. Pagination
   -------------------------------------------------------------------------- */

.pagination { --bs-pagination-border-color: var(--rule); }
.pagination .page-link {
  color: var(--green-700);
  font-weight: 600;
  border-radius: var(--radius);
  margin: 0 0.15rem;
}
.pagination .page-link:hover { background-color: var(--green-050); }
.pagination .page-item.active .page-link {
  background-color: var(--green-700);
  border-color: var(--green-700);
  color: #fff;
}

/* --------------------------------------------------------------------------
   19. Article body
   -------------------------------------------------------------------------- */

.article-body {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--ink-soft);
}
.article-body p { margin-bottom: 1.15rem; }
.article-body a { color: var(--green-700); }

/* --------------------------------------------------------------------------
   20. Motion, print and small-screen adjustments
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 767.98px) {
  .section { padding: 2.5rem 0; }
  .hero-carousel .carousel-item { min-height: 380px; }
  .masthead-brand img { width: 52px; }
  .masthead-name { font-size: 1.05rem; }
  .minister-photo { min-height: 260px; }
}

@media print {
  .main-navbar,
  .site-footer,
  .hero-services,
  .site-search,
  .skip-link,
  .pagination { display: none !important; }
  .page-header {
    background: none !important;
    color: #000;
    border-bottom: 1px solid #000;
  }
  .page-header h1,
  .page-header .breadcrumb-item.active,
  .page-header .page-subtitle { color: #000 !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
  body { font-size: 11pt; }
}
