/* ============================================
   Les Archers de Breaute - Mini ERP
   style.css - Styles principaux
   ============================================ */

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

/* --- Variables CSS --- */
:root {
  --primary: #2d5016;
  --primary-light: #4a7c29;
  --bg: #f5f0e8;
  --bg-white: #ffffff;
  --text: #333333;
  --text-light: #666666;
  --border: #dddddd;
  --danger: #c0392b;
  --success: #27ae60;
  --sidebar-width: 250px;
  --header-height: 56px;
}

/* --- Base --- */
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

h1, h2, h3, h4 {
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

/* --- Layout general --- */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 2rem;
  min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background-color: var(--primary);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow-y: auto;
}

.sidebar-header {
  padding: 1.5rem 1rem;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar-header img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.sidebar-header h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.95rem;
  transition: background-color 0.2s, color 0.2s;
  border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  text-decoration: none;
}

.sidebar-nav a.active {
  background-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-left-color: #ffffff;
  font-weight: 600;
}

.sidebar-nav .nav-icon {
  font-size: 1.2rem;
  width: 1.5rem;
  text-align: center;
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar-footer .user-info {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.5rem;
}

.sidebar-footer .btn-logout {
  display: block;
  width: 100%;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  text-align: center;
  transition: background-color 0.2s;
}

.sidebar-footer .btn-logout:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* --- Mobile Header --- */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background-color: var(--primary);
  color: #ffffff;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  z-index: 999;
}

.mobile-header h1 {
  font-size: 1.1rem;
  font-weight: 600;
}

.hamburger {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.sidebar-overlay.active {
  display: block;
}

/* --- Page header --- */
.page-header {
  margin-bottom: 1.5rem;
}

.page-header h1 {
  color: var(--primary);
}

.page-header p {
  color: var(--text-light);
  margin-top: 0.25rem;
}

/* --- Cards / Panels --- */
.card {
  background-color: var(--bg-white);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.card-header h2,
.card-header h3 {
  margin-bottom: 0;
}

/* Stats cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--bg-white);
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-card .stat-icon {
  font-size: 2rem;
  width: 3rem;
  text-align: center;
}

.stat-card .stat-info h3 {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 0;
}

.stat-card .stat-info p {
  font-size: 0.85rem;
  color: var(--text-light);
  margin: 0;
}

/* Quick links */
.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.quick-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 1rem;
  background: var(--bg-white);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s, box-shadow 0.2s;
}

.quick-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  text-decoration: none;
}

.quick-link .link-icon {
  font-size: 2rem;
}

.quick-link span:last-child {
  font-weight: 500;
  font-size: 0.95rem;
}

/* --- Action bar --- */
.action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.action-bar .search-box {
  position: relative;
  flex: 1;
  max-width: 300px;
}

.action-bar .search-box input {
  width: 100%;
  padding: 0.5rem 0.75rem 0.5rem 2rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
}

.action-bar .search-box::before {
  content: "\1F50D";
  position: absolute;
  left: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
}

.action-bar .filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* --- Tableaux --- */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead {
  background-color: var(--primary);
  color: #ffffff;
}

thead th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background-color 0.15s;
}

tbody tr:nth-child(even) {
  background-color: #f9f7f3;
}

tbody tr:hover {
  background-color: #eee9de;
}

tbody td {
  padding: 0.65rem 1rem;
  vertical-align: middle;
}

/* --- Badges --- */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-success {
  background-color: #d4edda;
  color: #155724;
}

.badge-danger {
  background-color: #f8d7da;
  color: #721c24;
}

.badge-info {
  background-color: #d1ecf1;
  color: #0c5460;
}

.badge-warning {
  background-color: #fff3cd;
  color: #856404;
}

.badge-primary {
  background-color: #d4e8c2;
  color: var(--primary);
}

/* Badges type materiel */
.badge-type-arc {
  background-color: #e8d4c2;
  color: #8b4513;
}

.badge-type-viseur {
  background-color: #d4d4e8;
  color: #3b3b8b;
}

.badge-type-stabilisateur {
  background-color: #d4e8e0;
  color: #2d6b4f;
}

.badge-type-fleches {
  background-color: #e8e4d4;
  color: #6b5a2d;
}

.badge-type-autre {
  background-color: #e0e0e0;
  color: #555;
}

/* Filtres inventaire */
.action-bar-filters {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.action-bar-filters select {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.85rem;
  background-color: var(--bg-white);
}

.text-light {
  color: var(--text-light);
  font-style: italic;
}

/* --- Formulaires --- */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  background-color: var(--bg-white);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45, 80, 22, 0.15);
}

