@import url('./tokens.css');
@import url('./icons.css');

/* ==========================================================================
   TEAM FISHER — FEUILLE DE STYLE PRINCIPALE (MOBILE-FIRST)
   Site officiel : lateamfisher.com
   Territoire : Gouméré & Tabagne (Région du Gontougo, Côte d'Ivoire)
   ========================================================================== */

/* Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--tf-gray-900);
  background-color: var(--tf-white);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Accessibility Focus Ring */
:focus-visible {
  outline: 3px solid var(--tf-gold-accent);
  outline-offset: 2px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--tf-blue-primary);
  line-height: 1.25;
  font-weight: 700;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }

p {
  margin-bottom: 1rem;
  color: var(--tf-gray-700);
}

a {
  color: var(--tf-blue-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--tf-blue-light);
}

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

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

/* Top Banner / Bar d'information */
.top-bar {
  background-color: var(--tf-blue-dark);
  color: var(--tf-white);
  padding: 0.4rem 0;
  font-size: 0.85rem;
  border-bottom: 2px solid var(--tf-gold-accent);
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.top-bar-territory {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  color: var(--tf-gold-accent);
}

.top-bar-contact {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}

.top-bar-contact a {
  color: var(--tf-white);
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.top-bar-contact a:hover {
  color: var(--tf-gold-accent);
}

/* --- Jauge de progression de lecture (Scroll Progress Bar style Apple) --- */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--tf-gold-accent) 0%, #ffffff 50%, var(--tf-gold-accent) 100%);
  z-index: 99999;
  box-shadow: 0 0 12px rgba(254, 195, 1, 0.8);
  transition: width 0.08s ease-out;
  pointer-events: none;
}

/* Header & Navigation (Verre Dépoli Apple / Frosted Glass) */
.site-header {
  background-color: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-xs);
  border-bottom: 1px solid var(--glass-border-subtle);
  transition: background-color var(--transition-normal), box-shadow var(--transition-normal), height var(--transition-normal);
}

.site-header.is-scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-md);
  border-bottom-color: rgba(0, 0, 85, 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  transition: height var(--transition-normal);
}

.site-header.is-scrolled .header-inner {
  height: 62px;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  transition: transform var(--transition-fast);
}

.site-brand:hover {
  transform: translateY(-1px);
}

.site-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  transition: height var(--transition-normal), transform var(--transition-normal);
}

.site-header.is-scrolled .site-logo {
  height: 40px;
}

.site-brand-text {
  display: flex;
  flex-direction: column;
}

.site-brand-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--tf-blue-primary);
  line-height: 1.1;
  letter-spacing: 0.5px;
}

.site-brand-sub {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--tf-gray-600);
  letter-spacing: 0.8px;
  font-weight: 600;
}

/* Nav Menu Desktop */
.nav-menu {
  display: none;
  align-items: center;
  list-style: none;
  gap: 1.15rem;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--tf-gray-800);
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-sm);
  position: relative;
  transition: color var(--transition-fast), background-color var(--transition-fast), transform var(--transition-fast);
}

.nav-link:hover {
  color: var(--tf-blue-primary);
  background-color: var(--tf-blue-subtle);
  transform: translateY(-1px);
}

.nav-link.active {
  color: var(--tf-blue-primary);
  font-weight: 700;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0.6rem;
  right: 0.6rem;
  height: 3px;
  background: linear-gradient(90deg, var(--tf-gold-accent), #ffd033);
  border-radius: var(--radius-full);
}

/* Boutons de style Apple (Tactiles, luxueux, pills arrondies) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition-normal);
  line-height: 1.2;
  position: relative;
  overflow: hidden;
  user-select: none;
  min-height: 44px;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, #fec301 0%, #e5b000 100%);
  color: var(--tf-blue-dark, #000050);
  border-color: #fec301;
  box-shadow: 0 4px 12px 0 rgba(254, 195, 1, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #ffd033 0%, #fec301 100%);
  border-color: #ffd033;
  color: var(--tf-blue-dark, #000050);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px 0 rgba(254, 195, 1, 0.5);
}

.btn-outline {
  background-color: transparent;
  color: var(--tf-blue-primary);
  border-color: var(--tf-blue-primary);
  box-shadow: 0 2px 6px rgba(0, 0, 127, 0.06);
}

.btn-outline:hover {
  background-color: var(--tf-blue-primary);
  color: var(--tf-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-blue);
}

.btn-white {
  background-color: rgba(255, 255, 255, 0.95);
  color: var(--tf-blue-primary);
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(8px);
}

.btn-white:hover {
  background-color: var(--tf-white);
  border-color: var(--tf-gold-accent);
  color: var(--tf-blue-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.btn-sm {
  padding: 0.45rem 1.15rem;
  font-size: 0.85rem;
  min-height: 38px;
}

/* Hamburger button */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: rgba(0, 0, 127, 0.04);
  border: 1px solid var(--tf-gray-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.menu-toggle:hover {
  background: rgba(0, 0, 127, 0.08);
  border-color: var(--tf-blue-border);
}

.menu-toggle span {
  width: 100%;
  height: 2.5px;
  background-color: var(--tf-blue-primary);
  border-radius: 2px;
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

/* Mobile Drawer Menu (Style iOS / Frosted Glass) */
.mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  width: 85%;
  max-width: 340px;
  height: 100vh;
  background-color: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-left: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: -15px 0 40px rgba(0, 0, 85, 0.22);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 1.5rem 1.25rem;
  overflow-y: auto;
}

.mobile-nav.open {
  transform: translateX(0);
}

.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 50, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.mobile-nav-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--tf-gray-200);
  margin-bottom: 1.25rem;
}

.mobile-nav-close {
  background: rgba(0, 0, 85, 0.05);
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--tf-gray-700);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.mobile-nav-close:hover {
  background: rgba(0, 0, 85, 0.12);
  color: var(--tf-blue-primary);
}

.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.mobile-nav-links a {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--tf-gray-800);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  min-height: 48px;
}

.mobile-nav-links a:hover {
  color: var(--tf-blue-primary);
  background: var(--tf-blue-subtle);
  transform: translateX(3px);
}

.mobile-nav-links a.active {
  color: var(--tf-blue-primary);
  background: var(--tf-blue-subtle);
  font-weight: 700;
  border-left: 4px solid var(--tf-gold-accent);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--tf-blue-primary) 0%, var(--tf-blue-dark) 100%);
  color: var(--tf-white);
  padding: var(--space-3xl) 0 var(--space-2xl);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: var(--tf-gold-accent);
}

