/*
Theme Name: La Main Tendue – Blog
Theme URI: https://www.lmt-services.fr/
Author: La Main Tendue
Description: Thème du blog La Main Tendue, fidèle à la charte graphique du site principal (lmt-services.fr) : mêmes couleurs, même logo, même navigation, même footer.
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: lmt-blog
*/

/* ==========================================================================
   Charte — couleurs prélevées sur les captures du site principal
   ========================================================================== */
:root {
  --lmt-bg: #f9fafc;            /* fond du header (prélevé) */
  --lmt-white: #ffffff;
  --lmt-navy: #122348;          /* texte de navigation (prélevé) */
  --lmt-violet: #3b3069;        /* "La Main Tendue" / titres (prélevé) */
  --lmt-purple: #a38cf1;        /* violet du logo (prélevé) */
  --lmt-gray-footer: #b4b5c0;   /* texte du footer (prélevé) */
  --lmt-text: #45455f;          /* texte courant, dérivé sobre de la charte */
  --lmt-border: #ececf3;
  --lmt-shadow: 0 12px 30px rgba(18, 35, 72, 0.08);
  --lmt-radius: 16px;
  --lmt-font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ==========================================================================
   Base
   ========================================================================== */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--lmt-font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--lmt-text);
  background: var(--lmt-white);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--lmt-violet); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--lmt-purple); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--lmt-font);
  color: var(--lmt-navy);
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 .6em;
}

.lmt-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Header — fidèle à la capture : fond très clair, nav navy, CTA pilule blanche
   ========================================================================== */
.site-header {
  background: var(--lmt-bg);
  padding: 18px 0;
}

.site-header .lmt-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.site-branding a { display: inline-flex; align-items: center; }
.site-branding img.lmt-logo { height: 96px; width: auto; }

.main-navigation { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; }

.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.main-navigation a {
  color: var(--lmt-navy);
  font-weight: 600;
  font-size: 17px;
}
.main-navigation a:hover { color: var(--lmt-purple); }

/* Onglet actif (Le Journal) : couleur violette du logo */
.main-navigation li.current-menu-item > a,
.main-navigation li.current_page_item > a,
.main-navigation li.lmt-active > a {
  color: var(--lmt-purple);
}

/* CTA "Rejoignez-nous" : pilule blanche avec ombre douce, comme sur le site */
.main-navigation li.lmt-cta > a,
.main-navigation li.menu-item-cta > a {
  display: inline-block;
  background: var(--lmt-white);
  color: var(--lmt-navy);
  padding: 18px 34px;
  border-radius: var(--lmt-radius);
  box-shadow: var(--lmt-shadow);
}
.main-navigation li.lmt-cta > a:hover,
.main-navigation li.menu-item-cta > a:hover {
  color: var(--lmt-purple);
}

/* Menu mobile */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--lmt-border);
  border-radius: 10px;
  padding: 8px 14px;
  font-family: var(--lmt-font);
  font-weight: 600;
  color: var(--lmt-navy);
  cursor: pointer;
}

@media (max-width: 980px) {
  .menu-toggle { display: inline-block; }
  .main-navigation { display: none; width: 100%; }
  .main-navigation.is-open { display: block; }
  .main-navigation ul { flex-direction: column; align-items: flex-start; gap: 18px; padding-top: 16px; }
  .site-branding img.lmt-logo { height: 72px; }
}

/* ==========================================================================
   Contenu
   ========================================================================== */
.site-main { padding: 56px 0 72px; }

.lmt-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
}
@media (max-width: 980px) {
  .lmt-layout { grid-template-columns: 1fr; }
}

.page-title {
  font-size: 34px;
  color: var(--lmt-navy);
  margin-bottom: 40px;
}
.page-title span { color: var(--lmt-purple); }

/* Liste d'articles */
.post-card {
  background: var(--lmt-white);
  border: 1px solid var(--lmt-border);
  border-radius: var(--lmt-radius);
  overflow: hidden;
  margin-bottom: 36px;
  box-shadow: 0 6px 18px rgba(18, 35, 72, 0.04);
}

.post-card .post-thumb { display: block; }
.post-card .post-thumb img { display: block; width: 100%; object-fit: cover; }

.post-card .post-body { padding: 28px 32px 30px; }

.post-card .entry-title { font-size: 24px; margin-bottom: 8px; }
.post-card .entry-title a { color: var(--lmt-navy); }
.post-card .entry-title a:hover { color: var(--lmt-purple); }

.entry-meta {
  font-size: 13.5px;
  color: var(--lmt-gray-footer);
  margin-bottom: 14px;
}
.entry-meta a { color: var(--lmt-gray-footer); }
.entry-meta a:hover { color: var(--lmt-purple); }

.read-more {
  display: inline-block;
  margin-top: 14px;
  font-weight: 600;
  color: var(--lmt-purple);
}

/* Article seul / pages */
.entry-header .entry-title { font-size: 34px; }
.entry-content { font-size: 16.5px; }
.entry-content h2 { font-size: 26px; margin-top: 1.6em; }
.entry-content h3 { font-size: 21px; margin-top: 1.4em; }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; }
.entry-content blockquote {
  margin: 1.5em 0;
  padding: 4px 24px;
  border-left: 3px solid var(--lmt-purple);
  color: var(--lmt-violet);
}
.entry-content img { border-radius: var(--lmt-radius); }

