/*
Theme Name: Pub'ancy
Theme URI: https://pubancy.fr/
Author: L'équipe Pub'ancy
Description: Thème vitrine de Pub'ancy, la scène musicale de Nancy. Textes, chiffres, liens et équipe se modifient dans Apparence > Personnaliser > Pub'ancy.
Version: 1.2.3
Requires at least: 6.3
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: pubancy
*/

/* Pub'ancy — site vitrine. Charte : noir mat #1E1E1E, jaune fluo #FFD900, logo Modak, titres Lalezar. */
:root {
  --ink: #1E1E1E;
  --ink-2: #262624;
  --line: #3A3A36;
  --fg: #F2F1EA;
  --muted: #B4B2A7;
  --fluo: #FFD900;
  --logo: "Modak", "Arial Rounded MT Bold", "Arial Black", sans-serif;
  --display: "Lalezar", "Arial Black", Impact, sans-serif;
  --body: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--ink); color: var(--fg); font-family: var(--body); font-size: 18px; line-height: 1.6; }
a { color: var(--fluo); }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--fluo); outline-offset: 3px; }
img { max-width: 100%; }

.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--fluo); color: var(--ink); padding: 8px 14px; font-weight: 600; }
.skip:focus { left: 12px; }

/* En-tête */
header.top { position: sticky; top: 0; z-index: 10; background: rgba(30, 30, 30, .94); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 14px; }
.logo { font-family: var(--logo); color: var(--fluo); font-size: 34px; line-height: 1; text-decoration: none; }
nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; flex-wrap: wrap; }
nav a { color: var(--fg); text-decoration: none; font-weight: 600; font-size: 16px; }
nav a:hover { color: var(--fluo); }
/* Menu burger sur mobile */
.burger { display: none; width: 46px; height: 46px; padding: 11px 10px; background: transparent; border: 2px solid var(--fluo); cursor: pointer; flex-direction: column; justify-content: space-between; }
.burger span { display: block; height: 3px; background: var(--fluo); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1), opacity .2s; }
.menu-open .burger span:nth-child(1) { transform: translateY(9.5px) rotate(45deg); }
.menu-open .burger span:nth-child(2) { opacity: 0; }
.menu-open .burger span:nth-child(3) { transform: translateY(-9.5px) rotate(-45deg); }
.burger:focus-visible { outline: 3px solid var(--fluo); outline-offset: 3px; }
@media (max-width: 760px) {
  .pop-live .burger { display: flex; }
  .pop-live header.top nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--ink); border-bottom: 3px solid var(--fluo); padding: 10px max(20px, env(safe-area-inset-left, 0px)) 22px; }
  .pop-live header.top.menu-open nav { display: block; animation: menu-drop .35s cubic-bezier(.2, .9, .3, 1.2); }
  .pop-live header.top nav ul, .pop-live header.top nav .menu { flex-direction: column; gap: 0; }
  .pop-live header.top nav a { display: block; padding: 12px 0; font-family: var(--display); font-weight: 400; font-size: 30px; border-bottom: 1px solid var(--line); }
  html:not(.pop-live) nav .opt { display: none; }
}
@keyframes menu-drop { 0% { opacity: 0; transform: translateY(-12px); } 100% { opacity: 1; transform: none; } }

/* Logo Instagram dans les boutons et le pied de page */
.ico { vertical-align: -4px; margin-right: 4px; }
footer .foot-insta { display: inline-flex; align-items: center; gap: 2px; }
.member-photo { max-width: 150px; width: 100%; }

