/* ==================== CYPRINUS FISHING LOGGER — UI ==================== */
/* Charte graphique : Vert kaki · Marron doré · Noir                      */

/* ==================== HEADER NAV ALIGNMENT ==================== */
/* Logo gauche, nav pills juste après le logo */
.ast-primary-header-bar .ast-builder-grid-row-has-sides.ast-builder-grid-row-no-center {
    grid-template-columns: auto auto !important;
    justify-content: flex-start !important;
}
.ast-primary-header-bar .site-header-primary-section-right {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
}

/* ==================== VARIABLES CYPRINUS ==================== */
:root {
    --cf-khaki:        #6B7A2A;   /* Vert kaki primaire */
    --cf-khaki-light:  #8A9A3A;   /* Vert kaki survol */
    --cf-khaki-dark:   #4A5C14;   /* Vert kaki foncé */
    --cf-khaki-deep:   #3D5016;   /* Vert kaki très foncé */
    --cf-gold:         #C9A227;   /* Marron doré */
    --cf-gold-light:   #D4B240;   /* Marron doré survol */
    --cf-gold-dark:    #8B6914;   /* Marron doré foncé */
    --cf-black:        #1A1A0F;   /* Noir Cyprinus */
    --cf-shadow-khaki: rgba(107, 122, 42, 0.25);
}

/* Global accent color override — Brand Cyprinus */
#fl-catches-manager,
.fl-apple-catch-form,
.fl-feed-container,
.fl-apple-auth-form,
.fl-apple-form,
#fl-catches-manager select,
#fl-catches-manager input {
  accent-color: #6B7A2A;
}

/* Global focus style override */
input:focus, select:focus, textarea:focus {
  outline-color: #6B7A2A;
}

/* Masquer le lien "Créer un compte" S'IL est affiché dans le contexte "Combo / Dual" 
   (car le formulaire d'inscription est déjà juste à côté) */
.fl-auth-dual-container .fl-create-account-link {
    display: none !important;
}

/* Bouton Connexion / Déconnexion (Shortcode) */
.fl-login-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #6B7A2A; /* Couleur Brand (Purple) */
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: background 0.2s, transform 0.1s;
}
.fl-login-btn:hover {
    background: #8A9A3A; /* Lighter/Brighter Purple */
    color: white;
    text-decoration: none;
}
.fl-login-btn:active {
  transform: scale(0.98);
}

/* Bouton Déconnexion Rouge (Shortcode Login Form) - Pleine largeur avec icône */
.fl-logout-btn-full {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    padding: 14px 20px !important;
    background-color: #ff3b30 !important; /* Apple Red */
    color: white !important;
    text-decoration: none !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    border: none !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease, transform 0.1s ease !important;
    opacity: 1 !important;
    visibility: visible !important;
    box-shadow: 0 2px 8px rgba(255, 59, 48, 0.25);
}
.fl-logout-btn-full:hover {
    background-color: #ff5e55 !important; /* Rouge plus clair au survol */
    color: white !important;
    text-decoration: none !important;
}
.fl-logout-btn-full:active {
    transform: scale(0.98);
    background-color: #e03228 !important; /* Rouge plus foncé au clic */
}
.fl-logout-btn-full svg {
    margin-right: 10px;
    fill: currentColor;
    width: 20px;
    height: 20px;
}
.fl-logout-btn-red:active {
  transform: scale(0.98);
}

.fl-apple-catch-form {
  background: rgba(20,25,8,0.97);
  border-radius: 18px;
  box-shadow: 0 4px 24px 0 rgba(0,0,0,0.4);
  padding: 32px 28px;
  max-width: 750px;
  margin: 32px auto;
  font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;
  color: #D0D8B0;
}
.fl-apple-catch-form h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 18px;
  color: #C9A227;
  text-align: left;
}
.fl-form-row {
  margin-bottom: 18px;
}
.fl-apple-catch-form label {
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
  color: #D0D8B0;
}
.fl-apple-catch-form input[type="file"],
.fl-apple-catch-form input[type="number"],
.fl-apple-catch-form input[type="text"],
.fl-apple-catch-form select,
.fl-apple-catch-form textarea {
  width: 100%;
  border: 1px solid rgba(107,122,42,0.35);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 1rem;
  background: rgba(12,15,4,0.85);
  color: #D0D8B0;
  margin-bottom: 2px;
  box-sizing: border-box;
  transition: border 0.2s;
}
.fl-apple-catch-form input:focus,
.fl-apple-catch-form select:focus,
.fl-apple-catch-form textarea:focus {
  border: 1.5px solid #6B7A2A;
  box-shadow: 0 0 0 3px rgba(107, 122, 42, 0.15);
  outline: none;
}
.fl-apple-catch-form .fl-required {
  color: #e53935;
  font-weight: bold;
}
.fl-apple-catch-form .fl-help {
  color: #8A9A3A;
  font-size: 0.98em;
  display: block;
  margin-top: 4px;
}
.fl-apple-catch-form .fl-file-btn,
.fl-apple-catch-form .fl-file-btn:hover,
.fl-apple-catch-form .fl-file-btn:active,
.fl-apple-catch-form .fl-file-btn:focus,
.fl-apple-catch-form .fl-file-btn:visited {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    text-decoration: none !important;
}
.fl-btn-main {
  display: block;
  width: 100%;
  background: #6B7A2A;
  background: linear-gradient(135deg, #6B7A2A 0%, #3D5016 100%);
  border: none;
  border-radius: 14px;
  padding: 16px 28px;
  font-size: 1.15rem;
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin-top: 24px;
  box-shadow: 0 4px 12px rgba(107, 122, 42, 0.35);
  letter-spacing: -0.01em;
}
.fl-btn-main:hover {
  background: linear-gradient(135deg, #8A9A3A 0%, #4A5C1A 100%);
  transform: scale(1.02);
  box-shadow: 0 8px 20px rgba(107, 122, 42, 0.45);
  color: #fff;
}
.fl-btn-main:active {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(107, 122, 42, 0.3);
}
.fl-upload-status {
  display: flex;
  align-items: center;
  color: #6B7A2A;
  font-weight: 500;
  font-size: 1.08em;
}
.fl-loader {
  width: 22px;
  height: 22px;
  border: 3px solid #e5e5ea;
  border-top: 3px solid #6B7A2A;
  border-radius: 50%;
  margin-right: 10px;
  animation: fl-spin 1s linear infinite;
  display: inline-block;
}
@keyframes fl-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.fl-upload-message {
  min-height: 18px;
  font-size: 1em;
  color: #e53935;
  margin-top: 4px;
}
.fl-upload-message.fl-success-banner {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 14px 20px 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6B7A2A, #3D5016);
    color: #fff !important;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.4;
    text-align: center;
    box-sizing: border-box;
    box-shadow: 0 4px 15px rgba(107, 122, 42,0.35);
    margin-top: 10px;
    overflow: visible;
    -webkit-font-smoothing: antialiased;
}
/* Apple style for chat widget */
.fl-apple-chat-widget {
  position: fixed;
  top: 100px; /* Position moved to top right */
  right: 24px;
  bottom: auto; /* Allow shrinking when closed */
  z-index: 9999;
  width: auto; /* Defaut: Auto width (Close state) */
  max-width: 320px;
  height: auto;
  max-height: calc(100vh - 120px); /* Ensure it stays within viewport */
  display: flex;
  flex-direction: column; /* Use flexbox for layout */
  font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;
  box-shadow: 0 8px 32px 0 rgba(0,0,0,0.12);
  border-radius: 18px;
  overflow: hidden;
  background: white; /* Ensure bg */
  transition: width 0.2s;
}
.fl-apple-chat-widget.fl-is-active {
    width: 320px; /* Fixed width when open */
}

.fl-apple-chat-header {
  white-space: nowrap; /* Prevent wrapping when minimized */
  flex-shrink: 0; /* Header constant size */
  background: #6B7A2A !important; /* Violet Brand */
  background: linear-gradient(90deg, #6B7A2A 0%, #4A5C14 100%) !important;
  border-radius: 18px 18px 0 0;
  padding: 10px 14px; /* Adjusted padding */
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  font-weight: 600;
  font-size: 1rem;
  color: #ffffff !important; /* Texte Blanc */
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
}
.fl-apple-chat-header b {
  margin-right: 4px; /* Petit espace après le titre */
}
#fl-chat-close {
  font-size: 1.2em;
  color: #ffffff !important; /* Blanc Forcé */
  opacity: 0.9;
  transition: opacity 0.2s;
  cursor: pointer;
  /* Correction Dashicon alignment */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}
#fl-chat-close:hover {
  opacity: 1;
  background: rgba(255,255,255,0.2); /* Petit effet de survol rond */
  border-radius: 50%;
}

/* FIX: Force Flexbox when jQuery uses display:block (show/slideToggle) */
.fl-apple-chat-widget[style*="display: block"],
.fl-apple-chat-body[style*="display: block"],
#fl-chat-conv[style*="display: block"] {
    display: flex !important;
}

