/**
 * SASU ABCduWeb — Blog archive + single post
 * Divi natif sans page builder
 */

/* ═══════════════════════════════════════════════════════════
   VARIABLES
═══════════════════════════════════════════════════════════ */
:root {
  --blog-accent      : #8ab734;
  --blog-accent-dark : #6a9020;
  --blog-text        : #2b2b2b;
  --blog-muted       : #888;
  --blog-border      : #e8e8e8;
  --blog-radius      : 12px;
  --blog-shadow      : 0 4px 18px rgba(0,0,0,.08);
  --blog-shadow-hover: 0 12px 32px rgba(0,0,0,.15);
}

/* ═══════════════════════════════════════════════════════════
   LAYOUT ARCHIVE — Sidebar masquée, pleine largeur
═══════════════════════════════════════════════════════════ */
/* ══════════════════════════════════════════════════════════════
   LAYOUT RESPONSIVE — Blog uniquement (als-blog-single / als-blog-archive)
   JAMAIS appliqué aux pages WooCommerce (.woocommerce-page, .tax-product_cat…)
   Cible : #page-container > #main-content > .container > #content-area > #left-area
══════════════════════════════════════════════════════════════ */

/* Niveau 1 — main-content : float Divi à annuler absolument */
body.als-blog-single  #main-content,
body.als-blog-archive #main-content {
  float        : none  !important;
  width        : 100%  !important;
  max-width    : 100%  !important;
  margin-left  : 0     !important;
  margin-right : 0     !important;
  padding-left : 0     !important;
  padding-right: 0     !important;
  box-sizing   : border-box !important;
  clear        : both  !important;
}

/* Niveau 2 — container Divi : centré, max 1400px, padding fluide */
body.als-blog-single  .container,
body.als-blog-archive .container {
  max-width   : 1400px !important;
  width       : 100%   !important;
  margin      : 0 auto !important;
  padding-left : clamp(20px, 4vw, 80px) !important;
  padding-right: clamp(20px, 4vw, 80px) !important;
  box-sizing  : border-box !important;
}

/* Niveau 3 — content-area */
body.als-blog-single  #content-area,
body.als-blog-archive #content-area {
  float    : none !important;
  width    : 100% !important;
  padding  : 0    !important;
  margin   : 0    !important;
  box-sizing: border-box !important;
  display  : block !important;
}

/* Niveau 4 — left-area : pleine largeur, sans border sidebar */
body.als-blog-single  #left-area,
body.als-blog-archive #left-area {
  float        : none  !important;
  width        : 100%  !important;
  max-width    : 100%  !important;
  margin       : 0     !important;
  padding-left : 0     !important;  /* container gère l'espacement horizontal */
  padding-right: 0     !important;
  box-sizing   : border-box !important;
  border       : none  !important;
  box-shadow   : none  !important;
}

/* Sidebar : masquée et sans espace */
body.als-blog-single  #sidebar,
body.als-blog-archive #sidebar {
  display : none !important;
  width   : 0    !important;
  padding : 0    !important;
  margin  : 0    !important;
}

/* ═══════════════════════════════════════════════════════════
   ARCHIVE — Grille d'articles
═══════════════════════════════════════════════════════════ */
body.als-blog-archive #left-area {
  padding: 0 0 24px !important;  /* horizontal : géré par .container */
}

/* Annule le padding-top de la section Divi qui entoure le blog */
/* Espace haut — padding-top nul sur les wrappers, géré par left-area */
body.als-blog-single  #main-content,
body.als-blog-archive #main-content,
body.als-blog-single  #content-area,
body.als-blog-archive #content-area {
  padding-top: 0 !important;
}

/* Titre de page catégorie */
body.als-blog-archive .page-header {
  margin-bottom : 32px;
  padding-bottom: 14px;
  border-bottom : 3px solid var(--blog-accent);
}
body.als-blog-archive .page-header .page-title,
body.als-blog-archive .page-header h1 {
  font-size  : 26px;
  font-weight: 800;
  color      : var(--blog-text);
  margin     : 0;
}

/* Grille 3 colonnes */
body.als-blog-archive #left-area > article,
body.als-blog-archive #left-area .et_pb_post {
  background    : #fff;
  border        : 1px solid var(--blog-border);
  border-radius : var(--blog-radius);
  box-shadow    : var(--blog-shadow);
  overflow      : hidden;
  padding       : 0 0 8px;
  margin-bottom : 0;
  display       : flex;
  flex-direction: column;
  transition    : transform .3s ease, box-shadow .3s ease;
  break-inside  : avoid;
}

body.als-blog-archive #left-area > article:hover,
body.als-blog-archive #left-area .et_pb_post:hover {
  transform : translateY(-5px);
  box-shadow: var(--blog-shadow-hover);
}

/* Wrapper grille natif Divi */
body.als-blog-archive #left-area {
  display              : grid;
  grid-template-columns: repeat(3, 1fr);
  gap                  : 24px;
  align-items          : stretch;
}

