/* =========================================================
   310 — CSS — Header Footer
   Projet : Plaisirs Gourmands
   Scope : global sitewide — Header/Footer uniquement
   Préfixe : pg-
   Emplacement source : _dev/snippets-source/css/310-css-header-footer.css
   Action : CRÉATION
   Dépendances : 100 — HTML — Header, 190 — HTML — Footer, 300 — CSS — Fondation globale
   Notes : ne pas ajouter de styles page, hero, cartes ou sections métier
========================================================= */

/* =========================================================
   WordPress shell — masquage GeneratePress local
========================================================= */

body.pg-shell-active .site-header,
body.pg-shell-active .site-footer {
  display: none;
}

body.pg-shell-active {
  overflow-x: clip;
  overflow-y: visible;
}

.pg-header {
  display: flex;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  justify-content: space-between;
  align-items: center;
  padding: 15px 5%;
  border-bottom: 1px solid rgba(245, 245, 219, 0.1);
  background: var(--pg-color-bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.pg-header .pg-header__logo-container {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  gap: 20px;
}

.pg-header .pg-header__logo-text {
  min-width: 0;
}

.pg-header .pg-header__logo-img {
  flex: 0 0 auto;
  height: 60px;
  width: auto;
  max-width: 60px;
  object-fit: contain;
}

.pg-header .pg-header__brand-name {
  display: block;
  min-width: 0;
  max-width: 100%;
  font-family: "Playfair Display", serif;
  font-size: clamp(15px, 4.4vw, 20px);
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.1;
  margin: 0;
  color: var(--pg-color-accent);
  overflow-wrap: anywhere;
}

.pg-header .pg-header__brand-line {
  display: inline;
}

.pg-header .pg-header__brand-line + .pg-header__brand-line::before {
  content: " ";
}

.pg-header .pg-header__nav-list {
  list-style: none;
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
}

.pg-header .pg-header__nav-link {
  text-decoration: none;
  color: var(--pg-color-text);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
  cursor: pointer;
  transition:
    color var(--pg-transition-base),
    opacity var(--pg-transition-base);
}

.pg-header .pg-header__nav-link span {
  color: var(--pg-color-accent);
  font-size: 10px;
  margin-right: 5px;
}

.pg-header .pg-header__nav-link:hover {
  opacity: 1;
  color: var(--pg-color-accent);
}

.pg-header .pg-header__social-nav {
  display: flex;
  gap: 20px;
  align-items: center;
}

.pg-header .pg-header__desktop-cta {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid color-mix(in srgb, var(--pg-color-accent) 58%, transparent);
  border-radius: 8px;
  background: var(--pg-color-accent);
  color: var(--pg-color-bg);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition:
    background-color var(--pg-transition-base),
    border-color var(--pg-transition-base),
    box-shadow var(--pg-transition-base),
    color var(--pg-transition-base);
}

.pg-header .pg-header__desktop-cta:hover {
  border-color: var(--pg-color-accent);
  background-color: transparent;
  color: var(--pg-color-accent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--pg-color-accent) 32%, transparent);
}

.pg-header .pg-header__social-link {
  color: var(--pg-color-accent);
  font-size: 18px;
  opacity: 0.8;
  text-decoration: none;
  transition:
    color var(--pg-transition-base),
    opacity var(--pg-transition-base),
    transform var(--pg-transition-base);
}

.pg-header .pg-header__social-link:hover {
  opacity: 1;
  color: var(--pg-color-text);
  transform: translateY(-2px);
}

@media (min-width: 1025px) {
  .pg-header {
    gap: clamp(18px, 1.5vw, 28px);
  }

  .pg-header .pg-header__logo-container {
    flex: 0 0 auto;
    width: clamp(178px, 15vw, 220px);
    margin-right: 0;
    gap: clamp(12px, 1vw, 16px);
  }

  .pg-header .pg-header__logo-text {
    flex: 0 1 auto;
    max-width: 128px;
  }

  .pg-header .pg-header__logo-img {
    height: clamp(54px, 4.2vw, 60px);
    max-width: clamp(54px, 4.2vw, 60px);
  }

  .pg-header .pg-header__brand-name {
    font-size: clamp(16px, 1.2vw, 18px);
    line-height: 1;
  }

  .pg-header .pg-header__brand-line {
    display: block;
  }

  .pg-header .pg-header__brand-line + .pg-header__brand-line::before {
    content: none;
  }

  .pg-header .pg-header__nav {
    flex: 0 1 auto;
    min-width: 0;
    margin-right: 0;
  }

  .pg-header .pg-header__nav-list {
    align-items: center;
    gap: clamp(16px, 1.2vw, 24px);
    flex-wrap: nowrap;
  }

  .pg-header .pg-header__nav-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    min-height: 24px;
  }

  .pg-header .pg-header__nav-link {
    display: inline-flex;
    align-items: center;
    height: 24px;
    line-height: 1;
    white-space: nowrap;
  }

  .pg-header .pg-header__social-nav {
    flex: 0 0 auto;
    gap: 12px;
    margin-left: 0;
  }

  .pg-header .pg-header__desktop-social-link {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(227, 192, 156, 0.28);
    border-radius: 50%;
    background: rgba(227, 192, 156, 0.03);
    box-shadow:
      6px 6px 14px rgba(0, 0, 0, 0.48),
      -2px -2px 10px rgba(245, 245, 219, 0.03);
  }

  .pg-header .pg-header__desktop-social-icon {
    width: 18px;
    height: 18px;
    color: var(--pg-color-accent);
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
}

@media (min-width: 1200px) {
  .pg-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    column-gap: clamp(24px, 2vw, 32px);
    position: sticky;
    padding-left: max(5%, calc((100% - 1300px) / 2));
    padding-right: max(5%, calc((100% - 1300px) / 2));
  }

  .pg-header .pg-header__logo-container {
    grid-column: 1;
    width: clamp(252px, 17vw, 286px);
    gap: clamp(15px, 1.1vw, 18px);
  }

  .pg-header .pg-header__logo-text {
    max-width: 160px;
  }

  .pg-header .pg-header__logo-img {
    height: clamp(70px, 5.45vw, 78px);
    max-width: clamp(70px, 5.45vw, 78px);
  }

  .pg-header .pg-header__brand-name {
    font-size: clamp(19px, 1.45vw, 22px);
  }

  .pg-header .pg-header__nav {
    grid-column: 2;
    justify-self: center;
    position: static;
    transform: none;
  }

  .pg-header .pg-header__nav-list {
    gap: clamp(20px, 1.45vw, 30px);
  }

  .pg-header .pg-header__nav-link {
    height: 28px;
    font-size: 16px;
    letter-spacing: 1.2px;
  }

  .pg-header .pg-header__social-nav {
    grid-column: 3;
    justify-self: end;
    margin-left: auto;
  }
}

