/*
 Theme Name:   GeneratePerf
 Theme URI:    https://generatepress.com/premium/?ref=4657
 Description:  GeneratePress child theme optimized for web performance and SEO. Includes advanced functionalities that does not impact loading times and improve website architecture.
 Author:       Agence Web Performance
 Author URI:   https://agencewebperformance.fr/
 Template:     generatepress
 Text Domain:  generateperf
 Version:      1.9.2
*/

/*--------------------------------------------------------------
# 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 external icons to _blank links.
 */

 .entry-content p a[target="_blank"]::after,
 .entry-content li a[target="_blank"]::after {
   display: inline-block;
   margin-left: .25em;
   width: .75em;
   height: .75em;
   vertical-align: -.125em;
   content: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z" fill="%2318748B"/></svg>');
 }

/**
 * 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 {
	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;
}

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

/**
 * Prevent image rendering when unnecessary.
 */

img[width][height] {
  content-visibility: auto;
}

/**
 * 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: top;
}

/**
 * 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%;
}

/**
 * Top progress bar styling (option in GeneratePerf).
 */

.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  max-width: 100%;
  z-index: 99999;
  height: 5px;
}

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

p[role="doc-subtitle"] {
  margin-top: 1em;
}

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

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

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

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

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

.site-footer ul {
	list-style: none;
	margin-left: 0;
}