/* ============================================================
   LIGUE DE FOOTBALL DE MARTINIQUE — Feuille de style principale
   Inspiré du style fff.fr
   ============================================================ */

/* ── Variables ── */
:root {
  --fff-bleu:        #003189;
  --fff-bleu-hover:  #00267a;
  --fff-rouge:       #E2001A;
  --fff-rouge-hover: #c40017;
  --fff-or:          #c8a84b;
  --fff-blanc:       #ffffff;
  --fff-gris-bg:     #f4f5f7;
  --fff-gris-border: #dde1e7;
  --fff-gris-text:   #333333;
  --fff-gris-muted:  #6b7280;

  --radius-sm:  4px;
  --radius-md:  6px;
  --radius-lg:  10px;
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.10);
  --transition: 0.18s ease;

  font-size: 15px;
}

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Source Sans 3', system-ui, sans-serif;
  background: var(--fff-gris-bg);
  color: var(--fff-gris-text);
  line-height: 1.6;
}
a { color: var(--fff-bleu); text-decoration: none; }
a:hover { text-decoration: underline; }
h1,h2,h3,h4 { font-family: 'Oswald', sans-serif; font-weight: 500; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }

/* ── Layout ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.site-main { padding: 24px 0 48px; min-height: calc(100vh - 160px); }

/* ── Header ── */
.site-header { background: var(--fff-bleu); color: white; }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 14px; gap: 16px;
}
.header-brand { display: flex; align-items: center; gap: 14px; }
.brand-emblem { width: 48px; height: 48px; flex-shrink: 0; }
.brand-emblem svg { width: 100%; height: 100%; }
.brand-text { display: flex; flex-direction: column; }
.brand-name  { font-family: 'Oswald', sans-serif; font-size: 18px; font-weight: 600; line-height: 1.2; color: white; }
.brand-sub   { font-size: 12px; color: rgba(255,255,255,0.72); }

.header-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav-link {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: var(--radius-md);
  color: rgba(255,255,255,0.85); font-size: 13.5px; font-weight: 500;
  transition: background var(--transition);
}
.nav-link:hover, .nav-link.active { background: rgba(255,255,255,0.15); color: white; text-decoration: none; }
.nav-link.active { background: var(--fff-rouge); }
.nav-user { display: flex; align-items: center; gap: 8px; margin-left: 8px; padding-left: 12px; border-left: 1px solid rgba(255,255,255,0.25); }
.user-club { font-size: 13px; color: rgba(255,255,255,0.8); }
.btn-logout { font-size: 12px; color: rgba(255,255,255,0.6); padding: 4px 8px; border: 1px solid rgba(255,255,255,0.3); border-radius: var(--radius-sm); transition: all var(--transition); }
.btn-logout:hover { background: rgba(255,255,255,0.15); color: white; text-decoration: none; }
.btn-login { padding: 8px 18px; background: var(--fff-rouge); color: white; border-radius: var(--radius-md); font-size: 14px; font-weight: 500; transition: background var(--transition); }
.btn-login:hover { background: var(--fff-rouge-hover); text-decoration: none; }