.form-group input::placeholder {
  color: #aaa;
}

.form-group .form-hint {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.25rem;
}

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

/* --- Boutons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.2rem;
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  text-decoration: none;
  line-height: 1.4;
}

.btn:hover {
  text-decoration: none;
}

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

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--primary-light);
}

.btn-secondary {
  background-color: #6c757d;
  color: #ffffff;
}

.btn-secondary:hover {
  background-color: #5a6268;
}

.btn-danger {
  background-color: var(--danger);
  color: #ffffff;
}

.btn-danger:hover {
  background-color: #a93226;
}

.btn-success {
  background-color: var(--success);
  color: #ffffff;
}

.btn-success:hover {
  background-color: #219a52;
}

.btn-sm {
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  background-color: #f0f0f0;
}

/* --- Modals --- */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--bg-white);
  border-radius: 10px;
  width: 100%;
  max-width: 550px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 1.2rem;
  margin-bottom: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
  padding: 0;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
}

/* --- Toast notifications --- */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  max-width: 350px;
}

.toast-success {
  background-color: var(--success);
}

.toast-error {
  background-color: var(--danger);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* --- Login page --- */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
  background-color: var(--bg);
}

.login-card {
  background: var(--bg-white);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.login-card .logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin-bottom: 1rem;
  border-radius: 8px;
}

.login-card h1 {
  font-size: 1.4rem;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.login-card .subtitle {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.login-card .form-group {
  text-align: left;
}

.login-card .btn-primary {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  margin-top: 0.5rem;
}

.login-error {
  display: none;
  background-color: #f8d7da;
  color: #721c24;
  padding: 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.login-error.visible {
  display: block;
}

/* --- Emargement specifique --- */
.emargement-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.emargement-info h2 {
  color: var(--primary);
}

.emargement-info p {
  color: var(--text-light);
  font-size: 0.9rem;
}

.emargement-actions {
  display: flex;
  gap: 0.5rem;
}

.presence-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--primary);
}

.emargement-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 1.5rem;
  background: var(--bg-white);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  margin-top: 1rem;
}

.emargement-stats .stat {
  font-size: 0.95rem;
}

.emargement-stats .stat strong {
  color: var(--primary);
  font-size: 1.25rem;
}

/* --- Event cards --- */
.event-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-white);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  margin-bottom: 0.75rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.event-card .event-info {
  flex: 1;
}

.event-card .event-info h3 {
  margin-bottom: 0.25rem;
}

.event-card .event-meta {
  font-size: 0.85rem;
  color: var(--text-light);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.event-card .event-actions {
  display: flex;
  gap: 0.5rem;
}

/* --- Print area (screen) --- */
#print-area {
  /* visible on screen within card */
}

#print-area .print-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

#print-area .print-header img {
  width: 100px;
  margin-bottom: 0.5rem;
}

#print-area .print-header h1 {
  font-size: 1.3rem;
  color: var(--primary);
}

#print-area .print-header p {
  color: var(--text-light);
  font-size: 0.9rem;
}

#print-area .print-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-light);
  font-style: italic;
}

/* --- Utility classes --- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.hidden { display: none !important; }
.w-full { width: 100%; }

/* --- Loading --- */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--text-light);
}

.loading::after {
  content: "";
  width: 24px;
  height: 24px;
  margin-left: 0.75rem;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Empty state --- */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-light);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state p {
  font-size: 1rem;
}

/* ============================================
   RESPONSIVE - Mobile first
   ============================================ */

