/*
Theme Name: Morgane — Carnet d'atelier
Theme URI: https://morganepierre.fr/
Author: Site de Morgane
Description: Galerie WordPress chaleureuse et colorée, conçue pour les tableaux de Morgane.
Version: 1.0.2
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: morgane-carnet
*/

:root {
  --paper: #fffdf8;
  --cream: #f7f0df;
  --ink: #22201d;
  --muted: #766f65;
  --orange: #ef6a3a;
  --blue: #3169c6;
  --yellow: #f3c845;
  --green: #7e9a6b;
  --line: rgba(34, 32, 29, .18);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Arial, Helvetica, sans-serif;
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.65 var(--sans); }
body.admin-bar .site-header { top: 32px; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
::selection { color: var(--ink); background: var(--yellow); }
.container { width: min(calc(100% - 48px), var(--max)); margin-inline: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.screen-reader-text:focus, .skip-link:focus { z-index: 99999; top: 10px; left: 10px; width: auto; height: auto; padding: 12px 16px; clip: auto; background: var(--ink); color: white; }
.skip-link { position: fixed; top: -100px; }

.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line); background: rgba(255, 253, 248, .96); backdrop-filter: blur(14px); }
.header-inner { display: grid; grid-template-columns: minmax(230px, 1fr) auto minmax(150px, 1fr); align-items: center; gap: 28px; min-height: 82px; }
.site-brand { display: flex; align-items: center; gap: 13px; width: fit-content; }
.palette-mark { position: relative; display: inline-block; flex: 0 0 auto; width: 44px; height: 42px; border-radius: 55% 48% 56% 44%; background: var(--orange); transform: rotate(-12deg); }
.palette-mark::after { content: ""; position: absolute; right: -2px; bottom: 1px; width: 16px; height: 15px; border-radius: 50%; background: var(--paper); }
.palette-mark i { position: absolute; z-index: 1; width: 5px; height: 5px; border-radius: 50%; background: var(--paper); }
.palette-mark i:nth-child(1) { left: 10px; top: 9px; }
.palette-mark i:nth-child(2) { left: 23px; top: 8px; }
.palette-mark i:nth-child(3) { left: 11px; top: 22px; }
.brand-copy { display: grid; line-height: 1.1; }
.brand-copy strong { font: 700 1.38rem/1 var(--serif); }
.brand-copy span { margin-top: 5px; color: var(--muted); font-size: .72rem; letter-spacing: .06em; }
.primary-nav ul, .footer-nav ul { display: flex; align-items: center; gap: 28px; margin: 0; padding: 0; list-style: none; }
.primary-nav a { position: relative; padding: 11px 0; font-size: .9rem; font-weight: 700; }
.primary-nav a::after { content: ""; position: absolute; right: 0; bottom: 4px; left: 0; height: 2px; background: var(--orange); transform: scaleX(0); transition: transform .2s ease; }
.primary-nav a:hover::after, .primary-nav a:focus-visible::after, .primary-nav .current-menu-item a::after { transform: scaleX(1); }
.primary-nav .menu-item-add-artwork { display: none; }
.header-actions { display: flex; justify-content: flex-end; align-items: center; gap: 9px; }
.icon-button, .menu-toggle { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; }
.menu-toggle { display: none; }
.add-button { display: inline-flex; align-items: center; gap: 7px; padding: 11px 18px; border-radius: 42% 58% 45% 55% / 55% 48% 52% 45%; background: var(--orange); color: white; font-weight: 800; transition: transform .2s ease, background .2s ease; }
.add-button:hover, .add-button:focus-visible { background: #d95328; transform: rotate(-1deg) translateY(-2px); }
.search-drawer { display: none; padding: 16px 0 22px; border-top: 1px solid var(--line); }
.search-drawer.is-open { display: block; }
.search-form { display: flex; max-width: 660px; margin-inline: auto; }
.search-field { width: 100%; min-width: 0; padding: 13px 17px; border: 1px solid var(--ink); border-radius: 0; background: white; }
.search-submit { padding: 13px 20px; border: 1px solid var(--ink); border-left: 0; background: var(--ink); color: white; cursor: pointer; }

.hero { overflow: hidden; background: var(--yellow); }
.hero-inner { display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; min-height: 690px; padding-block: 90px; }
.hero-kicker, .section-kicker { margin: 0 0 14px; font-size: .74rem; font-weight: 900; letter-spacing: .17em; text-transform: uppercase; }
.hero h1 { max-width: 640px; margin: 0; font: 400 clamp(3.65rem, 7vw, 7rem)/.86 var(--serif); letter-spacing: -.07em; }
.hero h1 span { display: inline-block; color: var(--blue); font-style: italic; transform: rotate(-2deg); }
.hero-link, .ink-link { display: inline-flex; align-items: center; gap: 28px; margin-top: 34px; padding-bottom: 6px; border-bottom: 2px solid currentColor; font-weight: 800; }
.art-scatter { position: relative; min-height: 510px; }
.scatter-card { position: absolute; width: min(310px, 55%); padding: 12px 12px 42px; box-shadow: 0 19px 50px rgba(76, 55, 16, .22); background: white; transition: transform .35s ease; }
.scatter-card:hover { z-index: 5; transform: rotate(0) translateY(-8px); }
.scatter-card img { width: 100%; height: 340px; object-fit: cover; }
.scatter-caption { position: absolute; right: 14px; bottom: 10px; left: 14px; overflow: hidden; font: italic .88rem var(--serif); text-overflow: ellipsis; white-space: nowrap; }
.scatter-card:nth-child(1) { z-index: 3; top: 25px; left: 17%; transform: rotate(-7deg); }
.scatter-card:nth-child(2) { z-index: 2; top: 80px; right: 2%; transform: rotate(8deg); }
.scatter-card:nth-child(3) { z-index: 1; top: 170px; left: 0; transform: rotate(4deg); }
.tape { position: absolute; z-index: 6; width: 83px; height: 26px; background: rgba(239, 106, 58, .68); transform: rotate(-14deg); }
.tape-one { top: 14px; left: 31%; }
.tape-two { right: 8%; bottom: 51px; background: rgba(49, 105, 198, .55); transform: rotate(11deg); }

.gallery-section { padding: 110px 0 120px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 35px; margin-bottom: 48px; }
.section-heading h2, .archive-header h1 { margin: 0; font: 400 clamp(2.7rem, 5vw, 5rem)/.95 var(--serif); letter-spacing: -.055em; }
.section-kicker { color: var(--orange); }
.category-chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.category-chips a { padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; font-size: .77rem; font-weight: 800; transition: color .2s, background .2s, border .2s; }
.category-chips a:hover, .category-chips a:focus-visible { border-color: var(--blue); background: var(--blue); color: white; }
.art-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 42px 26px; }
.art-card { grid-column: span 4; min-width: 0; }
.art-card:nth-child(6n + 2), .art-card:nth-child(6n + 5) { padding-top: 46px; }
.art-card-link { display: block; }
.art-card-image { position: relative; overflow: hidden; aspect-ratio: 4 / 5; background: var(--cream); }
.art-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s cubic-bezier(.2,.7,.2,1); }
.art-card-link:hover img, .art-card-link:focus-visible img { transform: scale(1.035); }
.art-card-placeholder { display: grid; place-items: center; width: 100%; height: 100%; padding: 30px; background: var(--yellow); color: var(--blue); text-align: center; font: italic 2rem var(--serif); }
.art-card-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 15px; }
.art-card h2 { margin: 0; font: 400 1.5rem/1.1 var(--serif); }
.art-card-meta span { color: var(--muted); font-size: .72rem; white-space: nowrap; }
.art-card-categories { margin-top: 6px; color: var(--orange); font-size: .72rem; font-weight: 800; text-transform: uppercase; }

