/*
Theme Name: PublicHelp Europe
Theme URI: https://publichelp.eu/
Author: Gaëtan Mercenier
Author URI: https://publichelp.eu/
Description: Thème WordPress pour PublicHelp.eu, portail européen reliant les plateformes nationales d'aides publiques aux entreprises.
Version: 1.0.0
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: publichelp
Tags: custom-logo, custom-menu, featured-images, translation-ready, accessibility-ready, wide-blocks
*/

:root {
  --ph-ink: #17191c;
  --ph-charcoal: #24272b;
  --ph-muted: #61686f;
  --ph-orange: #f27622;
  --ph-orange-dark: #bf5410;
  --ph-orange-soft: #fff0e4;
  --ph-cream: #fffaf1;
  --ph-white: #ffffff;
  --ph-green: #29724d;
  --ph-green-soft: #e9f4ee;
  --ph-border: #dedbd4;
  --ph-shadow: 0 18px 55px rgba(23, 25, 28, 0.09);
  --ph-radius-sm: 12px;
  --ph-radius: 22px;
  --ph-width: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ph-ink);
  background: var(--ph-cream);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body.admin-bar .site-header {
  top: 32px;
}

a {
  color: var(--ph-orange-dark);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover,
a:focus-visible {
  color: var(--ph-orange);
}

img {
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--ph-orange);
  outline-offset: 3px;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  z-index: 100000;
  top: 8px;
  left: 8px;
  width: auto;
  height: auto;
  padding: 12px 18px;
  clip: auto;
  color: var(--ph-white);
  background: var(--ph-ink);
  border-radius: 8px;
}

.ph-container {
  width: min(calc(100% - 40px), var(--ph-width));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid rgba(23, 25, 28, 0.08);
  background: rgba(255, 250, 241, 0.94);
  backdrop-filter: blur(14px);
}

.site-header__inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.site-branding,
.site-branding a {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ph-ink);
  text-decoration: none;
}

.custom-logo {
  display: block;
  width: auto;
  max-height: 48px;
}

.site-branding__mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
}

.site-branding__name {
  font-size: 1.18rem;
  font-weight: 820;
  letter-spacing: -0.04em;
}

.site-branding__name span {
  color: var(--ph-orange-dark);
}

.primary-navigation ul {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-navigation a {
  color: var(--ph-ink);
  font-size: 0.91rem;
  font-weight: 720;
  text-decoration: none;
}

.primary-navigation a:hover,
.primary-navigation a:focus-visible {
  color: var(--ph-orange-dark);
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ph-border);
  border-radius: 12px;
  color: var(--ph-ink);
  background: var(--ph-white);
  cursor: pointer;
}

.menu-toggle svg {
  width: 23px;
  height: 23px;
}

.ph-hero {
  position: relative;
  overflow: hidden;
  padding: 92px 0 78px;
}

.ph-hero::before,
.ph-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 999px;
  filter: blur(2px);
}

.ph-hero::before {
  width: 420px;
  height: 420px;
  top: -210px;
  right: -120px;
  background: rgba(242, 118, 34, 0.13);
}

.ph-hero::after {
  width: 270px;
  height: 270px;
  bottom: -135px;
  left: -90px;
  background: rgba(41, 114, 77, 0.11);
}

.ph-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: 74px;
  align-items: center;
}

.ph-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  padding: 8px 13px;
  border: 1px solid rgba(191, 84, 16, 0.22);
  border-radius: 999px;
  color: var(--ph-orange-dark);
  background: var(--ph-orange-soft);
  font-size: 0.79rem;
  font-weight: 820;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.ph-eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ph-orange);
  box-shadow: 0 0 0 5px rgba(242, 118, 34, 0.13);
}

.ph-hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2.65rem, 6vw, 5.15rem);
  line-height: 0.99;
  letter-spacing: -0.065em;
}

.ph-hero h1 em {
  color: var(--ph-orange-dark);
  font-style: normal;
}

.ph-hero__intro {
  max-width: 680px;
  margin: 27px 0 0;
  color: var(--ph-muted);
  font-size: clamp(1.02rem, 2vw, 1.2rem);
}

.ph-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-top: 34px;
}

