/* ============================================================
   Escrime Présences – style.css  v2.0
   ============================================================ */
:root {
  --ep-blue:        #1e4a8c;
  --ep-blue-light:  #2c6fcc;
  --ep-blue-pale:   #e8eef8;
  --ep-green:       #1a7f45;
  --ep-green-bg:    #d4edda;
  --ep-green-dark:  #145f33;
  --ep-orange:      #c27000;
  --ep-orange-bg:   #fff3cd;
  --ep-red:         #c0392b;
  --ep-red-bg:      #fdecea;
  --ep-grey:        #6b7280;
  --ep-grey-bg:     #f4f6f9;
  --ep-border:      #dde1e9;
  --ep-radius:      10px;
  --ep-shadow:      0 2px 8px rgba(0,0,0,.10);
}

/* ── Base ── */
.ep-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px 60px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.ep-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.55rem; color: var(--ep-blue);
  border-bottom: 3px solid var(--ep-blue);
  padding-bottom: 12px; margin-bottom: 22px !important;
}
.ep-title .dashicons { font-size: 1.8rem; margin-top: 2px; }

/* =========================================================
   LISTING PAGE
   ========================================================= */

/* Filtres */
.ep-filters {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px;
  background: #fff; border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius); padding: 16px 20px;
  box-shadow: var(--ep-shadow); margin-bottom: 18px;
}
.ep-filter-group { display: flex; flex-direction: column; gap: 4px; }
.ep-filter-group label {
  font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--ep-grey);
}
.ep-filter-group select,
.ep-filter-group input[type="date"] {
  padding: 8px 11px; border: 1px solid var(--ep-border);
  border-radius: 6px; font-size: .93rem; background: var(--ep-grey-bg); cursor: pointer;
}
.ep-filter-group select { min-width: 260px; }
.ep-filter-group input[type="date"] { min-width: 150px; }
.ep-filter-group select:focus,
.ep-filter-group input:focus {
  outline: none; border-color: var(--ep-blue-light);
  box-shadow: 0 0 0 3px rgba(44,111,204,.18);
}
.ep-btn-load {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px !important; font-size: .93rem !important;
  border-radius: 7px !important; background: var(--ep-blue) !important;
  border-color: var(--ep-blue) !important; cursor: pointer; align-self: flex-end;
}
.ep-btn-load:hover { background: var(--ep-blue-light) !important; }
.ep-date-info { margin-left: auto; font-size: .86rem; color: var(--ep-grey); align-self: flex-end; font-style: italic; }

/* Avertissement date passée */
.ep-past-warning {
  display: flex; align-items: center; gap: 10px;
  background: var(--ep-orange-bg); border: 1px solid var(--ep-orange);
  border-radius: 8px; padding: 10px 16px; margin-bottom: 16px;
  font-size: .9rem; color: var(--ep-orange);
}

/* Stats */
.ep-stats {
  display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.ep-stat-card {
  flex: 1; min-width: 110px; border-radius: var(--ep-radius);
  padding: 12px 14px; display: flex; flex-direction: column;
  align-items: center; gap: 3px; box-shadow: var(--ep-shadow);
}
.ep-stat-total    { background: var(--ep-blue-pale); border-left: 4px solid var(--ep-blue); }
.ep-stat-presents { background: var(--ep-green-bg);  border-left: 4px solid var(--ep-green); }
.ep-stat-absents  { background: var(--ep-red-bg);    border-left: 4px solid var(--ep-red); }
.ep-stat-extra    { background: var(--ep-orange-bg); border-left: 4px solid var(--ep-orange); }
.ep-stat-nb { font-size: 1.85rem; font-weight: 700; line-height: 1; color: var(--ep-blue); }
.ep-stat-presents .ep-stat-nb { color: var(--ep-green); }
.ep-stat-absents  .ep-stat-nb { color: var(--ep-red); }
.ep-stat-extra    .ep-stat-nb { color: var(--ep-orange); }
.ep-stat-label { font-size: .71rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ep-grey); text-align: center; }

/* Zone recherche globale */
.ep-search-zone { margin-bottom: 16px; position: relative; }
.ep-search-bar {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 2px solid var(--ep-blue-light);
  border-radius: 10px; padding: 10px 16px; box-shadow: var(--ep-shadow);
}
.ep-search-bar:focus-within { box-shadow: 0 0 0 3px rgba(44,111,204,.2); }
.ep-search-icon { color: var(--ep-blue-light); font-size: 1.1rem; }
#ep-search-nom {
  flex: 1; border: none; outline: none; font-size: .97rem;
  background: transparent; color: #1a1a2e;
}
#ep-search-nom::placeholder { color: #aab0bc; }
#ep-btn-clear-search {
  background: none; border: none; font-size: 1rem;
  cursor: pointer; color: var(--ep-grey); padding: 3px 6px; border-radius: 4px;
}
#ep-btn-clear-search:hover { background: var(--ep-red-bg); color: var(--ep-red); }

