/*
Theme Name: L'Artisane – Le Journal
Theme URI: https://www.lartisane-loc.fr
Author: L'Artisane
Description: Thème WordPress du blog de L'Artisane, reprenant à l'identique la charte du site principal (lartisane-loc.fr) : couleurs, polices, logo, navigation et pied de page.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lartisane-journal
Tags: blog, one-column, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* =========================================================================
   1. VARIABLES — toutes les valeurs ont été relevées sur lartisane-loc.fr
   (styles calculés dans le navigateur, sept. 2026). Rien n'est inventé.
   ========================================================================= */
:root {
  /* Couleurs */
  --la-brand:        #9a5234;                     /* rgb(154,82,52)  : couleur principale (header, texte, titres, boutons) */
  --la-cream:        #f1ded0;                     /* rgb(241,222,208): fond des pages et du pied de page                 */
  --la-nav:          rgba(241, 222, 208, 0.94);   /* couleur des liens du menu (et du soulignement de l'onglet actif)     */
  --la-accent:       #db8661;                     /* rgb(219,134,97) : couleur d'accent des sections du site              */
  --la-sage:         #a2a183;                     /* rgb(162,161,131): vert-de-gris utilisé sur les bandeaux de titre     */
  --la-white:        #ffffff;
  --la-header-bg:    var(--la-brand);             /* le site : rgba(154,82,52,.68) posé sur la section du dessous ; ici, fond uni de la couleur de marque */
  --la-rule:         rgba(154, 82, 52, 0.22);     /* filets discrets (dérivé de la couleur principale)                    */

  /* Typographie (Google Fonts, comme sur le site) */
  --la-font-heading: "Marcellus", Georgia, "Times New Roman", serif;
  --la-font-body:    "PT Serif", Georgia, "Times New Roman", serif;

  /* Dimensions relevées */
  --la-container:    1162px;    /* largeur intérieure du header et du footer */
  --la-logo-h:       185px;     /* hauteur du logo dans le header             */
  --la-nav-gap:      11.52px;   /* marge horizontale de chaque entrée du menu */
}

/* =========================================================================
   2. BASE
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--la-cream);
  color: var(--la-brand);
  font-family: var(--la-font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3.2px; }
a:hover, a:focus { opacity: .8; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--la-font-heading);
  font-weight: 400;
  color: var(--la-brand);
  line-height: 1.06;
  margin: 0 0 .6em;
}
h1 { font-size: clamp(2.4rem, 1.6rem + 2.4vw, 3.88rem); }   /* 62px relevés à 1568px de large */
h2 { font-size: clamp(1.9rem, 1.3rem + 1.6vw, 2.73rem); }   /* 43.6px */
h3 { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.1rem); }
h4 { font-size: clamp(1.3rem, 1rem + .7vw, 1.576rem); line-height: 1.17; }  /* 25.2px */
h5, h6 { font-size: 1.1rem; }

p, ul, ol, blockquote, table, pre, figure { margin: 0 0 1.25em; }
blockquote { padding-left: 1.25em; border-left: 2px solid var(--la-brand); font-style: italic; }
hr { border: 0; border-top: 1px solid var(--la-rule); margin: 2em 0; }
code, pre { font-family: Menlo, Consolas, monospace; font-size: .95em; }
pre { padding: 1em; background: rgba(154,82,52,.08); overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .5em .75em; border-bottom: 1px solid var(--la-rule); text-align: left; }

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); border: 0; white-space: nowrap;
}
.screen-reader-text:focus {
  clip: auto; clip-path: none; width: auto; height: auto; margin: 0; padding: .75em 1em;
  background: var(--la-cream); color: var(--la-brand); z-index: 100000; left: 8px; top: 8px; text-decoration: none;
}
.skip-link { display: block; }

/* Boutons — relevés sur les boutons du site */
.la-button, button, input[type="submit"], .wp-block-button__link {
  display: inline-block;
  font-family: var(--la-font-body);
  font-size: 16px;
  letter-spacing: 1.6px;
  color: var(--la-white);
  background: var(--la-brand);
  border: 1px solid var(--la-white);
  border-radius: 6.4px;
  padding: 16px 20.8px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: opacity .2s;
}
.la-button:hover, button:hover, input[type="submit"]:hover { opacity: .85; color: var(--la-white); }

/* Champs de formulaire */
input[type="text"], input[type="email"], input[type="url"], input[type="search"], textarea {
  width: 100%;
  font: inherit;
  color: var(--la-brand);
  background: transparent;
  border: 1px solid var(--la-brand);
  border-radius: 0;
  padding: .75em 1em;
}
input::placeholder, textarea::placeholder { color: var(--la-brand); opacity: .6; }
input:focus, textarea:focus { outline: 2px solid var(--la-brand); outline-offset: 2px; }