/* Breadcrumb et tout élément non-article pleine largeur */
body.als-blog-archive #left-area .als-blog-breadcrumb,
body.als-blog-archive #left-area nav,
body.als-blog-archive #left-area .page-header,
body.als-blog-archive #left-area h1,
body.als-blog-archive #left-area h2:not(.entry-title) {
  grid-column: 1 / -1;
}

/* Fil d'ariane + pagination : pleine largeur dans la grille */
body.als-blog-archive #left-area .als-blog-breadcrumb,
body.als-blog-archive #left-area .page-header,
body.als-blog-archive #left-area .pagination,
body.als-blog-archive #left-area .et_pb_posts_nav,
body.als-blog-archive #left-area nav.navigation {
  grid-column: 1 / -1;
  text-align : center;
  padding    : 0 0 10px;
}
body.als-blog-archive #left-area .als-blog-breadcrumb {
  padding   : 0 0 10px;
  text-align: left;
}

/* Image */
body.als-blog-archive .entry-featured-image-url {
  display     : block;
  overflow    : hidden;
  position    : relative;
  aspect-ratio: 16 / 9;
  flex-shrink : 0;
}
body.als-blog-archive .entry-featured-image-url img {
  width          : 100%;
  height         : 100%;
  object-fit     : cover;
  object-position: center;
  display        : block;
  transition     : transform .45s ease;
}
body.als-blog-archive .et_pb_post:hover .entry-featured-image-url img,
body.als-blog-archive article:hover .entry-featured-image-url img {
  transform: scale(1.05);
}

/* Badge catégorie */
body.als-blog-archive .post-meta {
  font-size    : 11px;
  font-weight  : 600;
  color        : var(--blog-muted);
  margin       : 18px 20px 10px;
  padding      : 0;
  letter-spacing: .05em;
  text-transform: uppercase;
}
body.als-blog-archive .post-meta a {
  color          : var(--blog-accent);
  text-decoration: none;
}

/* Titre */
body.als-blog-archive .entry-title {
  font-size  : 16px;
  flex       : 1;
  font-weight: 700;
  line-height: 1.4;
  margin     : 8px 20px 14px;
  padding    : 0;
}
body.als-blog-archive .entry-title a {
  color          : var(--blog-text);
  text-decoration: none;
  transition     : color .2s;
}
body.als-blog-archive .entry-title a:hover {
  color: var(--blog-accent);
}

/* Extrait */
body.als-blog-archive .post-content {
  font-size  : 13.5px;
  color      : #666;
  line-height: 1.7;
  margin     : 0 20px 18px;
  padding    : 0;
  flex       : 1;
  display    : -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow   : hidden;
}
body.als-blog-archive .post-content p { margin: 0; }

/* Bouton lire plus */
body.als-blog-archive .more-link,
body.als-blog-archive .et_pb_more_button {
  display        : inline-flex;
  align-items    : center;
  gap            : 6px;
  margin         : 0 20px 22px;
  padding        : 10px 20px;
  background     : var(--blog-accent);
  color          : #fff !important;
  font-size      : 11.5px;
  font-weight    : 700;
  letter-spacing : .07em;
  text-transform : uppercase;
  text-decoration: none !important;
  border-radius  : 6px;
  transition     : background .2s;
  align-self     : flex-start;
}
body.als-blog-archive .more-link::after,
body.als-blog-archive .et_pb_more_button::after {
  content: '→';
  font-weight: 400;
}
body.als-blog-archive .more-link:hover,
body.als-blog-archive .et_pb_more_button:hover {
  background: var(--blog-accent-dark);
  color: #fff !important;
}

/* ═══════════════════════════════════════════════════════════
   SINGLE POST — Article individuel
   Principe : colonne de lecture centrée dans un left-area pleine largeur
   max-width lecture : 780px (optimal lisibilité)
   Image hero : pleine largeur du container (~1400px)
═══════════════════════════════════════════════════════════ */

/* Variables locales */
:root {
  --blog-read-width  : 780px;   /* largeur optimale de lecture */
  --blog-hero-radius : 16px;    /* arrondi image hero */
}

body.als-blog-single #left-area {
  padding   : 0 0 60px !important;
  max-width : none !important;
  margin    : 0    !important;
  width     : 100% !important;
  box-sizing: border-box;
}

/* Wrapper méta global : centré, largeur lecture */
body.als-blog-single .et_post_meta_wrapper {
  max-width  : var(--blog-read-width);
  width      : 100%;
  margin     : 0 auto 0;
  box-sizing : border-box;
  padding    : 0 20px;
}

/* Supprimer text-align:justify de Divi — forcer left partout sur le single */
body.als-blog-single                              { text-align: left !important; }
body.als-blog-single #left-area                   { text-align: left !important; }
body.als-blog-single .et_post_meta_wrapper        { text-align: left !important; }
body.als-blog-single .entry-content               { text-align: left !important; }
body.als-blog-single .entry-content p,
body.als-blog-single .entry-content li,
body.als-blog-single .entry-content td,
body.als-blog-single .entry-content blockquote    { text-align: left !important; }

