/* Webpratique — magazine editorial, Bootscore Child.
 * Style inspired by the supplied visual reference; no external fonts/assets.
 * This file replaces the previous design CSS to avoid conflicting overrides.
 */
:root {
  --wp-paper: #f1f1f0;
  --wp-ink: #242424;
  --wp-muted: #696969;
  --wp-panel: #fff;
  --wp-accent: #b61925;
  --wp-radius: 18px;
}
body { background: var(--wp-paper); color: var(--wp-ink); }
body, button, input, select, textarea { font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif; }
#masthead, #masthead .navbar { background: #fff; }
#masthead { border-bottom: 1px solid #e8e8e8; }
#masthead .navbar-brand, #masthead .nav-link { color: var(--wp-ink); }
#masthead .nav-link:hover { color: var(--wp-accent); }
#masthead .navbar-toggler { border-color: #ddd; }
#content.site-content { max-width: 1560px; }
.wp-home { min-width: 0; }
.wp-home > section { min-width: 0; }
.wp-home-heading { font-size: clamp(1.3rem, 2vw, 1.8rem); font-weight: 650; letter-spacing: -.04em; border: 0; margin: 0 0 15px; padding: 0; }
.wp-home-atlas { background: #fff; border-radius: var(--wp-radius); padding: clamp(12px, 2vw, 24px); margin-bottom: 18px !important; }
/* Do not change Atlas plugin internals. */
.wp-home-selection { margin-bottom: 22px !important; }
.wp-home-selection .wp-home-widget { margin: 0; }
.wp-selection { min-width: 0; }
.wp-selection-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: repeat(2, minmax(180px, auto)); gap: 8px; }
.wp-selection-item { position: relative; min-width: 0; min-height: 185px; border-radius: var(--wp-radius); overflow: hidden; background: #fff; isolation: isolate; }
.wp-selection-item:first-child { grid-row: span 2; min-height: 380px; }
.wp-selection-image { display: block; position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; background: #e9e9e9; }
.wp-selection-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.70), rgba(0,0,0,.04) 68%); pointer-events: none; }
.wp-selection-image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.wp-selection-item:hover .wp-selection-image img { transform: scale(1.025); }
.wp-selection-title { position: absolute; z-index: 1; left: 17px; right: 17px; bottom: 17px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 500; font-size: clamp(1.1rem, 1.65vw, 1.6rem); line-height: 1.15; letter-spacing: -.035em; pointer-events: none; }
.wp-selection-title a { color: #fff; text-decoration: none; pointer-events: auto; }
.wp-selection-title a:hover { color: #fff; text-decoration: underline; }
.wp-selection-item:first-child .wp-selection-title { left: 25px; right: 25px; bottom: 25px; font-size: clamp(1.9rem, 3.3vw, 3.7rem); line-height: 1.04; }
.wp-home-columns { --bs-gutter-x: 16px; --bs-gutter-y: 16px; align-items: start; }
.wp-home-columns > * { min-width: 0; }
.wp-home-left .wp-home-widget, .wp-home-sidebar .wp-home-widget { margin-bottom: 16px; overflow-wrap: anywhere; }
/* Widgets retain their own colors (WeatherGrid, Mastodon etc.). */
.wp-home-widget-title { font-size: 1rem; font-weight: 700; margin-bottom: 10px; }
.wp-home-news > .row { display: flex; flex-direction: column; }
.wp-home-news > .row > div { flex: 0 0 100% !important; width: 100% !important; max-width: 100% !important; }
.wp-home-news .wp-home-card { display: grid !important; grid-template-columns: minmax(0, 34%) minmax(0, 1fr) !important; min-width: 0; width: 100%; height: auto; background: #fff; border: 0; border-radius: 15px; overflow: hidden; }
.wp-home-news .wp-home-card-image { display: block; width: 100%; height: 100%; min-height: 150px; aspect-ratio: auto; border-radius: 0; overflow: hidden; background: #e9e9e9; }
.wp-home-news .wp-home-card-image img { width: 100%; height: 100%; display: block; object-fit: cover; }
.wp-home-news .wp-home-card-body { min-width: 0; width: 100%; padding: clamp(12px, 1.7vw, 22px); }
.wp-home-news .wp-home-card-title { font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.12rem, 1.7vw, 1.65rem); font-weight: 500; line-height: 1.16; letter-spacing: -.03em; margin-bottom: 10px; overflow-wrap: break-word; }
.wp-home-news .wp-home-card-title a { color: var(--wp-ink); text-decoration: none; }
.wp-home-news .wp-home-card-title a:hover { color: var(--wp-accent); }
.wp-home-news .wp-home-date { color: var(--wp-muted); font-size: .77rem; margin-bottom: 9px; }
.wp-home-news .wp-home-excerpt { font-size: .9rem; line-height: 1.5; margin: 0; overflow-wrap: break-word; }
@media (min-width: 992px) {
  .wp-fa-rail { background: #fff; border: 0; border-radius: 15px; box-shadow: none; }
  .wp-fa-rail-list > li > a { color: #242424; }
  .wp-fa-rail-list > li > a:hover, .wp-fa-rail-list > li.current-menu-item > a { background: #f2f2f2; color: var(--wp-accent); }
}
@media (max-width: 991.98px) {
  .wp-selection-grid { grid-template-columns: repeat(2, minmax(0,1fr)); grid-template-rows: auto; }
  .wp-selection-item:first-child { grid-column: span 2; grid-row: auto; min-height: 330px; }
  .wp-selection-item { min-height: 210px; }
}
@media (max-width: 575.98px) {
  #content.site-content { padding-left: 12px; padding-right: 12px; }
  .wp-home-atlas { padding: 12px; }
  .wp-selection-grid { gap: 7px; }
  .wp-selection-item { min-height: 155px; border-radius: 12px; }
  .wp-selection-item:first-child { min-height: 260px; }
  .wp-selection-item:first-child .wp-selection-title { font-size: 1.9rem; left: 15px; right: 15px; bottom: 15px; }
  .wp-selection-title { font-size: 1.05rem; left: 10px; right: 10px; bottom: 10px; }
  .wp-home-news .wp-home-card { grid-template-columns: minmax(0, 34%) minmax(0, 1fr) !important; }
  .wp-home-news .wp-home-card-image { min-height: 120px; }
  .wp-home-news .wp-home-card-body { padding: 11px; }
  .wp-home-news .wp-home-card-title { font-size: 1.04rem; }
  .wp-home-news .wp-home-excerpt { font-size: .81rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) { .wp-selection-image img { transition: none; } }




/*
 * Webpratique - Intégration du menu FA
 * dans la structure magazine
 */

@media (min-width: 992px) {

  body .wp-fa-rail {
    background: #fff;
    border: 0;
    border-right: 1px solid #e8e8e8;
    border-radius: 0;
    box-shadow: none;
  }

  body .wp-fa-rail-list > li > a {
    color: #242424;
  }

  body .wp-fa-rail-list > li > a:hover,
  body .wp-fa-rail-list > li.current-menu-item > a {
    color: #111;
    background: #f0f0f0;
  }
}

@media (max-width: 991.98px) {
  body .wp-fa-rail {
    display: block;
    background: #fff;
    border-radius: 0;
    box-shadow: none;
  }
}


/* Webpratique: pages and posts with configurable right sidebars */
.wp-content-layout .row > * { min-width: 0; }
.wp-magazine-article { min-width: 0; }
.wp-magazine-article-title { font-family: Georgia, 'Times New Roman', serif; font-weight: 500; line-height: 1.13; font-size: clamp(2rem, 3.2vw, 3.4rem); overflow-wrap: anywhere; }
.wp-magazine-meta { color: #747474; font-size: .88rem; }
.wp-magazine-content { overflow-wrap: anywhere; }
.wp-magazine-content img, .wp-content-sidebar img { max-width: 100%; height: auto; }
.wp-content-sidebar { min-width: 0; overflow-wrap: anywhere; }
.wp-content-sidebar .wp-home-widget { margin-bottom: 1rem; }
@media (max-width: 991.98px) { .wp-content-sidebar-column { width: 100%; } }

/* Native Bootscore post/page markup restored: editorial styling without removing hooks. */
.wp-content-layout .entry-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 500; line-height: 1.13;
  font-size: clamp(2rem, 3.2vw, 3.4rem);
  overflow-wrap: anywhere;
}
.wp-content-layout .entry-content {overflow-wrap: anywhere;}
.wp-content-layout .entry-content img,
.wp-content-layout .entry-header img {max-width:100%;height:auto;}



/* ================================================================
   Webpratique — Articles : finition éditoriale (CSS uniquement)
   Ciblé sur single.php ; préserve pages, plugins et hooks Bootscore.
   ================================================================ */

body.single-post .wp-content-layout .wp-content-main {
  min-width: 0;
}

body.single-post .wp-content-layout .site-main {
  min-width: 0;
  background: var(--wp-panel, #fff);
  border: 1px solid #e9e9e7;
  border-radius: 18px;
  padding: clamp(18px, 2.5vw, 38px);
}

body.single-post .wp-content-layout .entry-header {
  margin-bottom: clamp(20px, 2.5vw, 32px);
}

body.single-post .wp-content-layout .entry-header .entry-title {
  margin: 12px 0 14px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(2rem, 3.4vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -.035em;
  font-weight: 500;
  color: var(--wp-ink, #242424);
  overflow-wrap: break-word;
}

body.single-post .wp-content-layout .entry-meta {
  margin: 0 0 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid #ececea;
  color: var(--wp-muted, #696969);
  font-size: .85rem;
  line-height: 1.6;
}

body.single-post .wp-content-layout .entry-meta a {
  color: inherit;
  text-underline-offset: 3px;
}

body.single-post .wp-content-layout .entry-header img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 13px;
}

body.single-post .wp-content-layout .entry-content {
  font-size: clamp(1rem, 1.1vw, 1.09rem);
  line-height: 1.8;
  color: #303030;
  overflow-wrap: anywhere;
}

body.single-post .wp-content-layout .entry-content > p,
body.single-post .wp-content-layout .entry-content > ul,
body.single-post .wp-content-layout .entry-content > ol {
  margin-bottom: 1.35em;
}

body.single-post .wp-content-layout .entry-content :is(h2, h3, h4) {
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--wp-ink, #242424);
  line-height: 1.22;
  letter-spacing: -.02em;
  font-weight: 600;
  margin-top: 1.65em;
  margin-bottom: .7em;
}

body.single-post .wp-content-layout .entry-content h2 {
  font-size: clamp(1.5rem, 2vw, 2rem);
}

body.single-post .wp-content-layout .entry-content h3 {
  font-size: clamp(1.25rem, 1.6vw, 1.55rem);
}

body.single-post .wp-content-layout .entry-content a {
  text-underline-offset: 3px;
}

body.single-post .wp-content-layout .entry-content :is(img, video, iframe) {
  max-width: 100%;
}

body.single-post .wp-content-layout .entry-content img {
  height: auto;
}

body.single-post .wp-content-layout .entry-content :is(figure, .wp-block-image) {
  max-width: 100%;
}

body.single-post .wp-content-layout .entry-content figcaption {
  color: #777;
  font-size: .82rem;
  line-height: 1.5;
  margin-top: 8px;
}

body.single-post .wp-content-layout .entry-content blockquote,
body.single-post .wp-content-layout .entry-content .wp-block-quote {
  border-left: 3px solid var(--wp-accent, #b61925);
  padding: 8px 0 8px 20px;
  margin: 1.6em 0;
  color: #484848;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.15em;
  line-height: 1.55;
}

body.single-post .wp-content-layout .entry-content :is(pre, table, .wp-block-table) {
  max-width: 100%;
  overflow-x: auto;
}

body.single-post .wp-content-layout .entry-footer {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid #ececea;
}

body.single-post .wp-content-layout .entry-footer .pagination {
  flex-wrap: wrap;
  gap: 8px;
}

body.single-post .wp-content-layout .entry-footer :is(#comments, .comments-area) {
  margin-top: 26px;
}

body.single-post .wp-content-layout .entry-footer :is(.comment-list, .comment-form) {
  max-width: 100%;
}

body.single-post .wp-content-layout .entry-footer :is(input, textarea) {
  max-width: 100%;
}

@media (max-width: 575.98px) {
  body.single-post .wp-content-layout .site-main {
    border-radius: 13px;
    padding: 17px 15px;
  }

  body.single-post .wp-content-layout .entry-header .entry-title {
    font-size: clamp(1.85rem, 8vw, 2.45rem);
  }

  body.single-post .wp-content-layout .entry-content {
    font-size: 1rem;
    line-height: 1.72;
  }
}


/* Bloc auteur sous les articles */

.wp-author-box {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin: 35px 0;
  padding: 22px;
  background: #f7f7f6;
  border: 1px solid #e9e9e7;
  border-radius: 16px;
}

.wp-author-avatar {
  flex: 0 0 80px;
}

.wp-author-avatar img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

.wp-author-info {
  flex: 1;
  min-width: 0;
}

.wp-author-name {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 600;
}

.wp-author-name a {
  color: inherit;
  text-decoration: none;
}

.wp-author-name a:hover {
  text-decoration: underline;
}

.wp-author-bio {
  margin: 0;
  font-size: .95rem;
  line-height: 1.65;
  color: #555;
}

@media (max-width: 575.98px) {
  .wp-author-box {
    gap: 12px;
    padding: 15px;
  }

  .wp-author-avatar,
  .wp-author-avatar img {
    width: 56px;
    height: 56px;
  }

  .wp-author-avatar {
    flex-basis: 56px;
  }
}



/* ==================================================
   Webpratique - Même conteneur pour pages et billets
   ================================================== */

body.page:not(.home) .wp-content-layout .site-main {
    min-width: 0;
    background: var(--wp-panel, #fff);
    border: 1px solid #e9e9e7;
    border-radius: 18px;
    padding: clamp(18px, 2.5vw, 38px);
}

/* Images des pages */
body.page:not(.home) .wp-content-layout .entry-content img {
    max-width: 100%;
    height: auto;
}

/* Mobile */
@media (max-width: 575.98px) {
    body.page:not(.home) .wp-content-layout .site-main {
        border-radius: 13px;
        padding: 17px 15px;
    }
}



/* ==================================================
   WEBPRATIQUE - ACCUEIL : DERNIERS ARTICLES
   Premier article large, suivants sur 2 colonnes
   ================================================== */

/* Grand conteneur blanc, comme les billets */
.wp-home-news {
    background: #fff;
    border: 1px solid #e9e9e7;
    border-radius: 18px;
    padding: clamp(18px, 2.5vw, 38px);
    min-width: 0;
}

/* Annuler l'ancienne disposition forcée */
.wp-home-news > .row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
}

/* Deux colonnes pour les articles */
.wp-home-news > .row > .wp-home-news-item {
    flex: 0 0 50% !important;
    width: 50% !important;
    max-width: 50% !important;
    min-width: 0;
}

/* Premier article sur toute la largeur */
.wp-home-news > .row > .wp-home-news-item:first-child {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Cartes : image au-dessus du texte */
.wp-home-news .wp-home-card {
    display: flex !important;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid #ededeb;
    border-radius: 14px;
    overflow: hidden;
}

/* Images des articles */
.wp-home-news .wp-home-card-image {
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.wp-home-news .wp-home-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Premier article : image plus panoramique */
.wp-home-news-item:first-child .wp-home-card-image {
    aspect-ratio: 2 / 1;
}

/* Corps des cartes */
.wp-home-news .wp-home-card-body {
    width: 100%;
    padding: 16px;
}

/* Premier article : titre plus grand */
.wp-home-news-item:first-child .wp-home-card-title {
    font-size: clamp(1.5rem, 2.4vw, 2.3rem);
}

/* Éviter les débordements */
.wp-home-news .wp-home-card-title,
.wp-home-news .wp-home-excerpt {
    overflow-wrap: anywhere;
}

/* Mobile : une seule colonne */
@media (max-width: 767.98px) {

    .wp-home-news {
        padding: 15px;
        border-radius: 13px;
    }

    .wp-home-news > .row > .wp-home-news-item {
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .wp-home-news .wp-home-card-image,
    .wp-home-news-item:first-child .wp-home-card-image {
        aspect-ratio: 16 / 9;
    }

    .wp-home-news .wp-home-card-body {
        padding: 13px;
    }
}



/* Accueil : boucle des articles sans cadre extérieur */

.wp-home-news {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    min-width: 0;
}

/* Les cartes remplissent leur colonne */
.wp-home-news .wp-home-card {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

/* Images jusqu'aux bords */
.wp-home-news .wp-home-card-image {
    margin: 0;
    padding: 0;
}

/* Texte avec un peu d'air, sans excès */
.wp-home-news .wp-home-card-body {
    padding: 15px 17px 18px;
}

/* Titre de section */
.wp-home-news > .wp-home-heading {
    margin: 0 0 16px;
}