.ph-button {
  display: inline-flex;
  min-height: 52px;
  padding: 13px 20px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 2px solid var(--ph-orange-dark);
  border-radius: 12px;
  color: var(--ph-white);
  background: var(--ph-orange-dark);
  font-size: 0.94rem;
  font-weight: 820;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.ph-button:hover,
.ph-button:focus-visible {
  color: var(--ph-white);
  background: var(--ph-orange);
  border-color: var(--ph-orange);
  box-shadow: 0 12px 30px rgba(191, 84, 16, 0.2);
  transform: translateY(-2px);
}

.ph-button--secondary {
  color: var(--ph-orange-dark);
  background: var(--ph-white);
}

.ph-button--secondary:hover,
.ph-button--secondary:focus-visible {
  color: #a8470b;
  background: #fff7f0;
  border-color: #a8470b;
}

.ph-arrow {
  font-size: 1.15em;
  line-height: 1;
}

.ph-network-panel {
  position: relative;
  padding: 24px;
  border: 1px solid rgba(23, 25, 28, 0.1);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--ph-shadow);
}

.ph-network-panel::before {
  content: "";
  position: absolute;
  inset: 18px;
  z-index: 0;
  border: 1px dashed rgba(191, 84, 16, 0.22);
  border-radius: 20px;
  pointer-events: none;
}

.ph-network-panel__head,
.ph-network-panel__body,
.ph-network-panel__foot {
  position: relative;
  z-index: 1;
}

.ph-network-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.ph-network-panel__head strong {
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ph-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ph-green);
  font-size: 0.76rem;
  font-weight: 800;
}

.ph-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ph-green);
}

.ph-network-panel__body {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.ph-node {
  min-height: 104px;
  padding: 15px;
  border: 1px solid var(--ph-border);
  border-radius: 16px;
  background: var(--ph-cream);
}

.ph-node:first-child {
  grid-column: 1 / -1;
  color: var(--ph-white);
  background: var(--ph-charcoal);
  border-color: var(--ph-charcoal);
}

.ph-node__code {
  display: block;
  color: var(--ph-orange);
  font-size: 0.71rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ph-node strong {
  display: block;
  margin-top: 5px;
  font-size: 0.96rem;
}

.ph-node small {
  display: block;
  margin-top: 3px;
  color: var(--ph-muted);
  line-height: 1.35;
}

.ph-node:first-child small {
  color: rgba(255, 255, 255, 0.72);
}

.ph-network-panel__foot {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--ph-border);
}

.ph-stat strong,
.ph-stat span {
  display: block;
}

.ph-stat strong {
  font-size: 1.3rem;
  line-height: 1.1;
}

.ph-stat span {
  margin-top: 4px;
  color: var(--ph-muted);
  font-size: 0.72rem;
  line-height: 1.3;
}

.ph-section {
  padding: 86px 0;
}

.ph-section--white {
  background: var(--ph-white);
}

.ph-section--dark {
  color: var(--ph-white);
  background: var(--ph-charcoal);
}

.ph-section--dark .ph-kicker {
  color: var(--ph-orange);
}

.ph-section--dark .ph-section__head p {
  color: rgba(255, 255, 255, 0.72);
}

.ph-section__head {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(320px, 0.55fr);
  gap: 64px;
  align-items: end;
  margin-bottom: 36px;
}

.ph-kicker {
  display: block;
  margin-bottom: 12px;
  color: var(--ph-orange-dark);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ph-section h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2rem, 4.5vw, 3.55rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.ph-section__head p {
  margin: 0;
  color: var(--ph-muted);
}

.ph-portals {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.ph-portal-card {
  grid-column: span 2;
  min-height: 290px;
  display: flex;
  padding: 25px;
  flex-direction: column;
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius);
  color: var(--ph-ink);
  background: var(--ph-cream);
  text-decoration: none;
  transition: transform 170ms ease, border-color 170ms ease, box-shadow 170ms ease;
}

.ph-portal-card:nth-child(4),
.ph-portal-card:nth-child(5) {
  grid-column: span 3;
}

.ph-portal-card:hover,
.ph-portal-card:focus-visible {
  color: var(--ph-ink);
  border-color: rgba(191, 84, 16, 0.55);
  box-shadow: 0 18px 46px rgba(23, 25, 28, 0.1);
  transform: translateY(-5px);
}

.ph-portal-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ph-country-code {
  display: inline-grid;
  width: 50px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  color: var(--ph-white);
  background: var(--ph-charcoal);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.06em;
}

.ph-availability {
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--ph-green);
  background: var(--ph-green-soft);
  font-size: 0.69rem;
  font-weight: 820;
}

.ph-availability--soon {
  color: var(--ph-orange-dark);
  background: var(--ph-orange-soft);
}

.ph-portal-card h3 {
  margin: 25px 0 4px;
  font-size: 1.34rem;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.ph-portal-card p {
  margin: 8px 0 0;
  color: var(--ph-muted);
  font-size: 0.93rem;
}

.ph-portal-card__link {
  margin-top: auto;
  padding-top: 22px;
  color: var(--ph-orange-dark);
  font-size: 0.84rem;
  font-weight: 820;
}

.ph-values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.ph-value {
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--ph-radius);
  background: rgba(255, 255, 255, 0.055);
}

.ph-value__number {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 12px;
  color: var(--ph-charcoal);
  background: var(--ph-orange);
  font-size: 0.85rem;
  font-weight: 900;
}

.ph-value h3 {
  margin: 22px 0 8px;
  font-size: 1.25rem;
}

.ph-value p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.94rem;
}

