/*
Theme Name: L'Inventaire
Theme URI: https://books.illu-manufacture.fr
Author: ILLU Manufacture
Description: Thème éditorial léger pour la librairie L'Inventaire.
Version: 1.0.0
Text Domain: inventaire
Requires at least: 6.6
Requires PHP: 8.1
*/

:root {
  --ivory: #f7f3ea;
  --paper: #fffdf8;
  --ink: #25231f;
  --brown: #4a3529;
  --green: #173f36;
  --green-2: #24584c;
  --burgundy: #713a3e;
  --line: #d8d0c3;
  --muted: #6e6961;
  --success: #3f664f;
  --serif: "Iowan Old Style", "Palatino Linotype", Baskerville, Georgia, serif;
  --sans: "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif;
  --radius: 4px;
  --shadow: 0 18px 50px rgba(37, 35, 31, .08);
  --wrap: min(1180px, calc(100% - 40px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--burgundy); }
h1, h2, h3, h4 {
  margin: 0 0 .55em;
  color: var(--green);
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -.025em;
}
h1 { font-size: clamp(3rem, 7vw, 6.3rem); }
h2 { font-size: clamp(2.25rem, 4.2vw, 4rem); }
h3 { font-size: clamp(1.4rem, 2.1vw, 2rem); }
p { margin: 0 0 1.15em; }
button, input, select, textarea { font: inherit; }
.wrap { width: var(--wrap); margin-inline: auto; }
.skip-link { position: fixed; left: 12px; top: -100px; z-index: 9999; background: var(--paper); padding: 10px 14px; }
.skip-link:focus { top: 12px; }
.eyebrow { margin-bottom: 1rem; color: var(--burgundy); font-size: .75rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.section { padding: clamp(64px, 9vw, 118px) 0; }
.section--paper { background: var(--paper); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 42px; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.section-heading h2 { margin: 0; }
.section-heading p { max-width: 520px; margin: 0; color: var(--muted); }
.button, .wp-element-button, button.button, a.button, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--green) !important;
  border-radius: var(--radius) !important;
  background: var(--green) !important;
  color: #fff !important;
  padding: .75rem 1.25rem !important;
  font-size: .84rem !important;
  font-weight: 700 !important;
  letter-spacing: .07em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background .2s ease, transform .2s ease;
}
.button:hover, button.button:hover, a.button:hover { background: var(--green-2) !important; color: #fff !important; transform: translateY(-1px); }
.button--ghost { background: transparent !important; color: var(--green) !important; }
.button--ghost:hover { background: var(--green) !important; color: #fff !important; }

.assurance { background: var(--green); color: #fff; font-size: .78rem; letter-spacing: .06em; }
.assurance .wrap { display: flex; min-height: 38px; align-items: center; justify-content: center; gap: 12px 28px; text-align: center; }
.site-header { position: relative; z-index: 50; border-bottom: 1px solid var(--line); background: rgba(247, 243, 234, .96); }
.header-main { display: grid; grid-template-columns: auto minmax(180px, 1fr) auto; align-items: center; gap: 34px; min-height: 96px; }
.brand { text-decoration: none; }
.brand-name { display: block; color: var(--green); font-family: var(--serif); font-size: 2rem; font-weight: 600; line-height: .9; }
.brand-tagline { display: block; margin-top: 8px; color: var(--muted); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; }
.header-search .search-form { display: flex; border-bottom: 1px solid var(--brown); }
.header-search label { flex: 1; }
.search-field { width: 100%; border: 0; background: transparent; padding: 11px 4px; color: var(--ink); outline: 0; }
.search-submit { border: 0; background: transparent; color: var(--green); cursor: pointer; padding: 0 4px 0 16px; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.header-actions { display: flex; align-items: center; gap: 18px; font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.header-actions a { text-decoration: none; }
.cart-count { display: inline-grid; min-width: 23px; height: 23px; place-items: center; margin-left: 4px; border-radius: 50%; background: var(--burgundy); color: #fff; font-size: .7rem; }
.primary-nav { border-top: 1px solid rgba(216, 208, 195, .65); }
.primary-nav ul { display: flex; flex-wrap: wrap; align-items: center; gap: 0 30px; margin: 0; padding: 0; list-style: none; }
.primary-nav a { display: block; padding: 15px 0; color: var(--ink); font-size: .8rem; font-weight: 700; letter-spacing: .045em; text-decoration: none; text-transform: uppercase; }
.primary-nav .menu-item-has-children { position: relative; }
.primary-nav .sub-menu { position: absolute; display: none; min-width: 250px; top: 100%; left: -18px; padding: 14px 18px; background: var(--paper); box-shadow: var(--shadow); }
.primary-nav li:hover > .sub-menu, .primary-nav li:focus-within > .sub-menu { display: block; }
.primary-nav .sub-menu a { padding: 8px 0; text-transform: none; }

.hero { overflow: hidden; padding: clamp(68px, 9vw, 128px) 0; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: clamp(48px, 8vw, 110px); }
.hero-copy p:not(.eyebrow) { max-width: 660px; color: #4f4a43; font-size: clamp(1.08rem, 1.65vw, 1.35rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-visual { position: relative; min-height: 540px; display: grid; place-items: center; }
.hero-visual::before { content: ""; position: absolute; width: 86%; aspect-ratio: 1; border-radius: 50%; background: #ebe3d5; }
.hero-visual::after { content: ""; position: absolute; width: 72%; height: 16%; bottom: 5%; border-radius: 50%; background: rgba(37,35,31,.14); filter: blur(28px); }
.hero-visual img { position: relative; z-index: 1; width: min(460px, 90%); filter: drop-shadow(0 24px 30px rgba(37,35,31,.18)); transform: rotate(2deg); }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); }
.trust-item { padding: 28px 24px; text-align: center; }
.trust-item + .trust-item { border-left: 1px solid var(--line); }
.trust-item strong { display: block; color: var(--green); font-family: var(--serif); font-size: 1.32rem; }
.trust-item span { color: var(--muted); font-size: .84rem; }

.doors { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.door { position: relative; grid-column: span 4; min-height: 230px; display: flex; flex-direction: column; justify-content: end; overflow: hidden; border: 1px solid var(--line); background: var(--paper); padding: 28px; text-decoration: none; }
.door:nth-child(4), .door:nth-child(5) { grid-column: span 6; }
.door::before { content: attr(data-number); position: absolute; right: 18px; top: 2px; color: rgba(23,63,54,.065); font-family: var(--serif); font-size: 8rem; line-height: 1; }
.door:hover { border-color: var(--green); color: inherit; }
.door h3 { position: relative; margin-bottom: 8px; }
.door p { position: relative; max-width: 42ch; margin: 0; color: var(--muted); font-size: .9rem; }
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 42px 22px; }
.book-card { min-width: 0; }
.book-card-image { position: relative; aspect-ratio: 1; overflow: hidden; background: #efe8dc; }
.book-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.book-card:hover .book-card-image img { transform: scale(1.018); }
.book-card-meta { margin-top: 16px; }
.book-card-meta h3 { margin: 0 0 8px; font-size: 1.35rem; line-height: 1.08; }
.book-card-meta h3 a { text-decoration: none; }
.book-card-line { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: .83rem; }
.book-card .price { color: var(--green); font-size: 1rem; font-weight: 700; }
.catalogue-empty { border: 1px solid var(--line); background: var(--paper); padding: 34px; color: var(--muted); }

.library-block { background: var(--green); color: #f7f3ea; }
.library-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 80px; }
.library-block h2 { color: #fff; }
.library-block .eyebrow { color: #d9b5b7; }
.library-number { font-family: var(--serif); font-size: clamp(9rem, 22vw, 18rem); line-height: .72; color: rgba(255,255,255,.08); text-align: center; }
.manifesto-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 70px; }
.manifesto-grid blockquote { margin: 0; color: var(--green); font-family: var(--serif); font-size: clamp(2rem, 3.3vw, 3.25rem); line-height: 1.08; }
.manifesto-copy { max-width: 660px; color: #4f4a43; }
.editorial-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.editorial-card { border-top: 3px solid var(--burgundy); background: var(--paper); padding: 28px; }
.editorial-card h3 { font-size: 1.55rem; }

.site-main { min-height: 60vh; }
.content-shell { width: var(--wrap); margin-inline: auto; padding: 72px 0 110px; }
.content-shell > article, .content-narrow { max-width: 820px; }
.entry-header { margin-bottom: 42px; }
.entry-title { font-size: clamp(2.8rem, 6vw, 5rem); }
.entry-content > * + * { margin-top: 1.2em; }
.entry-content h2 { margin-top: 1.5em; font-size: 2.2rem; }

.woocommerce .woocommerce-breadcrumb { margin: 0 0 28px; color: var(--muted); font-size: .8rem; }
.woocommerce .woocommerce-result-count, .woocommerce .woocommerce-ordering { margin-bottom: 32px; }
.woocommerce ul.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 42px 22px; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none; }
.woocommerce ul.products li.product { float: none !important; width: auto !important; margin: 0 !important; }
.woocommerce ul.products li.product a img { aspect-ratio: 1; object-fit: cover; margin: 0 0 16px; background: #efe8dc; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { padding: 0; color: var(--green); font-family: var(--serif); font-size: 1.32rem; line-height: 1.1; }
.woocommerce ul.products li.product .price { color: var(--green); font-weight: 700; }
.woocommerce div.product { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; }
.woocommerce div.product .woocommerce-product-gallery, .woocommerce div.product .summary { width: auto !important; float: none !important; }
.woocommerce div.product .product_title { font-size: clamp(2.6rem, 5vw, 4.8rem); }
.woocommerce div.product p.price { color: var(--green); font-size: 1.6rem; font-weight: 700; }
.woocommerce div.product form.cart { display: flex; gap: 10px; }
.woocommerce .quantity .qty { min-height: 48px; border: 1px solid var(--line); background: var(--paper); }
.woocommerce-tabs, .related.products { grid-column: 1 / -1; }
.woocommerce-message, .woocommerce-info { border-top-color: var(--green); background: var(--paper); }
.woocommerce-message::before, .woocommerce-info::before { color: var(--green); }
.inventaire-cart-progress { margin: 18px 0; border-left: 3px solid var(--burgundy); background: #f1e7e4; padding: 12px 16px; font-size: .9rem; }

.site-footer { background: #102d27; color: #e8e1d5; padding: 72px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 48px; }
.site-footer h2, .site-footer h3 { color: #fff; }
.site-footer h2 { font-size: 2.3rem; }
.site-footer h3 { font-family: var(--sans); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin: 8px 0; }
.site-footer a { color: inherit; text-decoration: none; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 58px; border-top: 1px solid rgba(255,255,255,.15); padding-top: 22px; color: #bcb5aa; font-size: .76rem; }

@media (max-width: 900px) {
  :root { --wrap: min(100% - 28px, 760px); }
  .header-main { grid-template-columns: 1fr auto; min-height: 82px; }
  .header-search { grid-column: 1 / -1; padding-bottom: 16px; }
  .brand-tagline { display: none; }
  .primary-nav { overflow-x: auto; }
  .primary-nav ul { flex-wrap: nowrap; width: max-content; gap: 24px; }
  .hero-grid, .library-grid, .manifesto-grid { grid-template-columns: 1fr; }
  .hero-visual { min-height: 380px; }
  .door { grid-column: span 6; }
  .door:nth-child(5) { grid-column: span 12; }
  .product-grid, .woocommerce ul.products { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .woocommerce div.product { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .assurance .wrap { justify-content: flex-start; overflow-x: auto; white-space: nowrap; }
  .header-actions .account-label { display: none; }
  .primary-nav a { padding-block: 13px; }
  .hero { padding-top: 54px; }
  .hero-visual { min-height: 310px; }
  .trust-grid { grid-template-columns: 1fr; }
  .trust-item + .trust-item { border-left: 0; border-top: 1px solid var(--line); }
  .doors { grid-template-columns: 1fr; }
  .door, .door:nth-child(4), .door:nth-child(5) { grid-column: 1; min-height: 190px; }
  .section-heading { align-items: start; flex-direction: column; }
  .product-grid, .woocommerce ul.products { gap: 28px 12px; }
  .editorial-links, .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}