/* =========================================================================
   3. CONTENEUR
   ========================================================================= */
.la-container {
  width: 100%;
  max-width: var(--la-container);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* =========================================================================
   4. HEADER — logo centré au-dessus, menu centré en dessous (comme le site)
   Le header est en flux normal et empilé verticalement : il ne peut pas
   casser, quelle que soit la longueur du titre ou l'absence de logo.
   ========================================================================= */
.site-header {
  background: var(--la-header-bg);
  color: var(--la-nav);
  position: relative;
  z-index: 50;
}
.site-header .header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 25.6px;      /* relevé : position du logo dans le header de 324px */
  padding-bottom: 26px;
}

/* Logo / titre */
.header-branding {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  margin: 0;
  text-align: center;
}
.header-branding a { text-decoration: none; opacity: 1; display: inline-block; max-width: 100%; }
.header-branding img,
.header-branding .custom-logo {
  display: block;
  height: auto;
  width: auto;
  max-height: var(--la-logo-h);
  max-width: min(100%, 320px);   /* largeur bornée : un logo large ne déborde jamais */
  object-fit: contain;
  margin: 0 auto;
}
/* Repli : pas de logo → titre du site en Marcellus, à la ligne si besoin */
.header-title-text {
  font-family: var(--la-font-heading);
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem);
  line-height: 1.15;
  color: var(--la-nav);
  margin: 0;
  max-width: min(100%, 640px);
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}
.header-title-text a { color: inherit; }
.header-tagline {
  display: block;
  font-family: var(--la-font-body);
  font-size: .78rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  margin-top: .5em;
  color: var(--la-nav);
  max-width: min(100%, 640px);
  overflow-wrap: anywhere;
}
.header-branding--text { flex-direction: column; align-items: center; }

/* Menu */
.header-nav {
  width: 100%;
  max-width: 581px;         /* relevé : bloc de navigation limité à 50 % du header → le menu passe sur 2 lignes comme sur le site */
  margin-top: 33px;         /* relevé : espace logo → menu */
}
.header-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  row-gap: 8px;
}
.header-nav-item {
  position: relative;
  margin: 0 var(--la-nav-gap);
  font-size: 16px;
  line-height: 1.3;
}
.header-nav-item > a {
  display: inline-block;
  color: var(--la-nav);
  text-decoration: none;
  padding: 1.6px 0;
  opacity: 1;
  /* soulignement 1px (même mécanisme que le site : dégradé positionné en bas) */
  background-image: linear-gradient(var(--la-nav), var(--la-nav));
  background-size: 0 1px;
  background-repeat: no-repeat;
  background-position: 0 calc(100% - 1.6px);
  transition: background-size .2s;
}
.header-nav-item > a:hover,
.header-nav-item > a:focus,
.header-nav-item--active > a,
.header-nav-item.current-menu-item > a,
.header-nav-item.current-menu-ancestor > a,
.header-nav-item.current_page_parent > a,
.header-nav-item.current-menu-parent > a {
  background-size: 100% 1px;
}
.header-nav-item--folder > a::after,
.header-nav-item.menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  margin-left: 12px;
  margin-bottom: 3px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  vertical-align: middle;
}
/* Sous-menu (dossier) */
.header-nav-folder-content, .header-nav-item .sub-menu {
  list-style: none;
  margin: 0;
  padding: 8px 16px;                      /* relevé */
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 190px;
  background: var(--la-header-bg);
  display: none;
  z-index: 60;
  text-align: left;
}
.header-nav-item:hover > .header-nav-folder-content,
.header-nav-item:focus-within > .header-nav-folder-content,
.header-nav-item:hover > .sub-menu,
.header-nav-item:focus-within > .sub-menu { display: block; }
.header-nav-folder-content li, .header-nav-item .sub-menu li { margin: 0; padding: 4px 0; white-space: nowrap; }
.header-nav-folder-content a, .header-nav-item .sub-menu a { color: var(--la-nav); text-decoration: none; opacity: 1; }
.header-nav-folder-content a:hover, .header-nav-item .sub-menu a:hover { text-decoration: underline; }

/* Burger (mobile) */
.header-burger {
  display: none;
  background: none;
  border: 0;
  border-radius: 0;
  padding: 8px;
  margin-top: 20px;
  cursor: pointer;
  letter-spacing: 0;
  color: var(--la-nav);
}
.header-burger .burger-line { display: block; width: 26px; height: 1px; background: var(--la-nav); margin: 7px 0; }
.header-burger .burger-label { display: none; }

/* =========================================================================
   5. CONTENU
   ========================================================================= */