.hero-content {
  max-width: 760px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: rgba(254, 195, 1, 0.2);
  color: var(--tf-gold-accent);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1rem;
  border: 1px solid rgba(254, 195, 1, 0.4);
}

.hero-title {
  color: var(--tf-white);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.hero-title span {
  color: var(--tf-gold-accent);
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--tf-gray-200);
  margin-bottom: 2rem;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Sections communes */
.section {
  padding: var(--space-3xl) 0;
}

.section-alt {
  background-color: var(--tf-gray-50);
}

.section-header {
  margin-bottom: var(--space-2xl);
  max-width: 680px;
}

.section-tag {
  display: inline-block;
  color: var(--tf-blue-primary);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 0.75rem;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--tf-gray-600);
  margin-bottom: 0;
}

/* Grille de cartes */
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

/* Carte Action */
.card-action {
  background: var(--tf-white);
  border: 1px solid var(--tf-gray-200);
  border-radius: var(--radius-cards, 16px);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.card-action::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--tf-gold-accent);
  opacity: 0;
  transform: scaleX(0.2);
  transition: opacity var(--transition-normal), transform var(--transition-normal);
  transform-origin: center;
}

.card-action:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--tf-blue-border);
}

.card-action:hover::before {
  opacity: 1;
  transform: scaleX(1);
}

.card-action-header {
  padding: 1.15rem 1.25rem 0.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
}

.badge-realisee {
  background-color: var(--tf-success-bg);
  color: var(--tf-success);
}

.badge-projet {
  background-color: var(--tf-warning-bg);
  color: var(--tf-warning);
}

.badge-en-cours {
  background-color: var(--tf-info-bg);
  color: var(--tf-info);
}

.badge-valider {
  background-color: #fee2e2;
  color: #b91c1c;
}

.card-meta-date {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--tf-gray-500);
}

.card-action-body {
  padding: 0.75rem 1.25rem 1.15rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-action-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.55rem;
  color: var(--tf-blue-primary);
}

.card-action-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.tag-village, .tag-domaine {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.tag-village {
  background-color: var(--tf-blue-subtle);
  color: var(--tf-blue-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.tag-domaine {
  background-color: var(--tf-gray-100);
  color: var(--tf-gray-700);
}

.card-action-desc {
  font-size: 0.92rem;
  color: var(--tf-gray-600);
  line-height: 1.55;
  margin-bottom: 0;
}

.card-action-footer {
  padding: 0.85rem 1.25rem;
  background-color: var(--tf-gray-50);
  border-top: 1px solid var(--tf-gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

/* Bloc "Mot du Leader" */
.leader-spotlight {
  background: var(--tf-blue-subtle);
  border-left: 6px solid var(--tf-gold-accent);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
}

.leader-quote {
  font-size: 1.15rem;
  font-style: italic;
  color: var(--tf-gray-800);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.leader-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--tf-blue-primary);
}

.leader-title {
  font-size: 0.88rem;
  color: var(--tf-gray-600);
}

/* Annuaire des Villages & Territoire */
.village-card {
  background: var(--tf-white);
  border: 1px solid var(--tf-gray-200);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  box-shadow: var(--shadow-sm);
}

.village-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--tf-blue-primary);
}

.village-sp {
  font-size: 0.8rem;
  color: var(--tf-gray-600);
}

.village-status {
  font-size: 0.75rem;
  color: var(--tf-success);
  font-weight: 600;
}

/* Formulaires */
.form-card {
  background: var(--tf-white);
  border: 1px solid var(--tf-gray-200);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--tf-gray-800);
  margin-bottom: 0.4rem;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  border: 1px solid var(--tf-gray-300);
  border-radius: var(--radius-md);
  color: var(--tf-gray-900);
  background-color: var(--tf-white);
  transition: border-color var(--transition-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--tf-blue-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 0, 127, 0.15);
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: var(--tf-gray-700);
}

.form-checkbox input {
  margin-top: 0.2rem;
  width: 18px;
  height: 18px;
  accent-color: var(--tf-blue-primary);
}

/* Bouton WhatsApp Flottant */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 58px;
  height: 58px;
  background-color: #25d366;
  color: var(--tf-white);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  z-index: 1500;
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.whatsapp-float:hover {
  transform: scale(1.08);
  background-color: #1eb956;
  color: var(--tf-white);
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

/* Modal Détails Action */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--tf-white);
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: var(--space-xl);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--tf-gray-600);
}

/* Footer */
.site-footer {
  background-color: var(--tf-gray-900);
  color: var(--tf-white);
  padding: var(--space-3xl) 0 var(--space-xl);
  margin-top: auto;
  border-top: 4px solid var(--tf-gold-accent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: var(--space-2xl);
}

.footer-col h4 {
  color: var(--tf-gold-accent);
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.footer-col p {
  color: var(--tf-gray-300);
  font-size: 0.9rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: var(--tf-gray-300);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--tf-gold-accent);
}

.footer-bottom {
  padding-top: var(--space-lg);
  border-top: 1px solid var(--tf-gray-800);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--tf-gray-400);
  text-align: center;
}

/* Institutional Footer High-Contrast Overrides */
.inst-footer p {
  color: rgba(255, 255, 255, 0.9) !important;
}
.inst-footer-cols p {
  color: rgba(255, 255, 255, 0.9) !important;
}
.inst-footer-warning,
.inst-footer-warning span {
  color: #ffffff !important;
}
.inst-footer-warning .tf-icon {
  color: var(--tf-gold-accent) !important;
}

/* Breakpoints Responsives (>= 768px et >= 1024px) */
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .leader-spotlight { grid-template-columns: 2fr 1fr; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.5fr; }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}

@media (min-width: 1024px) {
  .nav-menu { display: flex; }
  .menu-toggle { display: none; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ==========================================================================
   COMPOSANTS SPÉCIFIQUES CHARTE & CONSIGNES DU LEADER
   ========================================================================== */

/* 1. Sélecteur bilingue avec drapeaux 🇫🇷 et 🇬🇧 */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.12);
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: transparent;
  color: var(--tf-white);
  border: none;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lang-btn.active {
  background: var(--tf-gold-accent);
  color: var(--tf-blue-dark);
}

.lang-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.2);
}

