/*
Theme Name: MAPAA
Description: Thème sur mesure pour la Maison d'Art des Pratiques Artistiques Adaptées. Les œuvres et les artistes au centre.
Version: 0.1.0
Text Domain: mapaa
Requires at least: 6.0
Requires PHP: 7.4
*/

:root {
  /* Charte du dossier MAPAA : fond blanc, trait de pinceau jaune, titres noirs */
  --c-yellow: #f2e614;
  --c-blue: #2d4e9d;
  --c-bg: #ffffff;
  --c-ink: #1d1d1b;
  --c-muted: #3a3a3a;
  --f-title: 'Hobo Std', 'Hobo', 'Arial Rounded MT Bold', 'Helvetica Neue', Arial, sans-serif;
  --f-body: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;
  /* photos découpées en biseau, comme dans le dossier */
  --cut: polygon(14% 0, 100% 0, 100% 100%, 0 100%);
  --cut-card: polygon(0 0, 100% 0, 100% 86%, 86% 100%, 0 100%);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--c-bg); color: var(--c-ink); font: 17px/1.55 var(--f-body); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--c-blue); outline-offset: 2px; }

/* Titres : Hobo noir sur trait de pinceau jaune */
h1, h2, h3 { margin-top: 0; }
h1 { font-family: var(--f-title); font-weight: 400; font-size: clamp(1.9rem, 4.5vw, 3rem); line-height: 1.1; position: relative; z-index: 0; margin-bottom: .6em; }
h1::before { content: ''; position: absolute; z-index: -1; left: -.6em; top: -.35em; width: 3.4em; height: 1.4em; background: url("assets/images/swoosh-yellow.svg") no-repeat left top / contain; }
.page-template-template-contact h1::before { background-image: url("assets/images/swoosh-blue.svg"); }
/* Sous-titres : barre noire, texte blanc */
h2 { display: inline-block; background: var(--c-ink); color: #fff; font: 700 1.1rem/1.3 var(--f-body); padding: .2em .6em; margin-bottom: 1em; }
h3 { font: 700 1.05rem/1.3 var(--f-body); }
.hl { position: relative; z-index: 1; background: var(--c-ink); color: #fff; padding: .15em .6em; font-weight: 700; text-decoration: none; display: inline-block; }
.lead { font-size: 1.25rem; font-weight: 700; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(48px, 8vw, 96px) 0; }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 8px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; }

/* Header */
.site-header { background: #fff; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.site-title { font: 400 1.5rem var(--f-title); text-decoration: none; }
.site-title { display: flex; align-items: center; }
.site-title img { height: 60px; width: auto; }
.main-nav ul { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.main-nav a { text-decoration: none; font-weight: 700; font-size: .95rem; padding: 2px 6px; }
.main-nav a:hover, .main-nav .current-menu-item > a { background: var(--c-ink); color: #fff; }
.nav-toggle { display: none; background: var(--c-ink); color: #fff; border: 0; padding: 8px 14px; font: 700 .95rem var(--f-body); cursor: pointer; }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 76px; background: #fff; padding: 16px var(--gutter); z-index: 10; box-shadow: 0 8px 0 var(--c-yellow); }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 10px; }
  .site-header { position: relative; }
}

/* Boutons */
.btn { display: inline-block; padding: 10px 24px; background: var(--c-ink); color: #fff; text-decoration: none; border: 0; font: 700 1rem var(--f-body); cursor: pointer; }
.btn:hover { background: var(--c-yellow); color: var(--c-ink); }

/* Hero */
.hero { padding: clamp(56px, 10vw, 130px) 0; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 4rem); max-width: 14em; }
.hero p { max-width: 36em; font-size: 1.2rem; }

/* Grille d'artistes */
.grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { text-decoration: none; display: block; }
.card img, .card .ph { aspect-ratio: 4/5; width: 100%; object-fit: cover; background: var(--c-yellow); clip-path: var(--cut-card); }
.card h3 { margin: .8em 0 .2em; display: inline-block; background: var(--c-ink); color: #fff; padding: .1em .5em; }
.card:hover h3 { background: var(--c-blue); }
.card p { margin: .3em 0 0; color: var(--c-muted); font-size: .95rem; }

/* Fiche artiste */
.artist-head { display: grid; gap: 48px; grid-template-columns: 1fr 1fr; align-items: center; }
@media (max-width: 760px) { .artist-head { grid-template-columns: 1fr; } }
.artist-portrait img, .artist-portrait .ph { width: 100%; clip-path: var(--cut); }
.artist-portrait .ph { aspect-ratio: 4/5; background: var(--c-yellow); }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 1em 0; }
.tags li { background: var(--c-yellow); padding: 2px 14px; font-weight: 700; font-size: .9rem; }
.artist-section { margin-top: clamp(40px, 6vw, 72px); }
.gallery { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; clip-path: var(--cut-card); }

/* Contenu texte */
.prose { max-width: 44em; }
.prose h2 { margin-top: 1.6em; }
.prose > h2:first-child { margin-top: 0; }
.prose strong { font-weight: 700; }
.prose table { border-collapse: collapse; width: 100%; margin: 1em 0; }
.prose th { background: var(--c-ink); color: #fff; text-align: left; }
.prose th, .prose td { padding: 8px 12px; border: 2px solid var(--c-ink); vertical-align: top; }
.prose code { background: var(--c-yellow); padding: 0 .3em; }

/* Formulaire */
.form-contact label { display: block; margin: 16px 0 4px; font-weight: 700; }
.form-contact input, .form-contact textarea { width: 100%; padding: 12px; border: 2px solid var(--c-ink); background: #fff; font: inherit; }
.form-contact input:focus, .form-contact textarea:focus { outline: 3px solid var(--c-yellow); }

/* Footer */
.site-footer { background: var(--c-yellow); padding: 56px 0 24px; font-size: .95rem; margin-top: 40px; }
.footer-grid { display: grid; gap: 32px 48px; grid-template-columns: 1.4fr 1fr 1.3fr 1fr; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand img { height: 80px; width: auto; margin-bottom: 12px; }
.footer-brand p { margin: 0; max-width: 24em; }
.site-footer h2 { font-size: .95rem; margin-bottom: .8em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { font-weight: 700; }
.site-footer a:hover { background: var(--c-ink); color: #fff; text-decoration: none; }
.footer-legal { margin-top: 36px; padding-top: 16px; border-top: 2px solid var(--c-ink); font-size: .85rem; }
.footer-legal p { margin: 0; }