/* Résultats recherche */
.ep-search-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px);
  background: #fff; border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius); box-shadow: 0 8px 24px rgba(0,0,0,.15);
  z-index: 1000; max-height: 320px; overflow-y: auto;
}
.ep-search-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 16px; border-bottom: 1px solid var(--ep-border);
  gap: 12px; transition: background .1s;
}
.ep-search-item:last-child { border-bottom: none; }
.ep-search-item:hover { background: var(--ep-grey-bg); }
.ep-search-item-name { flex: 1; font-size: .93rem; display: flex; flex-direction: column; gap: 2px; }
.ep-search-item-name strong { color: var(--ep-blue); font-size: .93rem; }
.ep-search-subheader { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ep-search-subheader span   { color: var(--ep-grey); font-size: .83rem; flex: 1; }
.ep-search-categorie {
  font-size: .68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--ep-orange-bg);
  color: var(--ep-orange);
  white-space: nowrap;
  flex-shrink: 0;
}
.ep-badge-inscrit {
  font-size: .7rem; font-weight: 700; padding: 2px 8px;
  border-radius: 999px; background: var(--ep-green-bg); color: var(--ep-green-dark); white-space: nowrap;
}
.ep-badge-hors-creneau {
  font-size: .7rem; font-weight: 700; padding: 2px 8px;
  border-radius: 999px; background: var(--ep-orange-bg); color: var(--ep-orange); white-space: nowrap;
}
.ep-btn-ajouter {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .81rem; font-weight: 700; padding: 5px 12px;
  border-radius: 6px; border: none; background: var(--ep-blue); color: #fff;
  cursor: pointer; transition: background .15s; white-space: nowrap;
}
.ep-btn-ajouter:hover { background: var(--ep-blue-light); }
.ep-btn-ajouter:disabled { opacity: .5; cursor: default; }
.ep-search-empty { padding: 14px; text-align: center; color: var(--ep-grey); font-style: italic; font-size: .88rem; }

/* Grille listing */
#ep-listing-wrap { min-height: 100px; }
.ep-placeholder {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 160px; color: var(--ep-grey); gap: 10px;
}
.ep-placeholder .dashicons { font-size: 3rem; }
.ep-listing-header {
  display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px;
}
.ep-listing-title    { font-size: 1.05rem; font-weight: 700; color: var(--ep-blue); }
.ep-listing-subtitle { font-size: .83rem; color: var(--ep-grey); }
.ep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 11px;
}

/* Carte adhérent */
.ep-btn-adh {
  position: relative; display: flex; flex-direction: column; gap: 3px;
  padding: 13px 15px 11px; border: 2px solid var(--ep-border);
  border-radius: var(--ep-radius); background: #fff; cursor: pointer;
  text-align: left; width: 100%;
  transition: border-color .15s, background .15s, transform .1s, box-shadow .15s;
  box-shadow: 0 1px 4px rgba(0,0,0,.07);
}
.ep-btn-adh:hover:not(.ep-readonly) {
  border-color: var(--ep-blue-light);
  box-shadow: 0 4px 14px rgba(30,74,140,.15);
  transform: translateY(-2px);
}
.ep-btn-adh.ep-present { background: var(--ep-green-bg); border-color: var(--ep-green); }
.ep-btn-adh.ep-present .ep-adh-nom    { color: var(--ep-green-dark); }
.ep-btn-adh.ep-present .ep-adh-prenom { color: var(--ep-green-dark); opacity: .8; }
.ep-btn-adh.ep-manuel  { border-top: 3px solid var(--ep-orange); }
.ep-btn-adh.ep-readonly { cursor: default; }
.ep-btn-adh.ep-loading  { opacity: .55; pointer-events: none; }
.ep-btn-adh.ep-hidden   { display: none; }

/* Coche */
.ep-btn-adh::after {
  content: ''; position: absolute; top: 9px; right: 10px;
  width: 19px; height: 19px; border-radius: 50%;
  border: 2px solid var(--ep-border); background: #fff;
  display: flex; align-items: center; justify-content: center;
}
.ep-btn-adh.ep-present::after {
  content: '✓'; background: var(--ep-green); border-color: var(--ep-green);
  color: #fff; font-size: .68rem; line-height: 19px; text-align: center;
}
.ep-btn-adh.ep-readonly::after { display: none; }

/* En-tête de la carte adhérent */
.ep-adh-header {
  padding-right: 26px;
  margin-bottom: 2px;
}

.ep-adh-nom {
  font-size: .9rem;
  font-weight: 700;
  color: var(--ep-blue);
  word-break: break-word;
  display: block;
}

/* Sous-en-tête : prénom à gauche, catégorie à droite */
.ep-adh-subheader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  padding-right: 0;
}

.ep-adh-prenom {
  font-size: .83rem;
  color: var(--ep-grey);
  flex: 1;
  min-width: 0;
  padding-right: 8px;
}

.ep-adh-categorie {
  font-size: .72rem;
  font-weight: 700;
  color: var(--ep-orange);
  background: var(--ep-orange-bg);
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
}

.ep-btn-adh.ep-present .ep-adh-nom {
  color: var(--ep-green-dark);
}

.ep-btn-adh.ep-present .ep-adh-prenom {
  color: var(--ep-green-dark);
  opacity: .8;
}

