/*
Theme Name: ARRASARTBRUT Atelier
Theme URI: https://arrasartbrut.fr/
Author: OpenAI pour Christophe Verger-Lecocq
Description: Thème WordPress galerie d'art, responsive et compatible WooCommerce, conçu pour ARRASARTBRUT.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: arrasartbrut-atelier
License: GPL-2.0-or-later
*/

:root {
  --ink: #111111;
  --paper: #f5f1e8;
  --paper-2: #fffdf7;
  --blue: #002fa7;
  --blue-deep: #001a66;
  --line: rgba(17,17,17,.18);
  --muted: #686868;
  --shadow: 0 24px 60px rgba(0,0,0,.12);
  --radius: 22px;
  --max: 1320px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
body.admin-bar .site-header { top: 32px; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
::selection { background: var(--blue); color: white; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.wrap { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.section { padding: clamp(72px, 9vw, 132px) 0; }
.section-head {
  display: flex; align-items: end; justify-content: space-between;
  gap: 24px; margin-bottom: 42px;
}
.eyebrow {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: .78rem; font-weight: 800;
  letter-spacing: .18em; text-transform: uppercase;
}
h1, h2, h3, h4 {
  line-height: .96; letter-spacing: -.045em; margin-top: 0;
}
h1 { font-size: clamp(3.2rem, 9vw, 9.2rem); }
h2 { font-size: clamp(2.35rem, 5vw, 5.7rem); margin-bottom: 20px; }
h3 { font-size: clamp(1.35rem, 2.2vw, 2.15rem); }
p { margin-top: 0; }
.lead { font-size: clamp(1.08rem, 1.7vw, 1.45rem); max-width: 820px; }
.muted { color: var(--muted); }

.button, .wp-element-button, .woocommerce a.button, .woocommerce button.button,
.woocommerce input.button, button[type="submit"] {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 12px 22px;
  border: 2px solid var(--ink); border-radius: 999px;
  background: var(--ink); color: white;
  font-weight: 800; letter-spacing: .015em;
  cursor: pointer; transition: .22s ease;
}
.button:hover, .wp-element-button:hover, .woocommerce a.button:hover,
.woocommerce button.button:hover, button[type="submit"]:hover {
  transform: translateY(-2px);
  background: var(--blue); border-color: var(--blue);
  color: white;
}
.button--ghost { background: transparent; color: var(--ink); }
.button--ghost:hover { color: white; }
.text-link { font-weight: 800; border-bottom: 2px solid currentColor; }

/* Header */
.site-header {
  position: fixed; z-index: 1000; inset: 0 0 auto;
  transition: background .25s ease, box-shadow .25s ease, color .25s ease;
}
.site-header.is-scrolled {
  background: rgba(245,241,232,.94);
  backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 var(--line);
}
.header-inner {
  min-height: 86px; display: flex; align-items: center;
  justify-content: space-between; gap: 24px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-weight: 950; letter-spacing: -.04em; font-size: 1.3rem;
}
.custom-logo { max-height: 58px; width: auto; }
.primary-nav ul {
  display: flex; align-items: center; gap: 26px;
  list-style: none; padding: 0; margin: 0;
}
.primary-nav a { font-weight: 800; font-size: .94rem; }
.primary-nav a:hover { color: var(--blue); }
.menu-toggle {
  display: none; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--paper-2);
}
.menu-toggle span, .menu-toggle::before, .menu-toggle::after {
  content: ""; width: 20px; height: 2px; background: var(--ink);
  display: block; margin: 4px auto; transition: .2s ease;
}

/* Hero */
.hero {
  min-height: 100svh; display: grid; align-items: end;
  position: relative; overflow: hidden; background: var(--paper-2);
}
.hero-media {
  position: absolute; inset: 0; background: var(--ink);
}
.hero-media img {
  width: 100%; height: 100%; object-fit: cover; opacity: .72;
  transform: scale(1.02);
}
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.76));
}
.hero-content {
  position: relative; z-index: 2; color: white;
  padding: 160px 0 68px;
}
.hero h1 { margin-bottom: 20px; max-width: 1150px; }
.hero-subtitle {
  max-width: 760px; font-size: clamp(1.1rem, 2vw, 1.6rem);
  margin-bottom: 32px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .button--ghost { border-color: white; color: white; }
.hero .button--ghost:hover { border-color: var(--blue); }
.hero .eyebrow { color: white; opacity: .85; }

/* Artwork grid */
.art-grid {
  display: grid; grid-template-columns: repeat(12, 1fr);
  gap: clamp(18px, 2.5vw, 34px);
}
.art-card {
  grid-column: span 4; position: relative;
}
.art-card:nth-child(5n+1), .art-card:nth-child(5n+4) { grid-column: span 7; }
.art-card:nth-child(5n+2), .art-card:nth-child(5n+5) { grid-column: span 5; }
.art-card-media {
  aspect-ratio: 4/5; overflow: hidden; background: #ddd;
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.art-card:nth-child(5n+1) .art-card-media,
.art-card:nth-child(5n+4) .art-card-media { aspect-ratio: 6/5; }
.art-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.art-card:hover img { transform: scale(1.035); }
.art-card-meta {
  display: flex; justify-content: space-between; gap: 16px;
  align-items: start; padding: 16px 4px 8px;
}
.art-card h3 { font-size: clamp(1.05rem, 1.5vw, 1.45rem); margin: 0; }
.price { color: var(--blue); white-space: nowrap; font-weight: 900; }

/* Artist block */
.artist-section { background: var(--ink); color: white; overflow: hidden; }
.artist-grid {
  display: grid; grid-template-columns: .9fr 1.1fr;
  gap: clamp(40px, 8vw, 120px); align-items: center;
}
.artist-mark {
  font-size: clamp(8rem, 25vw, 25rem); line-height: .7;
  font-weight: 950; letter-spacing: -.12em; color: var(--blue);
  user-select: none; transform: rotate(-5deg);
}
.artist-copy p { color: rgba(255,255,255,.78); }
.artist-copy .button--ghost { border-color: white; color: white; }

/* Events */
.event-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.event-card {
  display: flex; flex-direction: column; min-height: 330px;
  padding: 28px; background: var(--paper-2);
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: .22s ease;
}
.event-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.event-date { color: var(--blue); font-weight: 900; text-transform: uppercase; font-size: .78rem; letter-spacing: .12em; }
.event-card h3 { margin: 24px 0 16px; }
.event-card .text-link { margin-top: auto; align-self: flex-start; }

/* Contact */
.contact-band {
  background: var(--blue); color: white;
  padding: clamp(72px, 10vw, 140px) 0;
}
.contact-band h2 { max-width: 1000px; }
.contact-band .button { background: white; color: var(--ink); border-color: white; }
.contact-band .button:hover { background: var(--ink); color: white; border-color: var(--ink); }

.contact-layout {
  display: grid; grid-template-columns: .8fr 1.2fr; gap: 60px;
  align-items: start;
}
.contact-form { display: grid; gap: 16px; }
.field { display: grid; gap: 8px; }
.field label { font-weight: 800; }
.field input, .field textarea {
  width: 100%; border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 16px; background: var(--paper-2);
}
.field textarea { min-height: 180px; resize: vertical; }
.notice { padding: 14px 18px; border-radius: 12px; margin-bottom: 20px; }
.notice--success { background: #dff7e7; }
.notice--error { background: #ffe1df; }

/* Content pages */
.page-hero { padding: 190px 0 80px; background: var(--paper-2); }
.content-area { padding: 72px 0 110px; }
.prose { max-width: 880px; font-size: 1.08rem; }
.prose h2, .prose h3 { margin-top: 1.8em; }
.prose a { color: var(--blue); text-decoration: underline; }

/* Footer */
.site-footer { background: #080808; color: white; padding: 64px 0 28px; }
.footer-grid {
  display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 36px;
  padding-bottom: 48px;
}
.footer-brand { font-size: clamp(2rem, 4vw, 4rem); font-weight: 950; letter-spacing: -.055em; }
.footer-title { font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; opacity: .6; margin-bottom: 14px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin: 8px 0; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 20px;
  border-top: 1px solid rgba(255,255,255,.14); padding-top: 24px;
  font-size: .86rem; color: rgba(255,255,255,.62);
}

/* WooCommerce */
.woocommerce .woocommerce-breadcrumb { margin-bottom: 28px; color: var(--muted); }
.woocommerce ul.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none; }
.woocommerce ul.products li.product { width: auto !important; margin: 0 !important; float: none !important; }
.woocommerce ul.products li.product a img {
  border-radius: var(--radius); aspect-ratio: 4/5; object-fit: cover;
  box-shadow: var(--shadow);
}
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 1.1rem; }
.woocommerce div.product div.images img { border-radius: var(--radius); }
.woocommerce div.product .product_title { font-size: clamp(2rem, 4vw, 4.5rem); }
.woocommerce span.onsale { background: var(--blue); }
.woocommerce-message, .woocommerce-info { border-top-color: var(--blue); }
.woocommerce-message::before, .woocommerce-info::before { color: var(--blue); }

/* Reveal */
.js .reveal { opacity: 0; transform: translateY(20px); transition: .65s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 900px) {
  body.admin-bar .site-header { top: 46px; }
  .menu-toggle { display: block; }
  .primary-nav {
    position: fixed; inset: 86px 16px auto;
    background: var(--paper-2); border: 1px solid var(--line);
    border-radius: 18px; padding: 18px; box-shadow: var(--shadow);
    opacity: 0; transform: translateY(-12px); pointer-events: none;
    transition: .2s ease; color: var(--ink);
  }
  .primary-nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: 6px; }
  .primary-nav a { display: block; padding: 12px; }
  .art-card, .art-card:nth-child(n) { grid-column: span 6; }
  .art-card:nth-child(n) .art-card-media { aspect-ratio: 4/5; }
  .artist-grid, .contact-layout, .youtube-card { grid-template-columns: 1fr; }
  .artist-mark { text-align: center; }
  .event-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .woocommerce ul.products { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .wrap { width: min(calc(100% - 28px), var(--max)); }
  .section-head { display: block; }
  .art-card, .art-card:nth-child(n) { grid-column: 1 / -1; }
  .event-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid > :first-child { grid-column: auto; }
  .footer-bottom { flex-direction: column; }
  .woocommerce ul.products { grid-template-columns: 1fr; }
  .hero-actions .button { width: 100%; }
}


/* YouTube */
.youtube-section { background: var(--paper-2); }
.youtube-card {
  display: grid; grid-template-columns: 1.15fr .85fr;
  min-height: 430px; overflow: hidden;
  background: var(--blue); color: white;
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.youtube-copy {
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(34px, 6vw, 82px);
}
.youtube-copy h2 { max-width: 800px; }
.youtube-copy p { max-width: 690px; color: rgba(255,255,255,.82); }
.youtube-copy .button { align-self: flex-start; background: white; color: var(--ink); border-color: white; }
.youtube-copy .button:hover { background: var(--ink); color: white; border-color: var(--ink); }
.youtube-visual {
  position: relative; min-height: 340px;
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.26), transparent 22%),
    linear-gradient(135deg, rgba(0,0,0,.12), rgba(0,0,0,.45));
}
.youtube-play {
  width: clamp(120px, 18vw, 220px);
  aspect-ratio: 1; border: 3px solid white; border-radius: 50%;
  display: grid; place-items: center; font-size: clamp(3rem, 7vw, 6rem);
  line-height: 1; padding-left: .12em;
}
.event-location { color: var(--muted); font-weight: 700; margin-top: -4px; }
.artist-section .eyebrow, .youtube-section .eyebrow { color: white; }