.lang-flag {
  font-size: 1rem;
  line-height: 1;
}

/* 2. Emplacements neutres d'image (Placeholders stricts : aucune photo IA simulée) */
.tf-placeholder {
  background-color: var(--tf-gray-200);
  border: 2px dashed var(--tf-gray-300);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  color: var(--tf-gray-600);
  min-height: 180px;
  position: relative;
  user-select: none;
}

.tf-placeholder-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  opacity: 0.7;
}

.tf-placeholder-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--tf-gray-700);
}

.tf-placeholder-sub {
  font-size: 0.75rem;
  color: var(--tf-gray-500);
  margin-top: 0.25rem;
}

.tf-placeholder-portrait {
  min-height: 280px;
  background-color: var(--tf-blue-subtle);
  border-color: var(--tf-blue-border);
}

/* 3. Badges d'intégrité éditoriale */
.badge-to-validate {
  display: inline-block;
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
}

/* 4. Barre d'évaluation responsive (Désactivée) */
.responsive-preview-bar {
  display: none !important;
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--tf-blue-dark);
  color: var(--tf-white);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-full);
  box-shadow: 0 10px 25px rgba(0, 0, 127, 0.4);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 1000;
  border: 2px solid var(--tf-gold-accent);
  font-size: 0.8rem;
  max-width: 95vw;
}

.preview-bar-title {
  font-weight: 800;
  color: var(--tf-gold-accent);
  margin-right: 0.25rem;
  display: none;
}

@media (min-width: 640px) {
  .preview-bar-title { display: inline-block; }
}

.preview-mode-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--tf-white);
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.preview-mode-btn.active, .preview-mode-btn:hover {
  background: var(--tf-gold-accent);
  color: var(--tf-blue-dark);
  font-weight: 800;
}

/* Conteneur de simulation responsive */
body.sim-mobile-360 {
  background: #0f172a;
  padding-bottom: 5rem;
}

body.sim-mobile-360 .site-wrapper {
  max-width: 360px !important;
  margin: 1.5rem auto !important;
  border: 8px solid #334155;
  border-radius: 36px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  background: var(--tf-white);
}

body.sim-desktop-1440 {
  background: #f1f5f9;
  padding-bottom: 5rem;
}

body.sim-desktop-1440 .site-wrapper {
  max-width: 1440px !important;
  margin: 1rem auto !important;
  box-shadow: 0 15px 35px rgba(0, 0, 127, 0.1);
  background: var(--tf-white);
}

/* 5. Section Commentaires Publics avec Modération */
.comments-section {
  margin-top: var(--space-3xl);
  padding-top: var(--space-2xl);
  border-top: 2px solid var(--tf-gray-200);
}

.comments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: var(--space-lg);
}

.comment-card {
  background: var(--tf-gray-50);
  border: 1px solid var(--tf-gray-200);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: 1rem;
}

.comment-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.comment-author {
  font-weight: 700;
  color: var(--tf-blue-primary);
}

.comment-locality {
  font-size: 0.75rem;
  color: var(--tf-gray-500);
  margin-left: 0.5rem;
}

.comment-date {
  font-size: 0.75rem;
  color: var(--tf-gray-500);
}

.comment-badge-mod {
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--tf-gold-subtle);
  color: var(--tf-warning);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--tf-gold-border);
}

.comment-form-box {
  background: var(--tf-blue-subtle);
  border: 1px solid var(--tf-blue-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-top: var(--space-xl);
}

.moderation-notice {
  font-size: 0.85rem;
  color: var(--tf-blue-primary);
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
}

/* 6. Intégration Vidéos YouTube au Clic (Zéro lecture automatique) */
.yt-facade {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #0f172a;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

.yt-facade-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: opacity var(--transition-normal);
}

.yt-facade:hover .yt-facade-thumb {
  opacity: 1;
}

.yt-play-btn {
  position: absolute;
  width: 68px;
  height: 48px;
  background-color: rgba(255, 0, 0, 0.9);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.yt-facade:hover .yt-play-btn {
  background-color: #ff0000;
  transform: scale(1.1);
}

.yt-play-btn::before {
  content: '';
  border-style: solid;
  border-width: 10px 0 10px 18px;
  border-color: transparent transparent transparent #ffffff;
}

.yt-facade iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* 7. Boutons de Partage Multi-canaux */
.share-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--tf-gray-300);
  background: var(--tf-white);
  color: var(--tf-gray-700);
  transition: all var(--transition-fast);
}

.btn-share:hover {
  background: var(--tf-blue-subtle);
  color: var(--tf-blue-primary);
  border-color: var(--tf-blue-border);
}

.btn-share-wa {
  background: #25D366;
  color: #ffffff !important;
  border-color: #20ba5a;
}

.btn-share-wa:hover {
  background: #20ba5a;
}

.btn-share-fb {
  background: #1877F2;
  color: #ffffff !important;
  border-color: #1565cf;
}

.btn-share-fb:hover {
  background: #1565cf;
}

