/* ═══════════════════════════════════════════════════════════════════════════
   Habillement Pompiers v3 — Public CSS
   Conçu pour résister aux surcharges de thème WordPress.
   Toutes les couleurs sont codées en valeurs hex directes.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Conteneur principal ─────────────────────────────────────────────────── */
.hab-espace {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    color: #2d3748 !important;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 16px 48px;
    box-sizing: border-box;
}
.hab-espace * { box-sizing: border-box; }

/* ── Accès refusé ─────────────────────────────────────────────────────────── */
.hab-access-denied {
    text-align: center;
    padding: 64px 24px;
    background: #f8f9fb;
    border-radius: 10px;
    border: 2px dashed #dde1e9;
}
.hab-access-denied p { color: #718096 !important; font-size: 1.05rem; margin-bottom: 20px; }

/* ── Header ───────────────────────────────────────────────────────────────── */
.hab-header {
    background: #1c1c2e !important;
    border-radius: 10px;
    padding: 22px 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.hab-header-left   { display: flex; align-items: center; gap: 14px; }
.hab-header-icon   { width: 44px; height: 44px; background: #c0392b; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.hab-header-title  { font-size: 1.2rem; font-weight: 700; color: #fff !important; margin: 0; letter-spacing: .01em; }
.hab-header-sub    { font-size: .78rem; color: rgba(255,255,255,.5) !important; margin-top: 2px; }
.hab-header-user   { background: rgba(255,255,255,.1); border-radius: 6px; padding: 8px 14px; text-align: right; }
.hab-header-user strong { display: block; color: #fff !important; font-size: .88rem; }
.hab-header-user span   { color: rgba(255,255,255,.55) !important; font-size: .75rem; }

/* ── Navigation onglets ───────────────────────────────────────────────────── */
.hab-tabs {
    display: flex;
    gap: 4px;
    background: #f8f9fb;
    border-radius: 10px;
    padding: 5px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}
.hab-tab {
    flex: 1;
    min-width: 110px;
    padding: 9px 12px;
    border: none !important;
    background: transparent !important;
    border-radius: 7px;
    font-family: inherit;
    font-size: .82rem;
    font-weight: 600;
    color: #718096 !important;
    cursor: pointer;
    transition: all .18s;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    -webkit-appearance: none;
    appearance: none;
}
.hab-tab:hover  { color: #2d3748 !important; background: rgba(0,0,0,.04) !important; }
.hab-tab.active { background: #fff !important; color: #c0392b !important; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.hab-tab .hab-badge-cnt { background: #c0392b; color: #fff !important; border-radius: 10px; font-size: .65rem; padding: 1px 6px; font-weight: 700; }

/* ── Panneaux ────────────────────────────────────────────────────────────── */
.hab-panel         { display: none; }
.hab-panel.active  { display: block; }

/* ── Cartes ──────────────────────────────────────────────────────────────── */
.hab-card {
    background: #fff;
    border: 1px solid #dde1e9;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.hab-card-head {
    padding: 12px 18px;
    background: #f8f9fb;
    border-bottom: 1px solid #dde1e9;
    font-weight: 700;
    font-size: .875rem;
    color: #2d3748 !important;
    display: flex;
    align-items: center;
    gap: 8px;
}
.hab-card-body { padding: 18px; }

/* ── Stats mini (gestionnaire) ───────────────────────────────────────────── */
.hab-stats-mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-bottom: 20px; }
.hab-stat-mini  { background: #fff; border: 1px solid #dde1e9; border-radius: 8px; padding: 14px 12px; text-align: center; }
.hab-stat-mini-num   { font-size: 1.8rem; font-weight: 800; color: #c0392b !important; line-height: 1; }
.hab-stat-mini-label { font-size: .68rem; color: #718096 !important; margin-top: 4px; text-transform: uppercase; letter-spacing: .05em; }

/* ── Formulaires ─────────────────────────────────────────────────────────── */
.hab-form-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hab-form-full  { grid-column: 1 / -1; }
@media (max-width: 600px) { .hab-form-grid { grid-template-columns: 1fr; } }

.hab-label { display: block; font-weight: 600 !important; font-size: .82rem; color: #2d3748 !important; margin-bottom: 5px; }

.hab-input,
.hab-select,
.hab-textarea {
    width: 100% !important;
    padding: 8px 12px !important;
    border: 1.5px solid #dde1e9 !important;
    border-radius: 6px !important;
    font-family: inherit !important;
    font-size: .875rem !important;
    color: #2d3748 !important;
    background: #fff !important;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none;
    appearance: none;
}
.hab-input:focus,
.hab-select:focus,
.hab-textarea:focus {
    border-color: #c0392b !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(192,57,43,.12) !important;
}
.hab-textarea { min-height: 80px; resize: vertical; }
.hab-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23718096' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 12px !important;
    padding-right: 32px !important;
}

/* ── Boutons ─────────────────────────────────────────────────────────────── */
.hab-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 9px 18px !important;
    border: none !important;
    border-radius: 7px !important;
    font-family: inherit !important;
    font-size: .855rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    text-decoration: none !important;
    transition: all .15s !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    line-height: 1.2 !important;
}
.hab-btn:disabled { opacity: .5 !important; cursor: not-allowed !important; }
.hab-btn-primary   { background: #c0392b !important; color: #fff !important; }
.hab-btn-primary:hover:not(:disabled)  { background: #96281b !important; }
.hab-btn-secondary { background: #f8f9fb !important; color: #2d3748 !important; border: 1.5px solid #dde1e9 !important; }
.hab-btn-secondary:hover:not(:disabled){ background: #eef0f5 !important; }
.hab-btn-success   { background: #27ae60 !important; color: #fff !important; }
.hab-btn-sm        { padding: 6px 12px !important; font-size: .78rem !important; }

/* ── Sélecteur de tailles (label + radio) ────────────────────────────────── */
.hab-taille-grid  { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.hab-taille-label {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 5px 13px !important;
    border: 2px solid #dde1e9 !important;
    border-radius: 6px !important;
    background: #fff !important;
    color: #2d3748 !important;
    font-size: .8rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all .15s !important;
    user-select: none;
    -webkit-appearance: none !important;
}
.hab-taille-label:hover    { border-color: #c0392b !important; color: #c0392b !important; }
.hab-taille-label.selected { border-color: #c0392b !important; background: #fdf2f1 !important; color: #c0392b !important; }
.hab-taille-radio          { display: none !important; }
input.hab-taille-hidden    { display: none !important; }

/* ── Tableaux ─────────────────────────────────────────────────────────────── */
.hab-table-wrap  { overflow-x: auto; }
.hab-table       { width: 100%; border-collapse: collapse; font-size: .845rem; }
.hab-table thead th {
    padding: 9px 12px;
    background: #f8f9fb;
    font-size: .70rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #718096 !important;
    border-bottom: 2px solid #dde1e9;
    text-align: left;
}
.hab-table tbody td    { padding: 10px 12px; border-bottom: 1px solid #dde1e9; vertical-align: middle; color: #2d3748 !important; }
.hab-table tbody tr:last-child td { border-bottom: none; }
.hab-table tbody tr:hover td { background: #f8f9fb; }
.hab-table-empty { text-align: center; color: #718096 !important; padding: 36px; font-size: .875rem; }

/* ── Badges statut ────────────────────────────────────────────────────────── */
.hab-badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 20px; font-size: .70rem; font-weight: 700; }
.hab-badge-en_attente  { background: #fff3cd; color: #856404 !important; }
.hab-badge-en_cours    { background: #cfe2ff; color: #084298 !important; }
.hab-badge-validee     { background: #d1f0e0; color: #0f5132 !important; }
.hab-badge-termine,
.hab-badge-livree      { background: #d1f0e0; color: #0f5132 !important; }
.hab-badge-annule,
.hab-badge-refusee     { background: #f8d7da; color: #842029 !important; }
.hab-badge-rendu       { background: #d1f0e0; color: #0f5132 !important; }

/* ── Filtres chips ────────────────────────────────────────────────────────── */
.hab-filter-row   { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 14px; }
.hab-filter-chip  {
    display: inline-flex !important;
    align-items: center !important;
    padding: 5px 14px !important;
    border-radius: 20px !important;
    border: 1.5px solid #dde1e9 !important;
    background: #fff !important;
    color: #2d3748 !important;
    font-size: .78rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all .15s !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}
.hab-filter-chip:hover,
.hab-filter-chip.active { border-color: #c0392b !important; color: #c0392b !important; background: #fdf2f1 !important; }

/* ── Prêt de tenue (bloc dans formulaire lavage) ─────────────────────────── */
.hab-pret-block {
    background: #f8f9fb;
    border: 1px solid #dde1e9;
    border-radius: 8px;
    padding: 14px;
    margin-top: 14px;
}
.hab-pret-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: .85rem;
    color: #2d3748 !important;
}
.hab-pret-toggle input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    accent-color: #c0392b;
    flex-shrink: 0;
}

/* ── Historique timeline ──────────────────────────────────────────────────── */
.hab-timeline { list-style: none; margin: 0; padding: 0; }
.hab-timeline li { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid #dde1e9; align-items: flex-start; }
.hab-timeline li:last-child { border-bottom: none; }
.hab-timeline-dot { width: 8px; height: 8px; border-radius: 50%; background: #c0392b; margin-top: 6px; flex-shrink: 0; }
.hab-timeline-text { font-size: .845rem; color: #2d3748 !important; flex: 1; }
.hab-timeline-meta { font-size: .72rem; color: #718096 !important; margin-top: 2px; }

/* ── Modale statut (front-end gestionnaire) ───────────────────────────────── */
.hab-pub-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 9998;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.hab-pub-modal-overlay.is-open { display: flex; }
.hab-pub-modal {
    background: #fff;
    border-radius: 10px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    overflow: hidden;
}
.hab-pub-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-bottom: 1px solid #dde1e9; }
.hab-pub-modal-header h3 { margin: 0; font-size: .95rem; font-weight: 700; color: #1c1c2e !important; }
.hab-pub-modal-close { background: none !important; border: none !important; font-size: 1.2rem; cursor: pointer !important; color: #718096 !important; padding: 4px; }
.hab-pub-modal-close:hover { color: #c0392b !important; }
.hab-pub-modal-body   { padding: 20px 22px; }
.hab-pub-modal-footer { padding: 14px 22px; border-top: 1px solid #dde1e9; display: flex; gap: 8px; justify-content: flex-end; }

/* ── Toast ────────────────────────────────────────────────────────────────── */
#hab-pub-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 13px 20px;
    border-radius: 8px;
    font-family: inherit;
    font-size: .875rem;
    font-weight: 600;
    z-index: 99999;
    display: none;
    box-shadow: 0 8px 30px rgba(0,0,0,.2);
    max-width: 320px;
    pointer-events: none;
}
#hab-pub-toast.success { background: #27ae60; color: #fff !important; }
#hab-pub-toast.error   { background: #c0392b; color: #fff !important; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 540px) {
    .hab-tabs { gap: 3px; }
    .hab-tab  { min-width: 80px; font-size: .75rem; padding: 8px 8px; }
    .hab-header { padding: 16px; }
    .hab-card-body { padding: 14px; }
}