/* --- Mobile (< 768px) --- */
@media (max-width: 767px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-header {
    display: flex;
  }

  .main-content {
    margin-left: 0;
    padding: 1rem;
    padding-top: calc(var(--header-height) + 1rem);
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .action-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .action-bar .search-box {
    max-width: 100%;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .emargement-header {
    flex-direction: column;
    align-items: flex-start;
  }

  table {
    font-size: 0.8rem;
  }

  thead th, tbody td {
    padding: 0.5rem 0.6rem;
  }

  .event-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* --- Tablette (768px - 1024px) --- */
@media (min-width: 768px) and (max-width: 1024px) {
  :root {
    --sidebar-width: 220px;
  }

  .main-content {
    padding: 1.5rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- Desktop (> 1024px) --- */
@media (min-width: 1025px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================
   PRINT - masquer tout sauf zone d'impression
   ============================================ */
@media print {
  body * {
    visibility: hidden;
  }

  #print-area, #print-area * {
    visibility: visible;
  }

  #print-area {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }

  .sidebar,
  .mobile-header,
  .sidebar-overlay,
  .toast-container,
  .modal-overlay,
  .emargement-actions,
  .emargement-stats,
  .action-bar,
  .page-header {
    display: none !important;
  }

  .main-content {
    margin-left: 0;
    padding: 0;
  }
}

/* ===========================================================================
   Texte d'impression Oui/Non (emargement) - masque a l'ecran
   =========================================================================== */
.print-text {
  display: none;
}

/* ===========================================================================
   Onglets dans le modal membre
   =========================================================================== */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.5rem;
}

.tabs .tab {
  padding: 0.6rem 1.2rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text-light);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.tabs .tab:hover {
  color: var(--primary);
}

.tabs .tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ===========================================================================
   Section titles dans les formulaires
   =========================================================================== */
.section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  margin: 1.5rem 0 0.75rem 0;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border);
}

.section-title:first-child {
  margin-top: 0;
}

/* ===========================================================================
   Listes dynamiques (emails, telephones)
   =========================================================================== */
.dynamic-list {
  margin-bottom: 0.5rem;
}

.dynamic-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.6rem;
  background: var(--bg);
  border-radius: 4px;
  margin-bottom: 0.3rem;
}

.dynamic-list-item span {
  font-size: 0.9rem;
}

.dynamic-list-empty {
  color: var(--text-light);
  font-size: 0.85rem;
  font-style: italic;
  padding: 0.3rem 0;
}

.dynamic-list-add {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.dynamic-list-add input {
  flex: 1;
}

/* ===========================================================================
   Modal large (fiche membre)
   =========================================================================== */
.modal-large {
  width: 90%;
  max-width: 750px;
  max-height: 90vh;
  overflow-y: auto;
}

/* ===========================================================================
   Field hints (age calcule)
   =========================================================================== */
.field-hint {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
  margin-left: 0.5rem;
}

/* ===========================================================================
   Badges distinctions
   =========================================================================== */
.badge-plume {
  background-color: #8B4513;
  color: #fff;
}

.badge-fleche {
  background-color: #2c3e50;
  color: #fff;
}

.badge-blanche {
  background-color: #f0f0f0;
  color: #333;
  border: 1px solid #ccc;
}

.badge-noire {
  background-color: #333;
  color: #fff;
}

.badge-bleue {
  background-color: #2980b9;
  color: #fff;
}

.badge-rouge {
  background-color: #c0392b;
  color: #fff;
}

.badge-jaune {
  background-color: #f1c40f;
  color: #333;
}

.badge-bronze {
  background-color: #cd7f32;
  color: #fff;
}

.badge-argent {
  background-color: #bdc3c7;
  color: #333;
}

.badge-or {
  background-color: #f39c12;
  color: #fff;
}

/* ===========================================================================
   Badge warning (cotisation partielle)
   =========================================================================== */
.badge-warning {
  background-color: #f39c12;
  color: #fff;
}

/* ===========================================================================
   Print Filters Modal
   =========================================================================== */
.print-filters {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.print-filters h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.5rem;
  margin-top: 0;
}

.print-filters label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: normal;
  margin-bottom: 0.25rem;
  color: var(--text);
  user-select: none;
}

.print-filters input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
  margin: 0;
}

/* ===========================================================================
   Jours de presence (formulaire d'edition membre)
   =========================================================================== */
.form-fieldset {
  min-width: 0;
  padding: 0;
  border: 0;
}

.form-fieldset legend {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.form-group .jours-presence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.form-group .jours-presence-grid .check-line {
  width: 100%;
}

.form-fieldset .form-hint {
  display: block;
  margin-top: 0.5rem;
}

/* Lignes d'autorisations (photos, depart seul) */
.form-group .check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text);
  margin: 0;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.form-group .check-line:hover {
  background: #eee9de;
}

.form-group .check-line:has(input:focus-visible) {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45, 80, 22, 0.15);
}

.form-group .check-line:has(input:checked) {
  background: #e3efd8;
  border-color: var(--primary);
  color: var(--primary);
}

.form-group .check-line input {
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}

.form-row-checks {
  margin-top: 0.5rem;
}

@media (max-width: 767px) {
  .form-group .jours-presence-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ===========================================================================
   Boutons d'impressions spécifiques (modale d'impression)
   =========================================================================== */
.btn-print-action {
  width: 100%;
  margin-top: 6px;
  text-align: left;
}
