/*
Theme Name: Icone FSE
Theme URI: https://new.icone.be
Author: Icone
Description: Thème WordPress FSE (Full Site Editing) reprenant l'identité visuelle du site icone.be — palette jaune/gris, typographie Aller, mise en page centrée.
Version: 1.0.3
Requires at least: 6.5
Requires PHP: 7.4
Text Domain: icone-fse
*/

body {
  background-color: var(--wp--preset--color--background);
  background-image: url("assets/img/diagonal-noise.png");
  background-repeat: repeat;
}
img {
  height: auto;
  max-width: 100%;
}


/* Layout */
header.wp-block-template-part {
  background-color: var(--wp--preset--color--background);
  margin-block: 0;
}
body.page-template-default .entry-content,
body.post-type-archive main,
body.tax-categorie main,
body.realisation-template-default main {
  background-color: var(--wp--preset--color--background);
  margin-block: 0;
  padding-bottom: 0 !important;
}
body.page-template-default .entry-content,
body.post-type-archive main,
body.tax-categorie main {
  padding-bottom: 5rem !important;
}
footer.wp-block-template-part {
  margin-block: 0;
}
footer.wp-block-template-part a {
  color: inherit;
}

/* Header */
.icone-main-nav,
.icone-main-nav .wp-block-navigation-item a {
  font-family: var(--wp--preset--font-family--georgia, Georgia, "Times New Roman", Times, serif);
}

@media (min-width: 768px) {
  .icone-main-nav ul.wp-block-navigation__container {
    border-bottom: 1px solid #b1b3b4;
    gap: 0;
    max-width: 500px;
  }
}

.icone-main-nav .wp-block-navigation-item {
  padding: 18px 0;
  border-bottom: 10px solid transparent;
  transition: all 0.3s ease-in-out;
}

.icone-main-nav .wp-block-navigation-item a {
  padding: 0 8px;
  text-decoration: none;
  color: #58585a;
}

@media (min-width: 768px) {
  .icone-main-nav .wp-block-navigation-item:not(:last-child) a {
    border-right: 1px solid #c0c1c2;
  }
}

.icone-main-nav .wp-block-navigation-item:hover {
  border-bottom-color: #ddd;
}

.icone-main-nav .wp-block-navigation-item.current-menu-ancestor,
.icone-main-nav .wp-block-navigation-item.current-menu-item {
  border-bottom-color: #ffed00;
}

.wp-block-navigation__responsive-container-close {
  right:var(--wp--preset--spacing--30);
}

/* content */

.wp-block-post-template.is-layout-grid {
  gap: 2px;
}

.wp-block-post-template.is-layout-grid > li {
  --padding: 15px;
  background: #ffffff;
  padding: var(--padding);
  box-sizing: border-box;
}
.wp-block-post-template.is-layout-grid > li .wp-block-post-featured-image {
  margin: calc(var(--padding) * -1) calc(var(--padding) * -1) var(--padding);
}

/* Métier/Studio pop-ups: small icon triggers a modal, as on icone.be */
.icone-popup-trigger {
  cursor: pointer;
  text-align: center;
}

/* Pages Métier / Studio : vignettes déclenchant les pop-ups */

.icone-popup-trigger:hover,
.icone-popup-trigger:focus-visible {
  opacity: 0.8;
}

.icone-popup-trigger h4 {
  margin-top: 8px;
}

.icone-popup-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 999;
}

.icone-popup-backdrop.is-open {
  display: block;
}

.icone-popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  background: #ffffff;
  max-width: 600px;
  width: calc(100% - 48px);
  max-height: 85vh;
  overflow-y: auto;
  padding: 40px 32px 32px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.icone-popup.is-open {
  display: block;
}

.icone-popup-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #58585a;
}

.icone-popup-close:hover {
  color: #000000;
}

.icone-popup iframe {
  max-width: 100%;
}

/* Mots-clés (free-form, inconsistent casing) are informational only —
   unlike the curated "Catégories" taxonomy, they are never a real
   browsable listing, so they should not read or behave as links. */
.wp-block-post-terms a {
  color: inherit;
  text-decoration: none;
  pointer-events: none;
  cursor: default;
}

body.icone-popup-open {
  overflow: hidden;
}

/* PAGES */

/* Home page */
body.home .icone-main-nav ul.wp-block-navigation__container {
  border-bottom: none;
}

body.home .extra-text {
  position: relative;
}

body.home .extra-text:before {
  background: var(--wp--preset--color--yellow);
  content: '';
  display: block;
  height: 40px;
  left: 50%;
  margin: -20px 0 0 -20px;
  position: absolute;
  top: 0;
  transform: rotate(45deg);
  width: 40px;
}

/* folio */
.submenu-categories select {
  max-width: 100%;
  width: 100%;
  text-align: center;
  /* font-size: var(--wp--preset--font-size--medium); */
  zoom: 1.7;
  text-transform: uppercase;
  border: 0;
  background-color: transparent;
}

/* Le lien « Toutes les catégories » juste avant le menu déroulant fait doublon
   avec sa 1re option : on le masque. */
.submenu-categories p:has(+ .wp-block-categories-dropdown) {
  display: none;
}

/* folio detail */
body.realisation-template-default .entry-content {
  --deco-height: 30px;
  padding-top: calc(var(--deco-height) + var(--wp--preset--spacing--30));
  position: relative;
}
body.realisation-template-default .entry-content:before {
  content: '';
  border-style: solid;
  border-width: var(--deco-height) var(--deco-height) 0 var(--deco-height);
  border-color: #f5f5f5 transparent transparent transparent;
  left: 50%;
  margin-left: calc(var(--deco-height) * -1);
  position: absolute;
  top: 0;
  z-index: 2;
}
body.realisation-template-default .icone-texte {
  display: block;
  text-align: center;
  font-size: var(--wp--preset--font-size--medium);
}