/* 8. Cartes des Perspectives de Développement (Section 5.2) */
.perspective-card {
  background: var(--tf-white);
  border: 1px solid var(--tf-gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.perspective-status-intention {
  background: #f1f5f9;
  color: #475569;
}

.perspective-status-plaidoyer {
  background: #e0f2fe;
  color: #0369a1;
}

.perspective-status-finance {
  background: #fef3c7;
  color: #b45309;
}

.perspective-status-realise {
  background: #dcfce7;
  color: #15803d;
}

/* 9. Barre de Recherche Globale Plein Texte */
.global-search-box {
  position: relative;
  width: 100%;
  max-width: 580px;
  margin: 0 auto 2rem;
  z-index: 200;
  overflow: visible;
}

.global-search-input {
  width: 100%;
  padding: 0.9rem 1.25rem 0.9rem 3rem;
  border: 2px solid var(--tf-blue-border);
  border-radius: var(--radius-full);
  font-size: 1rem;
  outline: none;
  background: var(--tf-white);
  box-shadow: var(--shadow-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.global-search-input:focus {
  border-color: var(--tf-gold-accent);
  box-shadow: 0 0 0 4px rgba(254, 195, 1, 0.25);
}

.global-search-icon {
  position: absolute;
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: var(--tf-gray-400);
  pointer-events: none;
  z-index: 2;
}

/* Panneau dynamique des résultats de la recherche du Hero */
.global-search-results,
#globalSearchResults {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 2000 !important;
  max-height: min(60vh, 480px) !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #1e293b !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28) !important;
  text-align: left !important;
}

.global-search-results-inner {
  padding: 0.75rem 1rem 1rem;
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #1e293b !important;
  border-radius: 12px;
}

.global-search-item {
  display: block;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid #f1f5f9;
  text-decoration: none;
  border-radius: 8px;
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #1e293b !important;
  margin-bottom: 2px;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.global-search-item:last-child {
  border-bottom: none;
}

.global-search-item:hover,
.global-search-item:focus,
.global-search-item.is-selected {
  background: #f1f5f9 !important;
  background-color: #f1f5f9 !important;
  outline: none;
}

.global-search-item strong {
  display: block;
  color: var(--tf-blue-primary);
  font-size: 0.92rem;
  margin-bottom: 0.2rem;
}

.global-search-item span {
  display: block;
  font-size: 0.78rem;
  color: var(--tf-gray-600);
}

@media (max-width: 600px) {
  .global-search-results,
  #globalSearchResults {
    max-height: 55vh;
    border-radius: 10px;
  }
}

/* ==========================================================================
   10. BOUTON WHATSAPP FLOTTANT DISCRET (CDC Section 4)
   ========================================================================== */
.tf-whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 998;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background-color: #25D366;
  color: #ffffff;
  padding: 0.75rem 1.15rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  text-decoration: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

.tf-whatsapp-float:hover {
  background-color: #20ba59;
  color: #ffffff;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.55);
}

.tf-whatsapp-float:focus-visible {
  outline: 3px solid var(--tf-gold-accent);
  outline-offset: 3px;
}

.tf-whatsapp-icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .tf-whatsapp-float {
    bottom: 20px;
    right: 20px;
    padding: 0.75rem;
    border-radius: var(--radius-full);
  }
  .tf-whatsapp-float .tf-whatsapp-label {
    display: none;
  }
}

/* ==========================================================================
   11. PAGES CONTACT, LÉGALES, COOKIES, SITEMAP & 404
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 992px) {
  .contact-grid {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.contact-card {
  background: var(--tf-white);
  border: 1px solid var(--tf-gray-200);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-channel-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: var(--tf-gray-50);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--tf-blue-primary);
}

.contact-channel-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.contact-channel-details h4 {
  font-size: 1rem;
  margin-bottom: 0.2rem;
  color: var(--tf-blue-primary);
}

.contact-channel-details p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--tf-gray-700);
}

/* Legal & Documentation Pages */
.legal-content {
  background: var(--tf-white);
  border: 1px solid var(--tf-gray-200);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: var(--shadow-sm);
}

.legal-meta-box {
  background: var(--tf-blue-dark);
  color: var(--tf-white);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  border-left: 5px solid var(--tf-gold-accent);
}

.legal-meta-box p {
  color: var(--tf-gray-200);
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
}

.legal-section {
  margin-bottom: 2.25rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--tf-gray-200);
}

.legal-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.legal-section h2 {
  font-size: 1.35rem;
  margin-bottom: 1rem;
  color: var(--tf-blue-primary);
}

.legal-section h3 {
  font-size: 1.1rem;
  margin: 1.25rem 0 0.5rem;
  color: var(--tf-gray-900);
}

.legal-section ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-section li {
  margin-bottom: 0.5rem;
  color: var(--tf-gray-700);
}

/* Plan du Site */
.sitemap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.sitemap-card {
  background: var(--tf-white);
  border: 1px solid var(--tf-gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.sitemap-card h3 {
  font-size: 1.15rem;
  color: var(--tf-blue-primary);
  border-bottom: 2px solid var(--tf-gold-accent);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.sitemap-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sitemap-list li {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--tf-gray-100);
}

.sitemap-list li:last-child {
  border-bottom: none;
}

.sitemap-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  color: var(--tf-gray-800);
}

.sitemap-list a:hover {
  color: var(--tf-blue-primary);
  transform: translateX(4px);
  transition: transform var(--transition-fast);
}

/* Page 404 */
.error-404-container {
  text-align: center;
  padding: clamp(2rem, 6vw, 4rem) 1rem;
  max-width: 650px;
  margin: 0 auto;
}

.error-404-badge {
  display: inline-block;
  font-size: 5rem;
  font-weight: 900;
  font-family: var(--font-heading);
  color: var(--tf-blue-primary);
  line-height: 1;
  margin-bottom: 1rem;
  letter-spacing: -2px;
}

/* ==========================================================================
   12. ONGLETS ET CARTES DE PARCOURS /REJOINDRE
   ========================================================================== */
.rejoindre-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.rejoindre-card-btn {
  background: var(--tf-white);
  border: 2px solid var(--tf-gray-200);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  position: relative;
}

.rejoindre-card-btn:hover {
  border-color: var(--tf-blue-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.rejoindre-card-btn.active {
  border-color: var(--tf-blue-primary);
  background: var(--tf-blue-subtle);
  box-shadow: 0 0 0 3px rgba(0, 0, 127, 0.15), var(--shadow-md);
}

.rejoindre-card-btn.card-adhesion.active {
  border-color: var(--tf-gold-accent);
  box-shadow: 0 0 0 3px rgba(254, 195, 1, 0.25), var(--shadow-md);
}

.rejoindre-card-icon {
  font-size: 2.2rem;
  margin-bottom: 0.75rem;
  line-height: 1;
}

.rejoindre-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--tf-blue-primary);
  margin-bottom: 0.5rem;
}

.rejoindre-card-desc {
  font-size: 0.88rem;
  color: var(--tf-gray-600);
  line-height: 1.5;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.rejoindre-card-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  align-self: flex-start;
}

.rejoindre-form-container {
  display: none;
  background: var(--tf-white);
  border: 1px solid var(--tf-gray-200);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--shadow-md);
  margin-bottom: 3rem;
  animation: fadeIn 0.3s ease;
}

.rejoindre-form-container.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
  margin-bottom: 1.25rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--tf-gray-50);
  border: 1px solid var(--tf-gray-200);
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  color: var(--tf-gray-800);
  cursor: pointer;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.checkbox-item:hover {
  background: var(--tf-blue-subtle);
  border-color: var(--tf-blue-border);
}