/* ── Page banner ── */
.page-banner {
  background: linear-gradient(135deg, var(--fff-bleu) 0%, #001f5e 100%);
  color: white; padding: 22px 0;
  border-bottom: 3px solid var(--fff-rouge);
}
.page-banner-admin { background: linear-gradient(135deg, #1a2a4a 0%, #0d1b35 100%); }
.page-banner-public { background: linear-gradient(135deg, #1a3a1a 0%, #0d2010 100%); }
.page-title { font-family: 'Oswald', sans-serif; font-size: 26px; font-weight: 600; color: white; margin: 0; }
.page-sub { color: rgba(255,255,255,0.7); font-size: 13px; margin: 4px 0 0; }

/* ── Alerts ── */
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius-md); margin-bottom: 16px;
  border-left: 4px solid transparent; font-size: 14px;
}
.alert-success { background: #f0faf4; border-color: #2e7d32; color: #1b5e20; }
.alert-danger   { background: #fff5f5; border-color: var(--fff-rouge); color: #8b0000; }
.alert-warning  { background: #fffbf0; border-color: var(--fff-or); color: #7a5700; }
.alert-info     { background: #f0f4ff; border-color: var(--fff-bleu); color: #00205c; }
.alert-icon { font-weight: 700; flex-shrink: 0; }
.alert-close { margin-left: auto; background: none; border: none; cursor: pointer; font-size: 18px; color: inherit; opacity: 0.6; padding: 0 4px; }
.alert-close:hover { opacity: 1; }

.alert-suspension {
  display: flex; align-items: flex-start; gap: 10px;
  background: #fff8e1; border: 1px solid var(--fff-or); border-left: 4px solid var(--fff-or);
  padding: 12px 16px; border-radius: var(--radius-md); margin-bottom: 20px;
  color: #7a5700; font-size: 14px;
}

/* ── Cards ── */
.card {
  background: white; border: 1px solid var(--fff-gris-border);
  border-radius: var(--radius-lg); margin-bottom: 20px;
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--fff-gris-border);
  background: #fafbfc;
}
.card-title { font-family: 'Oswald', sans-serif; font-size: 17px; font-weight: 500; margin: 0; color: var(--fff-bleu); }
.card-action { font-size: 13px; color: var(--fff-bleu); }
.card-actions { display: flex; align-items: center; gap: 8px; }

/* ── KPI Grid ── */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.kpi-grid-5 { grid-template-columns: repeat(5, 1fr); }
.kpi-card {
  background: white; border: 1px solid var(--fff-gris-border);
  border-radius: var(--radius-lg); padding: 16px 18px;
  display: flex; align-items: center; gap: 14px;
  border-top: 4px solid var(--fff-gris-border); box-shadow: var(--shadow-sm);
}
.kpi-card.kpi-primary { border-top-color: var(--fff-bleu); }
.kpi-card.kpi-danger  { border-top-color: var(--fff-rouge); }
.kpi-card.kpi-warning { border-top-color: var(--fff-or); }
.kpi-card.kpi-success { border-top-color: #2e7d32; }
.kpi-card.kpi-alert   { border-top-color: #e65100; }
.kpi-icon { color: var(--fff-gris-muted); flex-shrink: 0; }
.kpi-value { font-family: 'Oswald', sans-serif; font-size: 28px; font-weight: 600; line-height: 1; }
.kpi-label { font-size: 12px; color: var(--fff-gris-muted); margin-top: 3px; }

/* ── Tables ── */
.table-responsive { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table thead th {
  padding: 10px 16px; text-align: left; white-space: nowrap;
  font-size: 12px; font-weight: 600; color: var(--fff-gris-muted);
  text-transform: uppercase; letter-spacing: 0.04em;
  background: #fafbfc; border-bottom: 2px solid var(--fff-gris-border);
}
.table tbody tr { border-bottom: 1px solid var(--fff-gris-border); transition: background var(--transition); }
.table tbody tr:last-child { border-bottom: none; }
.table tbody tr:hover { background: #f7f8fa; }
.table tbody td { padding: 10px 16px; vertical-align: middle; }
.table-sm thead th, .table-sm tbody td { padding: 8px 12px; }
.table-empty { text-align: center; padding: 36px 20px !important; color: var(--fff-gris-muted); }
.table-empty svg { display: block; margin: 0 auto 12px; color: #ccc; }
.table-empty p { margin: 0; }

.row-suspendu { background: #fff5f5 !important; }
.row-suspendu:hover { background: #ffecec !important; }

.text-truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.motif-cell { font-size: 12px; color: var(--fff-gris-muted); max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.competition-cell { font-size: 12px; max-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dossier-num { font-family: 'Courier New', monospace; font-size: 12px; background: #f0f2f5; padding: 2px 6px; border-radius: 3px; color: var(--fff-bleu); }
.personne-nom { font-weight: 500; font-size: 13.5px; }
.personne-meta { font-size: 11.5px; color: var(--fff-gris-muted); }
.montant-cell { font-size: 14px; }
.club-badge { font-size: 12px; background: #eef2ff; color: var(--fff-bleu); padding: 3px 8px; border-radius: 12px; }
.col-check { width: 36px; }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 12px; font-size: 11.5px; font-weight: 600;
  white-space: nowrap;
}
.badge-success { background: #e8f5e9; color: #1b5e20; }
.badge-danger  { background: #ffebee; color: #b71c1c; }
.badge-warning { background: #fff8e1; color: #7a5700; }
.badge-info    { background: #e3f2fd; color: #0d47a1; }
@keyframes badge-pulse { 0%,100% { opacity:1; } 50% { opacity:.75; } }
.badge-pulse { animation: badge-pulse 2s infinite; }

/* ── Boutons ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--radius-md); font-size: 14px; font-weight: 500;
  border: 1.5px solid transparent; cursor: pointer; transition: all var(--transition);
  text-decoration: none; line-height: 1;
}
.btn:hover { text-decoration: none; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-primary { background: var(--fff-bleu); color: white; border-color: var(--fff-bleu); }
.btn-primary:hover { background: var(--fff-bleu-hover); border-color: var(--fff-bleu-hover); }
.btn-outline { background: white; color: var(--fff-gris-text); border-color: var(--fff-gris-border); }
.btn-outline:hover { background: #f4f5f7; }
.btn-pay { background: var(--fff-rouge); color: white; border-color: var(--fff-rouge); font-size: 14px; font-weight: 600; }
.btn-pay:hover { background: var(--fff-rouge-hover); border-color: var(--fff-rouge-hover); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Payment bar ── */
.payment-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; background: var(--fff-bleu); color: white;
  border-top: 1px solid rgba(255,255,255,0.2);
}
.payment-bar-info { font-size: 14px; }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
}
.modal-box {
  background: white; border-radius: var(--radius-lg); max-width: 520px; width: 100%;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25); overflow: hidden;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; background: var(--fff-bleu); color: white;
}
.modal-header h3 { font-family: 'Oswald', sans-serif; font-size: 18px; margin: 0; color: white; }
.modal-close { background: none; border: none; color: white; font-size: 22px; cursor: pointer; opacity: 0.7; }
.modal-close:hover { opacity: 1; }
.modal-body { padding: 20px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--fff-gris-border); background: #fafbfc; }
.payment-summary { background: #f0f4ff; border-radius: var(--radius-md); padding: 12px 14px; margin-bottom: 16px; font-size: 14px; }
.stripe-badge-row { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--fff-gris-muted); margin-bottom: 16px; }
.payment-message { padding: 10px 14px; background: #fff5f5; border: 1px solid var(--fff-rouge); border-radius: var(--radius-md); color: #8b0000; font-size: 13px; margin-top: 12px; }

/* ── Forms ── */
.form-input, .form-select {
  padding: 8px 12px; border: 1px solid var(--fff-gris-border); border-radius: var(--radius-md);
  font-size: 14px; background: white; color: var(--fff-gris-text);
  transition: border-color var(--transition);
}
.form-input:focus, .form-select:focus { outline: none; border-color: var(--fff-bleu); box-shadow: 0 0 0 3px rgba(0,49,137,0.12); }
.form-input-sm, .form-select-sm { padding: 6px 10px; font-size: 13px; }
.filter-group { display: flex; align-items: center; gap: 8px; }
.card-filters { display: flex; align-items: center; gap: 8px; }

.checkbox-label { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 10px; font-size: 13.5px; cursor: pointer; }
.checkbox-label input { margin-top: 2px; }

/* ── Dropzone ── */
.dropzone {
  border: 2px dashed var(--fff-gris-border); border-radius: var(--radius-lg);
  padding: 40px 20px; text-align: center; cursor: pointer; margin: 0 20px 20px;
  transition: all var(--transition); position: relative;
}
.dropzone.drag-over { border-color: var(--fff-bleu); background: #f0f4ff; }
.dropzone-input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.dropzone-title { font-family: 'Oswald', sans-serif; font-size: 18px; margin: 12px 0 6px; }
.dropzone-sub { font-size: 14px; color: var(--fff-gris-muted); margin-bottom: 8px; }
.dropzone-link { color: var(--fff-bleu); cursor: pointer; text-decoration: underline; }
.dropzone-hint { font-size: 12px; color: var(--fff-gris-muted); }
.dropzone-selected { display: flex; align-items: center; gap: 14px; text-align: left; }
.file-name { font-weight: 500; font-size: 14px; margin: 0 0 2px; }
.file-size { font-size: 12px; color: var(--fff-gris-muted); margin: 0; }
.import-options { padding: 0 20px 16px; }
.import-actions { padding: 0 20px 20px; display: flex; justify-content: flex-end; }
.import-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 20px; }
.import-stat { border-radius: var(--radius-md); padding: 16px; text-align: center; }
.import-stat-success { background: #e8f5e9; }
.import-stat-warning { background: #fff8e1; }
.import-stat-danger  { background: #ffebee; }
.import-stat-neutral { background: #f4f5f7; }
.import-stat-value { font-family: 'Oswald', sans-serif; font-size: 32px; font-weight: 600; }
.import-stat-success .import-stat-value { color: #1b5e20; }
.import-stat-warning .import-stat-value { color: #7a5700; }
.import-stat-danger  .import-stat-value { color: #b71c1c; }
.import-stat-label { font-size: 12px; color: var(--fff-gris-muted); margin-top: 4px; }
.import-details { padding: 0 20px 20px; }
.import-details h4 { font-size: 13px; color: var(--fff-gris-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.import-log-list { list-style: none; padding: 0; margin: 0; font-size: 12.5px; max-height: 280px; overflow-y: auto; border: 1px solid var(--fff-gris-border); border-radius: var(--radius-md); }
.import-log-list li { padding: 5px 12px; border-bottom: 1px solid var(--fff-gris-border); }
.import-log-list li:last-child { border-bottom: none; }
.log-skip  { color: #7a5700; background: #fffbf0; }
.log-error { color: #8b0000; background: #fff5f5; }
.log-info  { color: #1b5e20; }

.columns-help { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 20px; }
.columns-help h4 { font-size: 13px; color: var(--fff-gris-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.columns-help ul { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.columns-help li { padding: 4px 0; border-bottom: 1px solid var(--fff-gris-border); }
.columns-help li:last-child { border-bottom: none; }
.columns-help code { font-size: 12px; background: #f0f2f5; padding: 1px 5px; border-radius: 3px; color: var(--fff-bleu); }

/* ── Admin layout ── */
.admin-layout-inner { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: start; }
.admin-sidebar { background: white; border: 1px solid var(--fff-gris-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); position: sticky; top: 20px; overflow: hidden; }
.admin-nav { padding: 8px 0; }
.admin-nav-group { margin-bottom: 4px; }
.admin-nav-label { font-size: 10.5px; font-weight: 700; color: var(--fff-gris-muted); text-transform: uppercase; letter-spacing: 0.08em; padding: 8px 16px 4px; }
.admin-nav-link {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px; font-size: 13.5px; color: var(--fff-gris-text);
  transition: background var(--transition); border-left: 3px solid transparent;
}
.admin-nav-link:hover { background: var(--fff-gris-bg); text-decoration: none; }
.admin-nav-link.active { background: #eef2ff; color: var(--fff-bleu); border-left-color: var(--fff-bleu); font-weight: 500; }
.admin-content { min-width: 0; }
.admin-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.card-import-quick {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px; background: linear-gradient(135deg, #f0f4ff 0%, #eef2ff 100%);
  border-color: #c5d0f0;
}
.import-quick-icon { color: var(--fff-bleu); flex-shrink: 0; }
.import-quick-text { flex: 1; }
.import-quick-text strong { display: block; font-size: 15px; }
.import-quick-text span { font-size: 13px; color: var(--fff-gris-muted); }

/* ── Tabs ── */
.tabs-nav { display: flex; border-bottom: 2px solid var(--fff-gris-border); margin-bottom: 20px; }
.tab-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 20px; background: none; border: none; border-bottom: 3px solid transparent;
  font-size: 14px; font-weight: 500; color: var(--fff-gris-muted); cursor: pointer;
  margin-bottom: -2px; transition: all var(--transition);
}
.tab-btn:hover { color: var(--fff-bleu); }
.tab-btn.active { color: var(--fff-bleu); border-bottom-color: var(--fff-bleu); }
.tab-count { padding: 2px 8px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.tab-count-danger  { background: #ffebee; color: #b71c1c; }
.tab-count-warning { background: #fff8e1; color: #7a5700; }

/* ── Footer ── */
.site-footer { background: var(--fff-bleu); color: rgba(255,255,255,0.7); padding: 16px 0; font-size: 12.5px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.footer-right { display: flex; align-items: center; gap: 6px; }

/* ── Login page ── */
.login-wrapper { min-height: calc(100vh - 72px); display: flex; align-items: center; justify-content: center; }
.login-card { background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 40px; width: 100%; max-width: 420px; }
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo .brand-emblem { width: 56px; height: 56px; background: var(--fff-bleu); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; }
.login-logo .brand-emblem svg { width: 32px; height: 32px; }
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 5px; }
.form-input-full { width: 100%; }
.form-help { font-size: 12px; color: var(--fff-gris-muted); margin-top: 4px; }
.btn-block { width: 100%; justify-content: center; margin-top: 8px; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi-grid-5 { grid-template-columns: repeat(3, 1fr); }
  .admin-layout-inner { grid-template-columns: 1fr; }
  .admin-grid-2 { grid-template-columns: 1fr; }
  .columns-help { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .header-inner { flex-direction: column; align-items: flex-start; }
  .header-nav { flex-wrap: wrap; }
  .table { font-size: 12px; }
}
</style>