/* En-tête article */
body.als-blog-single .entry-header {
  margin-bottom: 28px;
}
body.als-blog-single .entry-title,
body.als-blog-single h1.entry-title {
  font-size    : clamp(26px, 3.5vw, 40px);
  font-weight  : 800;
  line-height  : 1.2;
  color        : var(--blog-text);
  margin       : 0 0 16px;
  padding      : 0;
  text-align   : left !important;
  /* Pas de max-width ici → hérite de .et_post_meta_wrapper */
}

/* Meta auteur/date */
body.als-blog-single .post-meta {
  font-size  : 13px;
  color      : var(--blog-muted);
  margin     : 0 0 22px;
  padding    : 10px 0;
  display    : flex;
  flex-wrap  : wrap;
  gap        : 6px 16px;
  align-items: center;
  border-bottom: 1px solid var(--blog-border);
}
body.als-blog-single .post-meta a {
  color          : var(--blog-accent);
  text-decoration: none;
  font-weight    : 600;
}
body.als-blog-single .post-meta .post-date::before { content: '📅 '; }
body.als-blog-single .post-meta .author::before    { content: '✍️ '; }

/* Image mise en avant — pleine largeur du container */
body.als-blog-single .entry-featured-image-url {
  display       : block;
  overflow      : hidden;
  border-radius : var(--blog-hero-radius);
  margin-bottom : 36px;
  margin-top    : 20px;
  /* Déborde légèrement pour effet cinématique */
  max-height    : 520px;
}
body.als-blog-single .entry-featured-image-url img {
  width          : 100%;
  height         : 100%;
  max-height     : 520px;
  object-fit     : cover;
  object-position: center top;
  display        : block;
  border-radius  : var(--blog-hero-radius);
}

/* Contenu — centré, largeur de lecture optimale */
body.als-blog-single .entry-content {
  font-size  : 16.5px;
  line-height: 1.85;
  color      : #3a3a3a;
  max-width  : var(--blog-read-width);
  width      : 100%;
  margin     : 0 auto;
  padding    : 0 20px;
  box-sizing : border-box;
  text-align : left !important;
}
body.als-blog-single .entry-content p {
  margin: 0 0 1.4em;
}
body.als-blog-single .entry-content h2 {
  font-size    : clamp(19px, 2vw, 24px);
  font-weight  : 800;
  color        : var(--blog-text);
  margin       : 2.2em 0 .7em;
  padding      : 14px 14px 14px 18px;
  border-left  : 4px solid var(--blog-accent);
  background   : #f7faf0;
  border-radius: 0 10px 10px 0;
  line-height  : 1.3;
}
body.als-blog-single .entry-content h3 {
  font-size    : clamp(17px, 1.6vw, 20px);
  font-weight  : 700;
  color        : var(--blog-text);
  margin       : 1.8em 0 .6em;
  padding-left : 12px;
  border-left  : 3px solid var(--blog-accent);
  line-height  : 1.35;
}
body.als-blog-single .entry-content a {
  color          : var(--blog-accent);
  text-decoration: underline;
  text-decoration-color: rgba(138,183,52,.4);
  transition     : color .2s;
}
body.als-blog-single .entry-content a:hover {
  color: var(--blog-accent-dark);
}
body.als-blog-single .entry-content ul,
body.als-blog-single .entry-content ol {
  padding-left: 1.4em;
  margin      : 0 0 1.4em;
}
body.als-blog-single .entry-content li {
  margin-bottom: .5em;
  line-height  : 1.7;
}
body.als-blog-single .entry-content ul li::marker {
  color: var(--blog-accent);
}
body.als-blog-single .entry-content img {
  max-width    : 100%;
  height       : auto;
  border-radius: 8px;
  margin       : 1em 0;
  box-shadow   : var(--blog-shadow);
}
body.als-blog-single .entry-content blockquote {
  border-left: 4px solid var(--blog-accent);
  margin     : 1.5em 0;
  padding    : 14px 20px;
  background : #f7faf0;
  border-radius: 0 8px 8px 0;
  font-style : italic;
  color      : #555;
}

/* Tags */
body.als-blog-single .et_post_meta_wrapper .tags {
  margin-top: 28px;
  padding   : 18px 0 0;
  border-top: 1px solid var(--blog-border);
  font-size : 13px;
  color     : var(--blog-muted);
}
body.als-blog-single .et_post_meta_wrapper .tags a {
  display        : inline-block;
  padding        : 3px 10px;
  background     : #f0f7e2;
  color          : var(--blog-accent-dark);
  border-radius  : 20px;
  font-size      : 12px;
  font-weight    : 600;
  text-decoration: none;
  margin         : 2px 3px;
  transition     : background .2s;
}
body.als-blog-single .et_post_meta_wrapper .tags a:hover {
  background: var(--blog-accent);
  color     : #fff;
}