.site-content { padding: 64px 0 80px; }
.la-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 64px; align-items: start; }
.la-layout--full { grid-template-columns: minmax(0, 1fr); }
.la-layout--full .site-main { max-width: 780px; margin: 0 auto; }

.page-header { margin-bottom: 40px; }
.page-header .page-title { margin-bottom: .3em; }
.page-header .archive-description { font-size: 1.1em; }

/* Liste d'articles */
.post-list { display: flex; flex-direction: column; }
.post-card {
  padding: 0 0 48px;
  margin: 0 0 48px;
  border-bottom: 1px solid var(--la-rule);
}
.post-card:last-child { border-bottom: 0; }
.post-card .post-thumbnail { margin: 0 0 24px; }
.post-card .post-thumbnail img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.entry-meta {
  font-size: .85rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: .75em;
}
.entry-meta a { text-decoration: none; }
.entry-meta a:hover { text-decoration: underline; }
.entry-meta .sep { margin: 0 .5em; opacity: .5; }
.post-card .entry-title { margin-bottom: .4em; }
.post-card .entry-title a { text-decoration: none; }
.post-card .entry-title a:hover { text-decoration: underline; }
.entry-summary p:last-child { margin-bottom: 0; }
.read-more { margin-top: 24px; }

/* Article seul / page */
.entry-header { margin-bottom: 32px; }
.entry-header .entry-title { margin-bottom: .35em; }
.single .post-thumbnail, .page .post-thumbnail { margin: 0 0 32px; }
.entry-content { font-size: 1.0625rem; line-height: 1.65; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2, .entry-content h3 { margin-top: 1.6em; }
.entry-content img { margin: 0 auto; }
.entry-content .alignleft { float: left; margin: .3em 1.5em 1em 0; }
.entry-content .alignright { float: right; margin: .3em 0 1em 1.5em; }
.entry-content .aligncenter { margin-left: auto; margin-right: auto; }
.entry-content .alignwide, .entry-content .alignfull { max-width: 100%; }
.wp-caption, figure { max-width: 100%; }
.wp-caption-text, figcaption { font-size: .9em; opacity: .8; margin-top: .5em; }
.entry-footer { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--la-rule); font-size: .95rem; }
.entry-footer .tags-links a, .entry-footer .cat-links a { margin-right: .5em; }

.page-links { margin: 2em 0; }

/* Navigation entre articles */
.post-navigation { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--la-rule); }
.post-navigation .nav-links { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.post-navigation .nav-previous, .post-navigation .nav-next { flex: 1 1 45%; max-width: 48%; }
.post-navigation .nav-next { text-align: right; }
.post-navigation .nav-subtitle { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; opacity: .75; margin-bottom: .3em; }
.post-navigation a { text-decoration: none; font-family: var(--la-font-heading); font-size: 1.2rem; }
.post-navigation a:hover { text-decoration: underline; }

/* Pagination */
.pagination, .navigation.pagination { margin-top: 16px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pagination .page-numbers {
  display: inline-block; min-width: 2.6em; text-align: center;
  padding: .55em .8em; border: 1px solid var(--la-brand); border-radius: 6.4px; text-decoration: none;
}
.pagination .page-numbers.current { background: var(--la-brand); color: var(--la-white); }
.pagination .page-numbers.dots { border: 0; }

/* Sidebar */
.widget-area .widget { margin-bottom: 40px; }
.widget-area .widget-title, .widget-area .wp-block-heading { font-size: 1.35rem; margin-bottom: .8em; }
.widget-area ul { list-style: none; padding: 0; margin: 0; }
.widget-area li { padding: .45em 0; border-bottom: 1px solid var(--la-rule); }
.widget-area li:last-child { border-bottom: 0; }
.widget-area a { text-decoration: none; }
.widget-area a:hover { text-decoration: underline; }
.widget-area .wp-block-latest-posts__post-date, .widget-area .post-date { display: block; font-size: .85em; opacity: .75; }

/* Formulaire de recherche — cadre fin avec loupe à gauche, comme le bloc "Rechercher" du site */
.search-form {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid var(--la-brand);
  padding: 0 14px;
  max-width: 100%;
}
.search-form .search-icon { flex: 0 0 auto; width: 18px; height: 18px; margin-right: 10px; fill: none; stroke: var(--la-brand); stroke-width: 1.8; }
.search-form .search-field { border: 0; padding: 14px 0; background: transparent; min-width: 0; }
.search-form .search-field:focus { outline: none; }
.search-form .search-submit {   /* le site n'affiche qu'un champ + loupe : le bouton reste accessible (Entrée / lecteurs d'écran) mais est masqué */
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); border: 0;
}

/* Aucun résultat / 404 */
.no-results .search-form, .error-404 .search-form { max-width: 480px; margin-top: 24px; }

/* Commentaires */
.comments-area { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--la-rule); }
.comments-title, .comment-reply-title { font-size: 1.6rem; }
.comment-list, .comment-list .children { list-style: none; margin: 0; padding: 0; }
.comment-list .children { margin-left: 32px; }
.comment-body { padding: 24px 0; border-bottom: 1px solid var(--la-rule); }
.comment-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-size: .9rem; }
.comment-meta .fn { display: block; font-size: 1rem; }
.comment-meta .fn a { text-decoration: none; }
.comment-meta .avatar { border-radius: 50%; }
.comment-metadata { opacity: .8; }
.comment-metadata a { text-decoration: none; }
.comment-content p:last-child { margin-bottom: 0; }
.reply { margin-top: 12px; font-size: .9rem; }
.comment-respond { margin-top: 40px; }
.comment-form label { display: block; margin-bottom: .4em; }
.comment-form p { margin-bottom: 1.2em; }
.comment-form .comment-form-cookies-consent { display: flex; align-items: flex-start; gap: .6em; }
.comment-form .comment-form-cookies-consent input { margin-top: .35em; }
.comment-form .comment-form-cookies-consent label { display: inline; }
.comment-form textarea { min-height: 160px; }
.comment-notes, .logged-in-as { font-size: .9rem; opacity: .85; }
.bypostauthor > .comment-body .fn::after { content: " · auteur"; font-size: .85em; opacity: .7; }
.comment-awaiting-moderation { font-style: italic; font-size: .9rem; }