.checkbox-item input[type="checkbox"] {
  accent-color: var(--tf-blue-primary);
  width: 17px;
  height: 17px;
  cursor: pointer;
}

.radio-group-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
  margin-bottom: 1.25rem;
}

.radio-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--tf-gray-50);
  border: 1px solid var(--tf-gray-200);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  cursor: pointer;
}

.radio-item:hover {
  background: var(--tf-blue-subtle);
}

.radio-item input[type="radio"] {
  accent-color: var(--tf-blue-primary);
  cursor: pointer;
}

.honeypot-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  z-index: -1;
}

.charte-box {
  background: var(--tf-gold-bg);
  border: 1px solid var(--tf-gold-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.charte-box h4 {
  color: var(--tf-blue-dark);
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.charte-box p {
  color: var(--tf-gray-800);
  font-size: 0.88rem;
  margin: 0;
  line-height: 1.5;
}

/* ==========================================================================
   BIZTOP INSPIRATION DESIGN SYSTEM — TEAM FISHER
   Organisation moderne, Hero asymétrique, Badges flottants, Ruban de compteurs,
   Cartes interactives avec micro-interactions et animations douces au défilement.
   Conforme aux tokens officiels : Blanc #ffffff, Bleu #00007f, Or #fec301.
   ========================================================================== */

/* --- 1. HERO SPLIT ASYMÉTRIQUE STYLE BIZTOP --- */
.biztop-hero {
  background: linear-gradient(135deg, #00007f 0%, #000055 55%, #05053b 100%);
  color: var(--tf-white);
  padding: clamp(3.5rem, 7vw, 6rem) 0 clamp(4.5rem, 8vw, 6.5rem);
  position: relative;
  z-index: 20;
  overflow: visible;
}

/* Calque décoratif isolé garantissant l'absence de débordement horizontal */
.biztop-hero-decor {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.biztop-hero::before,
.biztop-hero-decor::before {
  content: '';
  position: absolute;
  top: -150px;
  right: -100px;
  width: 580px;
  height: 580px;
  background: radial-gradient(circle, rgba(254, 195, 1, 0.18) 0%, rgba(254, 195, 1, 0.04) 50%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: pulseHeroGlow 9s ease-in-out infinite alternate;
}

/* Désactiver le pseudo-élément direct quand le calque isolé est présent */
.biztop-hero:has(.biztop-hero-decor)::before {
  display: none;
}

/* Si aucun calque dédié n'est présent et pas de recherche, maintenir overflow: hidden */
.biztop-hero:not(:has(.biztop-hero-decor)):not(:has(.global-search-box)) {
  overflow: hidden;
}

.biztop-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--tf-gold-accent) 0%, #ffffff 50%, var(--tf-gold-accent) 100%);
  z-index: 1;
  pointer-events: none;
  box-shadow: 0 -2px 10px rgba(254, 195, 1, 0.4);
}

.biztop-hero > .container,
.biztop-hero .hero-content,
.biztop-hero .reveal-on-scroll {
  position: relative;
  z-index: 10;
  overflow: visible;
}

/* Section Plan du site et sections suivantes : rester sous le Hero */
.section,
.sitemap-section,
.sitemap-grid,
main {
  position: relative;
  z-index: 1;
}

@keyframes pulseHeroGlow {
  0% { transform: scale(1) translate(0, 0); opacity: 0.8; }
  100% { transform: scale(1.15) translate(-25px, 25px); opacity: 1; }
}

.biztop-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
  position: relative;
  z-index: 3;
}

@media (min-width: 992px) {
  .biztop-hero-grid {
    grid-template-columns: 1.18fr 0.82fr;
    gap: 3.5rem;
  }
}

.biztop-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(254, 195, 1, 0.14);
  color: var(--tf-gold-accent);
  border: 1px solid rgba(254, 195, 1, 0.35);
  padding: 0.45rem 1.15rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.biztop-hero-tag:hover {
  transform: translateY(-1px);
  border-color: rgba(254, 195, 1, 0.6);
}

.biztop-hero-tag-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--tf-gold-accent);
  box-shadow: 0 0 10px var(--tf-gold-accent);
  display: inline-block;
  flex-shrink: 0;
  animation: blinkHeroDot 2s ease-in-out infinite;
}

@keyframes blinkHeroDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.75); }
}

.biztop-hero-title {
  color: var(--tf-white);
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.14;
  margin-bottom: 1.25rem;
  letter-spacing: -0.025em;
}

.biztop-hero-title .text-accent {
  background: linear-gradient(135deg, #fec301 0%, #ffe483 50%, #fec301 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  display: inline-block;
}

.biztop-hero-title .text-accent::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, rgba(254, 195, 1, 0.6), rgba(254, 195, 1, 0.1));
  border-radius: 2px;
  z-index: -1;
}

.biztop-hero-subtitle {
  font-size: clamp(1.02rem, 1.8vw, 1.2rem);
  line-height: 1.65;
  color: #e2e8f0;
  margin-bottom: 2.25rem;
  max-width: 620px;
}

.biztop-hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.25rem;
}

.biztop-hero-cta .btn {
  padding: 0.85rem 1.8rem;
  font-size: 1rem;
}

.biztop-hero-trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.86rem;
  color: #cbd5e1;
}

.biztop-hero-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.biztop-hero-trust-item strong {
  color: var(--tf-gold-accent);
}

/* Composition Visuelle Droite du Hero (Cadre + Badges flottants) */
.biztop-hero-visual-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.biztop-hero-frame {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(254, 195, 1, 0.4);
  border-radius: 28px;
  padding: 1.25rem;
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform var(--transition-spring), box-shadow var(--transition-spring);
}

.biztop-hero-frame:hover {
  transform: translateY(-4px);
  box-shadow: 0 35px 70px -15px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(254, 195, 1, 0.3) inset;
}

.biztop-hero-main-card {
  background: var(--tf-white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  color: var(--tf-gray-900);
}

.biztop-hero-card-img {
  position: relative;
  background: linear-gradient(135deg, var(--tf-blue-primary), var(--tf-blue-dark));
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.25rem 1.5rem;
  text-align: center;
}

.biztop-hero-card-body {
  padding: 1.25rem 1.5rem;
  background: var(--tf-white);
}

.biztop-hero-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--tf-blue-primary);
  margin-bottom: 0.25rem;
  letter-spacing: 0.3px;
}