.single .entry-thumb img { border-radius: var(--lmt-radius); margin-bottom: 28px; }

/* Navigation entre articles / pagination */
.pagination, .post-navigation {
  margin-top: 40px;
  font-weight: 600;
}
.pagination .nav-links { display: flex; gap: 10px; flex-wrap: wrap; }
.pagination .page-numbers {
  display: inline-block;
  min-width: 42px;
  text-align: center;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--lmt-border);
  color: var(--lmt-navy);
}
.pagination .page-numbers.current {
  background: var(--lmt-purple);
  border-color: var(--lmt-purple);
  color: var(--lmt-white);
}
.pagination .page-numbers:hover { border-color: var(--lmt-purple); color: var(--lmt-purple); }
.pagination .page-numbers.current:hover { color: var(--lmt-white); }

.post-navigation .nav-links { display: flex; justify-content: space-between; gap: 24px; }

/* Sidebar */
.widget-area .widget {
  background: var(--lmt-bg);
  border-radius: var(--lmt-radius);
  padding: 26px 28px;
  margin-bottom: 28px;
}
.widget-area .widget-title,
.widget-area .wp-block-heading {
  font-size: 17px;
  color: var(--lmt-navy);
  margin-bottom: 14px;
}
.widget-area ul { list-style: none; margin: 0; padding: 0; }
.widget-area li { padding: 6px 0; border-bottom: 1px solid var(--lmt-border); }
.widget-area li:last-child { border-bottom: 0; }
.widget-area a { color: var(--lmt-text); }
.widget-area a:hover { color: var(--lmt-purple); }

/* Formulaire de recherche */
.search-form { display: flex; gap: 10px; }
.search-form .search-field {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--lmt-border);
  border-radius: 12px;
  font-family: var(--lmt-font);
  font-size: 15px;
  color: var(--lmt-text);
  background: var(--lmt-white);
}
.search-form .search-field:focus { outline: 2px solid var(--lmt-purple); border-color: transparent; }
.search-form .search-submit {
  padding: 12px 20px;
  border: 0;
  border-radius: 12px;
  background: var(--lmt-purple);
  color: var(--lmt-white);
  font-family: var(--lmt-font);
  font-weight: 600;
  cursor: pointer;
}
.search-form .search-submit:hover { background: var(--lmt-violet); }

/* Commentaires */
.comments-area { margin-top: 56px; border-top: 1px solid var(--lmt-border); padding-top: 40px; }
.comments-title, .comment-reply-title { font-size: 22px; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .comment { padding: 22px 0; border-bottom: 1px solid var(--lmt-border); }
.comment-list .children { list-style: none; margin: 0; padding-left: 32px; }
.comment-author { font-weight: 600; color: var(--lmt-navy); }
.comment-author .avatar { border-radius: 50%; vertical-align: middle; margin-right: 10px; }
.comment-metadata { font-size: 13px; }
.comment-metadata a { color: var(--lmt-gray-footer); }
.comment-form label { display: block; font-weight: 600; color: var(--lmt-navy); margin-bottom: 6px; font-size: 14px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--lmt-border);
  border-radius: 12px;
  font-family: var(--lmt-font);
  font-size: 15px;
  margin-bottom: 18px;
  background: var(--lmt-white);
  color: var(--lmt-text);
}
.comment-form input:focus, .comment-form textarea:focus { outline: 2px solid var(--lmt-purple); border-color: transparent; }
.comment-form .submit {
  padding: 14px 30px;
  border: 0;
  border-radius: var(--lmt-radius);
  background: var(--lmt-purple);
  color: var(--lmt-white);
  font-family: var(--lmt-font);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}
.comment-form .submit:hover { background: var(--lmt-violet); }

/* 404 / pas de résultat */
.no-results, .error-404 { text-align: center; padding: 40px 0 20px; }
.error-404 .page-title { margin-bottom: 12px; }
.error-404 .search-form, .no-results .search-form { max-width: 480px; margin: 28px auto 0; }

/* ==========================================================================
   Footer — fidèle à la capture : fond blanc, texte gris clair, retour en haut
   ========================================================================== */
.site-footer {
  background: var(--lmt-white);
  border-top: 1px solid #f2f2f6;
  padding: 34px 0;
  font-size: 15px;
  color: var(--lmt-gray-footer);
}

.site-footer .lmt-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-left { display: flex; align-items: center; gap: 48px; flex-wrap: wrap; }

.site-footer a { color: var(--lmt-gray-footer); }
.site-footer a:hover { color: var(--lmt-violet); }

.back-to-top { font-weight: 500; }

@media (max-width: 700px) {
  .footer-left { gap: 18px; flex-direction: column; align-items: flex-start; }
  .site-footer .lmt-container { flex-direction: column; align-items: flex-start; }
}

/* Accessibilité */
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden;
  padding: 0; position: absolute; word-wrap: normal !important;
}
a:focus-visible, button:focus-visible { outline: 2px solid var(--lmt-purple); outline-offset: 2px; }

/* Alignements WordPress de base */
.alignleft { float: left; margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }
.aligncenter { display: block; margin: 0 auto 16px; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 13px; color: var(--lmt-gray-footer); text-align: center; }
.sticky { /* article épinglé */ }
.bypostauthor { /* commentaire de l'auteur */ }
.gallery-caption { font-size: 13px; }
