/*
Theme Name: OHTT Dark 23
Theme URI: https://ohtt.fr
Author: OpenAI pour l'OHTT
Description: Thème sombre et élégant de l'Orchestre d'Harmonie de Tournon-Tain. Version 22 : logo de maintenance sans carré, avec L éclairé et halo préservé.
Version: 23.0.0
Requires at least: 6.7
Tested up to: 7.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ohtt-dark-v23
Tags: full-site-editing, block-patterns, custom-colors, custom-logo, featured-images, blog, photography
*/

:root {
  --ohtt-header-height: 62px;
  --ohtt-black: #0f0f10;
  --ohtt-charcoal: #181819;
  --ohtt-surface: #222224;
  --ohtt-cream: #f3efe7;
  --ohtt-muted: #bdb8ae;
  --ohtt-gold: #c6a15b;
  --ohtt-gold-light: #e0c58c;
}

html { scroll-behavior: smooth; }
body { text-rendering: optimizeLegibility; }

/* En-tête minimal et réellement persistant. */
.wp-site-blocks > header.wp-block-template-part {
  position: sticky !important;
  top: 0;
  z-index: 99999;
  width: 100%;
}

body.admin-bar .wp-site-blocks > header.wp-block-template-part { top: 32px; }

.ohtt-header {
  width: 100%;
  min-height: var(--ohtt-header-height);
  border-bottom: 1px solid rgba(198, 161, 91, .30);
  background: rgba(15, 15, 16, .94) !important;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}

.ohtt-header > .wp-block-group { min-height: 40px; }

.ohtt-brand-home,
.ohtt-home-pill,
.ohtt-footer-home {
  color: var(--ohtt-cream);
  text-decoration: none;
}

.ohtt-brand-home {
  display: inline-flex;
  align-items: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: .08em;
}

.ohtt-home-pill,
.ohtt-footer-home {
  display: inline-flex;
  align-items: center;
  padding: .52rem 1rem;
  border: 1px solid rgba(198,161,91,.48);
  border-radius: 999px;
  background: rgba(198,161,91,.07);
  font-size: .9rem;
  font-weight: 700;
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}

.ohtt-brand-home:hover,
.ohtt-home-pill:hover,
.ohtt-footer-home:hover { color: var(--ohtt-gold-light); }

.ohtt-home-pill:hover,
.ohtt-footer-home:hover {
  transform: translateY(-1px);
  border-color: rgba(198,161,91,.82);
  background: rgba(198,161,91,.13);
}

