/* =========================================================
   Artiziane — blog : modèle d'article et listes d'articles (codes courts)
   Valeurs reprises de css/style.css de la maquette (article.html, blog.html).
   Déposé dans wp-content/uploads/artiziane/artiziane-blog.css, chargé par le mu-plugin.
   Copie de référence : integration/artiziane-blog.css
   ========================================================= */

.art-main, .art-posts, .art-post--featured {
  --art-serif: "Lora", Georgia, "Times New Roman", serif;
  --art-sans: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --art-burgundy: #5C2A35;
  --art-green: #2E4B31;
  --art-ink: #3A2A2D;
  --art-muted: #7B6B6D;
  --art-line: rgba(92, 42, 53, .14);
}
.art-main *, .art-posts *, .art-post--featured * { box-sizing: border-box; }

/* Les remises à zéro visent les seules zones du modèle (.art-hero, .art-article, .art-head) :
   le bloc Elementor inséré (« Dans la boutique ») garde ses propres styles. */

/* ---------- Gabarit Astra : pleine largeur, sans marges, comme les pages Elementor ---------- */
body.art-single #content > .ast-container { display: block; max-width: none; padding: 0; margin: 0; }
body.art-single #content { padding: 0; }

.art-main { color: var(--art-ink); font: 400 17px/1.65 var(--art-serif); }
body.art-single :is(.art-hero, .art-article, .art-head) :is(p, h1, h2, h3) { margin: 0; }
body.art-single :is(.art-hero, .art-article, .art-head) :is(h1, h2, h3) { font-family: var(--art-serif); font-weight: 600; line-height: 1.12; color: var(--art-burgundy); }
body.art-single :is(.art-article, .art-head) h2 em { font-style: italic; color: #7A3F4B; }
.art-main img { display: block; max-width: 100%; }
body.art-single :is(.art-hero, .art-article, .art-head) a { color: inherit; }
.art-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.art-section { padding: clamp(64px, 9vw, 120px) 0; }
.art-section--top0 { padding-top: 0; }

/* ---------- En-tête d'article ---------- */
.art-hero { padding: clamp(36px, 5vw, 64px) 0 clamp(32px, 4vw, 48px); text-align: center; }
.art-breadcrumb { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 22px; font: 500 12px/1.4 var(--art-sans); color: var(--art-muted); }
body.art-single .art-hero .art-breadcrumb a { color: var(--art-green); text-decoration: none; }
body.art-single .art-hero .art-breadcrumb a:hover { text-decoration: underline; }
body.art-single .art-main .art-eyebrow { margin-bottom: 14px; font: 600 12px/1.4 var(--art-sans); letter-spacing: .28em; text-transform: uppercase; color: var(--art-green); }
body.art-single .art-main .art-h1 { margin-bottom: 18px; font-size: clamp(40px, 5.4vw, 68px); font-style: italic; font-weight: 700; text-wrap: balance; }
body.art-single .art-main .art-h1 em { color: var(--art-green); }
.art-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; font: 500 13px/1.4 var(--art-sans); color: var(--art-muted); }

/* ---------- Texte de l'article (blocs de l'éditeur WordPress) ---------- */
.art-article { max-width: 760px; margin: 0 auto; }
.art-article__cover { margin-bottom: clamp(32px, 5vw, 56px); border-radius: 30px; overflow: hidden; }
/* Hauteur naturelle plafonnée à 788 px (la hauteur de la maquette) : sur mobile, la couverture n'est plus
   une bande étroite qui coupe les personnes */
.art-article__cover img { width: 100%; height: auto; max-height: 788px; object-fit: cover; }
body.art-single .art-content > p { margin: 0 0 22px; font-size: 18px; }
body.art-single .art-content > h2 { margin: 44px 0 16px; font-size: clamp(26px, 3vw, 34px); font-style: italic; }
body.art-single .art-content > ul { margin: 0 0 22px; padding-left: 22px; }
body.art-single .art-content > ul li { margin-bottom: 8px; }
body.art-single .art-content > :is(blockquote, .wp-block-quote) {
  margin: 34px 0; padding: 24px 28px; border: 0; border-radius: 22px; background: #F2DEDD;
  font: italic 500 22px/1.45 var(--art-serif); color: var(--art-burgundy);
}
body.art-single .art-content > :is(blockquote, .wp-block-quote) p { margin: 0; font: inherit; color: inherit; }
body.art-single .art-content > :is(figure, .wp-block-image) { margin: 34px 0; }
/* Hauteur naturelle plafonnée à 800 px (la hauteur de la maquette) : une photo en hauteur est recadrée à 800 px
   comme dans la maquette, une photo horizontale s'affiche en entier au lieu d'être coupée sur les côtés */