#fl-chat-body {
    display: none; /* Hide by default to prevent flash */
}
.fl-apple-chat-body {
  background: #fff;
  border-radius: 0 0 18px 18px;
  box-shadow: 0 4px 24px #0002;
  padding: 0 0 12px 0;
  display: flex;
  flex-direction: column;
  overflow: hidden; 
  flex: 1; /* Take remaining space */
  min-height: 0; /* Important for firefox flex scrolling */
}
.fl-apple-chat-friends {
  padding: 14px 20px 10px 20px;
  border-bottom: 1px solid #ececec;
  background: #f8f8fa;
  /* Gestion "Nombreux Amis" : Scroll vertical limité */
  max-height: 35vh; 
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* Valid for iOS momentum scroll */
}
.fl-apple-chat-friends ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.fl-apple-chat-friends li {
  margin: 7px 0;
  padding: 7px 0 7px 0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9rem; /* Reduced font */
  transition: background 0.18s;
  color: #0071e3;
  font-weight: 500;
}
.fl-apple-chat-friends li:hover {
  background: #e5e5ea;
}
/* Messages: Make it flex container */
/* Force Messages to take remaining space but NOT shrink below readable height */
#fl-chat-conv {
    display: none; /* Toggled by JS */
    flex-direction: column;
    /* FLEX STABILITY FIX: Use 0 basis to force strict resizing. REMOVED height:100% causing overflow */
    flex: 1 1 0px; 
    min-height: 0;
    position: relative;
    background: #fff;
    overflow: hidden;
    padding: 0 16px; /* Adjust padding */
}

/* Force Friends container NOT to grow indefinitely pushing input out */
#fl-chat-friends {
    flex-shrink: 0; /* Ne pas réduire, mais ne pas pousser */
    max-height: 50vh; /* Max 50% de l'écran */
    display: flex;
    flex-direction: column;
}
#fl-chat-messages {
  height: auto; /* Allow flex to control height */
  flex: 1;
  overflow-y: auto;
  margin: 10px 0 14px 0;
  background: #f5f5f7;
  border-radius: 12px;
  padding: 10px 8px;
  box-shadow: 0 1px 4px #0001;
  /* Fix scroll mobile: Empêche le scroll de la page derrière */
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
#fl-chat-messages .fl-chat-msg {
  margin-bottom: 7px;
  display: flex;
  justify-content: flex-end;
}
#fl-chat-messages .fl-chat-msg.friend {
  justify-content: flex-start;
}
#fl-chat-messages .fl-chat-bubble {
  display: inline-block;
  background: #0071e3;
  color: #fff;
  padding: 7px 14px;
  border-radius: 16px 16px 4px 16px;
  max-width: 70%;
  word-break: break-word;
  font-size: 1rem;
  box-shadow: 0 1px 4px #0001;
}
#fl-chat-messages .fl-chat-msg.friend .fl-chat-bubble {
  background: #e5e5ea;
  color: #222;
  border-radius: 16px 16px 16px 4px;
}
#fl-chat-form {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}
#fl-chat-input {
  flex: 1;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid #d1d1d6;
  font-size: 1rem;
  background: #fff;
  margin-right: 8px;
  transition: border 0.2s;
}
#fl-chat-input:focus {
  border: 1.5px solid #0071e3;
  outline: none;
}
#fl-chat-form button {
  background: linear-gradient(90deg,#f5f5f7 0%,#e5e5ea 100%);
  border: none;
  border-radius: 12px;
  padding: 8px 18px;
  font-size: 1rem;
  color: #0071e3;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
#fl-chat-form button:hover {
  background: linear-gradient(90deg,#e5e5ea 0%,#f5f5f7 100%);
  color: #005bb5;
}
/* Mobile specific override */
@media (max-width: 600px) {
  /* ÉTAT FERMÉ (Défaut) : Position "Parfaite" en haut à droite */
  .fl-apple-chat-widget {
    top: 80px; 
    right: 10px;
    bottom: auto !important; /* Important : Pas d'ancrage bas quand fermé (Collonne blanche fix) */
    left: auto;
    width: auto;
    max-width: 90vw;
    height: auto !important;
    max-height: none !important;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); /* Animation fluide ouverture */
  }

  /* ÉTAT OUVERT : On déplace tout pour prendre 100% de l'écran */
  /* Cela garantit que la zone de saisie est visible et utilise tout l'espace */
  .fl-apple-chat-widget.fl-is-active {
    position: fixed;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    z-index: 999999; /* Au dessus de tout */
  }

  /* Compact Mode (Réduction Marges/Padding) */
  .fl-apple-chat-header {
      padding: 12px 16px !important; /* Plus d'espace pour le doigt sur la croix */
      min-height: 50px;
      flex-shrink: 0; 
  }
  .fl-apple-chat-body {
      padding-bottom: 0 !important;
  }
  .fl-apple-chat-friends {
      padding: 6px 10px !important;
      max-height: none !important;
      flex: 1 !important;
      overflow-y: auto !important;
  }
  /* Navigation stack mobile: quand conversation ouverte, cacher la liste d'amis */
  .fl-conv-active .fl-apple-chat-friends {
      display: none !important;
  }
  /* List items plus compacts mais tactiles */
  .fl-apple-chat-friends li {
      margin: 4px 0 !important;
      padding: 12px 8px !important;
      display: flex !important;
      align-items: center !important;
  }
  /* Messages area optimization */
  #fl-chat-messages {
      margin: 5px 0 5px 0 !important;
      padding: 8px 6px !important;
      min-height: 0; /* Allow shrinking */
  }
  /* Conversation fullscreen quand ouverte */
  #fl-chat-conv {
      padding: 0 10px 10px 10px !important;
      padding-bottom: env(safe-area-inset-bottom, 20px) !important;
      flex: 1 1 0 !important;
  }
  /* Input Area Touch & Space Optimization */
  #fl-chat-form {
      margin-bottom: 10px !important;
      padding-bottom: env(safe-area-inset-bottom, 10px);
      flex-shrink: 0; /* CRITICAL: Never shrink input area */
      background: #fff; /* Ensure opacity */
  }
  #fl-chat-input {
      height: 44px !important; /* Standard Touch Target Size (Apple Human Interface) */
      padding: 8px 12px !important;
      font-size: 16px !important; /* Prevents iOS auto-zoom */
      margin-right: 6px !important;
  }
  #fl-chat-form button {
      height: 44px !important;
      padding: 0 16px !important;
      min-width: 50px;
  }

  /* Amélioration détection tactile globale */
  .fl-chat-msg, .fl-friend-list li, #fl-chat-close {
       cursor: pointer;
       touch-action: manipulation;
  }
}

/* ===== Chat Conversation Header Bar ===== */
.fl-conv-header-bar {
    flex-shrink: 0;
    padding: 10px 0 5px 0;
    border-bottom: 1px solid #f5f5f7;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}
.fl-conv-friend-name {
    font-size: 1.08em;
    font-weight: 700;
    color: #4A5C14;
}
/* Bouton Retour — Charte Violet */
.fl-chat-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    margin-right: 6px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6B7A2A 0%, #4A5C14 100%);
    color: #fff;
    cursor: pointer;
    transition: opacity 0.2s;
    box-shadow: 0 2px 8px rgba(106, 13, 173, 0.25);
}
.fl-chat-back-btn:hover {
    opacity: 0.85;
}
.fl-chat-back-btn .dashicons {
    font-size: 22px;
    width: 22px;
    height: 22px;
    color: #fff;
}
/* Fishing Logger UI - Apple inspired look */
.fl-dashboard, #fl-friends-manager, #fl-catches-manager, #fl-badges-summary, #fl-password-manager, #fl-help-section, #fl-spots-manager {
  font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;
  background: #f8f8fa;
  border-radius: 18px;
  box-shadow: 0 4px 24px 0 rgba(0,0,0,0.08);
  padding: 32px 24px;
  margin: 32px auto;
  max-width: 600px;
  color: #222;
}
.fl-dashboard h2, #fl-friends-manager h3, #fl-catches-manager h3, #fl-badges-summary h3, #fl-password-manager h3, #fl-help-section h3 {
  font-weight: 700;
  font-size: 2rem;
  margin-bottom: 24px;
  color: #111;
  letter-spacing: -1px;
}
.fl-dashboard ul, #fl-friends-list, #fl-catches-list, #fl-badges-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
}
.fl-dashboard ul li, #fl-friends-list li, #fl-catches-list li, #fl-badges-list li {
  padding: 12px 0;
  border-bottom: 1px solid #ececec;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.fl-dashboard ul li:last-child, #fl-friends-list li:last-child, #fl-catches-list li:last-child, #fl-badges-list li:last-child {
  border-bottom: none;
}
.fl-dashboard ul li a, #fl-friends-list button, #fl-catches-list button, #fl-badges-list button, #fl-password-form button, #fl-add-friend-btn, #fl-add-catch-btn {
  background: linear-gradient(90deg,#f5f5f7 0%,#e5e5ea 100%);
  border: none;
  border-radius: 12px;
  padding: 8px 18px;
  font-size: 1rem;
  color: #0071e3;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  margin-left: 8px;
}
.fl-dashboard ul li a:hover, #fl-friends-list button:hover, #fl-catches-list button:hover, #fl-badges-list button:hover, #fl-password-form button:hover, #fl-add-friend-btn:hover, #fl-add-catch-btn:hover {
  background: linear-gradient(90deg,#e5e5ea 0%,#f5f5f7 100%);
  color: #005bb5;
}
input, select, textarea {
  border: 1px solid #d1d1d6;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 1rem;
  margin-bottom: 16px;
  width: 100%;
  background: #fff;
  box-sizing: border-box;
  transition: border 0.2s;
}
input:focus, select:focus, textarea:focus {
  border: 1.5px solid #0071e3;
  outline: none;
}
#fl-dashboard-content, #cf_friends_message, #cf_catches_message, #cf_password_message, #cf_spots_message {
  margin-top: 18px;
  font-size: 1rem;
  color: #0071e3;
}
#fl-admin-user-modal {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 24px 0 rgba(0,0,0,0.10);
  padding: 32px 24px;
  max-width: 500px;
  margin: 40px auto;
  color: #222;
}
@media (max-width: 700px) {
  .fl-dashboard, #fl-friends-manager, #fl-catches-manager, #fl-badges-summary, #fl-password-manager, #fl-help-section, #fl-spots-manager {
    padding: 16px 4vw;
    max-width: 98vw;
  }
}

