/* -------------------------------------------------- */
/* ---------- Style en admin ---------- */
/* -------------------------------------------------- */

/* -------------------------------------------------- */
/* ---------- Éditeur de base ---------- */

html :where( .editor-visual-editor ),
.editor-styles-wrapper {
  color: var( --wp--preset--color--black );
  background-color: var( --wp--preset--color--white ) !important;
  font-size: 16px;
  line-height: 1.3;
}

html :where( .wp-block ) {
  margin-top: 0;
  margin-bottom: 0;
}

.editor-styles-wrapper .wp-block-post-title,
.editor-styles-wrapper .wp-block-heading {
  color: var( --wp--preset--color--dark );
}

.editor-styles-wrapper .has-dark-background-color:not( .is-style-color-border-rounded ):not( .is-style-color-border ) .wp-block-heading,
.editor-styles-wrapper .has-black-background-color:not( .is-style-color-border-rounded ):not( .is-style-color-border ) .wp-block-heading {
  color: var( --wp--preset--color--white );
}

.editor-styles-wrapper h1.wp-block-post-title,
.editor-styles-wrapper h1.wp-block-heading {
  font-size: calc( 16px * 1.2 * 1.2 * 1.2 * 1.2 * 1.2 * 1.2 );
}

.editor-styles-wrapper h2.wp-block-heading {
  font-size: calc( 16px * 1.2 * 1.2 * 1.2 * 1.2 * 1.2 );
  margin-top: 25px;
  margin-bottom: 25px;
}

.editor-styles-wrapper h3.wp-block-heading {
  font-size: calc( 16px * 1.2 * 1.2 * 1.2 * 1.2 );
  margin-top: 25px;
  margin-bottom: 25px;
}

.editor-styles-wrapper h4.wp-block-heading {
  font-size: calc( 16px * 1.2 * 1.2 * 1.2 );
  margin-top: 20px;
  margin-bottom: 15px;
}

.editor-styles-wrapper h5.wp-block-heading {
  font-size: calc( 16px * 1.2 * 1.2 );
  margin-top: 20px;
  margin-bottom: 15px;
}

.editor-styles-wrapper h6.wp-block-heading {
  font-size: calc( 16px * 1.2 );
  margin-top: 20px;
  margin-bottom: 15px;
}

.editor-styles-wrapper .wp-block-heading:first-child {
  margin-top: 0 !important;
}

.editor-styles-wrapper .wp-block-heading:last-child {
  margin-bottom: 0 !important;
}

/* ----- Paragraphes ----- */
.editor-styles-wrapper p.wp-block-paragraph {
  margin-top: 10px;
  margin-bottom: 20px;
}

.editor-styles-wrapper p.wp-block-paragraph:first-child {
  margin-top: 0;
}

.editor-styles-wrapper p.wp-block-paragraph:last-child {
  margin-bottom: 0;
}

.editor-styles-wrapper p.wp-block-paragraph.is-style-no-margin-bottom {
  margin-bottom: 0;
}

.editor-styles-wrapper p.wp-block-paragraph.is-style-no-margin-bottom + * {
  margin-top: 0 !important;
}

/* ----- Listes ----- */
.editor-styles-wrapper .wp-block-list {
  margin-top: 10px;
  margin-bottom: 20px;
}

.editor-styles-wrapper .wp-block-list:first-child {
  margin-top: 0;
}

.editor-styles-wrapper .wp-block-list:last-child {
  margin-bottom: 0;
}

.editor-styles-wrapper ul.wp-block-list {
  padding: 0 0 0 20px;
}

.editor-styles-wrapper ol.wp-block-list {
  padding: 0 0 0 30px;
}

.editor-styles-wrapper .wp-block-list li {
  margin-top: 10px;
  margin-bottom: 10px;
}

.editor-styles-wrapper .wp-block-list li:first-child {
  margin-top: 0;
}

.editor-styles-wrapper .wp-block-list li:last-child {
  margin-bottom: 0;
}

/* ----- Tailles de texte ----- */
:where( .editor-styles-wrapper ) .has-small-large-font-size {
  font-size: 14px;
}

:where( .editor-styles-wrapper ) .has-medium-large-font-size {
  font-size: calc( 16px * 1.2 * 1.2 * 1.2 );
}