.pg-header .pg-header__menu-toggle {
  display: none;
}

.pg-header .pg-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 110;
}

.pg-header .pg-hamburger {
  position: relative;
  width: 24px;
  height: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.pg-header .pg-hamburger__line {
  position: absolute;
  height: 2px;
  background-color: #F5F5DB;
  border-radius: 10px;
  box-shadow: 0 0 8px rgba(245, 245, 219, 0.4);
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.pg-header .pg-hamburger__line--1 {
  width: 18px;
  transform: translateY(-6px);
}

.pg-header .pg-hamburger__line--2 {
  width: 18px;
  transform: translateY(0);
}

.pg-header .pg-hamburger__line--3 {
  width: 18px;
  transform: translateY(6px);
}

.pg-header .pg-header__mobile-social-links {
  display: none;
}

.pg-header .pg-header__mobile-social-label {
  color: var(--pg-color-text-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}

.pg-header .pg-header__nav-item--mobile-legal {
  display: none;
}

.pg-footer {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  border-top: 1px solid rgba(245, 245, 219, 0.1);
  padding: 60px 5% 30px 5%;
  background-color: var(--pg-color-bg);
  color: var(--pg-color-text);
  position: relative;
  z-index: 1;
}

.pg-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 32rem);
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.40;
  filter: brightness(1.3) contrast(1.1);
  z-index: 0;
  pointer-events: none;
}

.pg-footer .pg-footer__content {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: 1.7fr 1.1fr 1fr 1.2fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto 60px auto;
  align-items: start;
  position: relative;
  z-index: 1;
}

.pg-footer .pg-footer__col {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 10px;
}

.pg-footer .pg-footer__title {
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--pg-color-accent);
  margin: 0;
  padding: 0;
  line-height: 1.25;
  height: 28px;
  display: flex;
  align-items: center;
}

.pg-footer .pg-footer__text {
  color: var(--pg-color-text-muted);
  line-height: 1.55;
  font-size: 12px;
  max-width: 360px;
  margin: 0;
}

.pg-footer .pg-footer__contact-list,
.pg-footer .pg-footer__address,
.pg-footer .pg-footer__menu-list {
  list-style: none;
  display: grid;
  gap: 0;
  padding: 0;
  margin: 0;
  color: var(--pg-color-text-muted);
  line-height: 1.55;
  font-style: normal;
  font-size: 12px;
}

.pg-footer .pg-footer__contact-list > * + *,
.pg-footer .pg-footer__address > * + *,
.pg-footer .pg-footer__menu-list > * + * {
  margin-top: 8px;
}

