:root {
  --dth-black: #000000;
  --dth-red: #C8102E;
  --dth-white: #FFFFFF;
  --dth-offwhite: #F6F6F4;
}

html { scroll-behavior: smooth; }
body { overflow-x: hidden; }

.dth-eyebrow {
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.dth-hero {
  min-height: min(82vh, 820px);
  display: flex;
  align-items: end;
}

.dth-hero .wp-block-cover__inner-container { width: 100%; }

.dth-display {
  text-transform: uppercase;
  letter-spacing: -.035em;
}

.dth-script {
  font-family: "Agants", "Brush Script MT", "Segoe Script", cursive;
  font-weight: 400;
}

.dth-rock {
  font-family: "Streetwear", "Brush Script MT", "Segoe Script", cursive;
  font-weight: 400;
}

.dth-card {
  border-top: 5px solid var(--dth-red);
  height: 100%;
  transition: transform .2s ease, box-shadow .2s ease;
}

.dth-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(0,0,0,.10);
}

.dth-slashes::after {
  content: "///";
  color: var(--dth-red);
  margin-left: .6rem;
  letter-spacing: -.18em;
  font-weight: 900;
}

.dth-agenda-month {
  border-top: 4px solid var(--dth-black);
  height: 100%;
}

.dth-agenda-date {
  color: var(--dth-red);
  font-weight: 800;
  white-space: nowrap;
}

.dth-footer a { color: inherit; }

@media (max-width: 781px) {
  .dth-hero { min-height: 72vh; }
  .dth-mobile-stack { gap: 1rem !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .dth-card { transition: none; }
}

/* Pages DTH : contenu independant et facile a administrer */
.dth-member-area video {
    width: 100%;
    height: auto;
    border-radius: 12px;
    background: #000;
}

.dth-member-area .wp-block-video {
    margin-block: 2rem;
}


/* Header compact : hauteur du logo + 20 px d'espace vertical au total */
header.wp-block-template-part > .wp-block-group:first-child {
  min-height: 0;
}

header.wp-block-template-part .wp-block-site-logo {
  margin: 0;
  line-height: 0;
}

header.wp-block-template-part .wp-block-site-logo img {
  display: block;
  width: auto;
  max-height: 72px;
  object-fit: contain;
}

header.wp-block-template-part .wp-block-site-title {
  margin: 0;
}

header.wp-block-template-part .wp-block-navigation {
  margin: 0;
}

/* Navigation : soulignement rouge anime au survol */
.wp-block-navigation .wp-block-navigation-item__content {
  position: relative;
  text-decoration: none;
  padding-bottom: .35rem;
}

.wp-block-navigation .wp-block-navigation-item__content::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--dth-red);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .2s ease;
}

.wp-block-navigation .wp-block-navigation-item__content:hover::after,
.wp-block-navigation .wp-block-navigation-item__content:focus-visible::after {
  transform: scaleX(1);
}

/* Blocs Cours DTH */
.dth-course-grid > .block-editor-inner-blocks > .block-editor-block-list__layout,
.dth-course-grid:not(.block-editor-block-list__block) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.5rem;
  align-items: stretch;
}

.dth-course-grid .block-list-appender {
  align-self: stretch;
  min-height: 100%;
}

.dth-course-card {
  box-sizing: border-box;
  height: 100%;
  padding: clamp(1.5rem, 3vw, 2rem);
  border: 2px solid var(--dth-red);
  background: var(--dth-white);
  transition: transform .2s ease, box-shadow .2s ease;
}

.dth-course-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .08);
}

.dth-course-card__eyebrow {
  margin: 0 0 .7rem;
  color: var(--dth-red);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  line-height: 1.3;
  text-transform: uppercase;
}

.dth-course-card__title {
  position: relative;
  display: inline-block;
  margin: 0 0 1.25rem;
  padding-bottom: .65rem;
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
  line-height: 1.05;
  font-weight: 800;
}

.dth-course-card__title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(86px, 60%);
  height: 4px;
  background: var(--dth-red);
}

.dth-course-card__text {
  margin: 0;
}

.dth-course-card__text > :first-child { margin-top: 0; }
.dth-course-card__text > :last-child { margin-bottom: 0; }

@media (max-width: 600px) {
  .dth-course-grid:not(.block-editor-block-list__block) {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wp-block-navigation .wp-block-navigation-item__content::after,
  .dth-course-card {
    transition: none;
  }
}