.ep-btn-adh.ep-present .ep-adh-categorie {
  background: #a8d5b5;
  color: var(--ep-green-dark);
}
.ep-adh-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 7px; border-top: 1px solid var(--ep-border); padding-top: 5px; gap: 5px;
}
.ep-present .ep-adh-footer { border-color: #a8d5b5; }
.ep-badge-seances {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: .72rem; font-weight: 700; color: var(--ep-blue);
  background: var(--ep-blue-pale); padding: 2px 7px; border-radius: 999px; white-space: nowrap;
}
.ep-present .ep-badge-seances { background: #a8d5b5; color: var(--ep-green-dark); }
.ep-adh-date { font-size: .69rem; color: var(--ep-grey); text-align: right; line-height: 1.3; }
.ep-present .ep-adh-date { color: var(--ep-green-dark); }
.ep-readonly-hint { font-size: .69rem; color: var(--ep-red); opacity: .6; }
.ep-badge-manuel {
  display: inline-block; font-size: .63rem; font-weight: 700;
  background: var(--ep-orange-bg); color: var(--ep-orange);
  padding: 1px 5px; border-radius: 4px; margin-top: 1px;
}
.ep-empty {
  grid-column: 1/-1; text-align: center; color: var(--ep-grey); padding: 28px; font-style: italic;
}

/* Loader */
#ep-loader { display: flex; align-items: center; gap: 10px; color: var(--ep-blue); font-weight: 600; padding: 20px; }
.ep-spinner {
  display: inline-block; width: 22px; height: 22px;
  border: 3px solid rgba(30,74,140,.2); border-top-color: var(--ep-blue);
  border-radius: 50%; animation: ep-spin .7s linear infinite;
}
@keyframes ep-spin { to { transform: rotate(360deg); } }

/* Toast */
#ep-toast {
  position: fixed; bottom: 28px; right: 28px; color: #fff;
  padding: 12px 20px; border-radius: 9px; font-size: .87rem;
  box-shadow: 0 4px 18px rgba(0,0,0,.22); z-index: 99999;
  transform: translateY(90px); opacity: 0;
  transition: transform .3s ease, opacity .3s ease;
  max-width: 340px; pointer-events: none; background: var(--ep-blue);
}
#ep-toast.ep-toast-show    { transform: translateY(0); opacity: 1; }
#ep-toast.ep-toast-success { background: var(--ep-green); }
#ep-toast.ep-toast-warning { background: var(--ep-orange); }
#ep-toast.ep-toast-error   { background: var(--ep-red); }

/* =========================================================
   RAPPORT PAGE
   ========================================================= */

/* Contrôles */
.ep-rapport-controls {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px;
  background: #fff; border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius); padding: 16px 20px;
  box-shadow: var(--ep-shadow); margin-bottom: 20px;
}
.ep-rc-group { display: flex; flex-direction: column; gap: 5px; }
.ep-rc-group label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ep-grey); }
.ep-mode-btns { display: flex; gap: 8px; }
.ep-rc-nav    { flex-direction: row; align-items: flex-end; gap: 8px; }
#ep-select-semaine { padding: 8px 12px; border: 1px solid var(--ep-border); border-radius: 6px; font-size: .9rem; min-width: 320px; background: var(--ep-grey-bg); }

/* Titre rapport */
.ep-rapport-titre {
  font-size: 1.15rem; font-weight: 700; color: var(--ep-blue);
  background: var(--ep-blue-pale); border-left: 4px solid var(--ep-blue);
  padding: 10px 18px; border-radius: 0 8px 8px 0;
  margin-bottom: 22px; display: flex; align-items: center; gap: 16px;
}
.ep-rapport-sous-titre { font-size: .8rem; font-weight: 400; color: var(--ep-grey); }

/* Vue semaine */
.ep-rapport-wrap { display: flex; flex-direction: column; gap: 24px; }

/* Bloc jour */
.ep-rapport-jour { }
.ep-rapport-jour-header {
  display: flex; align-items: baseline; gap: 12px;
  padding: 6px 0 8px; border-bottom: 2px solid var(--ep-blue);
  margin-bottom: 12px;
}
.ep-jour-nom  { font-size: 1.1rem; font-weight: 700; color: var(--ep-blue); }
.ep-jour-date { font-size: .85rem; color: var(--ep-grey); }