/* =========================================================================
   6. FOOTER — 4 colonnes, fond champagne, comme le site
   ========================================================================= */
.site-footer {
  background: var(--la-cream);
  color: var(--la-brand);
  padding: 56px 0 72px;
  border-top: 1px solid var(--la-rule);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1.1fr;
  gap: 40px 32px;
  align-items: start;
}
.footer-col h4 { font-size: clamp(1.3rem, 1rem + .7vw, 1.576rem); margin: 0 0 1.4em; }
.footer-col p { margin: 0 0 .9em; line-height: 1.5; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: 0 0 .9em; }
.footer-col a { text-decoration: underline; }
.footer-col strong { font-weight: 700; overflow-wrap: anywhere; }

.footer-brand { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 36px; }
.footer-logo img, .footer-logo .custom-logo { width: min(100%, 360px); max-height: 120px; object-fit: contain; height: auto; }
.footer-logo a { display: inline-block; text-decoration: none; opacity: 1; }
.footer-logo-text { font-family: var(--la-font-heading); font-size: 1.8rem; line-height: 1.1; overflow-wrap: anywhere; max-width: 100%; }

.footer-social { display: flex; justify-content: center; align-items: center; gap: 22px; list-style: none; margin: 0; padding: 0; }
.footer-social a { display: block; opacity: 1; }
.footer-social img { width: 38px; height: 38px; object-fit: contain; }   /* relevé : 38px */
.footer-social a:hover { opacity: .8; }

.footer-badges { display: flex; justify-content: center; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-badges a { display: block; opacity: 1; }
.footer-badges a:hover { opacity: .85; }
.footer-badge--soeur img { width: 150px; height: 150px; object-fit: contain; }
.footer-badge--mariages img { width: 200px; height: auto; }

/* =========================================================================
   7. RESPONSIVE
   ========================================================================= */
@media (max-width: 1024px) {
  .la-layout { gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .site-header .header-inner { padding-top: 20px; padding-bottom: 20px; }
  .header-branding img, .header-branding .custom-logo { max-height: 120px; }
  .header-burger { display: block; }
  .header-nav {
    display: none;
    max-width: 100%;
    margin-top: 16px;
  }
  .header-nav.is-open { display: block; }
  .header-nav-list { flex-direction: column; align-items: center; row-gap: 14px; padding: 8px 0 16px; }
  .header-nav-item { margin: 0; font-size: 18px; text-align: center; }
  .header-nav-folder-content, .header-nav-item .sub-menu {
    position: static; transform: none; display: block; min-width: 0;
    padding: 8px 0 0; text-align: center; background: transparent;
  }
  .header-nav-folder-content li, .header-nav-item .sub-menu li { white-space: normal; font-size: 16px; opacity: .9; }
  .la-layout { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .site-content { padding: 40px 0 56px; }
}

@media (max-width: 600px) {
  .la-container { padding-left: 16px; padding-right: 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-col { text-align: center; }
  .footer-badges { gap: 24px; }
  .post-navigation .nav-previous, .post-navigation .nav-next { flex-basis: 100%; max-width: 100%; text-align: left; }
  .comment-list .children { margin-left: 16px; }
}

@media print {
  .site-header, .site-footer, .widget-area, .comments-area, .post-navigation { display: none; }
  body { background: #fff; color: #000; }
}