.biztop-hero-card-sub {
  font-size: 0.85rem;
  color: var(--tf-gray-600);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Badges Flottants Stylisés BizTop (Style iOS / Frosted Glass) */
.biztop-floating-badge {
  position: absolute;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.94);
  color: var(--tf-gray-900);
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 85, 0.25), 0 0 1px 1px rgba(0, 0, 85, 0.05);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  z-index: 5;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-left: 4px solid var(--tf-gold-accent);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.biztop-floating-badge:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 25px 50px -10px rgba(0, 0, 85, 0.3);
}

.biztop-badge-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--tf-gold-subtle);
  border: 1px solid var(--tf-gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(254, 195, 1, 0.2);
}

.biztop-badge-text {
  display: flex;
  flex-direction: column;
}

.biztop-badge-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--tf-blue-primary);
  line-height: 1.1;
}

.biztop-badge-lbl {
  font-size: 0.76rem;
  color: var(--tf-gray-600);
  font-weight: 600;
}

/* Positionnements flottants sur desktop */
.biztop-badge-top-left {
  top: -24px;
  left: -24px;
  animation: floatBadge1 5s ease-in-out infinite alternate;
}

.biztop-badge-bottom-right {
  bottom: -24px;
  right: -24px;
  animation: floatBadge2 5.5s ease-in-out infinite alternate;
}

@keyframes floatBadge1 {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(-12px) rotate(-1deg); }
}

@keyframes floatBadge2 {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(12px) rotate(1deg); }
}

@media (max-width: 768px) {
  .biztop-floating-badge {
    position: static;
    margin-top: 1rem;
    width: 100%;
    animation: none;
    box-shadow: var(--shadow-md);
  }
  .biztop-hero-visual-wrapper {
    flex-direction: column;
  }
  .biztop-hero-frame {
    padding: 0.85rem;
    border-radius: 20px;
  }
}

/* --- 2. RUBAN DE COMPTEURS ÉLEVÉ (METRIC COUNTER RIBBON) --- */
.biztop-counter-ribbon {
  position: relative;
  z-index: 10;
  margin-top: -50px;
  margin-bottom: 2.5rem;
}

.biztop-counter-card {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 24px;
  border: 1px solid rgba(0, 0, 127, 0.08);
  border-top: 5px solid var(--tf-gold-accent);
  box-shadow: 0 20px 45px -12px rgba(0, 0, 85, 0.14), 0 0 1px 1px rgba(0, 0, 85, 0.05);
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
}

.biztop-counter-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (min-width: 992px) {
  .biztop-counter-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    divide-x: 1px solid var(--tf-gray-200);
  }
}

@media (max-width: 480px) {
  .biztop-counter-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

.biztop-counter-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0.75rem;
  transition: transform var(--transition-fast);
}

.biztop-counter-item:hover {
  transform: translateY(-3px);
}

.biztop-counter-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--tf-blue-subtle);
  border: 1px solid var(--tf-blue-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  transition: all var(--transition-normal);
}

.biztop-counter-item:hover .biztop-counter-icon {
  background: var(--tf-gold-accent);
  color: var(--tf-blue-primary);
  border-color: var(--tf-gold-hover);
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(254, 195, 1, 0.35);
}

.biztop-counter-content {
  display: flex;
  flex-direction: column;
}

.biztop-counter-number {
  font-family: var(--font-heading);
  font-size: clamp(1.85rem, 3vw, 2.45rem);
  font-weight: 800;
  color: var(--tf-blue-primary);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.biztop-counter-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--tf-gray-800);
  margin-top: 0.25rem;
}

.biztop-counter-desc {
  font-size: 0.75rem;
  color: var(--tf-gray-500);
}

/* --- 3. LES 4 PILIERS D'ACTION (SERVICES STYLE BIZTOP) --- */
.biztop-pillars-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (min-width: 640px) {
  .biztop-pillars-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .biztop-pillars-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.biztop-pillar-card {
  background: var(--tf-white);
  border: 1px solid var(--tf-gray-200);
  border-radius: 18px;
  padding: 2rem 1.6rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.biztop-pillar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--tf-blue-primary);
  transition: all var(--transition-normal);
}

.biztop-pillar-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 32px rgba(0, 0, 127, 0.12);
  border-color: var(--tf-gold-border);
}

.biztop-pillar-card:hover::before {
  background: var(--tf-gold-accent);
  height: 6px;
}

.biztop-pillar-icon-box {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: var(--tf-blue-subtle);
  border: 1px solid var(--tf-blue-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  transition: all var(--transition-normal);
}

.biztop-pillar-card:hover .biztop-pillar-icon-box {
  background: var(--tf-gold-subtle);
  border-color: var(--tf-gold-border);
  transform: scale(1.08) rotate(3deg);
}

.biztop-pillar-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--tf-blue-primary);
  margin-bottom: 0.75rem;
}

.biztop-pillar-text {
  font-size: 0.9rem;
  color: var(--tf-gray-600);
  line-height: 1.55;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.biztop-pillar-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--tf-blue-primary);
  transition: gap var(--transition-fast), color var(--transition-fast);
}

.biztop-pillar-link span.arrow {
  transition: transform var(--transition-fast);
}

.biztop-pillar-card:hover .biztop-pillar-link {
  color: var(--tf-gold-hover);
}

.biztop-pillar-card:hover .biztop-pillar-link span.arrow {
  transform: translateX(6px);
}

/* --- 4. SPOTLIGHT DU LEADER STYLE BIZTOP EXECUTIVE --- */
.biztop-exec-spotlight {
  background: linear-gradient(135deg, #ffffff 0%, var(--tf-blue-subtle) 100%);
  border: 1px solid var(--tf-blue-border);
  border-radius: 24px;
  padding: clamp(2rem, 5vw, 3.5rem);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 127, 0.08);
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 992px) {
  .biztop-exec-spotlight {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3.5rem;
  }
}

.biztop-quote-box {
  position: relative;
  padding-left: 1.5rem;
  border-left: 4px solid var(--tf-gold-accent);
  margin-bottom: 1.5rem;
}

.biztop-quote-mark {
  font-family: Georgia, serif;
  font-size: 3.5rem;
  line-height: 1;
  color: var(--tf-gold-accent);
  opacity: 0.7;
  display: block;
  margin-bottom: -1rem;
}