body.art-single .art-content > :is(figure, .wp-block-image) img { width: 100%; height: auto; max-height: 800px; object-fit: cover; border-radius: 22px; }
/* Carrousel : bloc Galerie avec la classe « art-carousel » (défilement horizontal, flèches ajoutées par artiziane.js).
   !important : la feuille des blocs WordPress fixe la largeur et la hauteur des images de galerie avec un sélecteur
   très prioritaire (:not(#individual-image)). */
body.art-single .art-content > .wp-block-gallery.art-carousel {
  display: flex; flex-wrap: nowrap; align-items: flex-start; gap: 14px; margin: 34px 0 0; padding: 0 0 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: #D9A6A8 transparent;
}
body.art-single .art-content > .wp-block-gallery.art-carousel > .wp-block-image {
  display: block !important; flex: 0 0 300px !important; width: 300px !important; height: auto !important; margin: 0 !important; scroll-snap-align: start;
}
body.art-single .art-content > .wp-block-gallery.art-carousel > .wp-block-image img {
  width: 100% !important; height: 420px !important; border-radius: 22px; object-fit: cover;
}
body.art-single .art-content > .wp-block-gallery.art-carousel > .wp-block-image figcaption {
  position: static !important; flex: none !important; height: auto !important; max-height: none; overflow: visible; margin: 10px 0 0; padding: 0 4px !important; background: none;
  font: 400 13px/1.5 var(--art-sans); color: var(--art-muted); text-align: left; text-shadow: none;
}
.art-carousel-nav { display: flex; justify-content: flex-end; gap: 8px; margin: 6px 0 34px; }
.art-carousel-nav button {
  display: grid; place-items: center; width: 40px; height: 40px; margin: 0; padding: 0;
  border: 1.5px solid rgba(92, 42, 53, .14); border-radius: 50%; background: transparent; box-shadow: none;
  font: 500 18px/1 var(--art-sans); color: var(--art-burgundy); cursor: pointer; transition: border-color .25s, background .25s;
}
.art-carousel-nav button:hover { border-color: var(--art-burgundy); background: transparent; color: var(--art-burgundy); }
.art-carousel-nav button:disabled { opacity: .35; cursor: default; }
/* Livre d'or : bloc Groupe avec la classe « art-livre-or » contenant des blocs Citation (texte + citation = prénom) */
body.art-single .art-content > .art-livre-or { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin: 34px 0; }
body.art-single .art-content > .art-livre-or > .wp-block-quote {
  margin: 0; padding: 24px 26px; border: 1px solid var(--art-line); border-radius: 22px; background: #FFFCF8; box-shadow: none;
  font: italic 400 18px/1.6 var(--art-serif); color: var(--art-ink);
}
body.art-single .art-content > .art-livre-or > .wp-block-quote::before { content: "“"; display: block; height: 26px; font: 600 52px/1 var(--art-serif); color: #D9A6A8; }
body.art-single .art-content > .art-livre-or > .wp-block-quote p { margin: 0; font: inherit; color: inherit; }
body.art-single .art-content > .art-livre-or > .wp-block-quote cite {
  display: block; margin-top: 14px; font: normal 600 12px/1.4 var(--art-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--art-green);
}
body.art-single .art-content figcaption { margin: 10px 0 0; font: 400 13px/1.5 var(--art-sans); color: var(--art-muted); text-align: center; }
.art-author { display: flex; align-items: center; gap: 16px; margin-top: 44px; padding: 22px; border: 1px solid var(--art-line); border-radius: 22px; background: #FFFCF8; }
.art-author img { flex: none; width: 64px; height: 64px; padding: 8px; border-radius: 50%; background: #F5EFE8; object-fit: contain; }
.art-author strong { display: block; font: italic 600 19px/1.3 var(--art-serif); color: var(--art-burgundy); }
.art-author span { font: 400 14px/1.5 var(--art-sans); color: var(--art-muted); }

/* ---------- « D'autres histoires » : titre de section + bouton ---------- */
.art-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 0 0 clamp(36px, 5vw, 56px); }
body.art-single .art-head h2 { font-size: clamp(32px, 4.2vw, 52px); }
body.art-single .art-main .art-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px;
  border: 1.5px solid var(--art-burgundy); border-radius: 999px; background: transparent;
  font: 600 11px/1 var(--art-sans); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
  color: var(--art-burgundy); text-decoration: none; transition: background .25s, color .25s;
}
body.art-single .art-main .art-btn:hover { background: var(--art-burgundy); color: #F5EFE8; }

/* ---------- Cartes d'articles ---------- */
.art-posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2.5vw, 32px); }
.art-post > a, .art-post > a:hover { display: block; color: inherit; text-decoration: none; }
/* Hauteur fixe : reproduit la maquette (image 800 × 560) */
.art-post > a > img { display: block; width: 100%; max-width: 100%; height: 560px; margin-bottom: 18px; border-radius: 22px; object-fit: cover; transition: transform .5s; }
.art-post > a:hover > img { transform: translateY(-4px); }
.art-post > a .art-post__meta { font: 600 11px/1 var(--art-sans); letter-spacing: .16em; text-transform: uppercase; color: var(--art-green); }
.art-post > a h3 { margin: 10px 0 8px; font: 600 23px/1.12 var(--art-serif); color: var(--art-burgundy); }
.art-post > a p { margin: 0; font: 400 16px/1.65 var(--art-serif); color: var(--art-muted); }
/* Filtres du blog (artiziane.js) : carte masquée = sans « card-show » */
.art-post.card-hide { display: none; }
.art-post.card-show { display: block; }