/* Créneau */
.ep-rapport-creneau {
  background: #fff; border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius); padding: 14px 18px;
  margin-bottom: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.ep-creneau-vide { opacity: .6; }

.ep-cr-header {
  display: flex; align-items: center; gap: 14px; margin-bottom: 10px; flex-wrap: wrap;
}
.ep-cr-heure {
  font-size: .95rem; font-weight: 700; color: var(--ep-blue);
  background: var(--ep-blue-pale); padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.ep-cr-lieu  { font-size: .85rem; color: var(--ep-grey); flex: 1; }
.ep-cr-total {
  font-size: .83rem; font-weight: 600; color: var(--ep-grey);
  background: var(--ep-grey-bg); padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.ep-cr-total-ok { background: var(--ep-green-bg); color: var(--ep-green-dark); }

/* Barres par catégorie */
.ep-cr-cats { display: flex; flex-direction: column; gap: 6px; }
.ep-cat-row {
  display: grid;
  grid-template-columns: 80px 1fr 44px 40px;
  align-items: center; gap: 8px;
}
.ep-cat-label { font-size: .78rem; font-weight: 600; color: var(--ep-blue); text-align: right; }
.ep-cat-bar-wrap {
  background: var(--ep-grey-bg); border-radius: 999px; height: 10px; overflow: hidden;
}
.ep-cat-bar {
  height: 100%; border-radius: 999px; background: var(--ep-blue-light);
  transition: width .4s ease;
  min-width: 2px;
}
.ep-cat-nb  { font-size: .82rem; font-weight: 700; color: var(--ep-blue); text-align: right; }
.ep-cat-pct { font-size: .74rem; color: var(--ep-grey); text-align: right; }

.ep-cr-vide-msg  { font-size: .82rem; color: var(--ep-grey); font-style: italic; margin: 4px 0 0; }
.ep-cr-footnote  { font-size: .72rem; color: var(--ep-grey); margin-top: 8px; border-top: 1px solid var(--ep-border); padding-top: 6px; }

/* Rapport vide */
.ep-rapport-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 200px; color: var(--ep-grey); gap: 10px; text-align: center;
}
.ep-rapport-empty .dashicons { font-size: 3rem; }

/* ── Responsive ── */
@media (max-width: 800px) {
  .ep-filters, .ep-rapport-controls { flex-direction: column; }
  .ep-filter-group select, #ep-select-semaine { min-width: 100%; }
  .ep-stats { gap: 8px; }
  .ep-grid  { grid-template-columns: 1fr 1fr; }
  .ep-cat-row { grid-template-columns: 65px 1fr 36px 34px; }
  .ep-date-info { margin-left: 0; }
}
@media (max-width: 460px) {
  .ep-grid { grid-template-columns: 1fr; }
}
/* Styles spécifiques pour le front-end */
.escrime-presences-front-wrapper,
.escrime-rapport-front-wrapper {
    padding: 20px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Ajustements pour le front */
body:not(.wp-admin) .wrap {
    margin: 0;
    padding: 0;
}

body:not(.wp-admin) .wrap h1 {
    font-size: 28px;
    margin-bottom: 20px;
}

/* === OPTIMISATIONS MOBILE === */

/* Structure de base des filtres */
.ep-filters {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.ep-filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.ep-filter-group {
    flex: 1 1 200px;
    min-width: 0;
}

.ep-filter-group label {
    display: block;
    font-size: 0.875rem;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
}

.ep-filter-group select,
.ep-filter-group input[type="date"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.ep-filters-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.ep-btn-load {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px !important;
    font-size: 14px !important;
}

.ep-date-info {
    font-size: 0.875rem;
    color: #666;
    white-space: nowrap;
}

/* Titre responsive */
.ep-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Barre de recherche mobile */
.ep-search-bar {
    position: relative;
    display: flex;
    align-items: center;
}

#ep-search-nom {
    padding-left: 35px;
    flex: 1;
}

.ep-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}

#ep-btn-clear-search {
    position: absolute;
    right: 10px;
}

/* Stats responsive */
.ep-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

/* === MEDIA QUERIES === */

@media (max-width: 768px) {
    /* Filtres en colonne sur mobile */
    .ep-filters {
        padding: 15px;
    }
    
    .ep-filters-row {
        flex-direction: column;
    }
    
    .ep-filter-group {
        flex: 1 1 100%;
    }
    
    /* Bouton pleine largeur sur mobile */
    .ep-btn-load {
        width: 100%;
        justify-content: center;
    }
    
    .ep-filters-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .ep-date-info {
        text-align: center;
        width: 100%;
        padding: 10px 0;
        border-top: 1px solid #e0e0e0;
        margin-top: 5px;
    }
    
    /* Titre plus petit */
    .ep-title {
        font-size: 1.5rem;
    }
    
    .ep-title-text {
        font-size: 1.2rem;
    }
    
    /* Ajustement placeholder recherche */
    #ep-search-nom {
        font-size: 14px;
    }
    
    #ep-search-nom::placeholder {
        font-size: 13px;
    }
    
    /* Stats en 2 colonnes sur mobile */
    .ep-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ep-stat-card {
        padding: 15px 10px;
    }
    
    .ep-stat-nb {
        font-size: 1.5rem;
    }
    
    .ep-stat-label {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    /* Très petits écrans */
    .ep-wrap {
        padding: 10px;
    }
    
    .ep-filters {
        padding: 12px;
    }
    
    /* Masquer le texte du bouton, garder seulement l'icône */
    .ep-btn-text {
        display: none;
    }
    
    .ep-btn-load {
        padding: 10px 20px !important;
    }
    
    /* Titre encore plus petit */
    .ep-title-text {
        font-size: 1rem;
    }
    
    /* Sélecteurs plus grands pour faciliter le toucher */
    .ep-filter-group select,
    .ep-filter-group input[type="date"] {
        padding: 10px 12px;
        font-size: 16px; /* Évite le zoom sur iOS */
    }
}

/* Amélioration de l'accessibilité tactile */
@media (hover: none) and (pointer: coarse) {
    /* Augmenter les zones de toucher sur les appareils tactiles */
    button, 
    select, 
    input {
        min-height: 44px;
    }
    
    .ep-btn-load {
        min-height: 44px;
        padding: 12px 20px !important;
    }
}

/* Mode paysage mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .ep-filters {
        padding: 10px;
    }
    
    .ep-filters-row {
        flex-direction: row;
    }
    
    .ep-filter-group {
        flex: 1 1 150px;
    }
}

/* =========================================================
   RAPPORT DÉTAILLÉ PAR ADHÉRENT
   ========================================================= */

/* Header du rapport */
.ep-rapport-adh-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    box-shadow: var(--ep-shadow);
}

.ep-rapport-adh-header h2 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--ep-blue);
}

