/*
Theme Name: EMSAT
Theme URI: https://emsat.site
Author: EMSAT
Author URI: https://emsat.site
Description: Thème blocs (FSE) sur-mesure pour EMSAT — École des métiers du sport, de l'animation, du tourisme, du commerce et de la formation continue. Direction créative « dynamique & sportif ». Développé spécifiquement pour EMSAT, sans dépendance à un thème du marché.
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 8.1
Version: 1.2.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: emsat
Tags: full-site-editing, block-styles, custom-colors, education, formation
*/

/*
 * L'essentiel du style est piloté par theme.json (couleurs, typo, espacements).
 * Ce fichier ne contient que quelques ajustements globaux difficiles à exprimer
 * dans theme.json. Les composants métier (catalogue, fiche formation) sont
 * stylés par le plugin emsat-core.
 */

:root {
  --emsat-radius: 16px;
}

/* Titres un peu plus serrés que le défaut */
.wp-block-heading { letter-spacing: -0.02em; }

/* Boutons : micro-interaction */
.wp-block-button__link { transition: transform .15s ease, box-shadow .15s ease; }
.wp-block-button__link:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -10px rgba(255,90,38,.6); }

/* Liens de contenu */
.entry-content a { text-underline-offset: 3px; }

/* Petit utilitaire : puce colorée */
.emsat-eyebrow {
  font-family: var(--wp--preset--font-family--heading);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .75rem;
  font-weight: 700;
  color: var(--wp--preset--color--sport);
}

/* ---------- En-tête ---------- */
.emsat-header {
  background: var(--wp--preset--color--encre, #0E1116);
  color: #fff;
}
.emsat-header__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 16px var(--wp--preset--spacing--40, 2rem);
  display: flex;
  align-items: center;
  gap: 24px;
}
.emsat-header__brand {
  margin-right: auto; /* pousse le menu + bouton à droite */
  display: flex;
  align-items: center;
}
.emsat-header__brandlink {
  font-family: var(--wp--preset--font-family--heading, "Sora", sans-serif);
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}
/* Logo du site : hauteur maîtrisée, ratio conservé. */
.emsat-header .custom-logo-link {
  display: flex;
  align-items: center;
  line-height: 0;
}
.emsat-header .custom-logo {
  height: 44px;
  width: auto;
  max-width: 220px;
  display: block;
}
.emsat-header__nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.emsat-header__nav .emsat-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.emsat-header__nav a {
  color: var(--wp--preset--color--gris-clair, #F4F6F9);
  text-decoration: none;
  font-family: var(--wp--preset--font-family--heading, "Sora", sans-serif);
  font-weight: 600;
  font-size: 0.95rem;
}
.emsat-header__nav .emsat-menu a:hover,
.emsat-header__nav .emsat-menu .current-menu-item > a {
  color: var(--wp--preset--color--sport, #FF5A26);
}
.emsat-header__cta {
  background: var(--wp--preset--color--sport, #FF5A26);
  color: #fff !important;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 10px;
  white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease;
}
.emsat-header__cta:hover { text-decoration: none; }
.emsat-header__cta:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -10px rgba(255,90,38,.6); }

/* Bouton hamburger : masqué sur grand écran. */
.emsat-header__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid #2a2f38;
  border-radius: 10px;
  cursor: pointer;
}
.emsat-header__toggle span {
  display: block;
  height: 2px;
  width: 22px;
  margin: 0 auto;
  background: #fff;
  transition: transform .2s ease, opacity .2s ease;
}

@media (max-width: 860px) {
  .emsat-header__toggle { display: flex; }
  .emsat-header__nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    background: var(--wp--preset--color--encre, #0E1116);
    padding: 18px var(--wp--preset--spacing--40, 2rem) 26px;
    border-top: 1px solid #2a2f38;
    z-index: 20;
  }
  .emsat-header__inner { position: relative; }
  .emsat-header.is-open .emsat-header__nav { display: flex; }
  .emsat-header__nav .emsat-menu { flex-direction: column; align-items: flex-start; gap: 14px; }
  .emsat-header__cta { align-self: flex-start; }
  /* Croix quand le menu est ouvert. */
  .emsat-header.is-open .emsat-header__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .emsat-header.is-open .emsat-header__toggle span:nth-child(2) { opacity: 0; }
  .emsat-header.is-open .emsat-header__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- Pied de page (widgets) ---------- */
.emsat-footer {
  background: var(--wp--preset--color--encre, #0E1116);
  color: var(--wp--preset--color--gris-clair, #F4F6F9);
}
.emsat-footer__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: var(--wp--preset--spacing--50, 3.5rem) var(--wp--preset--spacing--40, 2rem) var(--wp--preset--spacing--40, 2rem);
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--wp--preset--spacing--50, 3.5rem);
}
.emsat-footer__title {
  font-family: var(--wp--preset--font-family--heading, "Sora", sans-serif);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 14px;
}
.emsat-footer__widget + .emsat-footer__widget { margin-top: 26px; }
.emsat-footer__col a { color: var(--wp--preset--color--gris-clair, #F4F6F9); text-decoration: none; }
.emsat-footer__col a:hover { color: var(--wp--preset--color--sport, #FF5A26); }
.emsat-footer__col p { font-size: .9rem; line-height: 1.6; color: #9aa2ad; }

/* Listes de widgets (menus, pôles) : sans puces, espacées. */
.emsat-footer__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: .9rem; }

.emsat-footer__bottom {
  border-top: 1px solid #2a2f38;
}
.emsat-footer__bottom p {
  max-width: 1160px;
  margin: 0 auto;
  padding: 18px var(--wp--preset--spacing--40, 2rem);
  font-size: .8rem;
  color: #7a828d;
}

@media (max-width: 900px) {
  .emsat-footer__inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .emsat-footer__inner { grid-template-columns: 1fr; gap: 28px; }
}
