/*
Theme Name: Calamu
Theme URI: https://calamu-editions.com
Author: Maison d'Édition Calamu
Description: Thème éditorial de la Maison d'Édition Calamu : articles de droit, fiscalité et économie, catalogue de livres.
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: calamu
*/

:root {
  --ink: #0F1B1D;
  --teal: #116B7D;
  --teal-dark: #0B4F5C;
  --teal-light: #7FC3CF;
  --mist: #F2F7F8;
  --tag: #E3F0F2;
  --line: #D5E1E3;
  --muted: #4A5A5D;
  --body: #34464A;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1280px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: #fff; font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); }
a:hover { color: var(--teal-dark); }
:focus-visible { outline: 3px solid var(--teal-light); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.15; margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 26px; border-radius: 26px; font-weight: 600; font-size: 16px; text-decoration: none; border: 1px solid transparent; cursor: pointer; font-family: var(--sans); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; color: #fff; }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover { background: var(--teal-dark); color: #fff; }
.btn-white { background: #fff; color: var(--teal-dark); }
.btn-white:hover { background: var(--mist); color: var(--teal-dark); }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost-light { border-color: rgba(255,255,255,.7); color: #fff; }
.btn-ghost-light:hover { color: #fff; background: rgba(255,255,255,.1); }

/* En-tête */
.site-header { border-bottom: 1px solid var(--line); background: #fff; position: relative; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 16px; padding-bottom: 16px; }
.site-logo img { height: 84px; width: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; flex-wrap: wrap; }
.main-nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; }
.main-nav a:hover, .main-nav .current-menu-item > a { color: var(--teal); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.header-actions .btn { min-height: 44px; font-size: 15px; padding: 0 20px; }
.menu-toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; color: inherit; cursor: pointer; align-items: center; justify-content: center; }

.site-header.is-hero { background: transparent; border: 0; position: absolute; left: 0; right: 0; top: 0; color: #fff; }
.site-header.is-hero .main-nav a { color: #fff; }
.site-header.is-hero .site-logo { visibility: hidden; }

/* Hero */
.hero { color: #fff; background-image: linear-gradient(rgba(8,40,47,.82), rgba(8,40,47,.82)), url(assets/biblio.jpg); background-size: cover; background-position: center; padding: 150px 0 110px; text-align: center; }
.hero img.hero-logo { width: 620px; margin: 0 auto; }
.hero p { font-family: var(--serif); font-style: italic; font-size: 30px; line-height: 1.35; max-width: 760px; margin: 28px auto 32px; color: #E4F1F3; }
.hero .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.band { background: var(--teal); color: #fff; text-align: center; padding: 20px 24px; font-family: var(--serif); font-style: italic; font-size: 28px; display: flex; flex-wrap: wrap; gap: 14px 32px; justify-content: center; }
.band span.sep { color: var(--teal-light); font-style: normal; }

/* Sections */
.section { padding: 88px 0; }
.section-head { display: flex; align-items: baseline; gap: 20px; margin-bottom: 40px; }
.section-head h2 { font-size: 46px; }
.section-head .rule { flex: 1; height: 2px; background: var(--ink); }
.kicker { font-size: 14px; font-weight: 600; color: var(--teal); }
.tag { display: inline-block; padding: 5px 12px; border-radius: 4px; background: var(--tag); color: var(--teal-dark); font-size: 13px; font-weight: 600; text-decoration: none; }
.meta { font-size: 14px; color: var(--muted); }
.meta strong { color: var(--ink); }

/* À la une */
.une { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; }
.une-main { display: flex; flex-direction: column; gap: 18px; }
.une-main .thumb { display: block; border-radius: 6px; overflow: hidden; aspect-ratio: 16 / 10; background: var(--mist); }
.une-main .thumb img { width: 100%; height: 100%; object-fit: cover; }
.une-main h3 { font-size: 40px; line-height: 1.1; }
.une-main h3 a, .une-list h3 a, .post-card h3 a { color: var(--ink); text-decoration: none; }
.une-main h3 a:hover, .une-list h3 a:hover, .post-card h3 a:hover { color: var(--teal); }
.une-main p { margin: 0; font-size: 18px; color: var(--body); }
.une-list article { display: flex; flex-direction: column; gap: 8px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.une-list article:first-child { padding-top: 0; }
.une-list h3 { font-size: 26px; line-height: 1.2; }
.une-list .btn { margin-top: 28px; }

/* Rubriques */
.rubriques { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.rubrique { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; min-height: 180px; padding: 28px; border-radius: 6px; color: #fff; text-decoration: none; transition: transform .2s; }
.rubrique:hover { color: #fff; transform: translateY(-3px); }
.rubrique strong { font-family: var(--serif); font-size: 30px; line-height: 1.1; display: block; }
.rubrique span { font-size: 14px; color: rgba(255,255,255,.85); }
.rubrique:nth-child(4n+1) { background: var(--teal); }
.rubrique:nth-child(4n+2) { background: var(--ink); }
.rubrique:nth-child(4n+3) { background: #7A3B2E; }
.rubrique:nth-child(4n+4) { background: #2E4A3B; }

/* Catalogue */
.catalogue { background: var(--ink); color: #fff; }
.catalogue h2 { font-size: 52px; margin: 10px 0 14px; }
.catalogue .intro { color: #C9D6D8; font-size: 17px; margin: 0; max-width: 620px; }
.catalogue .kicker { color: var(--teal-light); }
.catalogue .head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 56px; }
.catalogue .head a { color: #9FD3DC; font-weight: 600; }
.books { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px; }
.book { display: flex; flex-direction: column; gap: 16px; }
.book .cover { display: block; aspect-ratio: 2 / 3; border-radius: 2px 8px 8px 2px; overflow: hidden; box-shadow: inset 8px 0 0 rgba(0,0,0,.22), 0 24px 48px rgba(0,0,0,.45); background: var(--teal); }
.book:nth-child(odd) .cover { transform: rotate(-1.5deg); }
.book:nth-child(even) .cover { transform: rotate(1.5deg); }
.book .cover img { width: 100%; height: 100%; object-fit: cover; }
.book .title { font-weight: 600; color: #fff; text-decoration: none; }
.book .price { font-size: 14px; color: #C9D6D8; }
.book .btn { min-height: 44px; font-size: 14px; }
.empty-light { color: #C9D6D8; font-size: 17px; }

/* Publier */
.publier { display: grid; grid-template-columns: 1fr 1fr; background: var(--mist); }
.publier img { width: 100%; height: 100%; min-height: 520px; object-fit: cover; }
.publier .text { padding: 88px 64px; display: flex; flex-direction: column; gap: 22px; justify-content: center; max-width: 640px; }
.publier h2 { font-size: 50px; line-height: 1.05; }
.publier p { margin: 0; font-size: 18px; color: var(--body); }
.publier .actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Pied de page */
.site-footer { background: var(--teal-dark); color: #D4E8EC; font-size: 14px; }
.site-footer .cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 40px; padding-top: 72px; padding-bottom: 32px; }
.site-footer .col { display: flex; flex-direction: column; gap: 10px; }
.site-footer .col strong { color: #fff; font-size: 15px; }
.site-footer a { color: #fff; }
.site-footer .footer-logo { width: 240px; }
.site-footer .bottom { border-top: 1px solid rgba(255,255,255,.2); padding-top: 20px; padding-bottom: 32px; font-size: 13px; }

/* Listes d'articles */
.page-head { padding: 64px 0 32px; }
.page-head h1 { font-size: 52px; }
.page-head p { color: var(--body); font-size: 18px; margin: 12px 0 0; }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; border-top: 2px solid var(--ink); }
.post-card { padding: 28px 0 32px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.post-card .thumb { display: block; border-radius: 4px; overflow: hidden; aspect-ratio: 16 / 10; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card h3 { font-size: 24px; line-height: 1.25; }
.post-card p { margin: 0; color: var(--muted); font-size: 15px; }
.pagination { padding: 48px 0 88px; display: flex; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 22px; padding: 0 14px; text-decoration: none; color: var(--ink); }
.pagination .current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Article */
.article { padding: 56px 0 88px; }
.article-head { max-width: 820px; display: flex; flex-direction: column; gap: 20px; }
.article-head h1 { font-size: 52px; line-height: 1.08; }
.article-head .chapo { font-size: 21px; color: var(--body); margin: 0; }
.byline { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.byline .who { display: flex; align-items: center; gap: 14px; }
.byline .avatar { width: 48px; height: 48px; border-radius: 24px; background: var(--tag); color: var(--teal); display: flex; align-items: center; justify-content: center; font-weight: 600; overflow: hidden; }
.share { display: flex; align-items: center; gap: 8px; }
.share a, .share button { width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--line); background: #fff; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); text-decoration: none; font-weight: 700; cursor: pointer; font-family: var(--sans); }
.share a:hover, .share button:hover { border-color: var(--teal); color: var(--teal); }
.article-body { display: grid; grid-template-columns: minmax(0, 720px) 320px; gap: 64px; justify-content: space-between; margin-top: 40px; }
.article-feature { margin-top: 32px; border-radius: 6px; overflow: hidden; }
.entry-content { font-family: var(--serif); font-size: 20px; line-height: 1.75; color: #1C2B2E; }
.entry-content > * + * { margin-top: 1.1em; }
.entry-content p { margin-bottom: 0; }
.entry-content h2 { font-size: 30px; margin-top: 1.6em; }
.entry-content h3 { font-size: 24px; margin-top: 1.4em; }
.entry-content blockquote { margin: 1.4em 0; padding: 4px 0 4px 28px; border-left: 3px solid var(--teal); font-style: italic; font-size: 25px; line-height: 1.4; color: var(--teal); }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content img { border-radius: 4px; }
.entry-content a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.sidebar { display: flex; flex-direction: column; gap: 32px; }
.side-box { border: 1px solid var(--line); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.side-list h4 { font-family: var(--sans); font-size: 14px; font-weight: 600; color: var(--muted); padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.side-list a { display: block; padding: 16px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-family: var(--serif); font-weight: 600; font-size: 18px; line-height: 1.3; }
.side-list a:hover { color: var(--teal); }

/* Pages simples */
.page-content { max-width: 760px; padding-bottom: 88px; }

/* WooCommerce, réglages de base */
.woocommerce .button, .woocommerce button.button, .woocommerce a.button { background: var(--teal) !important; color: #fff !important; border-radius: 24px !important; padding: 12px 22px !important; }
.woocommerce-page .wrap-shop { padding: 48px 32px 88px; }

/* Responsive */
@media (max-width: 1024px) {
  .une, .publier { grid-template-columns: 1fr; }
  .rubriques, .books { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-body { grid-template-columns: 1fr; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 20px; }
  .menu-toggle { display: inline-flex; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 16px 20px 24px; }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 4px; }
  .main-nav a, .site-header.is-hero .main-nav a { color: var(--ink); display: block; padding: 12px 0; font-size: 17px; }
  .header-actions .btn { display: none; }
  .site-logo img { height: 60px; }
  .hero { padding: 110px 0 72px; }
  .hero p { font-size: 22px; }
  .band { font-size: 20px; gap: 8px 16px; }
  .section { padding: 56px 0; }
  .section-head h2, .catalogue h2 { font-size: 34px; }
  .une-main h3, .page-head h1, .article-head h1 { font-size: 32px; }
  .une-list h3 { font-size: 21px; }
  .rubriques, .post-grid { grid-template-columns: 1fr; }
  .books { gap: 28px; }
  .publier .text { padding: 48px 20px; }
  .publier h2 { font-size: 34px; }
  .publier img { min-height: 300px; }
  .entry-content { font-size: 18px; }
  .site-footer .cols { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