:where( .editor-styles-wrapper ) .has-large-large-font-size {
  font-size: calc( 16px * 1.2 * 1.2 * 1.2 * 1.2 );
}

:where( .editor-styles-wrapper ) .has-x-large-font-size {
  font-size: calc( 16px * 1.2 * 1.2 * 1.2 * 1.2 * 1.2 );
}

/* ----- Autres ----- */
.editor-styles-wrapper mark {
  background-color: transparent !important;
}

/* -------------------------------------------------- */
/* ---------- Affichage des blocs groupes/colonnes ---------- */

.editor-styles-wrapper .wp-block-columns {
  margin-top: 20px;
  margin-bottom: 20px;
  gap: 20px;
}

.editor-styles-wrapper .wp-block-columns.is-style-big-gap,
.editor-styles-wrapper .wp-block-columns.is-style-reverse-mobile-big-gap {
  gap: 60px;
}

.editor-styles-wrapper .wp-block-columns:first-child {
  margin-top: 0;
}

.editor-styles-wrapper .wp-block-columns:last-child {
  margin-bottom: 0;
}

.wp-block-group.has-background,
.wp-block-column.has-background {
  padding: 16px;
}

/* -------------------------------------------------- */
/* ---------- Angles arrondis ---------- */

/* ----- Image avec angles arrondis ----- */
.wp-block-image.is-style-rounded img,
.wp-block-image .is-style-rounded img {
  border-radius: 10px;
}

/* ----- Groupe/colonne avec angles arrondis ----- */
.wp-block-group.has-background.is-style-rounded,
.wp-block-group.has-background.is-style-color-border-rounded,
.wp-block-column.has-background.is-style-rounded,
.wp-block-column.has-background.is-style-color-border-rounded,
.wp-block-cover.is-style-rounded {
  border-radius: 10px;
}

/* ----- Groupe/colonne avec bordure colorée ----- */
.editor-styles-wrapper .wp-block-group.has-background.is-style-color-border,
.editor-styles-wrapper .wp-block-group.has-background.is-style-color-border-rounded,
.editor-styles-wrapper .wp-block-column.has-background.is-style-color-border,
.editor-styles-wrapper .wp-block-column.has-background.is-style-color-border-rounded {
  background-color: var( --wp--preset--color--white ) !important;
  border: 1px solid var( --wp--preset--color--black );
}

.editor-styles-wrapper .wp-block-group.has-background.is-style-color-border.has-white-background-color,
.editor-styles-wrapper .wp-block-group.has-background.is-style-color-border-rounded.has-white-background-color,
.editor-styles-wrapper .wp-block-column.has-background.is-style-color-border.has-white-background-color,
.editor-styles-wrapper .wp-block-column.has-background.is-style-color-border-rounded.has-white-background-color {
  border-color: var( --wp--preset--color--white );
}

.editor-styles-wrapper .wp-block-group.has-background.is-style-color-border.has-light-background-color,
.editor-styles-wrapper .wp-block-group.has-background.is-style-color-border-rounded.has-light-background-color,
.editor-styles-wrapper .wp-block-column.has-background.is-style-color-border.has-light-background-color,
.editor-styles-wrapper .wp-block-column.has-background.is-style-color-border-rounded.has-light-background-color {
  border-color: var( --wp--preset--color--light );
}

.editor-styles-wrapper .wp-block-group.has-background.is-style-color-border.has-medium-background-color,
.editor-styles-wrapper .wp-block-group.has-background.is-style-color-border-rounded.has-medium-background-color,
.editor-styles-wrapper .wp-block-column.has-background.is-style-color-border.has-medium-background-color,
.editor-styles-wrapper .wp-block-column.has-background.is-style-color-border-rounded.has-medium-background-color {
  border-color: var( --wp--preset--color--medium );
}

.editor-styles-wrapper .wp-block-group.has-background.is-style-color-border.has-dark-background-color,
.editor-styles-wrapper .wp-block-group.has-background.is-style-color-border-rounded.has-dark-background-color,
.editor-styles-wrapper .wp-block-column.has-background.is-style-color-border.has-dark-background-color,
.editor-styles-wrapper .wp-block-column.has-background.is-style-color-border-rounded.has-dark-background-color  {
  border-color: var( --wp--preset--color--dark );
}