.pg-footer .pg-footer__menu-list {
  justify-items: start;
}

.pg-footer .pg-footer__menu-list li {
  margin: 0;
  line-height: 1.6;
}

.pg-footer .pg-footer__link {
  color: var(--pg-color-text-muted);
  font-size: 12px;
  line-height: inherit;
  text-decoration: none;
  vertical-align: top;
  transition: color var(--pg-transition-base);
}

.pg-footer .pg-footer__menu-list .pg-footer__link {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  line-height: 1.6;
}

.pg-footer .pg-footer__menu-list li + li,
.pg-footer .pg-footer__contact-list li + li {
  margin-top: 8px;
}

.pg-footer .pg-footer__link:hover {
  color: var(--pg-color-text);
}

.pg-footer .pg-phone-number {
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
  letter-spacing: 0.045em;
  font-weight: 600;
}

.pg-footer .pg-footer__social-links {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.pg-footer .pg-footer__social-link {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  min-height: 51px;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 10px 18px;
  border: 1px solid var(--pg-color-accent-strong);
  border-radius: 999px;
  background: var(--pg-color-accent);
  color: var(--pg-color-bg);
  text-decoration: none;
  transition:
    border-color var(--pg-transition-base),
    color var(--pg-transition-base),
    transform var(--pg-transition-base);
}

.pg-footer .pg-footer__social-link:hover {
  border-color: var(--pg-color-accent);
  color: var(--pg-color-bg);
  transform: translateY(-2px);
}

.pg-footer .pg-footer__social-icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pg-footer .pg-footer__social-text {
  color: currentColor;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.pg-footer .pg-footer__social-wrap {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  justify-items: start;
  text-align: left;
}

.pg-footer .pg-footer__bottom {
  border-top: 1px solid rgba(245, 245, 219, 0.05);
  padding-top: 20px;
  display: flex;
  min-width: 0;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--pg-color-text-muted);
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* =========================================================
   Header — ajustements mobile iPhone-first
========================================================= */

@media (max-width: 1024px) {
  :root {
    --pg-header-mobile-height: 87px;
  }

  .pg-header {
    gap: 16px;
    padding: 10px max(16px, 5%);
  }

  .pg-header .pg-header__logo-container {
    flex: 0 0 auto;
    gap: 0;
  }

  .pg-header .pg-header__logo-text {
    display: flex;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 105;
  }

  .pg-header .pg-header__logo-img {
    height: clamp(58px, 17vw, 73px);
    max-width: clamp(58px, 17vw, 73px);
  }

  .pg-header .pg-header__brand-name {
    font-size: clamp(17px, 4.8vw, 22px);
    letter-spacing: 0.08em;
    line-height: 0.98;
    text-align: center;
    font-weight: 600;
    width: max-content;
    max-width: min(42vw, 170px);
  }

  .pg-header .pg-header__brand-line {
    display: block;
    text-align: center;
  }

  .pg-header .pg-header__brand-line + .pg-header__brand-line::before {
    content: none;
  }

  .pg-header .pg-menu-btn {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 56px;
    height: 56px;
    cursor: pointer;
    border-radius: 50%;
    background-color: #0a0a0a;
    position: relative;
    outline: 0;
    -webkit-tap-highlight-color: transparent;
    box-shadow:
      10px 10px 20px #000,
      -4px -4px 15px rgba(255, 255, 255, 0.02),
      0 0 0 1px rgba(245, 245, 219, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .pg-header .pg-menu-btn:focus,
  .pg-header .pg-menu-btn:active {
    outline: 0;
  }

  .pg-header .pg-menu-btn:focus-visible,
  .pg-header .pg-header__menu-toggle:focus-visible + .pg-menu-btn {
    outline: 1px solid var(--pg-color-accent);
    outline-offset: 4px;
  }

  .pg-header .pg-header__social-nav {
    display: none;
  }

  .pg-header .pg-header__menu-toggle {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    opacity: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .pg-header .pg-header__nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: auto;
    z-index: 99;
    width: min(50vw, 320px);
    min-width: 240px;
    max-width: 320px;
    height: calc(100vh - var(--pg-header-mobile-height));
    height: calc(100svh - var(--pg-header-mobile-height));
    overflow-y: auto;
    background: var(--pg-color-bg);
    padding: 28px var(--pg-container-padding) 32px;
    border-right: 1px solid rgba(245, 245, 219, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 28px;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-100%);
    transition:
      transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
      visibility 0s linear 0.55s;
  }

  .pg-header .pg-header__nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 0;
    margin: 0;
  }

  .pg-header .pg-header__nav-link {
    display: block;
    max-width: 100%;
    font-family: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: clamp(17px, 5vw, 22px);
    line-height: 1.2;
    color: var(--pg-color-text);
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.8;
    overflow-wrap: anywhere;
  }

  .pg-header .pg-header__mobile-social-links {
    display: grid;
    gap: 12px;
    justify-content: center;
    justify-items: center;
    align-items: center;
    margin-top: clamp(24px, 6vh, 56px);
    padding-top: 0;
    text-align: center;
  }

  .pg-header .pg-header__mobile-social-links .pg-header__social-link {
    color: var(--pg-color-accent);
    font-size: inherit;
  }

  .pg-header .pg-header__mobile-social-link {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 16px;
    border: 1px solid var(--pg-color-accent-strong);
    border-radius: 999px;
    background: var(--pg-color-accent);
    box-shadow:
      6px 6px 14px rgba(0, 0, 0, 0.48),
      -2px -2px 10px rgba(245, 245, 219, 0.03);
  }

  .pg-header .pg-header__mobile-social-icon {
    width: 22px;
    height: 22px;
    color: var(--pg-color-bg);
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .pg-header .pg-header__mobile-social-text {
    color: var(--pg-color-bg);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.2;
  }

  .pg-header .pg-header__nav-item--mobile-legal {
    display: list-item;
  }

  .pg-header .pg-header__menu-toggle:checked ~ .pg-header__nav {
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
    transition:
      transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
      visibility 0s;
  }

  #pg-header-menu-toggle:checked + .pg-menu-btn {
    transform: scale(0.96);
    box-shadow:
      inset 8px 8px 16px #000,
      inset -4px -4px 12px rgba(245, 245, 219, 0.4);
  }

  #pg-header-menu-toggle:checked + .pg-menu-btn .pg-hamburger__line--1 {
    width: 22px;
    height: 22px;
    background-color: transparent;
    border: 2px solid #F5F5DB;
    border-radius: 50%;
    border-bottom-color: transparent;
    border-left-color: transparent;
    transform: translateY(0) rotate(45deg);
  }

  #pg-header-menu-toggle:checked + .pg-menu-btn .pg-hamburger__line--2 {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #F5F5DB;
    box-shadow: 0 0 15px #F5F5DB;
    transform: scale(1.2);
  }

  #pg-header-menu-toggle:checked + .pg-menu-btn .pg-hamburger__line--3 {
    width: 22px;
    height: 22px;
    background-color: transparent;
    border: 2px solid #F5F5DB;
    border-radius: 50%;
    border-top-color: transparent;
    border-right-color: transparent;
    transform: translateY(0) rotate(45deg);
  }

  .pg-footer .pg-footer__content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .pg-footer .pg-footer__col {
    align-items: center;
    text-align: center;
  }

  .pg-footer .pg-footer__text {
    margin-inline: auto;
    text-align: center;
  }

  .pg-footer .pg-footer__contact-list,
  .pg-footer .pg-footer__address,
  .pg-footer .pg-footer__menu-list {
    justify-items: center;
    text-align: center;
  }

  .pg-footer .pg-footer__social-links {
    justify-content: center;
  }

  .pg-footer .pg-footer__social-wrap {
    align-self: center;
    justify-items: center;
    text-align: center;
  }

  .pg-footer .pg-footer__bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .pg-footer .pg-footer__menu-list .pg-footer__link {
    min-height: auto;
    padding: 0;
  }
}

