/*
Theme Name: guilhem.xyz Amiga
Description: Thème rétro pour guilhem.xyz, en hommage à l'Amiga 500 : plastique beige, écran Workbench, touches de clavier, disquettes de couleur.
Version: 2.0.1
Requires at least: 6.6
Requires PHP: 7.4
Text Domain: guilhem-xyz
License: GPLv2 or later
*/

:root {
	--gx-arc: linear-gradient(90deg,#E23B2E 0 20%,#F5A623 20% 40%,#F8E71C 40% 60%,#39B54A 60% 80%,#2E86DE 80%);
}
body { -webkit-font-smoothing: antialiased; }
a { text-underline-offset: 3px; text-decoration-color: var(--wp--preset--color--orange); }
::selection { background: var(--wp--preset--color--orange); color: var(--wp--preset--color--noir); }

/* ----- En-tête : barre de titre façon Workbench ----- */
.site-head { background: var(--wp--preset--color--creme); border-bottom: 2px solid var(--wp--preset--color--brun); position: relative; }
.site-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 4px; background: var(--gx-arc); }
.site-head .wp-block-site-title a::before { content: "▣ "; color: var(--wp--preset--color--bleu); }
.site-head .wp-block-navigation a { padding: .3rem .7rem; border: 2px solid transparent; border-radius: 6px; }
.site-head .wp-block-navigation a:hover,
.site-head .wp-block-navigation .current-menu-item > a { border-color: var(--wp--preset--color--brun); background: #fff; box-shadow: 0 3px 0 var(--wp--preset--color--brun); color: var(--wp--preset--color--noir); }

/* ----- Libellés façon chemin de disque ----- */
.gx-chemin, .wp-block-paragraph.gx-chemin { display: inline-block; font-size: .85rem; letter-spacing: .06em; color: var(--wp--preset--color--brun); padding-bottom: 4px; background: var(--gx-arc) bottom / 100% 3px no-repeat; }

/* ----- Fenêtre Workbench (articles, pages) ----- */
.gx-fenetre-wb { background: var(--wp--preset--color--creme); border: 2px solid var(--wp--preset--color--noir); box-shadow: 8px 8px 0 rgba(18,16,8,.18); }
.gx-fenetre-wb > .gx-titre-wb { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 0; padding: .35rem .8rem;
	background: repeating-linear-gradient(0deg, var(--wp--preset--color--bleu) 0 2px, #2c74c4 2px 4px); color: #fff; font-size: .85rem; }
.gx-titre-wb::after { content: "▢ ▣"; letter-spacing: .3em; }

/* ----- Cartes (listes d'articles) ----- */
.carte { position: relative; height: 100%; background: var(--wp--preset--color--creme); border: 2px solid var(--wp--preset--color--brun); border-radius: 8px; overflow: hidden;
	box-shadow: 0 5px 0 var(--wp--preset--color--brun); transition: transform .1s ease, box-shadow .1s ease; }
.carte:hover { transform: translateY(3px); box-shadow: 0 2px 0 var(--wp--preset--color--brun); }
.carte .wp-block-post-featured-image { margin: 0; aspect-ratio: 16 / 10; overflow: hidden; background: var(--wp--preset--color--bleu); border-bottom: 2px solid var(--wp--preset--color--brun); }
.carte .wp-block-post-featured-image img { width: 100%; height: 100%; object-fit: cover; }
.carte .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; }
.carte .wp-block-post-terms a { position: relative; z-index: 1; color: var(--wp--preset--color--bleu); }
.wp-block-post-template.is-layout-grid > li { display: flex; flex-direction: column; }
.ligne-article { border-top: 2px dashed var(--wp--preset--color--brun); padding-top: 1.1rem; }
.ligne-article .wp-block-post-title a:hover { color: var(--wp--preset--color--bleu); }

/* ----- Contenu des articles ----- */
.wp-block-post-content img { border: 2px solid var(--wp--preset--color--noir); }
.wp-block-post-content :where(code) { background: var(--wp--preset--color--noir); color: var(--wp--preset--color--orange); padding: .1em .35em; }
.wp-block-post-content pre { background: var(--wp--preset--color--noir); color: #f1e9d2; padding: 1rem; overflow-x: auto; }
.wp-block-post-content h2::before { content: "> "; color: var(--wp--preset--color--orange); }
.wp-block-post-navigation-link a { text-decoration: none; }
.pastilles .wp-block-post-terms a { display: inline-block; padding: .25rem .6rem; border: 2px solid var(--wp--preset--color--brun); border-radius: 6px; background: #fff; box-shadow: 0 3px 0 var(--wp--preset--color--brun); }
.pastilles .wp-block-post-terms__separator { display: none; }
.pastilles .wp-block-post-terms { display: flex; flex-wrap: wrap; gap: .5rem; }

/* ----- Boutons : touches de clavier ----- */
.wp-element-button, .wp-block-button__link, .wp-block-search__button {
	border: 2px solid var(--wp--preset--color--brun) !important; box-shadow: 0 5px 0 var(--wp--preset--color--brun), 0 7px 12px rgba(40,30,10,.25);
	transition: transform .08s ease, box-shadow .08s ease; }
.wp-element-button:active, .wp-block-button__link:active, .wp-block-search__button:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--wp--preset--color--brun); }
.wp-block-search__input { border: 2px solid var(--wp--preset--color--brun); border-radius: 6px; padding: .55rem .8rem; background: #fff; font: inherit; }
.wp-block-query-pagination a { text-decoration: none; }

/* ----- Pied de page : READY ----- */
.site-foot { background: var(--wp--preset--color--noir); color: #cfc6ad; position: relative; }
.site-foot::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--gx-arc); }
.site-foot a { color: #cfc6ad; text-decoration: none; }
.site-foot a:hover { color: var(--wp--preset--color--orange); }
.gx-ready { font-family: var(--wp--preset--font-family--pixel); font-size: clamp(3.5rem, 16vw, 11rem); line-height: .9; color: var(--wp--preset--color--orange); margin: 0;
	text-shadow: 0 0 24px rgba(255,136,0,.35); }
.gx-ready::after { content: ""; display: inline-block; width: .5em; height: .72em; margin-left: .08em; background: currentColor; vertical-align: baseline; animation: gx-clignote 1.1s steps(1) infinite; }
@keyframes gx-clignote { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
	.gx-ready::after { animation: none; }
	.carte, .wp-element-button, .wp-block-button__link { transition: none; }
}
