/**
 * profil-page.css — Shared styles for profile content pages
 *
 * Used by:
 *   - je-suis-elu.html       (Elected officials / decision-makers)
 *   - je-suis-specialiste.html (Technicians / specialists)
 *   - je-suis-habitant.html  (Citizens / residents)
 *   - ressources-dispositifs.html (Funding & action programmes)
 *   - Any future page that uses the two-column layout with a sticky ToC
 *
 * Layout structure:
 *   .page-hero          → full-width hero section with optional right-side image
 *   .profil-body-wrap   → CSS grid: 220px ToC column + 1fr content column
 *   .article-toc        → sticky left sidebar table of contents
 *   .profil-section     → individual content section (icon + tag + title + body)
 *
 * JavaScript companion: js/profil-page.js (sticky ToC active-state updates)
 * CSS companion:        css/pages.css (shared page-level styles)
 */

/* ── Hero: right-side image panel ──────────────────────────────────────── */
/* Prevent horizontal overflow caused by the absolutely-positioned image */
html, body { overflow-x: clip; }
.page-hero { overflow: hidden; }

/* The image panel is positioned absolutely on the right half of the hero */
.profil-hero-img {
  position: absolute;
  top: 0; right: 0;
  width: 38%; height: 100%;
  overflow: hidden;
  z-index: 0;
}
.profil-hero-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Ensure text content (title + subtitle) sits above the hero image */
.page-hero__inner { position: relative; z-index: 1; }
.page-hero__inner .page-hero__title,
.page-hero__inner .page-hero__sub { max-width: 58%; }

/* On mobile: hide the hero image, let the text use full width */
@media (max-width: 768px) {
  .profil-hero-img { display: none; }
  .page-hero__inner .page-hero__title,
  .page-hero__inner .page-hero__sub { max-width: 100%; }
}

/* ── Two-column body layout: sticky ToC + main content ─────────────────── */
.profil-body-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 32px 80px;
  display: grid;
  grid-template-columns: 220px 1fr; /* [ToC] [content] */
  gap: 56px;
  align-items: flex-start;
}

/* Sticky table of contents — stays visible while scrolling through sections */
.article-toc {
  position: sticky;
  top: 120px; /* Offset below the fixed navigation bar */
  align-self: flex-start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  scrollbar-width: none; /* Hide scrollbar (Firefox) */
}
.article-toc::-webkit-scrollbar { display: none; } /* Hide scrollbar (Chrome/Safari) */

/* ToC heading (e.g. "TABLE DES MATIÈRES") */
.article-toc__title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #2a347d;
  border-left: 3px solid #fbd020; /* Yellow accent line */
  padding-left: 10px;
  margin-bottom: 16px;
}