.biztop-quote-text {
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  line-height: 1.6;
  font-style: italic;
  color: var(--tf-gray-800);
}

.biztop-exec-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
}

.biztop-exec-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--tf-blue-primary);
}

.biztop-exec-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--tf-gray-600);
}

.biztop-exec-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.biztop-exec-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--tf-white);
  border: 1px solid var(--tf-blue-border);
  border-radius: var(--radius-full);
  padding: 0.3rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--tf-blue-primary);
}

/* Portrait card avec badge vérifié */
.biztop-portrait-card {
  background: var(--tf-white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--tf-blue-border);
  position: relative;
}

.biztop-portrait-verified {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--tf-gold-accent);
  color: var(--tf-blue-primary);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* --- 5. PROCESSUS & PERSPECTIVES EN 4 ÉTAPES (STYLE BIZTOP PROCESS) --- */
.biztop-steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

@media (min-width: 640px) {
  .biztop-steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .biztop-steps-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.biztop-step-card {
  background: var(--tf-white);
  border: 1px solid var(--tf-gray-200);
  border-radius: 18px;
  padding: 2.25rem 1.5rem 1.75rem;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.biztop-step-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 30px rgba(0, 0, 127, 0.1);
  border-color: var(--tf-gold-border);
}

.biztop-step-number {
  position: absolute;
  top: 15px;
  right: 18px;
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  color: rgba(254, 195, 1, 0.35);
  line-height: 1;
  transition: color var(--transition-normal);
}

.biztop-step-card:hover .biztop-step-number {
  color: var(--tf-gold-accent);
}

.biztop-step-badge {
  display: inline-block;
  background: var(--tf-blue-subtle);
  color: var(--tf-blue-primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
  align-self: flex-start;
}

.biztop-step-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--tf-blue-primary);
  margin-bottom: 0.6rem;
}

.biztop-step-desc {
  font-size: 0.88rem;
  color: var(--tf-gray-600);
  line-height: 1.5;
}

/* --- 6. ANIMATIONS AU DÉFILEMENT (REVEAL-ON-SCROLL STYLE BIZTOP) --- */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .biztop-badge-top-left, .biztop-badge-bottom-right {
    animation: none !important;
  }
}

/* --- 7. AMÉLIORATION DES CARTES D'ACTIONS & ACTUALITÉS --- */
.action-card, .news-card, .event-card {
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  border-radius: 16px;
  overflow: hidden;
}

.action-card:hover, .news-card:hover, .event-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--tf-blue-border);
}

.action-card-img {
  overflow: hidden;
  position: relative;
}

.action-card-img img {
  transition: transform 0.4s ease;
}

.action-card:hover .action-card-img img {
  transform: scale(1.05);
}

.biztop-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--tf-blue-subtle);
  color: var(--tf-blue-primary);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
}

.biztop-tag-chip.gold {
  background: var(--tf-gold-subtle);
  color: #926900;
  border: 1px solid var(--tf-gold-border);
}

/* ==========================================================================
   Cadre 5 : Résumé de l'activité (Compte-rendu journalistique développé)
   ========================================================================== */
.card-compte-rendu-detaille {
  grid-column: 1 / -1;
  width: 100%;
  box-sizing: border-box;
  background: var(--tf-white);
  padding: 1.75rem;
  border-radius: 16px;
  border: 1px solid var(--tf-gray-200);
  border-top: 4px solid var(--tf-blue-primary);
  box-shadow: 0 10px 25px rgba(0, 0, 127, 0.06);
  transition: transform var(--transition-fast);
}

.card-compte-rendu-detaille h4 {
  color: var(--tf-blue-primary);
  margin-bottom: 1.15rem;
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.compte-rendu-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  box-sizing: border-box;
  overflow-wrap: anywhere;
}

.compte-rendu-content p {
  color: var(--tf-gray-700);
  font-size: clamp(0.92rem, 1.5vw, 1rem);
  line-height: 1.75;
  margin: 0;
  text-align: left;
}

@media (max-width: 640px) {
  .card-compte-rendu-detaille {
    padding: 1.25rem 1rem;
    border-radius: 12px;
  }
  .card-compte-rendu-detaille h4 {
    margin-bottom: 0.85rem;
    font-size: 1.05rem;
  }
  .compte-rendu-content {
    gap: 0.85rem;
  }
  .compte-rendu-content p {
    font-size: 0.92rem;
    line-height: 1.65;
  }
}

/* ==========================================================================
   BANDEAU GRAND DOSSIER THÉMATIQUE (actions.html)
   ========================================================================== */
.active-dossier-banner,
#activeDossierBanner {
  color: #ffffff;
}

.active-dossier-banner h2,
#activeDossierTitle {
  color: #ffffff;
}

.dossier-banner-description,
.dossier-banner-description p,
#activeDossierDesc,
#activeDossierBanner .dossier-banner-description,
#activeDossierBanner p {
  color: #ffffff !important;
}

.dossier-banner-description a,
.dossier-banner-description a:visited,
.dossier-banner-description a:hover,
.dossier-banner-description a:focus,
#activeDossierBanner .dossier-banner-description a,
#activeDossierBanner .dossier-banner-description a:visited,
#activeDossierBanner .dossier-banner-description a:hover,
#activeDossierBanner .dossier-banner-description a:focus {
  color: #ffffff;
  text-decoration: underline;
}

/* ==========================================================================
   RÉORGANISATION DES PHOTOS D'ILLUSTRATION & PRÉSENTATION HARMONISÉE
   ========================================================================== */
.detail-breadcrumb {
  margin-bottom: 1.25rem;
}

.detail-header {
  margin-bottom: 1.25rem;
}

.detail-hero-media {
  margin-bottom: 1.75rem;
  width: 100%;
}

.detail-main-photo-figure {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: var(--tf-gray-100);
  border: 1px solid var(--tf-gray-200);
  box-shadow: 0 10px 30px rgba(0, 0, 127, 0.08);
}

.detail-main-photo-figure img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  display: block;
  aspect-ratio: 16 / 9;
}