/* Apple UI for Auth Forms - COMPACT VERSION */
.fl-apple-auth-form {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 24px 0 rgba(0,0,0,0.08);
  padding: 24px 24px; /* Reduced padding */
  max-width: 340px; /* Sligthly narrower */
  margin: 40px auto;
  font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;
  color: #1d1d1f;
  text-align: center;
}
.fl-apple-auth-form h2 {
  font-size: 20px; /* Smaller font */
  font-weight: 700;
  margin-bottom: 16px; /* Reduced margin */
  color: #1d1d1f;
}
.fl-apple-auth-form .fl-form-row {
  margin-bottom: 12px; /* Reduced margin */
  text-align: left;
}
.fl-apple-auth-form label {
  font-size: 13px; /* Smaller font */
  font-weight: 500;
  display: block;
  margin-bottom: 4px; /* Reduced margin */
  color: #1d1d1f;
}
.fl-apple-auth-form input[type='text'],
.fl-apple-auth-form input[type='password'],
.fl-apple-auth-form input[type='email'] {
  width: 100%;
  height: 38px; /* Reduced height */
  border: 1px solid #d2d2d7;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 15px;
  background: #fff;
  box-sizing: border-box;
  transition: all 0.2s ease;
}
.fl-apple-auth-form input:focus {
  border-color: #0071e3;
  box-shadow: 0 0 0 4px rgba(0,113,227,0.15);
  outline: none;
}
.fl-apple-auth-form button[type='submit'] {
  width: 100%;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #6B7A2A; /* Brand Purple */
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  line-height: 1;
  font-weight: 600;
  cursor: pointer;
  padding: 12px 20px;
  margin-top: 8px; /* Reduced margin */
  transition: background 0.2s;
}
.fl-apple-auth-form button[type='submit']:hover {
  background: #8A9A3A;
}
.fl-apple-auth-form .fl-login-links {
  margin-top: 16px; /* Reduced margin */
  font-size: 13px;
}
.fl-apple-auth-form .fl-login-links a {
  color: #0071e3;
  text-decoration: none;
}
.fl-apple-auth-form .fl-login-links a:hover {
  text-decoration: underline;
}
.fl-apple-auth-form .fl-error-message {
    background: #fff2f2;
    border: 1px solid #ffcfcf;
    color: #d32f2f;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: left;
}
.fl-apple-auth-form .fl-success-message {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #a7f3d0;
    color: #065f46;
    padding: 28px 20px;
    border-radius: 16px;
    font-size: 15px;
    margin-bottom: 20px;
    margin-top: 10px;
    text-align: center;
    animation: fl-fadeInUp 0.5s ease-out;
}
.fl-success-icon {
    font-size: 48px;
    margin-bottom: 12px;
    line-height: 1;
}
.fl-success-title {
    font-size: 20px;
    font-weight: 700;
    color: #065f46;
    margin-bottom: 12px;
}
.fl-success-body {
    font-size: 14px;
    line-height: 1.6;
    color: #065f46;
    margin-bottom: 16px;
}
.fl-success-spam {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 20px;
}
.fl-success-btn {
    display: inline-block;
    background: #6B7A2A;
    color: #fff !important;
    text-decoration: none !important;
    padding: 10px 28px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}
.fl-success-btn:hover {
    background: #8A9A3A;
}
@keyframes fl-fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Force hide remember me if cached in HTML */
.fl-remember-me {
    display: none !important;
}

/* Modal Overlay for Password Reset */
.fl-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 999999; 
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

/* Ensure the form inside the modal looks good */
.fl-modal-overlay .fl-apple-auth-form {
    max-width: 400px;
    width: 100%;
    background: #fff;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    margin: 0; 
    animation: flFadeInScale 0.3s ease-out forwards;
}

@keyframes flFadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Double Colonne Auth Page - FORCE FULL WIDTH BREAKOUT */
.fl-auth-dual-container {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 40px;
    flex-wrap: wrap;
    
    /* Technique de "Breakout" pour sortir du conteneur WordPress contraint */
    width: 100vw; 
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
    
    max-width: 100vw !important; /* Force override theme constraints */
}

/* Conteneur interne pour recentrer le contenu proprement */
.fl-auth-dual-inner {
    display: flex;
    width: 100%;
    max-width: 1200px; /* Largeur max réelle du contenu utile */
    margin: 0 auto;
    gap: 40px;
    flex-wrap: wrap;
    justify-content: center;
}

.fl-auth-col {
    flex: 1;
    min-width: 350px; 
    max-width: 600px;
}
/* Force les formulaires internes à prendre toute la place disponible dans la colonne */
.fl-auth-dual-container .fl-apple-auth-form,
.fl-auth-dual-container .fl-auth-wrapper,
.fl-auth-dual-container form {
    max-width: none !important; 
    width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    height: auto !important;
    flex: 1; /* Ensure flexibility */
}

/* =========================================
   DASHBOARD STYLES (Apple UI) - Purple #6B7A2A
   ========================================= */

.fl-dashboard { 
    display: flex; 
    gap: 30px; 
    background: #f5f5f7; /* Apple Light Gray Background */
    padding: 30px; 
    border-radius: 24px; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    width: 100%; /* Utiliser toute la largeur disponible */
    box-sizing: border-box;
}

/* Sidebar */
.fl-dashboard-sidebar { 
    width: 280px; 
    background: #fff; 
    padding: 24px; 
    border-radius: 18px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.03); 
    height: fit-content;
}

/* Profile Summary in Sidebar */
.fl-user-profile-summary { 
    text-align: center; 
    margin-bottom: 24px; 
    border-bottom: 1px solid #ebebeb; 
    padding-bottom: 24px; 
}
.fl-user-profile-summary img { 
    border-radius: 50%; 
    display: block; 
    margin: 0 auto 12px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); 
    width: 80px; 
    height: 80px;
    object-fit: cover;
}
.fl-user-profile-summary h3 { 
    margin: 0; 
    font-size: 1.25em; 
    color: #1d1d1f; 
    font-weight: 600; 
}

/* Menu Navigation */
.fl-dashboard-menu { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
}
.fl-dashboard-menu li { 
    margin-bottom: 4px; 
}
.fl-dashboard-menu a { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    padding: 12px 16px; 
    color: #424245; /* Dark Grey text */
    text-decoration: none; 
    border-radius: 12px; 
    transition: all 0.2s ease; 
    font-weight: 500;
    font-size: 0.95em;
}

/* Hover & Active States - PURPLE #6B7A2A */
.fl-dashboard-menu a:hover { 
    background: #f5f5f7; 
    color: #6B7A2A; 
}
.fl-dashboard-menu a.active { 
    background: #6B7A2A; 
    color: #fff; 
    box-shadow: 0 2px 8px rgba(138, 43, 226, 0.3);
}

/* Icon alignment */
.fl-dashboard-menu a .dashicons { 
    font-size: 20px; 
    width: 20px; 
    height: 20px; 
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Logout Button Special Styling */
.fl-dashboard-menu a.fl-logout {
    margin-top: 20px;
    border-top: 1px solid #ebebeb;
    border-radius: 0 0 12px 12px;
    padding-top: 16px;
    color: #d32f2f; /* Keep red for danger action */
}
.fl-dashboard-menu a.fl-logout:hover {
    background: #ffebeb;
    color: #b71c1c;
}

/* Content Area */
.fl-dashboard-content { 
    flex: 1; 
    background: #fff; 
    padding: 40px; 
    border-radius: 18px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.03); 
    min-height: 600px; 
}

/* Responsive */
@media (max-width: 900px) { 
    .fl-dashboard { 
        flex-direction: column; 
        padding: 20px;
    } 
    .fl-dashboard-sidebar { 
        width: 100%; 
        display: flex;
        flex-direction: column;
        align-items: center;
        box-sizing: border-box;
    } 
    .fl-dashboard-menu {
        width: 100%;
    }
    .fl-dashboard-content {
        padding: 20px;
    }
}

/* MODAL STYLES (New) */
.fl-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex; /* Changed from none to flex for centering, control visibility via style or class */
  justify-content: center;
  align-items: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.fl-modal.fl-show {
    visibility: visible;
    opacity: 1;
}

.fl-modal .fl-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1; /* Explicit low z-index */
}

.fl-modal .fl-modal-content {
  position: relative;
  background: rgba(255,255,255,0.82);
  border-radius: 18px;
  max-width: 750px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 9999; /* Explicit high z-index distinct from container */
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}
.fl-modal.fl-show .fl-modal-content {
    transform: translateY(0);
}

