/*
 Theme Name:   GeneratePerf Child Theme
 Theme URI:    https://agencewebperformance.fr/prestations/creation-site-performant/
 Author:       Agence Web Performance
 Author URI:   https://agencewebperformance.fr/
 Template:     generatepress
 Text Domain:  generateperf_child
 Version:      1.1.8
 License: GPLv3
 License URI: https://www.gnu.org/licenses/gpl-3.0.html
*/

/**
 * Components spacing based on root 10px (1 rem).
 */

:root {
  --spacing-100: .5rem; /* 8px */
  --spacing-200: 1rem; /* 16px */
  --spacing-300: 1.5rem; /* 24px */
  --spacing-400: 2rem; /* 32px */
  --spacing-500: 2.5rem; /* 40px */
  --spacing-600: 3rem; /* 48px */
  --spacing-700: 3.5rem; /* 56px */
  --spacing-800: 4rem; /* 64px */
  --spacing-900: 5rem; /* 80px */
  --spacing-1000: 7rem; /* 112px */
}

/**
 * Scrollbar color.
 */

:root {
  scrollbar-color: var(--primary) var(--lightest);
}

/**
 * Beautiful lists.
 */

li::marker {
  color: var(--primary);
}

/**
 * Beautiful inputs.
 */

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--primary);
}

/**
 * Beautiful Blockquotes.
 */

 blockquote cite {
  display: block;
  font-style: normal;
  font-size: 1rem;
  margin-top: var(--spacing-200);
  color: var(--dark);
}

/**
 * Add missing space.
 */

.wp-block-image,
.wp-block-embed {
  margin-bottom: var(--spacing-300);
}

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

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

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

/**
 * Add external icons to _blank links.
 */

.entry-content p a[target="_blank"]::after,
.entry-content li a[target="_blank"]::after {
  display: inline-block;
  content: "";
  margin-left: .25em;
  width: .8em;
  height: .8em;
  aspect-ratio: 1;
	clip-path: shape(from 62.5% 0%,arc by 0% 12.5% of 6.25% large ccw,hline by 16.15%,line to 39.34% 51.84%,arc by 8.85% 8.85% of 6.25% small ccw,line to 87.5% 21.35%,vline to 37.5%,arc by 12.5% 0% of 6.25% large ccw,vline to 6.25%,arc by -6.25% -6.25% of 6.25% small ccw,hline to 62.5%,close,move to 15.63% 6.25%,arc by -15.63% 15.63% of 15.63% small ccw,vline by 62.5%,arc by 15.63% 15.63% of 15.63% small ccw,hline by 62.5%,arc by 15.63% -15.63% of 15.63% small ccw,vline to 62.5%,arc by -12.5% 0% of 6.25% large ccw,vline by 21.88%,arc by -3.13% 3.13% of 3.13% small cw,hline to 15.63%,arc by -3.13% -3.13% of 3.13% small cw,vline to 21.88%,arc by 3.13% -3.13% of 3.13% small cw,hline by 21.88%,arc by 0% -12.5% of 6.25% large ccw,hline to 15.63%,close);
  vertical-align: -.075em;
  background-color: currentColor;
 }

/**
 * Improve default links style
 */

 .entry-content a:not(.simple):not(.wp-block-latest-posts__post-title) {
  color: var(--darkest);
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--secondary);
  text-underline-offset: .25em;
}

.entry-content a:not(.simple):not(.wp-block-latest-posts__post-title):hover {
  color: var(--primary);
  text-decoration-color: var(--darkest);
}

/**
 * Separator.
 */

.separator {
  background-color: var(--medium);
}

/**
 * Simple lists in footer.
 */

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

/**
 * Beautiful SVGs in menus.
 */

.menu-item-icon {
  width: 22px;
  height: 22px;
  margin-right: var(--spacing-100);
  fill: currentColor;
  vertical-align: sub;
}

/**
 * Featured images full width.
 */

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

/**
 * Custom design for main images captions.
 */

.featured-image figcaption::before {
  content: "";
  display: block;
  position: absolute;
  top: -24px;
  left: 25px;
  height: 0px;
  width: 0px;
  border-right: solid 25px transparent;
  border-left: solid 25px transparent;
  border-bottom: solid 25px var(--light);
}

/**
 * Custom subtitles styling.
 */

p[role="doc-subtitle"] {
    position: relative;
    margin: 35px 0;
    padding: 28px 32px;
    background-color: var(--primary);
    background-image: linear-gradient(135deg, var(--primary) 0%, color-mix(in srgb, var(--primary) 80%, var(--lightest)) 100%);
    color: var(--lightest);
    font-size: 1.15em;
    line-height: 1.6;
    border-radius: 12px;
    transform: skewY(-1.5deg);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

p[role="doc-subtitle"]::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 20px;
    height: 15px;
    width: 70%;
    background-color: color-mix(in srgb, var(--primary) 85%, var(--darkest));
    border-radius: 6px;
    z-index: -1;
}