/* Une grande section occupe un écran complet hors en-tête. */
.ohtt-viewport-section {
  position: relative;
  box-sizing: border-box;
  min-height: calc(100vh - var(--ohtt-header-height)) !important;
  min-height: calc(100svh - var(--ohtt-header-height)) !important;
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.ohtt-viewport-section > .ohtt-section-content,
.ohtt-viewport-section > .wp-block-group:not(.ohtt-section-divider) { width: 100%; }

#actualites,
#explorer-ohtt { scroll-margin-top: calc(var(--ohtt-header-height) + 12px); }

/* Hero. */
.ohtt-hero {
  position: relative;
  isolation: isolate;
  min-height: calc(100vh - var(--ohtt-header-height)) !important;
  min-height: calc(100svh - var(--ohtt-header-height)) !important;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.ohtt-hero::before,
.ohtt-hero::after {
  content: "♫  ♪   ♩    ♬";
  position: absolute;
  z-index: -1;
  color: rgba(198, 161, 91, .12);
  font-family: Georgia, serif;
  font-size: clamp(3rem, 8vw, 8rem);
  letter-spacing: .25em;
  white-space: nowrap;
}

.ohtt-hero::before { left: -4%; top: 14%; transform: rotate(-8deg); }
.ohtt-hero::after { right: -8%; bottom: 10%; transform: rotate(8deg); }

.ohtt-home-title {
  font-size: clamp(2.55rem, 6vw, 5rem);
  margin-block: .25rem;
}

.ohtt-logo-glow img {
  width: clamp(265px, 31vw, 335px) !important;
  height: auto !important;
  filter: none !important;
}
.ohtt-kicker { letter-spacing: .18em; text-transform: uppercase; }

/* Sections. */
.ohtt-news-section { background: #111112; }
.ohtt-quick-section {
  background: radial-gradient(circle at 20% 0%, rgba(198,161,91,.09), transparent 32%), #151515;
  border: 0;
}

.ohtt-section-soft {
  border-top: 1px solid rgba(198, 161, 91, .13);
  border-bottom: 1px solid rgba(198, 161, 91, .13);
  background: radial-gradient(circle at 20% 0%, rgba(198,161,91,.08), transparent 32%), #151515;
}

/* Cartes. */
.ohtt-card,
.ohtt-link-card {
  height: 100%;
  border: 1px solid rgba(198, 161, 91, .18);
  background: linear-gradient(145deg, rgba(34,34,36,.97), rgba(18,18,19,.97));
  box-shadow: 0 20px 50px rgba(0,0,0,.24);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.ohtt-card:hover,
.ohtt-link-card:hover {
  transform: translateY(-6px);
  border-color: rgba(198, 161, 91, .58);
  box-shadow: 0 26px 60px rgba(0,0,0,.36);
}

.ohtt-card .wp-block-post-featured-image img { transition: transform .45s ease; }
.ohtt-card:hover .wp-block-post-featured-image img { transform: scale(1.035); }

.ohtt-news-section .wp-block-post-title { margin-top: .35rem; margin-bottom: .45rem; }
.ohtt-news-section .wp-block-post-excerpt p { margin-top: .45rem; margin-bottom: .65rem; }

.ohtt-quick-grid { align-items: stretch; }
.ohtt-quick-grid > .wp-block-column { display: flex; }
.ohtt-quick-grid > .wp-block-column > .wp-block-group { width: 100%; }

.ohtt-gold-line {
  width: 90px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ohtt-gold), transparent);
  margin-inline: auto;
}

/*
 * Séparateur : longues lignes dorées, avec au centre le motif de la page
 * de maintenance.
 */
.ohtt-section-divider {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: .75rem;
  width: min(840px, calc(100% - 3rem)) !important;
  max-width: 840px;
  min-height: 30px;
  margin: 0 auto !important;
  padding: 0 !important;
  pointer-events: none;
}

.ohtt-divider-line {
  display: block !important;
  flex: 1 1 auto !important;
  min-width: 64px;
  height: 1px !important;
  background: linear-gradient(90deg, transparent 0%, rgba(198,161,91,.58) 24%, var(--ohtt-gold-light) 100%) !important;
  box-shadow: 0 0 8px rgba(198,161,91,.18);
}

.ohtt-divider-line:last-child {
  background: linear-gradient(90deg, var(--ohtt-gold-light) 0%, rgba(198,161,91,.58) 76%, transparent 100%) !important;
}

.ohtt-divider-ornament {
  display: block !important;
  flex: 0 0 28px !important;
  width: 28px !important;
  height: 30px !important;
  background: center / contain no-repeat url("assets/images/ornament-maintenance.png");
  filter: drop-shadow(0 0 8px rgba(198,161,91,.25));
}

.ohtt-section-divider-bottom {
  position: absolute !important;
  left: 50% !important;
  right: auto !important;
  bottom: 1.35rem !important;
  transform: translateX(-50%) !important;
  z-index: 5;
}

.ohtt-viewport-section > .ohtt-section-content,
.ohtt-hero > .wp-block-group:first-child { padding-bottom: 2.8rem; }

/* Autres pages. */
.ohtt-sponsor-placeholder,
.ohtt-person-placeholder {
  border: 1px dashed rgba(198, 161, 91, .42);
  background: rgba(255,255,255,.025);
}

.wp-block-navigation a { text-decoration: none; }
.wp-block-navigation a:hover { color: var(--ohtt-gold); }

@media (min-width: 782px) and (max-height: 820px) {
  .ohtt-logo-glow img { width: 235px !important; }
  .ohtt-home-title { font-size: clamp(2.4rem, 5vw, 4.2rem); }
  .ohtt-news-section,
  .ohtt-quick-section { justify-content: flex-start; }
  .ohtt-link-card { padding-top: 1.45rem !important; padding-bottom: 1.45rem !important; }
}

@media (max-width: 1100px) {
  .ohtt-quick-grid { flex-wrap: wrap !important; }
  .ohtt-quick-grid > .wp-block-column { flex-basis: calc(50% - 1rem) !important; }
}

@media (max-width: 782px) {
  :root { --ohtt-header-height: 58px; }
  body.admin-bar .wp-site-blocks > header.wp-block-template-part { top: 46px; }

  .ohtt-hero::before,
  .ohtt-hero::after { opacity: .55; }

  .ohtt-section-divider {
    width: calc(100% - 2rem) !important;
    gap: .55rem;
  }

  .ohtt-divider-line { min-width: 34px; }
  .ohtt-divider-ornament { flex-basis: 24px !important; width: 24px !important; height: 27px !important; }
  .ohtt-section-divider-bottom { bottom: .85rem !important; }

  .ohtt-news-section .wp-block-post-template {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: .2rem .15rem .8rem;
    scrollbar-width: thin;
  }

  .ohtt-news-section .wp-block-post-template > li {
    flex: 0 0 min(84vw, 390px);
    scroll-snap-align: center;
  }

  .ohtt-quick-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: .2rem .15rem .8rem;
    scrollbar-width: thin;
  }

  .ohtt-quick-grid > .wp-block-column {
    flex: 0 0 min(82vw, 360px) !important;
    scroll-snap-align: center;
  }
}

@media (max-width: 600px) {
  .ohtt-brand-home { font-size: 1rem; }
  .ohtt-home-pill { padding: .48rem .78rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ohtt-card,
  .ohtt-link-card,
  .ohtt-card .wp-block-post-featured-image img { transition: none; }
}


/* Liens dynamiques produits par les shortcodes du thème. */
.ohtt-header .wp-block-shortcode,
.ohtt-footer-home-wrap.wp-block-shortcode,
.ohtt-action-wrap.wp-block-shortcode { margin: 0; }

.ohtt-header .wp-block-shortcode { display: flex; align-items: center; }

.ohtt-action-wrap.wp-block-shortcode {
  display: flex;
  justify-content: center;
  margin-top: 1.6rem;
}

.ohtt-dynamic-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .72rem 1.25rem;
  border: 1px solid rgba(243,239,231,.72);
  border-radius: 999px;
  color: var(--ohtt-cream);
  text-decoration: none;
  font-weight: 700;
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}

.ohtt-dynamic-action:hover {
  color: var(--ohtt-black);
  border-color: var(--ohtt-gold);
  background: var(--ohtt-gold);
  transform: translateY(-1px);
}

/* Extraits plus lisibles sur les cartes d’actualités. */
.ohtt-news-section .wp-block-post-excerpt__excerpt {
  line-height: 1.65;
  color: var(--ohtt-muted);
}

/* Version 11 : les liens des cartes sont des shortcodes autonomes, rendus comme boutons. */
.ohtt-link-card .wp-block-shortcode {
  margin-top: 1.25rem;
}

.ohtt-card-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .68rem 1.05rem;
  border: 1px solid rgba(243,239,231,.78);
  border-radius: 999px;
  color: var(--ohtt-cream);
  background: transparent;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.2;
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}

