/*
Theme Name: Radar
Description: Page d'inscription de Radar, la newsletter économique de Colmar et de son agglomération. Reprend le design system de la newsletter.
Version: 1.0.0
Requires at least: 6.5
Text Domain: radar
*/

/* ---------- Base ---------- */
:root {
	--encre: #111111;
	--texte: #33393A;
	--discret: #434A4B;
	--filet: #E2E2DC;
	--beige: #F1F0EA;
	--blanc: #FFFFFF;
	--jaune: #FFE600;
	--jaune-pale: #FFF8C4;
	--serif: 'Source Serif 4', Georgia, serif;
	--sans: 'Atkinson Hyperlegible', Verdana, 'Segoe UI', Helvetica, Arial, sans-serif;
	--wrap: 1120px;
	--gutter: 24px;
}
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 90px; }
body { margin: 0; background: var(--beige); color: var(--encre); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
.wp-site-blocks > * + * { margin-block-start: 0; }
a { color: var(--encre); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--encre); outline-offset: 3px; }
p { margin: 0; }
h1, h2, h3 { margin: 0; }
strong { font-weight: 700; }
::selection { background: var(--jaune); color: var(--encre); }
h1, h2, h3, .sec-title { text-wrap: balance; }
p, li { text-wrap: pretty; }

.radar-inner { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); box-sizing: border-box; }
.sec { padding: 88px 0; }
.sec-blanc { background: var(--blanc); }
.sec-noir { background: var(--encre); color: var(--blanc); }

.kicker { display: flex; align-items: flex-start; gap: 10px; line-height: 1.4; font-size: 13px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--discret); }
.sec-title { font-family: var(--serif); font-size: clamp(30px, 4vw, 44px); line-height: 1.12; letter-spacing: -0.5px; margin-top: 10px; max-width: 760px; }
.sec-lead { font-size: 19px; line-height: 1.55; color: var(--texte); margin-top: 14px; max-width: 640px; }

/* Le « blip » du radar devant chaque surtitre */
.kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--encre); box-shadow: 0 0 0 4px var(--jaune); flex: none; margin-top: 5px; }
.sec-noir .kicker::before { background: var(--jaune); box-shadow: 0 0 0 4px rgba(255,230,0,.25); }

