/*
Theme Name: CCRCC Network
Theme URI: https://communautecongolaise.com/
Author: CCRCC
Description: Thème fédéré bilingue pour les communautés territoriales du réseau CCRCC™.
Version: 0.3.2
Requires at least: 6.7
Requires PHP: 8.1
Text Domain: ccrcc-network
*/

:root {
  --ccrcc-focus: #111827;
  --ccrcc-local-accent: #767676;
  --ccrcc-accent: var(--ccrcc-local-accent);
  --ccrcc-on-accent: #fff;
  --ccrcc-accent-soft: #f1f1f1;
  --ccrcc-accent-border: #767676;
  --ccrcc-surface-warm: #fff8ed;
  --ccrcc-radius-card: 1.15rem;
  --ccrcc-shadow-card: 0 1.1rem 3rem rgb(16 24 40 / 12%);
}

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: clip;
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--ccrcc-focus);
  outline-offset: 3px;
}

.ccrcc-network-signature {
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.ccrcc-network-header {
  border-bottom: 1px solid rgb(16 24 40 / 10%);
  position: relative;
  z-index: 20;
}

.ccrcc-network-header__identity {
  gap: 0.85rem;
}

.ccrcc-site-identity {
  --ccrcc-identity-accent: #344054;
  border-left: 4px solid var(--ccrcc-identity-accent);
  padding-left: 0.85rem;
}

.ccrcc-site-identity--ottawa {
  --ccrcc-identity-accent: #003b73;
}

.ccrcc-site-identity--gatineau {
  --ccrcc-identity-accent: #5c2d56;
}

.ccrcc-site-identity__home {
  align-items: center;
  color: #101828;
  display: flex;
  gap: 0.9rem;
  max-width: 34rem;
  text-decoration: none;
}

.ccrcc-site-identity__home:hover .ccrcc-site-identity__name {
  color: var(--ccrcc-identity-accent);
}

.ccrcc-site-identity__marks {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 0.55rem;
}

.ccrcc-site-identity__local-mark {
  border-radius: 0.65rem;
  height: 3.5rem;
  object-fit: contain;
  width: 3.5rem;
}

.ccrcc-site-identity__copy {
  display: grid;
  gap: 0.18rem;
}

.ccrcc-site-identity__name {
  color: #101828;
  font-family: var(--wp--preset--font-family--heading);
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  font-weight: 750;
  line-height: 1.15;
}

.ccrcc-site-identity__signature {
  color: #475467;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-transform: uppercase;
}

.ccrcc-territory-switcher {
  font-size: 0.9rem;
  margin-top: 0.65rem;
  position: relative;
}

.ccrcc-territory-switcher summary {
  cursor: pointer;
  font-weight: 750;
}

.ccrcc-territory-switcher ul {
  background: #fff;
  border: 1px solid #d7dee8;
  border-radius: 0.75rem;
  box-shadow: var(--ccrcc-shadow-card);
  display: grid;
  gap: 0.4rem;
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0.8rem;
}

.ccrcc-hero {
  background: linear-gradient(135deg, #003b73 0%, #0077b6 62%, #0b1f33 100%);
  color: #fff;
  min-height: clamp(32rem, 70vh, 48rem);
}

.ccrcc-hero .wp-block-cover__inner-container {
  max-width: 74rem;
}

.ccrcc-territorial-hero {
  --ccrcc-hero-tone: #003b73;
  align-items: end;
  background: linear-gradient(120deg, var(--ccrcc-hero-tone), #0b1f33);
  background-position: center;
  background-size: cover;
  color: #fff;
  display: flex;
  min-height: clamp(34rem, 72vh, 52rem);
  overflow: clip;
  position: relative;
}

.ccrcc-hero--ottawa {
  --ccrcc-hero-tone: #003b73;
}

.ccrcc-hero--gatineau {
  --ccrcc-hero-tone: #5c2d56;
}

.ccrcc-territorial-hero::after {
  background: linear-gradient(90deg, #f5c542 0 33.333%, #d22630 33.333% 66.666%, #00a3e0 66.666%);
  bottom: 0;
  content: "";
  height: 0.45rem;
  left: 0;
  position: absolute;
  right: 0;
}

.ccrcc-territorial-hero__inner {
  margin-inline: auto;
  max-width: 78rem;
  padding: clamp(5rem, 12vw, 9rem) clamp(1.5rem, 5vw, 4rem);
  width: 100%;
}

.ccrcc-territorial-hero h1 {
  font-size: clamp(3rem, 8vw, 6.8rem);
  letter-spacing: -0.055em;
  line-height: 0.95;
  margin-block: 1rem 1.5rem;
  max-width: 13ch;
}

.ccrcc-territorial-hero__lead {
  font-size: clamp(1.15rem, 2.3vw, 1.55rem);
  line-height: 1.55;
  max-width: 42rem;
}

.ccrcc-territorial-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.ccrcc-territorial-hero__action--secondary {
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
}

.ccrcc-eyebrow {
  color: #344054;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.ccrcc-section {
  padding-block: clamp(3.5rem, 8vw, 7rem);
}

.ccrcc-section--warm {
  background: var(--ccrcc-surface-warm);
}

.ccrcc-page-shell {
  background: linear-gradient(180deg, #f6f9fd 0 24rem, #fff 24rem 100%);
}

.ccrcc-page-hero {
  background:
    radial-gradient(circle at 91% 14%, #f7c948 0 2.2rem, transparent 2.25rem),
    radial-gradient(circle at 88% 20%, color-mix(in srgb, #003b73 18%, transparent) 0 8rem, transparent 8.1rem),
    linear-gradient(135deg, #f4f8fd 0%, #fff 72%);
  border-bottom: 1px solid #e4e7ec;
  padding-block: clamp(3rem, 7vw, 6rem);
}

.ccrcc-page-hero .wp-block-post-title {
  font-size: clamp(2.4rem, 7vw, 5.25rem);
  letter-spacing: -0.045em;
  line-height: 0.98;
  margin-bottom: 0;
  max-width: 15ch;
}

.ccrcc-page-context {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  margin-bottom: 1rem;
}

.ccrcc-breadcrumb {
  align-items: center;
  color: #475467;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.9rem;
  gap: 0.6rem;
}

.ccrcc-breadcrumb a {
  color: inherit;
  font-weight: 700;
  text-underline-offset: 0.2em;
}

.ccrcc-page-media {
  margin-top: clamp(-4.5rem, -4vw, -2rem);
  position: relative;
  z-index: 2;
}

.ccrcc-page-media:has(.wp-block-post-featured-image:empty) {
  display: none;
}

.ccrcc-page-media .wp-block-post-featured-image {
  border: 0.5rem solid #fff;
  border-radius: calc(var(--ccrcc-radius-card) + 0.25rem);
  box-shadow: var(--ccrcc-shadow-card);
  overflow: clip;
}

.ccrcc-page-media img {
  object-fit: cover;
}

.ccrcc-page-body {
  color: #344054;
  font-size: clamp(1.05rem, 1.5vw, 1.16rem);
  line-height: 1.78;
  padding-block: clamp(3.5rem, 8vw, 7rem);
}

.ccrcc-page-body :where(h2, h3) {
  color: #101828;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-top: 2.4em;
}

.ccrcc-page-body h2:first-child,
.ccrcc-page-body .wp-block-heading:first-child {
  margin-top: 0;
}

.ccrcc-page-body :where(blockquote, .wp-block-quote) {
  background: var(--ccrcc-surface-warm);
  border-left: 0.3rem solid var(--ccrcc-accent);
  border-radius: var(--ccrcc-radius-card);
  margin-inline: 0;
  padding: clamp(1.25rem, 4vw, 2rem);
}

.ccrcc-page-related {
  padding-bottom: clamp(4rem, 9vw, 7rem);
}

.ccrcc-related-pages {
  background: #101828;
  border-radius: calc(var(--ccrcc-radius-card) + 0.35rem);
  color: #fff;
  padding: clamp(1.5rem, 5vw, 3.5rem);
}

.ccrcc-related-pages .ccrcc-eyebrow {
  color: color-mix(in srgb, var(--ccrcc-accent) 55%, #fff);
}

.ccrcc-related-pages h2 {
  margin-top: 0.25rem;
}

.ccrcc-related-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  margin-top: 2rem;
}

.ccrcc-related-card {
  align-items: center;
  background: rgb(255 255 255 / 8%);
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 0.85rem;
  color: #fff;
  display: flex;
  font-weight: 750;
  gap: 1rem;
  justify-content: space-between;
  min-height: 5.5rem;
  padding: 1rem 1.15rem;
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.ccrcc-related-card:hover {
  background: rgb(255 255 255 / 14%);
  border-color: var(--ccrcc-accent);
  transform: translateY(-0.15rem);
}

.ccrcc-section-heading {
  align-items: end;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 0.85fr);
  margin-bottom: clamp(2rem, 5vw, 3.75rem);
}

.ccrcc-section-heading > p {
  color: #475467;
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  line-height: 1.7;
  margin: 0;
}

.ccrcc-home-pathways {
  background:
    radial-gradient(circle at 8% 18%, color-mix(in srgb, var(--ccrcc-accent) 10%, transparent) 0 8rem, transparent 8.1rem),
    linear-gradient(180deg, #fff 0%, #f7faff 100%);
}

.ccrcc-home-pathways .ccrcc-eyebrow {
  color: #344054;
}

.ccrcc-pathway-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ccrcc-pathway-card {
  align-items: center;
  background: #fff;
  border: 1px solid #d7dee8;
  border-radius: var(--ccrcc-radius-card);
  color: #101828;
  display: grid;
  gap: 1rem;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 10rem;
  padding: clamp(1.15rem, 3vw, 1.75rem);
  text-decoration: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.ccrcc-pathway-card:hover {
  border-color: var(--ccrcc-accent-border);
  box-shadow: var(--ccrcc-shadow-card);
  transform: translateY(-0.2rem);
}

.ccrcc-pathway-card__index {
  align-items: center;
  background: var(--ccrcc-accent-soft);
  border-radius: 99rem;
  color: #101828;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 800;
  height: 2.4rem;
  justify-content: center;
  width: 2.4rem;
}

.ccrcc-pathway-card__content {
  display: grid;
  gap: 0.55rem;
}

.ccrcc-pathway-card__content strong {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.ccrcc-pathway-card__content span {
  color: #475467;
  line-height: 1.6;
}

.ccrcc-pathway-card__arrow {
  color: var(--ccrcc-accent);
  font-size: 1.6rem;
  font-weight: 800;
}

.ccrcc-grid {
  display: grid;
  gap: clamp(1rem, 2.5vw, 2rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}

.ccrcc-card {
  border: 1px solid color-mix(in srgb, var(--ccrcc-accent-border) 34%, #d7dee8);
  border-radius: var(--ccrcc-radius-card);
  box-shadow: var(--ccrcc-shadow-card);
  overflow: clip;
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.ccrcc-card:hover {
  box-shadow: 0 1.4rem 3.5rem rgb(16 24 40 / 17%);
  transform: translateY(-0.2rem);
}

.ccrcc-card__body {
  padding: 1.25rem;
}

.ccrcc-card__meta {
  color: #475467;
  font-size: 0.875rem;
  font-weight: 650;
}

.ccrcc-card img {
  aspect-ratio: 16 / 9;
  display: block;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.ccrcc-impact__metrics {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
}

.ccrcc-impact__metric {
  background: #fff;
  border-left: 0.3rem solid var(--ccrcc-accent);
  border-radius: var(--ccrcc-radius-card);
  padding: 1.35rem;
}

.ccrcc-impact__value {
  display: block;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1;
}

.ccrcc-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.ccrcc-social-links a {
  border: 1px solid currentColor;
  border-radius: 99rem;
  display: inline-flex;
  padding: 0.55rem 0.85rem;
  text-decoration: none;
}

.ccrcc-archive-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-block: 2rem;
}

.ccrcc-archive-filters a {
  background: var(--ccrcc-accent-soft);
  border-radius: 99rem;
  color: #101828;
  font-weight: 700;
  padding: 0.55rem 0.9rem;
  text-decoration: none;
}

.ccrcc-empty-state {
  background: var(--ccrcc-surface-warm);
  border-left: 0.3rem solid var(--ccrcc-accent);
  border-radius: var(--ccrcc-radius-card);
  padding: 1.25rem;
}

.ccrcc-report__meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
}

.ccrcc-report__year {
  font-weight: 800;
}

.ccrcc-contact-layout {
  display: grid;
  gap: clamp(2rem, 6vw, 5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
}

.ccrcc-contact-form {
  display: grid;
  gap: 1rem;
}

.ccrcc-contact-feedback {
  border-left: 0.3rem solid #344054;
  border-radius: 0.55rem;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
}

.ccrcc-contact-feedback--success {
  background: #ecfdf3;
  border-left-color: #027a48;
  color: #054f31;
}

.ccrcc-contact-feedback--error {
  background: #fff1f3;
  border-left-color: #b42318;
  color: #7a271a;
}

.ccrcc-contact-form label {
  display: grid;
  font-weight: 700;
  gap: 0.35rem;
}

.ccrcc-contact-form input,
.ccrcc-contact-form select,
.ccrcc-contact-form textarea {
  border: 1px solid #98a2b3;
  border-radius: 0.55rem;
  font: inherit;
  padding: 0.75rem;
}

.ccrcc-social-embeds {
  display: grid;
  gap: 1.5rem;
}

.ccrcc-social-cards,
.ccrcc-social-embed-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}

.ccrcc-social-card {
  background: #fff;
  border: 1px solid var(--ccrcc-accent-border);
  border-radius: var(--ccrcc-radius-card);
  color: #101828;
  display: grid;
  gap: 0.3rem;
  padding: 1.15rem;
  text-decoration: none;
}

.ccrcc-social-card span,
.ccrcc-social-consent p {
  color: #475467;
}

.ccrcc-social-embed {
  background: #fff;
  border: 1px solid #d7dee8;
  border-radius: var(--ccrcc-radius-card);
  min-height: 31rem;
  width: 100%;
}

.ccrcc-social-consent {
  background: var(--ccrcc-accent-soft);
  border-left: 0.3rem solid var(--ccrcc-accent-border);
  border-radius: var(--ccrcc-radius-card);
  padding: 1rem 1.25rem;
}

.ccrcc-local-news,
.ccrcc-local-programs,
.ccrcc-local-gallery,
.ccrcc-local-reports {
  position: relative;
}

.ccrcc-local-news::before,
.ccrcc-local-programs::before,
.ccrcc-local-gallery::before,
.ccrcc-local-reports::before {
  background: var(--ccrcc-accent);
  content: "";
  height: 0.3rem;
  left: 0;
  position: absolute;
  top: 0;
  width: clamp(4rem, 12vw, 9rem);
}

.ccrcc-local-gallery .ccrcc-card img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.ccrcc-contact-form__privacy {
  color: #475467;
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0;
}

.ccrcc-network-footer a {
  color: #fff;
  text-decoration: underline;
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.18em;
}

@media (max-width: 600px) {
  .ccrcc-network-header .wp-block-group,
  .ccrcc-network-footer .wp-block-group {
    align-items: flex-start;
    flex-direction: column;
  }

  .ccrcc-site-identity {
    border-left-width: 3px;
    padding-left: 0.65rem;
  }

  .ccrcc-site-identity__home {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.55rem;
  }

  .ccrcc-site-identity__local-mark {
    height: 2.75rem;
    width: 2.75rem;
  }

  .ccrcc-site-identity__name {
    font-size: 1rem;
  }

  .ccrcc-section-heading,
  .ccrcc-pathway-grid {
    grid-template-columns: 1fr;
  }

  .ccrcc-pathway-card {
    min-height: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01s !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01s !important;
  }
}