/* Navigation prev/next */
body.als-blog-single .et_post_meta_wrapper .nav-single,
body.als-blog-single .post-navigation {
  display        : flex;
  justify-content: space-between;
  gap            : 20px;
  margin-top     : 40px;
  padding        : 24px 0 0;
  border-top     : 1px solid var(--blog-border);
}
body.als-blog-single .post-navigation a {
  display      : flex;
  flex-direction: column;
  padding      : 16px 20px;
  background   : #fff;
  border       : 1px solid var(--blog-border);
  border-radius: var(--blog-radius);
  text-decoration: none;
  flex         : 1;
  max-width    : 48%;
  transition   : border-color .2s, box-shadow .2s;
}
body.als-blog-single .post-navigation a:hover {
  border-color: var(--blog-accent);
  box-shadow  : var(--blog-shadow);
}
body.als-blog-single .post-navigation .nav-label {
  font-size     : 10px;
  font-weight   : 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color         : var(--blog-accent);
  margin-bottom : 5px;
}
body.als-blog-single .post-navigation .nav-title {
  font-size  : 14px;
  font-weight: 600;
  color      : var(--blog-text);
  line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — Grille adaptative pleine largeur
═══════════════════════════════════════════════════════════ */

/* ≥ 1280px : 4 colonnes pour utiliser tout l'espace */
@media (min-width: 1280px) {
  body.als-blog-archive #left-area {
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
  }
}

/* 980–1279px : 3 colonnes */
@media (max-width: 1279px) and (min-width: 981px) {
  body.als-blog-archive #left-area {
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
  }
}

/* 640–980px : 2 colonnes */
@media (max-width: 980px) {
  body.als-blog-archive #left-area {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  body.als-blog-single .entry-title { font-size: 26px; }
}

/* < 640px : 1 colonne */
@media (max-width: 640px) {
  body.als-blog-archive #left-area {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 0 12px 20px;
  }
  body.als-blog-single #left-area    { padding: 0 0 32px !important; }
  body.als-blog-single .et_post_meta_wrapper { padding: 0 16px; }
  body.als-blog-single .entry-content { padding: 0 16px; font-size: 15.5px; }
  body.als-blog-single .entry-featured-image-url { border-radius: 10px; max-height: 260px; }
  body.als-blog-single .entry-featured-image-url img { max-height: 260px; }
  body.als-blog-single .post-navigation { flex-direction: column; }
  body.als-blog-single .post-navigation a { max-width: 100%; }
}

/* 640–980px : tablette */
@media (max-width: 980px) and (min-width: 641px) {
  body.als-blog-single .et_post_meta_wrapper { padding: 0 16px; }
  body.als-blog-single .entry-content { padding: 0 16px; }
  body.als-blog-single .entry-featured-image-url { max-height: 380px; }
  body.als-blog-single .entry-featured-image-url img { max-height: 380px; }
}

/* < 400px (petits téléphones) : compact */
@media (max-width: 400px) {
  body.als-blog-archive #left-area {
    gap: 10px;
    padding: 0 8px 16px;
  }
}

/* ═══════════════════════════════════════════════════════════
   COMPATIBILITÉ ancien builder Divi (module .articles-liste-sobre)
═══════════════════════════════════════════════════════════ */
.articles-liste-sobre .et_pb_ajax_pagination_container {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 28px;
}
@media (max-width:980px){ .articles-liste-sobre .et_pb_ajax_pagination_container { grid-template-columns: repeat(2,1fr); } }
@media (max-width:600px){ .articles-liste-sobre .et_pb_ajax_pagination_container { grid-template-columns: 1fr; } }
.articles-liste-sobre .et_pb_post {
  background: #fff; border: 1px solid var(--blog-border); border-radius: var(--blog-radius);
  box-shadow: var(--blog-shadow); overflow: hidden; padding: 0; margin: 0;
  display: flex; flex-direction: column; transition: transform .3s, box-shadow .3s;
}
.articles-liste-sobre .et_pb_post:hover { transform: translateY(-5px); box-shadow: var(--blog-shadow-hover); }
.articles-liste-sobre .entry-featured-image-url { display:block; overflow:hidden; aspect-ratio:16/9; }
.articles-liste-sobre .entry-featured-image-url img { width:100%; height:100%; object-fit:cover; transition: transform .4s; }
.articles-liste-sobre .et_pb_post:hover .entry-featured-image-url img { transform: scale(1.04); }
.articles-liste-sobre .entry-title { font-size:17px; font-weight:700; margin:16px 20px 8px; }
.articles-liste-sobre .entry-title a { color:var(--blog-text); text-decoration:none; }
.articles-liste-sobre .entry-title a:hover { color:var(--blog-accent); }
.articles-liste-sobre .post-meta { font-size:11px; color:var(--blog-muted); margin:0 20px 10px; }
.articles-liste-sobre .post-meta a { color:var(--blog-accent); }
.articles-liste-sobre .post-content { font-size:13.5px; color:#666; line-height:1.65; margin:0 20px 16px; flex:1; }
.articles-liste-sobre .more-link, .articles-liste-sobre .et_pb_more_button {
  display:inline-flex; align-items:center; gap:6px; margin:0 20px 20px; padding:9px 18px;
  background:var(--blog-accent); color:#fff !important; font-size:12px; font-weight:700;
  text-transform:uppercase; text-decoration:none !important; border-radius:6px; align-self:flex-start;
}
.articles-liste-sobre .more-link:hover, .articles-liste-sobre .et_pb_more_button:hover { background:var(--blog-accent-dark); }


/* ═══════════════════════════════════════════════════════════
   PAGINATION — WP-PageNavi style (intégré thème enfant)
   Classes générées par als_wp_pagenavi() :
     .wp-pagenavi / .als-pagenavi  → conteneur
     .pages                        → "Page X sur Y"
     .first / .last                → «  »
     .previouspostslink            → ‹
     .nextpostslink                → ›
     .current                      → page active
     .page                         → lien numéroté
     .extend                       → points …
═══════════════════════════════════════════════════════════ */

/* Conteneur — pleine largeur dans la grille CSS */
body.als-blog-archive #left-area .wp-pagenavi,
body.als-blog-archive #left-area .als-pagenavi {
  grid-column    : 1 / -1 !important;
  display        : flex;
  flex-wrap      : wrap;
  justify-content: center;
  align-items    : center;
  gap            : 6px;
  padding        : 12px 0 8px;
}