/* Étiquettes de thème (mêmes couleurs que la newsletter) */
.tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; padding: 4px 8px; border-radius: 4px; line-height: 1; }
.tag-fiscalite { color: #8A170B; background: #FDE4DF; }
.tag-aides { color: #075A30; background: #DCF5E5; }
.tag-local { color: #5B2A9E; background: #EEE5FB; }
.tag-commerce { color: #00545A; background: #D8F2F2; }
.tag-emploi { color: #6A3A00; background: #FFE9C7; }
.tag-startups { color: #8C0F4F; background: #FCE2EE; }
.tag-marches { color: #3D4A00; background: #EEF5C9; }
.tag-agenda { color: var(--encre); background: var(--jaune); }
.tag-une { color: var(--jaune); background: var(--encre); }

/* ---------- En-tête ---------- */
.site-header { background: rgba(241,240,234,.92); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); border-top: 6px solid var(--jaune); border-bottom: 1px solid transparent; position: sticky; top: 0; z-index: 10; transition: border-color .2s ease, box-shadow .2s ease; }
.site-header.is-scrolled { border-bottom-color: var(--filet); box-shadow: 0 8px 24px -20px rgba(17,17,17,.5); }
.site-header .radar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.logo { font-family: var(--serif); font-size: 26px; font-weight: 700; text-decoration: none; background: var(--jaune); color: var(--encre); padding: 2px 10px 4px; }
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.baseline { font-family: var(--serif); font-size: 17px; font-weight: 600; color: var(--encre); white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 28px; font-size: 16px; }
.nav a { text-decoration: none; font-weight: 700; }
.nav a:not(.btn) { position: relative; padding: 6px 0; }
.nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--jaune); transform: scaleX(0); transform-origin: left; transition: transform .2s ease; }
.nav a:not(.btn):hover::after { transform: scaleX(1); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border: 0; border-radius: 8px; background: var(--encre); color: var(--jaune) !important; font-family: var(--sans); font-size: 17px; font-weight: 700; text-decoration: none !important; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--jaune); }
.btn-sm { min-height: 42px; padding: 0 16px; font-size: 15px; }
.btn-jaune { background: var(--jaune); color: var(--encre) !important; }
.btn-jaune:hover { box-shadow: 0 4px 0 var(--blanc); }
.btn__arrow { display: inline-block; margin-left: 8px; transition: transform .15s ease; }
.btn:hover .btn__arrow { transform: translateX(3px); }
.btn:active { transform: translateY(1px); box-shadow: none; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 96px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 64px; align-items: center; }
.hero h1 { font-family: var(--serif); font-size: clamp(38px, 5.4vw, 62px); line-height: 1.06; letter-spacing: -1px; margin-top: 14px; }
.hero h1 mark { background: linear-gradient(transparent 58%, var(--jaune) 58%); color: inherit; padding: 0 2px; }
.hero-lead { font-size: 20px; line-height: 1.55; color: var(--texte); margin-top: 20px; max-width: 580px; }
.proof { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 22px 0 0; font-size: 15px; font-weight: 700; }
.proof li { display: flex; align-items: center; gap: 7px; }
.proof li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; flex: none; background: var(--jaune) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8'%3E%3Cpath d='M1 4l3 3 5-6' fill='none' stroke='%23111' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat center; }

/* Formulaire */
.radar-form { margin-top: 28px; max-width: 540px; }
.radar-form__row { display: flex; gap: 10px; }
.radar-form label { display: block; font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.radar-form input[type="email"] { flex: 1; min-width: 0; min-height: 52px; padding: 0 16px; border: 2px solid var(--encre); border-radius: 8px; background: var(--blanc); font-family: var(--sans); font-size: 17px; color: var(--encre); box-sizing: border-box; }
.radar-form .btn { min-height: 52px; white-space: nowrap; }
.radar-form input[type="email"]::placeholder { color: #8A8F8F; }
.radar-form input[type="email"]:focus, .radar-form select:focus { outline: none; box-shadow: 0 0 0 4px var(--jaune); }
.radar-form input[type="email"], .radar-form select { transition: box-shadow .15s ease; }
.radar-form__note { font-size: 15px; color: var(--discret); margin-top: 10px; }
.radar-form__msg { font-size: 15px; font-weight: 700; margin-top: 8px; min-height: 1em; }
.radar-form .radar-form__consent { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; font-weight: 400; line-height: 1.4; margin: 12px 0 0; cursor: pointer; }
.radar-form__consent input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--encre); }
.radar-form__secteur { margin-top: 14px; }
.radar-form__secteur label span { font-weight: 400; color: var(--discret); }
.radar-form select { width: 100%; min-height: 48px; padding: 0 40px 0 14px; border: 2px solid var(--encre); border-radius: 8px; background: var(--blanc) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23111' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center; -webkit-appearance: none; appearance: none; font-family: var(--sans); font-size: 16px; color: var(--encre); box-sizing: border-box; }
.sec-noir .radar-form select { border-color: var(--blanc); }
.sec-noir .radar-form__secteur label span { color: #D4D4D4; }
.radar-form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sec-noir .radar-form .radar-form__consent { color: #D4D4D4; }
.sec-noir .radar-form__consent input { accent-color: var(--jaune); }
.sec-noir .radar-form label, .sec-noir .radar-form__note { color: #D4D4D4; }
.sec-noir .radar-form__msg { color: var(--jaune); }
.sec-noir .radar-form input[type="email"] { border-color: var(--blanc); }

/* L'aperçu posé sur un écran radar */
.scope { position: relative; }
.scope > *:not(.scope__rings) { position: relative; z-index: 1; }
.scope__rings { position: absolute; left: 50%; top: 46%; width: 150%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none; z-index: 0;
	background: repeating-radial-gradient(circle, transparent 0 63px, rgba(17,17,17,.08) 63px 64px);
	-webkit-mask: radial-gradient(circle, #000 40%, transparent 70%); mask: radial-gradient(circle, #000 40%, transparent 70%); }
.scope__rings::after { content: ""; position: absolute; inset: 0; border-radius: 50%;
	background: conic-gradient(from 0deg, transparent 0deg, transparent 300deg, rgba(255,230,0,.55) 360deg);
	animation: radar-sweep 7s linear infinite; }
@keyframes radar-sweep { to { transform: rotate(360deg); } }

/* Carte « L'essentiel en 30 secondes » */
.mini { background: var(--blanc); border-radius: 14px; box-shadow: 0 1px 0 var(--filet), 0 18px 40px -24px rgba(17,17,17,.35); overflow: hidden; }
.mini__band { height: 6px; background: var(--jaune); }
.mini__head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px 0; font-size: 13px; color: var(--discret); }
.mini__head .logo { font-size: 18px; }
.mini__box { margin: 16px 20px 20px; border: 2px solid var(--encre); border-radius: 10px; padding: 12px 16px 4px; }
.mini__label { font-size: 12px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; }
.mini__row { padding: 10px 0; border-bottom: 1px solid var(--filet); font-size: 16px; line-height: 1.4; }
.mini__row:last-child { border-bottom: 0; }
.mini__row .tag { margin-bottom: 6px; }

/* ---------- Le constat / Ce que fait Radar ---------- */
.why { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 40px; }
.sec-title--large { max-width: none; }
.sec-split { margin-top: 80px; padding-top: 72px; border-top: 1px solid var(--filet); }
.why__box { border-radius: 14px; padding: 28px 30px; }
.why__box--gris { background: var(--beige); }
.why__box--trait { border: 2px solid var(--encre); }
.why__k { font-family: var(--sans); font-size: 15px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 12px; }
.why__box p { font-size: 19px; line-height: 1.6; color: var(--encre); }

/* ---------- Thèmes ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; }
.card { background: var(--beige); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 12px; height: 100%; box-sizing: border-box; transition: transform .2s ease, box-shadow .2s ease; }
.card { border: 1px solid transparent; }
.card:hover { border-color: var(--filet); }
.card h3 { font-family: var(--serif); font-size: 22px; line-height: 1.22; }
.card p { font-size: 17px; line-height: 1.5; color: var(--texte); }
.card .tag { align-self: flex-start; }

/* ---------- Exemple ---------- */
.ex-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; }
.levels { list-style: none; padding: 0; margin: 28px 0 0; counter-reset: lvl; }
.levels li { counter-increment: lvl; position: relative; padding: 0 0 22px 56px; font-size: 18px; line-height: 1.5; color: var(--texte); }
.levels li::before { content: counter(lvl); position: absolute; left: 0; top: -2px; width: 38px; height: 38px; border-radius: 50%; background: var(--jaune); color: var(--encre); font-family: var(--serif); font-weight: 700; font-size: 20px; display: flex; align-items: center; justify-content: center; }
.levels strong { color: var(--encre); }
.issue { background: var(--blanc); border-radius: 14px; padding: 28px; box-shadow: 0 1px 0 var(--filet), 0 18px 40px -26px rgba(17,17,17,.35); }
.une { background: var(--jaune-pale); border-radius: 10px; padding: 22px; }
.une h3 { font-family: var(--serif); font-size: 24px; line-height: 1.2; margin: 12px 0 8px; }
.une p { font-size: 17px; line-height: 1.5; }
.pourvous { background: var(--blanc); border-radius: 8px; padding: 12px 14px; margin-top: 14px; font-size: 16px; line-height: 1.5; }
.issue__src { font-size: 14px; color: var(--discret); margin-top: 12px; }
.chiffre { display: flex; gap: 20px; align-items: center; background: var(--encre); color: var(--blanc); border-radius: 10px; padding: 20px 22px; margin-top: 20px; }
.chiffre__n { font-family: var(--serif); font-size: 52px; line-height: 1; font-weight: 700; color: var(--jaune); white-space: nowrap; }
.chiffre__t { font-size: 16px; line-height: 1.5; }
.chiffre__k { font-size: 12px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--jaune); margin-bottom: 4px; }

/* ---------- Comment ça marche ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 44px; border-top: 2px solid var(--encre); }
.step { padding: 22px 22px 0 0; }
.step + .step { padding-left: 22px; border-left: 1px solid var(--filet); }
.step__k { font-family: var(--serif); font-size: 40px; font-weight: 700; line-height: 1; }
.step h3 { font-family: var(--sans); font-size: 18px; line-height: 1.35; margin: 12px 0 6px; }
.step p { font-size: 17px; line-height: 1.5; color: var(--texte); }

.wink { margin: 18px 0 0; text-align: center; font-family: var(--serif); font-size: 19px; font-weight: 700; }
.wink::before { content: "↑ "; color: var(--discret); font-weight: 400; }

/* ---------- Questions ---------- */
.faq-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 56px; align-items: start; }
.faq { border-top: 2px solid var(--encre); }
.faq details { border-bottom: 1px solid var(--filet); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; font-family: var(--serif); font-size: 21px; font-weight: 700; line-height: 1.3; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--blanc); border: 1px solid var(--filet); display: flex; align-items: center; justify-content: center; font-family: var(--sans); font-size: 20px; font-weight: 400; transition: transform .2s ease, background .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); background: var(--jaune); border-color: var(--jaune); }
.faq summary:hover::after { background: var(--jaune); border-color: var(--jaune); }
.faq summary:focus-visible { outline: 3px solid var(--encre); outline-offset: 3px; }
.faq details p { font-size: 17px; line-height: 1.6; color: var(--texte); padding: 0 48px 22px 0; max-width: 620px; }

/* ---------- Appel final ---------- */
.cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.sec-noir .kicker { color: var(--jaune); }
.sec-noir .sec-title { color: var(--blanc); }
.sec-noir .sec-lead { color: #D4D4D4; }
.sec-noir .sec-title mark { background: none; color: var(--jaune); padding: 0; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--beige); border-top: 1px solid var(--filet); padding: 36px 0 44px; font-size: 15px; line-height: 1.7; color: var(--discret); }
.site-footer .radar-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer a { color: var(--discret); }
.site-footer strong { color: var(--encre); }
.foot-slogan mark { background: var(--jaune); color: var(--encre); padding: 0 4px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
@media (max-width: 1000px) { .brand { flex-direction: column; align-items: flex-start; gap: 6px; } .baseline { font-size: 14px; } }
.foot-slogan { flex-basis: 100%; margin: 0 0 4px; font-family: var(--serif); font-size: 21px; font-weight: 700; line-height: 1.3; color: var(--encre); }

/* ---------- Pages simples (mentions, confidentialité) ---------- */
.page-wrap { max-width: 760px; margin: 0 auto; padding: 64px var(--gutter) 88px; box-sizing: border-box; }
.page-wrap .wp-block-post-title { font-family: var(--serif); font-size: clamp(32px, 4vw, 44px); line-height: 1.12; margin-bottom: 28px; }
.page-wrap .wp-block-post-content { background: var(--blanc); border-radius: 14px; padding: 36px; }
.page-wrap .wp-block-post-content h2 { font-family: var(--serif); font-size: 24px; margin: 28px 0 8px; }
.page-wrap .wp-block-post-content h2:first-child { margin-top: 0; }
.page-wrap .wp-block-post-content p, .page-wrap .wp-block-post-content li { font-size: 17px; line-height: 1.6; color: var(--texte); }
.page-wrap .wp-block-post-content p + p { margin-top: 10px; }

/* ---------- Animations ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .08s; }
.reveal-d2 { transition-delay: .16s; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.reveal { opacity: 1; transform: none; transition: none; }
	.mini, .card, .btn { transition: none; transform: none; }
	.scope__rings::after { animation: none; opacity: .5; }
}
/* Dans l'éditeur, tout reste visible */
.editor-styles-wrapper .reveal { opacity: 1; transform: none; }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
	.hero-grid, .ex-grid, .cta-grid, .faq-grid { grid-template-columns: 1fr; gap: 40px; }
	.faq-grid { gap: 24px; }
	.cards { grid-template-columns: 1fr 1fr; }
	.steps { grid-template-columns: 1fr 1fr; }
	.step:nth-child(3) { padding-left: 0; border-left: 0; }
	.mini { transform: none; }
}
@media (max-width: 620px) {
	:root { --gutter: 20px; }
	.sec { padding: 64px 0; }
	.hero { padding: 40px 0 64px; }
	.nav a:not(.btn) { display: none; }
	.baseline { white-space: normal; font-size: 13px; line-height: 1.25; max-width: 240px; }
	.cards, .steps { grid-template-columns: 1fr; }
	.why { grid-template-columns: 1fr; margin-top: 28px; }
	.sec-split { margin-top: 56px; padding-top: 52px; }
	.why__box { padding: 22px 20px; }
	.why__box p { font-size: 17px; }
	.step, .step + .step { padding: 20px 0 0; border-left: 0; }
	.radar-form__row { flex-direction: column; }
	.chiffre { flex-direction: column; align-items: flex-start; }
	.faq summary { font-size: 19px; }
	.faq details p { padding-right: 0; }
	.scope__rings { width: 130%; }
	.page-wrap .wp-block-post-content { padding: 24px 20px; }
}