.ohtt-card-action:hover,
.ohtt-card-action:focus-visible {
  color: #111112;
  border-color: var(--ohtt-gold-light);
  background: var(--ohtt-gold-light);
  transform: translateY(-1px);
}

/* Fond musical inspiré de la page de maintenance : portée, clé de sol et notes. */
.ohtt-hero {
  position: relative;
  overflow: hidden;
  background-color: #0e0e10 !important;
  background-image:
    radial-gradient(circle at center, rgba(18,18,20,.08) 0%, rgba(10,10,12,.44) 68%, rgba(5,5,6,.72) 100%),
    url("assets/images/music-background.svg") !important;
  background-repeat: no-repeat, no-repeat !important;
  background-position: center center, center center !important;
  background-size: cover, 100% 100% !important;
}

.ohtt-hero::before,
.ohtt-hero::after {
  display: none !important;
}

/* Version 13 : fond musical vectoriel intégré au hero. */
.ohtt-quick-section {
  position: relative;
  padding: clamp(3rem,5vw,4.5rem) max(1rem, calc((100vw - 1180px) / 2)) clamp(6rem,8vw,7.4rem);
}

.ohtt-quick-inner {
  width: min(1180px, 100%);
  margin-inline: auto;
}

.ohtt-quick-grid-dynamic {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 2.2rem;
}

.ohtt-link-card-dynamic {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 2rem 1.6rem;
  border: 1px solid rgba(198,161,91,.42);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.018));
  box-shadow: 0 14px 34px rgba(0,0,0,.22);
}

.ohtt-link-card-dynamic h3 {
  margin-top: 0;
  margin-bottom: .8rem;
}

.ohtt-link-card-dynamic p {
  flex: 1 1 auto;
  line-height: 1.65;
  margin-bottom: 1.35rem;
}

.ohtt-link-card-dynamic .ohtt-card-action {
  align-self: flex-start;
  margin-top: auto;
}

@media (max-width: 1100px) {
  .ohtt-quick-grid-dynamic { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .ohtt-quick-grid-dynamic {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    scroll-snap-type: x mandatory;
    padding-bottom: .8rem;
  }
  .ohtt-link-card-dynamic {
    flex: 0 0 min(82vw, 360px);
    scroll-snap-align: center;
  }
}

/* Pied de page sponsors — logos uniformisés dans la palette or du site. */
.ohtt-sponsor-footer {
  border-top: 1px solid rgba(198,161,91,.42);
  background:
    radial-gradient(circle at 50% 0%, rgba(198,161,91,.08), transparent 46%),
    #0b0b0c;
  padding: clamp(2.2rem,4vw,3.4rem) max(1rem, calc((100vw - 1180px) / 2));
}

.ohtt-sponsor-footer-inner {
  width: min(1180px, 100%);
  margin-inline: auto;
}

.ohtt-sponsor-kicker {
  margin: 0 0 1.4rem;
  color: var(--ohtt-gold-light);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-align: center;
  text-transform: uppercase;
}

.ohtt-sponsor-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.ohtt-sponsor-logo-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 108px;
  padding: 1rem;
  border: 1px solid rgba(198,161,91,.24);
  border-radius: 14px;
  background: rgba(255,255,255,.018);
  text-decoration: none;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.ohtt-sponsor-logo-card:hover,
.ohtt-sponsor-logo-card:focus-visible {
  border-color: rgba(224,197,140,.72);
  background: rgba(198,161,91,.055);
  transform: translateY(-2px);
}

.ohtt-sponsor-logo-card img {
  display: block;
  width: 100%;
  height: 76px;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 0 8px rgba(198,161,91,.12));
}

@media (max-width: 900px) {
  .ohtt-sponsor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .ohtt-sponsor-logo-card {
    min-height: 92px;
    padding: .7rem;
  }

  .ohtt-sponsor-logo-card img {
    height: 62px;
  }
}