.editor-styles-wrapper .wp-block-group.has-background.is-style-color-border.has-black-background-color,
.editor-styles-wrapper .wp-block-group.has-background.is-style-color-border-rounded.has-black-background-color,
.editor-styles-wrapper .wp-block-column.has-background.is-style-color-border.has-black-background-color,
.editor-styles-wrapper .wp-block-column.has-background.is-style-color-border-rounded.has-black-background-color {
  border-color: var( --wp--preset--color--black );
}

/* -------------------------------------------------- */
/* ---------- Boutons ---------- */

/* ----- Style de base ----- */
.editor-styles-wrapper .wp-block-file a,
.editor-styles-wrapper .wp-block-button__link {
  color: var( --wp--preset--color--white );
  background-color: var( --wp--preset--color--black );
  font-size: 16px !important;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  line-height: 19px;
  padding: 15px 25px !important;
  border: 1px solid var( --wp--preset--color--black );
  border-radius: 0 !important;
  display: inline-block;
  transition: all .3s ease-out;
  box-sizing: border-box;
}

/* ----- Style primaire ----- */
.editor-styles-wrapper .wp-block-file a,
.editor-styles-wrapper .wp-block-button__link,
.editor-styles-wrapper .wp-block-button.is-style-primary .wp-block-button__link {
  color: var( --wp--preset--color--white );
  background-color: var( --wp--preset--color--dark );
  border-color: var( --wp--preset--color--dark );
}

.editor-styles-wrapper .wp-block-file a:hover,
.editor-styles-wrapper .wp-block-button__link:hover,
.editor-styles-wrapper .wp-block-button.is-style-primary .wp-block-button__link:hover {
  color: var( --wp--preset--color--dark );
  background-color: var( --wp--preset--color--white );
}

.editor-styles-wrapper .has-dark-background-color .wp-block-file a,
.editor-styles-wrapper .has-dark-background-color .wp-block-button__link,
.editor-styles-wrapper .has-dark-background-color .wp-block-button.is-style-primary .wp-block-button__link,
.editor-styles-wrapper .has-black-background-color .wp-block-file a,
.editor-styles-wrapper .has-black-background-color .wp-block-button__link,
.editor-styles-wrapper .has-black-background-color .wp-block-button.is-style-primary .wp-block-button__link {
  color: var( --wp--preset--color--dark );
  background-color: var( --wp--preset--color--white );
  border-color: var( --wp--preset--color--white );
}

.editor-styles-wrapper .has-dark-background-color .wp-block-file a:hover,
.editor-styles-wrapper .has-dark-background-color .wp-block-button__link:hover,
.editor-styles-wrapper .has-dark-background-color .wp-block-button.is-style-primary .wp-block-button__link:hover,
.editor-styles-wrapper .has-black-background-color .wp-block-file a:hover,
.editor-styles-wrapper .has-black-background-color .wp-block-button__link:hover,
.editor-styles-wrapper .has-black-background-color .wp-block-button.is-style-primary .wp-block-button__link:hover {
  color: var( --wp--preset--color--white );
  background-color: transparent;
}

/* ----- Style secondaire ----- */
.editor-styles-wrapper .wp-block-button.is-style-secondary .wp-block-button__link {
  color: var( --wp--preset--color--dark );
  background-color: transparent;
  border-color: var( --wp--preset--color--dark );  
}

.editor-styles-wrapper .wp-block-button.is-style-secondary .wp-block-button__link:hover {
  color: var( --wp--preset--color--white );
  background-color: var( --wp--preset--color--dark );
}

.editor-styles-wrapper .has-dark-background-color .wp-block-button.is-style-secondary .wp-block-button__link,
.editor-styles-wrapper .has-black-background-color .wp-block-button.is-style-secondary .wp-block-button__link {
  color: var( --wp--preset--color--white );
  border-color: var( --wp--preset--color--white );
}

