@charset "UTF-8";

/*
	CFDT-SG - nouvelle version : les informations par thème (www/infos.themes.php)
	en-tête, sélecteur Liste / Thèmes, pastilles, page vide : static/front/css/pages/infos.css
	barre (filtre, tri) - mosaïque (4 colonnes ; grandes cartes sur 2) - carte d'un thème (teintes t1 à t5) - grande carte avec photo
*/

.themes-wrap { padding-top: 32px; padding-bottom: 88px; }

/* ---------- barre ---------- */
.themes-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.themes-find { position: relative; display: flex; align-items: center; flex: 1 1 320px; max-width: 460px; }
.themes-find .ic { position: absolute; left: 14px; color: var(--mute); pointer-events: none; }
.themes-find input { width: 100%; height: 42px; padding: 0 16px 0 40px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--ink); font: inherit; font-size: .92rem; transition: border-color .2s, box-shadow .2s; }
.themes-find input:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 4px var(--bg-soft); }

/* ---------- mosaïque ---------- */
.themes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: dense; gap: 18px; }
@media (max-width: 1180px) { .themes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .themes { grid-template-columns: minmax(0, 1fr); } }

/* ---------- teintes ---------- */
.theme { --tint: var(--orange); --tint-soft: var(--orange-soft); }
.theme.t2 { --tint: #1F5FA8; --tint-soft: #EAF1FA; }
.theme.t3 { --tint: #2E7D4F; --tint-soft: #E8F4EC; }
.theme.t4 { --tint: #B5651D; --tint-soft: #FBF0E4; }
.theme.t5 { --tint: #7A4BA6; --tint-soft: #F2ECF8; }

/* ---------- carte ---------- */
.theme { position: relative; display: flex; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--bg); transition: border-color .25s, box-shadow .25s, transform .25s var(--ease); animation: theme-in .5s var(--ease) both; }
.theme:nth-child(2) { animation-delay: .04s; } .theme:nth-child(3) { animation-delay: .08s; } .theme:nth-child(4) { animation-delay: .12s; }
.theme:nth-child(5) { animation-delay: .16s; } .theme:nth-child(n+6) { animation-delay: .2s; }
@keyframes theme-in { from { opacity: 0; transform: translateY(10px); } }
.theme:hover { border-color: color-mix(in srgb, var(--tint) 35%, var(--line)); box-shadow: 0 18px 50px rgba(27, 30, 35, .08); transform: translateY(-2px); }
.theme::before { content: ""; position: absolute; top: 0; right: 0; left: 0; height: 4px; background: var(--tint); opacity: .85; }
.theme[hidden] { display: none; }
.theme-in { display: flex; flex: 1; flex-direction: column; gap: 16px; min-width: 0; padding: 24px 22px 20px; }

.theme-head { display: flex; align-items: flex-start; gap: 14px; }
.theme-ic { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 14px; background: var(--tint-soft); color: var(--tint); }
.theme-ic .ic { width: 22px; height: 22px; }
.theme h2 { color: var(--ink); font-size: 1.08rem; font-weight: 700; line-height: 1.25; letter-spacing: -0.015em; }
.theme h2 a::after { content: ""; position: absolute; inset: 0; z-index: 0; }	/* toute la carte mène au thème */
.theme-meta { margin-top: 4px; color: var(--mute); font-size: .8rem; }
.theme-meta b { color: var(--tint); font-weight: 700; }
.theme-cats, .theme-items, .theme-all { position: relative; z-index: 1; }	/* au-dessus du lien de la carte */

.theme-cats { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.theme-cats li { max-width: 100%; }
.theme-cats .chip { max-width: 100%; background: var(--bg); }
.theme-cats .chip:not(.is-plus) { display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.theme-cats .chip:hover { border-color: var(--tint); color: var(--tint); }
.theme-cats .chip.is-plus { border-style: dashed; color: var(--mute); font: inherit; font-size: .8rem; cursor: pointer; }
.theme-cats .chip mark, .theme-items mark { padding: 0 1px; border-radius: 3px; background: #FFE8A3; color: inherit; }

.theme-items { display: flex; flex-direction: column; margin: 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.theme-items li { border-bottom: 1px solid var(--line); }
.theme-items a { display: flex; flex-direction: column; gap: 2px; padding: 10px 2px; transition: color .2s; }
.theme-items a span { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: var(--ink); font-size: .88rem; font-weight: 600; line-height: 1.35; transition: color .2s; }
.theme-items a time { color: var(--mute); font-size: .74rem; }
.theme-items a:hover span { color: var(--tint); }
.theme-all { align-self: flex-start; margin-top: auto; color: var(--tint); }

/* ---------- grande carte (2 colonnes) : photo de la dernière information sur fond flou ---------- */
.theme.is-big { grid-column: span 2; }
@media (max-width: 640px) { .theme.is-big { grid-column: auto; } }
.theme-cover { position: relative; display: flex; flex: 0 0 42%; align-items: center; justify-content: center; overflow: hidden; background: var(--tint-soft) var(--img) center / cover no-repeat; isolation: isolate; }
.theme-cover::before { content: ""; position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, var(--tint) 18%, rgba(255, 255, 255, .3)); -webkit-backdrop-filter: blur(26px) saturate(1.2); backdrop-filter: blur(26px) saturate(1.2); }
.theme-cover img { max-width: 78%; max-height: 300px; border-radius: 10px; box-shadow: 0 14px 40px rgba(27, 30, 35, .22); transition: transform .5s var(--ease); }
.theme:hover .theme-cover img { transform: scale(1.03) rotate(-.5deg); }
.theme.is-big .theme-in { padding: 28px 28px 22px; }
.theme.is-big h2 { font-size: 1.3rem; }
@media (max-width: 860px) {
	.theme.has-cover { flex-direction: column; }
	.theme-cover { flex-basis: 200px; }
	.theme-cover img { max-height: 170px; }
}

@media (prefers-reduced-motion: reduce) { .theme { animation: none; } .theme:hover, .theme:hover .theme-cover img { transform: none; } }