/* Texte "Page X sur Y" — ligne à part entière */
body.als-blog-archive .als-pagenavi .pages {
  flex           : 0 0 100%;
  text-align     : center;
  font-size      : 12px;
  font-weight    : 500;
  color          : var(--blog-muted);
  letter-spacing : .04em;
  margin-bottom  : 4px;
}

/* Style commun à tous les boutons/liens */
body.als-blog-archive .als-pagenavi a,
body.als-blog-archive .als-pagenavi span:not(.pages) {
  display        : inline-flex;
  align-items    : center;
  justify-content: center;
  min-width      : 36px;
  height         : 36px;
  padding        : 0 10px;
  border         : 1.5px solid var(--blog-border);
  border-radius  : 8px;
  font-size      : 13px;
  font-weight    : 600;
  color          : var(--blog-text);
  text-decoration: none;
  background     : #fff;
  transition     : border-color .2s, color .2s, background .2s, box-shadow .2s;
  line-height    : 1;
  cursor         : pointer;
  white-space    : nowrap;
}

/* Hover sur tous les liens */
body.als-blog-archive .als-pagenavi a:hover {
  border-color : var(--blog-accent);
  color        : var(--blog-accent);
  background   : #f7faf0;
  box-shadow   : 0 2px 8px rgba(138,183,52,.15);
}

/* ── Page courante ── */
body.als-blog-archive .als-pagenavi span.current {
  background   : var(--blog-accent);
  border-color : var(--blog-accent);
  color        : #fff !important;
  cursor        : default;
  box-shadow   : 0 3px 10px rgba(138,183,52,.35);
}

/* ── Points de suspension (…) ── */
body.als-blog-archive .als-pagenavi span.extend {
  border     : none;
  background : transparent;
  color      : var(--blog-muted);
  font-size  : 16px;
  min-width  : 24px;
  padding    : 0;
  cursor     : default;
  box-shadow : none;
}

/* ── « Première et Dernière » ── */
body.als-blog-archive .als-pagenavi a.first,
body.als-blog-archive .als-pagenavi a.last {
  font-size    : 16px;
  font-weight  : 700;
  color        : var(--blog-muted);
  border-color : var(--blog-border);
  min-width    : 36px;
}
body.als-blog-archive .als-pagenavi a.first:hover,
body.als-blog-archive .als-pagenavi a.last:hover {
  color        : var(--blog-accent);
  border-color : var(--blog-accent);
}

/* ── ‹ Précédente  et  Suivante › ── */
body.als-blog-archive .als-pagenavi a.previouspostslink,
body.als-blog-archive .als-pagenavi a.nextpostslink {
  font-size    : 18px;
  font-weight  : 700;
  color        : var(--blog-accent);
  border-color : var(--blog-accent);
  background   : #f7faf0;
}
body.als-blog-archive .als-pagenavi a.previouspostslink:hover,
body.als-blog-archive .als-pagenavi a.nextpostslink:hover {
  background   : var(--blog-accent);
  color        : #fff;
  border-color : var(--blog-accent);
}

/* ── Responsive ── */
@media (max-width: 640px) {
  body.als-blog-archive .als-pagenavi {
    gap      : 4px;
    flex-wrap: nowrap;          /* tout sur une ligne */
    overflow-x: auto;           /* scroll si vraiment trop étroit */
    padding  : 10px 10px 6px;
    justify-content: center;
    scrollbar-width: none;      /* Firefox */
  }
  body.als-blog-archive .als-pagenavi::-webkit-scrollbar { display: none; }
  body.als-blog-archive .als-pagenavi a,
  body.als-blog-archive .als-pagenavi span:not(.pages) {
    min-width    : 34px;
    height       : 34px;
    font-size    : 13px;
    padding      : 0 8px;
    border-radius: 8px;
    flex-shrink  : 0;           /* empêche les boutons de se tasser */
  }
}