.editor-styles-wrapper .has-dark-background-color .wp-block-button.is-style-secondary .wp-block-button__link:hover,
.editor-styles-wrapper .has-black-background-color .wp-block-button.is-style-secondary .wp-block-button__link:hover {
  color: var( --wp--preset--color--dark );
  background-color: var( --wp--preset--color--white );
}

/* ----- Style tertiaire ----- */
.editor-styles-wrapper .wp-block-button.is-style-medium .wp-block-button__link {
  color: var( --wp--preset--color--white );
  background-color: var( --wp--preset--color--medium );
  border-color: var( --wp--preset--color--medium );
}

.editor-styles-wrapper .wp-block-button.is-style-medium .wp-block-button__link:hover {
  color: var( --wp--preset--color--white );
  background-color: var( --wp--preset--color--dark );
  border-color: var( --wp--preset--color--dark );
}

.editor-styles-wrapper .has-medium-background-color .wp-block-button.is-style-medium .wp-block-button__link {
  color: var( --wp--preset--color--dark );
  background-color: var( --wp--preset--color--white );
  border-color: var( --wp--preset--color--white );
}

.editor-styles-wrapper .has-medium-background-color .wp-block-button.is-style-medium .wp-block-button__link:hover {
  color: var( --wp--preset--color--white );
  background-color: transparent;
  border-color: var( --wp--preset--color--white );
}

.editor-styles-wrapper .has-dark-background-color .wp-block-button.is-style-medium .wp-block-button__link,
.editor-styles-wrapper .has-black-background-color .wp-block-button.is-style-medium .wp-block-button__link {
  color: var( --wp--preset--color--white );
  background-color: var( --wp--preset--color--medium );
  border-color: var( --wp--preset--color--medium );
}

.editor-styles-wrapper .has-dark-background-color .wp-block-button.is-style-medium .wp-block-button__link:hover,
.editor-styles-wrapper .has-black-background-color .wp-block-button.is-style-medium .wp-block-button__link:hover {
  color: var( --wp--preset--color--white );
  background-color: transparent;
  border-color: var( --wp--preset--color--white );
}

/* ----- Lien simple ----- */
.editor-styles-wrapper .wp-block-button.is-style-tertiary .wp-block-button__link {
  color: var( --wp--preset--color--dark );
  background-color: transparent;
  text-decoration: underline;
  padding: 0 !important;
  border: 0;
  border-radius: 0 !important;
}

.editor-styles-wrapper .wp-block-button.is-style-tertiary .wp-block-button__link:hover {
  opacity: .75;
}

.editor-styles-wrapper .has-dark-background-color .wp-block-button.is-style-tertiary .wp-block-button__link,
.editor-styles-wrapper .has-black-background-color .wp-block-button.is-style-tertiary .wp-block-button__link {
  color: var( --wp--preset--color--white );
}

/* -------------------------------------------------- */
/* ---------- Blocs personnalisés ---------- */

/* ----- Diaporama ----- */
.editor-styles-wrapper .block-slider-wrapper {
  display: grid;
  grid-template-columns: repeat( 3, 1fr );
  gap: 10px;
}

.editor-styles-wrapper .wp-block-column .block-slider-wrapper {
  grid-template-columns: repeat( 2, 1fr );
}

.editor-styles-wrapper .block-slider-slide {
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
}

.editor-styles-wrapper .block-slider-slide img {
  min-width: 100%;
  width: 100%;
  max-width: none;
  min-height: 100%;
  object-fit: cover;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate( -50%, -50% );
}

/* ----- Diaporama de logos ----- */
.editor-styles-wrapper .logos-slider-wrapper {
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.editor-styles-wrapper .logos-slider-slide img {
  width: auto;
  max-height: 90px;
}

/* ----- FAQ ----- */
.editor-styles-wrapper .qas-item-question {
  font-size: 20px;
  font-weight: 700;
}

/* ----- Témoignages ----- */
.editor-styles-wrapper .testimonials-block {
  display: grid;
  grid-template-columns: repeat( 2, 1fr );
  gap: 20px;
}

.editor-styles-wrapper .testimonial-preview {
  padding: 16px;
}

.editor-styles-wrapper .testimonial-preview-title {
  font-size: 20px;
  font-weight: 700;
}

.editor-styles-wrapper .testimonial-preview-author {
  text-align: right;
}
