feat: implémentation complète du système Célestopol 1922 pour FoundryVTT v13

- DataModels (character, npc, anomaly, aspect, attribute, equipment)
- ApplicationV2 sheets (character 5 tabs, npc 3 tabs, 4 item sheets)
- DialogV2 pour les jets de dés avec phase de lune
- Templates Handlebars complets (fiches PJ/PNJ, items, jet, chat)
- Styles LESS → CSS compilé (thème vert foncé / orange CopaseticNF)
- i18n fr.json complet (clés CELESTOPOL.*)
- Point d'entrée fvtt-celestopol.mjs avec hooks init/ready
- Assets : polices CopaseticNF, images UI, icônes items
- Mise à jour copilot-instructions.md avec l'architecture réelle

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-03-28 09:28:34 +01:00
parent 446f9b7500
commit 64e23271df
54 changed files with 3433 additions and 4 deletions

241
styles/character.less Normal file
View File

@@ -0,0 +1,241 @@
@import "mixins";
// ─── Character sheet specifics ───────────────────────────────────────────────
.celestopol.character-sheet {
// Attributs perso (Entregent, Fortune, Rêve, Vision)
.perso-attributs {
display: flex;
gap: 8px;
flex-wrap: wrap;
margin-top: 4px;
.perso-attr {
display: flex;
flex-direction: column;
align-items: center;
background: rgba(0,0,0,0.25);
border: 1px solid var(--cel-orange);
border-radius: 4px;
padding: 4px 8px;
min-width: 60px;
label {
font-size: 0.6em;
text-transform: uppercase;
color: var(--cel-orange-light);
}
.attr-display, .attr-val, .attr-max {
color: var(--cel-orange);
font-family: var(--cel-font-title);
font-size: 1em;
font-weight: bold;
}
input.attr-val, input.attr-max {
width: 28px;
text-align: center;
background: transparent;
border: none;
border-bottom: 1px solid var(--cel-orange-light);
color: var(--cel-orange);
}
}
}
// Stats × Compétences grid
.stats-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 12px;
padding: 8px 0;
.stat-block {
border: 1px solid var(--cel-border);
border-radius: 4px;
overflow: hidden;
.stat-header {
background: var(--cel-green);
color: var(--cel-orange);
display: flex;
justify-content: space-between;
align-items: center;
padding: 4px 8px;
.stat-name {
font-family: var(--cel-font-title);
font-weight: bold;
font-size: 1em;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.stat-res {
display: flex;
align-items: center;
gap: 4px;
font-size: 0.8em;
label { color: var(--cel-orange-light); }
input[type="number"] { width: 30px; .cel-input-std(); }
.stat-res-value {
font-size: 1.3em;
font-weight: bold;
min-width: 24px;
text-align: center;
}
}
}
.skills-list {
background: var(--cel-cream);
.skill-row {
display: flex;
align-items: center;
justify-content: space-between;
padding: 3px 8px;
border-bottom: 1px solid rgba(139,115,85,0.2);
font-size: 0.85em;
&.rollable { .cel-rollable(); }
.skill-name { flex: 1; }
.skill-value {
font-weight: bold;
min-width: 24px;
text-align: center;
color: var(--cel-green);
}
.skill-value-input {
width: 36px;
.cel-input-std();
text-align: center;
}
}
}
}
}
// Items (anomalies, aspects, attributs)
.items-section {
display: flex;
flex-direction: column;
gap: 8px;
padding: 8px 0;
.items-group {
.items-header {
.cel-section-header();
display: flex;
justify-content: space-between;
align-items: center;
a { color: var(--cel-orange); cursor: pointer; }
}
.item-row { .cel-item-row(); }
}
}
// Tracks (Blessures, Destin, Spleen)
.track-section {
border: 1px solid var(--cel-border);
border-radius: 4px;
margin-bottom: 12px;
overflow: hidden;
.track-header {
background: var(--cel-green);
color: var(--cel-orange);
display: flex;
justify-content: space-between;
align-items: center;
padding: 4px 8px;
.track-title {
font-family: var(--cel-font-title);
font-weight: bold;
text-transform: uppercase;
font-size: 0.9em;
}
}
.track-boxes {
display: flex;
padding: 8px;
gap: 8px;
flex-wrap: wrap;
background: var(--cel-cream);
.track-box {
display: flex;
flex-direction: column;
align-items: center;
gap: 2px;
input[type="checkbox"] { .cel-box(); }
.box-label {
font-size: 0.65em;
color: var(--cel-border);
}
&.checked input[type="checkbox"] {
accent-color: var(--cel-orange);
}
}
}
.track-level {
display: flex;
align-items: center;
gap: 6px;
padding: 4px 8px;
background: rgba(139,115,85,0.1);
font-size: 0.85em;
label { color: var(--cel-border); }
input[type="number"] { width: 40px; .cel-input-std(); }
}
}
// Factions table
.factions-table {
width: 100%;
border-collapse: collapse;
font-size: 0.9em;
thead tr {
background: var(--cel-green);
color: var(--cel-orange);
th { padding: 4px 8px; font-family: var(--cel-font-title); }
}
.faction-row {
&:nth-child(odd) td { background: rgba(139,115,85,0.08); }
td { padding: 4px 8px; border-bottom: 1px solid rgba(139,115,85,0.2); }
&.custom td { font-style: italic; color: #666; }
.faction-value input[type="number"] {
width: 50px;
.cel-input-std();
text-align: center;
}
}
}
// Biography / Equipment
.equipments-section {
margin-bottom: 12px;
.section-header { .cel-section-header(); display: flex; justify-content: space-between; }
.item-row { .cel-item-row(); }
.item-qty { font-size: 0.8em; color: var(--cel-border); }
}
.biography-section, .notes-section {
margin-bottom: 12px;
.section-header { .cel-section-header(); }
.enriched-html { font-size: 0.9em; line-height: 1.6; }
}
}

13
styles/fonts.less Normal file
View File

@@ -0,0 +1,13 @@
@font-face {
font-family: "CopaseticNF";
src: url("../assets/fonts/CopaseticNF.otf") format("opentype");
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: "CopaseticNF";
src: url("../assets/fonts/CopaseticNF-Bold.otf") format("opentype");
font-weight: bold;
font-style: normal;
}

View File

@@ -0,0 +1,10 @@
// ─── Master LESS file for fvtt-celestopol ────────────────────────────────────
// Compilation : gulp css → css/fvtt-celestopol.css
@import "fonts";
@import "mixins";
@import "global";
@import "character";
@import "npc";
@import "items";
@import "roll";

158
styles/global.less Normal file
View File

@@ -0,0 +1,158 @@
// ─── Variables CSS (couleurs + typo) ────────────────────────────────────────
:root {
--cel-green: rgb(12, 76, 12);
--cel-green-light: rgb(20, 110, 20);
--cel-green-dark: rgb(6, 40, 6);
--cel-orange: #e07b00;
--cel-orange-light: #f0a040;
--cel-cream: #f5f0e8;
--cel-border: #8b7355;
--cel-shadow: rgba(0,0,0,0.4);
--cel-font-title: "CopaseticNF", "Palatino Linotype", serif;
--cel-font-body: "Palatino Linotype", "Book Antiqua", Palatino, serif;
--cel-font-ui: "Signika", "Palatino Linotype", sans-serif;
}
// ─── Sheet base layout ───────────────────────────────────────────────────────
.celestopol {
&.sheet {
background: var(--cel-cream);
font-family: var(--cel-font-body);
color: #1a1209;
.window-content {
padding: 0;
overflow: hidden;
display: flex;
flex-direction: column;
background: var(--cel-cream);
}
}
// ─── Header ──────────────────────────────────────────────────────────────
.sheet-header {
display: flex;
align-items: stretch;
background: var(--cel-green);
background-image: url("../assets/ui/fond_cadrille.jpg");
background-blend-mode: overlay;
padding: 8px;
gap: 8px;
border-bottom: 3px solid var(--cel-orange);
.actor-portrait {
width: 80px;
height: 80px;
object-fit: cover;
border: 2px solid var(--cel-orange);
cursor: pointer;
}
.header-fields {
flex: 1;
display: flex;
flex-direction: column;
gap: 4px;
color: var(--cel-cream);
input[type="text"] {
background: transparent;
border: none;
border-bottom: 1px solid var(--cel-orange-light);
color: var(--cel-orange);
font-family: var(--cel-font-title);
font-size: 1.4em;
font-weight: bold;
padding: 2px 4px;
&::placeholder { color: var(--cel-orange-light); }
}
.actor-name {
font-family: var(--cel-font-title);
font-size: 1.4em;
color: var(--cel-orange);
margin: 0;
}
.concept-display,
input[name="system.concept"] {
font-style: italic;
font-size: 0.9em;
color: var(--cel-cream);
background: transparent;
border-bottom: 1px solid rgba(255,255,255,0.3);
}
}
.header-stats-row {
display: flex;
gap: 12px;
align-items: center;
.header-stat {
display: flex;
flex-direction: column;
align-items: center;
background: rgba(0,0,0,0.3);
border: 1px solid var(--cel-orange);
border-radius: 4px;
padding: 4px 8px;
label {
font-size: 0.65em;
text-transform: uppercase;
color: var(--cel-orange-light);
}
.stat-value {
font-size: 1.4em;
font-family: var(--cel-font-title);
color: var(--cel-orange);
font-weight: bold;
}
}
}
}
// ─── Tabs ────────────────────────────────────────────────────────────────
.sheet-tabs {
display: flex;
background: var(--cel-green-dark);
padding: 0;
border-bottom: 2px solid var(--cel-orange);
.item {
padding: 6px 12px;
color: var(--cel-cream);
font-family: var(--cel-font-title);
font-size: 0.85em;
text-transform: uppercase;
letter-spacing: 0.05em;
cursor: pointer;
border-right: 1px solid var(--cel-green-light);
transition: background 0.2s;
&:hover { background: var(--cel-green-light); }
&.active {
background: var(--cel-orange);
color: #1a0a00;
font-weight: bold;
}
}
}
// ─── Sheet body / tabs content ───────────────────────────────────────────
.sheet-body {
flex: 1;
overflow-y: auto;
padding: 8px;
}
.tab { display: none; &.active { display: block; } }
}

158
styles/items.less Normal file
View File

@@ -0,0 +1,158 @@
@import "mixins";
// ─── Item sheets shared ───────────────────────────────────────────────────────
.celestopol.item-sheet {
.item-header {
display: flex;
align-items: center;
gap: 8px;
padding: 8px;
background: var(--cel-green);
background-image: url("../assets/ui/fond_cadrille.jpg");
background-blend-mode: overlay;
border-bottom: 2px solid var(--cel-orange);
.item-portrait img {
width: 56px;
height: 56px;
object-fit: cover;
border: 2px solid var(--cel-orange);
cursor: pointer;
}
.item-header-fields {
flex: 1;
display: flex;
flex-direction: column;
gap: 4px;
input[type="text"] {
background: transparent;
border: none;
border-bottom: 1px solid var(--cel-orange-light);
color: var(--cel-orange);
font-family: var(--cel-font-title);
font-size: 1.2em;
font-weight: bold;
padding: 2px 4px;
}
.item-meta {
display: flex;
gap: 8px;
align-items: center;
select {
background: transparent;
border: 1px solid var(--cel-orange-light);
color: var(--cel-orange);
font-size: 0.85em;
option { background: var(--cel-green-dark); color: var(--cel-cream); }
}
}
.item-value-field {
display: flex;
align-items: center;
gap: 4px;
label { color: var(--cel-orange-light); font-size: 0.75em; text-transform: uppercase; }
input[type="number"] {
width: 40px;
background: transparent;
border: 1px solid var(--cel-orange-light);
color: var(--cel-orange);
text-align: center;
font-size: 1.1em;
font-weight: bold;
}
}
}
}
.item-tabs {
display: flex;
background: var(--cel-green-dark);
border-bottom: 2px solid var(--cel-orange);
.item {
padding: 5px 10px;
color: var(--cel-cream);
font-family: var(--cel-font-title);
font-size: 0.8em;
text-transform: uppercase;
cursor: pointer;
&:hover { background: var(--cel-green-light); }
&.active { background: var(--cel-orange); color: #1a0a00; font-weight: bold; }
}
}
section.tab {
padding: 8px;
display: none;
&.active { display: block; }
}
.form-group {
margin-bottom: 8px;
label {
display: block;
font-size: 0.75em;
text-transform: uppercase;
letter-spacing: 0.05em;
color: var(--cel-green);
margin-bottom: 2px;
}
input[type="text"], input[type="number"] { .cel-input-std(); width: 100%; box-sizing: border-box; }
}
// Scores grid
.scores-section {
.scores-header { .cel-section-header(); }
.scores-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 8px;
.scores-stat-col {
.scores-stat-name {
font-family: var(--cel-font-title);
font-size: 0.75em;
color: var(--cel-green);
text-transform: uppercase;
border-bottom: 1px solid var(--cel-border);
margin-bottom: 4px;
}
.score-row {
display: flex;
align-items: center;
gap: 4px;
padding: 2px 0;
font-size: 0.8em;
.score-skill-name { flex: 1; }
.score-bonus, .score-malus {
width: 36px;
.cel-input-std();
text-align: center;
}
.score-bonus { border-color: #4a8a4a; }
.score-malus { border-color: #8a4a4a; }
}
}
}
}
// Equipment-specific
&.equipment-sheet {
.equipment-stats {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 6px;
margin-bottom: 8px;
}
}
}

72
styles/mixins.less Normal file
View File

@@ -0,0 +1,72 @@
// ─── Mixins ──────────────────────────────────────────────────────────────────
.cel-section-header() {
font-family: var(--cel-font-title);
font-size: 0.8em;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--cel-green);
border-bottom: 1px solid var(--cel-border);
padding-bottom: 2px;
margin-bottom: 6px;
}
.cel-input-std() {
background: rgba(255,255,255,0.7);
border: 1px solid var(--cel-border);
border-radius: 2px;
padding: 2px 4px;
color: #1a1209;
font-family: var(--cel-font-body);
}
.cel-box() {
display: inline-block;
width: 22px;
height: 22px;
border: 2px solid var(--cel-border);
border-radius: 3px;
background: rgba(255,255,255,0.5);
cursor: pointer;
&.checked { background: var(--cel-orange); border-color: var(--cel-orange); }
}
.cel-rollable() {
cursor: pointer;
transition: background 0.15s, color 0.15s;
&:hover {
background: var(--cel-orange-light);
color: #1a0a00;
border-radius: 3px;
}
}
.cel-item-row() {
display: flex;
align-items: center;
gap: 6px;
padding: 3px 6px;
border-bottom: 1px solid rgba(139,115,85,0.3);
transition: background 0.1s;
&:hover { background: rgba(224,123,0,0.08); }
.item-icon {
width: 24px;
height: 24px;
object-fit: cover;
border: 1px solid var(--cel-border);
border-radius: 2px;
}
.item-name { flex: 1; font-style: italic; }
.item-controls {
display: flex;
gap: 4px;
opacity: 0;
transition: opacity 0.15s;
a { color: var(--cel-orange); cursor: pointer; }
}
&:hover .item-controls { opacity: 1; }
}

117
styles/npc.less Normal file
View File

@@ -0,0 +1,117 @@
@import "mixins";
// ─── NPC sheet specifics ─────────────────────────────────────────────────────
.celestopol.npc-sheet {
.stats-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 12px;
padding: 8px 0;
.stat-block {
border: 1px solid var(--cel-border);
border-radius: 4px;
overflow: hidden;
.stat-header {
background: var(--cel-green);
color: var(--cel-orange);
display: flex;
justify-content: space-between;
align-items: center;
padding: 4px 8px;
.stat-name {
font-family: var(--cel-font-title);
font-weight: bold;
text-transform: uppercase;
font-size: 0.9em;
}
.stat-res {
display: flex;
align-items: center;
gap: 4px;
font-size: 0.8em;
label { color: var(--cel-orange-light); }
.stat-res-value { font-weight: bold; color: var(--cel-orange); }
.stat-actuel {
font-size: 0.9em;
color: rgba(255,200,0,0.7);
font-style: italic;
}
input[type="number"] { width: 30px; .cel-input-std(); }
}
}
.skills-list {
background: var(--cel-cream);
.skill-row {
display: flex;
align-items: center;
justify-content: space-between;
padding: 3px 8px;
border-bottom: 1px solid rgba(139,115,85,0.2);
font-size: 0.85em;
&.rollable { .cel-rollable(); }
.skill-name { flex: 1; }
.skill-value { font-weight: bold; color: var(--cel-green); min-width: 24px; text-align: center; }
.skill-value-input { width: 36px; .cel-input-std(); text-align: center; }
}
}
}
}
.track-section {
border: 1px solid var(--cel-border);
border-radius: 4px;
margin-bottom: 8px;
overflow: hidden;
.track-header {
background: var(--cel-green);
color: var(--cel-orange);
padding: 4px 8px;
font-family: var(--cel-font-title);
font-weight: bold;
text-transform: uppercase;
font-size: 0.9em;
}
.track-boxes {
display: flex;
padding: 8px;
gap: 6px;
background: var(--cel-cream);
.track-box {
display: flex;
flex-direction: column;
align-items: center;
gap: 2px;
.box-label { font-size: 0.65em; color: var(--cel-border); }
}
}
.track-level {
display: flex;
align-items: center;
gap: 6px;
padding: 4px 8px;
background: rgba(139,115,85,0.1);
font-size: 0.85em;
input[type="number"] { width: 40px; .cel-input-std(); }
}
}
.description-section {
margin-top: 8px;
.enriched-html { font-size: 0.9em; line-height: 1.6; }
}
}

177
styles/roll.less Normal file
View File

@@ -0,0 +1,177 @@
// ─── Roll dialog ─────────────────────────────────────────────────────────────
.roll-dialog.celestopol {
padding: 8px 12px;
font-family: var(--cel-font-body, "Palatino Linotype", serif);
.roll-title {
text-align: center;
font-family: var(--cel-font-title, "CopaseticNF", serif);
font-size: 1.1em;
color: var(--cel-green, rgb(12,76,12));
margin-bottom: 10px;
.separator {
margin: 0 6px;
color: var(--cel-orange, #e07b00);
}
}
.form-group {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 8px;
label {
flex: 0 0 140px;
font-size: 0.85em;
text-transform: uppercase;
letter-spacing: 0.04em;
color: var(--cel-green, rgb(12,76,12));
}
select, input[type="number"] {
flex: 1;
border: 1px solid var(--cel-border, #8b7355);
border-radius: 2px;
padding: 2px 6px;
background: rgba(255,255,255,0.7);
}
}
.dice-preview {
text-align: center;
font-size: 1em;
margin-top: 10px;
padding: 6px;
background: rgba(12,76,12,0.08);
border-radius: 4px;
border: 1px solid var(--cel-green, rgb(12,76,12));
.nb-dice {
font-family: var(--cel-font-title, "CopaseticNF", serif);
font-size: 1.5em;
color: var(--cel-orange, #e07b00);
font-weight: bold;
}
}
}
// ─── Chat message ─────────────────────────────────────────────────────────────
.celestopol.chat-roll {
border: 1px solid var(--cel-border, #8b7355);
border-radius: 4px;
overflow: hidden;
font-family: var(--cel-font-body, "Palatino Linotype", serif);
.roll-header {
display: flex;
align-items: center;
gap: 8px;
background: var(--cel-green, rgb(12,76,12));
padding: 6px 8px;
.actor-img {
width: 36px;
height: 36px;
object-fit: cover;
border: 1px solid var(--cel-orange, #e07b00);
border-radius: 2px;
}
.roll-info {
display: flex;
flex-direction: column;
.actor-name {
font-family: var(--cel-font-title, "CopaseticNF", serif);
color: var(--cel-orange, #e07b00);
font-weight: bold;
}
.skill-info {
color: var(--cel-cream, #f5f0e8);
font-size: 0.8em;
font-style: italic;
}
}
}
.roll-details {
padding: 8px;
background: var(--cel-cream, #f5f0e8);
.dice-results {
display: flex;
gap: 4px;
flex-wrap: wrap;
margin-bottom: 6px;
.die.d6 {
display: inline-flex;
align-items: center;
justify-content: center;
width: 28px;
height: 28px;
border: 2px solid var(--cel-border, #8b7355);
border-radius: 4px;
background: white;
font-weight: bold;
font-size: 1em;
}
}
.bonus-line {
display: flex;
justify-content: space-between;
font-size: 0.85em;
color: #666;
padding: 1px 0;
}
.roll-total-line {
display: flex;
align-items: center;
gap: 8px;
margin-top: 6px;
padding-top: 4px;
border-top: 1px solid var(--cel-border, #8b7355);
.total-label {
text-transform: uppercase;
font-size: 0.75em;
color: var(--cel-green, rgb(12,76,12));
}
.total-value {
font-family: var(--cel-font-title, "CopaseticNF", serif);
font-size: 1.6em;
font-weight: bold;
color: var(--cel-orange, #e07b00);
}
.vs-difficulty {
font-size: 0.8em;
color: #999;
}
}
}
.roll-result-banner {
text-align: center;
padding: 4px 8px;
font-family: var(--cel-font-title, "CopaseticNF", serif);
font-size: 1.1em;
text-transform: uppercase;
letter-spacing: 0.08em;
&.success { background: var(--cel-green, rgb(12,76,12)); color: var(--cel-orange, #e07b00); }
&.failure { background: #4a1a1a; color: #e0a0a0; }
.critical {
display: block;
font-size: 0.75em;
letter-spacing: 0.12em;
}
}
}