/* Boutons */
.btn { display: inline-block; font-family: var(--body); font-weight: 600; font-size: 17px; text-decoration: none; padding: 14px 22px; border: 2px solid var(--fluo); }
.btn-main { background: var(--fluo); color: var(--ink); }
.btn-main:hover { background: #FFE54D; }
.btn-ghost { color: var(--fluo); }
.btn-ghost:hover { background: rgba(255, 217, 0, .1); }

/* Accroche */
.hero { padding-block: 60px 48px; }
.eyebrow { font-weight: 600; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: var(--fluo); margin: 0 0 18px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.05; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(48px, 8vw, 104px); max-width: 15ch; }
h1 em, h2 em { font-style: normal; color: var(--fluo); }
.lead { font-size: clamp(19px, 2.2vw, 23px); color: #DEDCD3; max-width: 60ch; margin: 26px 0 34px; }
.ctas { display: flex; flex-wrap: wrap; gap: 14px; }

/* Chiffres */
.stats { border-block: 1px solid var(--line); background: var(--ink-2); }
.stats .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding-block: 34px; }
.stat b { display: block; font-family: var(--display); font-weight: 400; font-size: 64px; line-height: 1; color: var(--fluo); }
.stat span { color: var(--muted); font-size: 17px; }
.stats .note { grid-column: 1 / -1; font-size: 14px; color: var(--muted); margin: 0; }
@media (max-width: 680px) { .stats .wrap { grid-template-columns: 1fr; } }

/* Sections */
section.block { padding-block: 56px; }
h2 { font-size: clamp(36px, 5vw, 58px); margin-bottom: 18px; }
.intro { color: #DEDCD3; max-width: 62ch; margin: 0 0 28px; }

.audiences { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 900px) { .audiences { grid-template-columns: 1fr; } }
.card { background: var(--ink-2); border: 1px solid var(--line); padding: 30px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card h3 { font-size: 34px; color: var(--fluo); }
.card ul { margin: 0; padding-left: 20px; color: #DEDCD3; }
.card li { margin-bottom: 6px; }
.card .btn { margin-top: auto; align-self: flex-start; font-size: 16px; padding: 11px 18px; }

/* Étapes */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.steps li { border-top: 4px solid var(--line); padding-top: 16px; }
.steps li.now { border-top-color: var(--fluo); }
.steps .when { font-weight: 600; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.steps li.now .when { color: var(--fluo); }
.steps h3 { font-size: 28px; margin: 6px 0 8px; }
.steps p { margin: 0; color: #DEDCD3; font-size: 17px; }

/* Équipe */
.team { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 900px) { .team { grid-template-columns: 1fr 1fr; } }
.person { border: 1px solid var(--line); padding: 22px; }
.person b { display: block; font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1.1; }
.person span { color: var(--fluo); font-size: 15px; font-weight: 600; letter-spacing: .04em; }

/* Contact */
.contact { background: var(--fluo); color: var(--ink); }
.contact h2 em { color: var(--ink); text-decoration: underline; text-decoration-thickness: 6px; text-underline-offset: 8px; }
.contact p { max-width: 56ch; font-size: 20px; }
.contact a { color: var(--ink); font-weight: 600; }
.contact .links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.contact .btn { border-color: var(--ink); }
.contact .btn-main { background: var(--ink); color: var(--fluo); }
.contact .btn-ghost { color: var(--ink); }
.contact .btn:focus-visible { outline-color: var(--ink); }

/* Pied de page */
footer { border-top: 1px solid var(--line); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; padding-block: 28px; font-size: 15px; color: var(--muted); }
footer a { color: var(--muted); }

/* Page texte (mentions légales) */
.legal { padding-block: 70px; max-width: 760px; }
.legal h1 { font-size: clamp(40px, 6vw, 64px); margin-bottom: 30px; }
.legal h2 { font-size: 30px; margin: 40px 0 10px; }
.legal p, .legal li { color: #DEDCD3; }
.todo { background: rgba(255, 217, 0, .15); border-left: 4px solid var(--fluo); padding: 2px 8px; }

/* ----- Spécifique WordPress ----- */
body.admin-bar header.top { top: 32px; }
@media (max-width: 782px) { body.admin-bar header.top { top: 46px; } }
nav .menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; flex-wrap: wrap; }
footer .foot-links { display: flex; flex-wrap: wrap; gap: 18px; }
.more { margin-top: 30px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Notre histoire */
.hero-page { padding-block: 48px 0; }
section.story { padding-top: 28px; }
.story-content { max-width: 1120px; }
.story-content > p, .story-content > h2, .story-content > h3, .story-content > ul,
.story-content > .wp-block-details, .story-content > blockquote { max-width: 760px; }
.story-content > * + * { margin-top: 1.1em; }
.story-content p, .story-content li { color: #DEDCD3; }
.story-content .lead { font-size: clamp(21px, 2.4vw, 26px); color: var(--fg); }
.story-content h2 { font-size: clamp(30px, 4vw, 44px); margin-top: 1.3em; margin-bottom: 0; }
.story-content h3 { font-size: 28px; margin-top: 1.4em; }
.story-content img { height: auto; display: block; }
.story-content figure { margin: 1.6em 0; }
.story-content figcaption { color: var(--muted); font-size: 15px; margin-top: 8px; }
.story-content .alignwide { max-width: 1080px; width: min(1080px, calc(100vw - 40px)); }
.story-content blockquote { border-left: 4px solid var(--fluo); margin-left: 0; padding-left: 20px; font-size: 22px; }
.story-content a { color: var(--fluo); }
.wp-block-gallery { gap: 12px; }

.goal { background: var(--ink-2); border-block: 1px solid var(--line); }
.goal-text { max-width: 62ch; font-size: 20px; color: #DEDCD3; }

.team-full { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 900px) { .team-full { grid-template-columns: 1fr; } }
.member { display: grid; grid-template-columns: 150px 1fr; gap: 26px; align-items: start; border: 1px solid var(--line); padding: 20px; background: var(--ink-2); }
@media (max-width: 640px) { .member { grid-template-columns: 1fr; } }
.member-photo { aspect-ratio: 1; max-width: 100%; background: var(--ink); border: 3px solid var(--fluo); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.member-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.initials { font-family: var(--logo); color: var(--fluo); font-size: 60px; line-height: 1; }
.member-text { min-width: 0; }
.member h3 { font-size: 36px; }
.member-role { color: var(--fluo); font-weight: 600; letter-spacing: .04em; margin: 6px 0 14px; }
.member-text p { color: #DEDCD3; }

/* Pages des publics */
.card .more-link { font-weight: 600; font-size: 15px; color: var(--fg); text-decoration: none; }
.card .more-link:hover { color: var(--fluo); }
.card .btn { margin-top: auto; }
.story-content ol.parcours { list-style: none; padding: 0; counter-reset: etape; display: grid; gap: 14px; }
.story-content ol.parcours li { counter-increment: etape; position: relative; padding: 18px 20px 18px 78px; background: var(--ink-2); border: 1px solid var(--line); }
.story-content ol.parcours li::before { content: counter(etape); position: absolute; left: 20px; top: 16px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--fluo); color: var(--ink); font-family: var(--display); font-size: 26px; line-height: 1; }
.story-content ol.parcours strong { color: var(--fg); display: block; font-size: 19px; }
.story-content .benefits { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .story-content .benefits { grid-template-columns: 1fr; } }
.story-content .benefit { border: 1px solid var(--line); border-top: 4px solid var(--fluo); padding: 18px 20px; }
.story-content .benefit h3 { margin: 0 0 6px; font-size: 26px; color: var(--fluo); }
.story-content .benefit p { margin: 0; }
.stats-inline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 24px; border: 1px solid var(--line); background: var(--ink-2); margin: 2em 0; }
.stats-inline .stat b { font-size: 52px; }
.stats-inline .note { grid-column: 1 / -1; font-size: 14px; color: var(--muted); margin: 0; }
@media (max-width: 640px) { .stats-inline { grid-template-columns: 1fr; } }
.story-content details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.story-content summary { cursor: pointer; font-weight: 600; font-size: 19px; color: var(--fg); }
.story-content summary::marker { color: var(--fluo); }
.story-content details p { margin: 10px 0 0; }

/* ----- Ordinateur : accroche et sections plus compactes ----- */
@media (min-width: 900px) {
  .hero { padding-block: 64px 48px; }
  .hero h1 { font-size: clamp(56px, 5.6vw, 78px); max-width: 21ch; }
  .hero .lead { margin: 20px 0 28px; }
  .hero-page { padding-block: 44px 0; }
  .hero-page h1 { font-size: clamp(48px, 5vw, 68px); }
  section.block { padding-block: 52px; }

  /* Les pages des publics utilisent toute la largeur pour les cartes, le texte reste lisible */
  .story-content .benefits { grid-template-columns: repeat(4, 1fr); }
  .story-content .benefit { padding: 16px 18px; }
  .story-content .benefit h3 { font-size: 23px; }
  .story-content ol.parcours { grid-template-columns: repeat(5, 1fr); gap: 12px; }
  .story-content ol.parcours li { padding: 70px 16px 16px; font-size: 16px; line-height: 1.45; }
  .story-content ol.parcours li::before { left: 16px; top: 16px; }
  .story-content ol.parcours strong { font-size: 17px; margin-bottom: 4px; }
}

/* ----- « Ce que tu y gagnes » : WordPress ajoute un conteneur interne aux groupes ----- */
.story-content .benefits > .wp-block-group__inner-container { display: contents; }
.story-content .benefit > .wp-block-group__inner-container > * + * { margin-top: 6px; }
@media (min-width: 900px) {
  .story-content .benefits { grid-template-columns: repeat(4, 1fr); gap: 18px; margin-block: 1.4em; }
  .story-content .benefit { padding: 22px 22px 24px; background: var(--ink-2); border-top-width: 6px; display: flex; flex-direction: column; }
  .story-content .benefit h3 { font-size: 26px; margin-bottom: 10px; }
  .story-content .benefit p { font-size: 16px; line-height: 1.5; }
}

/* ----- Animations « pop » (js/pop.js) ----- */
@keyframes pop-in {
  0%   { opacity: 0; transform: translateY(28px) scale(.82) rotate(-2deg); }
  60%  { opacity: 1; transform: translateY(-6px) scale(1.05) rotate(1deg); }
  80%  { transform: translateY(2px) scale(.98) rotate(0); }
  100% { opacity: 1; transform: none; }
}
@keyframes rise-in {
  0%   { opacity: 0; transform: translateY(22px); }
  100% { opacity: 1; transform: none; }
}
@keyframes bump {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.18) rotate(-3deg); }
  70% { transform: scale(.96); }
}
@keyframes wiggle {
  0%, 86%, 100% { transform: none; }
  89% { transform: rotate(-4deg) scale(1.08); }
  93% { transform: rotate(3deg) scale(1.04); }
  96% { transform: rotate(-1deg); }
}
@keyframes jelly {
  0%, 100% { transform: scale(1, 1); }
  30% { transform: scale(1.18, .84); }
  50% { transform: scale(.88, 1.12); }
  70% { transform: scale(1.06, .95); }
}
@keyframes float-note {
  0%   { transform: translateY(0) rotate(-8deg); opacity: 0; }
  15%  { opacity: .22; }
  50%  { transform: translateY(-38px) rotate(8deg); }
  85%  { opacity: .22; }
  100% { transform: translateY(-76px) rotate(-6deg); opacity: 0; }
}
@keyframes burst {
  0%   { transform: translate(-50%, -50%) scale(.4); opacity: 1; }
  70%  { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--r)) scale(1.1); opacity: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  /* Cachés jusqu'à leur apparition, seulement si le script tourne (sinon tout reste visible). */
  .js:not(.pop-done) [data-pop]:not(.is-in) { opacity: 0; }
  .js:not(.pop-live):not(.pop-done) :is(.hero h1, .hero .lead, .eyebrow, .ctas) { opacity: 0; }
  [data-pop="pop"].is-in { animation: pop-in .7s cubic-bezier(.2, .9, .3, 1.3) var(--pop-delay, 0ms) both; }
  [data-pop="rise"].is-in { animation: rise-in .6s ease-out var(--pop-delay, 0ms) both; }
  .stat b.bump { animation: bump .5s ease-out; transform-origin: left center; }

  /* Le mot en jaune du titre se trémousse de temps en temps. */
  .hero h1 em { display: inline-block; animation: wiggle 5s ease-in-out 1.5s infinite; transform-origin: 50% 80%; }

  /* Survol réservé à ce qui est cliquable : logo, liens du menu, boutons, liens « En savoir plus », questions. */
  .logo { display: inline-block; transition: transform .2s; }
  .logo:hover { animation: jelly .6s ease; }
  .btn { transition: transform .18s cubic-bezier(.3, 1.6, .5, 1), box-shadow .18s, background-color .18s; }
  .btn:hover { transform: translate(-3px, -3px) rotate(-1deg); box-shadow: 5px 5px 0 var(--fg); }
  .contact .btn:hover { box-shadow: 5px 5px 0 var(--ink); }
  .btn:active { transform: translate(0, 0) scale(.95); box-shadow: 0 0 0 transparent; }
  .more-link { display: inline-block; transition: transform .18s; }
  .more-link:hover { transform: translateX(6px); }
  nav a { display: inline-block; transition: transform .18s, color .18s; }
  nav a:hover { transform: translateY(-2px) rotate(-2deg); }
  .story-content summary { transition: color .2s, transform .2s; }
  .story-content summary:hover { transform: translateX(6px); }
  .story-content details[open] > :not(summary) { animation: faq-open .45s cubic-bezier(.2, .9, .3, 1.3) both; }
  .story-content summary::after { transition: transform .35s cubic-bezier(.3, 1.6, .5, 1), background-color .2s; }
}
@keyframes faq-open {
  0%   { opacity: 0; transform: translateY(-10px) scale(.96); }
  100% { opacity: 1; transform: none; }
}

/* Questions fréquentes : un « + » jaune qui tourne en « × » à l'ouverture */
.story-content details { border-bottom: 1px solid var(--line); padding: 0; }
.story-content summary { list-style: none; position: relative; padding: 16px 52px 16px 0; color: var(--fg); }
.story-content summary::-webkit-details-marker { display: none; }
.story-content summary::marker { content: ""; }
.story-content summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; width: 34px; height: 34px; margin-top: -17px;
  display: flex; align-items: center; justify-content: center; background: var(--ink-2); border: 2px solid var(--fluo);
  color: var(--fluo); font-family: var(--display); font-size: 26px; line-height: 1;
}
.story-content details[open] summary { color: var(--fluo); }
.story-content details[open] summary::after { content: "2"; transform: rotate(180deg); background: var(--fluo); color: var(--ink); }
.story-content details > p { margin: 0 0 16px; }

/* Notes flottantes de l'accroche */
.hero { position: relative; overflow: hidden; }
.hero > .wrap { position: relative; z-index: 1; }
.notes-float { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.notes-float span { position: absolute; color: var(--fluo); opacity: 0; animation: float-note 10s ease-in-out infinite; }

/* Explosion de notes au clic */
.pop-burst { position: fixed; z-index: 9999; pointer-events: none; color: var(--fluo); font-size: 20px; line-height: 1; text-shadow: 0 0 2px var(--ink); animation: burst .75s cubic-bezier(.2, .8, .3, 1) forwards; }
.pop-burst-dark { color: var(--ink); text-shadow: 0 0 2px var(--fluo); }

@media (prefers-reduced-motion: reduce) {
  .notes-float { display: none; }
}

/* Moins d'espace entre le titre d'une page et son texte */
section.block.story { padding-top: 14px; }
.story-content > :first-child { margin-top: 0; }