.fl-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: #f2f2f7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #8e8e93;
  cursor: pointer;
  z-index: 10002;
  line-height: 1;
  border: none;
  transition: background 0.2s;
}
.fl-modal-close:hover {
  background: #e5e5ea;
}

/* Mobile specific adjustments */
@media (max-width: 600px) {
  .fl-modal-content {
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    padding-top: 40px; /* Space for close button */
  }
  .fl-modal-close {
    top: 15px;
    right: 20px;
    font-size: 32px;
    background: rgba(255,255,255,0.8);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
  }
}

/* Widget Amis en Ligne (Shortcode [fishing_logger_friends_online]) */
#fl-friends-online-widget {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 24px 0 rgba(0,0,0,0.08);
  padding: 20px;
  font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;
  box-sizing: border-box;
}

#fl-friends-online-widget h4 {
  margin: 0 0 16px 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #111;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 10px;
}

#fl-friends-online-list {
  list-style: none;
  padding: 0;
  margin: 0;
  /* Scroll Limit Optimization */
  max-height: 250px; /* Limite à environ 5-6 amis */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.fl-friend-online-item {
  display: flex;
  align-items: center;
  padding: 10px 8px;
  border-radius: 10px;
  transition: background 0.2s;
}

.fl-friend-online-item:hover {
    background-color: #f5f5f7;
}

.fl-friend-online-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 12px;
  object-fit: cover;
  border: 1px solid #eee;
}

.fl-friend-online-link {
  font-weight: 600;
  color: #333;
  text-decoration: none;
  flex-grow: 1;
  font-size: 0.95rem;
}

.fl-friend-online-link:hover {
  text-decoration: none;
  color: #0071e3;
}

.fl-online-indicator {
  width: 10px;
  height: 10px;
  min-width: 10px;
  background-color: #34c759; /* Apple Green */
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(52, 199, 89, 0.4);
  margin-left: 8px;
}

.fl-no-friends {
  color: #8e8e93;
  font-style: italic;
  text-align: center;
  padding: 10px 0;
}

 
 / *   C h a t   N o t i f i c a t i o n   B a d g e   * / 
 
 . f l - c h a t - b a d g e   { 
 
         d i s p l a y :   i n l i n e - f l e x ; 
 
         a l i g n - i t e m s :   c e n t e r ; 
 
         j u s t i f y - c o n t e n t :   c e n t e r ; 
 
         b a c k g r o u n d - c o l o r :   # f f 3 b 3 0 ;   / *   A p p l e   R e d   * / 
 
         c o l o r :   w h i t e ; 
 
         f o n t - s i z e :   1 2 p x ; 
 
         f o n t - w e i g h t :   b o l d ; 
 
         h e i g h t :   2 0 p x ; 
 
         m i n - w i d t h :   2 0 p x ; 
 
         b o r d e r - r a d i u s :   1 0 p x ; 
 
         p a d d i n g :   0   6 p x ; 
 
         m a r g i n - l e f t :   1 0 p x ; 
 
         b o x - s h a d o w :   0   2 p x   5 p x   r g b a ( 2 5 5 ,   5 9 ,   4 8 ,   0 . 4 ) ; 
 
         a n i m a t i o n :   f l - b a d g e - p o p   0 . 3 s   c u b i c - b e z i e r ( 0 . 1 7 5 ,   0 . 8 8 5 ,   0 . 3 2 ,   1 . 2 7 5 ) ; 
 
 } 
 
 
 
 @ k e y f r a m e s   f l - b a d g e - p o p   { 
 
         0 %   {   t r a n s f o r m :   s c a l e ( 0 ) ;   } 
 
         1 0 0 %   {   t r a n s f o r m :   s c a l e ( 1 ) ;   } 
 
 } 
 
 
/* CHAT LAUNCHER & BADGE */
.fl-chat-launcher {
    position: fixed;
    top: 100px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #0071e3, #005bb5);
    border-radius: 30px; 
    box-shadow: 0 4px 14px rgba(0,113,227,0.4);
    z-index: 9999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
.fl-chat-launcher:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,113,227,0.5);
}
.fl-chat-launcher .dashicons {
    color: white;
    font-size: 32px;
    width: 32px;
    height: 32px;
    line-height: 32px;
}
.fl-chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #FF3B30;
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    border: 2px solid white;
}



/* CHAT FRIEND BADGE & TIME */
.fl-friend-badge {
    background-color: #ff3b30;
    color: white;
    border-radius: 12px;
    padding: 1px 6px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: auto;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
#fl-chat-friends li {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.fl-chat-time {
    display: block;
    font-size: 0.65rem;
    margin-top: 4px;
    text-align: right;
    width: 100%;
    opacity: 0.7;
}
#fl-chat-messages .fl-chat-msg.friend .fl-chat-time {
    color: #666;
}
#fl-chat-messages .fl-chat-msg:not(.friend) .fl-chat-time {
    color: #e0e0e0;
}



/* === APPLE CHAT WIDGET REFACTOR === */
.fl-apple-chat-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    background: #fff;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.08);
}
.fl-apple-chat-header {
    background: rgba(245, 245, 247, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.08);
    padding: 12px 16px;
    box-shadow: none; /* Reset old shadow */
}
/* Friends List Items */
.fl-friend-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.fl-friend-list li {
    padding: 8px 16px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid #f0f0f0;
}
.fl-friend-list li:hover {
    background: #f2f2f7;
}
.fl-friend-list li:last-child {
    border-bottom: none;
}
.fl-friend-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
}
.fl-friend-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 10px;
    background: #d1d1d6;
    color: #fff;
    text-align: center;
    line-height: 32px;
    font-weight: 600;
}
.fl-friend-name {
    font-weight: 500;
    color: #1c1c1e;
    font-size: 15px;
    flex-grow: 1;
}

/* Chat Messages Area */
#fl-chat-conv {
    display: flex;
    flex-direction: column;
    height: 520px; /* Increased Height */
    position: relative;
    background: #fff;
}
#fl-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    background: #fff;
    /* Removed max-height on messages to fill container */
}
/* Form Area */
#fl-chat-form {
    padding: 10px 12px;
    background: #f9f9f9;
    border-top: 1px solid #e5e5ea;
    display: flex;
    align-items: center;
}
#fl-chat-input {
    flex: 1;
    border: 1px solid #d1d1d6;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 0.9rem; /* Reduced font */
    outline: none;
    transition: border 0.2s;
}
#fl-chat-input:focus {
    border-color: #0071e3;
    background: #fff;
}
#fl-chat-form button {
    background: #0071e3;
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    margin-left: 8px;
    padding: 0; /* Remove padding for centering */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0; /* Hide text, maybe use icon later */
    box-shadow: 0 2px 5px rgba(0,113,227,0.3);
    transition: transform 0.1s;
}
#fl-chat-form button::after {
    content: none;
}
/* Friend Bubble Override (Grey) */
#fl-chat-messages .fl-chat-msg.friend .fl-chat-bubble {
    background: #e5e5ea;
    color: #000;
    border-radius: 18px 18px 18px 4px;
}
#fl-chat-form button:hover {
    transform: scale(1.05);
    background: #0077ED;
}
#fl-chat-form button:active {
    transform: scale(0.95);
}

/* Bubbles Override */
.fl-chat-bubble {
    padding: 6px 10px; /* Reduced padding */
    max-width: 85%; /* Allow wider bubbles */
    font-size: 0.85rem; /* Reduced font */
    line-height: 1.35;
}
/* User Bubble (Blue) */
#fl-chat-messages .fl-chat-msg:not(.friend) .fl-chat-bubble {
    background: linear-gradient(135deg, #0071e3, #005bb5);
    color: white;
    border-radius: 18px 18px 4px 18px;
}



/* === PURPLE THEME OVERRIDES === */
/* Launcher */
.fl-chat-launcher {
    background: linear-gradient(135deg, #4A5C14, #6B7A2A);
    box-shadow: 0 4px 14px rgba(106, 13, 173, 0.4);
}
.fl-chat-launcher:hover {
    box-shadow: 0 6px 20px rgba(106, 13, 173, 0.5);
}

/* User Bubble (Purple) */
#fl-chat-messages .fl-chat-msg:not(.friend) .fl-chat-bubble {
    background: linear-gradient(135deg, #4A5C14, #6B7A2A);
}

/* Send Button */
#fl-chat-form button {
    background: #4A5C14;
    box-shadow: 0 2px 5px rgba(106, 13, 173, 0.3);
}
#fl-chat-form button:hover {
    background: #5e0b9e;
}

/* Friend Name Hover */
#fl-chat-conv b {
    color: #4A5C14 !important;
}

/* Links / Accents */
.fl-friend-list li:hover {
    color: #4A5C14;
}

