/*
Theme Name: G2RD Child
Theme URI: https://g2rd.fr
Author: Sebastien GERARD
Author URI: https://g2rd.fr
Description: Thème enfant du thème G2RD FSE. Permet de surcharger les templates, les styles et les fonctions du thème parent sans modifier ses fichiers.
Template: g2rd-theme
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 8.0
License: EUPL-1.2
License URI: https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
Text Domain: g2rd-child
*/

/*
 * Les styles du thème parent sont chargés automatiquement par WordPress (FSE).
 * Ajouter ici uniquement les surcharges CSS spécifiques à ce site.
 *
 * Exemple :
 *   .wp-block-group {
 *     padding: 2rem;
 *   }
 */
/* =========================================================
   Fallback minimal pour g2rd-theme
   Reste uniquement ce que theme.json ne pilote pas proprement
   ========================================================= */

/* =========================================================
   Fallback minimal pour la home Kevin Holtz
   Ce fichier ne garde que ce que theme.json ne couvre pas proprement
   ========================================================= */

/* ---------------------------------------------------------
   Méta éditoriale locale
   --------------------------------------------------------- */
.kh-kicker,
.kh-section-kicker {
  margin: 0 0 1rem;
  color: var(--wp--preset--color--kh-gold);
  font-size: var(--wp--preset--font-size--xs);
  font-weight: var(--wp--custom--font-weight--bold);
  letter-spacing: 0.28em;
  line-height: var(--wp--custom--line-height--meta);
  text-transform: uppercase;
}

.kh-section-title {
  max-width: var(--wp--custom--container--title);
}

.kh-muted,
.kh-hero__text {
  max-width: 42rem;
}

.kh-separator,
.kh-cover-separator {
  width: 70px;
  margin-block: 0 2rem;
  border: 0;
  border-top: 4px solid var(--wp--preset--color--kh-gold);
}

.kh-cover-separator {
  border-top-color: var(--wp--preset--color--kh-gold-soft);
}

/* ---------------------------------------------------------
   Hero local
   --------------------------------------------------------- */
.kh-hero {
  position: relative;
  overflow: hidden;
}

.kh-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 42vw;
  height: 42vw;
  background: radial-gradient(
    circle,
    rgba(154, 100, 19, 0.16),
    transparent 65%
  );
  pointer-events: none;
}

.kh-hero__grid {
  position: relative;
  z-index: 1;
}

/* .kh-hero__title : surcharge retirée — la typographie du titre (font-size 2xl,
   line-height tight, letter-spacing) est pilotée par theme.json (elements.h1). */

.kh-hero__media {
  position: relative;
}

.kh-hero__image img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  box-shadow: 0 30px 70px rgba(28, 18, 8, 0.22);
}

.kh-hero__badge {
  position: absolute;
  left: -1.5rem;
  bottom: -1.5rem;
  z-index: 2;
  max-width: 210px;
  padding: 1.25rem 1.4rem;
  background: var(--wp--preset--color--kh-gold);
  color: var(--wp--preset--color--white);
}

.kh-badge__title {
  margin: 0;
  /* color: inherit conservé : contexte inversé (titre clair sur badge doré).
     Typo (font-size/line-height/font-weight) retirée — pilotée par theme.json. */
  color: inherit;
}

.kh-badge__text {
  margin: 0.55rem 0 0;
  color: inherit;
  font-size: 0.66rem;
  font-weight: var(--wp--custom--font-weight--bold);
  letter-spacing: 0.16em;
  line-height: var(--wp--custom--line-height--meta);
  text-transform: uppercase;
}

/* ---------------------------------------------------------
   Images locales spécifiques
   --------------------------------------------------------- */
.kh-about__image img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 999px;
}

.kh-faq-image img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 15px;
}

/* ---------------------------------------------------------
   Cartes locales
   --------------------------------------------------------- */
.kh-card {
  padding: clamp(1.6rem, 3vw, 2.5rem);
  background: var(--wp--preset--color--white);
  border: 1px solid rgba(214, 201, 172, 0.5);
  border-radius: 15px;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.kh-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 50px rgba(28, 18, 8, 0.08);
}

.kh-card__icon {
  margin: 0 0 1.4rem;
  color: var(--wp--preset--color--kh-gold);
  font-size: 2rem;
  line-height: 1;
}

.kh-card__title {
  margin: 0 0 1rem;
  /* Typo et couleur retirées — pilotées par theme.json (elements.heading). */
}

.kh-card__text {
  margin: 0;
  color: var(--wp--preset--color--kh-muted);
  font-size: 0.9rem;
  line-height: var(--wp--custom--line-height--body);
}

/* ---------------------------------------------------------
   Bloc citation local
   --------------------------------------------------------- */
.kh-quote-mark {
  margin: 0;
  color: rgba(214, 201, 172, 0.7);
  font-size: clamp(5rem, 10vw, 9rem);
  line-height: 0.6;
}

.kh-quote {
  max-width: 850px;
  margin: 0 auto;
  padding: 0;
  border: 0;
}

.kh-quote p {
  color: var(--wp--preset--color--kh-gold);
  line-height: 1.25;
}