/* ToC list: each item has a left border that highlights when active */
.article-toc__list { list-style: none; margin: 0; padding: 0; }
.article-toc__list li { border-left: 2px solid #e4e8f0; transition: border-color .15s; }
.article-toc__list li.is-active { border-left-color: #2a347d; } /* Active = indigo border */

/* ToC links */
.article-toc__list a {
  display: block;
  padding: 7px 0 7px 12px;
  font-size: 12.5px;
  color: #4a5a78;
  text-decoration: none;
  line-height: 1.4;
  transition: color .15s;
}
.article-toc__list li.is-active a { color: #2a347d; font-weight: 700; }
.article-toc__list a:hover { color: #2a347d; }

/* Horizontal separator between ToC groups */
.article-toc__sep { border: none; border-top: 1px solid #e4e8f0; margin: 20px 0; }

/* ── Content sections ────────────────────────────────────────────────────── */
/* Each section is separated by a thin bottom border */
.profil-section { margin-bottom: 56px; padding-bottom: 56px; border-bottom: 1px solid rgba(42,52,125,.12); }
.profil-section:last-of-type { border-bottom: none; margin-bottom: 0; }

/* scroll-margin-top offsets anchor scrolling past the fixed nav bar */
.profil-section__anchor { scroll-margin-top: 120px; }

/* Section header: icon block + tag + title, with cyan underline */
.profil-section__header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid #7fddf0; /* Cyan underline (Grand Est brand) */
}

/* Square icon block (40×40, primary blue background) */
.profil-section__icon {
  width: 44px; height: 44px;
  background: #2a347d;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
}

/* Small uppercase label above the section title (e.g. "THÉMATIQUES") */
.profil-section__tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: rgba(42,52,125,.5);
  margin-bottom: 4px;
}

/* Section title */
.profil-section__title {
  font-family: 'Cabinet Grotesk', system-ui, sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #2a347d;
  margin: 0;
}

/* Section body typography */
.profil-section__body p { font-size: 14.5px; line-height: 1.75; color: #1d1d1b; margin-bottom: 14px; }
.profil-section__body > p:last-child { margin-bottom: 0; }
.profil-section__body ul { margin: 0 0 20px; padding-left: 20px; }
.profil-section__body ul li { font-size: 14px; line-height: 1.65; color: #1d1d1b; margin-bottom: 8px; }
.profil-section__body ul li::marker { color: #2a347d; } /* Blue list markers */
.profil-section__body blockquote {
  border-left: 4px solid #2a347d;
  background: rgba(42,52,125,.06);
  padding: 14px 20px;
  margin: 0 0 20px;
  font-style: italic;
  font-size: 14px;
  color: #1d1d1b;
  line-height: 1.65;
}

/* ── Thematic topic chips ────────────────────────────────────────────────── */
/* Used in the introduction section to display the page's thematic tags */
.theme-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.theme-chip-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  background: rgba(42,52,125,.08);
  font-size: 12px;
  font-weight: 700;
  color: #2a347d;
  text-transform: uppercase;
  letter-spacing: .3px;
}

/* ── Action card grid (2 columns) ────────────────────────────────────────── */
/* Cards link to tool / dashboard pages or external resources */
.action-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
.action-card {
  background: #fff;
  border: 1px solid rgba(42,52,125,.15);
  border-top: 3px solid #2a347d; /* Blue accent top border */
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  transition: transform .18s;
}
.action-card:hover { transform: translateY(-3px); color: inherit; text-decoration: none; }
.action-card__icon {
  width: 40px; height: 40px;
  background: rgba(42,52,125,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: #2a347d;
}
.action-card__title { font-size: 14px; font-weight: 700; color: #2a347d; }
.action-card__desc  { font-size: 13px; color: rgba(42,52,125,.65); line-height: 1.55; flex: 1; }
.action-card__link  { font-size: 12px; font-weight: 700; color: #2a347d; display: flex; align-items: center; gap: 5px; }

/* ── Indicator cards (3-column grid) ─────────────────────────────────────── */
/* Short KPI cards at the end of profile sections */
.ind-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.ind-card {
  background: #fff;
  border: 1px solid rgba(42,52,125,.15);
  border-top: 2px solid #7fddf0; /* Cyan top border */
  padding: 18px;
}
.ind-card__icon {
  width: 36px; height: 36px;
  background: rgba(42,52,125,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #2a347d;
  margin-bottom: 10px;
}
.ind-card__title { font-size: 13px; font-weight: 700; color: #2a347d; margin-bottom: 6px; }
.ind-card__text  { font-size: 12.5px; color: rgba(42,52,125,.65); line-height: 1.5; }

/* ── Info notice box (used on the citizen / habitant page) ────────────────── */
.profil-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  font-size: 13.5px;
  line-height: 1.6;
  background: rgba(42,52,125,.07);
  border-left: 4px solid #2a347d;
  color: #1d1d1b;
  margin-top: 20px;
}
.profil-notice i { color: #2a347d; margin-top: 2px; flex-shrink: 0; }
.profil-notice a { color: #2a347d; font-weight: 700; }

/* ── Responsive breakpoints ──────────────────────────────────────────────── */
/* 960 px: indicator grid switches from 3 to 2 columns */
@media (max-width: 960px) { .ind-grid { grid-template-columns: 1fr 1fr; } }

/* 860 px: stacked layout — ToC becomes static, grids become single-column */
@media (max-width: 860px) {
  .profil-body-wrap { grid-template-columns: 1fr; padding: 32px 20px 60px; gap: 32px; }
  .article-toc { position: static; max-height: none; }
  .action-grid { grid-template-columns: 1fr; }
  .ind-grid    { grid-template-columns: 1fr; }
}
