/*
 Theme Name:   GP Child par Eroan Boyer
 Theme URI:    https://generatepress.com/premium/?ref=4657
 Description:  Thème enfant GeneratePress optimisé pour la web performance et le SEO. Intègre des fonctionnalités avancées qui n’impactent pas les temps de chargement et améliorent l’architecture du site.
 Author:       Eroan Boyer
 Author URI:   https://www.eboyer.com
 Template:     generatepress
 Version:      1.3.3
*/

/*--------------------------------------------------------------
# Global improvements over GeneratePress main.css
--------------------------------------------------------------*/

/**
 * Set links backgroud to transparent in Chrome.
 */

 html {
  -webkit-tap-highlight-color: transparent;
}

/**
 * Balance titles for better UI.
 */

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}

/**
 * Add a cursor to logo since link is managed by JS.
 */

 .site-branding-container {
  cursor: pointer;
}

/**
 * Display a rounded image on authors pages main title avatar.
 */

h1 img {
  margin-right: .75em;
}

h1 .avatar {
  border-radius: 50%;
}

/**
 * Center navigation and provide a generic class to center elements.
 */

.paging-navigation,
.text-center {
  text-align: center;
}

/**
 * Correct a bad margin on featured images.
 */

.no-featured-image-padding .featured-image {
  margin-left: 0 !important;
}

/**
 * Add a top margin to right sidebar on desktop.
 */

@media(max-width: 768px) {
  .sidebar {
    margin-top: 40px;
  }
}

/**
 * Prevent useless repaints and reflows.
 */

.sidebar,
.widget {
  contain: layout style;
}

/**
 * Prevent overflow-x out of screen.
 */

body .wp-block-search__label {
  width: auto;
}

/**
 * Improve default links style
 */

a {
  text-decoration-thickness: 3px;
	text-underline-offset: .25em;
}

.inside-article p:not(.simple) a:not(.simple):not(.wp-block-latest-posts__post-title),
.inside-article ul:not(.az-columns):not(.az-links) a:not(.simple):not(.wp-block-latest-posts__post-title):not([rel*="category"]) {
  text-decoration-line: underline;
}

/*--------------------------------------------------------------
# Web performance optimization
--------------------------------------------------------------*/

/**
 * Prevent footer rendering on initial rendering.
 */

.site-footer {
  content-visibility: auto;
  contain-intrinsic-height: 400px;
  contain-intrinsic-width: 100%;
}

@media(min-width: 768px) {
  .site-footer {
    contain-intrinsic-height: 300px;
  }
}

/**
 * Optimize Google Ads inserts to prevent CLS.
 */

.site-content ins {
  contain: content;
  display: block;
  height: 280px;
  width: 100%;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
}

/**
 * Reduce CLS and layout changes with embeds
 */

.instagram-media,
.twitter-tweet,
.tiktok-embed {
	contain: content;
  min-height: 300px;
}

/*--------------------------------------------------------------
# Specific to GeneratePerf
--------------------------------------------------------------*/

/**
 * Prevent vertical scroll when overlay is activated.
 */

body.overlayed {
  overflow: hidden;
  height: 100%;
}

/**
 * Increase main area padding with right sidebar.
 */

@media(min-width: 769px){
  .one-container.right-sidebar .site-main, .one-container.both-right .site-main {
    margin-right: 40px;
  }
}

/**
 * Improve icons alignment.
 */

svg.icon {
  vertical-align: middle;
}

/**
 * Mimic native <a> effect on hover.
 */

[data-goto]:hover,
[data-share-url]:hover,
.gb-query-loop-item {
  cursor: pointer;
}

[data-goto]:not(.button):not(.gb-button):hover {
  text-decoration: underline;
}

/**
 * Class used on some interface elements.
 */

.o50 {
  opacity: 50%;
}

/**
 * Subtitles styling (option in GeneratePerf).
 */

p[role="doc-subtitle"] {
  margin-top: 1em;
  padding: 1em;
  border-left: 3px solid var(--base);
  font-weight: 500;
  background-color: var(--base-2);
}

/**
 * Display featured image caption in articles (option in GeneratePerf).
 */

.featured-image + .caption {
  margin-top: 10px;
  text-align: right;
  opacity: .75;
}

/**
 * Add GeneratePerf border-radius option on interface elements.
 */

button, input, textarea {
  border-radius: var(--border-radius) !important;
}

/**
 * Add Breadcrumb specific style.
 */

.yoast-breadcrumbs {
  line-height: 40px;
}

.yoast-breadcrumbs a:hover {
  text-decoration: underline;
}

/*--------------------------------------------------------------
# Custom : enter your personal code under
--------------------------------------------------------------*/

[data-gpmodal-trigger]:hover {
  cursor: pointer;
}

@media(min-width: 768px) {
  .header-aligned-center:not([class*=nav-float-]) .inside-header {
    flex-direction: row !important;
    align-items: center;
    justify-content: space-between;
  }
  .inside-header .gb-container {
    margin-top: 0 !important;
  }
  .menu-bar-items {
    display: none !important;
  }
}

.site-logo {
  margin-top: 0 !important;
}

.featured-image img {
  width: 100%;
}

.wp-block-embed,
.wp-block-image {
  margin-bottom: 2em;
}

h2:not(.simple):not(.entry-title) {
  margin-top: 40px;
  position: relative;
}

h2:not(.simple):not(.entry-title)::before {
  display: block;
  position: absolute;
  width: 120px;
  height: 60px;
  left: -20px;
  bottom: -1px;
  z-index: -1;
  -content: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2890 1445" width="120" height="60"><path d="M0 1445C0 646.9 647 0 1445 0s1445 647 1445 1445H0z" fill="%23f9e0e7"/></svg>');
}

