/*
Theme Name: Handball Fribourg
Theme URI: https://handballfribourg.com
Author: Club Handball Fribourg
Description: Thème sur mesure du Club Handball Fribourg, converti depuis un export Claude Design.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: handball-fribourg
*/

:root{
  --bg: #f7f6f3;
  --bg-card: #ffffff;
  --dark-bg: #121212;
  --dark-text: #f2f1ee;
  --dark-text-soft: #d9d7d1;
  --dark-text-muted: #b5b3ad;
  --text: #121212;
  --text-soft: #3a3936;
  --text-muted: #575550;
  --text-faint: #9b9892;
  --border: #e2e0db;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --max-width: 1240px;
  --font-heading: 'Archivo', sans-serif;
  --font-body: 'Work Sans', sans-serif;
}

*{ box-sizing: border-box; }

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
}

a{ color: inherit; }

img{ max-width: 100%; display: block; }

.hf-container{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.hf-layout{
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.hf-layout main{ flex: 1 1 0; min-width: 0; }

/* Header */
.hf-header{
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.hf-header-inner{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.hf-brand{ display: flex; align-items: center; gap: 12px; text-decoration: none; }
.hf-brand img{ width: 48px; height: 48px; object-fit: contain; flex-shrink: 0; }
.hf-brand-name{ font-family: var(--font-heading); font-weight: 800; font-size: 15px; line-height: 1.1; letter-spacing: 0.01em; color: var(--text); }
.hf-brand-sub{ font-family: var(--font-heading); font-weight: 500; font-size: 11px; letter-spacing: 0.32em; color: var(--text-muted); }

.hf-nav{ display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.hf-nav > a{
  padding: 6px 2px; font-size: 14px; font-weight: 500; white-space: nowrap;
  color: var(--text-muted); border-bottom: 2px solid transparent; text-decoration: none;
}
.hf-nav > a.is-current, .hf-nav > a:hover{ color: var(--text); border-bottom-color: var(--text); font-weight: 700; }

.hf-dropdown{ position: relative; }
.hf-dropdown > button{
  display: flex; align-items: center; gap: 4px; background: none; border: none;
  border-bottom: 2px solid transparent; font-family: inherit; white-space: nowrap;
  padding: 6px 2px; font-size: 14px; font-weight: 500; color: var(--text-muted); cursor: pointer;
}
.hf-dropdown > button.is-current{ color: var(--text); font-weight: 700; border-bottom-color: var(--text); }
.hf-dropdown > button .hf-caret{ display: inline-block; transition: transform .2s; }
.hf-dropdown.is-open > button .hf-caret{ transform: rotate(90deg); }
.hf-dropdown-menu{
  display: none; position: absolute; top: 100%; left: 0; margin-top: 10px;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 14px 32px rgba(18,18,18,.14); padding: 8px; flex-direction: column;
  gap: 2px; min-width: 220px; z-index: 50;
}
.hf-dropdown-menu.align-right{ left: auto; right: 0; }
.hf-dropdown.is-open .hf-dropdown-menu{ display: flex; }
.hf-dropdown-menu a{
  display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 8px;
  font-size: 14px; font-weight: 500; color: var(--text-soft); text-decoration: none;
}
.hf-dropdown-menu a:hover{ background: var(--bg); }
.hf-dropdown-menu img{ height: 16px; width: 16px; object-fit: contain; }

.hf-header-deco{ height: 56px; width: auto; object-fit: contain; opacity: .9; flex-shrink: 0; }

.hf-lang-switcher{ display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.hf-lang-switcher a{
  padding: 4px 8px; font-size: 12px; font-weight: 700; letter-spacing: .04em;
  color: var(--text-faint); text-decoration: none; border-radius: var(--radius-pill);
}
.hf-lang-switcher a.is-current{ color: var(--text); background: var(--bg); }
.hf-lang-switcher a:hover{ color: var(--text); }

.hf-mobile-toggle{ display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.hf-mobile-toggle span{ width: 24px; height: 2px; background: var(--text); }

@media (max-width: 900px){
  .hf-nav{ display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--border); flex-direction: column; align-items: flex-start; padding: 12px 24px 20px; gap: 4px; }
  .hf-nav.is-open{ display: flex; }
  .hf-dropdown{ width: 100%; }
  .hf-dropdown > button{ width: 100%; justify-content: space-between; }
  .hf-dropdown-menu{ position: static; box-shadow: none; border: none; margin-top: 0; padding-left: 12px; display: none; width: 100%; }
  .hf-dropdown.is-open .hf-dropdown-menu{ display: flex; }
  .hf-header-deco{ display: none; }
  .hf-lang-switcher{ padding-top: 8px; }
  .hf-mobile-toggle{ display: flex; }
}

/* Hero (front page) */
.hf-hero{ background: var(--dark-bg); color: var(--dark-text); border-radius: var(--radius-lg); padding: 56px 40px; margin-bottom: 28px; }
.hf-hero-eyebrow{ font-size: 12px; letter-spacing: .22em; color: var(--dark-text-muted); font-weight: 600; margin-bottom: 14px; }
.hf-hero h1{ font-family: var(--font-heading); font-weight: 800; font-size: clamp(32px,6vw,56px); line-height: 1.05; margin: 0 0 16px; }
.hf-hero p{ font-size: 17px; line-height: 1.6; color: var(--dark-text-soft); max-width: 520px; margin: 0 0 28px; }
.hf-hero-actions{ display: flex; gap: 14px; flex-wrap: wrap; }
.hf-btn{ padding: 12px 26px; border-radius: var(--radius-pill); font-weight: 700; font-size: 14px; text-decoration: none; display: inline-block; transition: opacity .15s, background-color .15s, border-color .15s; }
.hf-btn-light{ background: var(--dark-text); color: var(--dark-bg); }
.hf-btn-light:hover{ background: #d9d7d1; }
.hf-btn-outline{ border: 1px solid #4a4945; color: var(--dark-text); }
.hf-btn-outline:hover{ border-color: var(--dark-text); background: rgba(242,241,238,.08); }

/* Cards */
.hf-card{ background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 32px; margin-bottom: 28px; }
.hf-card h2{ font-family: var(--font-heading); font-size: 22px; margin: 0 0 14px; }
.hf-card p{ font-size: 15px; line-height: 1.7; color: var(--text-soft); margin: 0 0 14px; }
.hf-card ul{ margin: 0 0 16px; padding-left: 20px; font-size: 15px; line-height: 1.8; color: var(--text-soft); }
.hf-eyebrow{ font-size: 11px; font-weight: 700; letter-spacing: .14em; color: var(--text-faint); margin-bottom: 10px; }
.hf-card img{ border-radius: 12px; width: 100%; height: auto; margin-bottom: 16px; }
.hf-card iframe{ border-radius: 12px; border: 0; display: block; width: 100%; }
.hf-news-image{ max-width: 480px; width: 100%; height: 240px; object-fit: cover; border-radius: 12px; margin-bottom: 16px; display: block; }
.hf-news-map{ max-width: 480px; border-radius: 12px; overflow: hidden; margin-bottom: 16px; }
.hf-news-map iframe{ width: 100%; height: 200px; border: 0; display: block; }

/* Sponsors row */
.hf-sponsors{ text-align: center; padding: 24px 0; }
.hf-sponsors-list{ display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hf-sponsor-pill{ display: flex; align-items: center; gap: 10px; padding: 10px 20px; border: 1px solid var(--border); border-radius: var(--radius-pill); font-size: 13px; font-weight: 600; color: var(--text-soft); text-decoration: none; transition: border-color .15s, color .15s; }
.hf-sponsor-pill:hover{ border-color: var(--text); color: var(--text); }
.hf-sponsor-pill img{ height: 16px; width: auto; }

/* Generic content pages */
.hf-page-header{ margin-bottom: 24px; }
.hf-page-header h1{ font-family: var(--font-heading); font-weight: 800; font-size: clamp(28px,4vw,40px); margin: 0 0 8px; }
.hf-content{ background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 32px; }
.hf-content h2{ font-family: var(--font-heading); font-size: 20px; margin: 28px 0 12px; }
.hf-content h2:first-child{ margin-top: 0; }
.hf-content h3{ font-family: var(--font-heading); font-size: 16px; margin: 20px 0 8px; }
.hf-content p{ font-size: 15px; line-height: 1.7; color: var(--text-soft); margin: 0 0 14px; }
.hf-content ul, .hf-content ol{ font-size: 15px; line-height: 1.8; color: var(--text-soft); padding-left: 20px; }
.hf-content a{ color: var(--text); font-weight: 600; text-decoration: underline; }
.hf-content table{ width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 14px; }
.hf-content table th, .hf-content table td{ text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.hf-content table th{ font-weight: 700; color: var(--text-faint); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.hf-content .hf-btn-dark{ background: var(--dark-bg); color: var(--dark-text); }
.hf-content a:hover{ opacity: .75; }
.hf-club-table a{ font-size: 13px; transition: opacity .15s; }
.hf-club-table a:hover{ opacity: .6; }

/* Photos */
.hf-album-grid{ display: grid; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap: 20px; }
.hf-album-card{ display: block; text-decoration: none; color: inherit; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.hf-album-card:hover{ border-color: var(--text); box-shadow: 0 6px 16px rgba(18,18,18,.08); }
.hf-album-card img{ width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.hf-album-card-title{ padding: 12px 14px; font-weight: 600; font-size: 14px; }
.hf-photo-grid{ display: grid; grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); gap: 12px; }
.hf-photo-grid img{ width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; }

/* Actualités */
.hf-post-list article{ background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 28px 32px; margin-bottom: 20px; }
.hf-post-list time{ font-size: 11px; font-weight: 700; letter-spacing: .14em; color: var(--text-faint); }
.hf-post-list h2{ font-family: var(--font-heading); font-size: 20px; margin: 8px 0 10px; }
.hf-post-list h2 a{ text-decoration: none; color: var(--text); }

/* Footer */
.hf-footer{ border-top: 1px solid var(--border); padding: 28px 24px; text-align: center; font-size: 13px; color: var(--text-faint); }

/* Contact form fallback */
.hf-form label{ display: block; font-size: 13px; font-weight: 600; margin: 14px 0 6px; }
.hf-form input, .hf-form textarea{ width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 14px; }
.hf-form button{ margin-top: 18px; }

/* -- Pages intérieures fidèles -- */
.hf-page-title{ font-family: var(--font-heading); font-size: clamp(26px,4vw,32px); margin: 0 0 20px; }
.hf-stack{ display: flex; flex-direction: column; gap: 20px; }
.hf-eyebrow-label{ font-size: 11px; font-weight: 700; letter-spacing: .14em; color: var(--text-faint); margin-bottom: 10px; }

/* Historique */
.hf-two-col{ display: flex; gap: 28px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 28px; }
.hf-two-col-text{ flex: 2 1 0; min-width: 280px; font-size: 15px; line-height: 1.8; color: var(--text-soft); display: flex; flex-direction: column; gap: 14px; }
.hf-badge-card{ flex: 0 0 130px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 18px; text-align: center; }
.hf-badge-card img{ width: 100%; height: auto; margin-bottom: 10px; }
.hf-badge-card-label{ font-size: 11px; color: var(--text-faint); letter-spacing: .04em; }

.hf-accordion-toggle{ display: flex; align-items: center; gap: 8px; background: none; border: none; padding: 0; cursor: pointer; font-family: inherit; margin-bottom: 14px; }
.hf-accordion-toggle .hf-caret{ display: inline-block; transition: transform .2s; }
.hf-accordion-toggle.is-open .hf-caret{ transform: rotate(90deg); }
.hf-accordion-panel{ display: none; flex-direction: column; gap: 16px; }
.hf-accordion-panel.is-open{ display: flex; }
.hf-content table{ font-size: 12.5px; white-space: nowrap; }
.hf-table-scroll{ overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }

/* Comité / effectif */
.hf-people-grid{ display: grid; grid-template-columns: repeat(auto-fill,minmax(240px,1fr)); gap: 20px; }
.hf-person-card{ background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 32px 24px; text-align: center; }
.hf-avatar-circle{ width: 140px; height: 140px; margin: 0 auto 16px; border-radius: var(--radius-md); overflow: hidden; background: var(--border); display: flex; align-items: center; justify-content: center; }
.hf-avatar-circle img{ width: 100%; height: 100%; object-fit: cover; }
.hf-avatar-placeholder{ color: var(--text-faint); font-size: 12px; }
.hf-person-role{ font-size: 12px; color: var(--text-faint); font-weight: 600; letter-spacing: .08em; margin-bottom: 6px; }
.hf-person-name{ font-size: 19px; font-weight: 700; font-family: var(--font-heading); }
.hf-person-name.small{ font-size: 17px; margin-bottom: 6px; }
.hf-person-meta{ font-size: 13px; color: var(--text-muted); }
.hf-person-meta strong{ display: block; color: var(--text-faint); font-weight: 600; letter-spacing: .04em; margin-bottom: 6px; }

/* Effectif — vue par rôle, plusieurs joueurs·euses par ligne */
.hf-roster-group{ margin-bottom: 28px; }
.hf-roster-group:last-child{ margin-bottom: 0; }
.hf-roster-chips{ display: flex; flex-wrap: wrap; gap: 20px 24px; padding-left: 16px; border-left: 2px solid var(--border); }
.hf-roster-chip{
  display: flex; align-items: center; gap: 14px; width: 230px; padding: 14px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md);
  transition: transform .15s ease, box-shadow .15s ease;
}
.hf-roster-chip:hover{ transform: scale(1.05); box-shadow: 0 10px 24px rgba(18,18,18,.1); border-color: var(--text-faint); }
.hf-roster-chip .hf-avatar-circle{ width: 84px; height: 84px; margin: 0; border-radius: var(--radius-md); flex-shrink: 0; }
.hf-roster-chip .hf-avatar-placeholder{ font-size: 11px; }
.hf-roster-chip-info{ min-width: 0; }
.hf-roster-chip .hf-person-name{ font-size: 16px; }
.hf-roster-chip .hf-person-meta{ display: flex; align-items: center; gap: 6px; font-size: 15px; }

/* Onglets / pills (Équipes, Compétition) */
.hf-select-box{ position: relative; max-width: 340px; margin-bottom: 28px; }
.hf-select-box > button{ width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card); font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer; }
.hf-dropdown-menu a[data-team-option].is-active{ background: var(--bg); font-weight: 700; color: var(--text); }

/* Lightbox générique */
.hf-lightbox-overlay{ position: fixed; inset: 0; background: rgba(18,18,18,.9); display: flex; align-items: center; justify-content: center; z-index: 1000; cursor: zoom-out; padding: 24px; }
.hf-lightbox-overlay img{ max-width: 100%; max-height: 100%; border-radius: 8px; }
.hf-pill-group{ display: flex; gap: 10px; margin-bottom: 28px; flex-wrap: wrap; }
.hf-pill-btn{ background: var(--bg-card); color: var(--text-soft); border: 1px solid var(--border); padding: 9px 18px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; text-decoration: none; display: inline-flex; align-items: center; transition: border-color .15s, background-color .15s, color .15s; }
.hf-pill-btn:hover{ border-color: var(--text); color: var(--text); }
.hf-pill-btn.is-active{ background: var(--dark-bg); color: var(--dark-text); border-color: var(--dark-bg); }
.hf-pill-btn.is-active:hover{ background: #2a2a2a; color: var(--dark-text); }
.hf-btn-dark-pill{ display: inline-flex; align-items: center; gap: 8px; background: var(--dark-bg); color: var(--dark-text); padding: 11px 22px; border-radius: var(--radius-pill); font-weight: 700; font-size: 14px; text-decoration: none; transition: background-color .15s; }
.hf-btn-dark-pill:hover{ background: #2a2a2a; }
.hf-btn-dark-pill img{ height: 16px; width: auto; }

/* Placeholder box (calendrier) */
.hf-placeholder-box{ border: 1px dashed #c9c6bd; background: #faf9f6; border-radius: var(--radius-md); padding: 32px; }
.hf-upcoming-badge{ display: inline-block; background: #f4ead9; color: #a9793a; font-size: 10px; font-weight: 700; letter-spacing: .1em; padding: 4px 10px; border-radius: var(--radius-pill); margin-bottom: 14px; }

/* Fédérations & ligues */
.hf-club-table{ width: 100%; border-collapse: collapse; font-size: 14px; }
.hf-club-table td{ padding: 9px 4px; border-top: 1px solid var(--border); }
.hf-club-table td:last-child{ text-align: right; }

/* Téléchargement (inscription) */
.hf-download-btn{ display: inline-flex; align-items: center; gap: 10px; background: var(--dark-bg); color: var(--dark-text); padding: 14px 28px; border-radius: var(--radius-pill); font-weight: 700; font-size: 14px; text-decoration: none; transition: background-color .15s; }
.hf-download-btn:hover{ background: #2a2a2a; }

/* Contact */
.hf-contact-layout{ display: flex; gap: 32px; flex-wrap: wrap; align-items: flex-start; }
.hf-contact-layout .hf-form{ flex: 1 1 0; min-width: 280px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.hf-form label{ display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-soft); margin: 0; }
.hf-form button{ background: var(--dark-bg); color: var(--dark-text); border: none; padding: 13px; border-radius: 8px; font-weight: 700; font-size: 14px; cursor: pointer; margin-top: 0; }
.hf-contact-direct{ width: 260px; flex-shrink: 0; background: var(--dark-bg); color: var(--dark-text); border-radius: var(--radius-md); padding: 28px; }
.hf-contact-direct a{ color: var(--dark-text); font-size: 15px; font-weight: 600; text-decoration: none; }
