:root {
  --bp-bg: #f1f1f1;
  --bp-text: #111111;
  --bp-heading: #000000;
  --bp-button: #000000;
  --bp-button-hover: #222222;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bp-bg);
  color: var(--bp-text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* HERO */
.bp-hero {
  position: relative;
  width: 100%;
  min-height: 110px;
  overflow: hidden;
  background-color: #d8dde8;
  background-image: url('/themes/custom/boussolepolitique/images/hero-politique.jpg');
  background-position: center 52%;
  background-size: cover;
  background-repeat: no-repeat;
}

.bp-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.18) 0%,
    rgba(0, 0, 0, 0.10) 60%,
    rgba(0, 0, 0, 0.04) 100%
  );
  pointer-events: none;
}

.bp-hero-top {
  position: relative;
  z-index: 2;
  min-height: 110px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.9rem;
}

.bp-brand {
  display: inline-flex;
  align-items: center;
  color: #fff;
  text-decoration: none;
}

.bp-brand:hover,
.bp-brand:focus {
  color: #fff;
  opacity: 0.96;
  text-decoration: none;
}

.bp-brand-mark {
  display: none;
}

.bp-brand-text {
  font-size: 1.2rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.bp-top-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.6rem 1.1rem;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.bp-top-cta:hover,
.bp-top-cta:focus {
  color: #fff;
  background: rgba(0, 0, 0, 0.26);
  text-decoration: none;
}

/* CONTENT */
.bp-home {
  padding: 4.6rem 0 6rem;
}

.bp-home-inner {
  max-width: 920px;
}

h1,
h2,
h3,
h4,
h5,
h6,
.display-1,
.display-2,
.display-3,
.display-4,
.display-5,
.display-6 {
  color: var(--bp-heading);
  font-weight: 900;
  letter-spacing: -0.03em;
}

p,
li {
  font-size: 1.05rem;
  line-height: 1.6;
}

.btn,
.btn-primary,
.btn-dark {
  border-radius: 14px;
  font-weight: 800;
  box-shadow: none;
}

.btn-primary,
.btn-dark {
  background: var(--bp-button);
  border-color: var(--bp-button);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-dark:hover,
.btn-dark:focus {
  background: var(--bp-button-hover);
  border-color: var(--bp-button-hover);
}

.bp-title {
  font-size: clamp(2.6rem, 5vw, 4.8rem);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #000;
  margin: 0 0 3rem;
  text-wrap: balance;
}

.bp-subtitle {
  font-size: clamp(1.7rem, 2.6vw, 3rem);
  line-height: 1.08;
  font-weight: 850;
  color: #000;
  margin: 0 0 1.75rem;
  text-wrap: balance;
}

.bp-points {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
}

.bp-points li {
  font-size: 1.3rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.bp-meta {
  font-size: 1.7rem;
  font-weight: 850;
  line-height: 1.2;
  color: #000;
  margin: 2rem 0 1.4rem;
}

.bp-note {
  font-size: 1.15rem;
  line-height: 1.5;
  font-weight: 700;
  margin-bottom: 2rem;
}

.bp-button {
  background: #000;
  border-color: #000;
  color: #fff;
  border-radius: 14px;
  padding: 0.95rem 1.6rem;
  font-size: 1.2rem;
  font-weight: 800;
  box-shadow: none;
}

.bp-button:hover,
.bp-button:focus {
  background: #222;
  border-color: #222;
  color: #fff;
}

.site-footer {
  position: relative;
  z-index: 10;
}

.node,
.block,
.views-element-container {
  background: transparent;
}

/* DESKTOP LARGE */
@media (min-width: 1200px) {
  .bp-hero {
    min-height: 120px;
    background-position: center 53%;
  }

  .bp-hero-top {
    min-height: 120px;
  }
}

/* TABLET / SMALL DESKTOP */
@media (max-width: 991.98px) {
  .bp-hero {
    min-height: 100px;
    background-position: center 54%;
  }

  .bp-hero-top {
    min-height: 100px;
    padding-bottom: 0.7rem;
  }

  .bp-brand-text {
    font-size: 0.9rem;
    letter-spacing: 0.06em;
  }

  .bp-top-cta {
    min-height: 36px;
    padding: 0.5rem 0.9rem;
    font-size: 0.9rem;
  }

  .bp-home {
    padding: 3rem 0 3.6rem;
  }

  .bp-points li {
    font-size: 1.1rem;
  }

  .bp-meta {
    font-size: 1.35rem;
  }

  .bp-note {
    font-size: 1rem;
  }

  .bp-button {
    width: 100%;
    font-size: 1.05rem;
  }
}

/* MOBILE */
@media (max-width: 575.98px) {
  .bp-hero {
    min-height: 90px;
    background-position: center 55%;
  }

  .bp-hero-top {
    min-height: 90px;
    padding-bottom: 0.6rem;
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  .bp-brand-text {
    font-size: 0.9rem;
    letter-spacing: 0.05em;
  }

  .bp-top-cta {
    min-height: 34px;
    padding: 0.45rem 0.8rem;
    font-size: 0.82rem;
  }
}

/*********align button + brand ************/
.bp-hero-top {
  align-items: flex-end;
  padding-bottom: 0.6rem;
}

.bp-top-cta {
  align-self: flex-end;
  height: 32px;
  padding: 0 1rem;
  font-size: 0.9rem;
  line-height: 32px;
  display: inline-flex;
  align-items: center;
}

.bp-brand-text {
  margin-bottom: 7px;
}

/*************** footer ******************/
.site-footer {
  background: linear-gradient(180deg, #0b0b0b 0%, #050505 100%);
  color: rgba(255, 255, 255, 0.75);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* La région footer devient une grille */
.site-footer .region-footer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  align-items: start;
}

/* Chaque bloc occupe une colonne */
.site-footer .region-footer > .block {
  min-width: 0;
}

/* Titres */
.site-footer .block-title,
.site-footer h2 {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

/* Menus */
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/*.site-footer li {
  margin-bottom: 0.7rem;
}*/

.site-footer ul.menu li {
  margin-bottom: 0.3rem;
  line-height: 1.35;
}

/* Liens */
.site-footer a {
  color: rgba(255,255,255,0.82);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus {
  color: #fff;
  text-decoration: underline;
}

/* Texte */
.site-footer p,
.site-footer div,
.site-footer span {
  color: rgba(255,255,255,0.72);
}

/* Mobile */
@media (max-width: 767.98px) {
  .site-footer .region-footer {
    grid-template-columns: 1fr;
  }
}

/* QUESTION */
.accordion-button {
  font-weight: 600;
  font-size: 1.05rem;
  color: #111;
}

/* QUESTION ACTIVE */
.accordion-button:not(.collapsed) {
  background-color: #e9f0ff; /* léger bleu */
  color: #0d3b66;
}

/* RÉPONSE */
.accordion-body {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
}

/* BONUS : petit effet pro */
.accordion-body strong {
  color: #111;
}

/**************** pages intérieures : harmonisation typographique ****************/

/* zone de contenu principale */
main,
.layout-content,
.region-content,
.node__content,
.field--name-body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* largeur de lecture plus élégante */
.region-content .node,
.layout-content .node,
main .node,
.field--name-body {
  max-width: 920px;
}

/* H1 des pages intérieures */
.region-content h1:not(.bp-title),
.layout-content h1:not(.bp-title),
main h1:not(.bp-title) {
  font-size: clamp(2.5rem, 4.2vw, 4.2rem);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #000;
  margin: 0 0 1.75rem 0;
  text-wrap: balance;
}

/* H2 des pages intérieures */
.region-content h2:not(.bp-subtitle),
.layout-content h2:not(.bp-subtitle),
main h2:not(.bp-subtitle) {
  font-size: clamp(1.8rem, 2.3vw, 2.8rem);
  line-height: 1.08;
  font-weight: 850;
  letter-spacing: -0.03em;
  color: #000;
  margin: 2.2rem 0 1rem 0;
  text-wrap: balance;
}

/* H3 */
.region-content h3,
.layout-content h3,
main h3 {
  font-size: clamp(1.35rem, 1.8vw, 1.9rem);
  line-height: 1.15;
  font-weight: 850;
  letter-spacing: -0.02em;
  color: #000;
  margin: 1.8rem 0 0.75rem 0;
}

/* Paragraphes */
.region-content p,
.layout-content p,
main p,
.field--name-body p {
  font-size: 1.08rem;
  line-height: 1.65;
  color: #222;
  margin-bottom: 1.15rem;
  max-width: 70ch;
}

/* Listes */
.region-content ul,
.region-content ol,
.layout-content ul,
.layout-content ol,
main ul,
main ol {
  margin-bottom: 1.25rem;
}

.region-content li,
.layout-content li,
main li {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #222;
  margin-bottom: 0.3rem;
}

/* Gras dans le contenu */
.region-content strong,
.layout-content strong,
main strong {
  font-weight: 800;
  color: #000;
}

/* Petit lien de breadcrumb plus discret */
.breadcrumb,
.breadcrumb a {
  font-size: 0.95rem;
}

/* Onglets locaux Drupal */
.tabs a {
  font-weight: 600;
}

/* Mobile */
@media (max-width: 767.98px) {
  .region-content h1:not(.bp-title),
  .layout-content h1:not(.bp-title),
  main h1:not(.bp-title),
  .region-content h2:not(.bp-subtitle),
  .layout-content h2:not(.bp-subtitle),
  main h2:not(.bp-subtitle) {
    text-wrap: pretty;
  }

  .region-content p,
  .layout-content p,
  main p,
  .field--name-body p,
  .region-content li,
  .layout-content li,
  main li {
    font-size: 1rem;
  }
}

/* =========================
   FOOTER — RESET COULEURS
   ========================= */

.site-footer,
.site-footer * {
  color: rgba(255,255,255,0.78);
}

.site-footer h2,
.site-footer h3,
.site-footer strong {
  color: #ffffff;
}

.site-footer a,
.site-footer .nav-link {
  color: rgba(255,255,255,0.78);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer .nav-link:hover {
  color: #ffffff;
}

.site-footer p {
  margin-bottom: 0;
  color: rgba(255,255,255,0.45);
}

/**** For home ****/
.bp-subtitle{
  margin-bottom: 8px;
}

.bp-subline{
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 28px 0;
}

.bp-section-title{
  margin-top: 0;
}

/* =========================================================
   Page liste des partis politiques
   ========================================================= */

.bp-party-grid {
  margin-top: 3rem;
  margin-bottom: 5rem;
}

.bp-party-card,
.bp-party-card-link {
  display: block;
  height: 100%;
}

.bp-party-card-link {
  color: inherit;
  text-decoration: none;
}

.bp-party-card-link:hover {
  color: inherit;
  text-decoration: none;
}

.bp-party-card-inner {
  height: 100%;
  min-height: 305px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.07);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.bp-party-card-link:hover .bp-party-card-inner {
  transform: translateY(-6px);
  border-color: rgba(0, 87, 255, 0.18);
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.14);
}

/* Header */

.bp-party-card-header {
  position: relative;
  height: 122px;
  overflow: hidden;
  border-radius: 26px 26px 0 0;
  background: #f4f4f4;
}

.bp-party-card-header--gradient {
  background: linear-gradient(
    180deg,
    var(--party-banner-top),
    var(--party-banner-bottom)
  );
}

.bp-party-card-header--gradient::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 20% 0%,
      rgba(255,255,255,0.16),
      transparent 38%
    );
  pointer-events: none;
  z-index: 1;
}

.bp-party-card-banner,
.bp-party-card-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.bp-party-card-banner {
  z-index: 0;
}

.bp-party-card-banner img {
  display: block;
  object-fit: cover;
  object-position: center;
}

.bp-party-card-header-content {
  position: relative;
  z-index: 2;
}

/* Cache les éventuels textes parasites du champ média */
.bp-party-card-banner .field__label,
.bp-party-card-banner .field__item > a:not(:has(img)),
.bp-party-card-banner .media__name {
  display: none;
}

/* Pas de voile sombre */
.bp-party-card-header::after,
.bp-party-card-header-shade {
  display: none !important;
}

/* Contenu du header */

.bp-party-card-header-content {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 1rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.bp-party-card-logo {
  flex: 0 0 74px;
  width: 74px;
  height: 74px;
  padding: 0;
  border: 5px solid #ffffff;
  border-radius: 50%;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

.bp-party-card-logo img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  border-radius: 50%;
}

.bp-party-card-title {
  margin: 0;
  max-width: calc(100% - 86px);
  color: #ffffff !important;
  font-size: 1.15rem !important;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  overflow-wrap: normal;
}

.bp-party-card-title br {
  display: none;
}

/* Body */

.bp-party-card-body {
  min-height: 145px;
  padding: 1.35rem 1.45rem 1.45rem;
  display: flex;
  flex-direction: column;
}

.bp-party-card-tagline {
  margin-bottom: 1.25rem;
  color: #111827;
  font-size: 0.98rem;
  line-height: 1.32;
  font-weight: 800;
}

.bp-party-card-tagline p {
  margin: 0;
}

.bp-party-card-text,
.bp-party-card-summary {
  display: none !important;
}

.bp-party-card-cta {
  margin-top: auto;
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.45rem;
  padding: 0.62rem 0.95rem;
  border-radius: 999px;
  background: #050505;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
  transition:
    background 0.18s ease,
    transform 0.18s ease;
}

.bp-party-card-link:hover .bp-party-card-cta {
  background: #0057ff;
  transform: translateX(2px);
}

/* Mobile */

@media (max-width: 767.98px) {
  .bp-party-grid {
    margin-top: 2rem;
    margin-bottom: 3.5rem;
  }

  .bp-party-card-inner {
    min-height: 295px;
    border-radius: 22px;
  }

  .bp-party-card-header {
    height: 112px;
    border-radius: 22px 22px 0 0;
  }

  .bp-party-card-header-content {
    padding: 0.9rem 1rem;
  }

  .bp-party-card-logo {
    flex-basis: 64px;
    width: 64px;
    height: 64px;
    border-width: 5px;
  }

  .bp-party-card-title {
    max-width: calc(100% - 76px);
    font-size: 1rem !important;
  }

  .bp-party-card-body {
    min-height: 150px;
    padding: 1.2rem;
  }
}