/* ====================================================================
   Page « Nos modules » — thème Foundry VTT
   Sombre, orange Foundry, police Signika (OFL, hébergée sur le site).
   Pages « Nos modules » et « Foundry VTT » (jeu de rôle).
   ==================================================================== */

@font-face { font-family: "Signika"; src: url("polices/signika.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Signika"; src: url("polices/signika-gras.woff2") format("woff2"); font-weight: 600; font-display: swap; }

html:has(body:is([data-page="foundry-modules"], [data-page="foundry"])) { font-size: 100%; }

body:is([data-page="foundry-modules"], [data-page="foundry"]) {
  --fm-fond: #0b0a13;
  --fm-panneau: #17141f;
  --fm-panneau-2: #1f1b29;
  --fm-bord: #352d3d;
  --fm-orange: #ff6400;
  --fm-chaud: #ee9b3a;
  --fm-texte: #efe6d8;
  --fm-doux: #b3a99a;
  --fm-libre: #7fcf8a;
  --fm-licence: #ee9b3a;
  --accent: var(--fm-chaud);
  --teinte: 238, 155, 58;
  --nuit: var(--fm-fond);
  --brume: var(--fm-texte);
  --gris: var(--fm-doux);
  --filet: rgba(238, 155, 58, .18);

  background:
    radial-gradient(ellipse 70% 40% at 50% -5%, rgba(255, 100, 0, .14), transparent 70%),
    var(--fm-fond);
  color: var(--fm-texte);
  font-family: "Signika", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: .9375rem;
  line-height: 1.55;
}

/* Barre de navigation : mêmes liens, teintes Foundry */
body:is([data-page="foundry-modules"], [data-page="foundry"]) .barre { background: rgba(11, 10, 19, .88); border-bottom-color: rgba(255, 100, 0, .35); }
body:is([data-page="foundry-modules"], [data-page="foundry"]) .barre a[data-page="foundry"] { border-bottom-color: var(--fm-orange); }
body[data-page="foundry-modules"] .barre a[data-page="foundry-modules"] { background: rgba(255, 100, 0, .12); }

/* Colonne centrale */
.fm-cadre { box-sizing: border-box; max-width: 72rem; margin-inline: auto; padding-inline: 1rem; }
@media (min-width: 40rem) { .fm-cadre { padding-inline: 1.5rem; } }

/* ---------------------------------------------------------- en-tête */
.fm-tete {
  padding-block: 1.75rem 1.5rem;
  border-bottom: 1px solid var(--fm-bord);
  background: linear-gradient(to bottom, rgba(255, 100, 0, .06), transparent);
}
.fm-tete-grille { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1.25rem 1.75rem; }
.fm-d20 { width: 4.5rem; height: auto; filter: drop-shadow(0 .3rem .9rem rgba(255, 100, 0, .35)); }
body:is([data-page="foundry-modules"], [data-page="foundry"]) .fil { margin: 0 0 .35rem; font-size: .8125rem; }
body:is([data-page="foundry-modules"], [data-page="foundry"]) .fil a:hover { color: var(--fm-chaud); }
.fm-tete h1 {
  margin: 0;
  font-weight: 600;
  font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: .01em;
  color: var(--fm-texte);
}
.fm-chapeau { margin: .4rem 0 0; max-width: 44em; color: var(--fm-doux); }

.fm-raccourcis { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.fm-raccourcis a {
  display: flex; flex-direction: column;
  min-width: 13.5rem;
  padding: .5rem .85rem;
  border: 1px solid var(--fm-bord);
  border-left: 3px solid var(--fm-libre);
  border-radius: 4px;
  background: var(--fm-panneau);
  color: var(--fm-texte);
  text-decoration: none;
  transition: border-color .2s, box-shadow .2s;
}
.fm-raccourcis li + li a { border-left-color: var(--fm-licence); }
.fm-raccourcis a:hover { border-color: var(--fm-orange); box-shadow: 0 0 .6rem rgba(255, 100, 0, .35); }
.fm-raccourcis b { font-weight: 600; font-size: .875rem; }
.fm-raccourcis span { font-size: .75rem; color: var(--fm-doux); }

/* ---------------------------------------------------------- fenêtres façon Foundry */
.fm-duo  { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 1rem; margin-top: 1.5rem; align-items: start; }
.fm-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1.5rem; align-items: start; }

body:is([data-page="foundry-modules"], [data-page="foundry"]) section { padding: 0; }

.fm-fenetre {
  border: 1px solid var(--fm-bord);
  border-radius: 6px;
  background: var(--fm-panneau);
  box-shadow: 0 .4rem 1.4rem rgba(0, 0, 0, .45);
  overflow: hidden;
}
.fm-fenetre-titre {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem .75rem;
  padding: .6rem 1rem;
  background: linear-gradient(to bottom, #241f2e, #1b1723);
  border-bottom: 1px solid var(--fm-bord);
  box-shadow: inset 0 -2px 0 rgba(255, 100, 0, .55);
}
.fm-fenetre-titre h2 {
  margin: 0;
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.3;
  letter-spacing: .01em;
  color: var(--fm-texte);
}
.fm-fenetre-corps { padding: .85rem 1rem 1rem; }
.fm-fenetre-corps > p { margin: 0 0 .6rem; }
.fm-fenetre-corps p { color: var(--fm-doux); }
.fm-fenetre-corps b { font-weight: 600; color: var(--fm-texte); }
.fm-fenetre-corps a, .fm-fonctions a { color: var(--fm-chaud); text-underline-offset: .18em; }
.fm-fenetre-corps a:hover { color: var(--fm-orange); }

.fm-etiquette {
  display: inline-block;
  padding: .1em .6em;
  border: 1px solid currentColor;
  border-radius: 3px;
  font-size: .6875rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.fm-etiquette--libre   { color: var(--fm-libre); background: rgba(127, 207, 138, .08); }
.fm-etiquette--licence { color: var(--fm-licence); background: rgba(238, 155, 58, .08); }
.fm-etiquette--nouveau { margin-left: .3em; padding: 0 .45em; font-size: .625rem; vertical-align: .12em; color: var(--fm-orange); background: rgba(255, 100, 0, .1); }

/* Fiche clé / valeur, compacte */
.fm-fiche { display: grid; grid-template-columns: max-content minmax(0, 1fr); margin: .75rem 0 0; font-size: .875rem; }
.fm-fiche dt, .fm-fiche dd { margin: 0; padding: .45rem 0; border-top: 1px solid rgba(255, 255, 255, .07); }
.fm-fiche dt { padding-right: 1rem; color: var(--fm-chaud); font-weight: 600; }
.fm-fiche dd { color: var(--fm-doux); }

/* Les trois atouts */
.fm-atouts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin: .2rem 0 0; padding: 0; list-style: none; }
.fm-atouts li { padding: .45rem .6rem; border-left: 2px solid var(--fm-orange); background: var(--fm-panneau-2); border-radius: 0 3px 3px 0; }
.fm-atouts b { display: block; font-size: .875rem; }
.fm-atouts span { display: block; font-size: .78rem; line-height: 1.35; color: var(--fm-doux); }

/* ---------------------------------------------------------- fonctionnalités */
.fm-bloc { margin-top: 1.75rem; }
.fm-titre {
  display: flex; align-items: center; gap: .75rem;
  margin: 0 0 .75rem;
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--fm-texte);
}
.fm-titre::after { content: ""; flex: 1; height: 1px; background: linear-gradient(to right, rgba(255, 100, 0, .6), transparent); }

.fm-fonctions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: 0; padding: 0; list-style: none; }
.fm-fonctions li {
  padding: .7rem .85rem .8rem;
  border: 1px solid var(--fm-bord);
  border-radius: 5px;
  background: var(--fm-panneau);
  transition: border-color .2s;
}
.fm-fonctions li:hover { border-color: rgba(255, 100, 0, .55); }
.fm-fonctions .fm-neuf { background: linear-gradient(to bottom, rgba(255, 100, 0, .09), var(--fm-panneau) 70%); border-color: rgba(255, 100, 0, .35); }
.fm-fonctions h3 { margin: 0 0 .25rem; font-weight: 600; font-size: .9375rem; line-height: 1.3; color: var(--fm-texte); }
.fm-fonctions p { margin: 0; font-size: .8125rem; line-height: 1.5; color: var(--fm-doux); }