/* === DESKTOP PROTECTION === */
/* Hide Mobile Widget on Desktop Screens (>600px) */
/* Note: apple-ui.css handles other things too, so we only hide the chat widget elements */
@media screen and (min-width: 601px) {
    .fl-apple-chat-widget,
    .fl-chat-launcher {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
}

/* === MOBILE OPTIMIZATION (FULLSCREEN) === */
@media screen and (max-width: 600px) {
    .fl-apple-chat-widget.fl-is-active {
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important; /* Force full height */
        height: 100vh !important;
        margin: 0 !important;
        border-radius: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        position: fixed !important;
        z-index: 999999 !important;
    }

    /* Adjust Header for Mobile */
    .fl-apple-chat-header {
        padding: 15px; /* Larger touch target */
        border-radius: 0;
        flex-shrink: 0;
    }

    /* Body takes full remaining height */
    .fl-apple-chat-body {
        flex: 1;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        height: auto !important; /* Let flex handle it */
        overflow: hidden;
    }

    /* Friends List - Scrollable but limited space if expanded */
    #fl-chat-friends {
        max-height: 40vh; /* Don't let it take more than 40% on mobile */
        overflow-y: auto;
    }

    /* Conversation Container - CRITICAL for sticky input */
    #fl-chat-conv {
        flex: 1; /* Grow to fill space */
        display: flex !important; /* Force Flex to override JS inline 'display: block' */
        flex-direction: column !important;
        overflow: hidden; /* Contain inner scrolls */
        height: auto;
        min-height: 0; /* Enable flex shrinking */
        padding-bottom: 0;
    }

    /* Messages Area - Scrollable */
    #fl-chat-messages {
        flex: 1 1 auto; /* Use auto basis for flexibility */
        min-height: 0;
        overflow-y: scroll; /* Force scrollbar behavior */
        -webkit-overflow-scrolling: touch;
        margin-bottom: 0;
    }

    /* Input Form - FIXED at bottom visually via Flex */
    #fl-chat-form {
        flex-shrink: 0; 
        margin-top: auto; /* MAGIC FIX: Pushes form to bottom if messages don't grow */
        position: sticky;
        bottom: 0;
        z-index: 20;
        background: #fff;
        padding: 10px;
        border-top: 1px solid #eee;
        padding-bottom: env(safe-area-inset-bottom);
    }
}





/* --- FEED POSTS STYLING --- */

/* Empty State */
.fl-feed-empty {
    text-align: center;
    padding: 40px 20px;
    color: #888;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Card Container */
.fl-feed-card {
    background: rgba(20,25,8,0.95);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.4), 0 4px 16px rgba(0,0,0,0.3);
    margin-bottom: 24px;
    list-style: none; /* remove bullet */
    overflow: hidden; /* Round corners crop */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    border: 1px solid rgba(201,162,39,0.18);
}

/* 1. Header */
.fl-feed-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    position: relative;
}
.fl-feed-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
    border: 1px solid rgba(0,0,0,0.05);
}
.fl-feed-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.fl-feed-author {
    font-weight: 600;
    font-size: 15px;
    color: #D0D8B0;
}
.fl-feed-date {
    font-size: 12px;
    color: rgba(208,216,176,0.5);
    margin-top: 1px;
}
/* Menu Trigger */
.fl-feed-menu-trigger {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(208,216,176,0.6);
    transition: background 0.2s;
}
.fl-feed-menu-trigger:hover {
    background: rgba(255,255,255,0.08);
}
.fl-feed-menu-dropdown {
    position: absolute;
    top: 50px;
    right: 10px;
    background: #1e2410;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    border-radius: 8px;
    padding: 8px;
    z-index: 10;
    display: none;
    border: 1px solid rgba(201,162,39,0.25);
}
.fl-feed-menu-dropdown.show {
    display: block;
}
.fl-feed-delete-post {
    padding: 8px 12px;
    border-radius: 6px;
    color: #e41e3f;
    font-weight: 500;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}
.fl-feed-delete-post:hover {
    background: rgba(255,59,48,0.15);
}

/* 2. Content */
.fl-feed-content {
    padding: 0 16px 12px 16px;
    font-size: 15px;
    line-height: 1.5;
    color: #D0D8B0;
    word-break: break-word;
}

/* 3. Media */
.fl-feed-media-wrapper {
    width: 100%;
    margin: 0;
    padding: 0;
    background: transparent; /* Fond blanc/transparent (plus de barres noires) */
    display: flex;
    justify-content: center; /* Centre l'image si elle est petite */
    align-items: center;
    min-height: auto; /* Supprime la hauteur min forcée */
}
.fl-feed-image {
    width: auto; /* Garde la taille naturelle */
    max-width: 100%; /* Ne dépasse jamais la largeur de la carte */
    height: auto;
    display: block;
    max-height: 700px;
    cursor: pointer;
    transition: filter 0.3s ease, transform 0.3s ease; /* Animation fluide */
}
.fl-feed-image:hover {
    filter: brightness(1.15); /* Eclaircit l'image */
}
.fl-feed-video {
    width: 100%;
    height: auto;
    max-height: 600px;
    background: #000;
}

/* 4. Actions Bar */
.fl-feed-actions-bar {
    padding: 4px 12px;
    border-top: 1px solid rgba(201,162,39,0.12);
    border-bottom: 1px solid rgba(201,162,39,0.12);
    display: flex;
    align-items: center;
    justify-content: space-around;
}
.fl-action-btn {
    flex: 1;
    text-align: center;
    padding: 8px;
    border-radius: 6px;
    color: rgba(208,216,176,0.6);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.2s;
}
.fl-action-btn:hover {
    background: rgba(255,255,255,0.07);
}
.fl-action-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* 5. Comments Section */
.fl-feed-comments-section {
    padding: 8px 16px 12px 16px;
    background: rgba(15,19,5,0.9);
}
.fl-feed-comments-list {
    margin: 0 0 10px 0;
    padding: 0;
    list-style: none;
}
.fl-feed-comments-list li {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.4;
    background: rgba(255,255,255,0.07);
    color: #D0D8B0;
    padding: 8px 12px;
    border-radius: 12px;
    display: inline-block;
    max-width: 90%;
}
.fl-feed-comments-list li b {
    color: #C9A227;
    font-weight: 600;
    margin-right: 4px;
}

/* Comment Form */
.fl-feed-comment-form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}
.fl-mini-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}
.fl-comment-input-wrapper {
    flex: 1;
    position: relative;
    background: rgba(255,255,255,0.07);
    border-radius: 20px;
    display: flex;
    align-items: center;
    padding: 0 4px 0 12px;
    border: 1px solid rgba(255,255,255,0.1);
}
.fl-comment-input-wrapper input {
    background: transparent;
    border: none;
    outline: none;
    flex: 1;
    padding: 8px 0;
    font-size: 14px;
    color: #D0D8B0;
    min-height: 36px;
}
.fl-comment-input-wrapper input::placeholder {
    color: rgba(208,216,176,0.4);
}
.fl-comment-input-wrapper button {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(208,216,176,0.5); /* Default grey */
}
.fl-comment-input-wrapper input:not(:placeholder-shown) + button {
    color: #0084ff; /* Blue when typing */
}
.fl-feed-comment-msg {
    font-size: 12px;
    color: rgba(208,216,176,0.5);
    margin-top: 4px;
}


/* RESET: Allow fl-feed-card to span full width of parent */
.fl-feed-list {
  padding: 0 !important;
  margin: 0 !important;
}


/* Feed Content Links */
.fl-feed-content a {
    color: #007aff;
    text-decoration: none;
    font-weight: 500;
}
.fl-feed-content a:hover {
    text-decoration: underline;
}

/* --- POSTX STYLE ARTICLE CARD --- */
.fl-article-card {
    background: rgba(20,25,8,0.9);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    margin: 0;
    padding: 0;
    border: 1px solid rgba(201,162,39,0.18);
    transition: transform 0.2s, box-shadow 0.2s;
}
.fl-article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}
.fl-article-split {
    display: flex;
    flex-direction: column;
}
.fl-article-media {
    width: 100%;
    height: 200px;
    overflow: hidden;
}
.fl-article-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.4s ease;
}
.fl-article-img:hover {
    transform: scale(1.03);
}
.fl-article-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 18px 14px;
}
.fl-article-cat {
    display: inline-block;
    background: rgba(138, 43, 226, 0.08);
    color: #6B7A2A;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    align-self: flex-start;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.fl-article-title {
    color: #1d1d1f;
    font-size: 20px;
    margin: 0;
    font-weight: 700;
    line-height: 1.3;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.fl-article-meta {
    font-size: 12px;
    color: #86868b;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}
.fl-article-meta .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-top: -2px;
}
.fl-article-excerpt {
    font-size: 14px;
    color: #6e6e73;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.fl-article-readmore {
    display: inline-flex;
    align-items: center;
    color: #6B7A2A;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    margin-top: 8px;
    transition: color 0.2s;
}
.fl-article-readmore:hover {
    color: #4A5C14;
}

/* --- ARTICLE POPUP MODAL --- */
.fl-article-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}
.fl-article-modal.fl-show {
    opacity: 1;
    visibility: visible;
}
.fl-article-modal-content {
    width: 50%;
    max-width: 1000px;
    height: 90vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    overflow: hidden;
}
.fl-article-modal.fl-show .fl-article-modal-content {
    transform: scale(1);
}
.fl-article-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: rgba(255,255,255,0.8);
    border: none;
    font-size: 28px;
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fl-article-modal-close:hover {
    background: #fff;
}
#fl-article-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Responsive adjustment for Article Card */
@media (min-width: 600px) {
    .fl-article-split {
        flex-direction: row;
    }
    .fl-article-media {
        width: 280px;
        min-width: 280px;
        height: auto;
        min-height: 180px;
        display: flex;
        flex-direction: column;
        align-self: stretch;
    }
    .fl-article-media .fl-article-img {
        flex: 1;
        min-height: 0;
    }
    .fl-article-info {
        padding: 18px 22px;
        justify-content: center;
    }
}
@media (max-width: 599px) {
    .fl-article-media {
        height: 160px;
    }
    .fl-article-modal-content {
        width: 95%;
        height: 90vh;
    }
}