.category-band { padding: 70px 0; background: var(--orange); color: white; }
.category-band .section-kicker { color: white; }
.category-list { border-top: 1px solid rgba(255,255,255,.55); }
.category-list a { display: grid; grid-template-columns: 55px 1fr auto; align-items: center; gap: 20px; padding: 17px 4px; border-bottom: 1px solid rgba(255,255,255,.55); font: 400 clamp(1.4rem, 2.8vw, 2.7rem)/1 var(--serif); transition: padding .2s, background .2s; }
.category-list a:hover, .category-list a:focus-visible { padding-inline: 15px; background: rgba(255,255,255,.12); }
.category-list small { font: 700 .72rem var(--sans); letter-spacing: .08em; text-transform: uppercase; }

.about-band { padding: 115px 0; background: var(--cream); }
.about-grid { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 90px; }
.notebook { position: relative; padding: 70px 60px 65px 92px; box-shadow: 0 20px 55px rgba(69, 58, 39, .12); background: repeating-linear-gradient(to bottom, white 0, white 31px, #d8e2ef 32px); transform: rotate(-1deg); }
.notebook::before { content: ""; position: absolute; top: 0; bottom: 0; left: 55px; width: 2px; background: rgba(239,106,58,.35); }
.notebook h2 { margin: 8px 0 22px; font: 400 clamp(2.5rem, 4.3vw, 4.8rem)/1 var(--serif); letter-spacing: -.055em; }
.notebook p { max-width: 580px; font-size: 1.08rem; }
.about-art { position: relative; }
.about-art img { width: 100%; max-height: 620px; object-fit: cover; }
.about-art-label { position: absolute; right: -24px; bottom: 45px; padding: 19px 24px; background: var(--blue); color: white; font-size: .73rem; font-weight: 900; letter-spacing: .12em; line-height: 1.7; transform: rotate(5deg); }

.contact-band { background: var(--blue); color: white; }
.contact-inner { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 40px; padding-block: 92px; }
.contact-band .section-kicker { color: white; }
.contact-band h2 { max-width: 780px; margin: 0; font: 400 clamp(3rem, 6vw, 6rem)/.92 var(--serif); letter-spacing: -.06em; }
.contact-actions { display: grid; gap: 11px; }
.contact-actions a { min-width: 215px; padding: 14px 18px; border: 1px solid white; font-weight: 800; text-align: center; }
.contact-actions a:first-child { background: white; color: var(--blue); }
.contact-actions a:hover, .contact-actions a:focus-visible { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }

.archive-main { padding: 75px 0 110px; }
.archive-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 30px; margin-bottom: 55px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.archive-header p { margin: 10px 0 0; color: var(--muted); }
.result-count { color: var(--orange); font-size: .78rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.pagination { margin-top: 65px; }
.pagination .nav-links { display: flex; justify-content: center; gap: 7px; }
.pagination a, .pagination span { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 10px; border: 1px solid var(--line); }
.pagination .current, .pagination a:hover { border-color: var(--orange); background: var(--orange); color: white; }
.empty-state { padding: 55px; background: var(--cream); text-align: center; }

.singular-main { padding: 72px 0 110px; }
.article-shell { width: min(calc(100% - 48px), 960px); margin-inline: auto; }
.entry-header { margin-bottom: 42px; text-align: center; }
.entry-kicker { margin: 0 0 10px; color: var(--orange); font-size: .75rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.entry-title { margin: 0; font: 400 clamp(3.1rem, 7vw, 6.8rem)/.92 var(--serif); letter-spacing: -.065em; }
.entry-meta { margin: 18px 0 0; color: var(--muted); font-size: .8rem; }
.featured-media { margin: 0 0 55px; padding: 14px; box-shadow: 0 20px 60px rgba(45,35,22,.12); background: white; }
.featured-media img { width: 100%; max-height: 80vh; object-fit: contain; background: var(--cream); }
.entry-content { width: min(100%, 760px); margin-inline: auto; font: 1.08rem/1.8 var(--sans); }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2, .entry-content h3 { font-family: var(--serif); line-height: 1.1; }
.entry-content h2 { font-size: 2.3rem; }
.entry-content a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.entry-content img { height: auto; }
.entry-content .alignwide { width: min(1100px, calc(100vw - 48px)); max-width: none; margin-left: 50%; transform: translateX(-50%); }
.entry-content .alignfull { width: 100vw; max-width: none; margin-left: 50%; transform: translateX(-50%); }
.post-taxonomy { width: min(100%, 760px); margin: 48px auto 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.post-taxonomy a { color: var(--orange); font-weight: 800; }
.post-navigation { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; width: min(100%, 760px); margin: 45px auto 0; }
.post-navigation a { padding: 18px; border: 1px solid var(--line); font-family: var(--serif); }
.post-navigation .nav-next { text-align: right; }

.entry-content input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]), .entry-content textarea, .entry-content select { width: 100%; max-width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 0; background: white; }
.entry-content textarea { min-height: 150px; resize: vertical; }
.entry-content input:focus, .entry-content textarea:focus, .entry-content select:focus { outline: 3px solid rgba(49,105,198,.22); border-color: var(--blue); }
.entry-content input[type="submit"], .entry-content button, .comment-form input[type="submit"] { width: auto; padding: 13px 19px; border: 0; border-radius: 0; background: #c94720; color: white; font-weight: 800; cursor: pointer; transition: background .2s ease, transform .2s ease; }
.entry-content input[type="submit"]:hover, .entry-content input[type="submit"]:focus-visible, .entry-content button:hover, .entry-content button:focus-visible, .comment-form input[type="submit"]:hover, .comment-form input[type="submit"]:focus-visible { background: #a9381b; transform: translateY(-1px); }
.wpcf7-form p { margin-bottom: 20px; }
.wpcf7-not-valid-tip { color: #b42222; }
.usp-form, .usp-post-form { padding: 24px; border: 1px solid var(--line); background: var(--cream); }

.comments-area { width: min(100%, 760px); margin: 65px auto 0; padding-top: 30px; border-top: 1px solid var(--line); }
.comment-list { padding-left: 22px; }
.comment-list li { margin-bottom: 26px; }
.comment-form label { display: block; font-weight: 700; }
.comment-form input:not([type="submit"]), .comment-form textarea { width: 100%; padding: 11px; border: 1px solid var(--line); }

.site-footer { padding: 46px 0; border-top: 1px solid var(--line); background: var(--paper); }
.footer-inner { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 35px; }
.footer-brand { display: flex; align-items: center; gap: 11px; font: 700 1.1rem var(--serif); }
.footer-brand .palette-mark { width: 32px; height: 31px; }
.footer-brand .palette-mark::after { width: 12px; height: 11px; }
.footer-brand .palette-mark i { transform: scale(.78); transform-origin: top left; }
.footer-nav a { font-size: .8rem; font-weight: 700; }
.site-footer small { color: var(--muted); }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

@media (max-width: 1040px) {
  .header-inner { grid-template-columns: 1fr auto; }
  .primary-nav { position: absolute; top: 100%; right: 0; left: 0; display: none; padding: 22px 24px; border-bottom: 1px solid var(--line); background: var(--paper); }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { align-items: stretch; flex-direction: column; gap: 0; }
  .primary-nav li { border-bottom: 1px solid var(--line); }
  .primary-nav a { display: block; padding: 13px 4px; }
  .primary-nav .menu-item-add-artwork { display: block; }
  .menu-toggle { display: grid; }
  .header-actions .add-button { display: none; }
  .hero-inner { grid-template-columns: 1fr 1fr; }
  .art-scatter { transform: scale(.86); transform-origin: center; }
  .about-grid { gap: 45px; }
  .notebook { padding: 55px 42px 52px 74px; }
}

@media (max-width: 760px) {
  body.admin-bar .site-header { top: 46px; }
  .container, .article-shell { width: min(calc(100% - 30px), var(--max)); }
  .header-inner { min-height: 70px; gap: 10px; }
  .brand-copy span { display: none; }
  .icon-button { display: none; }
  .hero-inner { display: block; min-height: auto; padding-block: 64px 35px; }
  .hero h1 { font-size: clamp(3.35rem, 16vw, 5.4rem); }
  .art-scatter { min-height: 410px; margin-top: 32px; transform: none; }
  .scatter-card { width: 55%; padding: 8px 8px 32px; }
  .scatter-card img { height: 250px; }
  .scatter-card:nth-child(1) { left: 18%; }
  .scatter-card:nth-child(2) { top: 80px; right: -5%; }
  .scatter-card:nth-child(3) { top: 135px; left: -7%; }
  .gallery-section { padding: 76px 0 82px; }
  .section-heading, .archive-header { display: block; }
  .category-chips { justify-content: flex-start; margin-top: 25px; }
  .art-grid { gap: 32px 14px; }
  .art-card { grid-column: span 6; }
  .art-card:nth-child(6n + 2), .art-card:nth-child(6n + 5) { padding-top: 25px; }
  .art-card h2 { font-size: 1.2rem; }
  .art-card-meta { display: block; }
  .art-card-meta span { display: block; margin-top: 5px; }
  .category-list a { grid-template-columns: 40px 1fr auto; }
  .about-band { padding: 75px 0; }
  .about-grid { display: block; }
  .notebook { padding: 48px 30px 48px 54px; }
  .notebook::before { left: 34px; }
  .about-art { margin: 45px 18px 0; }
  .about-art-label { right: -12px; }
  .contact-inner { display: block; padding-block: 70px; }
  .contact-actions { margin-top: 35px; }
  .archive-main, .singular-main { padding-top: 50px; }
  .entry-title { font-size: clamp(3rem, 15vw, 5rem); }
  .featured-media { margin-bottom: 38px; padding: 7px; }
  .footer-inner { display: block; text-align: center; }
  .footer-brand, .footer-nav ul { justify-content: center; }
  .footer-nav { margin: 25px 0; }
  .footer-nav ul { flex-wrap: wrap; gap: 12px 22px; }
}

@media (max-width: 460px) {
  .site-brand { gap: 8px; }
  .palette-mark { width: 37px; height: 35px; }
  .brand-copy strong { font-size: 1.2rem; }
  .art-scatter { min-height: 345px; }
  .scatter-card img { height: 205px; }
  .art-grid { display: block; }
  .art-card, .art-card:nth-child(n) { margin-bottom: 38px; padding-top: 0; }
  .art-card-image { aspect-ratio: 4 / 4.8; }
  .post-navigation { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