.ep-rapport-adh-count {
    font-size: .95rem;
    color: var(--ep-grey);
}

.ep-rapport-adh-count strong {
    font-size: 1.4rem;
    color: var(--ep-blue);
    margin-right: 3px;
}

/* Loader section */
.ep-loader-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    background: #fff;
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    color: var(--ep-blue);
    font-weight: 600;
}

/* Wrapper du tableau */
.ep-table-wrapper {
    overflow-x: auto;
    background: #fff;
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    box-shadow: var(--ep-shadow);
    margin-bottom: 16px;
}

/* Table principale */
.ep-table-adherents {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
    min-width: 800px;
}

.ep-table-adherents thead {
    background: var(--ep-blue-pale);
    position: sticky;
    top: 0;
    z-index: 10;
}

.ep-table-adherents th {
    padding: 10px 8px;
    text-align: center;
    font-weight: 700;
    color: var(--ep-blue);
    border: 1px solid var(--ep-border);
    font-size: .8rem;
    white-space: nowrap;
}

.ep-th-sticky {
    position: sticky;
    left: 0;
    background: var(--ep-blue-pale);
    z-index: 11;
}

.ep-th-sticky:nth-child(2) {
    left: 180px;
}

/* Colonnes Total sticky juste après Catégorie */
.ep-th-total {
    position: sticky;
    left: calc(180px + 100px); /* Nom (180px) + Catégorie (100px) */
    background: var(--ep-green-bg);
    color: var(--ep-green-dark) !important;
    min-width: 80px;
    z-index: 11;
    border-left: 2px solid var(--ep-border) !important;
}

.ep-th-total-annee {
    position: sticky;
    left: calc(180px + 100px + 80px); /* + Total Semaine (80px) */
    background: var(--ep-orange-bg);
    color: var(--ep-orange) !important;
    min-width: 80px;
    z-index: 11;
    border-left: 2px solid var(--ep-border) !important;
}

/* Dans le rapport annuel, seulement Total Saison */
.ep-table-annee .ep-th-total {
    left: calc(180px + 100px);
}

.ep-th-jour {
    background: var(--ep-blue);
    color: #fff !important;
    font-size: .85rem;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.ep-th-creneau {
    font-size: .75rem;
    line-height: 1.3;
    padding: 6px 4px;
    min-width: 50px;
}

.ep-th-creneau-details {
    font-size: .68rem;
    color: var(--ep-grey);
    font-weight: 400;
    display: block;
}

.ep-th-total {
    background: var(--ep-green-bg);
    color: var(--ep-green-dark);
    min-width: 60px;
}

.ep-th-total-annee {
    background: var(--ep-orange-bg);
    color: var(--ep-orange);
}

/* Lignes du tableau */
.ep-table-adherents tbody tr {
    transition: background .15s;
}

.ep-table-adherents tbody tr:hover:not(.ep-tr-cat-separator) {
    background: var(--ep-grey-bg);
}

.ep-tr-cat-separator {
    background: var(--ep-blue);
}

.ep-td-cat-label {
    padding: 8px 12px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    font-size: .8rem;
    letter-spacing: .08em;
}

.ep-td-nom {
    padding: 10px 12px;
    position: sticky;
    left: 0;
    background: #fff;
    border-right: 2px solid var(--ep-border);
    min-width: 180px;
    z-index: 5;
}

.ep-tr-adherent:hover .ep-td-nom {
    background: var(--ep-grey-bg);
}

.ep-td-nom strong {
    display: block;
    color: var(--ep-blue);
    font-size: .92rem;
}

.ep-td-cat {
    padding: 10px 8px;
    text-align: center;
    font-size: .8rem;
    color: var(--ep-grey);
    border-right: 2px solid var(--ep-border);
    position: sticky;
    left: 180px;
    background: #fff;
    min-width: 100px;
    z-index: 5;
}

.ep-tr-adherent:hover .ep-td-cat {
    background: var(--ep-grey-bg);
}

/* Colonnes Total dans le tbody (sticky) */
.ep-td-total {
    padding: 10px 8px;
    text-align: center;
    font-weight: 700;
    background: var(--ep-green-bg);
    color: var(--ep-green-dark);
    border: 1px solid var(--ep-border);
    font-size: .9rem;
    position: sticky;
    left: calc(180px + 100px);
    min-width: 80px;
    z-index: 5;
    border-left: 2px solid var(--ep-border) !important;
}

.ep-tr-adherent:hover .ep-td-total {
    background: #b8dfc6;
}

.ep-td-total-annee {
    padding: 10px 8px;
    text-align: center;
    font-weight: 700;
    background: var(--ep-orange-bg);
    color: var(--ep-orange);
    border: 1px solid var(--ep-border);
    font-size: .9rem;
    position: sticky;
    left: calc(180px + 100px + 80px);
    min-width: 80px;
    z-index: 5;
    border-left: 2px solid var(--ep-border) !important;
}

.ep-tr-adherent:hover .ep-td-total-annee {
    background: #ffe4b8;
}

/* Dans le rapport annuel, seulement Total Saison */
.ep-table-annee .ep-td-total {
    left: calc(180px + 100px);
}

.ep-td-presence {
    padding: 10px 8px;
    text-align: center;
    border: 1px solid var(--ep-border);
    color: var(--ep-grey);
    font-size: .85rem;
}

.ep-td-presence.ep-present {
    background: var(--ep-green-bg);
    color: var(--ep-green-dark);
    font-weight: 700;
    font-size: 1rem;
}

.ep-td-nb-seances {
    padding: 10px 8px;
    text-align: center;
    border: 1px solid var(--ep-border);
    color: var(--ep-grey);
    font-size: .82rem;
}

.ep-td-nb-seances.ep-has-presence {
    background: var(--ep-blue-pale);
    color: var(--ep-blue);
    font-weight: 700;
}

/* Légende */
.ep-rapport-adh-legend {
    display: flex;
    gap: 20px;
    padding: 12px 16px;
    background: var(--ep-grey-bg);
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    font-size: .82rem;
    color: var(--ep-grey);
}

.ep-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ep-legend-item strong {
    color: var(--ep-blue);
}

/* Responsive pour le tableau */
@media (max-width: 1024px) {
    .ep-table-adherents {
        font-size: .82rem;
    }
    
    .ep-th-creneau {
        font-size: .7rem;
        min-width: 45px;
    }
    
    .ep-td-nom {
        min-width: 150px;
    }
}

@media (max-width: 768px) {
    .ep-rapport-adh-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .ep-rapport-adh-header h2 {
        font-size: 1rem;
    }
    
    .ep-table-wrapper {
        border-radius: 0;
        margin-left: -24px;
        margin-right: -24px;
    }
    
    .ep-table-adherents {
        font-size: .75rem;
    }
    
    .ep-th-creneau {
        font-size: .65rem;
        padding: 4px 2px;
        min-width: 40px;
    }
    
    .ep-td-nom {
        min-width: 130px;
        font-size: .8rem;
    }
    
    .ep-td-nom strong {
        font-size: .85rem;
    }
}

/* =========================================================
   STAGES – Styles spécifiques
   ========================================================= */

/* Bandeau d'annulation */
.ep-stage-annul-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #fff8e1;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 14px 20px;
    margin: 16px 0;
    flex-wrap: wrap;
}
.ep-annul-bar-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 200px;
}
.ep-annul-bar-content .dashicons {
    color: #ff6f00;
    font-size: 22px;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}