/* --- FEED FILTERS (Apple Pills) --- */
.fl-feed-filters-scroll {
    overflow-x: auto;
    padding: 10px 0;
    margin-bottom: 10px;
    margin-top: 10px;
    /* Hide scrollbar */
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.fl-feed-filters-scroll::-webkit-scrollbar {
    display: none;
}
.fl-feed-filters {
    display: flex;
    gap: 10px;
    padding: 0 4px;
}
.fl-feed-filter-btn {
    background: #e4e6eb;
    color: #050505;
    border: none;
    padding: 8px 16px;
    border-radius: 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}
.fl-feed-filter-btn:hover {
    background: #d8dadf;
}
.fl-feed-filter-btn.active {
    background: #6B7A2A; /* Purple Brand */
    color: #fff;
}
/* PostX Modal Z-Index tweak */
.fl-article-modal { z-index: 100000; }


/* Apple UI for Auth Forms (Login, Register, Lost Pwd) */
.fl-apple-auth-form {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 16px 0 rgba(0,0,0,0.08);
  padding: 16px; /* Ultra Compact Padding */
  width: 100%;
  max-width: 100%; 
  margin: 0 auto; /* No Vertical Margin */
  font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;
  color: #1d1d1f;
  text-align: center;
  box-sizing: border-box;
}
.fl-apple-auth-form h2 {
  font-size: 18px; /* Even Smaller Title */
  font-weight: 700;
  margin-bottom: 12px; /* Ultra Compact Margin */
  color: #1d1d1f;
}
.fl-apple-auth-form .fl-form-row {
  margin-bottom: 8px; /* Ultra Compact Margin */
  text-align: left;
}
.fl-apple-auth-form label {
  font-size: 13px;
  font-weight: 500;
  display: block;
  margin-bottom: 2px; /* Minimal space */
  color: #1d1d1f;
}
.fl-apple-auth-form input[type='text'],
.fl-apple-auth-form input[type='password'],
.fl-apple-auth-form input[type='email'] {
  width: 100%;
  height: 36px; /* Ultra Compact Input */
  border: 1px solid #d2d2d7;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 14px; /* Functional size */
  background: #fff;
  box-sizing: border-box;
  transition: all 0.2s ease;
}
.fl-apple-auth-form input:focus {
  border-color: #6B7A2A;
  box-shadow: 0 0 0 3px rgba(107, 122, 42, 0.15);
  outline: none;
}
.fl-apple-auth-form button[type='submit'] {
  width: 100%;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #6B7A2A;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1;
  font-weight: 600;
  cursor: pointer;
  padding: 10px 16px;
  margin-top: 8px;
  transition: background 0.2s;
}
.fl-apple-auth-form button[type='submit']:hover {
  background: #8A9A3A;
}
.fl-apple-auth-form .fl-login-links {
  margin-top: 12px; /* Ultra Compact Margin */
  font-size: 12px;
}
.fl-apple-auth-form .fl-login-links a {
  color: #6B7A2A; /* Purple Brand */
  text-decoration: none;
}
.fl-apple-auth-form .fl-login-links a:hover {
  text-decoration: underline;
}
.fl-apple-auth-form .fl-error-message {
    background: #fff2f2;
    border: 1px solid #ffcfcf;
    color: #d32f2f;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: left;
}
.fl-apple-auth-form .fl-success-message {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #a7f3d0;
    color: #065f46;
    padding: 28px 20px;
    border-radius: 16px;
    font-size: 15px;
    margin-bottom: 20px;
    margin-top: 10px;
    text-align: center;
    animation: fl-fadeInUp 0.5s ease-out;
}


/* Feed Comments Section (Inline Horizontal Layout) */
.fl-feed-comments-section {
    background: rgba(15,19,5,0.9);
    border-top: 1px solid rgba(201,162,39,0.12);
    padding: 8px 16px;
    border-radius: 0 0 12px 12px;
}
.fl-feed-comments-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}
.fl-comment-item {
    display: flex;
    align-items: center; /* Center avatar with first line */
    gap: 10px;
    margin-bottom: 8px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.fl-comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.fl-comment-inline-wrapper {
    flex: 1;
    display: flex;
    flex-wrap: wrap; /* Wraps naturally if text is long */
    align-items: center;
    column-gap: 6px; /* Horizontal space between elements */
    row-gap: 2px;
    font-size: 0.95rem;
    line-height: 1.4;
    color: #D0D8B0;
}
.fl-comment-author {
    font-weight: 700;
    color: #C9A227;
    white-space: nowrap;
}
.fl-comment-sep {
    font-weight: 600;
    margin-right: 2px;
}
.fl-comment-text {
    color: #D0D8B0;
    word-break: break-word;
}
.fl-comment-meta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: 6px; /* Small separation from text */
    color: #86868b;
    font-size: 0.8rem;
    white-space: nowrap;
}
.fl-comment-btn {
    cursor: pointer;
    display: flex;
    align-items: center;
    opacity: 1;
    transition: transform 0.2s;
}
.fl-comment-btn:hover {
    transform: scale(1.15);
}
.fl-comment-btn .dashicons {
    font-size: 16px;
    width: 16px; 
    height: 16px;
    vertical-align: middle;
}
.fl-comment-btn.report { color: #ff9500; }
.fl-comment-btn.delete { color: #000; } /* Black Cross */

/* Form Styling */
.fl-feed-comment-form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.07);
}
.fl-mini-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.fl-comment-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 18px;
    padding: 4px 12px;
}
.fl-comment-input-wrapper input {
    border: none !important;
    background: transparent !important;
    width: 100% !important;
    height: 36px !important;
    min-height: 0 !important;
    padding: 0 4px !important;
    margin: 0 !important;
    font-size: 0.95rem !important;
    outline: none !important;
    color: #D0D8B0 !important;
    align-self: center !important;
    line-height: 36px !important;
    box-shadow: none !important;
}
.fl-feed-comments-section .fl-comment-input-wrapper button[type=submit],
.fl-comment-input-wrapper button {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    cursor: pointer !important;
    color: #6B7A2A !important;
    padding: 4px 6px !important;
    min-height: 0 !important;
    height: 32px !important;
    width: auto !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: transform 0.2s;
    border-radius: 0 !important;
    font-size: 16px !important;
    flex-shrink: 0;
}
.fl-comment-input-wrapper button:hover {
    transform: scale(1.1);
}
.fl-comment-input-wrapper button:disabled {
    opacity: 0.5;
    cursor: default;
    transform: none;
}
.fl-feed-comment-msg {
    font-size: 0.8rem;
    color: rgba(208,216,176,0.5);
    margin-left: 48px;
    margin-top: 4px;
}


/* Mobile Input Zoom Fix & Compact View */
@media screen and (max-width: 768px) {
    #fl-catch-upload-modal.fl-modal-overlay {
        align-items: flex-start !important;
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }
}

/* FIX: Ensure catch upload modal captures interactions on mobile */
#fl-catch-upload-modal,
#fl-catch-upload-modal .fl-modal-dialog,
#fl-catch-upload-modal .fl-apple-catch-form {
    pointer-events: auto !important;
}

/* Ensure backdrop covers everything */
#fl-catch-upload-modal.fl-modal-overlay {
    z-index: 9999999 !important;
}

    .fl-apple-catch-form input, 
    .fl-apple-catch-form select, 
    .fl-apple-catch-form textarea,
    .fl-comment-input-wrapper input {
        font-size: 16px !important;
    }

    /* Side-by-side fields container */
    .fl-half-row-container {
        display: flex;
        gap: 8px;
        margin-bottom: 10px;
    }
    
    .fl-half-row-container .fl-form-row {
        margin-bottom: 0;
        flex: 1;
        min-width: 0; /* Prevent overflow */
    }
    
    /* Force specific inputs to be smaller in height on mobile */
    .fl-apple-catch-form input[type="number"],
    .fl-apple-catch-form select {
        padding: 6px 8px;
        height: 36px;
    }

    /* Reduce general form padding/margin for compactness */
    .fl-apple-catch-form {
        padding: 16px 12px; 
        margin: 0 !important;
        box-shadow: none;
        border-radius: 12px;
    }

    /* Reduce vertical spacing between rows */
    .fl-form-row {
        margin-bottom: 10px;
    }
    
    /* Slightly smaller headers */
    .fl-apple-catch-form h2 {
        font-size: 1.3rem;
        margin-bottom: 12px;
        margin-top: 4px;
        text-align: center;
    }
    
    /* Adjust label spacing */
    .fl-apple-catch-form label {
        margin-bottom: 2px;
        font-size: 0.9rem;
    }
    
    /* Adjust file input padding */
    .fl-apple-catch-form input[type="file"] {
        padding: 8px;
        font-size: 0.85rem;
    }
    
    .fl-btn-main {
        padding: 12px 20px;
        margin-top: 16px;
        font-size: 1rem;
    }
}



/* Mobile Modal Compact Optimization v2.4 (Maximized Space) */

/* 1. Body Lock */
body.fl-modal-open-locked {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100vh !important;
    top: 0 !important;
}