.wp-block-latest-posts__list.columns-1 > li {
  margin-bottom: 40px;
}

.site-footer ul {
  margin-left: 1em;
  list-style: square;
}

.page-title {
  display: flex;
  align-items: center;
}

.brands-container {
  margin: 2em 0;
}

@media(min-width: 600px) {
  .featured-first li:first-child {
    width: calc(66.66666% - .416665em) !important;
  }
  .featured-first li:nth-child(2),
  .featured-first li:nth-child(8),
  .featured-first li:nth-child(5n) {
    margin-right: 0 !important;
  }
  .featured-first li:nth-child(3n) {
    margin-right: 1.25em !important;
  }
}

.slide-labels {
  list-style-type: none;
  margin: 0 0 2em !important;
  line-height: 2em;
}

.post-tags,
.post-tags a {
  display: inline-block;
}

.post-categories {
  list-style-type: none;
  margin: 0 !important;
  line-height: 2em;
  display: inline-block;
}

.slide-labels li,
.post-categories li {
  display: inline-block;
  line-height: 1.9em;
}

.slide-labels li a,
.post-categories li a,
.tags-links a,
body.archive:not(.author) h1.page-title,
.post-tags a {
  display: inline-block;
  background-color: var(--base-2);
  border: 1px solid var(--base);
  color: var(--contrast-2);
  font-weight: 600;
  padding: .05em .85em;
  position: relative;
  box-shadow: 4px 4px var(--base);
  font-size: 14px !important;
  line-height: 1.6rem !important;
  margin-right: .66em;
  margin-bottom: .5em !important;
}

.tags-links a {
  margin-left: 10px;
  margin-bottom: 10px;
}

.slide-labels li a:hover,
.post-categories li a:hover,
.tags-links a:hover,
.post-tags a:hover {
  color: var(--contrast);
}

.tags-links .gp-icon {
  display: none;
}

.tags-links::before {
  content: "tags";
  text-transform: uppercase;
  font-weight: 700;
}

@media(max-width: 768px) {
  .entry-header .post-categories,
  .entry-header .post-tags {
    display: none !important;
  }
}

.spinner {
  display: none !important
}

/*--------------------------------------------------------------
# Google News
--------------------------------------------------------------*/

.google-news-card {
  border-top: 1px solid var(--base);
  padding-top: 30px;
  margin: 40px 0;
}

.google-news-button-container {
  margin-top: 2em;
  text-align: center;
}

.google-news-card a {
  border: 1px solid var(--base);
  border-radius: 5px;
  padding: 12px 18px;
  color: #000 !important;
  font-weight: 700;
  background-color: #fff;
}

.google-news-card a:hover {
  color: #000 !important;
  border-top-color: #0f9d58;
  border-right-color: #eb4132;
  border-bottom-color: #4086f4;
  border-left-color: #f8a808;
}

.google-news-card svg {
  vertical-align: middle !important;
  margin-left: .75em;
}

.menu-item > a > svg {
  fill: currentColor;
  margin-right: .4em;
  width: 18px;
  height: 18px;
  vertical-align: sub;
}

.dropdown-menu-toggle {
  padding-right: 5px !important;
}

.wp-block-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  column-gap: .4rem;
  row-gap: .4rem;
  counter-reset: list-number;
}

.wp-block-tag-cloud a {
  counter-increment: list-number;
  font-size: 1rem !important;
  padding: .12em .55em;
  border-radius: 2rem;
  border: 2px solid rgba(255, 255, 255, .5);
  text-transform: capitalize;
}

.wp-block-tag-cloud a::before {
  content:counter(list-number) ".";
  color: var(--light);
  margin-right: .25em;
  font-weight: 500;
}

.wp-block-tag-cloud a:hover {
  border-color: var(--light);
}

.inside-article .related-articles {
  border-top: 1px solid var(--base);
  padding-top: 30px;
}

.inside-right-sidebar .related-articles h2 {
  border-bottom: 1px solid var(--base);
  padding-bottom: 10px;
  margin-bottom: 30px;
}

/**
 * Copy section links
 */

 h2 a.copy,
 h3 a.copy {
   color: var(--contrast-3);
   opacity: 0;
 }
 
 h2 a.copied,
 h3 a.copied {
   color: var(--darker);
   opacity: 1;
 }
 
 h2:hover a,
 h3:hover a {
   opacity: 1;
 }

 .featured-image,
 .entry-content img {
  box-shadow: 8px 8px var(--base);
  border-radius: 15px;
  overflow: hidden;
}

.h4 {
  font-weight: 700;
  font-size: 1.3rem;
}

.site-logo h1 {
  margin: 2px 0 0;
  font-size: 17px;
  color: var(--contrast);
}

@media (min-width: 769px) {
  #right-sidebar {
      width: 320px;
  }
  body:not(.no-sidebar) #primary {
      width: calc(100% - 320px);
  }
}

.related-articles-container .related-articles {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 20px;
}

.social-share-top {
  display: flex;
  column-gap: 10px;
  align-items: center;
  justify-content: center;
}

.social-share-top svg:hover {
  fill: var(--darker);
}

@media(max-width: 767px) {
  .social-share-top {
    margin:1em 0;
  }
}

@media(min-width: 768px) {
  .social-share-top {
    float: right;
    margin-left: 20px;
    line-height: 2em;
  }
}

.mailerlite-form-field {
  text-align: center;
}

@media(min-width: 768px) {
  .hide-on-desktop {
    display: none !important;
  }
}