.detail-main-photo-figure figcaption {
  padding: 0.75rem 1.25rem;
  font-size: 0.85rem;
  color: var(--tf-gray-600);
  background: var(--tf-gray-50);
  border-top: 1px solid var(--tf-gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.detail-essentials-bar {
  background: var(--tf-white);
  border: 1px solid var(--tf-gray-200);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  box-shadow: 0 6px 18px rgba(0, 0, 127, 0.04);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.85rem;
}

.detail-gallery-section {
  margin-bottom: 2.5rem;
}

.detail-gallery-section h3 {
  font-size: 1.2rem;
  color: var(--tf-blue-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.action-photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.action-photo-gallery figure {
  margin: 0;
  background: var(--tf-white);
  border: 1px solid var(--tf-gray-200);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
}

.action-photo-gallery img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}

.action-photo-gallery figcaption {
  padding: 0.6rem 0.9rem;
  font-size: 0.8rem;
  color: var(--tf-gray-600);
  background: var(--tf-gray-50);
  border-top: 1px solid var(--tf-gray-200);
  margin-top: auto;
}

/* ==========================================================================
   MÉDIATHÈQUE DYNAMIQUE & VISIONNEUSE MODALE (LIGHTBOX)
   ========================================================================== */
.mediatheque-subfilters {
  background: var(--tf-white);
  border: 1px solid var(--tf-gray-200);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 6px 20px rgba(0, 0, 127, 0.04);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mediatheque-cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mediatheque-cat-btn {
  border: 1px solid var(--tf-gray-300);
  background: var(--tf-white);
  color: var(--tf-gray-700);
  padding: 0.45rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.mediatheque-cat-btn:hover {
  border-color: var(--tf-blue-primary);
  color: var(--tf-blue-primary);
  background: var(--tf-blue-subtle);
}

.mediatheque-cat-btn.active {
  background: var(--tf-blue-primary);
  color: var(--tf-white);
  border-color: var(--tf-blue-primary);
}

.mediatheque-cat-count {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.08);
}

.mediatheque-cat-btn.active .mediatheque-cat-count {
  background: rgba(255, 255, 255, 0.25);
  color: var(--tf-white);
}

.mediatheque-secondary-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--tf-gray-200);
}

.mediatheque-filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.mediatheque-select,
.mediatheque-search-input {
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  border: 1px solid var(--tf-gray-300);
  border-radius: var(--radius-sm);
  background: var(--tf-white);
  color: var(--tf-gray-800);
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition-fast);
}

.mediatheque-select:focus,
.mediatheque-search-input:focus {
  border-color: var(--tf-blue-primary);
  box-shadow: 0 0 0 2px var(--tf-blue-subtle);
}

.mediatheque-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.mediatheque-card {
  background: var(--tf-white);
  border: 1px solid var(--tf-gray-200);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 127, 0.05);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.mediatheque-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(0, 0, 127, 0.12);
}

.mediatheque-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--tf-gray-100);
  cursor: pointer;
}

.mediatheque-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.mediatheque-card:hover .mediatheque-card-media img {
  transform: scale(1.05);
}

.mediatheque-card-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: rgba(0, 0, 127, 0.85);
  color: var(--tf-white);
  backdrop-filter: blur(4px);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  z-index: 2;
}

.mediatheque-card-zoom-btn {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background: rgba(0, 0, 0, 0.65);
  color: var(--tf-white);
  border: none;
  border-radius: 9999px;
  padding: 0.4rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: background var(--transition-fast);
  z-index: 2;
}

.mediatheque-card-zoom-btn:hover {
  background: var(--tf-blue-primary);
}

.mediatheque-card-body {
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.mediatheque-card-title {
  font-size: 1rem;
  color: var(--tf-blue-primary);
  margin-bottom: 0.5rem;
  line-height: 1.35;
  font-weight: 700;
}

.mediatheque-card-caption {
  font-size: 0.82rem;
  color: var(--tf-gray-600);
  margin-bottom: 0.75rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mediatheque-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  font-size: 0.78rem;
  color: var(--tf-gray-500);
  font-weight: 600;
  margin-top: auto;
  padding-top: 0.65rem;
  border-top: 1px solid var(--tf-gray-100);
}

.mediatheque-card-link {
  margin-top: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--tf-blue-primary);
  text-decoration: none;
}

.mediatheque-card-link:hover {
  color: var(--tf-blue-light);
  text-decoration: underline;
}

/* Lightbox Modal */
.tf-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.tf-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.tf-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 40, 0.92);
  backdrop-filter: blur(10px);
}

.tf-lightbox-dialog {
  position: relative;
  z-index: 2;
  max-width: 94vw;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  outline: none;
  box-sizing: border-box;
}

.tf-lightbox-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1000px;
  width: 100%;
}

.tf-lightbox-img-wrap {
  position: relative;
  max-height: 68vh;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  background: #000;
}

.tf-lightbox-img {
  max-width: 90vw;
  max-height: 68vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.tf-lightbox-info {
  background: rgba(255, 255, 255, 0.98);
  color: var(--tf-gray-900);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-top: 0.75rem;
  width: 100%;
  max-width: 1000px;
  box-sizing: border-box;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tf-lightbox-text {
  flex: 1;
  min-width: 240px;
}

.tf-lightbox-title {
  font-size: 1.05rem;
  color: var(--tf-blue-primary);
  margin-bottom: 0.25rem;
  font-weight: 700;
}

.tf-lightbox-caption {
  font-size: 0.85rem;
  color: var(--tf-gray-700);
  margin: 0 0 0.35rem;
}

.tf-lightbox-meta {
  font-size: 0.8rem;
  color: var(--tf-gray-500);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-weight: 600;
}

.tf-lightbox-close {
  position: absolute;
  top: -46px;
  right: 0;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  width: 38px;
  height: 38px;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.tf-lightbox-close:hover {
  background: var(--tf-gold-accent);
  color: var(--tf-blue-dark);
}

.tf-lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  width: 46px;
  height: 46px;
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
  z-index: 5;
}

.tf-lightbox-nav-btn:hover {
  background: var(--tf-gold-accent);
  color: var(--tf-blue-dark);
}

.tf-lightbox-prev {
  left: max(10px, 2vw);
}

.tf-lightbox-next {
  right: max(10px, 2vw);
}

@media (max-width: 640px) {
  .mediatheque-subfilters {
    padding: 1rem;
    border-radius: 12px;
  }
  .mediatheque-photos-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .tf-lightbox-img-wrap {
    max-height: 55vh;
  }
  .tf-lightbox-img {
    max-height: 55vh;
  }
  .tf-lightbox-info {
    padding: 0.85rem;
  }
  .tf-lightbox-nav-btn {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }
}