/**
 * Reduce titles size for mobile.
 */

@media(max-width: 768px) {
  h4 {
    font-size: 1.25rem;
  }

  h5 {
    font-size: 1.125rem;
  }
}

/**
 * Citation.
 */

blockquote {
  border-left-color: var(--primary);
}

blockquote::before {
  content: "";
  display: block;
  aspect-ratio: 1.278;
	clip-path: shape(from 39.07% 50.08%,vline by 49.92%,hline to 0%,vline to 47.48%,curve by 35.16% -47.48% with 0% -25.35%/15.61% -46.13%,vline by 11.53%,curve by -26.14% 35.95% with -14.59% 1.35%/-26.14% 16.94%,curve by 2.03% 2.6% with 0% 1.45%/0.89% 2.6%,close,move by 60.93% 0%,vline by 49.92%,hline by -39.07%,vline to 47.48%,curve by 35.2% -47.48% with 0% -25.35%/15.61% -46.13%,vline by 11.53%,curve by -26.18% 35.95% with -14.63% 1.35%/-26.18% 16.94%,curve by 2.03% 2.6% with 0% 1.45%/0.89% 2.6%,close);
  width: 48px;
  background-color: var(--primary);
  margin-bottom: var(--spacing-200);
}

/**
 * Custom code.
 */

.entry-header .entry-meta {
    display: flex;
    flex-wrap: wrap;
    align-content: center;
}

/*******************************************************************************
 * 13. TABLEAUX
 ******************************************************************************/

/* Conteneur responsive pour les tableaux */
.table-responsive {
  overflow-x: auto;
  max-width: 100%;
  margin: 2em 0;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Style des tableaux amélioré */
.entry-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: none;
  margin: 0;
  background-color: white;
}

/* En-tête du tableau */
.entry-content thead th {
  background-color: var(--primary);
  color: white;
  padding: 15px;
  text-align: left;
  font-weight: 600;
  font-size: 1.05em;
  position: sticky;
  top: 0;
  z-index: 2;
}

/* Premier et dernier th avec des coins arrondis */
.entry-content thead th:first-child {
  border-top-left-radius: 8px;
}

.entry-content thead th:last-child {
  border-top-right-radius: 8px;
}

/* Cellules du tableau */
.entry-content td {
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
}

/* Alternance de couleur pour les lignes */
.entry-content tbody tr:nth-child(even) {
  background-color: var(--light);
}

/* Dernière ligne sans bordure inférieure */
.entry-content tbody tr:last-child td {
  border-bottom: none;
}

/* Dernière ligne avec des coins arrondis en bas */
.entry-content tbody tr:last-child td:first-child {
  border-bottom-left-radius: 8px;
}

.entry-content tbody tr:last-child td:last-child {
  border-bottom-right-radius: 8px;
}

/* Style pour les tableaux responsives dans Gutenberg */
.wp-block-table {
  overflow-x: auto;
  max-width: 100%;
}

/*******************************************************************************
 * 14. MAILLAGE INTERNE
 ******************************************************************************/

/* Style des boîtes de maillage interne */
.internal-link-box {
  display: flex;
  flex-wrap: wrap;
  margin: 25px 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  border: 1px solid #eee;
  position: relative;
  background: #fff;
}

/* Étiquette de date */
.internal-link-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: var(--primary);
  color: var(--lightest);
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 4px;
  z-index: 2;
  font-weight: 500;
}

/* Image au ratio 16:9 prenant 50% de la largeur */
.internal-link-thumb {
  width: 50%;
  position: relative;
}

.internal-link-thumb img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 16/9;
  border-radius: 0; /* Supprime le radius par défaut des images */
}

/* Titre et contenu */
.internal-link-title {
  width: 50%;
  padding: 15px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: 15px;
}

.internal-link-title a {
  display: block;
  font-size: 1.1em;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
  color: var(--darkest);
}

.internal-link-title a:hover,
.internal-link-box:hover a {
  color: var(--primary);
}

/* Nombre de commentaires */
.internal-link-comments {
  margin-top: 8px;
  display: flex;
  align-items: center;
  color: #777;
  font-size: 0.85em;
}

.internal-link-comments svg {
  margin-right: 5px;
}

/* Responsive pour mobile */
@media (max-width: 600px) {
  .internal-link-thumb,
  .internal-link-title {
    width: 100%;
  }
  
  .internal-link-thumb img {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
  
  .internal-link-badge {
    top: 10px;
    right: 10px;
  }
}

.home-meta {
    align-items: center;
    color: var(--dark);
    column-gap: 0.5em;
    display: inline-flex;
    font-size: 15px;
    margin-bottom: 0px
}

.home-meta .gb-shape svg {
    width: 16px;
    height: 16px;
    fill: currentColor
}

.home-meta-container {
    margin-bottom: -16px
}

p.simple > a {
  text-decoration-line: none !important;
}