/*
Theme Name: Mark Turyk
Theme URI: https://markturyk.com/
Author: Mark Turyk
Author URI: https://markturyk.com/
Description: Thème bloc du portfolio de Mark Turyk, concepteur mécatronique. Fond anthracite accordé aux rendus 3D, mosaïque de projets filtrable par domaine, fiches projet structurées (besoin, contraintes, solution, résultat), installateur en un clic (Apparence > Démarrage) et module de nettoyage après migration.
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.0.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: markturyk
Tags: full-site-editing, block-patterns, portfolio, one-column, wide-blocks
*/

:root { --mt-filet: 1px solid rgba(236, 235, 230, .14); --mt-ambre: #f5b700; --mt-gris: #a3a29c; --mt-texte: #d6d5cf; }
body { -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
::selection { background: var(--mt-ambre); color: #181818; }
h1, h2, h3, h4 { text-wrap: balance; }
p, li { text-wrap: pretty; }
img { height: auto; }
[hidden] { display: none !important; }
:where(a, button, input, textarea, select, summary):focus-visible { outline: 2px solid var(--mt-ambre); outline-offset: 3px; }
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important; }

/* En-tête et pied */
.mt-entete, .mt-pied { padding-left: var(--wp--style--root--padding-left); padding-right: var(--wp--style--root--padding-right); }
.mt-entete { padding-top: 28px; padding-bottom: 28px; align-items: baseline; row-gap: 16px; }
.mt-marque { align-items: baseline; }
body .mt-marque > * { margin: 0; }
.wp-block-navigation a { text-decoration: none; }
.wp-block-navigation .current-menu-item > a, .wp-block-navigation a[aria-current="page"] { box-shadow: inset 0 -1.5px 0 var(--mt-ambre); padding-bottom: 4px; }
.wp-block-navigation__responsive-container.is-menu-open { background: #181818 !important; color: #ecebe6 !important; padding: 28px var(--wp--style--root--padding-right); }
.mt-pied { margin-top: clamp(72px, 9vw, 140px); border-top: var(--mt-filet); padding-top: 28px; padding-bottom: 28px; gap: 16px 32px; font-size: 15px; color: var(--mt-gris); }
body .mt-pied p { margin: 0; }
.mt-pied a { color: var(--mt-gris); text-decoration: none; }
.mt-pied a:hover { color: #ecebe6; }
.mt-pied-liens { gap: 8px 24px; }

/* Boutons : lien souligné d'ambre par défaut */
.wp-block-button__link { box-shadow: inset 0 -1.5px 0 var(--mt-ambre); }
.wp-block-button__link:hover { box-shadow: inset 0 -1.5px 0 currentColor; }
.is-style-mt-discret .wp-block-button__link { color: var(--mt-gris); box-shadow: none; }
.is-style-mt-discret .wp-block-button__link:hover { color: #ecebe6; }
.is-style-mt-plein .wp-block-button__link, .mt-formulaire button { background: var(--mt-ambre); color: #181818; box-shadow: none; padding: 16px 24px; }
.is-style-mt-plein .wp-block-button__link:hover, .mt-formulaire button:hover { background: #ecebe6; color: #181818; box-shadow: none; }
.wp-block-buttons { gap: 12px 24px; }

/* Accueil */
.mt-hero, .mt-en-tete-page { padding-top: clamp(40px, 7vw, 120px); }
.mt-hero { display: flex; flex-direction: column; gap: clamp(24px, 3vw, 40px); }
.mt-hero-texte { display: flex; flex-wrap: wrap; gap: 28px clamp(32px, 5vw, 80px); align-items: flex-end; justify-content: space-between; }
.mt-hero-texte > h1 { flex: 1 1 640px; max-width: 15ch; }
.mt-hero-chapo { flex: 0 1 30em; display: flex; flex-direction: column; gap: 20px; }
.mt-hero-chapo p { font-size: 18px; color: #b4b3ad; }
body :is(.mt-hero, .mt-hero-texte, .mt-hero-chapo) > * { margin: 0; }
.mt-hero-image img { width: 100%; display: block; }
.mt-legende { border-top: var(--mt-filet); padding-top: 14px; font-size: 15px; gap: 8px 16px; }
body .mt-legende > * { margin: 0; }
.mt-legende a { text-decoration: none; color: var(--mt-gris); }
.mt-legende a:hover { color: #ecebe6; }
.mt-bloc { padding-top: clamp(72px, 9vw, 140px); display: flex; flex-direction: column; gap: 36px; }
body .mt-bloc > * { margin: 0; }
.mt-titre-section { border-top: var(--mt-filet); padding-top: 20px; align-items: baseline; gap: 20px; }
body .mt-titre-section > * { margin: 0; }
.mt-titre-section p a { color: var(--mt-gris); text-decoration: none; }
.mt-titre-section p a:hover { color: #ecebe6; }

/* Mosaïque de projets */
.mt-mosaique .wp-block-post-template, .mt-cartes .wp-block-post-template { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 20px; margin: 0; padding: 0; list-style: none; }
.wp-block-post-template > .wp-block-post { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.wp-block-post .wp-block-post-featured-image { margin: 0; }
.wp-block-post .wp-block-post-featured-image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; transition: filter .2s ease; }
.wp-block-post .wp-block-post-featured-image a:hover img { filter: brightness(1.15); }
.mt-mosaique .wp-block-post-template.mt-mosaique-active { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.mt-mosaique-active > .mt-pos-b { grid-column: span 4; }
.mt-mosaique-active > .mt-pos-b img { aspect-ratio: 16 / 9 !important; }
.mt-mosaique-active > .mt-pos-t { grid-column: span 2; }
.mt-mosaique-active > .mt-pos-t img { aspect-ratio: 8 / 9 !important; }
.mt-mosaique-active > .mt-pos-s { grid-column: span 2; }
.mt-mosaique-active > .mt-pos-w { grid-column: 1 / -1; }
.mt-mosaique-active > .mt-pos-w img { aspect-ratio: 21 / 9 !important; }
.mt-carte-texte { display: flex; flex-direction: column; gap: 4px; }
body .mt-carte-texte > * { margin: 0; }
.mt-carte-titre { font-size: 18px !important; font-weight: 600; line-height: 1.3; letter-spacing: 0; }
.mt-carte-titre a:hover { color: var(--mt-ambre); }
.mt-carte-meta { gap: 0 6px; }
body .mt-carte-meta > * { margin: 0; }
.wp-block-post-terms a:hover { color: #ecebe6; }
@media (max-width: 900px) {
	.mt-mosaique .wp-block-post-template, .mt-mosaique .wp-block-post-template.mt-mosaique-active, .mt-cartes .wp-block-post-template { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mt-mosaique-active > .mt-pos-b, .mt-mosaique-active > .mt-pos-w { grid-column: 1 / -1; }
	.mt-mosaique-active > .mt-pos-t, .mt-mosaique-active > .mt-pos-s { grid-column: span 1; }
	.mt-mosaique-active > .mt-pos-t img { aspect-ratio: 4 / 3 !important; }
	.mt-mosaique-active > .mt-pos-w img { aspect-ratio: 16 / 9 !important; }
}
@media (max-width: 600px) {
	.mt-mosaique .wp-block-post-template, .mt-mosaique .wp-block-post-template.mt-mosaique-active, .mt-cartes .wp-block-post-template { grid-template-columns: minmax(0, 1fr); gap: 40px; }
	.mt-mosaique-active > .wp-block-post { grid-column: 1 / -1 !important; }
}

/* Filtre */
.mt-filtre { display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: 17px; }
.mt-filtre a { color: var(--mt-gris); text-decoration: none; padding-bottom: 6px; }
.mt-filtre a:hover { color: #ecebe6; }
.mt-filtre a.is-active { color: #ecebe6; box-shadow: inset 0 -1.5px 0 var(--mt-ambre); }
.mt-page-projets { padding-top: clamp(40px, 6vw, 96px); display: flex; flex-direction: column; gap: 36px; }
body .mt-page-projets > * { margin: 0; }

/* Fiche projet */
.mt-projet-entete { padding-top: clamp(40px, 6vw, 96px); }
.mt-projet-intro { display: flex; flex-wrap: wrap; gap: 20px clamp(32px, 5vw, 80px); align-items: flex-end; justify-content: space-between; }
body .mt-projet-intro > * { margin: 0; }
.mt-projet-surtitre { flex-basis: 100%; gap: 0 8px; font-size: 15px; color: var(--mt-gris); }
body .mt-projet-surtitre > * { margin: 0; }
.mt-projet-surtitre a { color: var(--mt-gris); text-decoration: none; }
.mt-projet-surtitre a:hover { color: #ecebe6; }
.mt-projet-titre { flex: 1 1 560px; max-width: 18ch; }
.mt-projet-chapo { flex: 0 1 32em; display: flex; flex-direction: column; gap: 10px; }
body .mt-projet-chapo > * { margin: 0; }
.mt-projet-chapo .wp-block-post-excerpt__excerpt { margin: 0; font-size: 18px; line-height: 1.6; color: #b4b3ad; }
.mt-projet-image { margin-top: clamp(24px, 3vw, 40px) !important; }
.mt-projet-image img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.mt-projet-corps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 48px clamp(32px, 5vw, 80px); border-top: var(--mt-filet); padding-top: 24px; margin-top: clamp(48px, 6vw, 80px) !important; }
body .mt-projet-corps > *, body .is-style-mt-fiche > *, body .mt-sections > * { margin: 0; }
.is-style-mt-fiche { align-self: start; position: sticky; top: 24px; }
.is-style-mt-label { font-size: 15px !important; font-weight: 600 !important; letter-spacing: 0 !important; line-height: 1.4 !important; margin: 0 0 10px !important; color: #ecebe6; }
.mt-ligne { border-top: var(--mt-filet); padding: 12px 0; display: grid; grid-template-columns: minmax(0, 14em) minmax(0, 1fr); gap: 2px 16px; }
body .mt-ligne > * { margin: 0; }
.mt-ligne p { font-size: 16px; line-height: 1.45; }
.mt-ligne p.mt-ligne-label { color: var(--mt-gris); font-size: 15px; }
.is-style-mt-fiche .mt-ligne { grid-template-columns: minmax(0, 1fr); }
.mt-sections { display: flex; flex-direction: column; gap: 36px; }
.mt-section { max-width: 44em; }
body .mt-section > * { margin: 0; }
body .mt-section > * + * { margin-top: 10px; }
.mt-section p, .mt-section li { font-size: 18px; line-height: 1.65; color: var(--mt-texte); }
.mt-section ul { padding-left: 1.1em; }
.mt-section li + li { margin-top: 6px; }
.mt-section li::marker { color: var(--mt-ambre); }
.mt-projet-galerie, .mt-projet-video { margin-top: clamp(48px, 6vw, 80px) !important; border-top: var(--mt-filet); padding-top: 20px; }
.mt-projet-video video { width: 100%; display: block; background: #000; }
.mt-projet-suite { padding-top: clamp(72px, 9vw, 140px); }
.mt-projet-suite .mt-cartes { margin-top: 36px !important; }
@media (max-width: 900px) {
	.mt-projet-corps { grid-template-columns: minmax(0, 1fr); }
	.is-style-mt-fiche { position: static; }
}

/* Parcours */
.mt-frise { margin-top: clamp(56px, 7vw, 112px) !important; }
.mt-frise-ligne { display: grid; grid-template-columns: minmax(0, 14em) minmax(0, 1fr); gap: 8px clamp(24px, 4vw, 64px); border-top: var(--mt-filet); padding: 24px 0 32px; }
body .mt-frise-ligne > *, body .mt-frise > * { margin: 0; }
.mt-frise-date { font-size: 15px; color: var(--mt-gris); }
.mt-frise-corps { max-width: 46em; }
body .mt-frise-corps > * { margin: 0; }
body .mt-frise-corps > * + * { margin-top: 10px; }
.mt-frise-corps p, .mt-frise-corps li { font-size: 17px; color: var(--mt-texte); }
.mt-frise-corps p.mt-frise-org { font-size: 15px; color: var(--mt-gris); margin-top: 4px; }
.mt-frise-corps ul { padding-left: 1.1em; }
.mt-frise-corps li::marker { color: var(--mt-ambre); }
.mt-etapes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 32px 24px; }
body .mt-etapes > *, body .mt-etape > * { margin: 0; }
.mt-etape { border-top: var(--mt-filet); padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.mt-etape h3 { font-size: 18px; font-weight: 600; letter-spacing: 0; line-height: 1.3; }
.mt-etape p { font-size: 16px; color: var(--mt-texte); }
.mt-etape p.mt-etape-num { color: var(--mt-ambre); font-size: 15px; }
.mt-note { font-size: 18px; color: #b4b3ad; max-width: 40em; }
@media (max-width: 700px) {
	.mt-frise-ligne, .mt-ligne { grid-template-columns: minmax(0, 1fr); }
}

/* Contact */
.mt-contact { padding-top: clamp(40px, 6vw, 96px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px clamp(32px, 5vw, 80px); align-items: start; }
body .mt-contact > *, body .mt-contact-texte > * { margin: 0; }
.mt-contact-texte { display: flex; flex-direction: column; gap: 28px; }
.mt-contact-texte .mt-ligne a { text-decoration-color: var(--mt-ambre); text-underline-offset: 4px; }
@media (max-width: 900px) { .mt-contact { grid-template-columns: minmax(0, 1fr); } }
.mt-formulaire form { display: grid; gap: 18px; }
.mt-champ { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.mt-champ label { font-size: 15px; color: var(--mt-gris); }
.mt-champ label span { color: #8d8c86; }
.mt-formulaire input, .mt-formulaire textarea { width: 100%; box-sizing: border-box; background: #202020; border: 1px solid #3a3a37; border-radius: 0; color: #ecebe6; font: inherit; font-size: 17px; padding: 14px 16px; }
.mt-formulaire textarea { min-height: 180px; resize: vertical; }
.mt-formulaire input:focus, .mt-formulaire textarea:focus { outline: none; border-color: var(--mt-ambre); box-shadow: 0 0 0 1px var(--mt-ambre); }
.mt-champ-piege { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.mt-formulaire-pied { margin: 4px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.mt-formulaire-pied span { font-size: 15px; color: var(--mt-gris); }
.mt-formulaire button { border: 0; border-radius: 0; font: inherit; font-size: 16px; font-weight: 600; line-height: 1; cursor: pointer; }
.mt-formulaire-message { margin: 0 0 18px; padding: 14px 16px; background: #202020; border: var(--mt-filet); }

/* Pages simples */
.mt-page-titre { padding-top: clamp(40px, 6vw, 96px); }
.wp-block-post-content a { text-decoration-color: var(--mt-ambre); text-underline-offset: 3px; }

/* Repères [à compléter] : visibles seulement pour les éditeurs connectés */
mark.mt-a-completer { background: rgba(245, 183, 0, .22) !important; color: #ecebe6; outline: 1px dashed var(--mt-ambre); padding: 0 4px; }
.mt-a-completer-bloc { outline: 1px dashed var(--mt-ambre); outline-offset: 8px; }

/* Mises en page autonomes (indépendantes des réglages de bloc) */
.mt-titre-section, .mt-legende, .mt-entete, .mt-pied { display: flex; flex-wrap: wrap; justify-content: space-between; }
.mt-carte-meta, .mt-projet-surtitre, .mt-marque, .mt-pied-liens { display: flex; flex-wrap: wrap; }
.mt-appel { align-items: flex-end; }
.mt-appel h2 { max-width: 20ch; }
.mt-frise-courte { margin-top: 0 !important; }
.mt-frise-courte .mt-frise-ligne { padding: 16px 0 20px; }
.mt-frise-courte .mt-frise-corps h3 { font-size: 18px; font-weight: 600; letter-spacing: 0; line-height: 1.3; }
.mt-coordonnees { border-bottom: var(--mt-filet); }
body .mt-coordonnees > * { margin: 0; }
.mt-note { margin: 0; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