/* ═══════════════════════════════════════════════════════════
   MASQUER la navigation Divi native (doublon)
   « Entrées précédentes » / « Entrées suivantes »
   Divi les injecte en plus de notre pagination custom
═══════════════════════════════════════════════════════════ */
body.als-blog-archive .nav-previous,
body.als-blog-archive .nav-next,
body.als-blog-archive .et_pb_posts_nav,
body.als-blog-archive #nav-below,
body.als-blog-archive #nav-above,
body.als-blog-archive .navigation.post-navigation,
body.als-blog-archive .posts-navigation {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════
   IMAGE À LA UNE — Article individuel
═══════════════════════════════════════════════════════════ */
body.als-blog-single .als-featured-img-wrap {
  display      : block;
  margin-bottom: 28px;
  border-radius: var(--blog-radius);
  overflow     : hidden;
  line-height  : 0;
}
body.als-blog-single .als-featured-img-wrap .als-featured-img {
  width        : 100%;
  height       : auto;
  display      : block;
  border-radius: var(--blog-radius);
}

/* ═══════════════════════════════════════════════════════════
   TABLE DES MATIÈRES — LuckyWP TOC équivalent
   .als-toc / .lwptoc          → conteneur global
   .als-toc__header            → ligne titre + bouton
   .als-toc__title             → "Sommaire"
   .als-toc__toggle            → bouton Afficher/Masquer
   .als-toc__nav               → zone de navigation (cachable)
   .als-toc__list              → <ol> ou <ul>
   .als-toc__item              → <li>
   .als-toc__link              → <a>
   .als-toc--full              → largeur 100 %
   .als-toc--bullets           → puces au lieu de chiffres
═══════════════════════════════════════════════════════════ */

.als-toc,
.lwptoc {
  background   : #f7faf0;
  border       : 1.5px solid var(--blog-accent);
  border-radius: var(--blog-radius);
  padding      : 18px 22px 16px;
  margin       : 0 auto 28px;   /* centré dans la zone de contenu */
  display      : block;
  min-width    : 260px;
  max-width    : 680px;
  width        : 100%;
  box-sizing   : border-box;
}
.als-toc--full { display: block; max-width: 100%; }

/* ── En-tête ── */
.als-toc__header {
  display        : flex;
  align-items    : center;
  justify-content: space-between;
  gap            : 14px;
  margin-bottom  : 12px;
}
.als-toc__title {
  font-size  : 14px;
  font-weight: 700;
  color      : var(--blog-text);
  margin     : 0;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ── Bouton toggle ── */
.als-toc__toggle {
  font-size  : 11px;
  font-weight: 700;
  color      : var(--blog-accent);
  background : transparent;
  border     : 1.5px solid var(--blog-accent);
  border-radius: 5px;
  padding    : 3px 10px;
  cursor     : pointer;
  transition : background .2s, color .2s;
  white-space: nowrap;
  line-height: 1.6;
}
.als-toc__toggle:hover {
  background: var(--blog-accent);
  color     : #fff;
}

/* ── Listes ── */
.als-toc__list {
  margin       : 0;
  padding      : 0;
  list-style   : none !important;
  counter-reset: als-c;
}
/* Sous-liste (profondeur > 0) */
.als-toc__list .als-toc__list {
  padding-left: 14px;
  margin-top  : 3px;
  counter-reset: als-c;
}

/* ── Items ── */
.als-toc__item {
  counter-increment: als-c;
  line-height: 1.5;
}
.als-toc__item + .als-toc__item { margin-top: 5px; }
.als-toc__item--h3 { font-size: 93%; }
.als-toc__item--h4 { font-size: 86%; }

/* ── Liens ── */

/* Cache via classe CSS (plus fiable que l'attribut hidden écrasé par Divi) */
.als-toc__nav.als-toc__nav--hidden { display: none !important; }
.als-toc__link {
  color          : #3a3a3a;
  text-decoration: none;
  transition     : color .15s;
}
.als-toc__link:hover { color: var(--blog-accent); }

/* Numérotation CSS automatique (decimal) */
.als-toc:not(.als-toc--bullets) .als-toc__link::before {
  content      : counters(als-c, '.') '. ';
  color        : var(--blog-accent);
  font-weight  : 700;
  font-size    : 11px;
  margin-right : 3px;
  min-width    : 1.5em;
  display      : inline-block;
}

/* Puces (non-numbered) */
.als-toc--bullets .als-toc__link::before {
  content    : '▸ ';
  color      : var(--blog-accent);
  font-size  : 10px;
  margin-right: 3px;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .als-toc,
  .lwptoc {
    display  : block;
    max-width: 100%;
    padding  : 14px 16px 12px;
  }
}

/* ═══════════════════════════════════════════════════════════
   BOUTONS DE PARTAGE — Articles blog
   Même design que les boutons produits WooCommerce
═══════════════════════════════════════════════════════════ */
.als-blog-share {
  margin  : 40px 0 8px;
  padding : 24px 0 0;
  border-top: 2px solid var(--blog-border);
}

.als-share-label {
  display    : block;
  font-size  : 13px;
  font-weight: 700;
  color      : var(--blog-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom : 12px;
}

.als-share-buttons {
  display  : flex;
  flex-wrap: wrap;
  gap      : 10px;
}

/* Bouton de base */
.als-share-btn {
  display        : inline-flex;
  align-items    : center;
  gap            : 7px;
  padding        : 9px 16px;
  border-radius  : 8px;
  font-size      : 13px;
  font-weight    : 600;
  text-decoration: none !important;
  color          : #fff !important;
  transition     : transform .18s, opacity .18s, box-shadow .18s;
  line-height    : 1;
  white-space    : nowrap;
}
.als-share-btn:hover {
  opacity   : .88;
  transform : translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
}
.als-share-btn svg {
  width     : 16px;
  height    : 16px;
  flex-shrink: 0;
}

/* Couleurs par réseau — identiques WooCommerce */
.als-share-facebook  { background: #1877f2; }
.als-share-twitter   { background: #000;    }
.als-share-linkedin  { background: #0a66c2; }
.als-share-whatsapp  { background: #25d366; }
.als-share-pinterest { background: #e60023; }
.als-share-email     { background: var(--blog-accent); }

/* Mobile : icône seule */
@media (max-width: 480px) {
  .als-share-btn__label { display: none; }
  .als-share-btn { padding: 10px; border-radius: 50%; }
  .als-share-btn svg { width: 18px; height: 18px; }
}

/* ═══════════════════════════════════════════════════════════
   FIX — Hero overlay WooCommerce (z-index manquant)
═══════════════════════════════════════════════════════════ */
.als-shop-hero                  { isolation: isolate; }
.als-shop-hero__bg              { z-index: 0; }
.als-shop-hero__overlay         { z-index: 1 !important; }
.als-shop-hero__content         { z-index: 2 !important; position: relative; }

/* ═══════════════════════════════════════════════════════════
   PAGE RECHERCHE — Layout pleine largeur responsive
═══════════════════════════════════════════════════════════ */

/* Forcer pleine largeur comme les pages blog */
body.als-search-page #main-content  { float:none !important; width:100% !important; max-width:100% !important; margin:0 !important; clear:both !important; }
body.als-search-page .container     { max-width:1400px !important; width:100% !important; margin:0 auto !important; padding-left:clamp(20px,4vw,80px) !important; padding-right:clamp(20px,4vw,80px) !important; box-sizing:border-box !important; }
body.als-search-page #content-area  { float:none !important; width:100% !important; padding:0 !important; box-sizing:border-box !important; }
body.als-search-page #left-area     { float:none !important; width:100% !important; max-width:100% !important; margin:0 !important; padding:0 0 40px !important; border:none !important; box-shadow:none !important; box-sizing:border-box !important; }
body.als-search-page #sidebar       { display:none !important; }

/* Hero pleine largeur (déborde du container pour effet bord à bord) */
body.als-search-page .als-search-hero {
  margin-left : calc(-1 * clamp(20px, 4vw, 80px));
  margin-right: calc(-1 * clamp(20px, 4vw, 80px));
}

/* Responsive grille */
@media (min-width: 1280px) {
  .als-search-grid { grid-template-columns: repeat(4, 1fr) !important; }
}
@media (max-width: 1279px) and (min-width: 981px) {
  .als-search-grid { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 980px) {
  .als-search-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 600px) {
  .als-search-grid { grid-template-columns: 1fr !important; gap: 12px !important; }
  body.als-search-page .als-search-hero { padding: 28px 20px; }
  .als-search-hero__query { font-size: 22px !important; }
}

/* Pagination sur la page de recherche — même style que le blog */
.als-search-pagination {
  display        : flex;
  justify-content: center;
  width          : 100%;
  padding        : 28px 0 8px;
}
body.als-search-page .als-pagenavi,
body.als-search-page .wp-pagenavi {
  display        : flex !important;
  flex-wrap      : wrap !important;
  justify-content: center !important;
  align-items    : center !important;
  gap            : 6px !important;
  padding        : 0 !important;
  margin         : 0 auto !important;
  width          : auto !important;
  list-style     : none !important;
}
/* Assurer que les boutons ont le bon style dans le contexte search */
body.als-search-page .als-pagenavi a,
body.als-search-page .als-pagenavi span:not(.pages) {
  display        : inline-flex !important;
  align-items    : center !important;
  justify-content: center !important;
  min-width      : 36px !important;
  height         : 36px !important;
  padding        : 0 10px !important;
  border         : 1.5px solid #e8e8e8 !important;
  border-radius  : 8px !important;
  font-size      : 13px !important;
  font-weight    : 600 !important;
  color          : #2b2b2b !important;
  text-decoration: none !important;
  background     : #fff !important;
  transition     : all .2s !important;
}
body.als-search-page .als-pagenavi span.current {
  background   : #8ab734 !important;
  border-color : #8ab734 !important;
  color        : #fff !important;
}
body.als-search-page .als-pagenavi a:hover {
  border-color : #8ab734 !important;
  color        : #8ab734 !important;
  background   : #f7faf0 !important;
}
body.als-search-page .als-pagenavi span.extend {
  border     : none !important;
  background : transparent !important;
  color      : #999 !important;
}
body.als-search-page .als-pagenavi a.previouspostslink,
body.als-search-page .als-pagenavi a.nextpostslink {
  color        : #8ab734 !important;
  border-color : #8ab734 !important;
  background   : #f7faf0 !important;
  font-size    : 16px !important;
}



/* ═══════════════════════════════════════════════════════════
   FIX — Panneau cookie tarteaucitron : scrollable
   Structure tarteaucitron :
   #tarteaucitronBack (overlay)
     → barre verte "Fermer" = positionnée en dehors du panneau
   #tarteaucitron (panneau blanc)
     → .tarteaucitronBorder (en-tête fixe)
     → #tarteaucitronServices (liste scrollable)
═══════════════════════════════════════════════════════════ */

/* Zone des services uniquement : scrollable (sans toucher au root) */
html body #tarteaucitronRoot #tarteaucitron #tarteaucitronServices {
  overflow-y : auto  !important;
  max-height : 55vh  !important;
}

/* Mobile */
@media (max-width: 640px) {
  html body #tarteaucitronRoot #tarteaucitron #tarteaucitronServices {
    max-height: 50vh !important;
    max-height: 50dvh !important;
  }
}



/* Dernière page avec peu de résultats : cartes à largeur fixe, pas étirées */
.als-search-grid .als-search-card:only-child {
  max-width: 400px;
}
@media (min-width: 981px) {
  /* 1 seul résultat : centré, pas pleine largeur */
  .als-search-grid:has(.als-search-card:only-child) {
    justify-items: start;
  }
}

/* ═══════════════════════════════════════════════════════════
   ESPACEMENT BLOG (archive + single) — Réduction haut/bas
   Cible uniquement le contenu principal (#main-content),
   jamais le footer (sections tb_footer).
═══════════════════════════════════════════════════════════ */

/* et-main-area */
body.als-blog-archive #et-main-area,
body.als-blog-single  #et-main-area {
  padding-top: 0 !important;
  margin-top : 0 !important;
}

/* Sections Divi HORS footer : 54px → 16px
   Les sections footer ont la classe *tb_footer* dans leur nom */
body.als-blog-archive #main-content .et_pb_section,
body.als-blog-single  #main-content .et_pb_section {
  padding-top   : 16px !important;
  padding-bottom: 16px !important;
}

/* Rows Divi dans le contenu principal */
body.als-blog-archive #main-content .et_pb_row,
body.als-blog-single  #main-content .et_pb_row {
  padding-top   : 0 !important;
  padding-bottom: 0 !important;
}

/* Archive : left-area sans padding bas (pagination suffit) */
body.als-blog-archive #left-area {
  padding-bottom: 0 !important;
}

/* Single : breadcrumb juste sous le header, espace réduit */
body.als-blog-single #left-area {
  padding-top : 8px !important;
}

/* ═══════════════════════════════════════════════════════════
   LARGEUR DE LECTURE — Adaptation aux grands écrans (v2026.1.1)
   Avant : 780px partout → ~60% de la largeur perdue sur ≥1280px.
   Maintenant : la colonne s'élargit par paliers tout en gardant
   une typographie confortable (entre 75 et 90 caractères par ligne).
═══════════════════════════════════════════════════════════ */

/* Tablette landscape / petit desktop (981–1279px) — léger élargissement */
@media (min-width: 981px) and (max-width: 1279px) {
  body.als-blog-single { --blog-read-width: 860px; }
}

/* Desktop standard (1280–1599px) */
@media (min-width: 1280px) and (max-width: 1599px) {
  body.als-blog-single { --blog-read-width: 980px; }
  body.als-blog-single .entry-content { font-size: 17px; line-height: 1.82; }
  body.als-blog-single .entry-title    { font-size: clamp(30px, 2.6vw, 42px); }
}

/* Grand desktop (1600–1919px) */
@media (min-width: 1600px) and (max-width: 1919px) {
  body.als-blog-single { --blog-read-width: 1120px; }
  body.als-blog-single .entry-content { font-size: 17.5px; line-height: 1.8; }
  body.als-blog-single .entry-title    { font-size: clamp(32px, 2.4vw, 44px); }
}

/* Écran XL (≥ 1920px) */
@media (min-width: 1920px) {
  body.als-blog-single { --blog-read-width: 1240px; }
  body.als-blog-single .entry-content { font-size: 18px; line-height: 1.78; }
  body.als-blog-single .entry-title    { font-size: clamp(36px, 2.4vw, 50px); }
}

/* ═══════════════════════════════════════════════════════════
   IMAGE HERO « FULL BLEED » sur grand écran — elle déborde
   du wrapper de lecture pour atteindre la largeur du container (1400px).
   Technique : left:50% + translateX(-50%) pour casser la contrainte parent.
═══════════════════════════════════════════════════════════ */
@media (min-width: 1280px) {
  body.als-blog-single .entry-featured-image-url {
    position    : relative;
    left        : 50%;
    transform   : translateX(-50%);
    width       : min(100vw - 60px, 1360px);
    max-width   : 1360px;
    max-height  : 560px;
    margin-left : 0;
    margin-right: 0;
  }
  body.als-blog-single .entry-featured-image-url img {
    max-height  : 560px;
  }
}
