/*
Theme Name: Pledgo
Theme URI: https://pledgo.ch
Author: Pledgo
Description: Thème coloré et ergonomique pour Pledgo, la plateforme de financement participatif par précommandes. À utiliser avec le plugin « Pledgo Campagnes ».
Version: 1.0.0
Requires at least: 6.2
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: pledgo-theme
*/

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
	margin: 0;
	font-family: ui-rounded, "SF Pro Rounded", "Nunito", "Avenir Next", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 1.0625rem;
	line-height: 1.65;
	color: var(--pg-ink, #1b1340);
	background: var(--pg-bg, #fff8ee);
	-webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-weight: 800; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
a { color: var(--pg-primary-dark, #3a22a8); text-underline-offset: 3px; }
a:hover { color: var(--pg-primary, #5b3fe0); }
:focus-visible { outline: 3px solid var(--pg-primary, #5b3fe0); outline-offset: 3px; border-radius: 6px; }

.container { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.section { padding: 80px 0; }
@media (max-width: 720px) { .section { padding: 56px 0; } }
.section__head { max-width: 680px; margin: 0 auto 40px; text-align: center; }
.section__head p { color: var(--pg-muted, #5e5b78); font-size: 1.15rem; }
.eyebrow {
	display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 6px 16px;
	border-radius: 999px; background: #fff; border: 2px solid var(--pg-line, #e6dff5);
	font-weight: 800; font-size: .9rem; color: var(--pg-primary-dark, #3a22a8);
}
.eyebrow::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--pg-coral, #ff5a6e); }

.screen-reader-text, .skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; z-index: 100; background: #fff; padding: 12px 18px; border-radius: 10px; box-shadow: var(--pg-shadow); }

/* ==========================================================================
   Boutons
   ========================================================================== */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .55em;
	min-height: 52px; padding: .75em 1.6em; border-radius: 999px; border: 0;
	font: inherit; font-weight: 800; font-size: 1.05rem; line-height: 1.1; text-decoration: none; cursor: pointer;
	box-shadow: 0 4px 0 rgba(27, 19, 64, .2); transition: transform .12s ease, box-shadow .12s ease, background-color .15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 rgba(27, 19, 64, .2); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(27, 19, 64, .2); }
.btn--sun { background: var(--pg-sun, #ffc93c); color: var(--pg-ink, #1b1340); }
.btn--sun:hover { background: #ffd35f; color: var(--pg-ink, #1b1340); }
.btn--violet { background: var(--pg-primary, #5b3fe0); color: #fff; }
.btn--violet:hover { background: #6d52ee; color: #fff; }
.btn--ghost { background: #fff; color: var(--pg-primary-dark, #3a22a8); box-shadow: inset 0 0 0 2px var(--pg-primary, #5b3fe0), 0 4px 0 rgba(27, 19, 64, .12); }
.btn--ghost:hover { background: var(--pg-primary-soft, #ece8ff); }
.btn--light { background: #fff; color: var(--pg-primary-dark, #3a22a8); }
.btn--small { min-height: 44px; padding: .55em 1.2em; font-size: .98rem; }

/* ==========================================================================
   En-tête
   ========================================================================== */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(255, 248, 238, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
	border-bottom: 2px solid transparent; transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--pg-line, #e6dff5); box-shadow: 0 6px 24px rgba(91, 63, 224, .08); }
.site-header__inner { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.site-logo { display: inline-flex; flex: none; }
.site-logo img { height: 42px; width: auto; display: block; }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav a {
	display: inline-block; padding: 10px 16px; border-radius: 999px; font-weight: 800; text-decoration: none;
	color: var(--pg-ink, #1b1340);
}
.site-nav a:hover, .site-nav .current-menu-item > a, .site-nav .current_page_item > a { background: var(--pg-primary-soft, #ece8ff); color: var(--pg-primary-dark, #3a22a8); }
.site-header__cta { flex: none; }
.lang-switch ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 4px; border-radius: 999px; background: #fff; border: 2px solid var(--pg-line, #e6dff5); }
.lang-switch a { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 36px; padding: 0 8px; border-radius: 999px; font-weight: 900; font-size: .85rem; text-decoration: none; color: var(--pg-ink, #1b1340); }
.lang-switch a:hover { background: var(--pg-primary-soft, #ece8ff); }
.lang-switch a.is-current { background: var(--pg-primary, #5b3fe0); color: #fff; }
@media (max-width: 960px) { .lang-switch { margin-left: auto; } .lang-switch + .account-link { margin-left: 0; } }
.account-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 999px; font-weight: 800; text-decoration: none; color: var(--pg-ink, #1b1340); }
.account-link:hover { background: var(--pg-primary-soft, #ece8ff); color: var(--pg-primary-dark, #3a22a8); }
@media (max-width: 960px) { .account-link span { display: none; } .account-link { margin-left: auto; width: 48px; padding: 0; justify-content: center; } .nav-toggle { margin-left: 0; } }
.nav-toggle {
	display: none; margin-left: auto; width: 48px; height: 48px; border-radius: 14px; border: 2px solid var(--pg-line, #e6dff5);
	background: #fff; cursor: pointer; padding: 0; align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 22px; height: 3px; border-radius: 2px; background: var(--pg-ink, #1b1340); content: ""; position: relative; transition: transform .2s ease; }
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after { position: absolute; top: 7px; }
@media (max-width: 960px) {
	.nav-toggle { display: inline-flex; }
	.site-header__cta { display: none; }
	.site-nav {
		display: none; position: absolute; left: 0; right: 0; top: 100%; margin: 0; padding: 12px 20px 24px;
		background: #fff8ee; border-bottom: 2px solid var(--pg-line, #e6dff5); box-shadow: 0 16px 32px rgba(91, 63, 224, .12);
	}
	.site-nav.is-open { display: block; }
	.site-nav ul { flex-direction: column; align-items: stretch; gap: 6px; }
	.site-nav a { display: block; padding: 14px 18px; font-size: 1.1rem; }
	.site-nav .nav-cta { display: block; margin-top: 10px; }
	.site-nav .nav-cta .btn { width: 100%; }
}
@media (min-width: 961px) { .site-nav .nav-cta { display: none; } }

/* ==========================================================================
   Accueil: héros
   ========================================================================== */
.hero {
	position: relative; overflow: hidden; padding: 56px 0 80px;
	background:
		radial-gradient(circle at 8% 12%, rgba(255, 201, 60, .38), transparent 36%),
		radial-gradient(circle at 96% 8%, rgba(255, 90, 110, .2), transparent 34%),
		radial-gradient(circle at 78% 96%, rgba(46, 196, 166, .24), transparent 38%),
		var(--pg-bg, #fff8ee);
}
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 32px 48px; align-items: center; }
.hero h1 { margin-bottom: 20px; }
.mark { background: linear-gradient(transparent 60%, var(--pg-sun, #ffc93c) 60%); padding: 0 .12em; border-radius: 4px; white-space: nowrap; }
.hero__lead { font-size: 1.25rem; color: var(--pg-muted, #5e5b78); max-width: 34em; margin-bottom: 28px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 28px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.chips li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; background: #fff; font-weight: 700; font-size: .95rem; box-shadow: 0 2px 0 rgba(27, 19, 64, .08); }
.chips li::before { content: ""; width: 18px; height: 18px; border-radius: 50%; background: var(--pg-mint, #2ec4a6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; flex: none; }
.hero__art img { display: block; width: 100%; max-width: 560px; margin-inline: auto; }
@media (max-width: 900px) {
	.hero { padding: 36px 0 56px; }
	.hero__grid { grid-template-columns: minmax(0, 1fr); }
	.hero__art { order: -1; }
	.hero__art img { max-width: 380px; }
}

/* ==========================================================================
   Principe en 3 gestes
   ========================================================================== */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step { position: relative; padding: 32px 28px 30px; border-radius: 28px; counter-increment: step; border: 3px solid transparent; transition: transform .2s ease; }
.step:hover { transform: translateY(-4px) rotate(-.6deg); }
.step--violet { background: var(--pg-primary-soft, #ece8ff); border-color: #d6ccff; }
.step--coral { background: #ffe3e6; border-color: #ffc6cd; }
.step--mint { background: #d8f6ef; border-color: #b0ead9; }
.step__icon { width: 68px; height: 68px; margin-bottom: 18px; border-radius: 22px; background: #fff; display: grid; place-items: center; box-shadow: 0 4px 0 rgba(27, 19, 64, .1); }
.step__icon svg { width: 38px; height: 38px; }
.step h3 { margin-bottom: 8px; }
.step h3::before { content: counter(step); display: inline-grid; place-items: center; width: 32px; height: 32px; margin-right: 10px; border-radius: 50%; background: var(--pg-ink, #1b1340); color: #fff; font-size: 1rem; vertical-align: 2px; }
.step p { margin: 0; color: #3b3560; }
@media (max-width: 900px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* ==========================================================================
   Vidéo
   ========================================================================== */
.video-section { background: linear-gradient(135deg, var(--pg-primary, #5b3fe0), var(--pg-primary-dark, #3a22a8)); color: #fff; position: relative; overflow: hidden; }
.video-section::before, .video-section::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.video-section::before { width: 360px; height: 360px; right: -110px; top: -120px; background: rgba(255, 201, 60, .22); }
.video-section::after { width: 240px; height: 240px; left: -80px; bottom: -90px; background: rgba(255, 90, 110, .28); }
.video-section .container { position: relative; z-index: 1; }
.video-section h2 { color: #fff; }
.video-section a { color: #fff; }
.video-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; align-items: center; }
.video-grid p { font-size: 1.15rem; color: #e9e4ff; }
.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 28px; overflow: hidden; background: #fff; border: 6px solid #fff; box-shadow: 0 24px 48px rgba(10, 4, 50, .4); transform: rotate(1deg); }
.video-frame video, .video-frame iframe, .video-frame img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; display: block; }
.video-lite { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.video-lite__play { position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%; background: var(--pg-sun, #ffc93c); box-shadow: 0 6px 0 rgba(27, 19, 64, .25); display: grid; place-items: center; transition: transform .15s ease; }
.video-lite:hover .video-lite__play { transform: scale(1.08); }
.video-lite__play::before { content: ""; margin-left: 6px; border-style: solid; border-width: 15px 0 15px 25px; border-color: transparent transparent transparent var(--pg-ink, #1b1340); }
.video-placeholder { display: grid; place-items: center; text-align: center; padding: 24px; color: var(--pg-ink, #1b1340); position: absolute; inset: 0; background: var(--pg-primary-soft, #ece8ff); }
.video-placeholder img { position: static; height: 70%; width: auto; margin: 0 auto 8px; }
.video-placeholder p { color: var(--pg-ink, #1b1340); font-size: 1rem; margin: 0; }
@media (max-width: 900px) { .video-grid { grid-template-columns: minmax(0, 1fr); } .video-frame { transform: none; } }

/* ==========================================================================
   Campagnes
   ========================================================================== */
.section--white { background: #fff; }
.section__more { text-align: center; margin-top: 32px; }

/* Deux parcours */
.tracks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.track { border-radius: 32px; padding: 40px 36px; position: relative; overflow: hidden; }
.track--coral { background: #ffe3e6; border: 3px solid #ffc6cd; }
.track--violet { background: var(--pg-primary-soft, #ece8ff); border: 3px solid #d6ccff; }
.track h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.track > p { color: #3b3560; }
.track ul { list-style: none; margin: 18px 0 26px; padding: 0; display: grid; gap: 12px; }
.track li { position: relative; padding-left: 36px; font-weight: 600; }
.track li::before { content: ""; position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: 50%; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%231b1340' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat; box-shadow: 0 2px 0 rgba(27, 19, 64, .12); }
@media (max-width: 900px) { .tracks { grid-template-columns: minmax(0, 1fr); } .track { padding: 30px 24px; } }

/* Équipe */
.team { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.mascot { background: #fff; border: 3px solid var(--pg-line, #e6dff5); border-radius: 28px; padding: 24px 24px 28px; text-align: center; box-shadow: var(--pg-shadow); }
.mascot img { height: 190px; width: auto; margin: 0 auto 8px; display: block; }
.mascot h3 { margin-bottom: 2px; }
.mascot__role { display: inline-block; margin-bottom: 12px; padding: 2px 12px; border-radius: 999px; background: var(--pg-primary-soft, #ece8ff); color: var(--pg-primary-dark, #3a22a8); font-weight: 800; font-size: .82rem; }
.mascot p { color: #3b3560; margin: 0; }
@media (max-width: 900px) { .team { grid-template-columns: minmax(0, 1fr); } .mascot img { height: 160px; } }

/* FAQ */
.faq { max-width: 780px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: #fff; border: 3px solid var(--pg-line, #e6dff5); border-radius: 20px; padding: 0 22px; }
.faq details[open] { border-color: #d6ccff; background: #fcfbff; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 40px 18px 0; font-weight: 800; font-size: 1.1rem; position: relative; min-height: 56px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; background: var(--pg-sun, #ffc93c); display: grid; place-items: center; font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 18px; color: #3b3560; }

/* Bandeau final */
.cta-band { background: var(--pg-primary, #5b3fe0); color: #fff; text-align: center; position: relative; overflow: hidden; }
.cta-band::before, .cta-band::after { content: ""; position: absolute; border-radius: 50%; }
.cta-band::before { width: 260px; height: 260px; left: -70px; top: -90px; background: rgba(255, 201, 60, .3); }
.cta-band::after { width: 200px; height: 200px; right: -50px; bottom: -80px; background: rgba(46, 196, 166, .35); }
.cta-band .container { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; max-width: 18em; margin-inline: auto; }
.cta-band p { color: #e9e4ff; font-size: 1.15rem; margin-bottom: 28px; }

/* ==========================================================================
   Pages intérieures
   ========================================================================== */
.page-hero { padding: 48px 0 32px; background: radial-gradient(circle at 92% 20%, rgba(255, 201, 60, .35), transparent 34%), radial-gradient(circle at 4% 90%, rgba(91, 63, 224, .12), transparent 38%), var(--pg-bg, #fff8ee); }
.page-hero h1 { margin: 0; font-size: clamp(1.9rem, 4.2vw, 3rem); max-width: 22em; }
.page-hero p { color: var(--pg-muted, #5e5b78); font-size: 1.15rem; margin: 12px 0 0; max-width: 40em; }
.page-body { padding: 40px 0 72px; }
.entry { max-width: 760px; }
.entry--wide { max-width: none; }
.entry h2 { margin-top: 1.6em; font-size: 1.6rem; }
.entry h3 { margin-top: 1.4em; }
.entry ul, .entry ol { padding-left: 1.3em; }
.entry li { margin-bottom: .4em; }
.tabs { display: inline-flex; gap: 6px; padding: 6px; border-radius: 999px; background: #fff; border: 2px solid var(--pg-line, #e6dff5); margin: 0 0 24px; }
.tabs a { padding: 10px 20px; border-radius: 999px; text-decoration: none; font-weight: 800; color: var(--pg-ink, #1b1340); }
.tabs a.is-active { background: var(--pg-primary, #5b3fe0); color: #fff; }
.tabs a:not(.is-active):hover { background: var(--pg-primary-soft, #ece8ff); }
.not-found { text-align: center; padding: 72px 0; }
.not-found img { height: 200px; width: auto; margin-bottom: 16px; }

/* ==========================================================================
   Pied de page
   ========================================================================== */
.site-footer { background: var(--pg-ink, #1b1340); color: #cfc9ee; padding: 56px 0 28px; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--pg-sun, #ffc93c); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; margin-bottom: 36px; }
.footer-grid img { height: 40px; width: auto; margin-bottom: 14px; }
.footer-grid h2 { font-size: 1rem; color: #fff; letter-spacing: 0; margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .14); padding-top: 22px; font-size: .92rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }

/* Barre d'engagement mobile sur les pages de campagne */
.sticky-cta { display: none; }
@media (max-width: 880px) {
	.sticky-cta {
		display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
		background: rgba(255, 255, 255, .95); backdrop-filter: blur(10px); border-top: 2px solid var(--pg-line, #e6dff5);
		transform: translateY(0); transition: transform .25s ease;
	}
	.sticky-cta.is-hidden { transform: translateY(110%); }
	.sticky-cta .btn { width: 100%; }
	body.single-pledgo_campaign { padding-bottom: 84px; }
}

@media (prefers-reduced-motion: reduce) {
	.btn, .step, .sticky-cta, .video-lite__play { transition: none; }
	.step:hover, .btn:hover { transform: none; }
}
