/*
Theme Name: La Ploërmelaise
Theme URI: https://laploermelaise.org/
Author: La Ploërmelaise
Description: Thème blocs moderne, accessible et facile à administrer pour l’association La Ploërmelaise.
Version: 1.0.12
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: ploermelaise
*/

:root {
  --lp-blue: #0069b4;
  --lp-blue-deep: #004677;
  --lp-sky: #5ab0e3;
  --lp-yellow: #f9d500;
  --lp-red: #db0812;
  --lp-ink: #102534;
  --lp-muted: #536d7c;
  --lp-soft: #edf7fd;
  --lp-line: #d6e8f3;
  --lp-shadow: 0 18px 48px rgba(0, 61, 104, 0.14);
}

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

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

.wp-site-blocks {
  padding: 0;
}

.lp-site-header {
  position: relative;
  z-index: 100;
  background: var(--lp-blue-deep);
  box-shadow: 0 12px 34px rgba(0, 61, 104, 0.12);
}

.lp-announcement {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #003a63;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

.lp-announcement strong {
  color: var(--lp-yellow);
  font-weight: 800;
}

.lp-announcement p {
  margin: 0;
}

.lp-header-inner {
  min-height: 132px;
  border-bottom: 1px solid rgba(255,255,255,0.18);
  background: linear-gradient(110deg, var(--lp-blue-deep) 0%, var(--lp-blue) 100%);
}

.lp-header-row {
  gap: clamp(0.65rem, 2vw, 1.5rem);
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.lp-header-inner .wp-block-site-logo {
  flex: 0 0 140px;
  padding: 0.3rem;
  border: 3px solid var(--lp-blue-deep);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(0, 32, 56, 0.3), 0 0 0 3px rgba(255,255,255,0.12);
}

.lp-header-inner .wp-block-site-logo img {
  content: url("/wp-content/themes/ploermelaise/assets/images/logo-couleur.png");
  width: 124px;
  height: 124px;
  object-fit: contain;
}

.lp-header-inner .wp-block-navigation {
  color: #fff;
  font-size: 0.94rem;
  font-weight: 700;
}

.lp-header-cta {
  flex: 0 0 auto;
}

.lp-header-cta .wp-element-button {
  border: 1px solid rgba(16, 37, 52, 0.08);
  background: var(--lp-yellow);
  color: var(--lp-ink);
  box-shadow: 0 10px 24px rgba(249, 213, 0, 0.3);
  white-space: nowrap;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.lp-header-cta .wp-element-button:hover {
  background: #ffe63a;
  color: var(--lp-ink);
  box-shadow: 0 13px 30px rgba(249, 213, 0, 0.42);
  transform: translateY(-2px);
}

.lp-header-inner .wp-block-navigation__responsive-container-open {
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(255,255,255,0.56);
  border-radius: 50%;
  background: #fff;
  color: var(--lp-blue-deep);
  box-shadow: 0 10px 24px rgba(0, 32, 56, 0.25);
  transition: background 180ms ease, transform 180ms ease;
}

.lp-header-inner .wp-block-navigation__responsive-container-open:hover {
  background: var(--lp-yellow);
  color: var(--lp-ink);
  transform: translateY(-2px);
}

.lp-header-inner .wp-block-navigation__responsive-container-open svg {
  width: 26px;
  height: 26px;
}

.lp-hero {
  min-height: 620px;
  align-items: center;
}

.lp-hero .wp-block-cover__background {
  background: linear-gradient(90deg, rgba(0, 52, 90, 0.98) 0%, rgba(0, 70, 119, 0.89) 42%, rgba(0, 70, 119, 0.24) 76%, rgba(0, 70, 119, 0.08) 100%) !important;
  opacity: 1 !important;
}

.lp-hero .wp-block-cover__image-background {
  object-position: center 42%;
}

.lp-hero-content {
  position: relative;
  padding-top: clamp(4.5rem, 9vw, 8rem);
  padding-bottom: clamp(5.5rem, 10vw, 9rem);
}

.lp-hero-logo {
  position: absolute;
  z-index: 2;
  top: clamp(1.5rem, 3vw, 2.75rem);
  right: 0;
  box-sizing: border-box;
  width: clamp(170px, 18vw, 220px);
  margin: 0;
  padding: 0.35rem;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.62);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(0, 32, 56, 0.28);
}

.lp-hero-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.lp-eyebrow {
  margin: 0 0 0.75rem;
  color: var(--lp-blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.lp-hero .lp-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #d9f1ff;
}

.lp-hero .lp-eyebrow::before {
  width: 30px;
  height: 4px;
  border-radius: 99px;
  background: var(--lp-yellow);
  content: "";
}

.lp-hero-title {
  max-width: 780px;
  margin: 0;
  font-size: clamp(3.2rem, 7vw, 6.5rem) !important;
  line-height: 0.96 !important;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.lp-highlight {
  color: var(--lp-yellow);
}

.lp-hero-lead {
  max-width: 640px;
  margin-top: 1.5rem;
  color: rgba(255,255,255,0.9);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.lp-hero .wp-block-buttons {
  margin-top: 2rem;
}

.lp-button-outline .wp-element-button {
  border: 1px solid rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.1);
  color: #fff;
  backdrop-filter: blur(8px);
}

.lp-edition-card {
  max-width: 520px;
  margin-top: 2.25rem;
  padding: 1.2rem 1.5rem 1.35rem;
  border-left: 7px solid var(--lp-yellow);
  border-radius: 0 18px 18px 0;
  background: #fff;
  color: var(--lp-ink);
  box-shadow: var(--lp-shadow);
}

.lp-edition-card p {
  margin: 0;
}

.lp-edition-kicker {
  color: var(--lp-blue);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lp-edition-date {
  display: flex;
  align-items: baseline;
  gap: clamp(0.7rem, 1.5vw, 1rem);
  margin: 0.15rem 0 0.35rem;
  color: var(--lp-blue-deep);
  line-height: 0.9 !important;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.lp-date-day {
  color: var(--lp-blue);
  font-size: clamp(3.5rem, 6vw, 4.7rem);
  font-weight: 800;
}

.lp-date-month,
.lp-date-year {
  font-size: clamp(1.7rem, 3.4vw, 2.45rem);
  font-weight: 800;
}

.lp-date-year {
  color: var(--lp-blue);
}

.lp-edition-place {
  color: var(--lp-muted);
  font-size: 0.92rem;
}

.lp-section {
  padding-top: clamp(4.5rem, 8vw, 7rem);
  padding-bottom: clamp(4.5rem, 8vw, 7rem);
}

.lp-section-title {
  max-width: 780px;
  margin-top: 0;
  color: var(--lp-blue-deep);
  font-size: clamp(2.35rem, 5vw, 4.25rem) !important;
  line-height: 1.02 !important;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.lp-section-intro {
  max-width: 680px;
  color: var(--lp-muted);
  font-size: 1.1rem;
}

.lp-stats {
  position: relative;
  z-index: 3;
  margin-top: -50px !important;
  padding: 1.7rem 1rem;
  border-radius: 20px;
  background: var(--lp-blue);
  color: #fff;
  box-shadow: 0 18px 46px rgba(0, 105, 180, 0.26);
}

.lp-stat {
  text-align: center;
}

.lp-stat + .lp-stat {
  border-left: 1px solid rgba(255,255,255,0.24);
}

.lp-stat-number {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  font-weight: 800;
  line-height: 1;
}

.lp-stat-label {
  margin: 0.5rem 0 0;
  color: #d9f1ff;
  font-size: 0.9rem;
}

.lp-route-grid {
  gap: 1rem !important;
  margin-top: 2.5rem;
}

.lp-route-card {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  padding: 1.7rem;
  border-radius: 20px;
  background: var(--lp-soft);
}

.lp-route-grid > .wp-block-column:nth-child(2) .lp-route-card {
  background: #dff2fc;
}

.lp-route-grid > .wp-block-column:nth-child(3) .lp-route-card {
  background: var(--lp-blue);
  color: #fff;
}

.lp-route-grid > .wp-block-column:nth-child(4) .lp-route-card {
  background: var(--lp-yellow);
}

.lp-route-card::after {
  position: absolute;
  right: -34px;
  bottom: -34px;
  width: 128px;
  height: 128px;
  border: 22px solid rgba(0,105,180,0.12);
  border-radius: 50%;
  content: "";
}

.lp-route-grid > .wp-block-column:nth-child(3) .lp-route-card::after {
  border-color: rgba(255,255,255,0.16);
}

.lp-route-distance {
  position: relative;
  z-index: 1;
  margin: 0.35rem 0 0;
  color: var(--lp-blue-deep);
  font-size: clamp(2.3rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1;
}

.lp-route-grid > .wp-block-column:nth-child(3) .lp-route-distance {
  color: #fff;
}

.lp-route-card p:last-child {
  position: relative;
  z-index: 1;
  margin-top: 2.6rem;
}

.lp-impact-section {
  background: var(--lp-soft);
}

.lp-impact-image img {
  min-height: 390px;
  border-radius: 22px 74px 22px 22px;
  object-fit: cover;
  box-shadow: var(--lp-shadow);
}

.lp-impact-card {
  height: 100%;
  padding: 1.25rem;
  border: 1px solid var(--lp-line);
  border-radius: 16px;
  background: #fff;
}

.lp-impact-card h3 {
  margin-top: 0;
  color: var(--lp-blue-deep);
}

.lp-impact-card p {
  margin-bottom: 0;
  color: var(--lp-muted);
  font-size: 0.94rem;
}

.lp-news-grid {
  gap: 1.25rem !important;
  margin-top: 2.5rem;
}

.lp-news-card {
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--lp-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(0, 61, 104, 0.08);
}

.lp-news-card .wp-block-post-featured-image {
  margin: 0;
}

.lp-news-card .wp-block-post-featured-image img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.lp-news-card-content {
  padding: 1.35rem;
}

.lp-news-card .wp-block-post-date {
  color: var(--lp-blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lp-news-card .wp-block-post-title {
  margin-top: 0.5rem;
  font-size: 1.35rem;
  line-height: 1.12;
}

.lp-news-card .wp-block-post-title a {
  color: var(--lp-blue-deep);
  text-decoration: none;
}

.lp-news-card .wp-block-post-excerpt {
  color: var(--lp-muted);
  font-size: 0.95rem;
}

.lp-social-card {
  height: 100%;
  padding: clamp(1.75rem, 3vw, 2.75rem);
  border-radius: 24px;
  background: var(--lp-blue);
  color: #fff;
}

.lp-social-card .lp-section-title,
.lp-social-card .lp-eyebrow {
  color: #fff;
}

.lp-social-card .lp-section-title {
  max-width: none;
  font-size: clamp(2.15rem, 3.4vw, 3.35rem) !important;
  line-height: 1.04 !important;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.lp-social-card p {
  color: #d9f1ff;
}

.lp-partner-strip {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
  border-top: 1px solid var(--lp-line);
  background: #fff;
}

.lp-partner-strip .wp-block-gallery {
  align-items: center;
}

.lp-partner-strip figure {
  display: flex !important;
  min-height: 72px;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

.lp-partner-strip img {
  max-height: 62px;
  object-fit: contain !important;
}

.lp-page-hero {
  padding-top: clamp(4rem, 8vw, 7rem);
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
  background: var(--lp-soft);
}

.lp-page-hero .wp-block-post-title,
.lp-page-title {
  max-width: 900px;
  margin: 0;
  color: var(--lp-blue-deep);
  font-size: clamp(2.8rem, 6vw, 5.4rem) !important;
  line-height: 0.98 !important;
  letter-spacing: -0.05em;
}

.lp-entry-content {
  padding-top: clamp(3.5rem, 7vw, 6rem);
  padding-bottom: clamp(4.5rem, 8vw, 7rem);
}

.lp-entry-content > * + * {
  margin-block-start: 1.35em;
}

.lp-entry-content h2 {
  margin-top: 2.2em;
  color: var(--lp-blue-deep);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.06;
}

.lp-entry-content h3 {
  color: var(--lp-blue-deep);
}

.lp-info-box {
  padding: 1.5rem;
  border-left: 5px solid var(--lp-yellow);
  border-radius: 0 16px 16px 0;
  background: var(--lp-soft);
}

.lp-check-list {
  padding-left: 0;
  list-style: none;
}

.lp-check-list li {
  position: relative;
  padding-left: 1.7rem;
}

.lp-check-list li::before {
  position: absolute;
  top: 0.1em;
  left: 0;
  color: var(--lp-blue);
  font-weight: 800;
  content: "✓";
}

.lp-post-hero-image img {
  width: 100%;
  max-height: 600px;
  border-radius: 22px;
  object-fit: cover;
}

.lp-site-footer {
  background: var(--lp-blue-deep);
  color: #fff;
}

.lp-site-footer > .alignwide {
  box-sizing: border-box;
  padding-right: clamp(1.5rem, 4vw, 3rem);
  padding-left: clamp(1.5rem, 4vw, 3rem);
}

.lp-footer-cta {
  padding-top: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.16);
}

.lp-footer-main {
  padding-top: 3rem;
  padding-bottom: 2rem;
}

.lp-footer-main a {
  color: #fff;
}

.lp-footer-main .wp-block-site-logo img {
  width: 150px;
  background: #fff;
}

.lp-footer-small {
  color: #bfe7fb;
  font-size: 0.86rem;
}

@media (min-width: 901px) {
  .lp-header-inner .wp-block-navigation__container {
    gap: 0.25rem !important;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .lp-header-inner .wp-block-navigation-item {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .lp-header-inner .wp-block-navigation-item__content {
    position: relative;
    padding: 0.75rem 0.8rem;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    color: #fff;
    box-shadow: none !important;
    text-decoration: none;
    transition: color 180ms ease, transform 180ms ease;
  }

  .lp-header-inner .wp-block-navigation-item__content::after {
    position: absolute;
    right: 0.8rem;
    bottom: 0.35rem;
    left: 0.8rem;
    height: 3px;
    border-radius: 999px;
    background: var(--lp-yellow);
    content: "";
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 180ms ease;
  }

  .lp-header-inner .wp-block-navigation-item.current-menu-item > a {
    background: transparent !important;
    color: #fff;
    box-shadow: none;
  }

  .lp-header-inner .wp-block-navigation-item__content:hover {
    background: transparent !important;
    color: #fff;
    transform: translateY(-1px);
  }

  .lp-header-inner .wp-block-navigation-item.current-menu-item > a::after,
  .lp-header-inner .wp-block-navigation-item__content[aria-current="page"]::after,
  .lp-header-inner .wp-block-navigation-item__content:hover::after,
  body.home .lp-header-inner .wp-block-navigation-item:first-child > a::after {
    transform: scaleX(1);
  }
}

@media (max-width: 900px) {
  .lp-header-row {
    flex-wrap: nowrap !important;
    padding-top: 0.65rem !important;
    padding-bottom: 0.65rem !important;
  }

  .lp-hero-logo {
    position: static;
    width: 150px;
    margin: 0 0 1rem;
  }

  .lp-header-inner .wp-block-navigation__responsive-container:not(.is-menu-open) {
    display: none !important;
  }

  .lp-header-inner .wp-block-navigation__responsive-container-open {
    display: flex !important;
  }

  .lp-header-inner .wp-block-navigation__responsive-container.is-menu-open {
    padding: 1.25rem !important;
    background: linear-gradient(145deg, var(--lp-blue-deep), #0069b4) !important;
    color: #fff !important;
  }

  .lp-header-inner .wp-block-navigation__responsive-container-close {
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    color: #fff;
  }

  .lp-header-inner .wp-block-navigation__responsive-container-content {
    padding-top: 5rem !important;
  }

  .lp-header-inner .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
    align-items: stretch !important;
    gap: 0.35rem !important;
    width: 100%;
  }

  .lp-header-inner .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
    width: 100%;
  }

  .lp-header-inner .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
    display: flex;
    width: 100%;
    padding: 0.95rem 0.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.18);
    color: #fff;
    font-size: clamp(1.35rem, 7vw, 2rem);
    line-height: 1.1;
    text-decoration: none;
  }

  .lp-route-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lp-route-grid > .wp-block-column {
    width: auto !important;
  }
}

@media (max-width: 700px) {
  .lp-announcement {
    min-height: 46px;
    font-size: 0.875rem;
    line-height: 1.25;
  }

  .lp-header-inner {
    min-height: 108px;
  }

  .lp-header-inner .wp-block-site-logo {
    flex-basis: 102px;
    border-radius: 20px;
  }

  .lp-header-inner .wp-block-site-logo img {
    width: 92px;
    height: 92px;
  }

  .lp-header-cta .wp-element-button {
    padding: 0.72rem 0.9rem;
    font-size: 0.875rem;
  }

  .lp-header-inner .wp-block-navigation__responsive-container-open {
    width: 46px;
    height: 46px;
  }

  .lp-hero {
    min-height: 650px;
  }

  .lp-hero .wp-block-cover__background {
    background: linear-gradient(90deg, rgba(0, 52, 90, 0.97) 0%, rgba(0, 70, 119, 0.84) 64%, rgba(0, 70, 119, 0.54) 100%) !important;
  }

  .lp-hero-title {
    font-size: clamp(3rem, 15vw, 4.6rem) !important;
  }

  .lp-edition-card {
    padding-right: 1.1rem;
    padding-left: 1.1rem;
  }

  .lp-date-day {
    font-size: clamp(3.2rem, 17vw, 4.2rem);
  }

  .lp-date-month,
  .lp-date-year {
    font-size: clamp(1.45rem, 7.5vw, 2rem);
  }

  .lp-stats {
    margin-top: -22px !important;
  }

  .lp-stats .wp-block-columns {
    gap: 0;
  }

  .lp-stat {
    padding: 1rem 0.6rem;
  }

  .lp-stat + .lp-stat {
    border-top: 1px solid rgba(255,255,255,0.24);
    border-left: 0;
  }

  .lp-route-grid {
    grid-template-columns: 1fr;
  }

  .lp-route-card {
    min-height: 210px;
  }

  .lp-impact-image img {
    min-height: 280px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