/* 2. Overlay: FULL SCREEN */
#fl-catch-upload-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0,0,0,0.6) !important;
    z-index: 2147483647 !important;
    display: none;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    pointer-events: auto !important;
}

/* 3. Modal Dialog: MAXIMIZED HEIGHT (Up to 96%) */
#fl-catch-upload-modal .fl-modal-dialog,
#fl-catch-upload-modal-global .fl-modal-dialog {
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    width: 95% !important;
    max-width: 750px !important;
    max-height: 94vh !important; /* slightly looser */
    height: auto !important; /* Allow shrinking */
    min-height: 0 !important; /* Prevent unintended minimums */
    margin: auto !important;
    background: transparent !important;
    border-radius: 18px !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2) !important;
    overflow: hidden !important;
    padding: 0 !important; /* Remove inline padding from PHP */
    pointer-events: auto !important;
    z-index: 2147483648 !important;
}

/* 4. The Form: COMPACT & SCROLLABLE */
#fl-catch-upload-modal .fl-apple-catch-form,
#fl-catch-upload-modal-global .fl-apple-catch-form {
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    flex: 1 1 auto !important;
    width: 100% !important;
    padding: 16px 12px !important; /* Comfortable padding */
    padding-bottom: 24px !important;
    box-sizing: border-box !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2) !important;
    background: rgba(255,255,255,0.82) !important;
    border-radius: 18px !important;
    pointer-events: auto !important;
}

/* Close Button: Large Touch Target */
/* Mobile Modal Compact Optimization v2.6 (Close Button Fix) */
/* Close Button: Absolute Click Priority */
#fl-catch-upload-close {
    position: absolute !important;
    top: 12px;
    right: 16px;
    z-index: 2147483650 !important; /* Above everything */
    width: 40px; height: 40px;
    background: #f2f2f7 !important;
    border: none !important;
    outline: none !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    
    /* Flex Center */
    display: flex !important; 
    align-items: center !important; 
    justify-content: center !important;
    
    /* Typography */
    font-size: 22px !important;
    color: #8e8e93 !important;
    
    /* Interaction */
    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent !important;
    pointer-events: auto !important;
}

#fl-catch-upload-close span {
    pointer-events: none !important; /* Ensure click hits the button, not icon */
    display: block !important;
    line-height: 1 !important;
}

/* =========================================
   COMPACT FIELDS OVERRIDES (Mobile Only)
   ========================================= */
@media screen and (max-width: 768px) {
    /* Title: Integrated */
    #fl-catch-upload-modal .fl-apple-catch-form h2 {
        font-size: 1.25rem !important;
        margin: 0 0 10px 0 !important;
        text-align: center;
        padding-right: 40px; /* Space for close button */
    }

    /* Rows: Optimized Spacing */
    #fl-catch-upload-modal .fl-form-row {
        margin-bottom: 8px !important;
    }
    
    /* Labels: Clear */
    #fl-catch-upload-modal .fl-apple-catch-form label {
        font-size: 0.85rem !important;
        margin-bottom: 2px !important;
        color: #333 !important;
        font-weight: 500;
        display: block;
    }
    
    /* Inputs: Comfortable Touch Height */
    #fl-catch-upload-modal input[type="text"],
    #fl-catch-upload-modal input[type="number"],
    #fl-catch-upload-modal select,
    #fl-catch-upload-modal input[type="file"] {
        height: 40px !important; /* Taller */
        padding: 4px 8px !important;
        font-size: 16px !important; /* PREVENTS ZOOM on iOS */
        margin-bottom: 0 !important;
    }
    
    /* Textarea: Dynamic fill if possible, else fixed */
    #fl-catch-upload-modal textarea {
        min-height: 50px !important;
        padding: 8px !important;
        font-size: 16px !important; /* Prevent zoom */
    }

    /* Photos Grid */
    .fl-photos-grid {
        display: flex;
        gap: 10px;
    }
    .fl-photos-grid .fl-form-row {
        flex: 1;
        margin-bottom: 6px !important;
    }

    /* Helper: Compact */
    #fl-catch-upload-modal .fl-help {
        font-size: 0.75rem !important;
    }

    /* Button: Prominent */
    #fl-catch-upload-modal .fl-btn-main {
        margin-top: 12px !important;
        padding: 12px !important;
        font-size: 1rem !important;
        font-weight: 600;
        width: 100% !important;
        border-radius: 10px !important;
        background: #007aff !important; /* Apple Blue */
        color: white !important;
    }
    
    /* Hide required asterisks on mobile if desired, or keep them */
    .fl-required { color: #ff3b30; }
}


/* =========================================
   CATCH UPLOAD MODAL - DESKTOP + MOBILE
   ========================================= */

/* BODY LOCK: Prevent background scroll & touch when modal is open */
body.fl-modal-open-locked {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    touch-action: none !important;
    -webkit-overflow-scrolling: none !important;
}

/* Close Button - works everywhere */
#fl-catch-upload-close {
    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* ---- DESKTOP: Overlay + Centered Dialog ---- */
#fl-catch-upload-modal.fl-modal-overlay {
    position: fixed !important;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100% !important;
    height: 100% !important;
    z-index: 2147483647 !important;
    background: rgba(0,0,0,0.15) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    display: none; /* JS manages this */
}

/* Submit button brand purple (all screens) */
#fl-catch-upload-modal .fl-btn-main {
    display: block !important;
    width: 100% !important;
    margin-top: 16px !important;
    padding: 14px !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: #fff !important;
    background: #6B7A2A !important;
    background: linear-gradient(135deg, #6B7A2A 0%, #3D5016 100%) !important;
    border: none !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(107, 122, 42, 0.35) !important;
    letter-spacing: -0.01em;
    transition: all 0.2s ease !important;
}
#fl-catch-upload-modal .fl-btn-main:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(107, 122, 42, 0.3) !important;
}

/* Required asterisk (all screens) */
#fl-catch-upload-modal .fl-required {
    color: #ff3b30 !important;
}

/* =========================================
   MOBILE ONLY: Full-screen compact layout
   ========================================= */
@media screen and (max-width: 768px) {

    #fl-catch-upload-modal .fl-modal-dialog.fl-catch-modal-dialog,
    #fl-catch-upload-modal-global .fl-modal-dialog.fl-catch-modal-dialog {
        position: absolute !important;
        top: 0; left: 0; right: 0; bottom: 0;
        width: 100% !important;
        height: 100% !important;
        max-width: none !important;
        max-height: none !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        border-radius: 0 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        box-shadow: none !important;
        box-sizing: border-box !important;
        border: none !important;
    }

    #fl-catch-upload-modal .fl-apple-catch-form,
    #fl-catch-upload-modal-global .fl-apple-catch-form {
        padding: 16px 16px 0 16px !important;
        margin: 0 !important;
        max-width: none !important;
        box-shadow: none !important;
        background: rgba(255, 255, 255, 0.82) !important;
        border: none !important;
        border-radius: 0 !important;
        height: 100% !important;
        max-height: 100% !important;
        overflow-y: auto !important;
    }

    #fl-catch-upload-modal .fl-apple-catch-form h2 {
        font-size: 1.3rem !important;
        margin: 0 !important;
        color: #1d1d1f;
    }

    /* Photos stacked vertically */
    #fl-catch-upload-modal .fl-photos-stack .fl-form-row {
        margin-bottom: 8px !important;
    }

    /* Side-by-side rows */
    #fl-catch-upload-modal .fl-half-row-container {
        display: flex !important;
        flex-direction: row !important;
        gap: 10px !important;
        margin-bottom: 10px !important;
    }
    #fl-catch-upload-modal .fl-half-row-container .fl-form-row {
        flex: 1 !important;
        margin-bottom: 0 !important;
        min-width: 0 !important;
    }

    /* Compact rows */
    #fl-catch-upload-modal .fl-form-row {
        margin-bottom: 10px !important;
    }

    /* Labels */
    #fl-catch-upload-modal .fl-apple-catch-form label {
        font-size: 13px !important;
        font-weight: 600 !important;
    }

    /* Mobile helper image - Reduced height */
    #fl-catch-upload-modal .fl-help img {
        height: 80px !important;
        max-height: 80px !important;
        min-height: 80px !important;
        margin-bottom: 3px !important;
        color: #1d1d1f !important;
        display: block;
    }

    /* Mobile helper layout - image and text side-by-side */
    #fl-catch-upload-modal .fl-helper-content {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 8px !important;
    }

    #fl-catch-upload-modal .fl-helper-content img {
        flex-shrink: 0;
        min-width: 80px;
    }

    #fl-catch-upload-modal .fl-helper-content span {
        text-align: left !important;
        flex: 1;
    }

    /* Ranking proof box spacing: OFF = fully balanced, ON = compact with content spacing */
    #fl-catch-upload-modal .fl-ranking-proof-box {
        padding: 12px !important;
    }

    #fl-catch-upload-modal .fl-ranking-proof-box .fl-ranking-toggle-row {
        margin: 0 !important;
    }

    #fl-catch-upload-modal .fl-ranking-proof-box.fl-ranking-active {
        padding: 12px 12px 6px 12px !important;
    }

    #fl-catch-upload-modal .fl-ranking-proof-box.fl-ranking-active .fl-ranking-toggle-row {
        margin: 0 0 10px 0 !important;
    }

    /* Override global margin-bottom: 10px !important on fl-form-row inside the ranking box */
    #fl-catch-upload-modal .fl-ranking-proof-box .fl-form-row {
        margin-bottom: 0 !important;
    }

    /* File input label/button inline layout - stack on mobile if needed */
    #fl-catch-upload-modal .fl-photos-stack .fl-form-row > div:first-child {
        flex-wrap: wrap !important;
    }

    #fl-catch-upload-modal .fl-file-btn {
        font-size: 14px !important;
        padding: 10px 16px !important;
    }

    /* File name visibility - stays on same line as button */
    #fl-catch-upload-modal .fl-file-name {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        padding-top: 0 !important;
        font-weight: 500 !important;
        color: #555 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    /* Inputs & Selects */
    #fl-catch-upload-modal .fl-apple-catch-form input[type="file"],
    #fl-catch-upload-modal .fl-apple-catch-form input[type="number"],
    #fl-catch-upload-modal .fl-apple-catch-form input[type="text"],
    #fl-catch-upload-modal .fl-apple-catch-form select {
        padding: 8px 10px !important;
        font-size: 16px !important;
        height: 42px !important;
        margin-bottom: 0 !important;
        background: #f2f2f7 !important;
        border: 1px solid #d1d1d6 !important;
        border-radius: 10px !important;
        box-sizing: border-box !important;
        width: 100% !important;
        color: #1d1d1f !important;
    }

    /* Textarea */
    #fl-catch-upload-modal .fl-apple-catch-form textarea {
        padding: 8px 10px !important;
        font-size: 16px !important;
        min-height: 42px !important;
        background: #f2f2f7 !important;
        border: 1px solid #d1d1d6 !important;
        border-radius: 10px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Helper Image */
    #fl-catch-upload-modal .fl-form-row.fl-help img {
        height: 70px !important;
        width: auto !important;
    }
}

