/* =========================================================
 * utilities.css — Classes utilitaires CSP-safe
 * Chargé après style.css (public) et admin-v2.css (admin).
 * Convention : préfixe .u-* cohérent avec style.css existant.
 * ========================================================= */

/* === Widths — barres % par pas de 5 (21 classes) === */
.u-w-0   { width: 0; }
.u-w-5   { width: 5%; }
.u-w-10  { width: 10%; }
.u-w-15  { width: 15%; }
.u-w-20  { width: 20%; }
.u-w-25  { width: 25%; }
.u-w-30  { width: 30%; }
.u-w-35  { width: 35%; }
.u-w-40  { width: 40%; }
.u-w-45  { width: 45%; }
.u-w-50  { width: 50%; }
.u-w-55  { width: 55%; }
.u-w-60  { width: 60%; }
.u-w-65  { width: 65%; }
.u-w-70  { width: 70%; }
.u-w-75  { width: 75%; }
.u-w-80  { width: 80%; }
.u-w-85  { width: 85%; }
.u-w-90  { width: 90%; }
.u-w-95  { width: 95%; }
.u-w-100 { width: 100%; }

/* === Display === */
.u-d-none     { display: none !important; }
.u-d-inline   { display: inline; }
.u-d-flex     { display: flex; }
.u-d-contents { display: contents; }

/* === Margins fixes === */
.u-m-0  { margin: 0; }
.u-mt-0 { margin-top: 0; }
.u-mt-8 { margin-top: 8px; }
.u-mb-2 { margin-bottom: 2px; }

/* === Spacings — tokens TCN admin (--tcn-sp-*) === */
.u-mt-sp-1 { margin-top: var(--tcn-sp-1); }
.u-mt-sp-2 { margin-top: var(--tcn-sp-2); }
.u-mt-sp-3 { margin-top: var(--tcn-sp-3); }
.u-mt-sp-6 { margin-top: var(--tcn-sp-6); }
.u-mb-sp-3 { margin-bottom: var(--tcn-sp-3); }
.u-mb-sp-4 { margin-bottom: var(--tcn-sp-4); }

/* === Spacings — tokens public (--spacing-*) === */
.u-ml-sp4-pub { margin-left: var(--spacing-4); }
.u-mb-sp6-pub { margin-bottom: var(--spacing-6); }

/* === Typographie === */
.u-fs-12          { font-size: 12px; }
.u-fs-13          { font-size: 13px; }
.u-fs-18          { font-size: 18px; }
.u-fs-em-55       { font-size: 0.55em; }
.u-fs-em-60       { font-size: 0.6em; }
.u-fs-em-55-faded { font-size: 0.55em; opacity: 0.7; }

/* === Couleurs === */
.u-text-danger    { color: var(--tcn-danger); }
.u-text-muted     { color: var(--tcn-text-muted); }
.u-text-soft      { color: var(--tcn-text-soft); }
.u-text-gray-400  { color: var(--color-gray-400); }

/* === Bordures === */
.u-border-top-0 { border-top: 0; }

/* === Position === */
.u-pos-relative { position: relative; }

/* === SVG sprite container (listing-icons.php) === */
.u-svg-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* === Min-height === */
.u-min-h-700 { min-height: 700px; }

/* === Fix listing.js : body.has-modal-open n'avait pas de règle CSS === */
body.has-modal-open { overflow: hidden; }

/* === Preview banner mode aperçu (logement.php) === */
.u-preview-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #fbbf24;
    color: #1f2937;
    padding: 8px 16px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    font-family: system-ui, sans-serif;
}
