/*
Theme Name: Déclic
Description: Thème sombre et reposant pour les fiches Déclic (DA v1). Nécessite l'extension Déclic Fiches.
Version: 1.0.0
Author: Déclic
Text Domain: declic
Requires at least: 6.2
Requires PHP: 7.4
*/

:root {
	--fond: #15161A;
	--carte: #1C1E23;
	--carte-2: #1E2026;
	--bord: #272A31;
	--bord-2: #33363E;
	--titre: #EDEAE3;
	--texte: #DCD9D2;
	--texte-2: #A8A59E;
	--texte-3: #85827C;
	--accent: #B9C9E3;
	--rayon: 20px;
	--titres: "Space Grotesk", system-ui, sans-serif;
	--corps: "Inter", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--fond);
	color: var(--texte);
	font-family: var(--corps);
	font-size: 17px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}
a { color: var(--titre); }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--titres); font-weight: 600; color: var(--titre); letter-spacing: -0.02em; line-height: 1.12; margin: 0; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 99; width: auto; height: auto; clip: auto; background: var(--accent); color: var(--fond); padding: 8px 14px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .wrap { padding: 0 18px; } }

/* En-tête */
.site-header { border-bottom: 1px solid #262930; position: sticky; top: 0; z-index: 10; background: rgba(21, 22, 26, 0.92); backdrop-filter: blur(8px); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding-top: 16px; padding-bottom: 16px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--titres); font-weight: 600; font-size: 22px; color: var(--titre); }
.nav { display: flex; flex-wrap: wrap; gap: 24px; font-size: 15px; }
.nav a { color: var(--texte-2); text-decoration: none; }
.nav a:hover { color: var(--titre); }
.btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; font-size: 15px; padding: 14px 22px; border-radius: 14px; border: 1px solid transparent; cursor: pointer; font-family: inherit; }
.btn-accent { background: var(--accent); color: var(--fond); }
.btn-accent:hover { color: var(--fond); filter: brightness(1.06); }
.btn-ligne { border-color: #3A3E47; color: var(--titre); background: transparent; }
.btn-ligne:hover { border-color: var(--texte-2); color: var(--titre); }

/* Accueil */
.hero { display: flex; flex-wrap: wrap; gap: 48px; padding: 72px 0 56px; }
.hero > * { flex: 1 1 420px; }
.surtitre { font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: 2px; color: #8E8B85; margin: 0 0 18px; }
.hero h1 { font-size: clamp(38px, 5vw, 56px); margin-bottom: 20px; }
.hero p.intro { color: var(--texte-2); font-size: 18px; max-width: 500px; margin: 0 0 24px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.une { text-decoration: none; background: var(--carte-2); border: 1px solid #2B2E36; border-radius: 26px; padding: 36px; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; min-height: 380px; }
.une h2 { font-size: clamp(28px, 3vw, 38px); }
.une p { color: var(--texte-2); margin: 0; }
.progression { display: flex; gap: 6px; }
.progression span { height: 4px; flex: 1; border-radius: 2px; background: #2E323B; }
.progression span:first-child { background: var(--accent); }

.filtres { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 28px; }
.filtre { font-size: 14px; font-weight: 500; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--bord-2); background: var(--carte); color: #C8C5BE; text-decoration: none; }
.filtre.actif, .filtre:hover { background: var(--titre); color: var(--fond); border-color: var(--titre); }

.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.carte { text-decoration: none; background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); overflow: hidden; display: flex; flex-direction: column; transition: border-color .2s, transform .2s; }
.carte:hover { border-color: #3A3E47; transform: translateY(-2px); }
.carte-image { position: relative; height: 180px; background: #23262D; }
.carte-image img { width: 100%; height: 180px; object-fit: cover; filter: saturate(.8) brightness(.88); }
.carte-image .sans-image { height: 180px; }
.credit { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 12px 6px; font-size: 10px; color: #C8C5BE; background: linear-gradient(transparent, rgba(21,22,26,.85)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.carte-corps { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 12px; flex-grow: 1; }
.carte h3 { font-size: 21px; line-height: 1.2; }
.carte p { margin: 0; font-size: 15px; line-height: 1.65; color: var(--texte-2); flex-grow: 1; }
.rubrique { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; text-decoration: none; }
.rubrique::before { content: ""; width: 8px; height: 8px; border-radius: 4px; background: currentColor; }
.meta { font-size: 13px; color: var(--texte-3); }
.suite { display: flex; justify-content: center; padding: 40px 0; }
.suite .nav-links { display: flex; gap: 12px; }
.suite a, .suite span { font-size: 15px; padding: 12px 20px; border-radius: 999px; border: 1px solid #3A3E47; text-decoration: none; color: var(--titre); }
.suite .current { background: var(--titre); color: var(--fond); }

/* Fiche */
.barre-lecture { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--accent); z-index: 20; }
.fiche { max-width: 720px; margin: 0 auto; padding: 48px 22px 24px; }
.fiche h1 { font-size: clamp(30px, 4vw, 44px); margin: 14px 0 18px; }
.fiche .accroche { color: var(--texte-2); font-size: 19px; margin: 0 0 28px; }
.fiche-image { position: relative; border-radius: 18px; overflow: hidden; margin-bottom: 28px; }
.fiche-image img { width: 100%; max-height: 420px; object-fit: cover; filter: saturate(.85) brightness(.9); }
.blocs { display: flex; flex-direction: column; gap: 14px; }
.bloc { background: var(--carte); border: 1px solid var(--bord); border-radius: 20px; padding: 26px 26px; }
.bloc .num { font-size: 12px; font-weight: 500; letter-spacing: 1px; text-transform: uppercase; color: var(--c, var(--accent)); display: block; margin-bottom: 8px; }
.bloc p { margin: 0; font-size: 18px; line-height: 1.75; color: var(--texte); }
.bloc.declic { background: #222631; border-color: #343A48; }
.bloc.declic p { color: var(--titre); }
.video { position: relative; padding-top: 56.25%; border-radius: 18px; overflow: hidden; margin-bottom: 28px; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.source { font-size: 13px; color: var(--texte-3); margin: 22px 0 0; }
.suivante { display: block; text-decoration: none; background: var(--carte-2); border: 1px solid #2B2E36; border-radius: 22px; padding: 26px; margin: 36px 0 12px; }
.suivante .label { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--texte-3); }
.suivante h2 { font-size: 24px; margin: 10px 0 8px; }
.suivante p { margin: 0 0 16px; color: var(--texte-2); font-size: 15px; }

/* Newsletter et pied */
.newsletter { border-top: 1px solid #262930; margin-top: 56px; padding: 48px 0; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.newsletter h2 { font-size: 28px; }
.newsletter p { color: var(--texte-2); margin: 8px 0 0; }
.site-footer { border-top: 1px solid #262930; font-size: 14px; color: var(--texte-3); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; padding-top: 28px; padding-bottom: 28px; }
.site-footer a { color: var(--texte-2); text-decoration: none; margin-left: 18px; }