.ph-network-note {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.55fr);
  gap: 58px;
  align-items: center;
  padding: 43px;
  border: 1px solid rgba(191, 84, 16, 0.2);
  border-radius: 28px;
  background: var(--ph-orange-soft);
}

.ph-network-note h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.ph-network-note p {
  margin: 13px 0 0;
  color: var(--ph-muted);
}

.site-main--content {
  min-height: 62vh;
  padding: 68px 0 90px;
}

.entry-card,
.entry-content {
  max-width: 820px;
  margin-inline: auto;
}

.entry-card {
  margin-bottom: 34px;
  padding: 30px;
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius);
  background: var(--ph-white);
}

.entry-title {
  margin: 0 0 20px;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.entry-title a {
  color: inherit;
  text-decoration: none;
}

.entry-meta {
  color: var(--ph-muted);
  font-size: 0.84rem;
}

.site-footer {
  padding: 64px 0 24px;
  color: rgba(255, 255, 255, 0.76);
  background: #111315;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 1fr 1fr;
  gap: 54px;
}

.site-footer__brand {
  color: var(--ph-white);
  font-size: 1.25rem;
  font-weight: 850;
  letter-spacing: -0.035em;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: var(--ph-white);
  font-size: 0.9rem;
}

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

.site-footer li + li {
  margin-top: 7px;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.88rem;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--ph-orange);
}

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 52px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.78rem;
}

@media (max-width: 980px) {
  .ph-hero__grid,
  .ph-section__head,
  .ph-network-note {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .ph-hero {
    padding-top: 66px;
  }

  .ph-network-panel {
    max-width: 620px;
  }

  .ph-portal-card,
  .ph-portal-card:nth-child(4),
  .ph-portal-card:nth-child(5) {
    grid-column: span 3;
  }

  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer__grid > :first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  body.admin-bar .site-header {
    top: 46px;
  }

  .site-header__inner {
    min-height: 72px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .primary-navigation {
    position: absolute;
    top: 100%;
    left: 20px;
    right: 20px;
    display: none;
    padding: 18px;
    border: 1px solid var(--ph-border);
    border-radius: 16px;
    background: var(--ph-white);
    box-shadow: var(--ph-shadow);
  }

  .primary-navigation.is-open {
    display: block;
  }

  .primary-navigation ul {
    align-items: stretch;
    flex-direction: column;
    gap: 5px;
  }

  .primary-navigation a {
    display: block;
    padding: 10px;
  }

  .ph-hero {
    padding: 54px 0 62px;
  }

  .ph-hero__grid {
    gap: 42px;
  }

  .ph-hero h1 {
    font-size: clamp(2.55rem, 13vw, 4.25rem);
  }

  .ph-network-panel {
    padding: 18px;
  }

  .ph-network-panel__body,
  .ph-values,
  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  .ph-node:first-child,
  .site-footer__grid > :first-child {
    grid-column: auto;
  }

  .ph-section {
    padding: 64px 0;
  }

  .ph-portals {
    display: block;
  }

  .ph-portal-card + .ph-portal-card {
    margin-top: 16px;
  }

  .ph-network-note {
    padding: 28px;
  }

  .site-footer__bottom {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .ph-container {
    width: min(calc(100% - 28px), var(--ph-width));
  }

  .site-branding__mark {
    width: 37px;
    height: 37px;
    flex-basis: 37px;
  }

  .ph-actions .ph-button {
    width: 100%;
  }

  .ph-network-panel__foot {
    grid-template-columns: 1fr;
  }
}

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

@media print {
  .site-header,
  .site-footer,
  .ph-actions {
    display: none;
  }

  body {
    color: #000;
    background: #fff;
  }
}
