/*
Theme Name: Récompenses musicales
Description: Thème léger et responsive pour la plateforme de récompenses musicales. Il gère uniquement la présentation : toutes les règles métier (vote, résultats, candidatures) sont portées par le plugin « Récompenses musicales — Cœur métier ».
Version: 1.0.0
Requires at least: 6.3
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: rmt
*/

:root {
	--c-bg: #fffaf3;
	--c-bg-soft: #f6eee2;
	--c-surface: #ffffff;
	--c-ink: #1e1a17;
	--c-muted: #6b625b;
	--c-line: #e6dccd;
	--c-accent: #9b2222;
	--c-on-accent: #ffffff;
	--c-gold: #d99a1e;
	--c-green: #1d6b44;
	--c-night: #1b1311;
	--f-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
	--f-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--wrap: 1160px;
	--gutter: clamp(16px, 4vw, 32px);
	--weave: repeating-linear-gradient(90deg, var(--c-accent) 0 14px, var(--c-gold) 14px 18px, var(--c-green) 18px 30px, var(--c-gold) 30px 34px, var(--c-night) 34px 40px);
}

@media (prefers-color-scheme: dark) {
	:root {
		--c-bg: #161110;
		--c-bg-soft: #221a17;
		--c-surface: #1f1815;
		--c-ink: #f3ebe2;
		--c-muted: #b4a89c;
		--c-line: #3a2f2a;
		--c-accent: #e0564a;
		--c-on-accent: #1b0f0d;
		--c-gold: #f0b43c;
		--c-green: #4fbf86;
	}
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--c-bg); color: var(--c-ink); font: 400 1.0625rem/1.65 var(--f-body); overflow-x: hidden; }
img { max-width: 100%; height: auto; }
a { color: var(--c-accent); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { font-family: var(--f-display); line-height: 1.15; letter-spacing: -.015em; margin: 1.4em 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
:focus-visible { outline: 3px solid var(--c-gold); outline-offset: 2px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; clip: auto; width: auto; height: auto; padding: .6em 1em; background: var(--c-surface); }

/* ---------- En-tête ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--c-bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--c-line); }
.site-header::before { content: ""; display: block; height: 5px; background: var(--weave); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 68px; }
.brand { flex: 0 1 auto; display: flex; align-items: center; gap: .6rem; text-decoration: none; color: inherit; margin-right: auto; min-width: 0; }
.brand .custom-logo { max-height: 46px; width: auto; }
.brand-mark { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--c-accent); color: var(--c-gold); font-size: 1.3rem; }
.brand-name { font-family: var(--f-display); font-weight: 800; font-size: 1.1rem; line-height: 1.1; }
.brand-name small { display: block; max-width: 230px; font-family: var(--f-body); font-weight: 500; font-size: .72rem; color: var(--c-muted); letter-spacing: .02em; }
.nav-toggle { display: none; background: none; border: 1.5px solid var(--c-line); border-radius: 10px; width: 46px; height: 46px; color: inherit; cursor: pointer; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 20px; height: 2px; background: currentColor; margin: 0 auto; position: relative; content: ""; transition: transform .2s; }
.nav-toggle span::before { position: absolute; top: -6px; left: 0; }
.nav-toggle span::after { position: absolute; top: 6px; left: 0; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .1rem; }
.main-nav a { display: block; padding: .5rem .7rem; border-radius: 8px; color: inherit; text-decoration: none; font-weight: 600; font-size: .94rem; }
.main-nav a:hover, .main-nav .current-menu-item > a { background: var(--c-bg-soft); color: var(--c-accent); }
.header-cta { display: flex; gap: .5rem; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; padding: .65em 1.2em; border-radius: 999px; border: 2px solid var(--c-accent); background: var(--c-accent); color: var(--c-on-accent); font-weight: 700; text-decoration: none; min-height: 44px; line-height: 1.2; white-space: nowrap; }
.btn:hover { filter: brightness(1.06); }
.btn--ghost { background: transparent; color: var(--c-accent); }
.btn--gold { background: var(--c-gold); border-color: var(--c-gold); color: #231600; }
.btn--light { background: #fff; border-color: #fff; color: #7a1717; }

@media (max-width: 1360px) {
	.nav-toggle { display: inline-block; }
	.main-nav { position: fixed; inset: 73px 0 auto 0; background: var(--c-bg); border-bottom: 1px solid var(--c-line); padding: .5rem var(--gutter) 1.2rem; max-height: calc(100vh - 73px); overflow-y: auto; display: none; box-shadow: 0 20px 30px -20px rgba(0,0,0,.3); }
	.admin-bar .main-nav { top: 105px; }
	.nav-open .main-nav { display: block; }
	.main-nav ul { flex-direction: column; }
	.main-nav a { padding: .8rem .6rem; font-size: 1.05rem; border-bottom: 1px solid var(--c-line); border-radius: 0; }
	.header-cta .btn--ghost { display: none; }
	.nav-open .nav-toggle span { background: transparent; }
	.nav-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
	.nav-open .nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }
}
@media (max-width: 420px) { .brand-name small { display: none; } .header-cta .btn { padding: .55em .9em; } }

/* ---------- Héros ---------- */
.hero { position: relative; color: #fff; background: var(--c-night); overflow: hidden; isolation: isolate; }
.hero__bg { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; opacity: .45; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
	radial-gradient(60% 80% at 85% 10%, rgba(217,154,30,.45), transparent 60%),
	radial-gradient(50% 70% at 0% 100%, rgba(155,34,34,.75), transparent 70%),
	linear-gradient(180deg, rgba(27,19,17,.2), rgba(27,19,17,.85)); }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: var(--weave); }
.hero__inner { padding-top: clamp(56px, 10vw, 120px); padding-bottom: clamp(64px, 10vw, 110px); display: grid; gap: 2rem; grid-template-columns: 1.4fr 1fr; align-items: end; }
.hero__kicker { display: inline-flex; gap: .5em; align-items: center; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: .78rem; color: var(--c-gold); }
.hero h1 { margin: .3em 0 .35em; font-size: clamp(2.3rem, 7vw, 4.6rem); line-height: 1; letter-spacing: -.03em; }
.hero h1 em { font-style: normal; color: var(--c-gold); }
.hero p.lead { font-size: clamp(1.05rem, 2.2vw, 1.3rem); max-width: 36ch; color: rgba(255,255,255,.88); margin: 0 0 1.6rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.hero__panel { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: 18px; padding: 1.3rem 1.4rem; backdrop-filter: blur(6px); }
.hero__panel h2 { margin: 0 0 .4rem; font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; color: var(--c-gold); }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin: .8rem 0 .4rem; text-align: center; }
.countdown div { background: rgba(0,0,0,.25); border-radius: 10px; padding: .6rem .2rem; }
.countdown b { display: block; font-family: var(--f-display); font-size: clamp(1.5rem, 4vw, 2.1rem); line-height: 1; font-variant-numeric: tabular-nums; }
.countdown span { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; opacity: .8; }
.hero__panel .rmc-pill { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); color: #fff; }
.hero__panel small { color: rgba(255,255,255,.7); }
@media (max-width: 820px) { .hero__inner { grid-template-columns: 1fr; } }

/* ---------- Sections d'accueil ---------- */
.section { padding: clamp(48px, 8vw, 88px) 0; }
.section--soft { background: var(--c-bg-soft); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; }
.section-head h2 { margin: 0; }
.section-head p { margin: .3rem 0 0; color: var(--c-muted); max-width: 55ch; }
.eyebrow { display: block; font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--c-accent); margin-bottom: .4rem; }
.steps { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: st; padding: 0; margin: 0; list-style: none; }
.steps li { counter-increment: st; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 16px; padding: 1.3rem; }
.steps li::before { content: counter(st); display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--c-accent); color: var(--c-on-accent); font-family: var(--f-display); font-weight: 800; margin-bottom: .7rem; }
.steps h3 { margin: 0 0 .3rem; }
.steps p { margin: 0; color: var(--c-muted); font-size: .95rem; }
.split { display: grid; gap: 2rem; grid-template-columns: 1fr 1fr; align-items: start; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

/* ---------- Actualités ---------- */
.posts { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.post-card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.post-card__img { aspect-ratio: 16/10; background: var(--c-bg-soft); display: block; overflow: hidden; }
.post-card__img img { width: 100%; height: 100%; object-fit: cover; }
.post-card__img--ph { background: var(--weave); opacity: .35; }
.post-card__body { padding: 1rem 1.2rem 1.3rem; }
.post-card__meta { font-size: .8rem; color: var(--c-muted); }
.post-card h3 { margin: .3rem 0 .4rem; font-size: 1.15rem; }
.post-card h3 a { color: inherit; text-decoration: none; }
.post-card p { margin: 0; color: var(--c-muted); font-size: .95rem; }

/* ---------- Pages ---------- */
.page-hero { background: var(--c-bg-soft); border-bottom: 1px solid var(--c-line); padding: clamp(32px, 6vw, 64px) 0 clamp(24px, 4vw, 40px); }
.page-hero h1 { margin: 0; }
.page-hero p { margin: .5rem 0 0; color: var(--c-muted); }
.content { padding: clamp(28px, 5vw, 56px) 0 clamp(48px, 8vw, 88px); }
.content > .wrap > * { max-width: 100%; }
.entry { max-width: 820px; }
.entry--wide { max-width: none; }
.entry p, .entry ul, .entry ol { margin: 0 0 1.1em; }
.entry > *:first-child { margin-top: 0; }
.entry blockquote { margin: 1.5em 0; padding: .5em 1.2em; border-left: 4px solid var(--c-gold); font-size: 1.1em; }
.entry table { border-collapse: collapse; width: 100%; }
.entry th, .entry td { border-bottom: 1px solid var(--c-line); padding: .5em; text-align: left; }
.pagination { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: 2rem; }
.pagination .page-numbers { min-width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--c-line); border-radius: 8px; text-decoration: none; padding: 0 .6rem; }
.pagination .current { background: var(--c-accent); border-color: var(--c-accent); color: var(--c-on-accent); }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--c-night); color: #e9dfd5; padding: 3rem 0 1.5rem; position: relative; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--weave); }
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1.3fr 1fr 1fr; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--c-gold); margin: 0 0 .8rem; font-family: var(--f-body); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin: .35rem 0; }
.footer-grid li a { text-decoration: none; opacity: .88; }
.footer-grid li a:hover { opacity: 1; text-decoration: underline; }
.footer-brand { font-family: var(--f-display); font-size: 1.4rem; font-weight: 800; color: #fff; margin: 0 0 .4rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2.5rem; padding-top: 1.2rem; font-size: .85rem; opacity: .7; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }

/* Composants du plugin dans le thème */
.rmc { --rmc-sticky: 74px; }
.rmc-jump { background: var(--c-bg) !important; }

/* Blocs WordPress */
.alignwide { max-width: var(--wrap); }
.alignfull { width: 100vw; margin-left: calc(50% - 50vw); }
.wp-block-button__link { border-radius: 999px; background: var(--c-accent); }

@media (min-width: 1361px) and (max-width: 1480px) { .brand-name small { display: none; } .main-nav a { padding: .5rem .55rem; } }
.main-nav { margin-left: auto; }
.brand { margin-right: 0; }
@media (max-width: 1360px) { .header-cta { margin-left: auto; } }
@media (min-width: 1361px) { .brand { flex: none; } }
@media (min-width: 1361px) { .main-nav ul { flex-wrap: nowrap; } .main-nav a { white-space: nowrap; } }