/* ================================================================
   ARTICLE À LA UNE — Featured Article Card (above feed)
   ================================================================ */
.fl-featured-article-card {
    display: block;
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    margin-bottom: 20px;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease;
    cursor: pointer;
}

.fl-featured-article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(106, 13, 173, 0.12);
}

.fl-featured-img {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.fl-featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.fl-featured-article-card:hover .fl-featured-img img {
    transform: scale(1.03);
}

.fl-featured-body {
    padding: 20px 24px 22px;
}

.fl-featured-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #6B7A2A;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 8px;
    background: rgba(138, 43, 226, 0.08);
    padding: 4px 10px;
    border-radius: 6px;
}

.fl-featured-title {
    font-size: 20px;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0 0 8px;
    line-height: 1.3;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.fl-featured-excerpt {
    font-size: 14px;
    line-height: 1.55;
    color: #6e6e73;
    margin: 0 0 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fl-featured-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #86868b;
    font-weight: 500;
}

.fl-featured-cta {
    margin-left: auto;
    color: #6B7A2A;
    font-weight: 600;
    font-size: 13px;
    transition: color 0.2s;
}

.fl-featured-article-card:hover .fl-featured-cta {
    color: #4A5C14;
}

/* Responsive */
@media (max-width: 768px) {
    .fl-featured-img {
        height: 160px;
    }

    .fl-featured-body {
        padding: 16px 18px 18px;
    }

    .fl-featured-title {
        font-size: 17px;
    }

    .fl-featured-excerpt {
        font-size: 13px;
    }
}

/* ===== SESSION FORM : DATES GRID ===== */
.fl-sess-dates-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}
.fl-sess-date-card {
    background: rgba(107,122,42,0.07);
    border: 1px solid rgba(107,122,42,0.22);
    border-radius: 12px;
    padding: 12px 10px 10px;
}
.fl-sess-date-card-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #C9A227;
    margin-bottom: 10px;
}
.fl-sess-date-card label {
    font-size: 0.78rem;
    margin-bottom: 4px;
}
.fl-sess-date-card input[type="date"],
.fl-sess-date-card select {
    width: 100%;
    height: 40px;
    padding: 0 8px;
    font-size: 0.85rem;
    border: 1px solid rgba(107,122,42,0.35);
    border-radius: 8px;
    background: rgba(12,15,4,0.85);
    color: #D0D8B0;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}
.fl-sess-date-card input[type="date"]:focus,
.fl-sess-date-card select:focus {
    border-color: #6B7A2A;
    outline: none;
    box-shadow: 0 0 0 2px rgba(107,122,42,0.18);
}

/* Hamburger menu — collé à droite sur mobile (breakpoint Astra = 921px) */
@media (max-width: 921px) {
    #ast-mobile-header .ast-builder-grid-row {
        display: flex !important;
        width: 100% !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    #ast-mobile-header .site-header-primary-section-right {
        margin-left: auto !important;
        flex-shrink: 0;
    }
    #ast-mobile-header .ast-main-header-wrap,
    #ast-mobile-header .ast-primary-header-bar,
    #ast-mobile-header .ast-builder-grid-row {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
}

/* ==================== LEAFLET — Fix soulignement boutons zoom ==================== */
.leaflet-control-zoom a,
.leaflet-control-zoom a:hover {
    text-decoration: none !important;
}



/* ================================================================
   === CYPRINUS DARK THEME � MOBILE CHAT WIDGET ===
   Overrides the default white/blue Apple-style with dark green theme
   ================================================================ */

/* Launcher button */
.fl-chat-launcher {
    background: linear-gradient(135deg, #6B7A2A, #4A5C14) !important;
    box-shadow: 0 4px 14px rgba(107,122,42,0.4) !important;
    top: 40px !important;
}
.fl-chat-launcher:hover {
    box-shadow: 0 6px 20px rgba(107,122,42,0.55) !important;
}

/* Widget container */
.fl-apple-chat-widget {
    background: #1a2010 !important;
    border: none !important;
    box-shadow: 0 5px 30px rgba(0,0,0,0.45) !important;
}

/* Header : garde le d�grad� vert */
.fl-apple-chat-header {
    background: linear-gradient(90deg, #6B7A2A 0%, #4A5C14 100%) !important;
    backdrop-filter: none !important;
    border-bottom: none !important;
    color: #fff !important;
}

/* Corps principal */
.fl-apple-chat-body {
    background: #1a2010 !important;
    box-shadow: none !important;
}

/* Liste d'amis */
.fl-apple-chat-friends {
    background: transparent !important;
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
}
.fl-apple-chat-friends li,
.fl-friend-list li {
    color: #D0D8B0 !important;
    border-bottom: 1px solid rgba(255,255,255,0.05) !important;
}
.fl-apple-chat-friends li:hover,
.fl-friend-list li:hover {
    background: rgba(107,122,42,0.18) !important;
    color: #c9a227 !important;
}
.fl-friend-name {
    color: #D0D8B0 !important;
}
.fl-friend-avatar-placeholder {
    background: #4A5C14 !important;
}

/* Zone de conversation */
#fl-chat-conv {
    background: #1a2010 !important;
}
#fl-chat-messages {
    background: #141c08 !important;
    box-shadow: none !important;
}

/* Bulles de messages */
#fl-chat-messages .fl-chat-bubble {
    background: #4A5C14 !important;
    color: #fff !important;
}
#fl-chat-messages .fl-chat-msg.friend .fl-chat-bubble {
    background: rgba(255,255,255,0.10) !important;
    color: #D0D8B0 !important;
}
#fl-chat-messages .fl-chat-msg.friend .fl-chat-time { color: #888 !important; }
#fl-chat-messages .fl-chat-msg:not(.friend) .fl-chat-time { color: #aaa !important; }

/* Zone de saisie */
#fl-chat-form {
    background: #1a2010 !important;
    border-top: 1px solid rgba(255,255,255,0.08) !important;
    padding: 8px 10px !important;
}
/* Wrapper flex — bypass Astra overrides sur <form> */
#fl-chat-input-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
}
#fl-chat-input {
    flex: 1 !important;
    background: rgba(255,255,255,0.07) !important;
    color: #D0D8B0 !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    border-radius: 18px !important;
    height: 36px !important;
    min-height: 0 !important;
    max-height: 36px !important;
    margin: 0 !important;
    padding: 0 14px !important;
    line-height: 36px !important;
    align-self: center !important;
    display: block !important;
    box-shadow: none !important;
}
#fl-chat-input::placeholder { color: rgba(208,216,176,0.5) !important; }
#fl-chat-input:focus {
    border-color: rgba(107,122,42,0.6) !important;
    outline: none !important;
}
#fl-chat-form button {
    background: linear-gradient(135deg, #6B7A2A, #4A5C14) !important;
    color: #fff !important;
    border-radius: 50% !important;
    border: none !important;
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    height: 36px !important;
    min-height: 0 !important;
    max-height: 36px !important;
    margin: 0 !important;
    padding: 0 !important;
    position: static !important;
    float: none !important;
    top: auto !important;
    align-self: center !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}
#fl-chat-form button:hover {
    background: linear-gradient(135deg, #7d8f30, #5a6e1a) !important;
}

/* Header de conversation (back button zone) */
.fl-conv-header {
    background: #1a2010 !important;
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
    color: #c9a227 !important;
}
.fl-chat-back-btn {
    color: #D0D8B0 !important;
}
.fl-chat-back-btn:hover {
    background: rgba(107,122,42,0.18) !important;
    color: #c9a227 !important;
}