.ep-annul-bar-content strong { color: #e65100; }
.ep-annul-bar-info { font-size: .85rem; color: #795548; }
.ep-annul-bar-actions { display: flex; gap: 10px; align-items: center; }

.ep-btn-danger {
    background: #d32f2f !important;
    color: #fff !important;
    border-color: #b71c1c !important;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ep-btn-danger:hover {
    background: #b71c1c !important;
}

/* Listing stage */
.ep-stage-listing {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 16px;
}
.ep-stage-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,.06);
}
.ep-stage-section-secondary {
    opacity: .85;
}
.ep-stage-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 14px 20px;
    font-size: .95rem;
    font-weight: 700;
    border-bottom: 1px solid #e0e0e0;
}
.ep-section-attendus {
    background: #e8f5e9;
    color: #1b5e20;
}
.ep-section-autres {
    background: #f5f5f5;
    color: #555;
}
.ep-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.15);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: .8rem;
    font-weight: 700;
    margin-left: 4px;
}

/* Table stage */
.ep-stage-table-wrap {
    overflow-x: auto;
}
.ep-stage-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}
.ep-stage-table th {
    background: #f9f9f9;
    padding: 10px 14px;
    text-align: left;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #777;
    border-bottom: 2px solid #e0e0e0;
}
.ep-stage-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}
.ep-stage-table tr:last-child td { border-bottom: none; }
.ep-stage-table tr:hover td { background: #fafafa; }

/* Ligne présente */
.ep-stage-tr.ep-stage-present {
    background: #f1fff3;
}
.ep-stage-tr.ep-stage-present:hover td { background: #e8f5e9; }

/* Cellule nom */
.ep-stage-table .ep-td-nom strong { display: block; font-size: .95rem; }
.ep-stage-table .ep-td-nom span   { color: #888; font-size: .85rem; }

/* Badge formule */
.ep-badge-formule {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 700;
}

/* Badge paiement */
.ep-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: .78rem;
    font-weight: 700;
}
.ep-badge-ok   { background: #e8f5e9; color: #2e7d32; }
.ep-badge-warn { background: #fff3e0; color: #e65100; }
.ep-badge-nok  { background: #ffebee; color: #c62828; }
.ep-badge-depassement {
    background: #fff8e1; color: #f57f17;
    border: 1px solid #ffe082;
    display: inline-flex; align-items: center; gap: 3px;
    font-weight: 600; margin-top: 4px;
}
.ep-stage-tr-depassement td.ep-td-paiement { background: #fffde7; }
.ep-btn-suppr-externe {
    background: none; border: none; cursor: pointer;
    color: #bbb; padding: 0 0 0 6px; vertical-align: middle;
    line-height: 1; transition: color .15s;
}
.ep-btn-suppr-externe:hover { color: #e53935; }
.ep-btn-suppr-externe .dashicons { font-size: 15px; width: 15px; height: 15px; }

/* Boutons présence */
.ep-stage-btn-presence {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: .85rem;
    font-weight: 600;
    transition: all .15s;
    border: 2px solid;
}
.ep-btn-absent {
    background: #fff;
    color: #555;
    border-color: #ccc;
}
.ep-btn-absent:hover {
    background: #1b5e20;
    color: #fff;
    border-color: #1b5e20;
}
.ep-btn-present {
    background: #2e7d32;
    color: #fff;
    border-color: #2e7d32;
}
.ep-btn-present:hover {
    background: #c62828;
    border-color: #c62828;
}

@media (max-width: 768px) {
    .ep-stage-annul-bar { flex-direction: column; }
    .ep-stage-table th:nth-child(3),
    .ep-stage-table td:nth-child(3) { display: none; }
}

/* =========================================================
   MODAL – Ajout tireur
   ========================================================= */
.ep-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.ep-modal-box {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,.22);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.ep-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px 14px;
    border-bottom: 1px solid #e0e0e0;
}
.ep-modal-header h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1a237e;
}
.ep-modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #888;
    padding: 4px 8px;
    border-radius: 4px;
    line-height: 1;
    transition: background .15s, color .15s;
}
.ep-modal-close:hover { background: #ffebee; color: #c62828; }

.ep-modal-body { padding: 0 24px 24px; }

/* Onglets */
.ep-modal-tabs {
    display: flex;
    gap: 2px;
    margin: 16px 0 20px;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 4px;
}
.ep-modal-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: .85rem;
    font-weight: 600;
    color: #666;
    transition: all .15s;
}
.ep-modal-tab:hover { background: rgba(255,255,255,.7); color: #333; }
.ep-modal-tab.ep-tab-active {
    background: #fff;
    color: #1a237e;
    box-shadow: 0 1px 4px rgba(0,0,0,.12);
}

/* Champs */
.ep-modal-hint {
    font-size: .85rem;
    color: #777;
    margin: 0 0 14px;
}
.ep-modal-field-group { margin-bottom: 14px; }
.ep-modal-field-group label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
}
.ep-modal-field-group label .required { color: #c62828; }
.ep-modal-input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: .9rem;
    transition: border-color .15s;
    box-sizing: border-box;
}
.ep-modal-input:focus { border-color: #1a237e; outline: none; box-shadow: 0 0 0 2px rgba(26,35,126,.15); }
.ep-modal-select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: .9rem;
    background: #fff;
}

/* Recherche résultats */
.ep-modal-search-wrap { position: relative; margin-bottom: 12px; }
.ep-modal-search-results {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
    z-index: 10;
    max-height: 200px;
    overflow-y: auto;
}
.ep-search-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: .88rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.ep-search-item:last-child { border-bottom: none; }
.ep-search-item:hover { background: #e8eaf6; }
.ep-search-no-result { padding: 12px 14px; color: #888; font-size: .85rem; }

/* Tireur sélectionné */
.ep-modal-selected {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 14px;
    font-size: .9rem;
    font-weight: 600;
    color: #1b5e20;
}
.ep-modal-deselect {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    font-size: .9rem;
    padding: 2px 6px;
    border-radius: 4px;
}
.ep-modal-deselect:hover { background: #ffebee; color: #c62828; }

/* Actions modal */
.ep-modal-actions { margin-top: 16px; }
.ep-modal-btn-confirm {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: .9rem;
    font-weight: 600;
    background: #1a237e !important;
    color: #fff !important;
    border-color: #0d47a1 !important;
    border-radius: 6px;
}
.ep-modal-btn-confirm:hover { background: #0d47a1 !important; }

/* Section ajouts manuels */
.ep-section-ajouts {
    background: #ede7f6;
    color: #4a148c;
}
.ep-stage-section-ajouts { opacity: 1; }
.ep-stage-tr-ajout { background: #fafafa; }

/* Bouton "Ajouter un tireur" */
.ep-stage-ajout-bar {
    margin-top: 16px;
    text-align: center;
}
/* ── Base commune boutons barre d'action stage ── */
.ep-btn-ajout-tireur,
.ep-btn-bilan {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 8px 18px !important;
    font-size: .88rem !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    border-width: 2px !important;
    border-style: solid !important;
    cursor: pointer;
    transition: background .15s, color .15s;
}

/* Ajouter un tireur — contour violet */
.ep-btn-ajout-tireur {
    background: transparent !important;
    border-color: #7b1fa2 !important;
    color: #7b1fa2 !important;
}
.ep-btn-ajout-tireur:hover {
    background: #7b1fa2 !important;
    color: #fff !important;
}

/* =========================================================
   Boutons créneau inline (M / AM / J)
   ========================================================= */
.ep-presence-cell {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
}
.ep-creneau-btn {
    min-width: 34px;
    padding: 4px 8px;
    border: 2px solid #ccc;
    background: #fff;
    border-radius: 5px;
    cursor: pointer;
    font-size: .78rem;
    font-weight: 700;
    color: #666;
    transition: all .12s;
    line-height: 1.4;
}
.ep-creneau-btn:hover {
    border-color: #1b5e20;
    color: #1b5e20;
    background: #f1fff3;
}
.ep-creneau-btn-active {
    background: #2e7d32 !important;
    border-color: #2e7d32 !important;
    color: #fff !important;
}
.ep-creneau-btn-active:hover {
    background: #c62828 !important;
    border-color: #c62828 !important;
    color: #fff !important;
}
.ep-creneau-btn:disabled { opacity: .45; cursor: default; }

/* Picker créneau inline (pour ajouts manuels) */
.ep-inline-picker {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fffde7;
    border: 1px solid #f9a825;
    border-radius: 6px;
    padding: 5px 8px;
    flex-wrap: wrap;
}
.ep-picker-label { font-size: .78rem; color: #777; font-weight: 600; }
.ep-picker-btn {
    padding: 4px 10px;
    border: 1.5px solid #ccc;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: .8rem;
    font-weight: 700;
    transition: all .12s;
}
.ep-picker-btn:hover, .ep-picker-btn-default { background: #1a237e; color: #fff; border-color: #1a237e; }
.ep-picker-btn-default:hover { background: #0d47a1; border-color: #0d47a1; }
.ep-picker-cancel {
    background: none; border: none; cursor: pointer; color: #aaa; font-size: .9rem; padding: 2px 5px;
}
.ep-picker-cancel:hover { color: #c62828; }

/* =========================================================
   ANNULATION COURS (listing)
   ========================================================= */
.ep-cours-annul-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    background: #fff8e1;
    border: 1px solid #ffca28;
    border-radius: 8px;
    padding: 14px 20px;
    margin: 16px 0;
}
.ep-cours-annul-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 200px;
}
.ep-cours-annul-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.ep-btn-annul-creneau,
.ep-btn-annul-journee {
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
    font-weight: 600 !important;
    border-radius: 6px !important;
}
.ep-btn-annul-creneau {
    border-color: #e65100 !important;
    color: #e65100 !important;
}
.ep-btn-annul-creneau:hover {
    background: #e65100 !important;
    color: #fff !important;
}
.ep-btn-annul-journee {
    border-color: #c62828 !important;
    color: #c62828 !important;
}
.ep-btn-annul-journee:hover {
    background: #c62828 !important;
    color: #fff !important;
}
.ep-btn-annul-close {
    background: none !important;
    border: none !important;
    color: #aaa !important;
    font-size: 1rem !important;
    cursor: pointer;
    padding: 4px 8px !important;
}
.ep-btn-annul-close:hover { color: #888 !important; }

.ep-cours-annule-warning {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffebee;
    border: 1px solid #ef9a9a;
    border-radius: 8px;
    padding: 12px 18px;
    margin: 16px 0;
    color: #c62828;
    font-weight: 600;
    font-size: .9rem;
}
.ep-cours-annule-warning .dashicons { color: #c62828; font-size: 1.2rem; }

/* =================================================================
   STAGE v2.x – Réservations demi-journée (pbi_evt_stage_presences)
   ================================================================= */
.ep-creneau-reserved { border-color:#1565c0; background:#e3f2fd; color:#1565c0; }
.ep-creneau-reserved:hover { border-color:#0d47a1; background:#bbdefb; color:#0d47a1; }
.ep-creneau-reserved.ep-creneau-btn-active { background:#2e7d32!important; border-color:#2e7d32!important; color:#fff!important; }
.ep-creneau-extra { border-color:#bdbdbd; background:#fafafa; color:#9e9e9e; font-style:italic; }
.ep-creneau-extra:hover { border-color:#757575; background:#f5f5f5; color:#616161; }
.ep-creneau-extra.ep-creneau-btn-active { background:#e65100!important; border-color:#e65100!important; color:#fff!important; font-style:normal; }
.ep-stage-tr-autre { opacity:.82; }
.ep-stage-tr-no-adh { opacity:.65; background:#fafafa!important; }
.ep-stage-section-autres { margin-top:16px; border:1px dashed #bdbdbd; }
.ep-section-autres { background:#f5f5f5; color:#555; }
.ep-badge-autres { background:rgba(0,0,0,.1); }
.ep-section-subtitle { font-weight:400; font-size:.78rem; color:inherit; opacity:.75; margin-left:auto; }
.ep-empty-section { padding:14px 20px; color:#888; font-style:italic; font-size:.88rem; margin:0; }


/* =========================================================
   BILAN STAGE (v2.5)
   ========================================================= */
/* Bilan du stage — plein bleu marine */
.ep-btn-bilan {
    background: #1a237e !important;
    color: #fff !important;
    border-color: #1a237e !important;
}
.ep-btn-bilan:hover { background: #283593 !important; }

.ep-modal-bilan-box {
    width: 900px !important;
    max-width: 96vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}
.ep-modal-bilan-box .ep-modal-body {
    overflow-y: auto;
    flex: 1;
}

.ep-bilan-header-info {
    margin-bottom: 12px;
    font-size: 15px;
}

.ep-bilan-grille {
    background: #e8eaf6;
    border-left: 4px solid #3f51b5;
    padding: 10px 14px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 13px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.ep-bilan-tarif-chip {
    background: #fff;
    border: 1px solid #9fa8da;
    border-radius: 12px;
    padding: 3px 10px;
    font-size: 12px;
    color: #1a237e;
    white-space: nowrap;
}

.ep-bilan-table thead th { background: #1a237e; color: #fff; }
.ep-bilan-table tfoot tr { background: #f0f0f0; }

.ep-dj-compteur {
    font-size: 12px;
    color: #555;
    display: block;
}
.ep-montant-du {
    font-size: 12px;
    font-weight: 700;
    color: #1a237e;
    display: block;
}

/* Stats bar bilan page */
.ep-bilan-totaux-bar {
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

/* Loader bilan */
.ep-bilan-loader {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 30px;
    color: #666;
    font-size: 15px;
}