.kh-quote cite {
  display: block;
  margin-top: 2rem;
  color: var(--wp--preset--color--kh-ink);
  font-size: 0.8rem;
  font-style: normal;
  font-weight: var(--wp--custom--font-weight--bold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------
   Cover CTA local
   --------------------------------------------------------- */
.kh-cover-cta {
  min-height: 430px;
}

.kh-cover-title {
  max-width: 620px;
  /* color: inherit conservé : contexte inversé (titre clair sur cover sombre),
     hérite du blanc défini dans theme.json (blocks.core/cover). Aucune couleur ni
     typo en dur — la typographie du titre vient de theme.json (elements.heading/h*). */
  color: inherit;
}

.kh-cover-text {
  max-width: 560px;
  color: var(--wp--preset--color--white);
  font-size: 1.05rem;
  line-height: var(--wp--custom--line-height--body);
}

/* ---------------------------------------------------------
   Variation light du bouton
   Laisse cette règle ici tant que tu n’enregistres pas une vraie variation
   --------------------------------------------------------- */
/* .wp-block-button.is-style-kh-light .wp-block-button__link,
.wp-block-button.kh-btn-light .wp-block-button__link {
  background: var(--wp--preset--color--white);
  color: var(--wp--preset--color--kh-ink);
  border: 1px solid var(--wp--preset--color--white);
  box-shadow: var(--wp--preset--shadow--xs);
} */

.wp-block-button.is-style-kh-light .wp-block-button__link:hover,
.wp-block-button.kh-btn-light .wp-block-button__link:hover {
  background: var(--wp--preset--color--kh-gold-soft);
  color: var(--wp--preset--color--kh-ink);
  border-color: var(--wp--preset--color--kh-gold-soft);
}

/* ---------------------------------------------------------
   G2RD Filterable Grid
   CSS retiré du thème enfant — styling géré directement dans Gutenberg.
   --------------------------------------------------------- */

/* ---------------------------------------------------------
   G2RD FAQ
   Le bloc n’expose pas assez de supports pour la typo interne
   --------------------------------------------------------- */
.wp-block-g2rd-faq .g2rd-faq__question-text {
  color: var(--wp--preset--color--kh-ink);
  font-size: clamp(1rem, 0.96rem + 0.25vw, 1.075rem);
  font-weight: var(--wp--custom--font-weight--semibold);
  line-height: 1.35;
}

.wp-block-g2rd-faq .g2rd-faq__answer-inner > * {
  color: var(--wp--preset--color--kh-muted);
  font-size: var(--wp--preset--font-size--m);
  line-height: var(--wp--custom--line-height--body);
}

.wp-block-g2rd-faq .g2rd-faq__item {
  border-bottom-color: rgba(214, 201, 172, 0.85);
}

/* ---------------------------------------------------------
   G2RD Counter
   Le wrapper passe via theme.json
   Les couleurs internes doivent parfois écraser l’inline style du bloc
   --------------------------------------------------------- */
.kh-hero-stats {
  max-width: var(--wp--custom--container--hero);
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(214, 201, 172, 0.85);
}

.kh-hero-stats .wp-block-g2rd-counter,
.wp-block-g2rd-counter.kh-hero-counter {
  padding: 0;
  background: transparent;
  border-radius: 0;
}

.wp-block-g2rd-counter .counter-content {
  gap: 0.55rem;
}

.wp-block-g2rd-counter .counter-number {
  color: var(--wp--preset--color--kh-gold) !important;
  font-size: clamp(2.25rem, 1.55rem + 2.4vw, 3.5rem);
  font-weight: var(--wp--custom--font-weight--semibold);
  line-height: 1;
  letter-spacing: -0.02em;
  /* font-family non spécifié
	   si tu veux un rendu manuscrit :
	   font-family: var(--wp--preset--font-family--borel); */
}

.wp-block-g2rd-counter .counter-prefix,
.wp-block-g2rd-counter .counter-suffix {
  color: var(--wp--preset--color--kh-gold) !important;
  font-size: clamp(1.25rem, 1rem + 1vw, 1.8rem);
  font-weight: var(--wp--custom--font-weight--semibold);
  line-height: 1;
  opacity: 1;
}

.wp-block-g2rd-counter .counter-title {
  color: var(--wp--preset--color--kh-muted) !important;
  font-size: 0.72rem;
  font-weight: var(--wp--custom--font-weight--semibold);
  letter-spacing: 0.28em;
  line-height: 1.45;
  text-transform: uppercase;
  margin: 0;
}

/* ---------------------------------------------------------
   Responsive local
   --------------------------------------------------------- */
@media (max-width: 781px) {
  .kh-hero__badge {
    position: static;
    margin-top: 1rem;
    max-width: 100%;
  }

  .kh-cover-separator {
    margin-inline: auto;
  }

  .kh-cover-title,
  .kh-cover-text {
    text-align: center;
  }
}

/* ---------------------------------------------------------
   Reduced motion local
   --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .kh-card {
    transition: none;
  }

  .kh-card:hover {
    transform: none;
  }
}