/* ---------------------------------------------------------- étapes et bouton */
.fm-etapes { margin: .4rem 0 0; padding: 0; list-style: none; counter-reset: fm; font-size: .875rem; color: var(--fm-doux); }
.fm-etapes li { position: relative; padding: .3rem 0 .3rem 2rem; counter-increment: fm; }
.fm-etapes li::before {
  content: counter(fm);
  position: absolute; left: 0; top: .3rem;
  width: 1.35rem; height: 1.35rem;
  border: 1px solid var(--fm-orange);
  border-radius: 50%;
  font-size: .75rem; font-weight: 600; line-height: 1.25rem; text-align: center;
  color: var(--fm-chaud);
}
.fm-appel { margin: .85rem 0 0 !important; }
.fm-bouton {
  display: inline-block;
  padding: .45rem 1rem;
  border: 1px solid var(--fm-chaud);
  border-radius: 3px;
  background: rgba(255, 100, 0, .12);
  color: var(--fm-texte) !important;
  font-weight: 600; font-size: .875rem;
  text-decoration: none;
  transition: background .2s, box-shadow .2s;
}
.fm-bouton:hover { background: rgba(255, 100, 0, .28); box-shadow: 0 0 .7rem rgba(255, 100, 0, .45); }

/* ---------------------------------------------------------- pied de page plus discret */
body:is([data-page="foundry-modules"], [data-page="foundry"]) footer {
  margin-top: 2.5rem;
  padding: 2rem 1.5rem 2.5rem;
  font-size: .875rem;
  background: linear-gradient(to bottom, var(--fm-fond), #1a1018 60%, #2b1410);
}
body:is([data-page="foundry-modules"], [data-page="foundry"]) .pied { max-width: 69rem; padding-top: 1.5rem; border-top-color: rgba(255, 100, 0, .4); }
body:is([data-page="foundry-modules"], [data-page="foundry"]) .mentions { max-width: 69rem; }

/* ---------------------------------------------------------- écrans plus étroits */
@media (max-width: 62rem) {
  .fm-duo, .fm-trio { grid-template-columns: minmax(0, 1fr); }
  .fm-fonctions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fm-tete-grille { grid-template-columns: auto minmax(0, 1fr); }
  .fm-raccourcis { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fm-raccourcis a { min-width: 0; }
}
@media (max-width: 40rem) {
  .fm-fonctions, .fm-atouts { grid-template-columns: minmax(0, 1fr); }
  .fm-d20 { width: 3.25rem; }
  .fm-raccourcis { grid-template-columns: minmax(0, 1fr); }
  .fm-fiche { grid-template-columns: minmax(0, 1fr); }
  .fm-fiche dt { padding-bottom: 0; }
  .fm-fiche dd { padding-top: .1rem; border-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .fm-raccourcis a, .fm-fonctions li, .fm-bouton { transition: none; }
}
body:is([data-page="foundry-modules"], [data-page="foundry"]) .bouton--discord { border-color: var(--fm-chaud); background: rgba(255, 100, 0, .14); color: var(--fm-texte); font-family: inherit; }
body:is([data-page="foundry-modules"], [data-page="foundry"]) .bouton--discord::before { background: var(--fm-chaud); }
body:is([data-page="foundry-modules"], [data-page="foundry"]) .bouton--discord:hover { color: var(--fm-fond); border-color: var(--fm-chaud); box-shadow: 0 0 .8rem rgba(255, 100, 0, .45); }

/* Page Foundry VTT (jeu de rôle) */
.fm-duo--egal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fm-tete .jeu { margin: 0 0 .2rem; color: var(--fm-chaud); font-size: .8125rem; font-weight: 600; letter-spacing: .02em; }
.fm-raccourcis .fm-adresse b { font-family: var(--mono); font-weight: 400; color: #ffb36b; }
.fm-raccourcis li.fm-adresse a { border-left-color: var(--fm-orange); }
.fm-liste { margin: .2rem 0 .8rem; padding: 0; list-style: none; font-size: .875rem; color: var(--fm-doux); }
.fm-liste li { position: relative; padding: .2rem 0 .2rem 1.1rem; }
.fm-liste li::before { content: ""; position: absolute; left: .1rem; top: .7em; width: .4rem; height: .4rem; background: var(--fm-orange); transform: rotate(45deg); }
.fm-bref { display: flex; align-items: center; gap: 1.25rem; }
.fm-bref img { flex: none; width: 11rem; height: auto; filter: drop-shadow(0 .3rem .9rem rgba(255, 100, 0, .3)); }
.fm-bref p { margin: 0; }
.fm-note { margin: .75rem 0 0 !important; font-size: .78rem; color: var(--fm-doux); opacity: .85; }
@media (max-width: 62rem) { .fm-duo--egal { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 40rem) { .fm-bref { flex-direction: column; align-items: flex-start; } .fm-bref img { width: 9rem; } }
/* les titres de fenêtre n'ont pas le filet des titres de section (pro.css) */
.fm-fenetre-titre h2 { display: block; }
.fm-fenetre-titre h2::after { content: none; }
