/* ============================================================================
 * refined.css — Feuille de styles globale « affinage & icônes modernes »
 * ----------------------------------------------------------------------------
 * 1. Remplace les glyphes Font Awesome (fas fa-*) par des icônes Lucide
 *    (tracés fins et épurés), sans toucher au balisage existant.
 * 2. Affine l'ensemble de la typographie (réduction des graisses trop lourdes).
 *
 * À inclure dans chaque page APRÈS la feuille Font Awesome.
 * ========================================================================== */

/* ---------------------------------------------------------------------------
 * 1. Police d'icônes Lucide (fichiers locaux)
 * ------------------------------------------------------------------------- */
@font-face {
    font-family: "lucide";
    src: url("../fonts/lucide/lucide.woff2") format("woff2"),
         url("../fonts/lucide/lucide.woff") format("woff");
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

/* Toutes les icônes Font Awesome basculent sur le glyphe Lucide.
 * La neutralisation du font-family Font Awesome garantit l'usage de Lucide. */
.fas,
.far,
.fab,
.fa-solid,
.fa-regular,
.fa {
    font-family: "lucide" !important;
    font-weight: normal !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* L'icône Lucide se dessine sur le pseudo-élément ::before.
 * On neutralise d'éventuels ::before hérités de Font Awesome. */
.fas::before,
.far::before,
.fa-solid::before,
.fa-regular::before,
.fa::before {
    display: inline-block;
    font-family: "lucide" !important;
    font-style: normal;
    font-weight: normal;
    line-height: 1;
}

/* --- Mapping Font Awesome → glyphe Lucide ------------------------------- */

/* Statuts / retours */
.fa-check-circle::before,
.fa-circle-check::before { content: "\e080"; } /* circle-check-big */
.fa-check::before,
.fa-check-check::before { content: "\e070"; } /* check */
.fa-check-square::before,
.fa-square-check::before { content: "\e55e"; } /* square-check */
.fa-info-circle::before,
.fa-circle-info::before { content: "\e0fe"; } /* info */
.fa-exclamation-circle::before,
.fa-circle-exclamation::before { content: "\e07b"; } /* circle-alert */
.fa-exclamation-triangle::before,
.fa-triangle-exclamation::before { content: "\e193"; } /* triangle-alert */
.fa-exclamation::before { content: "\e07b"; } /* circle-alert */
.fa-times-circle::before,
.fa-circle-xmark::before { content: "\e088"; } /* circle-x */
.fa-times::before,
.fa-xmark::before { content: "\e1b2"; } /* x */
.fa-circle::before { content: "\e07a"; } /* circle */
.fa-circle-dot::before,
.fa-dot-circle::before { content: "\e349"; } /* circle-dot */
.fa-ban::before { content: "\e055"; } /* ban */

/* Navigation / flèches */
.fa-arrow-left::before,
.fa-arrow-left-long::before { content: "\e04c"; } /* arrow-left */
.fa-arrow-right::before { content: "\e04d"; } /* arrow-right */
.fa-chevron-down::before { content: "\e071"; } /* chevron-down */
.fa-chevron-up::before { content: "\e074"; } /* chevron-up */
.fa-chevron-left::before { content: "\e072"; } /* chevron-left */
.fa-chevron-right::before { content: "\e073"; } /* chevron-right */
.fa-forward::before { content: "\e164"; } /* skip-forward */
.fa-external-link-alt::before,
.fa-external-link::before { content: "\e0bd"; } /* external-link */
.fa-move-right::before,
.fa-arrow-right-to-bracket::before { content: "\e495"; } /* move-right */

/* Actions / fichiers */
.fa-eye::before { content: "\e0be"; } /* eye */
.fa-eye-slash::before { content: "\e0bf"; } /* eye-off */
.fa-edit::before,
.fa-pen-to-square::before,
.fa-edit-square::before { content: "\e176"; } /* square-pen */
.fa-trash::before { content: "\e18d"; } /* trash */
.fa-trash-alt::before,
.fa-trash-can::before { content: "\e18e"; } /* trash-2 */
.fa-print::before,
.fa-print-outline::before { content: "\e145"; } /* printer */
.fa-plus::before { content: "\e141"; } /* plus */
.fa-plus-circle::before,
.fa-circle-plus::before { content: "\e086"; } /* circle-plus */
.fa-save::before,
.fa-floppy-disk::before { content: "\e151"; } /* save */
.fa-redo::before,
.fa-rotate-right::before { content: "\e147"; } /* redo */
.fa-rotate::before,
.fa-rotate-left::before,
.fa-rotate-ccw::before,
.fa-clock-rotate-left::before { content: "\e14c"; } /* rotate-ccw */
.fa-download::before { content: "\e0b6"; } /* download */
.fa-file-upload::before,
.fa-file-up::before { content: "\e32b"; } /* file-up */
.fa-file-archive::before { content: "\e30d"; } /* file-archive */
.fa-file-code::before { content: "\e0c7"; } /* file-code */
.fa-file-signature::before,
.fa-file-pen::before,
.fa-file-invoice::before,
.fa-file-lines::before,
.fa-file-alt::before { content: "\e0d0"; } /* file-text */
.fa-folder::before,
.fa-folder-open::before { content: "\e0dc"; } /* folder */
.fa-paperclip::before { content: "\e131"; } /* paperclip */
.fa-paper-plane::before,
.fa-paper-plane-top::before { content: "\e156"; } /* send */
.fa-send::before { content: "\e156"; } /* send */

/* Média / lecture */
.fa-play::before { content: "\e140"; } /* play */
.fa-play-circle::before,
.fa-circle-play::before { content: "\e085"; } /* circle-play */
.fa-pause::before { content: "\e132"; } /* pause */
.fa-pause-circle::before,
.fa-circle-pause::before { content: "\e084"; } /* circle-pause */
.fa-spinner::before,
.fa-spin::before { content: "\e10e"; } /* loader-circle */
.fa-camera::before { content: "\e068"; } /* camera */
.fa-image::before { content: "\e0f9"; } /* image */

/* Personnes / identité */
.fa-user::before,
.fa-user-alt::before { content: "\e19f"; } /* user */
.fa-user-tag::before { content: "\e46a"; } /* square-user */
.fa-users::before,
.fa-user-friends::before { content: "\e1a4"; } /* users */
.fa-users-cog::before,
.fa-user-gear::before { content: "\e473"; } /* users-round */
.fa-venus-mars::before,
.fa-user-plus::before,
.fa-circle-user::before { content: "\e0a0"; } /* contact */
.fa-id-card::before,
.fa-address-card::before { content: "\e61c"; } /* id-card */
.fa-address-book::before { content: "\e0a0"; } /* contact */
.fa-passport::before { content: "\e61c"; } /* id-card */
.fa-headset::before { content: "\e5c2"; } /* headset */
.fa-power-off::before,
.fa-power::before { content: "\e209"; } /* power-off */
.fa-key::before { content: "\e102"; } /* key */
.fa-lock::before { content: "\e10f"; } /* lock */
.fa-shield-check::before { content: "\e1ff"; } /* shield-check */
.fa-shield-alt::before,
.fa-shield-halved::before,
.fa-shield::before { content: "\e15c"; } /* shield */

/* Données / thèmes */
.fa-server::before { content: "\e157"; } /* server */
.fa-database::before { content: "\e0b1"; } /* database */
.fa-book::before { content: "\e062"; } /* book */
.fa-book-open::before { content: "\e063"; } /* book-open */
.fa-clipboard-list::before { content: "\e08a"; } /* clipboard-list */
.fa-tasks::before,
.fa-list-check::before,
.fa-check-double::before { content: "\e1d0"; } /* list-checks */
.fa-list::before { content: "\e10c"; } /* list */
.fa-filter::before { content: "\e0d5"; } /* filter */
.fa-sliders-h::before,
.fa-sliders::before { content: "\e29a"; } /* sliders-horizontal */
.fa-search::before { content: "\e155"; } /* search */
.fa-inbox::before { content: "\e0fa"; } /* inbox */
.fa-globe::before { content: "\e0eb"; } /* globe */
.fa-map-marker-alt::before,
.fa-location-dot::before { content: "\e115"; } /* map-pin */
.fa-flag::before { content: "\e0d6"; } /* flag */
.fa-home::before,
.fa-house::before { content: "\e0f8"; } /* house */
.fa-tachometer-alt::before,
.fa-gauge::before { content: "\e1bf"; } /* gauge */
.fa-gauge-high::before { content: "\e1bf"; } /* gauge */
.fa-building::before { content: "\e1cc"; } /* building */
.fa-warehouse::before,
.fa-layer-group::before,
.fa-layers::before { content: "\e104"; } /* layers */
.fa-history::before { content: "\e1f5"; } /* history */
.fa-clock::before,
.fa-hourglass-end::before,
.fa-hourglass-half::before,
.fa-hourglass::before { content: "\e08b"; } /* clock */
.fa-wrench::before { content: "\e1b1"; } /* wrench */
.fa-cog::before,
.fa-gear::before,
.fa-cogs::before { content: "\e158"; } /* settings */
.fa-broom::before { content: "\e49a"; } /* spray-can */
.fa-copyright::before { content: "\e0a4"; } /* copyright */
.fa-clipboard::before { content: "\e089"; } /* clipboard */
.fa-power-off::before { content: "\e209"; } /* power-off */

/* Communication */
.fa-envelope::before,
.fa-envelope-open::before { content: "\e113"; } /* mail */
.fa-phone::before { content: "\e137"; } /* phone */
.fa-phone-alt::before,
.fa-phone-call::before { content: "\e138"; } /* phone-call */

/* Dates */
.fa-calendar::before,
.fa-calendar-alt::before { content: "\e067"; } /* calendar */
.fa-calendar-check::before { content: "\e2b7"; } /* calendar-check */
.fa-calendar-plus::before { content: "\e2bc"; } /* calendar-plus */
.fa-calendar-days::before { content: "\e2b9"; } /* calendar-days */
.fa-calendar-day::before,
.fa-calendar-week::before,
.fa-calendar-1::before { content: "\e635"; } /* calendar-1 */

/* Graphiques */
.fa-chart-line::before,
.fa-line-chart::before { content: "\e2a5"; } /* chart-line */
.fa-chart-area::before,
.fa-area-chart::before { content: "\e4d8"; } /* chart-area */
.fa-chart-column::before,
.fa-chart-bar::before,
.fa-bar-chart::before { content: "\e2a3"; } /* chart-column */

/* Divers */
.fa-toggle-left::before { content: "\e18b"; } /* toggle-left */
.fa-toggle-right::before { content: "\e18c"; } /* toggle-right */
.fa-sign-out-alt::before,
.fa-right-from-bracket::before { content: "\e112"; } /* log-out */
.fa-sign-in-alt::before,
.fa-right-to-bracket::before { content: "\e111"; } /* log-in */

/* Bornage des tailles : les utilitaires Font Awesome de taille (fa-lg, fa-2x…)
 * ne s'appliquent plus aux glyphes Lucide, mais la propriété font-size héritée
 * des classes Tailwind (text-lg, text-xl…) reste gérée. On rétablit simplement
 * la hauteur des icônes inline pour un rendu net. */
.fas[class*="fa-"],
.far[class*="fa-"],
.fa-solid[class*="fa-"] {
    vertical-align: -0.125em;
}

/* ---------------------------------------------------------------------------
 * 2. Affinage typographique global
 * ------------------------------------------------------------------------- */

/* Réduction des graisses trop lourdes : on ramène les niveaux 700/800/900 à
 * une graisse plus élégante et institutionnelle (500/600). */
.font-bold { font-weight: 600 !important; }
.font-semibold { font-weight: 500 !important; }
.font-medium { font-weight: 500 !important; }
.font-extrabold,
.font-black { font-weight: 600 !important; }

/* --- Titres : taille ramenée d'un cran + graisse affinée + interlignage aéré -- */
h1 { letter-spacing: -0.015em; }

h1.font-bold,
h1.font-semibold { font-weight: 600 !important; }
h2.font-bold,
h2.font-semibold { font-weight: 600 !important; }

/* Titre de page (h1) : 3xl → 2xl, xl → lg pour un rendu plus posé et épuré */
h1.text-3xl { font-size: 1.5rem !important; line-height: 2rem !important; }
h1.text-2xl { font-size: 1.375rem !important; line-height: 1.85rem !important; }
h1.text-xl  { font-size: 1.15rem !important; }
h2.text-xl  { font-size: 1.1rem !important; line-height: 1.6rem !important; }
h2.text-2xl { font-size: 1.3rem !important; line-height: 1.8rem !important; }
h3.text-xl  { font-size: 1.05rem !important; }
h3.text-2xl { font-size: 1.2rem !important; }

/* Interlettrage des titres par défaut plus serré/élégant (tracking-tight) */
h1.tracking-tight,
h2.tracking-tight { letter-spacing: -0.02em; }

/* --- Tableaux : en-têtes et cellules affinés --------------------------------- */
/* En-têtes (thead th) : graisse moyenne, pas bold, tracking mesuré. */
thead th { font-weight: 500 !important; letter-spacing: 0.04em; }
th { font-weight: 500; }

/* En-têtes sur fond sombre (registre : bg-slate-800) : on adoucit le blanc pur
 * pour une lecture plus douce. */
thead.bg-slate-800 th,
thead.bg-slate-800 { color: rgba(255, 255, 255, 0.88); }

/* Cellules de tableau : graisses légères pour alléger le rendu des listes. */
tbody td.font-medium { font-weight: 400 !important; }
tbody td .font-bold { font-weight: 500 !important; }

/* La colonne ID (souvent font-medium) reste distinctive mais affinée. */
td.font-medium.text-gray-900 { font-weight: 500 !important; }

/* --- Labels en majuscules : affinés partout -------------------------------- */
.uppercase.font-bold,
.uppercase.font-semibold { font-weight: 500 !important; }

/* Le letter-spacing généreux des UPPERCASE est légèrement adouci. */
.tracking-widest { letter-spacing: 0.08em !important; }
.tracking-wider  { letter-spacing: 0.05em !important; }

/* --- Navbar / bandeaux : graisses allégées --------------------------------- */
/* Liens de navigation (uppercase tracking-widest) → medium, plus fin. */
nav .font-bold,
nav .font-black { font-weight: 500 !important; }

/* Bandeau de sécurité en bas de page : lettres légèrement moins grasses. */
footer .font-bold { font-weight: 500 !important; }

/* --- Boutons : texte en graisse moyenne (au lieu de bold/black) ------------ */
button.font-bold,
button.font-black,
a.font-bold.rounded-lg,
a.font-black { font-weight: 500 !important; }

/* Boutons portant une classe de graisse via Tailwind typique */
button[class*="font-bold"],
a[class*="rounded"][class*="font-bold"] { font-weight: 500 !important; }

/* --- Finesse générale du texte courant ------------------------------------- */
/* Adoucit le rendu des paragraphes et descriptions (souvent trop contrastés). */
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* Descriptions sous les titres : plus légères et discrètes. */
h1 + p.text-sm,
h1 ~ p.text-slate-500 { font-weight: 400; color: #94a3b8; }