/* Article à la une */
/* « :hover » répété : sinon « .art-post > a:hover { display: block } » casse la grille au survol (photo en pleine largeur) */
.art-post--featured > a, .art-post--featured > a:hover { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
/* Hauteur fixe : reproduit la maquette (image 1200 × 900) */
.art-post--featured > a > img { height: 900px; margin-bottom: 0; }
/* Pas de mouvement de la photo au survol pour l'article à la une */
.art-post--featured > a:hover > img { transform: none; }
.art-post--featured > a h3 { font-size: clamp(28px, 3vw, 40px); }
.art-post--featured > a p { margin-bottom: 20px; font-size: 17px; }
.art-post > a .art-link { padding-bottom: 3px; border-bottom: 1.5px solid #D9A6A8; font: 600 12px/1.4 var(--art-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--art-burgundy); }

@media (max-width: 900px) {
  .art-posts { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
  .art-post--featured > a, .art-post--featured > a:hover { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .art-main { font-size: 16px; }
  body.art-single .art-content > p { font-size: 17px; }
  .art-head { flex-direction: column; align-items: flex-start; }
  body.art-single .art-content > .art-livre-or { grid-template-columns: 1fr; }
  body.art-single .art-content > .wp-block-gallery.art-carousel > .wp-block-image { flex-basis: 78% !important; width: 78% !important; }
  body.art-single .art-content > .wp-block-gallery.art-carousel > .wp-block-image img { height: 380px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .art-post > a > img, body.art-single .art-main .art-btn { transition: none; }
}


/* Deux photos côte à côte (galerie 2 colonnes, classe art-duo) : format 4:5, légende sous la photo comme les autres figures */
body.art-single .art-content .wp-block-gallery.art-duo { gap: 16px !important; align-items: flex-start; }
body.art-single .art-content .wp-block-gallery.art-duo > .wp-block-image { display: block !important; }
body.art-single .art-content .wp-block-gallery.art-duo > .wp-block-image img { aspect-ratio: 4 / 5; height: auto !important; object-fit: cover; border-radius: 14px; }
body.art-single .art-content .wp-block-gallery.art-duo > .wp-block-image figcaption {
  position: static !important; background: none !important; max-height: none !important; overflow: visible !important;
  padding: 0 !important; margin-top: 10px !important;
  font: 400 13px/1.5 "Poppins", system-ui, sans-serif !important; color: #7B6B6D !important; text-align: center !important; text-shadow: none !important;
}
body.art-single .art-content .wp-block-gallery.art-duo > .wp-block-image figcaption::before { display: none !important; }
/* Variante « art-duo-entier » : photos entières, largeur proportionnelle au format (--art-ratio posé par artiziane.js) */
body.art-single .art-content .wp-block-gallery.art-duo-entier { flex-wrap: nowrap !important; }
body.art-single .art-content .wp-block-gallery.art-duo-entier > .wp-block-image { flex: var(--art-ratio, 1) 1 0 !important; width: auto !important; min-width: 0; }
body.art-single .art-content .wp-block-gallery.art-duo-entier > .wp-block-image img { aspect-ratio: auto !important; width: 100% !important; height: auto !important; object-fit: contain !important; }
/* Liens dans le texte des articles : bordeaux souligné, comme sur les pages légales */
body.art-single .art-content p a,
body.art-single .art-content li a {
  color: #5C2A35;
  text-decoration: underline;
  text-underline-offset: 3px;
}
body.art-single .art-content p a:hover,
body.art-single .art-content li a:hover {
  color: #7A3F4B;
}