/* ==========================================================================
   310 — CSS — Header Footer
   Correction mobile — centrage réel marque header
   ========================================================================== */

@media (max-width: 767px) {
  :root {
    --pg-header-mobile-height: calc(clamp(58px, 17vw, 73px) + 21px);
  }

  .pg-header,
  .pg-header__inner {
    display: grid;
    grid-template-columns: 64px 1fr 64px;
    align-items: center;
    width: 100%;
  }

  .pg-header .pg-header__logo-container,
  .pg-header__brand {
    display: contents;
  }

  .pg-header .pg-header__logo-img,
  .pg-header__logo,
  .pg-header__brand-logo {
    grid-column: 1;
    justify-self: start;
  }

  .pg-header .pg-header__logo-text,
  .pg-header__brand-text {
    position: static;
    grid-column: 2;
    justify-self: center;
    align-self: center;
    transform: none;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 0.95;
    max-width: 100%;
  }

  .pg-header .pg-header__brand-line {
    display: block;
    text-align: center;
  }

  .pg-header .pg-header__menu-toggle,
  .pg-header .pg-header__toggle,
  .pg-header .pg-menu-btn {
    grid-column: 3;
    justify-self: end;
  }
}

@media (min-width: 1025px) {
  .pg-header .pg-header__mobile-social-links {
    display: none;
  }
}
